Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25742

CLI: Fails to install APK to Android 4.1 devices

    Details

    • Sprint:
      2018 Sprint 04 SDK

      Description

      Summary:
      The "appc" command line tool always fails to install a built APK to an Android 4.1 device. It can only successfully install to Android 4.2 and higher.

      How to Reproduce:

      1. Connect an Android 4.1 device to your machine.
      2. In the top-left corner of Appcelerator Studio, select "Run" and the Android 4.1 device from the drop-down UI.
      3. Click the "Run" button.
      4. Observe the "Console" log.

      Alternatively, you can do this at the command line via...

      appc run -p android

      Result:
      The install fails after the build with the following error messages...

      [ERROR] :  Failed to install apk on "014E05E01600E012"
      [ERROR] Application Installer abnormal process termination. Process exit value was 1
      

      Cause:
      The CLI is installing the APK using Google's "adb" command line tool with the "-d" argument. Android 4.1 does not support the "-d" argument.
      https://github.com/appcelerator/node-titanium-sdk/blob/master/lib/adb.js#L548

      Recommended Solution:
      The "adb" command line does not return an error until near the end of the install, which can take a lot of time for large APKs. So, it would be best to fetch the API Level from the device first via the "adb shell getprop" command and then only use "adb install" with argument "-d" if the API Level is 17 or higher.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Chris Barber
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6149
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code