Unable to detect Android devices via adb

My sys-usb worked fine for usb devices in terms of detection, recognition and attaching usb devices to other qubes. However, when it came to Android devices, sys-usb failed to even detect the Android device let alone attaching it to other AppVM.

Regarding my settings, I enabled developer debugging mode and allowed file transfer via usb on the Android device. On the other hand, I installed adb and android-platform-tools on the AppVM to which I wanted to attach the Android device.

Here are my questions:

  1. Are there any packages that should be installed to sys-usb (e.g. adb, android-platform-tools, etc.) besides the AppVM?
  2. Are there any settings that are necessary for connecting Android devices to AppVM?

Appreciate your help, thanks!

Thanks @apparatus for sharing the thread. I’ve actually read it earlier but given my limited technical knowledge I’d rather restrict my settings and modifications to individual qubes alone rather than to dom0 or across qubes, for fear of breaking the whole system. Hence, below is the only workaround I dare enough to try, but this will give rise to a dilemma in my use case.

  1. copy adb binary to sys-usb
  2. run adb tcpip 5555 from sys-usb
  3. run adb connect <android_device_IP> from the desired domain

On the one hand, this workaround is deployed to sys-usb only (which is great!) and my sys-usb is disposable. On the other hand, my use case is to connect and analyse the Android device with the mvt-android “service”, which based on my trial worked solely in the qube to which the “service” was installed. In other words, the “service” could not be cloned to another qube or inherited by an AppVM from the underlying template. Given these restrictions, if things are to work, I will need to complete everything from installation of the mvt-android “service” to completion of analysis in a single lengthy session, as the “service” will be gone once the disposable sys-usb is closed.

Would you have any idea how I could make a service (e.g. mvt-android) persist in the disposable sys-usb?

If you connect to the Android device like this:

Then the only thing running in sys-usb will be adb tcpip 5555 and you’ll connect and analyse the Android device from some other qube that can be an app qube and not a disposable qube.
So what exactly do you want to make persistent in disposable sys-usb?

Then the only thing running in sys-usb will be adb tcpip 5555 and you’ll connect and analyse the Android device from some other qube that can be an app qube and not a disposable qube.

Oh I didn’t realize that. I thought this workaround entailed performing all work within sys-usb.

Got a related question though. The workaround did not mention any other qubes, does it mean any other qubes can be used to perform the analysis with the use of “adb tcpip 5555”?

And if the Android device has no internet connection, where can the <android_device_IP> be obtained?

Thanks.

The guide suggests to enable the ADB over network using ADB over USB in sys-usb and then you can access the Android device from some qube connected to the same LAN as Android device.
If you don’t want to connect the android to the internet or to have a separate offline WiFi router (or setting up a WiFi AP in the qube) to connect a qube and an android device, then you can connect it directly to some qube like this: