Author Topic: Accessing A Google Nexus 7 from PCLinuxOS  (Read 2777 times)

Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 998
  • Wayfarer of The Western Wastes
Accessing A Google Nexus 7 from PCLinuxOS
« on: September 18, 2012, 11:34:22 PM »
Hi, Gang,

I'll preface my remarks here by saying that I stand on the shoulders of giants - a good bit of this is not original to me but comes from an enterprising user at another distro and has been "adapted" by me for use with the Nexus 7 & PCLinuxOS.  The link I found most helpful was at:

http://modmymobile.com/forums/71-razr-v8/55424-howto-mount-motorola-v8-linux-mtpfs.html



NOTE:  There is important information given in the IMPORTANT NOTE at the bottom of this post. Please read it before attempting to access your Nexus 7 device. The tablet you save may be yours.  You should read this post completely before hooking anything up and trying to move or otherwise mess with your tablet's data.



Last Friday I took part of the "bonus" I received as part of the hurricane ride-out crew for Isaac, and ordered myself a late birthday present.  I received my Nexus 7 today, and, as soon as it was charged up, tried to mount it on the system to see if I could access its storage.

It appears Google and Co. have tried to make this only a little difficult - they only permit the device to mount as a media device or camera instead of as a storage device (something my wife's Nook Tablet, for example, does and does very nicely, thank you).  For what we are doing here, mount it as a media device (which it does by default).

The secret to success is in loading the necessary utilities onto the system to be able to communicate with media devices, and then learning how to mount them.  Open Synaptic and ensure the following packages are loaded:  libmtp8, libmtp-utils, and mtpfs.  (The only one I needed to actually load was mtpfs, but your mileage may vary.)

After these are loaded, go somewhere in your ~/ ("home") directory.  We'll do this example with the fictional user name goofy.  In this case, user goofy would create a folder somewhere in the folder /home/goofy/.  Using this fictional persona as mine, the folder I created was /home/goofy/media/Nexus7.

With the folder created, open a shell and plug in the Nexus 7 to a convenient USB port via its supplied cable.  At the shell, issue the command:

Code: [Select]
[goofy@localhost ~]$ mtpfs ~/media/Nexus7
and leave the shell open (if it's in the way, minimize it, but leave it open).  This will mount the Nexus7, which may then be accessed via a file manager or the shell to perform file transfers, deletions, etc. 

Once finished mucking about with the files on the device and all transactions (up/download) are completed, switch back to the shell and issue the command:

Code: [Select]
[goofy@localhost ~]$ fusermount -u ~/media/Nexus7
to unmount the device so it may be safely removed.  If you receive a "device busy" error like I did the first time I tried it, wait a while and try again later.  This process is something I'm still working out, and I may have refinements to this method later as I get more used to working with my tablet.

I suspect I will have to root this device once the warranty period expires to realize its fullest potential, but that's gonna have to wait.



IMPORTANT NOTE:  The file system on the tablet is organized in such a way to keep personal files separated from Google Play content.  All the Google Play stuff resides in the folder (using its mount point on goofy's file system) /home/goofy/media/Nexus7/Android/data/, and I have not dared to mess around there just yet. 

The folders /home/goofy/media/Nexus7/Movies, Music, Pictures, and Download all seem to be accessible, and are all I have played with yet.  I don't know that I would try messing with the stuff in the Android/data/ folder - might bork the tablet.  I certainly won't try it with mine until I back the thing up to my Google account.



The link I referenced above was originally geared toward Android phones, specifically the RAZR2 V8, and so may help with other devices, too.

Hope this will be helpful to those of you with Android devices with similarly restricted data transfer capabilities.

Later On,
D

 
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #1 on: September 19, 2012, 08:59:08 AM »
"It appears Google and Co. have tried to make this only a little difficult - they only permit the device to mount as a media device or camera instead of as a storage device (something my wife's Nook Tablet, for example, does and does very nicely, thank you).  For what we are doing here, mount it as a media device (which it does by default)"

they are not doing it to make it difficult for you, not the reason, when you mount a device in mtp mode, it is available for both the device and the os where you mount it, this way you can keep using files and apps stored on the device while you access the contents on the device from the os, something extremely important if you use apps2sd, different to usb mass storage device

i have experienced some problems when using my phone that way, some apps start working weird and had problems with the partition, finally had to format the sd card

another solution is use the app airdroid, offer the storage as a resource on your local network and access it from your web browser
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 998
  • Wayfarer of The Western Wastes
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #2 on: September 19, 2012, 11:12:54 AM »
Quote from: horusfalcon
"It appears Google and Co. have tried to make this only a little difficult - they only permit the device to mount as a media device or camera instead of as a storage device (something my wife's Nook Tablet, for example, does and does very nicely, thank you).  For what we are doing here, mount it as a media device (which it does by default)"

they are not doing it to make it difficult for you, not the reason, when you mount a device in mtp mode, it is available for both the device and the os where you mount it, this way you can keep using files and apps stored on the device while you access the contents on the device from the os, something extremely important if you use apps2sd, different to usb mass storage device

So that's why, when a Nook Tablet is connected, it basically shuts down any Android functions and sits there with a blank screen?  That kinda figures, now that you mention it. 

I still believe Google could have included USB storage access and just chose not to.  There are other aspects of the device that make it very much "cloud-oriented".  While I'm not a big fan of "the cloud", I'm trying hard not to be a knee-jerk Luddite, either.  (They do make it very easy to spend money on the device, though, for content I already have and want to put on it for my use.)  On balance, their approach is not so onerous - the price point is excellent, the device quality is outstanding, and its functionality is surprisingly good given the small form factor.  It's gotta be the fastest tablet I've ever seen.

Quote
i have experienced some problems when using my phone that way, some apps start working weird and had problems with the partition, finally had to format the sd card

Does "that way" mean being as a USB Storage Device?  That sounds kinda like an implementation problem, actually.  (Of course, on a phone, no one wants to miss calls just because it's being accessed as storage.  Blackberry got that right, and it look like Motorola is going the MTP-only route, but I just see no need for that kind of restriction in a tablet device.

Quote
another solution is use the app airdroid, offer the storage as a resource on your local network and access it from your web browser

Wi-fi is nice when it's available (the Nexus 7 lacks any more exalted wireless capability), and I've been meaning to try Airdroid, but there's nothing like having more than one string for your bow - know what I mean?

I'm finding little imperfections in the method I described in my original post:  I can't use a bookmark in Dolphin (or whatever we call those shortcuts on the left side of the window we create to go to our favorite folders...) to get to /home/goofy/media/Nexus7, for example.  I believe that is because the mount points in /home/goofy/media/ are transient in their existence.  In that regard it may have been a poor choice for locating the Nexus7 folder in retrospect, but I'm not sure yet.  (Heck, I've only had the device one day now.)

So far, I have not lost any data during transfer, and, aside from the first time I tried it, have had no trouble mounting or unmounting the device at need.

I'd stay and chat, but I gotta get ready for work - covering for a co-worker today ("normally" I work weekends - yup, we started a new shift schedule, and I'm now the night/weekend guy...).

Later On,
D
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #3 on: September 19, 2012, 11:37:51 AM »
Yes, if you remember old sonyericsson phones, those when mounted as usb mass storage devices you couldn't use them untill you finished

Some manufacturers still offer it so i know it is not only a decision of google, in my xperia i have that, sony decided to keep it but i decided not to use it for the reasons mentioned

The phone still works when accessed as a usb mass storage device and you can charge battery and make calls, not just be a flash drive

About the string, yes, it is a good idea, you have 2 now, mount the mtp device or airdorid, mount it as mtp offers alot more speed so it is better there
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Snapshot

  • Hero Member
  • *****
  • Posts: 610
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #4 on: November 20, 2012, 12:02:26 AM »
First, I'm not sure if this thread is still open to post in but if it is I've tried mounting my GNexus phone in this manner and while I thought it worked, it didn't. My phone can transfer photos but nothing else. When I try to open with my file manager I get a KIOExec error "Unknown error Bad parameters". When I first purchased this phone in June I tried every way I could to transfer mp3s to it via PCLOS but never succeeded even though I thought that I had found a way using VM and Win7. In my thread I stated that I had succeeded but that was an error as I learned that that method too had failed. In any case I've still not found a way but if someone knows a method I'd like to know. Thanks.
If fishing is interfering
with your business, give
up your business.
Sparse Grey Hackle
(Alfred W. Miller)

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #5 on: November 20, 2012, 07:02:39 AM »
mtp does exactly that, lets you download images only

there is the solution to install and mount mtp as a partition on a folder but doesn't work well yet

use airdroid, transfer files from and to the phone using firefox or chrome, works very well
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Snapshot

  • Hero Member
  • *****
  • Posts: 610
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #6 on: November 20, 2012, 08:19:54 AM »
My pc doesn't have a wireless card thus Airdroid isn't helpful in this situation. I did read however that next year KDE is supposed to implement a KIO slave to enable conventional file transfers so I will just have to wait a bit longer. Thanks for the reply.
If fishing is interfering
with your business, give
up your business.
Sparse Grey Hackle
(Alfred W. Miller)

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #7 on: November 20, 2012, 08:29:03 AM »
airdroid connect to the wireless router offering the sd card contents as a resource accessed to your machine, ehternet or wiereless

you open firefox, write the address airdroid offers and put the password airdroid asks

it will offer you a way to upload and download images, songs, videos and do many other things
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Snapshot

  • Hero Member
  • *****
  • Posts: 610
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #8 on: November 20, 2012, 08:41:03 AM »
 Are you familiar with gmtp?    http://sourceforge.net/projects/gmtp/
If fishing is interfering
with your business, give
up your business.
Sparse Grey Hackle
(Alfred W. Miller)

Offline frazelle09

  • Hero Member
  • *****
  • Posts: 1476
  • Open my what?
    • Fundacion Anisa, A.C.
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #9 on: November 20, 2012, 08:47:14 AM »
i have a Samsung Galaxy Tab 7.0 Plus and i ended up downloading several apps, one or several finally allowed me to just plug the thing into my USB connector, hit the start button in the program (app) and i would be presented with a window on the Samsung which had a ftp address.  i'd plug that address into my trusty Krusader URL window and bingo!  The app it seems i have been using is called

Software Data Cable, v 3.1.0 and it's free!!!

Have a great morning!  :)
"The earth is one country and mankind its citizens."
Baha'u'llah
"La tierra es un solo pais y la humanidad sus ciudadanos."


Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 998
  • Wayfarer of The Western Wastes
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #10 on: November 20, 2012, 10:50:18 AM »
i have a Samsung Galaxy Tab 7.0 Plus and i ended up downloading several apps, one or several finally allowed me to just plug the thing into my USB connector, hit the start button in the program (app) and i would be presented with a window on the Samsung which had a ftp address.  i'd plug that address into my trusty Krusader URL window and bingo!  The app it seems i have been using is called

Software Data Cable, v 3.1.0 and it's free!!!

Have a great morning!  :)

Ooh... I'll look for this.  With my recent work schedule (overtime for the holidays) I won't have time to get back to fiddling with MPT access on my Nexus 7 anytime soon, so this may be the shortcut I've been hoping for.  It seems the method I describe in my original post only worked a couple of times and now doesn't seem to work anymore - I think it's because of my poor choice of mount points causing a permissions problem, but, like i said, I haven't had time lately to jink with it much.

Hopefully after the holidays I'll find some time.

Later On,
D
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline Snapshot

  • Hero Member
  • *****
  • Posts: 610
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #11 on: November 20, 2012, 10:27:41 PM »
i have a Samsung Galaxy Tab 7.0 Plus and i ended up downloading several apps, one or several finally allowed me to just plug the thing into my USB connector, hit the start button in the program (app) and i would be presented with a window on the Samsung which had a ftp address.  i'd plug that address into my trusty Krusader URL window and bingo!  The app it seems i have been using is called

Software Data Cable, v 3.1.0 and it's free!!!

Have a great morning!  :)
I get the following error message when trying to connect to 192.168.0.100  Error: Could not connect to host 192.168.0.100: Timed out trying to connect to remote host. What am I doing wrong? Thanks.

Bob
If fishing is interfering
with your business, give
up your business.
Sparse Grey Hackle
(Alfred W. Miller)

Offline frazelle09

  • Hero Member
  • *****
  • Posts: 1476
  • Open my what?
    • Fundacion Anisa, A.C.
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #12 on: November 20, 2012, 10:42:19 PM »
Bob, my ftp says... ftp://192.xxx.xxx.xxx:8888/

i think i had the same problem the first time as well until i figured out that i needed to add the ":8888/" and then it connected.

Are you doing the same?

Have a great evening!  :)
"The earth is one country and mankind its citizens."
Baha'u'llah
"La tierra es un solo pais y la humanidad sus ciudadanos."


Offline Snapshot

  • Hero Member
  • *****
  • Posts: 610
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #13 on: November 20, 2012, 10:45:33 PM »
Bob, my ftp says... ftp://192.xxx.xxx.xxx:8888/

i think i had the same problem the first time as well until i figured out that i needed to add the ":8888/" and then it connected.

Are you doing the same?

Have a great evening!  :)
Yes. I have tried it both ways with the same error message each and every time. My default port on Krusader shows 21 which I tried without success then I changed it to 8888 but same result. ???? I'm not sure what I'm not doing right? :)
If fishing is interfering
with your business, give
up your business.
Sparse Grey Hackle
(Alfred W. Miller)

Offline Snapshot

  • Hero Member
  • *****
  • Posts: 610
Re: Accessing A Google Nexus 7 from PCLinuxOS
« Reply #14 on: November 20, 2012, 10:49:01 PM »
If I use 8888 I get the error 8888 does not exist.
If fishing is interfering
with your business, give
up your business.
Sparse Grey Hackle
(Alfred W. Miller)