Needs to be run as root. Use su command and grant permission and you will see $ change to #I have get permission denied on my oneplus 6t after root through magisk (latest), how can resolve this ? can anyone help me.
OnePlus6T:/ $ cat /proc/partitions
cat: /proc/partitions: Permission denied
1|OnePlus6T:/ $
adb shell
cat /proc/partitions
adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 0755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print
adb shell
cat /proc/partitions
adb shell
su
dd if=[B][COLOR="Blue"]/yourMountingPoint[/COLOR][/B] of=[B][COLOR="Green"]/yourDestination[/COLOR][COLOR="Red"]/partitionType[/COLOR][/B]
adb shell
su
dd if=[B][COLOR="Blue"]/dev/block/mmcblk0p9[/COLOR][/B] of=[B][COLOR="Green"]/sdcard[/COLOR][COLOR="Red"]/system.img[/COLOR][/B]
su -
mkdir -p /mnt/disk
mount -o loop [B][COLOR="Red"]yourImage.img[/COLOR][/B] /mnt/disk
cd /mnt/disk
ls -l
#1
Run remote shell interactively, as if you are in linux terminal.Code:adb shell
#2
cat binary is used to concatenate file(s) and print them to standard output display. In our example, it prints the content of partitions file which is found in proc folder to screen display.Code:cat /proc/partitions
#3
ls binary is used to list directory contents.Code:ls -al /dev/block/platform/dw_mmc/by-name
-al is the used option for ls which means to include entries that started with "." in long listing format. There are a lot of options for ls binary. You can always print ls --h to display help menu for other options available.
#4
Remounts the /system partition on the device read / write. This has been disabled in some devices (those with secure boot image); so you need to make sure that you have patched adbd that can run this command effectively.Code:adb remount
#6
Specific command to mount the /system partition on the device read / write (rw).Code:mount -o remount,[B][COLOR="Red"]rw[/COLOR][/B] /system
If you change rw to ro, you will get /system partition mounted as read only.
#7
adb push is used to copy file/dir from your local computer to android device. The usual format is adb push <local> <remote>Code:adb push parted /system/bin/parted
#8
chmod binary is used to set permissions for the specified file/dir.Code:chmod 0755 /system/bin/parted
The number after chmod is the permission used. See the next box for better understanding of chmod formatting:
In the above example, it is set to 0755 which means the following scheme:Code:[CENTER][B][COLOR="Red"]---------------- | CHMOD SCHEME | ----------------[/COLOR][/B][/CENTER] [B] r w x[/B] [B]4 2 1 [COLOR="Green"]= 7 (Full Permissions)[/COLOR][/B] User ( ) ( ) ( ) [B][COLOR="Green"]--> 2nd digit[/COLOR][/B] Group ( ) ( ) ( ) [B][COLOR="Green"]--> 3rd digit[/COLOR][/B] Other ( ) ( ) ( ) [B][COLOR="Green"]--> 4th digit[/COLOR][/B] Special UID GID STK ( ) ( ) ( ) [B][COLOR="Green"]--> 1st digit, ignored on most cases or put 0[/COLOR][/B]
As you can see, if you said 0755, it will be as same as saying ---rwxr-xr-xCode:[B] r w x[/B] [B]4 2 1[/B] User ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 7 (rwx)[/COLOR][/B] Group ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B] Other ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B] Special UID GID STK ( ) ( ) ( ) [B][COLOR="Green"]--> This equals to 0 (---)[/COLOR][/B]
#9
dd binary is used to copy a file with converting and formatting.Code:dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
if means input file; here we pointed to the whole partition, not specific file.
of means outputting file to specific destination path; here it is to sdcard with system.img name.
#10
mkdir binary is used to make folder dir.Code:mkdir -p /mnt/disk
-p is mkdir option which means to create folder with sub-folder at the same time. Here we want to create mnt folder that contains disk sub-folder in it. If the folder and or sub-folder(s) are already exists, it will not give error but nothing will be created.
#11
This is linux way to mount images into specific directory (/mnt/disk in this example).Code:mount -o loop yourImage.img /mnt/disk
#12
cd used to get inside specific dir path.Code:cd /mnt/disk
#13
ls binary is used to list directory contents as described above.Code:ls -l
-l is the used option for ls which means to list contents in long listing format.
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??