cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Bavari (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-9080) Cordova CLI run for Android versions 4.1.x throws error
Date Wed, 27 May 2015 16:38:17 GMT

     [ https://issues.apache.org/jira/browse/CB-9080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Josh Bavari updated CB-9080:
----------------------------
    Component/s: Android

> Cordova CLI run for Android versions 4.1.x throws error
> -------------------------------------------------------
>
>                 Key: CB-9080
>                 URL: https://issues.apache.org/jira/browse/CB-9080
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CLI
>    Affects Versions: 5.0.0
>         Environment: Cordova CLI 5.0.0
> Cordova Lib 5.0.0 
> Mac Yosemite 10.10.2
> Android platform tools 22
> Android 4.1
>            Reporter: Josh Bavari
>            Priority: Minor
>
> When running `cordova run android` and an Android v4.1 device connected, the `adb` command
fails.
> You can read more about the error on the Ionic CLI issues, as ionic calls cordova: https://github.com/driftyco/ionic-cli/issues/441
> Looking at the source code, the `device.js` file will try to run this command:
> 'adb install -s ' + resolvedTarget.target + ' -r -d "' + apk_path + '"'
> As you can see, it passes the -d option, which works fine for most android 4.2+ devices.
> However, when Android 4.1 is involved, this error occurs:
> ```
> BUILD SUCCESSFUL
> Total time: 2.551 secs
> Built the following apk(s):
>     /Users/JoshBavari/Development/testing/s1/platforms/android/build/outputs/apk/android-debug.apk
> Using apk: /Users/JoshBavari/Development/testing/s1/platforms/android/build/outputs/apk/android-debug.apk
> Installing app on device...
> Running this command to install app to device: adb -s 192.168.56.102:5555 install -r
-d "/Users/JoshBavari/Development/testing/s1/platforms/android/build/outputs/apk/android-debug.apk"
> OUTPUT: Error: Unknown option: -d
> usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [FILTER]
>        pm list permission-groups
>        pm list permissions [-g] [-f] [-d] [-u] [GROUP]
>        pm list instrumentation [-f] [TARGET-PACKAGE]
>        pm list features
>        pm list libraries
>        pm path PACKAGE
>        pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f]
>                   [--algo <algorithm name> --key <key-in-hex> --iv <IV-in-hex>]
PATH
>        pm uninstall [-k] PACKAGE
>        pm clear PACKAGE
>        pm enable PACKAGE_OR_COMPONENT
>        pm disable PACKAGE_OR_COMPONENT
>        pm disable-user PACKAGE_OR_COMPONENT
>        pm grant PACKAGE PERMISSION
>        pm revoke PACKAGE PERMISSION
>        pm set-install-location [0/auto] [1/internal] [2/external]
>        pm get-install-location
>        pm set-permission-enforced PERMISSION [true|false]
> ```
> Now when I run with an Android 4.4 device attached:
> ```
> Total time: 2.585 secs
> Built the following apk(s):
>     /Users/JoshBavari/Development/testing/s1/platforms/android/build/outputs/apk/android-debug.apk
> Using apk: /Users/JoshBavari/Development/testing/s1/platforms/android/build/outputs/apk/android-debug.apk
> Installing app on device...
> Running this command to install app to device: adb -s 192.168.56.101:5555 install -r
-d "/Users/JoshBavari/Development/testing/s1/platforms/android/build/outputs/apk/android-debug.apk"
> OUTPUT: 	pkg: /data/local/tmp/android-debug.apk
> Success
> Launching application...
> LAUNCH SUCCESS
> ```
> My guess here is that this is an issue with the `adb` tool.
> Can anyone else confirm this is an issue? The adb tool does not work with `-d` on Android
4.1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message