Another (not very good) workaround: is to use the adb
command-line tool like in this comment of n0madK on Open Correctly handle USB attach of Android device in USB debugging mode.
In the template dedicated to android (maybe you can create a dedicated template like “android-template”), install the android-tools
package. Do the same in the template of sys-usb
. With fedora it’s something like that:
dnf install android-tools
Now make sure both templates are shutdown and restart sys-usb
and your android AppVM.
On your phone:
- activate the Developer Options
- In the Developer Options menu, allow USB Debbuging
- Plug your phone to the computer, switch to MTP transfert
On sys-usb, run an adb command like:
adb devices
On your phone: allow the connection.
In sys-usb: you should see some result from the adb devices
like:
List of devices attached
XXXXXXXXX device
Now we will allow the android AppVM to connect to adb via sys-usb.
In dom0: the comment say to edit /etc/qubes-rpc/policy/qubes/.ConnectTCP
but I think that there is a better solution with a custom file in /etc/qubes/policy.d/30-android.policy
. Edit this file like this, replacing your-android-vm
by the name of your android AppVM:
qubes.ConnectTCP * your-android-vm @default allow target=sys-usb
On the android AppVM, you need to run this command first:
qvm-connect-tcp::5037
Then you can check that your device is available:
adb devices
And now you can copy your files:
adb pull /sdcard/Pictures/... Pictures
If your not familiar with these commands, maybe try the other workaround first?