LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-27-2015, 08:37 PM   #1
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Rep: Reputation: Disabled
fdisk does not detect Android: Ubuntu / OR How To find Android in dmesg ?


Anybody can give me some insight how to get my Android device to show up in fdisk? Im having some trouble.

It isnt "just" showing up, and it isnt available with usbdebugging, mounting/unmounting, etc.

Last edited by Cocolate; 03-27-2015 at 08:59 PM.
 
Old 03-27-2015, 08:53 PM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,163

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Start by observing dmesg output when your Android device is attached
Code:
dmesg|tail
If the device does not behave as a storage device (many don't), then it won't be reported by 'fdisk' either. Instead, it may well behave as a MTP device, and there is a lot of information about how to connect and transfer using MTP if you care to search

Just to point you at a few:

http://www.webupd8.org/2013/01/upgra...upport-in.html
http://www.webupd8.org/2012/12/how-t...-go-mtpfs.html
http://techchannel.radioshack.com/co...untu-2910.html
 
1 members found this post helpful.
Old 03-27-2015, 08:56 PM   #3
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
I did find that MTP is a newer device so it only works for newer programs so that would affect the shell?

I also found that I can find the same results I am looking for in fdisk found in dmesg which is the drive (sdb, for example) is mounted.

Ill research your links after I look into dmesg though. Thanks for the reply.
 
Old 03-27-2015, 09:20 PM   #4
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,163

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Quote:
I did find that MTP is a newer device so it only works for newer programs so that would affect the shell?
MTP is just a communication protocol used for transferring files between the Android device and the PC. Various utilities exist that utilise libmtp to provide file access, and file management capabilities eg allowing Nautilus to view and manage files graphically.

https://wiki.debian.org/mtp

Quote:
I also found that I can find the same results I am looking for in fdisk found in dmesg which is the drive (sdb, for example) is mounted.
I don't quite understand you. If the device is recognised as a storage device, and /dev/sdb* is created, then it should also appear in '/sbin/fdisk -l' output, and if it is mounted, then 'mount' will show this accordingly. You should start by sharing the dmesg output, so that we can see for ourselves what is/isn't reported, otherwise we can only guess.
 
2 members found this post helpful.
Old 03-27-2015, 09:37 PM   #5
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
This is my dmesg output I am looking for my where my Android device is mounted. That is what I meant by my example: sdb

The output for dmesg was too long for the post so I linked it to pastebin here

http://pastebin.com/D8g5uqUn

------------------------------------------

Android is mounted fine. It is not listed in fdisk. That is the only issue** Thread Unsolved

Last edited by Cocolate; 03-27-2015 at 10:22 PM.
 
Old 03-27-2015, 11:46 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,028

Rep: Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852
As stated your Android device uses MTP so it is not mounted like a regular mass storage device. It shows up as a mounted device in the nautilus file browser due to Gnome's virtual filesystem gvfs and libmtp. You can not get it to show up under fdisk.


http://en.wikipedia.org/wiki/GVFS

Last edited by michaelk; 03-27-2015 at 11:52 PM.
 
Old 03-28-2015, 12:39 AM   #7
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
Honestly, it doesnt seem like my question is really that complicated but I cannot seem to find an answer scouring the Internet from every source or forum Ive searched the last several hours.


My question is: where can I find

where is my android device mounted at on my OS?

It isnt showing up in Gparted, fdisk, and Im not exactly sure where to look in dmesg

Are you talking about the GUI nautilus? Ive run

Code:
/run/user/candi/gvfs/
With output error

Code:
bash: /run/user/candi/gvfs/: No such file or directory
I have no problem mounting my Android device.

Im looking for where it is mounted such as in dev/sd* ???
 
Old 03-28-2015, 01:13 AM   #8
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
I see run, user, UID, gvfs is the GUI

still does not show me where the device is mounted
 
Old 03-28-2015, 03:17 AM   #9
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,163

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Well, gvfs is a file system abstraction for MTP, and AFAIU the mount it creates is under /var/run/user/<UID>/gvfs/, but this may depend on the distro version and associated gvfs libmtp versions as mentioned here

http://askubuntu.com/questions/34231...the-filesystem

Anyway, if you're trying to access the Android device via scripts or CLI then maybe you should consider installing a fuse-filesystem such as mtpfs, or go-mtpfs, then you can mount the file system where you like.

This might take some further research on your part, but just to give you an idea on the general approach

https://wiki.archlinux.org/index.php/MTP
http://manpages.ubuntu.com/manpages/.../jmtpfs.1.html
http://www.omgubuntu.co.uk/2011/12/h...or-file-access

Last edited by ferrari; 03-28-2015 at 03:18 AM.
 
2 members found this post helpful.
Old 03-28-2015, 03:52 AM   #10
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
I found the answer I was looking for it was the MTP setting the USB had to be changed to the SD Card transfer and it came up in fdisk.
 
Old 03-28-2015, 04:29 AM   #11
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 2,163

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Quote:
I found the answer I was looking for it was the MTP setting the USB had to be changed to the SD Card transfer and it came up in fdisk.
Do you mean within the Android device itself? I know that some devices (cameras included) have settings to configure as storage devices.
 
Old 03-28-2015, 04:44 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,028

Rep: Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852Reputation: 1852
Ok, I forgot about the SD card...
 
Old 03-28-2015, 05:09 AM   #13
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
http://www.linuxquestions.org/questi...ry-4175538086/

Honestly what I'm really still stuck on its this. It still didn't work I worked on it all day.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
*Free your Android* Installing Debian or Ubuntu on Any Android Xeratul Debian 2 12-26-2013 01:20 PM
RHEL5/CentOS5 fdisk refuses to display partitions after 15th ? Vilius Red Hat 2 02-07-2011 08:48 AM
LXer: Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 10.10) LXer Syndicated Linux News 0 01-27-2011 11:30 AM
Display Free Hard Disk Space using Fdisk amirsd Linux - Newbie 5 01-27-2010 01:35 PM
RHEL5/CentOS5 fdisk refuses to display partitions after 15th ? Vilius Fedora 1 04-04-2009 07:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration