Search code examples
androidcordova

How to check cordova android version of a cordova/phonegap project?


I have received a Security Alert from Google this week that tells me to upgrade my android version of cordova app. The email from google is as below -

This is a notification that your --apps ids--, is built on a version of Apache Cordova that contains security vulnerabilities. This includes a high severity cross-application scripting (XAS) vulnerability. Under certain circumstances, vulnerable apps could be remotely exploited to steal sensitive information, such as user login credentials.

You should upgrade to Apache Cordova 3.5.1 or higher as soon as possible. For more information about the vulnerabilities, and for guidance on upgrading Apache Cordova, please see http://cordova.apache.org/announcements/2014/08/04/android-351.html.

Please note, applications with vulnerabilities that expose users to risk of compromise may be considered “dangerous products” and subject to removal from Google Play.

So, I needed to check the current version of my cordova apps. I can upgrade my cordova installation by using npm update -g cordova on windows cmd. The question is how can I check the current platform (android in my case) version of my cordova app?


Solution

  • The current platform version of a cordova app can be checked by the following command

    cordova platform version android
    

    And can be upgraded using the command

    cordova platform update android
    

    You can replace android by any of your platform choice like "ios" or some else.

    This only applies to android platform. I have not checked. You can try replacing android in the code segments to try for other platforms.