[ROOT] Partitions backup & other partition info : - BLU R1 HD Guides, News, & Discussion

Before rooting, do backup your /boot and /system partitions via SPFT, as described here (whenever the post is filled in properly ) :
http://forum.xda-developers.com/r1-hd/how-to/backup-partitions-spft-rooting-t3426041
Since it's pretty tedious to run that for each and every partition, I propose to backup other ones after you get root. But note that copying the partitions back to the device is a lot quicker since all the necessary info can be preset in a scatter file !
I recommend that you follow other threads to get root, such as, for example, here :
http://forum.xda-developers.com/r1-hd/how-to/twrp-how-to-root-t3425677
Note, SuperSu will go for "systemless" root, and will patch boot.img. The original boot.img will be saved as /data/stock_boot_*.img.gz It's highly recommended that you backup this boot.img elsewhere (off the device if you did not manage to run SPFT beforehand), in order to be able to restore the device and accept the OTAs.
Some partitions will still be mounted, but I don't think it matters that much. Anyway, here is a list of what is usually mounted :
Code:
Filesystem Size Used Free Blksize
/dev 970.2M 84.0K 970.1M 4096
/sys/fs/cgroup 970.2M 12.0K 970.2M 4096
/mnt 970.2M 0.0K 970.2M 4096
/mnt/runtime/default/emulated 11.2G 522.4M 10.7G 4096
/mnt/runtime/read/emulated 11.2G 522.4M 10.7G 4096
/mnt/runtime/write/emulated 11.2G 522.4M 10.7G 4096
/system 2.5G 2.0G 516.5M 4096
/data 11.2G 522.4M 10.7G 4096
/cache 387.4M 988.0K 386.5M 4096
/protect_f 5.8M 60.0K 5.8M 4096
/protect_s 5.8M 56.0K 5.8M 4096
/nvdata 27.5M 2.2M 25.3M 4096
/storage 970.2M 0.0K 970.2M 4096
/storage/emulated 11.2G 522.4M 10.7G 4096
/su 90.5M 676.0K 89.8M 4096
To backup whatever partitions are out there, run these commands :
Code:
adb shell
su
mkdir /sdcard/images/
cd /sdcard/images
dd if=/dev/block/mmcblk0boot0 of=00_boot0.img
dd if=/dev/block/mmcblk0boot1 of=01_boot1.img
dd if=/dev/block/mmcblk0rpmb of=02_rpmb.img
dd if=/dev/block/mmcblk0 of=p0_pgpt.img bs=1024 count=512
dd if=/dev/block/mmcblk0p1 of=p1_proinfo.img
dd if=/dev/block/mmcblk0p2 of=p2_nvram.img
dd if=/dev/block/mmcblk0p3 of=p3_protect1.img
dd if=/dev/block/mmcblk0p4 of=p4_protect2.img
dd if=/dev/block/mmcblk0p5 of=p5_lk.img
dd if=/dev/block/mmcblk0p6 of=p6_para.img
dd if=/dev/block/mmcblk0p7 of=p7_boot.img
dd if=/dev/block/mmcblk0p8 of=p8_recovery.img
dd if=/dev/block/mmcblk0p9 of=p9_logo.img
dd if=/dev/block/mmcblk0p10 of=p10_expdb.img
dd if=/dev/block/mmcblk0p11 of=p11_seccfg.img
dd if=/dev/block/mmcblk0p12 of=p12_oemkeystore.img
dd if=/dev/block/mmcblk0p13 of=p13_secro.img
dd if=/dev/block/mmcblk0p14 of=p14_keystore.img
dd if=/dev/block/mmcblk0p15 of=p15_tee1.img
dd if=/dev/block/mmcblk0p16 of=p16_tee2.img
dd if=/dev/block/mmcblk0p17 of=p17_frp.img
dd if=/dev/block/mmcblk0p18 of=p18_nvdata.img
dd if=/dev/block/mmcblk0p19 of=p19_metadata.img
#dd if=/dev/block/mmcblk0p20 of=p20_system.img
#dd if=/dev/block/mmcblk0p21 of=p21_cache.img
#dd if=/dev/block/mmcblk0p22 of=p22_userdata.img
dd if=/dev/block/mmcblk0p23 of=p23_flashinfo.img
md5sum *.img
exit
exit
adb pull /sdcard/images
These are the files that you'll get
Code:
-rw-rw---- root sdcard_rw 4194304 2016-01-01 18:31 00_boot0.img
-rw-rw---- root sdcard_rw 4194304 2016-01-01 18:31 01_boot1.img
-rw-rw---- root sdcard_rw 0 2016-01-01 18:47 02_rpmb.img
-rw-rw---- root sdcard_rw 524288 2016-01-01 18:31 p0_pgpt.img
-rw-rw---- root sdcard_rw 3145728 2016-01-01 18:31 p1_proinfo.img
-rw-rw---- root sdcard_rw 5242880 2016-01-01 18:31 p2_nvram.img
-rw-rw---- root sdcard_rw 10485760 2016-01-01 18:31 p3_protect1.img
-rw-rw---- root sdcard_rw 10485760 2016-01-01 18:31 p4_protect2.img
-rw-rw---- root sdcard_rw 524288 2016-01-01 18:31 p5_lk.img
-rw-rw---- root sdcard_rw 524288 2016-01-01 18:31 p6_para.img
-rw-rw---- root sdcard_rw 16777216 2016-01-01 18:31 p7_boot.img
-rw-rw---- root sdcard_rw 16777216 2016-01-01 18:31 p8_recovery.img
-rw-rw---- root sdcard_rw 8388608 2016-01-01 18:31 p9_logo.img
-rw-rw---- root sdcard_rw 10485760 2016-01-01 18:31 p10_expdb.img
-rw-rw---- root sdcard_rw 524288 2016-01-01 18:31 p11_seccfg.img
-rw-rw---- root sdcard_rw 2097152 2016-01-01 18:31 p12_oemkeystore.img
-rw-rw---- root sdcard_rw 6291456 2016-01-01 18:31 p13_secro.img
-rw-rw---- root sdcard_rw 8388608 2016-01-01 18:31 p14_keystore.img
-rw-rw---- root sdcard_rw 5242880 2016-01-01 18:31 p15_tee1.img
-rw-rw---- root sdcard_rw 5242880 2016-01-01 18:31 p16_tee2.img
-rw-rw---- root sdcard_rw 1048576 2016-01-01 18:31 p17_frp.img
-rw-rw---- root sdcard_rw 33554432 2016-01-01 18:31 p18_nvdata.img
-rw-rw---- root sdcard_rw 38797312 2016-01-01 18:32 p19_metadata.img
-rw-rw---- root sdcard_rw 16777216 2016-01-01 18:32 p23_flashinfo.img
And this is another map of partitions to names :
Code:
lrwxrwxrwx root root 2016-01-01 17:30 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2016-01-01 17:30 cache -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 2016-01-01 17:30 expdb -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2016-01-01 17:30 flashinfo -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 2016-01-01 17:30 frp -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 2016-01-01 17:30 keystore -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2016-01-01 17:30 lk -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2016-01-01 17:30 logo -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2016-01-01 17:30 metadata -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 2016-01-01 17:30 nvdata -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 2016-01-01 17:30 nvram -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2016-01-01 17:30 oemkeystore -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2016-01-01 17:30 para -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2016-01-01 17:30 proinfo -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2016-01-01 17:30 protect1 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2016-01-01 17:30 protect2 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2016-01-01 17:30 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2016-01-01 17:30 seccfg -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2016-01-01 17:30 secro -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2016-01-01 17:30 system -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 2016-01-01 17:30 tee1 -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2016-01-01 17:30 tee2 -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2016-01-01 17:30 userdata -> /dev/block/mmcblk0p22
And mount output :
Code:
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/protect1 /protect_f ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/protect2 /protect_s ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvdata /nvdata ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0
And partition sizes in blocks:
Code:
major minor #blocks name
7 0 1254 loop0
7 1 98304 loop1
179 0 15392768 mmcblk0
179 1 3072 mmcblk0p1
179 2 5120 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 10240 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 16384 mmcblk0p7
179 8 16384 mmcblk0p8
179 9 8192 mmcblk0p9
179 10 10240 mmcblk0p10
179 11 512 mmcblk0p11
179 12 2048 mmcblk0p12
179 13 6144 mmcblk0p13
179 14 8192 mmcblk0p14
179 15 5120 mmcblk0p15
179 16 5120 mmcblk0p16
179 17 1024 mmcblk0p17
179 18 32768 mmcblk0p18
179 19 37888 mmcblk0p19
179 20 2736128 mmcblk0p20
179 21 409600 mmcblk0p21
179 22 12049920 mmcblk0p22
179 23 16384 mmcblk0p23
179 96 4096 mmcblk0rpmb
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
And another great piece of info (borrowed from here, @ss2man44 ):
http://forum.xda-developers.com/showpost.php?p=67903154&postcount=619
(16 Gb Prime model)
Code:
> gdisk -l mmcblk0.img
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk mmcblk0.img: 30785536 sectors, 14.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 00000000-0000-0000-0000-000000000000
Partition table holds up to 23 entries
First usable sector is 1024, last usable sector is 30784511
Partitions will be aligned on 1024-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 1024 7167 3.0 MiB 0700 proinfo
2 7168 17407 5.0 MiB 0700 nvram
3 17408 37887 10.0 MiB 0700 protect1
4 37888 58367 10.0 MiB 0700 protect2
5 58368 59391 512.0 KiB 0700 lk
6 59392 60415 512.0 KiB 0700 para
7 60416 93183 16.0 MiB 0700 boot
8 93184 125951 16.0 MiB 0700 recovery
9 125952 142335 8.0 MiB 0700 logo
10 142336 162815 10.0 MiB 0700 expdb
11 162816 163839 512.0 KiB 0700 seccfg
12 163840 167935 2.0 MiB 0700 oemkeystore
13 167936 180223 6.0 MiB 0700 secro
14 180224 196607 8.0 MiB 0700 keystore
15 196608 206847 5.0 MiB 0700 tee1
16 206848 217087 5.0 MiB 0700 tee2
17 217088 219135 1024.0 KiB 0700 frp
18 219136 284671 32.0 MiB 0700 nvdata
19 284672 360447 37.0 MiB 0700 metadata
20 360448 5832703 2.6 GiB 0700 system
21 5832704 6651903 400.0 MiB 0700 cache
22 6651904 30751743 11.5 GiB 0700 userdata
23 30751744 30784511 16.0 MiB 0700 flashinfo
And finally, partitions with their starting address/length in HEX for the 16 Gb version (stuff everybody was waiting for ) :
Code:
Name Block_device Start_adr Length
pgpt mmcblk0 0x0 0x80000
proinfo mmcblk0p1 0x80000 0x300000
nvram mmcblk0p2 0x380000 0x500000
protect1 mmcblk0p3 0x880000 0xa00000
protect2 mmcblk0p4 0x1280000 0xa00000
lk mmcblk0p5 0x1c80000 0x80000
para mmcblk0p6 0x1d00000 0x80000
boot mmcblk0p7 0x1d80000 0x1000000
recovery mmcblk0p8 0x2d80000 0x1000000
logo mmcblk0p9 0x3d80000 0x800000
expdb mmcblk0p10 0x4580000 0xa00000
seccfg mmcblk0p11 0x4f80000 0x80000
oemkeystore mmcblk0p12 0x5000000 0x200000
secro mmcblk0p13 0x5200000 0x600000
keystore mmcblk0p14 0x5800000 0x800000
tee1 mmcblk0p15 0x6000000 0x500000
tee2 mmcblk0p16 0x6500000 0x500000
frp mmcblk0p17 0x6a00000 0x100000
nvdata mmcblk0p18 0x6b00000 0x2000000
metadata mmcblk0p19 0x8b00000 0x2500000
system mmcblk0p20 0xb000000 0xa7000000
cache mmcblk0p21 0xb2000000 0x19000000
userdata mmcblk0p22 0xcb000000 0x2df780000
flashinfo mmcblk0p23 0x3aa780000 0x1000000
sgpt mmcblk0s 0x3ab780000 0x80000
[COLOR="Red"]end end 0x3ab800000 0x0[/COLOR]

Great guide with lots of detail. Those partition mounts can be useful for porting ROMs.

nice post. I have pulled all the firmware off of my stock v6.4 and was wondering if you have a fully working Scatter file i can test in sp flash tool

Tomsgt said:
nice post. I have pulled all the firmware off of my stock v6.4 and was wondering if you have a fully working Scatter file i can test in sp flash tool
Click to expand...
Click to collapse
Unfortunately, I do not.
It can be made manually out of 2 outputs :
Code:
cat /proc/partitions
ls -l /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name
A bit of Python would go a long way to make sure all addresses are correct. I am surprised there is not a tool like this out there ...

bibikalka said:
Unfortunately, I do not.
It can be made manually out of 2 outputs :
A bit of Python would go a long way to make sure all addresses are correct. I am surprised there is not a tool like this out there ...
Click to expand...
Click to collapse
Thanks have on that someone else already made but I don't know how to check it to make sure it is correct or not. I have never made a scatter before.

Tomsgt said:
Thanks have on that someone else already made but I don't know how to check it to make sure it is correct or not. I have never made a scatter before.
Click to expand...
Click to collapse
I am trying to kludge through with the conversions now. never done one before so its taking some time. I am getting hung up on the relation between the output of cat /proc/partitions that gives size in blocks and output of parted that has size in kB MB and GB. assuming kB to B *1024 then DEC to HEX the values all come out off by about 0.2% and i dont know if it is supposed to be rounded off.

mrmazak said:
I am trying to kludge through with the conversions now. never done one before so its taking some time. I am getting hung up on the relation between the output of cat /proc/partitions that gives size in blocks and output of parted that has size in kB MB and GB. assuming kB to B *1024 then DEC to HEX the values all come out off by about 0.2% and i dont know if it is supposed to be rounded off.
Click to expand...
Click to collapse
check out the scatter file i have here http://rootjunkysdl.com/files/?dir=Blu R1 HD Amazon the twrp scatter will work

Tomsgt said:
check out the scatter file i have here http://rootjunkysdl.com/files/?dir=Blu R1 HD Amazon the twrp scatter will work
Click to expand...
Click to collapse
It that the same one from @bullet25. Or is it another one. Because it has the same error in the user data and last three partitions. At the least these. Are what I can see

mrmazak said:
It that the same one from @bullet25. Or is it another one. Because it has the same error in the user data and last three partitions. At the least these. Are what I can see
Click to expand...
Click to collapse
Let me put some Python together, and I'll generate a table of first address/length, so we'd be able to check what the scatter file has.

mrmazak said:
It that the same one from @bullet25. Or is it another one. Because it has the same error in the user data and last three partitions. At the least these. Are what I can see
Click to expand...
Click to collapse
Yeah it was that one I just renamed it. I figured it had errors but I need a fully working one.
---------- Post added at 05:12 PM ---------- Previous post was at 05:12 PM ----------
bibikalka said:
Let me put some Python together, and I'll generate a table of first address/length, so we'd be able to check what the scatter file has.
Click to expand...
Click to collapse
That would be awesome.

mrmazak said:
It that the same one from @bullet25. Or is it another one. Because it has the same error in the user data and last three partitions. At the least these. Are what I can see
Click to expand...
Click to collapse
Tomsgt said:
Yeah it was that one I just renamed it. I figured it had errors but I need a fully working one.
---------- Post added at 05:12 PM ---------- Previous post was at 05:12 PM ----------
That would be awesome.
Click to expand...
Click to collapse
With some Python I was able to generate the addresses/lengths, and indeed, the existing scatter MT6735...test7.txt is OK for the most part. See post #1 for the updated partitions list with this info for the 16 Gb version. The only things that need to be fixed in MT6735...test7.txt are at the end, see the segment below (I cannot guarantee that the various words in this are fully correct, but the names/addresses are!). Not sure if flashinfo needs to be restored during a full reimage. But its address will change depending on the 8/16 Gb version.
Code:
- partition_index: SYS22
partition_name: cache
file_name: cache.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xb2000000
physical_start_addr: 0xb2000000
partition_size: 0x19000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00
- partition_index: SYS23
partition_name: userdata
file_name: userdata.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xcb000000
physical_start_addr: 0xcb000000
partition_size: 0x2df780000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00
- partition_index: SYS24
partition_name: flashinfo
file_name: flashinfo.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x3aa780000
physical_start_addr: 0x3aa780000
partition_size: 0x1000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00

bibikalka said:
With some Python I was able to generate the addresses/lengths, and indeed, the existing scatter MT6735...test7.txt is OK for the most part. See post #1 for the updated partitions list with this info for the 16 Gb version. The only things that need to be fixed in MT6735...test7.txt are at the end, see the segment below (I cannot guarantee that the various words in this are fully correct, but the names/addresses are!). Not sure if flashinfo needs to be restored during a full reimage. But its address will change depending on the 8/16 Gb version.
Code:
- partition_index: SYS22
partition_name: cache
file_name: cache.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xb2000000
physical_start_addr: 0xb2000000
partition_size: 0x19000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00
- partition_index: SYS23
partition_name: userdata
file_name: userdata.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xcb000000
physical_start_addr: 0xcb000000
partition_size: 0x2df780000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00
- partition_index: SYS24
partition_name: flashinfo
file_name: flashinfo.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x3aa780000
physical_start_addr: 0x3aa780000
partition_size: 0x1000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00
Click to expand...
Click to collapse
thanks i just updated my scatter

thats good. So are you gonna continue with the python script and maybe make some type of app with it?
I am not familiar with scatter files and spft that much so excuse me if this is completely wrong. But your numbers for the start and length do add up which seems correct. except that the flashinfo offset in the official update does not add up. So i looked at a couple other files I had found. (both from my other blu phone Life-one-X) and they also do not add up. (as in when I use a programmers calculator to add the hex). So as your numbers are correct I dont understand if the flashinfo is supposed to be mathematically in line or if it should be something else. Then that also leaves the sgpt partition in limbo after the flashinfo.
of course none of this should matter at the moment , i think, because both of these partitions are flagged in the scatter as not to be downloaded(flashed)

mrmazak said:
thats good. So are you gonna continue with the python script and maybe make some type of app with it?
I am not familiar with scatter files and spft that much so excuse me if this is completely wrong. But your numbers for the start and length do add up which seems correct. except that the flashinfo offset in the official update does not add up. So i looked at a couple other files I had found. (both from my other blu phone Life-one-X) and they also do not add up. (as in when I use a programmers calculator to add the hex). So as your numbers are correct I dont understand if the flashinfo is supposed to be mathematically in line or if it should be something else. Then that also leaves the sgpt partition in limbo after the flashinfo.
of course none of this should matter at the moment , i think, because both of these partitions are flagged in the scatter as not to be downloaded(flashed)
Click to expand...
Click to collapse
OK, good catch ! The thing is, my script is basically an automatic calculator, I use the output of the 2 commands, sort them semi-manually, and then run awk to extract names, addresses to be used with Python :
Code:
cat /proc/partitions
ls -l /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name
...a bit of work, and in Python end up as:
pname=["proinfo","nvram","protect1","protect2","lk","para","boot","recovery","logo","expdb","seccfg","oemkeystore","secro","keystore","tee1","tee2","frp","nvdata","metadata","system","cache","userdata","flashinfo"]
pdev=["mmcblk0p1","mmcblk0p2","mmcblk0p3","mmcblk0p4","mmcblk0p5","mmcblk0p6","mmcblk0p7","mmcblk0p8","mmcblk0p9","mmcblk0p10","mmcblk0p11","mmcblk0p12","mmcblk0p13","mmcblk0p14","mmcblk0p15","mmcblk0p16","mmcblk0p17","mmcblk0p18","mmcblk0p19","mmcblk0p20","mmcblk0p21","mmcblk0p22","mmcblk0p23"]
psize=[3072,5120,10240,10240,512,512,16384,16384,8192,10240,512,2048,6144,8192,5120,5120,1024,32768,37888,2736128,409600,12049920,16384]
Then I add everything sequentially, and print it out (I realized I am missing pgpt chunk, need to read it directly from mmcblk0!).
I don't see "sgpt" partition anywhere in any of the Android outputs.
And, there is an easy way to find out if flashinfo address is correct, first dd the partition in Android, 2nd read it using the addresses/lengths in SPFT. If it matches, the addresses are correct by definition !

@mrmazak, @Tomsgt
I added pgpt and sgpt partitions to the list of addresses. I also read flashinfo via the SPFT, and compared to the one from dd, and it matched exactly. If I try to read past the last address I've counted, it gives me a read error, meaning the math is correct! Please see the section below for sgpt (16 Gb version of BLU R1 !!!)
Code:
- partition_index: SYS25
partition_name: sgpt
file_name: sgpt.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x3ab780000
physical_start_addr: 0x3ab780000
partition_size: 0x80000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00

bibikalka said:
@mrmazak, @Tomsgt
I added pgpt and sgpt partitions to the list of addresses. I also read flashinfo via the SPFT, and compared to the one from dd, and it matched exactly. If I try to read past the last address I've counted, it gives me a read error, meaning the math is correct! Please see the section below for sgpt (16 Gb version of BLU R1 !!!)
Code:
- partition_index: SYS25
partition_name: sgpt
file_name: sgpt.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x3ab780000
physical_start_addr: 0x3ab780000
partition_size: 0x80000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00
Click to expand...
Click to collapse
thanks for all the help

Brilliant
And finally, partitions with their starting address/length in HEX for the 16 Gb version (stuff everybody was waiting for ) :
Code:
Name Block_device Start_adr Length
pgpt mmcblk0 0x0 0x80000
proinfo mmcblk0p1 0x80000 0x300000
nvram mmcblk0p2 0x380000 0x500000
protect1 mmcblk0p3 0x880000 0xa00000
protect2 mmcblk0p4 0x1280000 0xa00000
lk mmcblk0p5 0x1c80000 0x80000
para mmcblk0p6 0x1d00000 0x80000
boot mmcblk0p7 0x1d80000 0x1000000
recovery mmcblk0p8 0x2d80000 0x1000000
logo mmcblk0p9 0x3d80000 0x800000
expdb mmcblk0p10 0x4580000 0xa00000
seccfg mmcblk0p11 0x4f80000 0x80000
oemkeystore mmcblk0p12 0x5000000 0x200000
secro mmcblk0p13 0x5200000 0x600000
keystore mmcblk0p14 0x5800000 0x800000
tee1 mmcblk0p15 0x6000000 0x500000
tee2 mmcblk0p16 0x6500000 0x500000
frp mmcblk0p17 0x6a00000 0x100000
nvdata mmcblk0p18 0x6b00000 0x2000000
metadata mmcblk0p19 0x8b00000 0x2500000
system mmcblk0p20 0xb000000 0xa7000000
cache mmcblk0p21 0xb2000000 0x19000000
userdata mmcblk0p22 0xcb000000 0x2df780000
flashinfo mmcblk0p23 0x3aa780000 0x1000000
sgpt mmcblk0s 0x3ab780000 0x80000
[COLOR="Red"]end end 0x3ab800000 0x0[/COLOR]
Click to expand...
Click to collapse
OK sir you are brilliant, if you ever have spare time on your hands to let me drill you with questions I'd love the chance. Secondly, before I go making things worse, and I apologize if this has been answered:
According to your partitions here the scatter I was trying to unbrick my phone with is just all wrong. Or am I misunderstanding how it translates into scatter, for example my first partition was preloader at 0x0 with a 40000 length. Assuming pgpt is the preloader, and the length is 80k, this could very possibly be why I'm getting brom 4032? So if I edited the scatter to use proper partitions, files, and dug through my working 16/2 and got proper backups to use this would be where to start with any unbrick? Or do I have no clue what I'm talking about here.

Persuasion89 said:
OK sir you are brilliant, if you ever have spare time on your hands to let me drill you with questions I'd love the chance. Secondly, before I go making things worse, and I apologize if this has been answered:
According to your partitions here the scatter I was trying to unbrick my phone with is just all wrong. Or am I misunderstanding how it translates into scatter, for example my first partition was preloader at 0x0 with a 40000 length. Assuming pgpt is the preloader, and the length is 80k, this could very possibly be why I'm getting brom 4032? So if I edited the scatter to use proper partitions, files, and dug through my working 16/2 and got proper backups to use this would be where to start with any unbrick? Or do I have no clue what I'm talking about here.
Click to expand...
Click to collapse
What's wrong with the existing scatter files out there ? Just use those ! The addresses do match what's posted here, so should not be any issue at all.

@bibikalka or @Tomsgt , quick question. Do either of you two happen to know if the device requires/uses a uboot image?

bullet25 said:
@bibikalka or @Tomsgt , quick question. Do either of you two happen to know if the device requires/uses a uboot image?
Click to expand...
Click to collapse
Of course ! It's in every OTA update, uboot.img, and sometimes, as lk.bin

Related

[Info] List of Samsung Galaxy S3 GT-i9300 devices and partitions

Code:
su
ls -lR /dev
Code:
/dev/block:
brw------- root root 7, 0 2013-07-04 18:28 loop0
brw------- root root 7, 1 2013-07-04 18:28 loop1
brw------- root root 7, 2 2013-07-04 18:28 loop2
brw------- root root 7, 3 2013-07-04 18:28 loop3
brw------- root root 7, 4 2013-07-04 18:28 loop4
brw------- root root 7, 5 2013-07-04 18:28 loop5
brw------- root root 7, 6 2013-07-04 18:28 loop6
brw------- root root 7, 7 2013-07-04 18:28 loop7
brw------- root root 179, 0 2013-07-04 18:28 mmcblk0
brw------- root root 179, 1 2013-07-04 18:28 mmcblk0p1
brw------- root root 179, 10 2013-07-04 18:28 mmcblk0p10
brw------- root root 179, 11 2013-07-04 18:28 mmcblk0p11
brw------- root root 179, 12 2013-07-04 18:28 mmcblk0p12
brw------- root root 179, 2 2013-07-04 18:28 mmcblk0p2
brw------- root root 179, 3 2013-07-04 18:28 mmcblk0p3
brw-rw---- system system 179, 4 2013-07-04 18:31 mmcblk0p4
brw------- root root 179, 5 2013-07-04 18:28 mmcblk0p5
brw------- root root 179, 6 2013-07-04 18:28 mmcblk0p6
brw-rw---- system radio 179, 7 2013-07-04 18:28 mmcblk0p7
brw------- root root 179, 8 2013-07-04 18:28 mmcblk0p8
brw------- root root 179, 9 2013-07-04 18:28 mmcblk0p9
brw------- root root 179, 16 2013-07-04 18:28 mmcblk1
brw------- root root 179, 17 2013-07-04 18:28 mmcblk1p1
lrwxrwxrwx root root 2013-07-04 18:28 param -> /dev/block/mmcblk0p4
drwxr-xr-x root root 2013-07-04 18:28 platform
brw------- root root 1, 0 2013-07-04 18:28 ram0
brw------- root root 1, 1 2013-07-04 18:28 ram1
brw------- root root 1, 10 2013-07-04 18:28 ram10
brw------- root root 1, 11 2013-07-04 18:28 ram11
brw------- root root 1, 12 2013-07-04 18:28 ram12
brw------- root root 1, 13 2013-07-04 18:28 ram13
brw------- root root 1, 14 2013-07-04 18:28 ram14
brw------- root root 1, 15 2013-07-04 18:28 ram15
brw------- root root 1, 2 2013-07-04 18:28 ram2
brw------- root root 1, 3 2013-07-04 18:28 ram3
brw------- root root 1, 4 2013-07-04 18:28 ram4
brw------- root root 1, 5 2013-07-04 18:28 ram5
brw------- root root 1, 6 2013-07-04 18:28 ram6
brw------- root root 1, 7 2013-07-04 18:28 ram7
brw------- root root 1, 8 2013-07-04 18:28 ram8
brw------- root root 1, 9 2013-07-04 18:28 ram9
drwx------ root root 2013-07-04 18:28 vold
brw------- root root 253, 0 2013-07-04 18:28 zram0
/dev/block/platform:
drwxr-xr-x root root 2013-07-04 18:28 dw_mmc
drwxr-xr-x root root 2013-07-04 18:28 s3c-sdhci.2
/dev/block/platform/dw_mmc:
drwxr-xr-x root root 2013-07-04 18:28 by-name
drwxr-xr-x root root 2013-07-04 18:28 by-num
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p10 -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p11 -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p12 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p7 -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p8 -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk0p9 -> /dev/block/mmcblk0p9
/dev/block/platform/dw_mmc/by-name:
lrwxrwxrwx root root 2013-07-04 18:28 BOOT -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2013-07-04 18:28 BOTA0 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2013-07-04 18:28 BOTA1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2013-07-04 18:28 CACHE -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2013-07-04 18:28 EFS -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2013-07-04 18:28 HIDDEN -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2013-07-04 18:28 OTA -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2013-07-04 18:28 PARAM -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2013-07-04 18:28 RADIO -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2013-07-04 18:28 RECOVERY -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2013-07-04 18:28 SYSTEM -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2013-07-04 18:28 USERDATA -> /dev/block/mmcblk0p12
/dev/block/platform/dw_mmc/by-num:
lrwxrwxrwx root root 2013-07-04 18:28 p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2013-07-04 18:28 p10 -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2013-07-04 18:28 p11 -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2013-07-04 18:28 p12 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2013-07-04 18:28 p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2013-07-04 18:28 p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2013-07-04 18:28 p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2013-07-04 18:28 p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2013-07-04 18:28 p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2013-07-04 18:28 p7 -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2013-07-04 18:28 p8 -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2013-07-04 18:28 p9 -> /dev/block/mmcblk0p9
/dev/block/platform/s3c-sdhci.2:
drwxr-xr-x root root 2013-07-04 18:28 by-num
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk1 -> /dev/block/mmcblk1
lrwxrwxrwx root root 2013-07-04 18:28 mmcblk1p1 -> /dev/block/mmcblk1p1
/dev/block/platform/s3c-sdhci.2/by-num:
lrwxrwxrwx root root 2013-07-04 18:28 p1 -> /dev/block/mmcblk1p1
/dev/block/vold:
brw------- root root 179, 16 2013-07-04 18:28 179:16
brw------- root root 179, 17 2013-07-04 18:28 179:17
--------------------------------------------------------------
Code:
su
df
Code:
Filesystem Size Used Free Blksize
/dev 414M 80.0K 414M 4096
/mnt/secure 414M 0.00K 414M 4096
/mnt/asec 414M 0.00K 414M 4096
/mnt/obb 414M 0.00K 414M 4096
/system 1.48G 1.15G 337M 4096
/efs 19.7M 8.36M 11.3M 4096
/cache 1007M 17.4M 990M 4096
/data 11.4G 10.9G 462M 4096
/mnt/shell/emulated 11.3G 10.9G 362M 4096
/preload 551M 9.22M 541M 4096
/storage/extSdCard 1.83G 398M 1.44G 32768
/mnt/secure/asec 1.83G 398M 1.44G 32768
--------------------------------------------------------------
Code:
su
mount
Code:
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,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
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p9 /system ext4 ro,noatime,errors=panic,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p8 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p12 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
none /dev/memcgrp cgroup rw,relatime,memory 0 0
/dev/block/mmcblk0p10 /preload ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0 0
/dev/block/vold/179:17 /storage/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:17 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/extSdCard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Additional links:
[GUIDE] Making Dump Files Out of Android Device Partitions
Code:
su
find /dev/block/platform/ -name 'mmc*' -exec fdisk -l {} \;
Code:
Disk /dev/block/platform/s3c-sdhci.2/mmcblk1p1: 1966 MB, 1966080000 bytes
4 heads, 16 sectors/track, 60000 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
Disk /dev/block/platform/s3c-sdhci.2/mmcblk1: 1967 MB, 1967128576 bytes
256 heads, 63 sectors/track, 238 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/block/platform/s3c-sdhci.2/mmcblk1p1 * 1 239 1920000 c Win95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 255, 63) logical=(0, 32, 33)
Partition 1 has different physical/logical endings:
phys=(1023, 255, 63) logical=(238, 56, 56)
Disk /dev/block/platform/dw_mmc/mmcblk0p12: 12.3 GB, 12381585408 bytes
4 heads, 16 sectors/track, 377856 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p12 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p11: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p11 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p10: 587 MB, 587202560 bytes
4 heads, 16 sectors/track, 17920 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p10 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p9: 1610 MB, 1610612736 bytes
4 heads, 16 sectors/track, 49152 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p9 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p8: 1073 MB, 1073741824 bytes
4 heads, 16 sectors/track, 32768 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p8 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p7: 33 MB, 33554432 bytes
4 heads, 16 sectors/track, 1024 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p7 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p6: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p6 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p5: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p5 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p4: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p4 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p3: 20 MB, 20971520 bytes
4 heads, 16 sectors/track, 640 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p3 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p2: 4 MB, 4194304 bytes
4 heads, 16 sectors/track, 128 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p2 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0p1: 4 MB, 4194304 bytes
4 heads, 16 sectors/track, 128 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/platform/dw_mmc/mmcblk0p1 doesn't contain a valid partition table
Disk /dev/block/platform/dw_mmc/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/platform/dw_mmc/mmcblk0p1 1 1923584 15388671+ ee EFI GPT
Partition 1 does not end on cylinder boundary
scandiun said:
Code:
su
ls -lR /dev
...
Click to expand...
Click to collapse
Is partition RADIO where the modem goes when you flash a new one? What about the CSC files?
I'm just curious. I've upgrade to Sammy 4.3 to get the new modem/EFS and just reverted to a CM11 nandroid backup I had done *before* the upgrade. EFS is not backed up by CWM for sure. I don't know about the modem, but I guess it won't go into the /system folder.
Thanks!
Each device had it's own partition layout which says where radio goes.
Changing csc code wipes your device.

XT1254 Free your Turbo! AIO information thread

Lesson learned, head hanging down... Oh well. I tried guy. Either ways that only REINFORCES that we all need to get together and share what we know! Hence this thread:
Time for us to come together and put all of our knowledge together. Every known exploit for our bootloader, kernel, rom, ect needs to be logged in one area. All our partitions / sizes / locations / offsets need to be logged. Any and all information that can be gleamed from out fxz/sbf's need to be logged.
I have my own root exploit I want to work on for 5.0 and below... If that time comes, I'll release that. For now I'll keep this updated
Planned todo in order :
safestrap (Will boost Dev's, makes testing roms a breeze!)
kexec (Now Dev's can start juggling kernels) (maybe even forcefully reduce original kernels memory use) (reclaiming resources?, turning off unneeded original kernels modules ect... why not full hijacking of original kernel? Can you write to ANY memory region? (See graphics buffer vulnerability below.....hmmm 5.0 and under "AIO root / kexc / safestrap"? )
cm kernel (Hopefully a Dev beats me to it, as I have next planned....)
5.0 and below root (via graphics buffer vulnerability) https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1474
How to backup critical files/partitions
**Just tried this, some partitions/files are assumed to be read protected...
So far, looks like we got data. I'm pretty sure its the kind you'd want if there was a brickfix in the future... sometimes each device has its own signature required for easy brickfix... Mines backed up in three different places already*
http://forum.xda-developers.com/dro...-aio-information-thread-t3138839/post61435029
XT1254 WRITE PROTECT :
if you bothered to read the init.rc files, you'd see that you can hijack the boot system early enough to disable qe if you're bothered by write protection, since this happens on fs stage:
# arrange access to the overlay
exec /system/bin/checknmount -d -s -m -t ext4 -r /overlay/sysupdate /cache/overlay/sysupdate.simg /cache/overlay/sysupdate.jar
# use the overlay, if it is compatible
exec /system/bin/stacker -d -c -r -t overlayfs /system /overlay/sysupdate[/HIDE]
How to copy your /firmware/image/*.* easily. *****Just tried this, some partitions/files are assumed to be read protected...
with efs explorer
copy /firmware/image/ folder to /sdcard/firmware/
with PC in MTP mode copy /image/ folder to PC
So far, looks like we got data. I'm pretty sure its the kind you'd want if there was a brickfix in the future... sometimes each device has its own signature required for easy brickfix... Mines backed up in three different places
List of partitions/files copied : (Remember, I havn't had time to even look further, the first one I opened wasn't blanked out.)
[email protected]:/ $ cd firmware
[email protected]:/firmware $ cd image
[email protected]:/firmware/image $ ls
acdb.mbn
adsp.b00
adsp.b01
adsp.b02
adsp.b03
adsp.b04
adsp.b05
adsp.b06
adsp.b07
adsp.b08
adsp.b10
adsp.b11
adsp.b12
adsp.mbn
adsp.mdt
apps.mbn
bdwlan11.bin
bdwlan20.bin
cmnlib.b00
cmnlib.b01
cmnlib.b02
cmnlib.b03
cmnlib.mdt
dsp2.mbn
efs1.bin
efs2.bin
efs3.bin
isdbtmm.b00
isdbtmm.b01
isdbtmm.b02
isdbtmm.b03
isdbtmm.mdt
keymaster.b00
keymaster.b01
keymaster.b02
keymaster.b03
keymaster.mdt
mba.mbn
otp11.bin
otp20.bin
playready.b00
playready.b01
playready.b02
playready.b03
playready.mdt
prov.b00
prov.b01
prov.b02
prov.b03
prov.mdt
qdsp6sw.mbn
qwlan11.bin
qwlan20.bin
rpm.mbn
sampleapp.b00
sampleapp.b01
sampleapp.b02
sampleapp.b03
sampleapp.mdt
sbl1.mbn
securemm.b00
securemm.b01
securemm.b02
securemm.b03
securemm.mdt
tqs.b00
tqs.b01
tqs.b02
tqs.b03
tqs.mdt
tz.mbn
utf11.bin
utf20.bin
widevine.b00
widevine.b01
widevine.b02
widevine.b03
widevine.mdt
[email protected]:/firmware/image $
Partition Table:
? ? ? Total size flash location partition name size notes:
179 0 30535680 "mmcblk0 " 32GB Flash Chip
179 1 131072 mmcblk0p1 " modem" 0x0000000008000000
179 2 384 "mmcblk0p2 " ? Sbl1 0x0000000000060000
179 3 56 "mmcblk0p3 " ? Sdi 0x000000000000e000
179 4 16 "mmcblk0p4 " sec: 0x0000000000004000
179 5 32 mmcblk0p5 " ddr" 0x0000000000008000
179 6 1024 mmcblk0p6 " aboot" 0x0000000000100000
179 7 256 mmcblk0p7 " rpm" 0x0000000000040000
179 8 512 mmcblk0p8 ? Utags 0x0000000000080000 contains imei, take note of backup partition
179 9 500 mmcblk0p9 ? Tz 0x000000000007d000
179 10 3072 mmcblk0p10 " factorytune1" 0x0000000000300000
179 11 1084 mmcblk0p11 " padA" 0x000000000010f000
179 12 384 mmcblk0p12 sbl1bak: 0x0000000000060000
179 13 1024 mmcblk0p13 " abootBackup" 0x0000000000100000
179 14 256 mmcblk0p14 ?rpmBackup 0x0000000000040000
179 15 512 mmcblk0p15 ? utagsBackup 0x0000000000080000 backup
79 16 500 mmcblk0p16 ? tzBackup 0x000000000007d000
179 17 1024 mmcblk0p17 " mdm1m9kefs1" 0x0000000000100000
179 18 1024 mmcblk0p18 " mdm1m9kefs2" 0x0000000000100000
179 19 2620 mmcblk0p19 " padB" 0x000000000028f000
179 20 2048 mmcblk0p20 " logs" 0x0000000000200000
179 21 32768 mmcblk0p21 " persist" 0x0000000002000000
179 22 256 mmcblk0p22 " mdm1hob" 0x0000000000040000
179 23 32 mmcblk0p23 " mdm1dhob" 0x0000000000008000
179 24 1024 mmcblk0p24 ? Sp 0x0000000000100000
179 25 128 mmcblk0p25 " cid" 0x0000000000020000
179 26 3072 mmcblk0p26 " pds" 0x0000000000300000
179 27 8192 mmcblk0p27 " logo" 0x0000000000800000
179 28 11264 mmcblk0p28 ? Clogo 0x0000000000b00000
179 29 1024 mmcblk0p29 " misc" 0x0000000000100000
179 30 1632 mmcblk0p30 " padC" 0x0000000000198000
179 31 780 mmcblk0p31 " mdm1m9kefs3" 0x00000000000c3000
259 0 1 mmcblk0p32 " mdm1m9kefsc" 0x0000000000000400
259 1 8 mmcblk0p33 ? Ssd 0x0000000000002000
259 2 8192 mmcblk0p34 " kpan" 0x0000000000800000
259 3 16384 mmcblk0p35 " boot" 0x0000000001000000
259 4 16400 mmcblk0p36 " recovery" 0x0000000001004000
259 5 16416 mmcblk0p37 " factorytune2" 0x0000000001008000
259 6 1469392 mmcblk0p38 " cache" 0x0000000059af4000
259 7 3457024 mmcblk0p39 ? System 0x00000000d3000000
259 8 25309056 mmcblk0p40 ? Userdata 0x0000000608be0000
179 32 4096 mmcblk0 rpmb (Replay Protected Memory Block) RPMB is not a regular partition and a different command sequence(CMD6-->CMD23-->CMD25-->CMD23-->CMD18) as mentioned in JEDEC Standard No. 84-A441, is required to access it, then why mmc initialisation code is using the wrong command sequence(CMD6-->CMD23-->CMD18) to access it?
Old Partition table:
(bootloader) sdi.git: git=MBM-NG-V70.47-0-gf291c61
(bootloader) sbl1.git: git=MBM-NG-V70.47-0-ga007c2c
(bootloader) rpm.git: git=MBM-NG-V70.47-0-g66204d2
(bootloader) tz.git: git=MBM-NG-V70.47-0-g4cdbfd4
(bootloader) aboot.git: git=MBM-NG-V70.47-0-gc723802
(bootloader) partition-size:modem: 0x0000000008000000
(bootloader) partition-size:sbl1: 0x0000000000060000
(bootloader) partition-size:sdi: 0x000000000000e000
(bootloader) partition-size:sec: 0x0000000000004000
(bootloader) partition-size:ddr: 0x0000000000008000
(bootloader) partition-size:aboot: 0x0000000000100000
(bootloader) partition-size:rpm: 0x0000000000040000
(bootloader) partition-size:utags: 0x0000000000080000
(bootloader) partition-size:tz: 0x000000000007d000
(bootloader) partition-size:factorytune1: 0x0000000000300000
(bootloader) partition-sizeadA: 0x000000000010f000
(bootloader) partition-size:sbl1bak: 0x0000000000060000
(bootloader) partition-size:abootBackup: 0x0000000000100000
(bootloader) partition-size:rpmBackup: 0x0000000000040000
(bootloader) partition-size:utagsBackup: 0x0000000000080000
(bootloader) partition-size:tzBackup: 0x000000000007d000
(bootloader) partition-size:mdm1m9kefs1: 0x0000000000100000
(bootloader) partition-size:mdm1m9kefs2: 0x0000000000100000
(bootloader) partition-sizeadB: 0x000000000028f000
(bootloader) partition-size:logs: 0x0000000000200000
(bootloader) partition-sizeersist: 0x0000000002000000
(bootloader) partition-size:mdm1hob: 0x0000000000040000
(bootloader) partition-size:mdm1dhob: 0x0000000000008000
(bootloader) partition-size:sp: 0x0000000000100000
(bootloader) partition-size:cid: 0x0000000000020000
(bootloader) partition-sizeds: 0x0000000000300000
(bootloader) partition-size:logo: 0x0000000000800000
(bootloader) partition-size:clogo: 0x0000000000b00000
(bootloader) partition-size:misc: 0x0000000000100000
(bootloader) partition-sizeadC: 0x0000000000198000
(bootloader) partition-size:mdm1m9kefs3: 0x00000000000c3000
(bootloader) partition-size:mdm1m9kefsc: 0x0000000000000400
(bootloader) partition-size:ssd: 0x0000000000002000
(bootloader) partition-size:kpan: 0x0000000000800000
(bootloader) partition-size:boot: 0x0000000001000000
(bootloader) partition-size:recovery: 0x0000000001004000
(bootloader) partition-size:factorytune2: 0x0000000001008000
(bootloader) partition-size:cache: 0x0000000059af4000
(bootloader) partition-size:system: 0x00000000d3000000
(bootloader) partition-size:userdata: 0x0000000608be0000
cat_/proc/partitions
Start_______End address_____major__minor__#blocks_____name____partition name
?0x?0?0?0?0__0x?0?0?0?0?___179_____0___30535680__mmcblk0
?0x?0?0?0?0__0x?0?0?0?0?___179_____1_____131072__mmcblk0p1 modem
?0x?0?0?0?0__0x?0?0?0?0?___179_____2_____384__mmcblk0p2 sbl1
?0x?0?0?0?0__0x?0?0?0?0?___179_____3______56__mmcblk0p3 sdi
?0x?0?0?0?0__0x?0?0?0?0?___179_____4______16__mmcblk0p4 sec
?0x?0?0?0?0__0x?0?0?0?0?___179_____5______32__mmcblk0p5 ddr
?0x?0?0?0?0__0x?0?0?0?0?___179_____6____1024__mmcblk0p6 aboot
?0x?0?0?0?0__0x?0?0?0?0?___179_____7_____256__mmcblk0p7 rpm
?0x?0?0?0?0__0x?0?0?0?0?___179_____8_____512__mmcblk0p8 utags
?0x?0?0?0?0__0x?0?0?0?0?___179_____9_____500__mmcblk0p9 tz
?0x?0?0?0?0__0x?0?0?0?0?___179____10____3072__mmcblk0p10 factorytune1
?0x?0?0?0?0__0x?0?0?0?0?___179____11____1084__mmcblk0p11 padA
?0x?0?0?0?0__0x?0?0?0?0?___179____12_____384__mmcblk0p12 sbl1bak
?0x?0?0?0?0__0x?0?0?0?0?___179____13____1024__mmcblk0p13 abootBackup
?0x?0?0?0?0__0x?0?0?0?0?___179____14_____256__mmcblk0p14 rpmBackup
?0x?0?0?0?0__0x?0?0?0?0?___179____15_____512__mmcblk0p15 utagsBackup
?0x?0?0?0?0__0x?0?0?0?0?___179____16_____500__mmcblk0p16 tzBackup
?0x?0?0?0?0__0x?0?0?0?0?___179____17____1024__mmcblk0p17 mdm1m9kefs1
?0x?0?0?0?0__0x?0?0?0?0?___179____18____1024__mmcblk0p18 mdm1m9kefs2
?0x?0?0?0?0__0x?0?0?0?0?___179____19____2620__mmcblk0p19 padB
?0x?0?0?0?0__0x?0?0?0?0?___179____20____2048__mmcblk0p20 logs
?0x?0?0?0?0__0x?0?0?0?0?___179____21___32768__mmcblk0p21 persist
?0x?0?0?0?0__0x?0?0?0?0?___179____22_____256__mmcblk0p22 mdm1hob
?0x?0?0?0?0__0x?0?0?0?0?___179____23______32__mmcblk0p23 mdm1dhob
?0x?0?0?0?0__0x?0?0?0?0?___179____24____1024__mmcblk0p24 sp
?0x?0?0?0?0__0x?0?0?0?0?___179____25_____128__mmcblk0p25 cid
?0x?0?0?0?0__0x?0?0?0?0?___179____26____3072__mmcblk0p26 pds
?0x?0?0?0?0__0x?0?0?0?0?___179____27____8192__mmcblk0p27 logo
?0x?0?0?0?0__0x?0?0?0?0?___179____28___11264__mmcblk0p28 clogo
?0x?0?0?0?0__0x?0?0?0?0?___179____29____1024__mmcblk0p29 misc
?0x?0?0?0?0__0x?0?0?0?0?___179____30____1632__mmcblk0p30 padC
?0x?0?0?0?0__0x?0?0?0?0?___179____31_____780__mmcblk0p31 mdm1m9kefs3
?0x?0?0?0?0__0x?0?0?0?0?___259_____0_______1__mmcblk0p32 mdm1m9kefsc
?0x?0?0?0?0__0x?0?0?0?0?___259_____1_______8__mmcblk0p33 ssd
?0x?0?0?0?0__0x?0?0?0?0?___259_____2____8192__mmcblk0p34 kpan
?0x?0?0?0?0__0x?0?0?0?0?___259_____3___16384__mmcblk0p35 boot
?0x?0?0?0?0__0x?0?0?0?0?___259_____4___16400__mmcblk0p36 recovery
?0x?0?0?0?0__0x?0?0?0?0?___259_____5___16416__mmcblk0p37 factorytune2
?0x?0?0?0?0__0x?0?0?0?0?___259____6__1469392__mmcblk0p38 cache
?0x?0?0?0?0__0x?0?0?0?0?___259____7__3457024__mmcblk0p39 system
?0x?0?0?0?0__0x?0?0?0?0?___259____8_25309056__mmcblk0p40 userdata
?0x?0?0?0?0__0x?0?0?0?0?___179____32____4096__mmcblk0rpmb *"protected data"
* The "RPMB partition is special and can not be accessed
by normal eMMC read / write CMDs". It will cause a kernel error, buffer I/O error"
BOOTLOADER:
Aboot:
Snaipersky said:
interesting stuff regarding ABOOT. newandroidbook.com/Articles/aboot.html?s. I have a Dev MX13, so I'm just here for ideological reasons.
As I understand it, the Turbo's WP is handled by ABOOT. Now, Moto has a bad habit of altering the bootloader so that downgrading is infeasible, and increments it. So it is possible to alter ABOOT.
According to NAB, most of the time (barring cases such as Samsung and Amazon, so we shouldn't have an issue- SHOULD being key) This is secured by a signature check rather than hashing, and the signature is of a fixed size.
One can retrieve the signed image, and if rooted, retrieve the image, sans-signature. Now, if we have the file with and without the signature, could one not create a WP-less, unsigned ABOOT, and then manually paste the signature (Forge it?) in front of it? It would be binary editing, Which I think would be the main challenge.
Could we daisychain this with MoFo to create an effective bootloader unlock? It would be a rootable, system flashable, and without WP, should be able to take a custom recovery.
I may be talking out my *** here, but just my understanding of things.
Click to expand...
Click to collapse
do some disassembly of tz.mbn and find a vulnerability to be able to blow the unlocking qfuse (assuming the device isn't permalocked by SBD_EN qfuse Moto uses)
a known bootloader exploit:
version: MBM-NG-V70.47-0-gcXXXXXX
https://www.codeaurora.org/projects...unds-checking-when-flashing-sparse-images-cve
KNOWN VULNERABILITIES :
bypass's intended restrictions on cryptographic operations, via a long key name:
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3100 -?? patched already?
https://www.exploit-db.com/docs/33864.pdf - ?? patched already?
Graphics buffer vulnerability :
https://packetstormsecurity.com/files/130778/Google-Android-Integer-Oveflow-Heap-Corruption.html
http://seclists.org/fulldisclosure/2015/Mar/63
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1474
Safestrap :
safestrap/kexec. Safestrap can be changed to "reuse" certain existing partitions or emulate any of them.
/cache 2.3mb used......... 1.36GB FREE! can be used for /system
/firmware 77mb used ...... 45MB FREE! can be used for /cache
start by being able to load /system on to /cache
then look deeper into partitions for another one
or
go the create a Xgb file on the data partition and load it as a data partition
reserved for kexec
HARDWARE:
[/HIDE]Hardware-ish:
https://www.codeaurora.org/cgit/qui...r&id=82117399ba17ea60b7f771c641ff5b1c9283bdc9
https://www.codeaurora.org/cgit/qui...r&id=82117399ba17ea60b7f771c641ff5b1c9283bdc9
https://www.codeaurora.org/cgit/qui...r&id=82117399ba17ea60b7f771c641ff5b1c9283bdc9
https://www.codeaurora.org/cgit/qui...r&id=82117399ba17ea60b7f771c641ff5b1c9283bdc9
https://www.codeaurora.org/cgit/qui...=AU_LINUX_ANDROID_JB_3.2.1.3.04.03.00.176.156
http://forum.xda-developers.com/showthread.php?t=1914359
https://gitlab.com/k2wl/g2_kernel/commit/c3bbe60c733a17a2295241b558d8162b4c782154?view=parallel
http://forum.xda-developers.com/showthread.php?t=2136738
http://forum.xda-developers.com/showthread.php?t=1235219
https://github.com/dtsinc/DTS-Eagle...ob/master/arch/arm/boot/dts/qcom/apq8084.dtsi
http://pastebin.com/tX06Yp3q
http://forum.gsmhosting.com/vbb/f609/atf-drive-v12-30-update-19-may-2015-a-937102/index5.html
http://forum.xda-developers.com/showthread.php?t=1914359
http://faq.riffbox.org/content/10/5...emmc-efi_pit_mbr_ebr-partitioning-plugin.html
Qualcomm APQ8084 TLMM block
This binding describes the Top Level Mode Multiplexer block found in the
MSM8960 platform.
Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings.
Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".
The pin configuration nodes act as a container for an arbitrary number of
subnodes. Each of these subnodes represents some desired configuration for a
pin, a group, or a list of pins or groups. This configuration can include the
mux function to select on those pin(s)/group(s), and various pin configuration
parameters, such as pull-up, drive strength, etc.
PIN CONFIGURATION NODES:
The name of each subnode is not important; all subnodes should be enumerated
and processed purely based on their content.
Each subnode only affects those parameters that are explicitly listed. In
other words, a subnode that lists a mux function but no pin configuration
parameters implies no information about any pin configuration parameters.
Similarly, a pin subnode that describes a pullup parameter implies no
information about e.g. the mux function.
The following generic properties as defined in pinctrl-bindings.txt are valid
to specify in a pin configuration subnode:
- pins:
Usage: required
Value type: <string-array>
Definition: List of gpio pins affected by the properties specified in
this subnode. Valid pins are:
gpio0-gpio146,
sdc1_clk,
sdc1_cmd,
sdc1_data
sdc2_clk,
sdc2_cmd,
sdc2_data
- function:
Usage: required
Value type: <string>
Definition: Specify the alternative function to be configured for the
specified pins. Functions are only valid for gpio pins.
Valid values are:
adsp_ext, audio_ref, blsp_i2c1, blsp_i2c2, blsp_i2c3,
blsp_i2c4, blsp_i2c5, blsp_i2c6, blsp_i2c7, blsp_i2c8,
blsp_i2c9, blsp_i2c10, blsp_i2c11, blsp_i2c12,
blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, blsp_spi5,
blsp_spi6, blsp_spi7, blsp_spi8, blsp_spi9, blsp_spi10,
blsp_spi11, blsp_spi12, blsp_uart1, blsp_uart2, blsp_uart3,
blsp_uart4, blsp_uart5, blsp_uart6, blsp_uart7, blsp_uart8,
blsp_uart9, blsp_uart10, blsp_uart11, blsp_uart12,
blsp_uim1, blsp_uim2, blsp_uim3, blsp_uim4, blsp_uim5,
blsp_uim6, blsp_uim7, blsp_uim8, blsp_uim9, blsp_uim10,
blsp_uim11, blsp_uim12, cam_mclk0, cam_mclk1, cam_mclk2,
cam_mclk3, cci_async, cci_async_in0, cci_i2c0, cci_i2c1,
cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4,
edp_hpd, gcc_gp1, gcc_gp2, gcc_gp3, gcc_obt, gcc_vtt,i
gp_mn, gp_pdm0, gp_pdm1, gp_pdm2, gp0_clk, gp1_clk, gpio,
hdmi_cec, hdmi_ddc, hdmi_dtest, hdmi_hpd, hdmi_rcv, hsic,
ldo_en, ldo_update, mdp_vsync, pci_e0, pci_e0_n, pci_e0_rst,
pci_e1, pci_e1_rst, pci_e1_rst_n, pci_e1_clkreq_n, pri_mi2s,
qua_mi2s, sata_act, sata_devsleep, sata_devsleep_n,
sd_write, sdc_emmc_mode, sdc3, sdc4, sec_mi2s, slimbus,
spdif_tx, spkr_i2s, spkr_i2s_ws, spss_geni, ter_mi2s, tsif1,
tsif2, uim, uim_batt_alarm
- bias-disable:
Usage: optional
Value type: <none>
Definition: The specified pins should be configued as no pull.
- bias-pull-down:
Usage: optional
Value type: <none>
Definition: The specified pins should be configued as pull down.
- bias-pull-up:
Usage: optional
Value type: <none>
Definition: The specified pins should be configued as pull up.
- output-high:
Usage: optional
Value type: <none>
Definition: The specified pins are configured in output mode, driven
high.
Not valid for sdc pins.
- output-low:
Usage: optional
Value type: <none>
Definition: The specified pins are configured in output mode, driven
low.
Not valid for sdc pins.
- drive-strength:
Usage: optional
Value type: <u32>
Definition: Selects the drive strength for the specified pins, in mA.
Valid values are: 2, 4, 6, 8, 10, 12, 14 and 16
Example:
tlmm: [email protected] {
compatible = "qcom,apq8084-pinctrl";
reg = <0xfd510000 0x4000>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <0 208 0>;
uart2: uart2-default {
mux {
pins = "gpio4", "gpio5";
function = "blsp_uart2";
};
tx {
pins = "gpio4";
drive-strength = <4>;
bias-disable;
};
rx {
pins = "gpio5";
drive-strength = <2>;
bias-pull-up;
};
};
};
APQ Memory... This may or may not match, as it was not pulled off a turbo.
soc: soc { };
memory {
#address-cells = <2>;
#size-cells = <2>;
qsecom_mem: [email protected] {
linux,reserve-contiguous-region;
reg = <0 0 0 0x1100000>;
label = "qseecom_mem";
};
secure_mem: [email protected] {
linux,reserve-contiguous-region;
reg = <0 0 0 0xfc00000>;
label = "secure_mem";
};
tz_apps_and_debug_mem: [email protected] {
linux,reserve-contiguous-region;
linux,reserve-region;
linux,remove-completely;
reg = <0x0 0xd400000 0x0 0x700000>;
label = "tz_apps_and_debug_mem";
};
peripheral_mem: [email protected] {
linux,reserve-contiguous-region;
linux,reserve-region;
linux,remove-completely;
reg = <0x0 0x0db00000 0x0 0x1d00000>;
label = "peripheral_mem";
};
external_image_mem: [email protected] {
linux,reserve-contiguous-region;
linux,reserve-region;
linux,remove-completely;
reg = <0x0 0x0f800000 0x0 0x800000>;
label = "external_image_mem";
};
};
};
reserved for qualcomm download mode and recovery / backdoor flashing info
www.github.com/jcsullins/qdloader
http://forum.xda-developers.com/showthread.php?t=2136738
RANDOM INFO :
USB:
ProductID's the XT1254 can present:
VendorID 22b8 (Motorola, this never changes)
ProductID
2ea4 - MTP mode, software install Off
2ea5 - MTP mode, USB debugging on
2ea6 - PTP mode
2ea7 - PTP mode, USB debugging on
2ea8 - MTP mode, software install On
2e24 - MTP mode, with USB tethering active
NOTE: It is not possible to enable software install in PTP mode, or with USB debugging turned on.
For Google to find them together: VIDID 22b8:2ea4 22b8:2ea5 22b8:2ea6 22b8:2ea7 22b8:2ea8
Credit : http://jamesmcrow.com/node/11
Just in case you need another post reserved - let me know and I can transfer this one to you.......
jerdog said:
Just in case you need another post reserved - let me know and I can transfer this one to you.......
Click to expand...
Click to collapse
Hey, I plan on making this a MONSTER thread of information... I WILL work on this phone like I did the ms910. I can only find faint hints on xda that I ever even owned the phone... I still have this though :
http://androidforums.com/threads/de...esteem-4g-lg-ms910.722075/page-3#post-5867057
and this :
https://github.com/saschaelble?tab=repositories
This will be my :
RANDOM INFO TO BE DIGESTED,
http://lwn.net/Articles/600110/ -hardware?
https://github.com/razrqcom-dev-team/android_device_motorola_quark -cm12 kernel github for xt1225!!
https://www.google.com/search?q=mmcblk0 rpmb&ie=utf-8&oe=utf-8
http://www.digitalinternals.com/mobile/android-mmc-mmcblk-partition-layout/259/
https://forums.oneplus.net/threads/solution-how-i-recovered-my-oneplus-one-from-hard-brick.184927/
http://forum.xda-developers.com/showthread.php?p=50336648#post50336648
https://github.com/gokulnatha/GT-I9...ation/devicetree/bindings/ocmem/msm-ocmem.txt
https://github.com/dtsinc/DTS-Eagle...ob/master/arch/arm/boot/dts/qcom/apq8084.dtsi
https://www.google.com/search?q=emmc_appsboot.mbn&ie=utf-8&oe=utf-8
I have finished unbrick for Motorola Droid Turbo, if I understand you correctly.
http://forum.xda-developers.com/droid-turbo/general/turbo-unbrick-t3139811
Continuing to peddle your warez and hacked up nonsense, even via PM, has earned you a nice vacation. Closing thread.

Meizu Pro5 32gb/64gb partition tables/partition information

Hi,
The past week i've been busy in flashing flyme/twrp/ubuntu and all went very well, but i find the experience a little limited until now. Especially when reading about all the ppl who bricked their device or are stuck one way or another with locked bootloaders, missing recovery's etc.
I found that the bootloader unlock status is kept in the /private partition, wether manipulating this partition in order to unlock the device is possible, i dont know.
So in order to up the experience for all i need your help
I've been mapping out the partition layout on my Chinese Meizu Pro5 64gb (converted to global/intl now), but one device only gets you so far. There are differences between the Flyme/Ubuntu devices, the Flyme devices U/A/I and the TWRP recovery (lets all thank faust93) does not work for everyone (it does for me).
For anyone that has access to 'sgdisk' (you successfully installed TWRP or have an Ubuntu edition) i need a layout of your partitions: (your personal info/guid is excluded (-v GUID) from this)
# sgdisk --print /dev/block/sda | grep -v GUID >/sdcard/partition_layout.txt
We have the following devices:
1. G [M576_intl_official] Global 32gb
2. G [M576_intl_official] Global 64gb
3. U: [M576_unicom_custom] Unicom 32gb
4. U: [M576_unicom_custom] Unicom 64gb
5. A: [M576_mobile_public] Mobile Public 32gb
6. A: [M576_mobile_public] Mobile Public 64gb
7. I: [M576_intl_official] Ubuntu Meizu 32gb
8. I: [M576_intl_official] Ubuntu Meizu 64gb
TWRP 3: fstab table (work in progress)
Code:
/private emmc /dev/block/sda1 flags=display="Private";backup=1 # meizu imei/esn/wifi/bluetooth/serial/lock/unlock
/proinfo emmc /dev/block/sda2 # meizu firmware/machine_type/region_id unicom(U)/chicom(A)/intl(G)
#/misc emmc /dev/block/sda3 # empty 0x00
/param emmc /dev/block/sda21 # u-boot active stats
/efs ext4 /dev/block/sda22 flags=display="EFS";backup=1
#/pnv emmc /dev/block/sda23 # empty 0x00
/ldfw emmc /dev/block/sda24 flags=display="Firmware";backup=1
/dtb emmc /dev/block/sda25 flags=display="Device Tree";backup=1
/bootimg emmc /dev/block/sda26 flags=display="Boot"
/recovery ext4 /dev/block/sda27 flags=display="Recovery";backup=1
/bootlogo emmc /dev/block/sda28 flags=display="Bootlogo";backup=1
#/rstinfo emmc /dev/block/sda29 # kernel log
#/mnv ext4 /dev/block/sda30 # nv_protected
#/reserved1 emmc /dev/block/sda31 # empty 0x00
#/reserved2 emmc /dev/block/sda32 # empty 0x00
#/reserved3 emmc /dev/block/sda33 # empty 0x00
/system ext4 /dev/block/sda41 flags=display="System"
#/custom ext4 /dev/block/sda42 # preload: adds applications to system on first install/factory reset
/cache ext4 /dev/block/sda43 flags=display="Cache";backup=1
/sdcard ext4 /dev/block/sda44 flags=display="Internal Storage";storage;settingsstorage
#/u-boot emmc /dev/block/sdb # u-boot bootloader
#- emmc /dev/block/sdc # empty 0x00 ( ?? could be used as backup bootloader for Android 7.0 nougat ??)
/external_sd vfat /dev/block/mmcblk0p1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat ?? flags=display="USB-OTG";storage;wipeingui;removable
*** BRICK WARNING: the bootloader expects >> ldfw << and >>dtb<< ***
*** Make sure ldfw and dtb are flashed, i did not dare to try without ***
*** Also make sure that bootloader and ldfw are from the flyme_5.6.1.19_daily ***
Code:
bootloader: u-boot bootloader
ldfw : u-boot load firmware (TrustZone driver?, can someone verify)
dtb : u-boot device tree blob/binary, to pass to linux kernel
.
Switching from android-to-ubuntu or ubuntu-to-android
requires the following partitions to be flashed:
Code:
/ldfw emmc /dev/block/sda24 flags=display="Firmware";backup=1
/dtb emmc /dev/block/sda25 flags=display="Device Tree";backup=1
/bootimg emmc /dev/block/sda26 flags=display="Boot"
/bootlogo emmc /dev/block/sda28 flags=display="Bootlogo";backup=1
/system ext4 /dev/block/sda41 flags=display="System"
.
My partition table
Code:
Meizu Pro 5 64gb Unicom Edition
Disk /dev/block/sda: 15267840 sectors, 58.2 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID):
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 15267834
Partitions will be aligned on 64-sector boundaries
Total free space is 11386 sectors (44.5 MiB)
Number Start (sector) End (sector) Size Code Name
1 1024 1279 1024.0 KiB 0700 private
2 1280 1343 256.0 KiB 0700 proinfo
3 1344 1407 256.0 KiB 0700 misc
21 2048 3071 4.0 MiB 0700 param
22 3072 5119 8.0 MiB 0700 efs
23 5120 5631 2.0 MiB 0700 pnv
24 5632 6655 4.0 MiB 0700 ldfw
25 6656 7679 4.0 MiB 0700 dtb
26 7680 13823 24.0 MiB 0700 bootimg
27 13824 22015 32.0 MiB 0700 recovery
28 22016 30207 32.0 MiB 0700 bootlogo
29 30208 35327 20.0 MiB 0700 rstinfo
30 35328 40447 20.0 MiB 0700 mnv
31 40448 45567 20.0 MiB 0700 reserved1
32 45568 50687 20.0 MiB 0700 reserved2
33 50688 55807 20.0 MiB 0700 reserved3
41 65536 720895 2.5 GiB 0700 system
42 720896 851967 512.0 MiB 0700 custom
43 851968 983039 512.0 MiB 0700 cache
44 983040 15267834 54.5 GiB 0700 userdata
If you find any errors or have contributions, post in the thread or pm me.
Awesome
Wow, what a wasteland ... anyone still here .... here .... here .... ..... .... **dustball** ..... **crickets**
Anyways, i found the partition tables lurking in the bootloader,
they are pretty much the same for all the devices:
The 32gb and 64gb editions are the same, partition 44 userdata is just a leftover partition.
The only difference between Android and Ubuntu is partition 43,
maybe Wimpy can shed some light on this
Code:
< index=43,name=cache,size=[B]512MiB[/B],uuid=${uuid_cache};
---
> index=43,name=cache,size=[B]700MiB[/B],uuid=${uuid_cache};
Android partition table
Code:
index=1,name=private,size=1MiB,start=0x400000,uuid=${uuid_private};
index=2,name=proinfo,size=256KiB,uuid=${uuid_proinfo};
index=3,name=misc,size=256KiB,uuid=${uuid_misc};
index=21,name=param,size=4MiB,start=0x800000,uuid=${uuid_param};
index=22,name=efs,size=8MiB,uuid=${uuid_efs};
index=23,name=pnv,size=2MiB,uuid=${uuid_pnv};
index=24,name=ldfw,size=4MiB,uuid=${uuid_ldfw};
index=25,name=dtb,size=4MiB,uuid=${uuid_dtb};
index=26,name=bootimg,size=24MiB,uuid=${uuid_bootimg};
index=27,name=recovery,size=32MiB,uuid=${uuid_recovery};
index=28,name=bootlogo,size=32MiB,uuid=${uuid_bootlogo};
index=29,name=rstinfo,size=20MiB,uuid=${uuid_rstinfo};
index=30,name=mnv,size=20MiB,uuid=${uuid_mnv};
index=31,name=reserved1,size=20MiB,uuid=${uuid_reserved1};
index=32,name=reserved2,size=20MiB,uuid=${uuid_reserved2};
index=33,name=reserved3,size=20MiB,uuid=${uuid_reserved3};
index=41,name=system,size=2560MiB,start=0x10000000,uuid=${uuid_system};
index=42,name=custom,size=512MiB,uuid=${uuid_custom};
[B]index=43,name=cache,size=512MiB,uuid=${uuid_cache};[/B]
index=44,name=userdata,size=0,uuid=${uuid_userdata};
Ubuntu partition table
Code:
index=1,name=private,size=1MiB,start=0x400000,uuid=${uuid_private};
index=2,name=proinfo,size=256KiB,uuid=${uuid_proinfo};
index=3,name=misc,size=256KiB,uuid=${uuid_misc};
index=21,name=param,size=4MiB,start=0x800000,uuid=${uuid_param};
index=22,name=efs,size=8MiB,uuid=${uuid_efs};
index=23,name=pnv,size=2MiB,uuid=${uuid_pnv};
index=24,name=ldfw,size=4MiB,uuid=${uuid_ldfw};
index=25,name=dtb,size=4MiB,uuid=${uuid_dtb};
index=26,name=bootimg,size=24MiB,uuid=${uuid_bootimg};
index=27,name=recovery,size=32MiB,uuid=${uuid_recovery};
index=28,name=bootlogo,size=32MiB,uuid=${uuid_bootlogo};
index=29,name=rstinfo,size=20MiB,uuid=${uuid_rstinfo};
index=30,name=mnv,size=20MiB,uuid=${uuid_mnv};
index=31,name=reserved1,size=20MiB,uuid=${uuid_reserved1};
index=32,name=reserved2,size=20MiB,uuid=${uuid_reserved2};
index=33,name=reserved3,size=20MiB,uuid=${uuid_reserved3};
index=41,name=system,size=2560MiB,start=0x10000000,uuid=${uuid_system};
index=42,name=custom,size=512MiB,uuid=${uuid_custom};
[B]index=43,name=cache,size=700MiB,uuid=${uuid_cache};[/B]
index=44,name=userdata,size=0,uuid=${uuid_userdata};
I installed ubuntu on a android Meizu Pro 5 and now, when I try to change channels to rc-proposed using system-image-cli I find that the 512MB cache partition is not enough. So I guess that is the reason the Ubuntu version has a 700MB cache partition. That (/dev/sda43) is the place where the files for an upgrade are downloaded and then installed from the recovery mode.
st0rm77 said:
Hi,
The past week i've been busy in flashing flyme/twrp/ubuntu and all went very well, but i find the experience a little limited until now. Especially when reading about all the ppl who bricked their device or are stuck one way or another with locked bootloaders, missing recovery's etc.
I found that the bootloader unlock status is kept in the /private partition, wether manipulating this partition in order to unlock the device is possible, i dont know.
So in order to up the experience for all i need your help
I've been mapping out the partition layout on my Chinese Meizu Pro5 64gb (converted to global/intl now), but one device only gets you so far. There are differences between the Flyme/Ubuntu devices, the Flyme devices U/A/I and the TWRP recovery (lets all thank faust93) does not work for everyone (it does for me).
For anyone that has access to 'sgdisk' (you successfully installed TWRP or have an Ubuntu edition) i need a layout of your partitions: (your personal info/guid is excluded (-v GUID) from this)
# sgdisk --print /dev/block/sda | grep -v GUID >/sdcard/partition_layout.txt
We have the following devices:
1. G [M576_intl_official] Global 32gb
2. G [M576_intl_official] Global 64gb
3. U: [M576_unicom_custom] Unicom 32gb
4. U: [M576_unicom_custom] Unicom 64gb
5. A: [M576_mobile_public] Mobile Public 32gb
6. A: [M576_mobile_public] Mobile Public 64gb
7. I: [M576_intl_official] Ubuntu Meizu 32gb
8. I: [M576_intl_official] Ubuntu Meizu 64gb
TWRP 3: fstab table (work in progress)
Code:
/private emmc /dev/block/sda1 flags=display="Private";backup=1 # meizu imei/esn/wifi/bluetooth/serial/lock/unlock
/proinfo emmc /dev/block/sda2 # meizu firmware/machine_type/region_id unicom(U)/chicom(A)/intl(G)
#/misc emmc /dev/block/sda3 # empty 0x00
/param emmc /dev/block/sda21 # u-boot active stats
/efs ext4 /dev/block/sda22 flags=display="EFS";backup=1
#/pnv emmc /dev/block/sda23 # empty 0x00
/ldfw emmc /dev/block/sda24 flags=display="Firmware";backup=1
/dtb emmc /dev/block/sda25 flags=display="Device Tree";backup=1
/bootimg emmc /dev/block/sda26 flags=display="Boot"
/recovery ext4 /dev/block/sda27 flags=display="Recovery";backup=1
/bootlogo emmc /dev/block/sda28 flags=display="Bootlogo";backup=1
#/rstinfo emmc /dev/block/sda29 # kernel log
#/mnv ext4 /dev/block/sda30 # nv_protected
#/reserved1 emmc /dev/block/sda31 # empty 0x00
#/reserved2 emmc /dev/block/sda32 # empty 0x00
#/reserved3 emmc /dev/block/sda33 # empty 0x00
/system ext4 /dev/block/sda41 flags=display="System"
#/custom ext4 /dev/block/sda42 # preload: adds applications to system on first install/factory reset
/cache ext4 /dev/block/sda43 flags=display="Cache";backup=1
/sdcard ext4 /dev/block/sda44 flags=display="Internal Storage";storage;settingsstorage
#/u-boot emmc /dev/block/sdb # u-boot bootloader
#- emmc /dev/block/sdc # empty 0x00 ( ?? could be used as backup bootloader for Android 7.0 nougat ??)
/external_sd vfat /dev/block/mmcblk0p1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat ?? flags=display="USB-OTG";storage;wipeingui;removable
*** BRICK WARNING: the bootloader expects >> ldfw << and >>dtb<< ***
*** Make sure ldfw and dtb are flashed, i did not dare to try without ***
*** Also make sure that bootloader and ldfw are from the flyme_5.6.1.19_daily ***
Code:
bootloader: u-boot bootloader
ldfw : u-boot load firmware (TrustZone driver?, can someone verify)
dtb : u-boot device tree blob/binary, to pass to linux kernel
.
Switching from android-to-ubuntu or ubuntu-to-android
requires the following partitions to be flashed:
Code:
/ldfw emmc /dev/block/sda24 flags=display="Firmware";backup=1
/dtb emmc /dev/block/sda25 flags=display="Device Tree";backup=1
/bootimg emmc /dev/block/sda26 flags=display="Boot"
/bootlogo emmc /dev/block/sda28 flags=display="Bootlogo";backup=1
/system ext4 /dev/block/sda41 flags=display="System"
.
My partition table
Code:
Meizu Pro 5 64gb Unicom Edition
Disk /dev/block/sda: 15267840 sectors, 58.2 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID):
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 15267834
Partitions will be aligned on 64-sector boundaries
Total free space is 11386 sectors (44.5 MiB)
Number Start (sector) End (sector) Size Code Name
1 1024 1279 1024.0 KiB 0700 private
2 1280 1343 256.0 KiB 0700 proinfo
3 1344 1407 256.0 KiB 0700 misc
21 2048 3071 4.0 MiB 0700 param
22 3072 5119 8.0 MiB 0700 efs
23 5120 5631 2.0 MiB 0700 pnv
24 5632 6655 4.0 MiB 0700 ldfw
25 6656 7679 4.0 MiB 0700 dtb
26 7680 13823 24.0 MiB 0700 bootimg
27 13824 22015 32.0 MiB 0700 recovery
28 22016 30207 32.0 MiB 0700 bootlogo
29 30208 35327 20.0 MiB 0700 rstinfo
30 35328 40447 20.0 MiB 0700 mnv
31 40448 45567 20.0 MiB 0700 reserved1
32 45568 50687 20.0 MiB 0700 reserved2
33 50688 55807 20.0 MiB 0700 reserved3
41 65536 720895 2.5 GiB 0700 system
42 720896 851967 512.0 MiB 0700 custom
43 851968 983039 512.0 MiB 0700 cache
44 983040 15267834 54.5 GiB 0700 userdata
If you find any errors or have contributions, post in the thread or pm me.
Awesome
Click to expand...
Click to collapse
Hi, I have lost my partitions due to the latest update of Magisk.
PYCON told me that I could redefine my partitions yet I haven't got a clue about how to do this.
I have a chinese version 32 Gb Pro 5 by the way.
This guy here has the same problem : https://forum.xda-developers.com/meizu-pro-5/help/provide-images-partitions-t3639336
Could somebody help us please ?

How to install a new rom with bootloader loocked?

Hello I have a machine Redmi2 that does not boot, only boots with fastboot when I pressed the power off button ans Vol - button
I can execute fastboot commands.
For example:
fastboot devices
Click to expand...
Click to collapse
967354587d12 fastboot
Click to expand...
Click to collapse
fastboot oem device-info
Click to expand...
Click to collapse
...
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
OKAY [ 0.004s]
finished. total time: 0.004s
Click to expand...
Click to collapse
I could dowloaded various rom (official from xiaomi and not official like aosp-caf_wt88047_64-21-05-2017-eng.pirej.zip or xiaomi-miui-hellas-5.1_wt88047_V8_XTRVbeta2_7.2.24.zip) but I can install a new system in this machine.
First I try to unlock the bootloader with official method from Xiaomi but the result is error.
Now I try to boot with twrp and this is works.
To boot with twrp I cam execute this with fastboot
fastboot flash recovery twrp_arm64_3.1.1.img
Click to expand...
Click to collapse
target reported max download size of 268435456 bytes
sending 'recovery' (11426 KB)...
OKAY [ 0.360s]
writing 'recovery'...
OKAY [ 0.184s]
finished. total time: 0.544s
Click to expand...
Click to collapse
fastboot flash boot twrp_arm64_3.1.1.img
Click to expand...
Click to collapse
target reported max download size of 268435456 bytes
sending 'boot' (11426 KB)...
OKAY [ 0.361s]
writing 'boot'...
OKAY [ 0.132s]
finished. total time: 0.493s
Click to expand...
Click to collapse
And with this comand boots the machine with twrp
fastboot boot twrp_arm64_3.1.1.img
Click to expand...
Click to collapse
When machine boots I have access to external card from my PC and I can put the rom to try to install.
When try to clean the partitions I can not do it:
This is the errors
Error al desmontar '/system' (invalid argument)
Error al desmontar '/data' (invalid argument)
Error al desmontar '/cache' (invalid argument)
Incapaz de montar almacenamiento
Click to expand...
Click to collapse
When I try to install RR-N-v5.8.3-20170516-wt88047-OFFICIAL.zip for example I can not install this rom.
Do you know if it is possible install a rom with bootloader locked?
Doy you know if it is possible unlocked the bootloader if xiaomi unlocker does not works?
Any ideas to install a rom in this machine?
Best regards.
i heard that redmi2 has unlocked bootloader and you are using twrp arm64 ? try official twrp and install rom ?
AKHILR4J said:
i heard that redmi2 has unlocked bootloader and you are using twrp arm64 ? try official twrp and install rom ?
Click to expand...
Click to collapse
Thanks for your help,
I have downloaded the lastest twrp img from redmi 2, and I have the same problems.
Machine boots with twrp but I can not write in the internal partitions and I can not install a rom.
I think that I need unlock the bootloader to can to modify the android partitions but I do not know to do it.
try this one
when in twrp, open mount, give check to system, but uncheck "mount system partition read-only"
then try flash the custom rom
when tried "fastboot oem device-info" to my redmi 2 it also show "(bootloader) Device unlocked: false"
yet i can install just now, LineageOS
Liquid2 said:
try this one
when in twrp, open mount, give check to system, but uncheck "mount system partition read-only"
then try flash the custom rom
when tried "fastboot oem device-info" to my redmi 2 it also show "(bootloader) Device unlocked: false"
yet i can install just now, LineageOS
Click to expand...
Click to collapse
Hello, thanks for your help, but when I open Mount, only I can check Firmware, Persist, Micro SDCard and I can check Mount system partition read only.
I can not check System, Data, Cache and when I select Storage (Internal Storage (0MB).
I can use TWRP becuase I execute fastboot boot twrp-3.1.1-0-wt88047.img, ¿it is possible open twrp with any parameters?
Regards, Julio.
Hello again, I have tried to mount /system with a terminal in TWRP with this command
Code:
# Montamos la carpeta /system como lectura(r) y escritura(w)
mount -o remount,rw /system
but the problem is my /proc/mounts file
Code:
rootfs / rootfs rw,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=967420k,nr_inodes=153983,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,seclabel,relatime,size=967420k,nr_inodes=153983 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/mmcblk0p25 /persist ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/block/mmcblk1p1 /external_sd vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/mmcblk0p1 /firmware vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
Do you know how can I can change this file to include the /system partition to mount read/write and I can install a rom os.
Regards,
jriosa said:
Hello, thanks for your help, but when I open Mount, only I can check Firmware, Persist, Micro SDCard and I can check Mount system partition read only.
I can not check System, Data, Cache and when I select Storage (Internal Storage (0MB).
I can use TWRP becuase I execute fastboot boot twrp-3.1.1-0-wt88047.img, ¿it is possible open twrp with any parameters?
Regards, Julio.
Click to expand...
Click to collapse
have u tried another twrp?? make sure it for your device
Liquid2 said:
have u tried another twrp?? make sure it for your device
Click to expand...
Click to collapse
Thanks for your help, I have tried different versions from twrp with the same result.
Regards, Julio.
sori, cant help much, maybe
i myself in very newbie
how about if you flash fresh with flashboot rom using miflash, see if it can boot into official miui first
then you can try install twrp again and flash custom rom
have you tried twrp
Hello Now I access to android with adb.
When I boot the android with TWRP, I can access with my PC using adb.
I execute this.
adb root
Click to expand...
Click to collapse
adb shell
Click to expand...
Click to collapse
This is the partitions on my machine
~ # cat /proc/partitions
major minor #blocks name
179 0 15392768 mmcblk0
179 1 65536 mmcblk0p1
179 2 512 mmcblk0p2
179 3 512 mmcblk0p3
179 4 1024 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 512 mmcblk0p6
179 7 512 mmcblk0p7
179 8 512 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 512 mmcblk0p11
179 12 1024 mmcblk0p12
179 13 1536 mmcblk0p13
179 14 1536 mmcblk0p14
179 15 1024 mmcblk0p15
179 16 1 mmcblk0p16
179 17 8 mmcblk0p17
179 18 10240 mmcblk0p18
179 19 32 mmcblk0p19
179 20 1536 mmcblk0p20
179 21 16 mmcblk0p21
179 22 32768 mmcblk0p22
179 23 1048576 mmcblk0p23
179 24 327680 mmcblk0p24
179 25 32768 mmcblk0p25
179 26 32768 mmcblk0p26
179 27 512 mmcblk0p27
179 28 32 mmcblk0p28
179 29 65536 mmcblk0p29
179 30 13557743 mmcblk0p30
179 32 4096 mmcblk0rpmb
179 64 30375936 mmcblk1
179 65 30371840 mmcblk1p1
Click to expand...
Click to collapse
~ # cd /dev
/dev # find -inme mmcblk0
find: unrecognized: -inme
Segmentation fault
/dev # find -iname mmcblk0
./block/mmcblk0
./block/platform/soc.0/7824900.sdhci/mmcblk0
Click to expand...
Click to collapse
I have added parted to managed partitions in my machine
To see parttions in my disk
~ # /sbin/parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Click to expand...
Click to collapse
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 67.1MB 134MB 67.1MB fat16 modem
2 134MB 135MB 524kB sbl1
3 135MB 135MB 524kB sbl1bak
4 135MB 136MB 1049kB aboot
5 136MB 137MB 1049kB abootbak
6 137MB 138MB 524kB rpm
7 138MB 138MB 524kB rpmbak
8 138MB 139MB 524kB tz
9 139MB 139MB 524kB tzbak
10 139MB 140MB 524kB hyp
11 140MB 141MB 524kB hypbak
12 141MB 142MB 1049kB pad
13 142MB 143MB 1573kB modemst1
14 143MB 145MB 1573kB modemst2
15 145MB 146MB 1049kB misc
16 146MB 146MB 1024B fsc
17 146MB 146MB 8192B ssd
18 146MB 156MB 10.5MB splash
19 201MB 201MB 32.8kB DDR
20 201MB 203MB 1573kB fsg
21 203MB 203MB 16.4kB sec
22 203MB 237MB 33.6MB boot
23 237MB 1310MB 1074MB system
24 1310MB 1646MB 336MB cache
25 1646MB 1679MB 33.6MB ext4 persist
26 1679MB 1713MB 33.6MB recovery
27 1745MB 1745MB 524kB keystore
28 1745MB 1745MB 32.8kB config
29 1745MB 1812MB 67.1MB oem
30 1879MB 15.8GB 13.9GB userdata
Click to expand...
Click to collapse
To see my partitions
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 944.7M 156.0K 944.6M 0% /dev
tmpfs 944.7M 32.0K 944.7M 0% /tmp
/dev/block/mmcblk1p1 29.0G 13.4G 15.6G 46% /external_sd
Click to expand...
Click to collapse
I think that I can not install a new rom (offcial or unofficial) because the system I can not access to partitions /system for example and I think that system partitions is mmcblk0p23.
Do you know how I can modify my partitions to see in df -h and launch a new rom with twrp?
Thanks a lot,
Hello again, I download parted soft to try to create the partitions
I execute parted and I try to delete the partitions.
For example:
I execute
parted /dev/block/mmcblk0
I think that this is my internal sd
(parted) p
p
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15032MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 64.0MiB 128MiB 64.0MiB fat16 modem
2 128MiB 128MiB 0.50MiB sbl1
3 129MiB 129MiB 0.50MiB sbl1bak
4 129MiB 130MiB 1.00MiB aboot
5 130MiB 131MiB 1.00MiB abootbak
6 131MiB 131MiB 0.50MiB rpm
7 132MiB 132MiB 0.50MiB rpmbak
8 132MiB 132MiB 0.50MiB tz
9 133MiB 133MiB 0.50MiB tzbak
10 133MiB 133MiB 0.50MiB hyp
11 134MiB 134MiB 0.50MiB hypbak
12 134MiB 135MiB 1.00MiB pad
13 135MiB 136MiB 1.50MiB modemst1
14 137MiB 138MiB 1.50MiB modemst2
15 138MiB 139MiB 1.00MiB misc
16 139MiB 139MiB 0.00MiB fsc
17 139MiB 139MiB 0.01MiB ssd
18 139MiB 149MiB 10.0MiB splash
19 192MiB 192MiB 0.03MiB DDR
20 192MiB 194MiB 1.50MiB fsg
21 194MiB 194MiB 0.02MiB sec
22 194MiB 226MiB 32.0MiB boot
23 226MiB 1250MiB 1024MiB system
24 1250MiB 1570MiB 320MiB cache
25 1570MiB 1602MiB 32.0MiB ext4 persist
26 1602MiB 1634MiB 32.0MiB recovery
27 1664MiB 1664MiB 0.50MiB keystore
28 1665MiB 1665MiB 0.03MiB config
29 1665MiB 1729MiB 64.0MiB oem
30 1792MiB 15032MiB 13240MiB userdata
Click to expand...
Click to collapse
I execute rm 30 to try to delete the last partition (userdata)
but when I see the partitions with command p, rm does not delete the partition and I can nor create it again.
Do you know how can I delete the partitions?
Best regards.
Hello again, I download parted soft to try to create the partitions
I execute parted and I try to delete the partitions.
For example:
I execute
parted /dev/block/mmcblk0
I think that this is my internal sd
(parted) p
p
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15032MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 64.0MiB 128MiB 64.0MiB fat16 modem
2 128MiB 128MiB 0.50MiB sbl1
3 129MiB 129MiB 0.50MiB sbl1bak
4 129MiB 130MiB 1.00MiB aboot
5 130MiB 131MiB 1.00MiB abootbak
6 131MiB 131MiB 0.50MiB rpm
7 132MiB 132MiB 0.50MiB rpmbak
8 132MiB 132MiB 0.50MiB tz
9 133MiB 133MiB 0.50MiB tzbak
10 133MiB 133MiB 0.50MiB hyp
11 134MiB 134MiB 0.50MiB hypbak
12 134MiB 135MiB 1.00MiB pad
13 135MiB 136MiB 1.50MiB modemst1
14 137MiB 138MiB 1.50MiB modemst2
15 138MiB 139MiB 1.00MiB misc
16 139MiB 139MiB 0.00MiB fsc
17 139MiB 139MiB 0.01MiB ssd
18 139MiB 149MiB 10.0MiB splash
19 192MiB 192MiB 0.03MiB DDR
20 192MiB 194MiB 1.50MiB fsg
21 194MiB 194MiB 0.02MiB sec
22 194MiB 226MiB 32.0MiB boot
23 226MiB 1250MiB 1024MiB system
24 1250MiB 1570MiB 320MiB cache
25 1570MiB 1602MiB 32.0MiB ext4 persist
26 1602MiB 1634MiB 32.0MiB recovery
27 1664MiB 1664MiB 0.50MiB keystore
28 1665MiB 1665MiB 0.03MiB config
29 1665MiB 1729MiB 64.0MiB oem
30 1792MiB 15032MiB 13240MiB userdata
Click to expand...
Click to collapse
I execute rm 30 to try to delete the last partition (userdata)
but when I see the partitions with command p, rm does not delete the partition and I can nor create it again.
Do you know how can I delete the partitions?
Best regards.
jriosa said:
Hello again, I download parted soft to try to create the partitions
I execute parted and I try to delete the partitions.
For example:
I execute
parted /dev/block/mmcblk0
I think that this is my internal sd
I execute rm 30 to try to delete the last partition (userdata)
but when I see the partitions with command p, rm does not delete the partition and I can nor create it again.
Do you know how can I delete the partitions?
Best regards.
Click to expand...
Click to collapse
Have you unmounted the data partition in twrp before executing the rm command?
SidOfficial said:
Have you unmounted the data partition in twrp before executing the rm command?
Click to expand...
Click to collapse
This is my commands and my point mounts are
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 944.7M 156.0K 944.6M 0% /dev
tmpfs 944.7M 28.0K 944.7M 0% /tmp
/dev/block/mmcblk1p1 29.0G 14.9G 14.0G 52% /external_sd
Click to expand...
Click to collapse
I see a new error
~ # parted /dev/block/mmcblk0p30
Error: Could not stat device /dev/block/mmcblk0p30 - No such file or directory.
Retry/Cancel? C
C
Click to expand...
Click to collapse
maybe the first partition I think is OK
~ # parted /dev/block/mmcblk0p1
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p1: 67.1MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 67.1MB 67.1MB fat16
Click to expand...
Click to collapse
adb shell
~ # cp /external_sd/parted /sbin/parted
~ # chmod +x /sbin/parted
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 944.7M 156.0K 944.6M 0% /dev
tmpfs 944.7M 28.0K 944.7M 0% /tmp
/dev/block/mmcblk1p1 29.0G 14.9G 14.0G 52% /external_sd
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit MiB
unit MiB
(parted) p
p
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15032MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 64.0MiB 128MiB 64.0MiB fat16 modem
2 128MiB 128MiB 0.50MiB sbl1
3 129MiB 129MiB 0.50MiB sbl1bak
4 129MiB 130MiB 1.00MiB aboot
5 130MiB 131MiB 1.00MiB abootbak
6 131MiB 131MiB 0.50MiB rpm
7 132MiB 132MiB 0.50MiB rpmbak
8 132MiB 132MiB 0.50MiB tz
9 133MiB 133MiB 0.50MiB tzbak
10 133MiB 133MiB 0.50MiB hyp
11 134MiB 134MiB 0.50MiB hypbak
12 134MiB 135MiB 1.00MiB pad
13 135MiB 136MiB 1.50MiB modemst1
14 137MiB 138MiB 1.50MiB modemst2
15 138MiB 139MiB 1.00MiB misc
16 139MiB 139MiB 0.00MiB fsc
17 139MiB 139MiB 0.01MiB ssd
18 139MiB 149MiB 10.0MiB splash
19 192MiB 192MiB 0.03MiB DDR
20 192MiB 194MiB 1.50MiB fsg
21 194MiB 194MiB 0.02MiB sec
22 194MiB 226MiB 32.0MiB boot
23 226MiB 1250MiB 1024MiB system
24 1250MiB 1570MiB 320MiB cache
25 1570MiB 1602MiB 32.0MiB ext4 persist
26 1602MiB 1634MiB 32.0MiB recovery
27 1664MiB 1664MiB 0.50MiB keystore
28 1665MiB 1665MiB 0.03MiB config
29 1665MiB 1729MiB 64.0MiB oem
30 1792MiB 15032MiB 13240MiB userdata
(parted) rm 30
rm 30
(parted) p
p
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15032MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 64.0MiB 128MiB 64.0MiB fat16 modem
2 128MiB 128MiB 0.50MiB sbl1
3 129MiB 129MiB 0.50MiB sbl1bak
4 129MiB 130MiB 1.00MiB aboot
5 130MiB 131MiB 1.00MiB abootbak
6 131MiB 131MiB 0.50MiB rpm
7 132MiB 132MiB 0.50MiB rpmbak
8 132MiB 132MiB 0.50MiB tz
9 133MiB 133MiB 0.50MiB tzbak
10 133MiB 133MiB 0.50MiB hyp
11 134MiB 134MiB 0.50MiB hypbak
12 134MiB 135MiB 1.00MiB pad
13 135MiB 136MiB 1.50MiB modemst1
14 137MiB 138MiB 1.50MiB modemst2
15 138MiB 139MiB 1.00MiB misc
16 139MiB 139MiB 0.00MiB fsc
17 139MiB 139MiB 0.01MiB ssd
18 139MiB 149MiB 10.0MiB splash
19 192MiB 192MiB 0.03MiB DDR
20 192MiB 194MiB 1.50MiB fsg
21 194MiB 194MiB 0.02MiB sec
22 194MiB 226MiB 32.0MiB boot
23 226MiB 1250MiB 1024MiB system
24 1250MiB 1570MiB 320MiB cache
25 1570MiB 1602MiB 32.0MiB ext4 persist
26 1602MiB 1634MiB 32.0MiB recovery
27 1664MiB 1664MiB 0.50MiB keystore
28 1665MiB 1665MiB 0.03MiB config
29 1665MiB 1729MiB 64.0MiB oem
30 1792MiB 15032MiB 13240MiB userdata
(parted) q
q
Information: You may need to update /etc/fstab.
~ # parted /dev/block/mmcblk0p30
Error: Could not stat device /dev/block/mmcblk0p30 - No such file or directory.
Retry/Cancel? C
C
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 67.1MB 134MB 67.1MB fat16 modem
2 134MB 135MB 524kB sbl1
3 135MB 135MB 524kB sbl1bak
4 135MB 136MB 1049kB aboot
5 136MB 137MB 1049kB abootbak
6 137MB 138MB 524kB rpm
7 138MB 138MB 524kB rpmbak
8 138MB 139MB 524kB tz
9 139MB 139MB 524kB tzbak
10 139MB 140MB 524kB hyp
11 140MB 141MB 524kB hypbak
12 141MB 142MB 1049kB pad
13 142MB 143MB 1573kB modemst1
14 143MB 145MB 1573kB modemst2
15 145MB 146MB 1049kB misc
16 146MB 146MB 1024B fsc
17 146MB 146MB 8192B ssd
18 146MB 156MB 10.5MB splash
19 201MB 201MB 32.8kB DDR
20 201MB 203MB 1573kB fsg
21 203MB 203MB 16.4kB sec
22 203MB 237MB 33.6MB boot
23 237MB 1310MB 1074MB system
24 1310MB 1646MB 336MB cache
25 1646MB 1679MB 33.6MB ext4 persist
26 1679MB 1713MB 33.6MB recovery
27 1745MB 1745MB 524kB keystore
28 1745MB 1745MB 32.8kB config
29 1745MB 1812MB 67.1MB oem
30 1879MB 15.8GB 13.9GB userdata
(parted)
Click to expand...
Click to collapse
Do you know Iif it is possible to clean all disk and I can recreate /system, /cache, /persist, /firmware and /data partitions?
jriosa said:
This is my commands and my point mounts are
I see a new error
maybe the first partition I think is OK
Do you know Iif it is possible to clean all disk and I can recreate /system, /cache, /persist, /firmware and /data partitions?
Click to expand...
Click to collapse
Yes, you can recreate all the partitions and can even resize the system and data partitions. Head over to this link https://forum.xda-developers.com/redmi-2/how-to/wt88047-redmi-2-resize-partition-t3612933

broken partition table, please help - newbie

Hi, I recently decided to dust off my old nexus 10 and install a current version of android on it. With some guides I unlocked the bootloader, installed TWRP, installed AOSP Android 9.0 Pie and then when I wanted to install open gapps I got an not enough space error. After some searching I found a post with a repit file, which should automatically increase the size of my system partition. Unfortunatelly while this repit thing was running the display flickered for a second and the resize failed. (Stupid as I am I didnt make screenshot of the error :/) I think the screen flickering thing is a hardware problem, as it did this even without cutum recovery/rom from time to time. But i always thought it was only a problem with the the screen backlight, as it had no impact on any running software before. (I replaced the battery now to maybe fix this.) But my main problem now is, that TWRP cant mount any partitions. I think the partition table is broken.
fdisk -l doesnt output anything
fdisk -l /dev/block/mmcblk0
Code:
warning: GPT array CRC is invalid
Found valid GPT with protective MBR; using GPT
Disk mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 52444e41-494f-2044-4d4d-43204449534b
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 8192 49151 20.0M 0700 efs
2 49152 65535 8192K 0700 param
3 65536 98303 16.0M 0700 boot
4 98304 163711 31.9M 0700 recovery
5 163712 163839 65536 0700 metadata
6 163840 172031 4096K 0700 misc
7 172032 376831 100M 0700 cache
8 2301952 2826239 256M 0700
9 2891776 61063167 27.7G 0700 userdata
I think 8 should be the corrupted system partition. But isnt there also "data" missing?
Should I resize 8 to 376832 - 2891775 and fix the missing name?
ls /dev/block
Code:
loop0 loop5 mmcblk0boot1 ram11 ram2 ram7
loop1 loop6 platform ram12 ram3 ram8
loop2 loop7 ram0 ram13 ram4 ram9
loop3 mmcblk0 ram1 ram14 ram5 zram0
loop4 mmcblk0boot0 ram10 ram15 ram6
There mmcblk0p7, mmcblk0p8, etc. are missing. How can I fix this?
Can someone help me please? I dont want to break it even further :/
I think I solved it. I downloaded the factory image and ran flash-all. Now the stock rom is running again and I can try flashing a custom rom again.

Categories

Resources