[DAEMON-164] appcd-plugin-android: Device tracking does not reinit when adb is installed/restarted
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2018-01-11T16:04:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 1.1.0 |
Components | appcd-plugin-android |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2017-11-17T17:43:24.000+0000 |
Updated | 2018-01-11T16:04:37.000+0000 |
Description
If
adb
is not found, it cannot track devices. The Android plugin will watch for an Android SDK to be added, but then it needs start tracking devices using the installed adb
.
As a workaround, the Android plugin can be manually stopped or be unloaded after 1 hour of inactivity. On the next request, it'll start and detect adb
and begin tracking devices.
PR: https://github.com/appcelerator/appcd-plugin-android/pull/6 To test and for simplicity, only have 1 Android SDK discoverable on your machine. Go into the sdk's platform tools directory. Run
appcd exec /android/latest/info/devices --subscribe
and then renameadb
toadb2
which will triggeradb
disappearing. Change it back and it'll redetect Android devices. This should also work if you move the entire Android SDK directory from some undiscoverable directories such as subdir on your desktop, then move it to a discoverable directory such as/opt
. The list of devices should become empty ifadb
disappears. Note that on macOS and Linux, ifadb
is running, then you can do whatever you want to the executable on disk andadb
will still be running. This is fine. Another thing to test is subscribe to devices and then runadb kill-server
. The daemon will say the devices are empty, then attempt to restart adb in 2 seconds. After a few more seconds, the list of devices will be refreshed.