[TIMOB-16132] CLI: Android: Bake deploy.json into built apk
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-04-13T16:27:28.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2014 Sprint 08, 2014 Sprint 08 Tooling, Release 3.3.0 |
Components | Android, CLI |
Labels | module_debugger, qe-testadded |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2014-01-07T00:38:56.000+0000 |
Updated | 2015-04-13T16:27:31.000+0000 |
Description
Android debug builds places a deploy.json file in the /sdcard// directory that contains the debug server information. It's possible in certain circumstances that this file is not properly removed for non-debug builds. This is a problem since the presence of the deploy.json means you are debugging or profiling and the app appears to hang.
It would be better if we bake the deploy.json into the packaged APK file. This has several benefits:
1. Ties debug sessions to debug builds
2. Installing non-debug apps will cause the debug settings to be wiped
3. Wouldn't need to wait for the device/emulator SD card to mount
4. Wouldn't require a device/emulator to have an SD card
5. Wouldn't require the WRITE_EXTERNAL_STORAGE permission
Note: We need a separate ticket for the Android SDK pieces.
Today, I've installed VERSION 3.3.0.2014 02 12 1458 BUILD 2014 02 12 1458 and had no lucky running emulator after stopping a debug built from STUDIO. App keeps stuck on the splash screen. Inside adb shell I see the culprit:
ls -l /mnt/sdcard/com.fabreti.test4
----rwxr-x system sdcard_rw 87 2014-02-18 15:41 deploy.jsonrm /mnt/sdcard/com.fabreti.test4/deploy.json
After removing it, I can 'run' app with success on emulator. === EDIT ==== I'd like to add that above problem does NOT occur with android API 17, but with API 15 and 16. *Meanwhile, Is there any workaround for this?* I don't know if its related, but since 3.2.1 GA could not get debug to work, same problem: App keeps stuck on the splash screen when loading debug session. I'm talking about fresh new barebone app. (this occurs with android APIs 15, 16 and 17) === EDIT2 === Debugging session freezing at splash screen was because this error: (Build 3.3.0.201402121458) [ERROR] spock: spock: Name or service unknown "spock" is node name for my Linux machine (uname -n) and it was NOT defined in /etc/hosts after inserting "127.0.0.1 spock" at end of /etc/hosts it worked. sorry for that one.Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5632 To test, run an Android app in the emulator and device. Then debug the app on emulator and device. For fun, test using an emulator that doesn't have an SD card.