[Android General] majdinj:
For Non-Rooted Devices and Rooted Devices​

Here is a summary on how to get mounting points without rooting or extracting recovery.img.

The different procedures only needs to have adb shell or terminal emulator.. I will explain using adb shell through pc.

After establishing adb connection to your device, you can choose any of the following procedures to get your mounting points:

#1

adb shell
cat /proc/mounts

This will give you info about device, the mount point, the file system type, and how it is mounted.

Limitation:

This method, however, will not give you all mounting points.!!!

#2

adb shell
cat /proc/partitions

This is more neat, it will give you info about ALL dev blocks and their names (not the familiar name!), and block size

Limitation:

Needs from you to figure out which block belong to which partition name.!!

#3

adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name

This one is the command that I like on non-rooted device..! It will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc) :laugh:

This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).

How?

- In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).

- Go to "/dev/block/platform/" folder

- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.

- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)

- Now open adb shell and put the command..

***​

For Rooted Devices Only​

There are different ways to get mounting points in rooted device (including the non-rooted devices way), but the easiest way to get all device mounting points is to push parted binary to /system/bin folder and run it.

adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print

Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.

example:

The preload partition mounting point will be mmcblk0p12

The modem partition mounting point will be mmcblk0p8

The system partition mounting point will be mmcblk0p9

The Kernel partition mounting point will be mmcblk0p5

and so on

Don't forget to "quit" the parted action after grasping your device mounting points.

N.B:

- You may need to run first:

adb shell
cat /proc/partitions

to know what is the initial name for your device partition.. In the example above, it was mmcblk0.

- Also to be able to do adb push to /system partition, you will need adbd insecure installed in your device (Check this thread for that app), or to push it manually by any root explorer and then fix permissions to 755.

***​

Pre-made Scripts​

Windows users

Here is a script I wrote for both non-rooted (way #3) and rooted devices for windows users.

Just extract the content in any folder and run the script that you want ("Non-Rooted and Rooted.cmd" or "Rooted Only.cmd")

Don't forget to install adbd insecure in rooted device in order to use Rooted Only.cmd script.

Linux users

As same, here is a script I wrote for both non-rooted (way #3) and rooted devices for linux users.

Just extract the content in any folder and run the script that you want ("non-rooted" or "rooted")

Don't forget to install adbd insecure in rooted device in order to use rooted script.

N.B:

The linux scripts are tested with cygwin emulator on windows machine.. So needs feedback on actual machine.!!

Cheers