9

*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
2
  • Is there a possibility I could turn on the USB setting through XML using the system files I have aquired?
    – user1710096
    Commented Feb 11, 2013 at 23:08
  • is the goal to mount the /data partition to extract the files using adb ?
    – Pieter
    Commented Jan 9, 2016 at 18:29

6 Answers 6

5
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

2
  • 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
    Commented Apr 27, 2014 at 20:29
  • your answer ist right but he stated that his device is not rooted so it will be of no help. Commented Jun 16, 2015 at 13:17
0

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.

2
  • 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
    Commented Feb 24, 2013 at 21:18
  • Why are you using -t jpg along the mount command?
    – Peter
    Commented Feb 25, 2013 at 9:27
0
+100

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.

3
  • 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
    Commented Jun 16, 2015 at 16:59
  • Lets' see if this helps. So my assumption is right that you have the stock ROM installed? Commented Jun 17, 2015 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
    Commented Jun 18, 2015 at 23:17
0

from the adb shell

cat /etc/fstab

or

cat /fstab.qcom

~ # cat fstab.qcom
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

#<src>                                              <mnt_point>  <type>   <mnt_flags and options>                                                                           <fs_mgr_flags>
/dev/block/mmcblk0p8                                /boot        emmc     defaults                                                                                          defaults
/dev/block/mmcblk0p13                               /recovery    emmc     defaults                                                                                          defaults
/dev/block/mmcblk0p17                               /system      ext4     ro,errors=panic                                                                                   wait
/dev/block/mmcblk0p15                               /cache       ext4     noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic,barrier=1                  wait,check
/dev/block/mmcblk0p28                               /data        ext4     noatime,nosuid,nodev,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic               wait,check,encryptable=footer,length=-16384
/dev/block/mmcblk0p28                               /data        f2fs     rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr                                           wait,check,encryptable=footer,length=-16384

# zRAM
/dev/block/zram0                                    none         swap     defaults                                                                                          zramsize=201326592

# vold managed volumes
/devices/platform/msm_sdcc.4/mmc_host               auto         auto     defaults                                                                                          voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/msm_hsusb_host.0                  auto         auto     defaults                                                                                          voldmanaged=usbdisk:auto
~ # 

should give you the partition name you are looking for.

Device: SG-i9001 - Samsung Galaxy S Plus

0
0

I had the same problem before. The main reason you cannot remount your file system and other partitions of your Android device is because you are not running the adb shell in root mode. Here's what I did before:

$ adb shell 
$ su 
# mount -o rw, remount /system

This should solve your problems. Of course, in my case I am running this on a rooted Android device (LineageOS Android 7.1.2 build). It might be different in your case, but basically the idea is the same.

-1

Try this:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .