How to explore Android device files under FreeBSD ?
freebsd at edvax.de
Sat Jul 13 20:48:13 UTC 2019
On Sat, 13 Jul 2019 18:49:30 +0000, Manish Jain wrote:
> Somebody has asked me for some images on my Android phone.
> So I first need to download those files from the phone to my FreeBSD box
> and then email them.
> Is there some way I can do that ?
It is not intended by the manufacturer, that's why it's hard to do.
It's of course not impossible, but the more you want, the less easy
By default, parts of the file system are usually accessible as USB
direct storage device when connected to a computer. You you can
mount them or take an image. Maybe there is some interaction on
the phone required, maybe some setting you need to enable (like
"Android developer something" nonsense), but your system should
detect the attached device.
For example, if /dev/da0 is the device detected (check "dmesg"
output), you can do this:
# mount -t msdosfs -o ro /dev/da0 /mnt
# umount /mnt
Depending on how the partitioning is represented, instead of
/dev/da0, /dev/da0s1 could be required. Check which files have
been created in /dev.
But as I said, this is only "part of the truth", i. e., only a
subset of the file system can be accessed this way, compare it
to a "chroot'ed environment". Depending on where the image files
are actually located, you _could_ have access to them, or not.
If you install the package android-tools-adb, you can use the adb
command line program to access your phone. But this includes the
limitation mentioned above. However, downloading stuff from the
phone is very easy with this tool (I have tried this myself some
Furthermore, some phones don't represent their content as USB
mass storage, but they provide a MTP interface which is common
for digital cameras. Tools like gphoto2 (CLI) and gtkam (GUI)
can be used to get images and media from the phone (I also have
tried this, works very good, even with iPad).
The only way to deal with the "subtree restriction" mentioned
above is to "root" the phone. This might lead to a loss of
waranty of other problems I have no idea of. :-)
> My Android phone does not have a USB port, but it does have a micro USB
> port (which I use for
> charging the phone).
You should be able to use a USB-A<--->USB-micro-B cable to connect
the phone to your computer. I'm quite sure this is not just for
connecting power, but also for connecting data. :-)
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions