Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-164] appcd-plugin-android: Device tracking does not reinit when adb is installed/restarted

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2018-01-11T16:04:37.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 1.1.0
Componentsappcd-plugin-android
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2017-11-17T17:43:24.000+0000
Updated2018-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.

Comments

  1. 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 --subscribe and then rename adb to adb2 which will trigger adb 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 if adb disappears. Note that on macOS and Linux, if adb is running, then you can do whatever you want to the executable on disk and adb will 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.

JSON Source