From owner-freebsd-questions@freebsd.org Sat Jul 13 20:48:13 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3771415CC28D for ; Sat, 13 Jul 2019 20:48:13 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A32FD6E2AE for ; Sat, 13 Jul 2019 20:48:11 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.12.34.221]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1N3bGP-1iUDua1d9X-010gOx; Sat, 13 Jul 2019 22:47:55 +0200 Date: Sat, 13 Jul 2019 22:47:53 +0200 From: Polytropon To: Manish Jain Cc: "freebsd-questions@freebsd.org" Subject: Re: How to explore Android device files under FreeBSD ? Message-Id: <20190713224753.f5e51166.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:FPHcFzMEqxgJDewpRyZ5nBO1UoHGBJpLxB0dWRd2ogyQuJnEQux hwofptQQRs2zfh8qog+9WB6kHanVHL48YsNLDl8Uoeg2JPGyhdgMvwxLJ8ZrbsmehcWHQ2P L5q0VSwyJ9OKhs2KjNzroozoRuKKoMIlXIi+fZjCM8UnjxyVCdnnsoB/LC1vqHvWlPOVLhB vfN/blf+WuhlivjQEviow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xA1lybYambI=:rOTMbYmUbnnb3c7z0NP53G pi2WCM+FMNFkG9mO6vFohYoZamhaWJjgiFkc8zR8TyY1LRPed/WvLJVDpi84kSC56qvWSzX5Y vZiiHuSrWF+SpurJQPApMJadNKf9LMl+2cerYSADCENgoHwoRs2m+2NqCms9dLPm6vf7mFp42 8e0ELe5vzXgjmDX3c/E86NwfWPXo3mDyWoxojsm+Je56r6uA3F3yY2cgnRUAD2ykx/Htobnxs SdofRVrNP7fwDzWkkmo95AEw8re4YfCUPPUumaT0En1IPfePAV0ylhJDn9sWpEi59kLgdBeL/ He9mv7YhVHJXtDhpJ1JAgOwMeevsRhjKl1LijbG3UTObhwzk8UZl3GhyNzAnVLXGd7+8rciFA jnREkBLnuoTAweyPW/R+NIR2QYM0hZr8QrFP70AUlsNnr11HBKmne+Cgn1MLTz4Haba6jzEr6 9rmcdzlE/N389ZgziotS4TUTK4inrhlDh63OnSbHBLDamR9mERjQOwBP5jumvP7trHomPDR41 +uNJOY2+MTFfRhhkjKA1TsHf9inwc8n2Vk+DFdBCP4H9TI6dIHK8mrwKrLrzLJS9wyjIQ9f0R KiM56ExhmLJDWg5mcBjB1q78m7TI68IoIO/JTEk9Bk4sEAaA6TyXKWtgGibWjyXN2Pd3AzAzN AkBASbtvOO6lyq9c2K999WD+VrEzp/T52+t4mpJrrec/92QtCP2H/liT+CAu8gMtI+5QiscMs 3D7d/BFI2Z2M4QkySPrFh4+6aOinHGgwhHZQTcrk+RPPUgH7m/poln9NWT4= X-Rspamd-Queue-Id: A32FD6E2AE X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [6.89 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.01)[cached: mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[hotmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[221.34.12.178.zen.spamhaus.org : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.94)[0.936,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.990,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[75.192.72.217.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.58)[ip: (0.38), ipnet: 217.72.192.0/20(0.12), asn: 8560(2.40), country: DE(-0.01)] X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2019 20:48:13 -0000 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 it becomes. Summary: 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 years ago). 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...