Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

*Question: I need assistance mounting an Android phone's internal data using the Android ADB Shell while the unit is connected via USB and in recovery mode. How do I form a proper mount command? See below for more detailed information.

*FYI: I have experience developing with the Android SDK using Java/XML. I have found little documentation for the Android ADB Shell for my purpose.

I have a Samsung GT-i9000 Android phone with a smashed screen. Screen is black, and unresponsive to touch. The phone does not have USB debugging enabled or USB auto mount enabled. I cannot simply plug the phone via USB to access the desired files (photos, and other internal data). I unfortunately cannot confirm the OS version. The phone has no SD Card, all the desired data is on the internal board. The phone is not rooted.

*What I've tried: Doing some research I have booted the phone into recovery mode using the three button method (VolUP + Home + Power) and managed to access the device using the "adb devices" command on my Win 7 machine. It displays as "recovery". This is the only way I have been able to make the computer recognize the device via USB. I've tried Kies, and androidscreencast with no success.

I have been able to use the "pull" command to access all the Android system files from the phone. I presume this is because recovery mode only mounts the required system files for updates/repairs and doesn't bother with the internal data. Using the mount command I can see what I consider to be the paths to the files I am looking for:

$ mount
mount
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
nodev /tmp tmpfs rw,relatime 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/stl9 /system rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=
utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,
iocharset=utf8 0 0
/dev/block/stl11 /cache rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=
utf8 0 0

All my efforts to mount fail, usually with a usage suggestion:

$ mount rootfs / /mnt/ rw 0 0
mount rootfs / /mnt/ rw 0 0
Usage: mount [-r] [-w] [-o options] [-t type] device directory
share|improve this question

migrated from stackoverflow.com Feb 14 '13 at 13:20

This question came from our site for professional and enthusiast programmers.

    
Is there a possibility I could turn on the USB setting through XML using the system files I have aquired? –  user1710096 Feb 11 '13 at 23:08

4 Answers 4

ls -l /dev/block/platform/dw_mmc/by-name/ 

to find the path to user data partition. Then

mount -t ext4 /dev/block/mmcblk0p10 /data

Check the correct file system type as well as mmcblkXpXX from first command.

If successful, /data should be mounted correctly

share|improve this answer
    
All of my mount commands result in mount: Operation not permitted. I believe I've found what you are referring to, although they (mmcblk0p2, mmcblk0p1) exist in the block directory. The platform directory does not appear to exist. –  silencecm Apr 27 '14 at 20:29
    
your answer ist right but he stated that his device is not rooted so it will be of no help. –  divided-by-zero Jun 16 at 13:17

Samsung Galaxy S2 partitions with usefull data are /data and /sdcard (internal memory) or /emmc depending on the recovery.

To mount a partition, you issue the following command: mount <partition> <mount_point> or mount <mount_point> if the mount_point is already defined. For /data or /sdcard, you can try with mount /data and mount /sdcard.

If the mount_point is not already defined, you would have to use the partition: mount /dev/block/mmcblk0p10 /data. The -o parameter defines the options when calling mount, but since you only want to get all the data (read), the default options would sufice.

share|improve this answer
    
Thank you for the migration to the proper forum. The only proper mount command I could run was mount -t jpg /dev/block/mmcblk0p1 /sdcard -operation not permitted. I used mmcblk0p1 because your mentioned location does not exist. –  silencecm Feb 24 '13 at 21:18
    
Why are you using -t jpg along the mount command? –  Peter Feb 25 '13 at 9:27

This is a kind of tricky situation. As you don't have root access you won't be able to mount the data partition through adb in recovery. You won't also be able to do: adb backup.

The only possible way to get somehow your hands on your data coulb be as following:

  1. flash a custom recovery via odin (http://forum.xda-developers.com/showthread.php?t=2204700 maybe)
  2. boot into recovery as before
  3. mount data via adb if you have root permissions with this recovery
  4. or use the key navigation in recovery in order to mount data(there is usually an option to do so) You can navigate with eh vol+ vol- and confirm with power. You just need to know how your recovery looks like from a device with a working screen.

  5. pull everything from data and be happy

Maybe you will run into problems connecting via adb as you computer won't be authorized. This has to be checked. If yes you are screwed unless you find a recovery which has this security feature disabled.

UPDATE:

I just found something which pretty much could help you. It is a rooted kernel taken from the stock ROM and a security disabled recovery included. Flashing this Kernel via odin should help you mounting data or any partition you want to mount in order to get your data back.

Do: 1. Download the right CF-ROOT for your android version here: http://forum.xda-developers.com/showpost.php?p=8238938&postcount=3

  1. Go to download mode with the key combination(hold down the volume down button, home button and the power button)

  2. Open odin(could be great to download it before)

  3. Click the PDA button, and select CF-Root-xxx-vX.X.tar
  4. Connect the phone to your computer
  5. Make sure repartition is NOT checked
  6. Click the START button
  7. Wait for the phone to reboot

Now you can enter this recovery like before and mount data thorugh adb as you should have root permissions.

share|improve this answer
    
Thanks for your input on this old thread. I will do my best to attempt your solution in the next week and follow up as soon as possible. –  silencecm Jun 16 at 16:59
    
Lets' see if this helps. So my assumption is right that you have the stock ROM installed? –  divided-by-zero Jun 17 at 7:45
    
You can also try using heimdall instead of Odin depending on what OS you're using. Maybe install TWRP2 recovery from your computer onto the phone. Then boot into recovery mode, and you should have root at that point, which gives you options including mounting manually as suggested then adb pulling files you need or you can pull the entire partition to your computer then mount locally and recover that way. –  fattire Jun 18 at 23:17

Try this:

$ adb shell
$ su
# mount -o rw,remount /system
share|improve this answer
    
su: not found. The mount command persists to fail even using the # method. –  user1710096 Feb 11 '13 at 22:46
1  
If the phone is not rooted, it won't be able to run su (or as root) –  Peter Feb 14 '13 at 14:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.