[DAEMON-164] appcd-plugin-android: Device tracking does not reinit when adb is installed/restarted
|Appc Daemon 1.1.0
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
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.
- Chris Barber 2018-01-05
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 --subscribeand then rename
adb2which will trigger
adbdisappearing. 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 if
adbdisappears. Note that on macOS and Linux, if
adbis running, then you can do whatever you want to the executable on disk and
adbwill still be running. This is fine. Another thing to test is subscribe to devices and then run
adb 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.