Accessing Android phone photos

295 views
Skip to first unread message

Alex

unread,
May 11, 2017, 5:41:41 PM5/11/17
to qubes...@googlegroups.com
I'm connecting my Android phone over USB to my Qubes 3.2 host and... nothing happens. I'm using a Fedora 24 template and a USB Qube.

I've read the issues on github relating to this but have not found a simple set of instructions for accessing my phone's files over MTP. What are the steps?

Thanks in advance,

Alex

PR

unread,
May 11, 2017, 6:05:46 PM5/11/17
to Alex, qubes...@googlegroups.com

Hello Alex,

On 05/11/2017 11:41 PM, Alex wrote:
I'm connecting my Android phone over USB to my Qubes 3.2 host and... nothing happens. I'm using a Fedora 24 template and a USB Qube.

I've read the issues on github relating to this but have not found a simple set of instructions for accessing my phone's files over MTP. What are the steps?

I have never attached my Android phone to Qubes before, but tried so a few minutes ago and could access it without any problems:

1) attach phone via USB

2) on the phone, switch from "Charging only" to "USB Data tranfser (MTP)"

3) Launch a dom0 Terminal, you should see your phone after entering:
    [user@dom0 ~]$ qvm-usb
   ...
   sys-usb:3-3     04xx:88xx Android_Androidxxxxxxxxxxx
   ...

4) mount your phone via sys-usb to your AppVM (I've choosen my untrusted AppVM in this case):
    [user@dom0 ~]$ qvm-usb -a untrusted sys-usb:3-3

5) Open a File Explorer in this AppVM
    [user@dom0 ~]$ qvm-run untrusted nautilus

6) you should see your phone as an additional device beneath the Trash-Icon.
    If not, unmount and remount the phone once:
    [user@dom0 ~]$ qvm-usb -d sys-usb:3-3
    [user@dom0 ~]$ qvm-usb -a untrusted sys-usb:3-3
   

Good luck

- P

Alex

unread,
May 11, 2017, 6:20:58 PM5/11/17
to PR, qubes...@googlegroups.com
Hello and thank you for the walkthrough! I do indeed see a "SAMSUNG Android" in the file manager. As soon as I click on it, my phone prompts me to "Allow access to device data". As soon as I click "Allow", the icon disappears. VM's dmesg says:
vhci_hcd: connection closed

Any ideas how to troubleshoot? This works as expected on a FC25 laptop.

Many thanks,

Alex

cooloutac

unread,
May 13, 2017, 7:49:05 PM5/13/17
to qubes-users, p.rasc...@googlemail.com
Works for me using a debian-based sys-usb. once I click allow on the phone i can browse its directories in the file manager.

Maybe put your phone in developer mode and then try mtp again.

Vít Šesták

unread,
May 14, 2017, 1:36:32 AM5/14/17
to qubes-users
Maybe the phone resets its USB connection at that point (as it was unplugged and plugged again), so it appears in sys-usb again. Do you see it here?

Workarounds:

* Ideally, there would be a way to tell sys-usb not to communicate to the device when it reconnects and to somehow reconnect it as soon as it reappears. AFAIK, there is currently no such option.
* You might try to assing it again, but I am unsure if it will work.
* Can you set your phone to allow it without asking? This might prevent the reconnects…

Regards,
Vít Šesták 'v6ak'

cooloutac

unread,
May 14, 2017, 10:47:44 PM5/14/17
to qubes-users
i you idle it for a couple minutes probably whenever your phoen screen lock go on, you have to hit allow on the phone again. everytime you try to access the drive keep screen unlocked and be ready to hit allow on the phone.

Haw...@bitmessage.ch

unread,
May 28, 2017, 5:49:29 PM5/28/17
to 'PR' via qubes-users
On Fri, 12 May 2017 00:05:42 +0200
"'PR' via qubes-users" <qubes...@googlegroups.com> wrote:

> Hello Alex,
>
> On 05/11/2017 11:41 PM, Alex wrote:
> > /I'm connecting my Android phone over USB to my Qubes 3.2 host
> > and... nothing happens. I'm using a Fedora 24 template and a USB
> > Qube. I've read the issues on github relating to this but have not
> > found a simple set of instructions for accessing my phone's files
> > over MTP. What are the steps? /
>
> I have never attached my Android phone to Qubes before, but tried so
> a few minutes ago and could access it without any problems:
>
> 1) attach phone via USB
>
> 2) on the phone, switch from "Charging only" to "USB Data tranfser
> (MTP)"
>
> 3) Launch a dom0 Terminal, you should see your phone after entering:
> [user@dom0 ~]$ qvm-usb
> ...
> sys-usb:3-3 04xx:88xx Android_Androidxxxxxxxxxxx
> ...
>
> 4) mount your phone via sys-usb to your AppVM (I've choosen my
> untrusted AppVM in this case):
> [user@dom0 ~]$ qvm-usb -a untrusted sys-usb:3-3
>
> 5) Open a File Explorer in this AppVM
> [user@dom0 ~]$ qvm-run untrusted nautilus
>
> 6) you should see your phone as an additional device beneath the
> Trash-Icon. If not, unmount and remount the phone once:
> [user@dom0 ~]$ qvm-usb -d sys-usb:3-3
> [user@dom0 ~]$ qvm-usb -a untrusted sys-usb:3-3
>
>
> Good luck
>
> - P
>


Can attaching an android phone be accomplished without having a usb-vm?

When I try the above method substituting my devices and dom0 instead
of sys-usb, I get this error:

qubes-usb-proxy not installed in the VM

qubes-usb-proxy is installed in the destination VM, but I don't have a
sys-usb.

Thanks!


cooloutac

unread,
May 28, 2017, 10:46:36 PM5/28/17
to qubes-users, Haw...@bitmessage.ch

I don't know I do it the same way as described above.

Vít Šesták

unread,
May 29, 2017, 2:21:10 AM5/29/17
to qubes-users
The qubes-usb-proxy is needed in both VMs (in this case, you would have to install in dom0).

Well, it might work in dom0, but I am not sure if it is the intended usage.

What's your reason for not using sys-usb? Do you use some USB device that needs to be connected directly to dom0?

Regards,
Vít Šesták 'v6ak'

Haw...@bitmessage.ch

unread,
May 29, 2017, 8:41:04 PM5/29/17
to qubes-users


On Sun, 28 May 2017 23:21:09 -0700 (PDT)
Vít Šesták
<groups-no-private-mail--con...@v6ak.com>
wrote:
> --


Thanks. Yes, my touchscreen breaks when choosing usb-vm on install. I
suspect it is possible to pass it back to dom0, but haven't had time to
figure it out.

Vít Šesták

unread,
May 30, 2017, 12:41:02 AM5/30/17
to qubes-users
You are right, support for USB touchscreen is incomplete, see https://github.com/QubesOS/qubes-issues/issues/2281 . Maybe it would not require much work.

You can also try to start sys-usb temporarily and then (when you have no remaining connected device) to reassign the USB controller back to dom0: https://www.qubes-os.org/doc/assigning-devices/#bringing-pci-device-back-to-dom0

Note that starting a non-HVM with USB controller (or any other PCI device) might be a little challenging sometimes, because PV with PCI require unfragmented memory. You can:

* Hope you will be lucky all the time.
* Give sys-usb as low memory as possible. (200MiB should be enough.)
* Attach USB controller to a HVM (which will probably consume more memory, but it won't require it unfragmented) – requires VT-d/IOMMU.
* Shut some VMs down, ideally with temporarily disabled qmemman.
* Wait for Qubes 4. It will use HVMs (or probably slightly different technology in 4.1) instead of PVs, so it won't require unfragmented memory. Requires VT-d/IOMMU and few other virtualization features.

Regards,
Vít Šesták 'v6ak'

cooloutac

unread,
May 30, 2017, 4:11:20 AM5/30/17
to qubes-users
yes I have no luck with two diff usbvms. I just make one and call it sys-usb. and I must have the proxy installed in it cause I use it for mouse.

Haw...@bitmessage.ch

unread,
May 30, 2017, 10:37:09 PM5/30/17
to qubes...@googlegroups.com

On Mon, 29 May 2017 21:41:02 -0700 (PDT)
Vít Šesták
<groups-no-private-mail--con...@v6ak.com>
wrote:
Thanks again! As a slightly cruder solution to android photo access, I
see that saving photos to a micoSD in the phone, removing it and
sticking the card into a regular SD card adapter, and using that in the
built in card-reader in my computer, allows access just like a USB
stick or external hard drive, with the microSD appearing just like any
external storage in the Qubes VM manager.

Cheers.

cooloutac

unread,
May 31, 2017, 8:18:00 PM5/31/17
to qubes-users, Haw...@bitmessage.ch
were you able to add the controller to a usbvm?

cooloutac

unread,
May 31, 2017, 8:33:42 PM5/31/17
to qubes-users, Haw...@bitmessage.ch
On Tuesday, May 30, 2017 at 10:37:09 PM UTC-4, Haw...@bitmessage.ch wrote:
oh I see yes.
Reply all
Reply to author
Forward
0 new messages