[DEV][R&D] FW & Partition Tables (Here!) - Windows Phone 8 Development and Hacking

I'm working on a project doing Firmware/Bootloader analysis and documentation.
This will eventually be crucially important in providing service, repair and
unbricking of these device. And if you think that these will not soft-brick,
just remember that the OS have "Windows" in it's name...
However, this project requires detailed knowledge of the following two components:
Bootloader & Firmware files
Partition Table
To make things more simple for this project, I have chosen to only focus on devices using the Qualcomm
Snapdragon S4 Plus/Pro processors, these are also known as the MSM8960, MSM8960T and MSM8930.
So if you have any of the devices shown in the list below, please try to extract and post these details,
when and if they become available. (I recommend using Sendspace to upload large files.)
Code:
[SIZE=2]HTC Windows Phone 8X LTE ADR6990 Verizon
HTC Windows Phone 8X LTE
Nokia Lumia 820 (Nokia Arrow)
Nokia Lumia 820.2 (Nokia Arrow)
Nokia Lumia 822 (Nokia Atlas) Verizon
Nokia Lumia 920 (Nokia Phi)
Nokia Lumia 920.2 (Nokia Phi)
Samsung GT-i8750 Ativ S 16GB (Samsung Odyssey)
Samsung GT-i8750 Ativ S 32GB (Samsung Odyssey)[/SIZE]
[Obtained from the PDAdb web site.]
This list is in no way exhaustive, and it may be very likely that you have another device or still using
Windows Phone 7 (?) with that same processor. That would also be interesting. Another thing that may
be very useful, is documentation related to the Windows Phone build structure.
The results of this project will be published here and will benefit the development community
in several different ways.
Please do not post any general unrelated questions here, they will be removed.
And I will not answer to any support related PM's.
Thanks in advance.

< Here Be Snap ! Dragons >

Good start .. E.V.A have u trued to contact Cotulla on htc-linux or DFT team. They might have something that might interest you . I'll post once i grab my hands on them.
Sent from my GT-I9300 using xda premium

If someone has a working Windows Phone 8, and if at all possible, please follow these instructions to dump the partition tables. As you're on a windows phone, you may need to connect it to a linux based PC, to get these...

Hi, I am in possession of an HTC 8X engineering unit (see here http://forum.xda-developers.com/showthread.php?t=1966327). How can I help? Someone on my thread suggested that I should post here.

Hi! Yes, you could be of great help, if you could provide the partition tables from that device. I know it's politically incorrect to ask you to use a linux tool for doing this, but that is (probably) the only way it will be useful, as you cannot trust native windows partition information...
The way to do it, is by connecting your WP to a linux computer or possibly by using some linux distribution under a virtual machine (VirtualBox, VMware etc.) Then follow the instructions found here.
Thanks in advance.

8X Partition table
Hello. Also have a 8X engineering unit. This is the Partition Info:
Code:
# fdisk -l /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 15.6 GB, 15634268160 bytes
1 heads, 32 sectors/track, 954240 cylinders
Units = cylinders of 32 * 512 = 16384 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 444417 7110656 ee GPT
Partition 1 does not end on cylinder boundary.
# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Qualcomm MMC Storage (scsi)
Disk /dev/sdb: 15,6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 62,9MB 61,9MB pg1fs
2 62,9MB 66,1MB 3146kB MODEM_FSG
3 66,1MB 67,1MB 1049kB board_info
4 67,1MB 75,5MB 8389kB DPP
5 75,5MB 77,6MB 2097kB SSD
6 77,6MB 78,6MB 1049kB SBL1
7 78,6MB 79,7MB 1049kB SBL2
8 79,7MB 81,8MB 2097kB SBL3
9 81,8MB 83,9MB 2097kB UEFI
10 83,9MB 84,9MB 1049kB RPM
11 84,9MB 86,0MB 1049kB TZ
12 86,0MB 87,0MB 1049kB WINSECAPP
13 87,0MB 88,1MB 1049kB BACKUP_SBL1
14 88,1MB 89,1MB 1049kB BACKUP_SBL2
15 89,1MB 91,2MB 2097kB BACKUP_SBL3
16 91,2MB 93,3MB 2097kB BACKUP_UEFI
17 93,3MB 94,4MB 1049kB BACKUP_RPM
18 94,4MB 95,4MB 1049kB BACKUP_TZ
19 95,4MB 96,5MB 1049kB BACKUP_WINSECAPP
20 96,5MB 138MB 41,9MB RADIO
21 138MB 139MB 262kB UEFI_BS_NV
22 139MB 140MB 262kB UEFI_NV
23 141MB 149MB 8389kB PLAT
24 149MB 192MB 43,0MB fat16 EFIESP
25 192MB 193MB 1049kB pg2fs
26 193MB 194MB 1049kB RFG_0
27 194MB 195MB 1049kB RFG_1
28 195MB 196MB 1049kB RFG_2
29 196MB 197MB 1049kB RFG_3
30 197MB 198MB 1049kB RFG_4
31 198MB 199MB 1049kB RFG_5
32 199MB 200MB 1049kB RFG_6
33 200MB 201MB 1049kB RFG_7
34 201MB 202MB 1049kB RFG_8
35 202MB 207MB 4194kB MODEM_FS1
36 207MB 211MB 4194kB MODEM_FS2
37 211MB 211MB 262kB UEFI_RT_NV
38 212MB 212MB 131kB UEFI_RT_NV_RPMB
39 213MB 214MB 1049kB MFG
40 214MB 215MB 1049kB MISC
41 215MB 228MB 13,4MB fat16 MMOS
42 235MB 2698MB 2463MB ntfs MainOS
43 2698MB 5114MB 2416MB fat32 CrashDump
44 5117MB 15,6GB 10,5GB ntfs Data
(parted) q
# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.5
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 30535680 sectors, 14.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): AE420040-13DD-41F2-AE7F-0DC35854C8D7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30535646
Partitions will be aligned on 2048-sector boundaries
Total free space is 27687 sectors (13.5 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 122879 59.0 MiB FFFF pg1fs
2 122880 129023 3.0 MiB FFFF MODEM_FSG
3 129024 131071 1024.0 KiB FFFF board_info
4 131072 147455 8.0 MiB 0700 DPP
5 147456 151551 2.0 MiB FFFF SSD
6 151552 153599 1024.0 KiB FFFF SBL1
7 153600 155647 1024.0 KiB FFFF SBL2
8 155648 159743 2.0 MiB FFFF SBL3
9 159744 163839 2.0 MiB FFFF UEFI
10 163840 165887 1024.0 KiB FFFF RPM
11 165888 167935 1024.0 KiB FFFF TZ
12 167936 169983 1024.0 KiB FFFF WINSECAPP
13 169984 172031 1024.0 KiB FFFF BACKUP_SBL1
14 172032 174079 1024.0 KiB FFFF BACKUP_SBL2
15 174080 178175 2.0 MiB FFFF BACKUP_SBL3
16 178176 182271 2.0 MiB FFFF BACKUP_UEFI
17 182272 184319 1024.0 KiB FFFF BACKUP_RPM
18 184320 186367 1024.0 KiB FFFF BACKUP_TZ
19 186368 188415 1024.0 KiB FFFF BACKUP_WINSECAPP
20 188416 270335 40.0 MiB FFFF RADIO
21 270336 270847 256.0 KiB FFFF UEFI_BS_NV
22 272384 272895 256.0 KiB FFFF UEFI_NV
23 274432 290815 8.0 MiB FFFF PLAT
24 290816 374783 41.0 MiB 0700 EFIESP
25 374784 376831 1024.0 KiB FFFF pg2fs
26 376832 378879 1024.0 KiB FFFF RFG_0
27 378880 380927 1024.0 KiB FFFF RFG_1
28 380928 382975 1024.0 KiB FFFF RFG_2
29 382976 385023 1024.0 KiB FFFF RFG_3
30 385024 387071 1024.0 KiB FFFF RFG_4
31 387072 389119 1024.0 KiB FFFF RFG_5
32 389120 391167 1024.0 KiB FFFF RFG_6
33 391168 393215 1024.0 KiB FFFF RFG_7
34 393216 395263 1024.0 KiB FFFF RFG_8
35 395264 403455 4.0 MiB FFFF MODEM_FS1
36 403456 411647 4.0 MiB FFFF MODEM_FS2
37 411648 412159 256.0 KiB FFFF UEFI_RT_NV
38 413696 413951 128.0 KiB FFFF UEFI_RT_NV_RPMB
39 415744 417791 1024.0 KiB FFFF MFG
40 417792 419839 1024.0 KiB FFFF MISC
41 419840 446031 12.8 MiB 0700 MMOS
42 458752 5269094 2.3 GiB 0700 MainOS
43 5269504 9988095 2.2 GiB 0700 CrashDump
44 9994240 30535646 9.8 GiB 0700 Data
#

^^ Very nice!
Also for everybody's information. I was looking into one of the FFU files of the WP7 (?) Nokia Lumina 800 (RM-801), and it appears that hidden partitions (or mounts) are set in a registry key...
Code:
[SIZE=2][HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC\IMGFS]
"MountHidden"=dword:1
"MountAsROM"=dword:1
"XIP"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory\IMGFS]
"MountHidden"=dword:1
"MountAsROM"=dword:1
"XIP"=dword:0
[HKEY_LOCAL_MACHINE\Drivers\BlockDevice\UniBlk]
"InternalStoreProfile"="MMC"
"InternalPartitionType"=dword:4[/SIZE]
and that the write protection is set by these registry items:
Code:
[SIZE=2][HKEY_LOCAL_MACHINE\System\StorageManager\WMPART\WriteProtectRegions\Region1]
"StartSector"=dword:0
"SectorCount"=dword:60000
[HKEY_LOCAL_MACHINE\System\StorageManager\WMPART]
"EnableHardwareWriteProtection"=dword:1
"PadAlignment"=dword:10000[/SIZE]
of course I could be wrong, since there are loads of similar items in there.
But it will perhaps help someone finding out where to look.

Related

How to mount the root filesystem in twrp recovery?

Sorry for this perhaps dumb question and I'm sure it was answered anywhere but searching for "mount root recovery" lists everything to root the device. Last time I need to do this was on my HTC Desire with that S-ON
Ok, but for the backgrounds:
I am running CM13 (rooted of cource) and I need to tweak /init.cm.rc startup script.
When doing this while running CM13 (/ filesystem mounted rw) any changes are gone after reboot.
So how can I do this?
My first thought was: Edit while in recovery. But in TWRP (3.0) the root filesystem isn't mounted - so how can I mount it?
Or on which partition is it located?
Thanks in advance!
Code:
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 44 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 16384 180223 80.0M 0700 modem
2 180224 182271 1024K 0700 sbl1
3 182272 182463 98304 0700 sdi
4 182464 184511 1024K 0700 tz
5 184512 185511 500K 0700 rpm
6 185512 186535 512K 0700 hyp
7 186536 186791 128K 0700 pmic
8 186792 188839 1024K 0700 DDR
9 188840 189095 128K 0700 sec
10 189096 197855 4380K 0700 aboot
11 197856 198111 128K 0700 pmicbak
12 198112 200159 1024K 0700 sbl1bak
13 200160 202207 1024K 0700 tzbak
14 202208 203207 500K 0700 rpmbak
15 203208 204231 512K 0700 hypbak
16 204232 212991 4380K 0700 abootbak
17 212992 212993 1024 0700 devinfo
18 229376 237567 4096K 0700 fsg
19 245760 245761 1024 0700 limits
20 262144 270335 4096K 0700 modemst1
21 270336 278527 4096K 0700 modemst2
22 278528 279039 256K 0700 apdp
23 279040 279551 256K 0700 msadp
24 279552 280063 256K 0700 keymaster
25 280064 280575 256K 0700 cmnlib
26 280576 281087 256K 0700 keymasterbak
27 281088 281599 256K 0700 cmnlibbak
28 281600 281601 1024 0700 dpo
29 281602 281603 1024 0700 fsc
30 281604 281619 8192 0700 ssd
31 281620 294911 6646K 0700 oeminfo
32 294912 311295 8192K 0700 persist
33 311296 344063 16.0M 0700 metadata
34 344064 409599 32.0M 0700 boot
35 409600 475135 32.0M 0700 recovery
36 475136 606207 64.0M 0700 oem
37 606208 1015807 200M 0700 vendor
38 1015808 1220607 100M 0700 cache
39 1220608 1222655 1024K 0700 misc
40 1222656 1223679 512K 0700 keystore
41 1223680 1224703 512K 0700 frp
42 1224704 1225703 500K 0700 persistent
43 1225704 7517159 3072M 0700 system
44 7517160 61071326 25.5G 0700 userdata
markusmuster said:
Sorry for this perhaps dumb question and I'm sure it was answered anywhere but searching for "mount root recovery" lists everything to root the device. Last time I need to do this was on my HTC Desire with that S-ON
Ok, but for the backgrounds:
I am running CM13 (rooted of cource) and I need to tweak /init.cm.rc startup script.
When doing this while running CM13 (/ filesystem mounted rw) any changes are gone after reboot.
So how can I do this?
My first thought was: Edit while in recovery. But in TWRP (3.0) the root filesystem isn't mounted - so how can I mount it?
Or on which partition is it located?
Thanks in advance!
Code:
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 44 entries
First usable sector is 34, last usable sector is 61071326
Click to expand...
Click to collapse
sorry but init.cm.rc is a RAMDISK file... that means you need to change it in the boot.img .... so you will need to compile a new boot.img with your changes or use android image kitchen... but i warn you... playing with boot.img is for devs so dont do mistakes in there!
Sent from my Xperia T using XDA Free mobile app
Thanks for the information. Already guesses that.
Yesterday I saw somewhere in the init scripts that there was a Cyan-test for a user script. I will investigate this.

[INFO] Partition tables of any G4 model

About
This is just a reference of all GPTs of any G4 model compared to LS991 made for me but maybe useful for others, too.
I have choosen the LS991 as the main GPT here bc I needed all this for my unofficial unlock.
The comparison was made on every single column and so I list only the differences for the other models.
If you miss one lemme know and I will add it here.
Big thanks to: https://www.diffchecker.com/diff
LS991
Code:
Number Start (sector) End (sector) Size Code Name
1 32768 208895 86.0 MiB 0700 modem
2 229376 230399 512.0 KiB FFFF pmic
3 230400 232447 1024.0 KiB FFFF sbl1
4 232448 234495 1024.0 KiB FFFF tz
5 234496 235519 512.0 KiB FFFF sdi
6 235520 236543 512.0 KiB FFFF hyp
7 236544 237567 512.0 KiB FFFF rpm
8 237568 241663 2.0 MiB FFFF aboot
9 241664 243711 1024.0 KiB FFFF sbl1bak
10 243712 244735 512.0 KiB FFFF pmicbak
11 244736 246783 1024.0 KiB FFFF tzbak
12 246784 247807 512.0 KiB FFFF hypbak
13 247808 248831 512.0 KiB FFFF rpmbak
14 248832 252927 2.0 MiB FFFF abootbak
15 252928 253951 512.0 KiB FFFF sdibak
16 253952 254975 512.0 KiB FFFF limits
17 254976 255999 512.0 KiB FFFF devinfo
18 256000 257023 512.0 KiB FFFF apdp
19 257024 258047 512.0 KiB FFFF msadp
20 258048 259071 512.0 KiB FFFF dpo
21 259072 262143 1.5 MiB FFFF spare1
22 262144 294911 16.0 MiB FFFF misc
23 294912 360447 32.0 MiB FFFF persist
24 360448 363519 1.5 MiB FFFF modemst1
25 363520 366591 1.5 MiB FFFF modemst2
26 366592 369663 1.5 MiB FFFF fsg
27 369664 370687 512.0 KiB FFFF fsc
28 370688 371711 512.0 KiB FFFF ssd
29 371712 372735 512.0 KiB FFFF keystore
30 372736 376831 2.0 MiB FFFF DDR
31 376832 377855 512.0 KiB FFFF sec
32 377856 378879 512.0 KiB FFFF encrypt
33 378880 379903 512.0 KiB FFFF eksst
34 379904 380927 512.0 KiB FFFF rct
35 380928 385023 2.0 MiB 0700 persistent
36 385024 393215 4.0 MiB FFFF spare2
37 393216 491519 48.0 MiB FFFF laf
38 491520 573439 40.0 MiB FFFF boot
39 573440 655359 40.0 MiB FFFF recovery
40 655360 671743 8.0 MiB 0700 drm
41 671744 688127 8.0 MiB 0700 sns
42 688128 753663 32.0 MiB 0700 mpt
43 753664 770047 8.0 MiB 0700 eri
44 770048 778239 4.0 MiB FFFF raw_resources
45 778240 786431 4.0 MiB FFFF raw_resourcesbak
46 786432 819199 16.0 MiB 0700 operatorlogging
47 819200 901119 40.0 MiB 0700 carrier
48 901120 917503 8.0 MiB 0700 felica
49 917504 1011711 46.0 MiB FFFF factory
50 1011712 1015807 2.0 MiB FFFF spare3
51 1015808 1036287 10.0 MiB FFFF fota
52 1036288 1048575 6.0 MiB FFFF spare4
53 1048576 9965567 4.3 GiB FFFF system
54 9965568 12488703 1.2 GiB FFFF cache
55 12488704 61046783 23.2 GiB FFFF userdata
56 61046784 61071326 12.0 MiB 0700 grow
F500
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H810 PR <-- !!! (not "regular" H810)
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
<same as for [I][B]H815[/B][/I]>
H810
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 10321919 4.4 GiB FFFF system
54 10321920 12845055 1.2 GiB FFFF cache
55 12845056 61046783 23.0 GiB FFFF userdata
H811
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H812
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H815
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
LS991: p43 753664 770047 8.0 MiB 0700 eri
H815: p43 753664 847871 46.0 MiB FFFF factory
LS991: p44 770048 778239 4.0 MiB FFFF raw_resources
H815: p44 847872 868351 10.0 MiB FFFF fota
LS991: p45 778240 786431 4.0 MiB FFFF raw_resourcesbak
H815: p45 868352 876543 4.0 MiB FFFF raw_resources
LS991: p46 786432 819199 16.0 MiB 0700 operatorlogging
H815: p46 876544 884735 4.0 MiB FFFF raw_resourcesbak
LS991: p47 819200 901119 40.0 MiB 0700 carrier
H815: p47 884736 9363455 4.0 GiB FFFF system
LS991: p48 901120 917503 8.0 MiB 0700 felica
H815: p48 9363456 9887743 256.0 MiB 0700 cust
LS991: p49 917504 1011711 46.0 MiB FFFF factory
H815: p49 9895936 12419071 1.2 GiB FFFF cache
LS991: p50 1011712 1015807 2.0 MiB FFFF spare3
H815: p50 12419072 61046783 23.2 GiB FFFF userdata
LS991: p51 1015808 1036287 10.0 MiB FFFF fota
H815: p51 61046784 61071326 12.0 MiB 0700 grow
LS991: p52 1036288 1048575 6.0 MiB FFFF spare4
LS991: p53 1048576 9965567 4.3 GiB FFFF system
LS991: p54 9965568 12488703 1.2 GiB FFFF cache
LS991: p55 12488704 61046783 23.2 GiB FFFF userdata
LS991: p56 61046784 61071326 12.0 MiB 0700 grow
H818 (LP firmware)
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H818 (MM fimware)
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
43 753664 847871 46.0 MiB FFFF factory
44 847872 868351 10.0 MiB FFFF fota
45 868352 876543 4.0 MiB FFFF raw_resources
46 876544 884735 4.0 MiB FFFF raw_resourcesbak
47 884736 9363455 4.0 GiB FFFF system
48 9363456 9887743 256.0 MiB 0700 cust
49 9895936 12419071 1.2 GiB FFFF cache
50 12419072 61046783 23.2 GiB FFFF userdata
51 61046784 61071326 12.0 MiB 0700 grow
H819
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
US991
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
VS986
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
TL;DR
Basically this means:
H810-PR (not regular H810) and H815 have the same GPT and that one is very different from the others
F500, H810, H811, H812, H815, H818, H819, US991, VS986 have the same GPT and near the same as the LS991 (which differs just in a slightly bigger system partition and slightly smaller cache one which results in 3 partition changes due to the sector change). This means you could handle all these models as the same when it comes to custom ROM flashing.
reserved.
Great information! Thanks for taking the time to put it together!
Educate me about this command. dd if=/data/media/0/system002.img bs=8192 seek=65536 c
steadfasterX said:
About
This is just a reference of all GPTs of any G4 model compared to LS991 made for me but maybe useful for others, too.
I have choosen the LS991 as the main GPT here bc I needed all this for my unofficial unlock.
The comparison was made on every single column and so I list only the differences for the other models.
If you miss one lemme know and I will add it here.
Big thanks to: https://www.diffchecker.com/diff
LS991
Code:
Number Start (sector) End (sector) Size Code Name
1 32768 208895 86.0 MiB 0700 modem
2 229376 230399 512.0 KiB FFFF pmic
3 230400 232447 1024.0 KiB FFFF sbl1
4 232448 234495 1024.0 KiB FFFF tz
5 234496 235519 512.0 KiB FFFF sdi
6 235520 236543 512.0 KiB FFFF hyp
7 236544 237567 512.0 KiB FFFF rpm
8 237568 241663 2.0 MiB FFFF aboot
9 241664 243711 1024.0 KiB FFFF sbl1bak
10 243712 244735 512.0 KiB FFFF pmicbak
11 244736 246783 1024.0 KiB FFFF tzbak
12 246784 247807 512.0 KiB FFFF hypbak
13 247808 248831 512.0 KiB FFFF rpmbak
14 248832 252927 2.0 MiB FFFF abootbak
15 252928 253951 512.0 KiB FFFF sdibak
16 253952 254975 512.0 KiB FFFF limits
17 254976 255999 512.0 KiB FFFF devinfo
18 256000 257023 512.0 KiB FFFF apdp
19 257024 258047 512.0 KiB FFFF msadp
20 258048 259071 512.0 KiB FFFF dpo
21 259072 262143 1.5 MiB FFFF spare1
22 262144 294911 16.0 MiB FFFF misc
23 294912 360447 32.0 MiB FFFF persist
24 360448 363519 1.5 MiB FFFF modemst1
25 363520 366591 1.5 MiB FFFF modemst2
26 366592 369663 1.5 MiB FFFF fsg
27 369664 370687 512.0 KiB FFFF fsc
28 370688 371711 512.0 KiB FFFF ssd
29 371712 372735 512.0 KiB FFFF keystore
30 372736 376831 2.0 MiB FFFF DDR
31 376832 377855 512.0 KiB FFFF sec
32 377856 378879 512.0 KiB FFFF encrypt
33 378880 379903 512.0 KiB FFFF eksst
34 379904 380927 512.0 KiB FFFF rct
35 380928 385023 2.0 MiB 0700 persistent
36 385024 393215 4.0 MiB FFFF spare2
37 393216 491519 48.0 MiB FFFF laf
38 491520 573439 40.0 MiB FFFF boot
39 573440 655359 40.0 MiB FFFF recovery
40 655360 671743 8.0 MiB 0700 drm
41 671744 688127 8.0 MiB 0700 sns
42 688128 753663 32.0 MiB 0700 mpt
43 753664 770047 8.0 MiB 0700 eri
44 770048 778239 4.0 MiB FFFF raw_resources
45 778240 786431 4.0 MiB FFFF raw_resourcesbak
46 786432 819199 16.0 MiB 0700 operatorlogging
47 819200 901119 40.0 MiB 0700 carrier
48 901120 917503 8.0 MiB 0700 felica
49 917504 1011711 46.0 MiB FFFF factory
50 1011712 1015807 2.0 MiB FFFF spare3
51 1015808 1036287 10.0 MiB FFFF fota
52 1036288 1048575 6.0 MiB FFFF spare4
53 1048576 9965567 4.3 GiB FFFF system
54 9965568 12488703 1.2 GiB FFFF cache
55 12488704 61046783 23.2 GiB FFFF userdata
56 61046784 61071326 12.0 MiB 0700 grow
F500
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H810 PR <-- !!! (not "regular" H810)
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
<same as for [I][B]H815[/B][/I]>
H810
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 10321919 4.4 GiB FFFF system
54 10321920 12845055 1.2 GiB FFFF cache
55 12845056 61046783 23.0 GiB FFFF userdata
H811
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H812
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H815
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
LS991: p43 753664 770047 8.0 MiB 0700 eri
H815: p43 753664 847871 46.0 MiB FFFF factory
LS991: p44 770048 778239 4.0 MiB FFFF raw_resources
H815: p44 847872 868351 10.0 MiB FFFF fota
LS991: p45 778240 786431 4.0 MiB FFFF raw_resourcesbak
H815: p45 868352 876543 4.0 MiB FFFF raw_resources
LS991: p46 786432 819199 16.0 MiB 0700 operatorlogging
H815: p46 876544 884735 4.0 MiB FFFF raw_resourcesbak
LS991: p47 819200 901119 40.0 MiB 0700 carrier
H815: p47 884736 9363455 4.0 GiB FFFF system
LS991: p48 901120 917503 8.0 MiB 0700 felica
H815: p48 9363456 9887743 256.0 MiB 0700 cust
LS991: p49 917504 1011711 46.0 MiB FFFF factory
H815: p49 9895936 12419071 1.2 GiB FFFF cache
LS991: p50 1011712 1015807 2.0 MiB FFFF spare3
H815: p50 12419072 61046783 23.2 GiB FFFF userdata
LS991: p51 1015808 1036287 10.0 MiB FFFF fota
H815: p51 61046784 61071326 12.0 MiB 0700 grow
LS991: p52 1036288 1048575 6.0 MiB FFFF spare4
LS991: p53 1048576 9965567 4.3 GiB FFFF system
LS991: p54 9965568 12488703 1.2 GiB FFFF cache
LS991: p55 12488704 61046783 23.2 GiB FFFF userdata
LS991: p56 61046784 61071326 12.0 MiB 0700 grow
H818 (LP firmware)
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
H818 (MM fimware)
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
43 753664 847871 46.0 MiB FFFF factory
44 847872 868351 10.0 MiB FFFF fota
45 868352 876543 4.0 MiB FFFF raw_resources
46 876544 884735 4.0 MiB FFFF raw_resourcesbak
47 884736 9363455 4.0 GiB FFFF system
48 9363456 9887743 256.0 MiB 0700 cust
49 9895936 12419071 1.2 GiB FFFF cache
50 12419072 61046783 23.2 GiB FFFF userdata
51 61046784 61071326 12.0 MiB 0700 grow
H819
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
US991
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
VS986
DIFFERENCE (compared: number, start, end, size, name) TO LS991:
Code:
Number Start (sector) End (sector) Size Code Name
53 1048576 9822207 4.2 GiB FFFF system
54 9822208 12345343 1.2 GiB FFFF cache
55 12345344 61046783 23.2 GiB FFFF userdata
TL;DR
Basically this means:
H810-PR (not regular H810) and H815 have the same GPT and that one is very different from the others
F500, H810, H811, H812, H815, H818, H819, US991, VS986 have the same GPT and near the same as the LS991 (which differs just in a slightly bigger system partition and slightly smaller cache one which results in 3 partition changes due to the sector change). This means you could handle all these models as the same when it comes to custom ROM flashing.
Click to expand...
Click to collapse
Sorry my text is quite long but please read on, :silly:
Hello dev, you probably have another device by now but, i believe you are still the expert when it comes to the numerous models of the g4. I have been following your work closely and have benefitted from it.
Background
I got an h811 which turned out to be an Ls991 upon disassembly, with ARB=4 confirmed by SALT+FWUL combo. With that disadvantageous ARB in mind, i never attempted to USU it. The only thing i could do with SALT at this point was to backup all partitions.... and that went well, in fact easy peesy using the built in salt backup option.
Having backed up my .imgs, i now wondered how to please the playful monkey in me :laugh: so i grabbed a ZVD.tot file from google because because SALT was able to tell me ZVD was the original firmware this frankenstein was running. The lgup flash went butter smooth and booted with no problems.... well almost. The sprint g4 conjured a network lock which proved non-removable even with gsm boxes. (i think this is why someone had installed an h811 system on this device) So i remembered i had my salt backup of the "h811 system.img" . I looked for all possible ways of restoring the network unlocked h811.img but non seemed to work. There has never been a fastboot mode on this device even during in its frankenstein days (even before i De-frankenstein-ed it :laugh no root, and bootloader is locked i guess. But i kept wondering how did they install that h811 system image with a locked bootloader? i tried developer modes of LGUP, uppercut, to flash a specific system partition of the h811 on my ls991 but always failed at at the very start the invalid dll or unknown device but mostly the invalid dlls. Then finally i landed on this command dd if=/data/media/0/system.rooted.LS991ZV5.img bs=8192 seek=65536 count=557312 of=/dev/block/mmcblk0 from this post https://forum.xda-developers.com/g4/orig-development/root-tmo-vzw-intl-variants-soon-root-lg-t3164765 but replaced the rooted.LS991ZV5.img with my system.img i had backed up with salt (because i was scared of bricking ZVD firmware with a ZV6 system image) and boom my device booted t-mobile without network lock. That was the background now here is the main reason i need guidance,
Actual querry
am not an expert developer, help me understand what the numbers in that command represent on the ls991 model as the linked post clearely warns that those numbers in the code are model specific. I am thinking of using the same trick to push my own modified images such as patched boot images , and maybe recoverys since i have no way of USUing this ARB=4 frankenstein. At first i thought those figures represent partition sectors but while doing my research, i landed on this g4 partition sector comparison post of yours and my theory got debunked.! Am confused what those numbers represent? Help me generate a command or modify the above comand to push boot, and recovery.
My frankenstein is working properly, though i still dont have root or bootloader acces. My download mode is working well and fortunately accepts commands from SALT>advanced menu>shell. Its the only way i figured out to send commands since my fastboot is disabled and my BL is locked. THANKS ONCE AGAIN.
AGABAJOSHUA said:
Sorry my text is quite long but please read on, :silly:
Hello dev, you probably have another device by now but, i believe you are still the expert when it comes to the numerous models of the g4. I have been following your work closely and have benefitted from it.
Background
I got an h811 which turned out to be an Ls991 upon disassembly, with ARB=4 confirmed by SALT+FWUL combo. With that disadvantageous ARB in mind, i never attempted to USU it. The only thing i could do with SALT at this point was to backup all partitions.... and that went well, in fact easy peesy using the built in salt backup option.
Having backed up my .imgs, i now wondered how to please the playful monkey in me :laugh: so i grabbed a ZVD.tot file from google because because SALT was able to tell me ZVD was the original firmware this frankenstein was running. The lgup flash went butter smooth and booted with no problems.... well almost. The sprint g4 conjured a network lock which proved non-removable even with gsm boxes. (i think this is why someone had installed an h811 system on this device) So i remembered i had my salt backup of the "h811 system.img" . I looked for all possible ways of restoring the network unlocked h811.img but non seemed to work. There has never been a fastboot mode on this device even during in its frankenstein days (even before i De-frankenstein-ed it :laugh no root, and bootloader is locked i guess. But i kept wondering how did they install that h811 system image with a locked bootloader? i tried developer modes of LGUP, uppercut, to flash a specific system partition of the h811 on my ls991 but always failed at at the very start the invalid dll or unknown device but mostly the invalid dlls. Then finally i landed on this command dd if=/data/media/0/system.rooted.LS991ZV5.img bs=8192 seek=65536 count=557312 of=/dev/block/mmcblk0 from this post https://forum.xda-developers.com/g4/orig-development/root-tmo-vzw-intl-variants-soon-root-lg-t3164765 but replaced the rooted.LS991ZV5.img with my system.img i had backed up with salt (because i was scared of bricking ZVD firmware with a ZV6 system image) and boom my device booted t-mobile without network lock. That was the background now here is the main reason i need guidance,
Actual querry
am not an expert developer, help me understand what the numbers in that command represent on the ls991 model as the linked post clearely warns that those numbers in the code are model specific. I am thinking of using the same trick to push my own modified images such as patched boot images , and maybe recoverys since i have no way of USUing this ARB=4 frankenstein. At first i thought those figures represent partition sectors but while doing my research, i landed on this g4 partition sector comparison post of yours and my theory got debunked.! Am confused what those numbers represent? Help me generate a command or modify the above comand to push boot, and recovery.
My frankenstein is working properly, though i still dont have root or bootloader acces. My download mode is working well and fortunately accepts commands from SALT>advanced menu>shell. Its the only way i figured out to send commands since my fastboot is disabled and my BL is locked. THANKS ONCE AGAIN.
Click to expand...
Click to collapse
oh well. first of all: it is bad practice to quote an OP or other posts which are like long a book. this makes this forum slow and unreadable.
back to your questions you should consider to read the dd manpage first: http://man7.org/linux/man-pages/man1/dd.1.html
of course you need a good understanding about filesystems as well.
so to sum up:
Code:
dd if=/data/media/0/system.rooted.LS991ZV5.img bs=8192 seek=65536 count=557312 of=/dev/block/mmcblk0
means:
Code:
skip the first 65536 * 8192 bytes of /dev/block/mmcblk0 and write system.rooted.LS991ZV5.img there
How does this comes together? To understand that above you must first understand how the REGULAR calculation would be:
EMMC devices (i.e. the LG G4) have a block size of 512 bytes and as you can see in the partition listing for the ls911 the start and end sectors are 1048576 and 9965567.
Calculate the block counts: 9965567−1048576 = 8916991 but that will not include the first sector itself as well so + 1 = 8916992
As you know that the block size is 512 bytes you can now calculate / verify the size as well: (8916992 * 512) / 1024 / 1024 = 4354 MB (i.e. 4.3 GB)
but you also got the block "count" so now you have all you need to create your own dd command depending on your specific partition table.
So in order to write at the start sector 1048576 you have to use the dd command like that:
Code:
dd if=/data/media/0/system.rooted.LS991ZV5.img bs=512 seek=1048576 count=8916992 of=/dev/block/mmcblk0
bs: default bs for EMMC devices (can also be read from the device)
seek: start sector
count: calculates as described above
so why does this command differs in bs, seek and count ? bs defines how many bytes should be written at one bunch and you can use what you like as long as it fits into the block size of the partition table.
ok but why? the answer is simple: speed. if you write bigger chunks of data it will finish faster but choosing too big ones can cause trouble and at one stage you will not have performance benefits anymore.
a good practice is to use 10 times bigger then the block size. in this case it is 16 times (8192 / 512 = 16) but that is just fine tuning and ok as well.
so back to the above example. when you change the bs value you have to change everything else as well because it influences the others. A higher bs means you need to lower the rest and the other way around.
the calculation of that choosen factor 16 would be like that:
bs=512, increasing to 8192 (512 * 16)
seek=1048576, decreasing to 65536 (1048576 / 16)
count=8916992, decreasing to 557312 (8916992 / 16)
one warning: using wrong values can even HARD brick your device. so ensure you do it right and first of all get the partition listing (SALT -> advanced menu) of your device.
have fun
.-
Thank you. It now makes sense. I now get the math.
Am happily pushing system images.
Twrp however doesn't seem to like this route. As in always end up with stock rec.
Can i just be stubborn and USU my ls991 having arb=4 ? I know this is very stupid of me and certainly guarantees me a hard brick according to what i have read on the SALT thread and FAQs.
Would you please modify SALT to be able to safely Unlock my device or have i been living under the rock and salt already does this ?
Thanks once again for your time. I know this work is hecktic. I value your time sir.
---------- Post added at 11:35 AM ---------- Previous post was at 11:32 AM ----------
AGABAJOSHUA said:
Thank you. It now makes sense. I now get the math.
Am happily pushing system images.
Twrp however doesn't seem to like this route. As in always end up with stock rec.
Can i just be stubborn and USU my ls991 having arb=4 ? I know this is very stupid of me and certainly guarantees me a hard brick according to what i have read on the SALT thread and FAQs.
Would you please modify SALT to be able to safely Unlock my device or have i been living under the rock and salt already does this ?
Thanks once again for your time. I know this work is hecktic. I value your time sir.
Click to expand...
Click to collapse
As of recent, Can i USU my device having arb=4 ? Am attracted by the liberty it brings becaise my device doesnt do fastboot either.
AGABAJOSHUA said:
Thank you. It now makes sense. I now get the math.
Am happily pushing system images.
Twrp however doesn't seem to like this route. As in always end up with stock rec.
Can i just be stubborn and USU my ls991 having arb=4 ? I know this is very stupid of me and certainly guarantees me a hard brick according to what i have read on the SALT thread and FAQs.
Would you please modify SALT to be able to safely Unlock my device or have i been living under the rock and salt already does this ?
Thanks once again for your time. I know this work is hecktic. I value your time sir.
---------- Post added at 11:35 AM ---------- Previous post was at 11:32 AM ----------
As of recent, Can i USU my device having arb=4 ? Am attracted by the liberty it brings becaise my device doesnt do fastboot either.
Click to expand...
Click to collapse
no UsU for ARB 4. it is IMPOSSIBLE.
the only tiny little chance you have (0.1%) is that you are lucky and having a non-fusing device (see http://bit.do/antirollg4 to check the ARB and if you see "nonfusing" in that menu you are one of these 0.1% and can even downgrade to lower ARB versions).
reg. TWRP: once flashed you HAVE to boot to it DIRECTLY as otherwise it will be overwritten by the system.
.-
Understood.

LG G2 bricked, partition table corrupt

Update:
Somehow, the phone came back, sort of (battery low?!), and I was able to see all partitions again.
So I tried fixing the problem by copying boot.img and laf.img to the respective partitions ... I guess you shouldn't try these things at 1:30 am after already getting yourself in a horrible mess, but here I am. Now the phone is stuck at the LG logo screen, the LED flashes green and blue, and nothing happens. All I can do is to push the power button, and the process repeats.
Naturally, I cannot see any partitions any longer. Now the device seems to be REALLY dead.
Anything I can still try?!
Original problem description
I have tried, after somehow messing things up when following the guide to install LineageOS on the LG G2 (d802, international version with 32 GB), to resurrect my phone using this guide.
However, it failed to solve my problem, and when I tried to boot, the phone still showed only the LG logo, the secure booting error, and then the screen went black, just as before. I guess I should have used dd as well to copy the boot, dbi and laf partitions.
Instead, I figured maybe I should try the TWRP Recovery v2.6.3.2 instead of either TWRP v2.8.7.3 or the LineageOS Recovery image, and that probably has been my (final) mistake. Because, before, the output from gdisk looked liked this:
Code:
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 61071360 sectors, 29.1 GiB
Model: MMC Storage
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 36 entries
Main partition table begins at sector 2 and ends at sector 10
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 2-sector boundaries
Total free space is 257992 sectors (126.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 32768 163839 64.0 MiB 0700 modem
2 163840 165887 1024.0 KiB FFFF sbl1
3 165888 166911 512.0 KiB FFFF dbi
4 196608 197631 512.0 KiB FFFF DDR
5 229376 231423 1024.0 KiB FFFF aboot
6 231424 233471 1024.0 KiB FFFF rpm
7 262144 294911 16.0 MiB FFFF boot
8 294912 296959 1024.0 KiB FFFF tz
9 296960 296961 1024 bytes 0700 pad
10 327680 333823 3.0 MiB FFFF modemst1
11 333824 339967 3.0 MiB FFFF modemst2
12 339968 339969 1024 bytes FFFF pad1
13 360448 393215 16.0 MiB FFFF misc
14 393216 458751 32.0 MiB 0700 persist
15 458752 491519 16.0 MiB FFFF recovery
16 491520 497663 3.0 MiB FFFF fsg
17 524288 525311 512.0 KiB FFFF fsc
18 525312 526335 512.0 KiB FFFF ssd
19 526336 526337 1024 bytes FFFF pad2
20 526338 527361 512.0 KiB FFFF encrypt
21 557056 573439 8.0 MiB 0700 drm
22 573440 589823 8.0 MiB 0700 sns
23 589824 655359 32.0 MiB FFFF laf
24 655360 720895 32.0 MiB FFFF fota
25 720896 786431 32.0 MiB 0700 mpt
26 786432 787455 512.0 KiB FFFF dbibak
27 787456 789503 1024.0 KiB FFFF rpmbak
28 789504 791551 1024.0 KiB FFFF tzbak
29 791552 791567 8.0 KiB FFFF rct
30 819200 6488063 2.7 GiB 0700 system
31 6488064 7733247 608.0 MiB 0700 cache
32 7733248 7897087 80.0 MiB 0700 tombstones
33 7897088 7929855 16.0 MiB 0700 spare
34 7929856 8028159 48.0 MiB 0700 cust
35 8028160 60948479 25.2 GiB 0700 userdata
36 60948480 61071326 60.0 MiB 0700 grow
Now, it looks like this, so I am unable to use dd to copy any files to the (now apparently deleted or at least unavailable) partitions of the LG G2:
Code:
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Warning! Main partition table overlaps the first partition by 32 blocks!
You will need to delete this partition or resize it in another utility.
Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sdb: 2014208 sectors, 983.5 MiB
Model: Mighty Drive
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): DEF7EA8F-7D62-49A1-8F27-4F59EF0FDF29
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2014174
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 2 2014207 983.5 MiB 0700 Microsoft basic data
I am afraid I have no backup of the partition table other than the output above, because I only learned of this feature of gdisk when looking for solutions of this (last) issue.
Is there any way I can restore the partition table of my device?
Any help in unbricking my phone is, of course, GREATLY appreciated. :fingers-crossed:

Resizing /system and /userdata in Note 3 SM-N9005

Hello to all.
I am trying to resize the partition /system using the parted and gdisk commands. But none of these commands succeed in changing mmcblk0 partitions after execution.
The things I do are as follows:
- install adb and fastboot and put them to the system variables.
- enable Settings>developer options>USB debugging and Root debugging
- install TWRP recovery.
- run cmd in adminitsrator permission.
- write these command in CMD :
adb root
adb reboot recovery
adb push gdisk /sbin
adb push parted /sbin
adb shell chmod 777 /sbin/gdisk
adb shell chmod 777 /sbin/parted
adb shell
~#> cd /dev/block
dev/block> gdisk mmcblk0
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/block/mmcblk0: 61071360 sectors, 29.1 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 2-sector boundaries
Total free space is 8158 sectors (4.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 8192 38911 15.0 MiB 8300 apnhlos
2 38912 156543 57.4 MiB 0700 modem
3 156544 157567 512.0 KiB FFFF sbl1
4 157568 157631 32.0 KiB FFFF dbi
5 157632 157695 32.0 KiB FFFF ddr
6 157696 161791 2.0 MiB FFFF aboot
7 161792 162815 512.0 KiB FFFF rpm
8 162816 163839 512.0 KiB FFFF tz
9 163840 184319 10.0 MiB FFFF pad
10 184320 204799 10.0 MiB 8300 param
11 204800 233471 14.0 MiB 8300 efs
12 233472 239615 3.0 MiB FFFF modemst1
13 239616 245759 3.0 MiB FFFF modemst2
14 245760 268287 11.0 MiB FFFF boot
15 268288 294911 13.0 MiB FFFF recovery
16 294912 321535 13.0 MiB FFFF fota
17 321536 335853 7.0 MiB 8300 backup
18 335854 341997 3.0 MiB FFFF fsg
19 341998 341999 1024 bytes FFFF fsc
20 342000 342015 8.0 KiB FFFF ssd
21 342016 358399 8.0 MiB 8300 persist
22 358400 376831 9.0 MiB 8300 persdata
23 376832 5095423 2.3 GiB 8300 system
24 5095424 5709823 300.0 MiB 8300 cache
25 5709824 5730303 10.0 MiB 8300 hidden
26 5730304 61071326 26.4 GiB 8300 userdata
Command (? for help): d
Partition number (1-26): 26
Command (? for help):w
(curser blinking) and device goes to hang!!!!!
anyone can help me? I do this in parted command. It is like above.
after restarting the device, all of the partition are there, like before...
I also used PIT file with different partition sizes, but nothing change. Odin shown : RQT_CLOSE!!

B2017G - new Motherboard

Hello community,
I bought once an Axon 7 mini, installed TWRP and LineageOS (android 9). It was with Stock Rom 6.01, single SIM. As far I remember I had troubles, crashed several times a day. Then I flashed a dual SIM Version of the stock Rom, Android version was I think was 7.1 much better (update via stock recovery). Then I was able to install TWRP, install Lineage, root it.
Now that b2017g died, couldn't see any net.
I bought the same with a defective USB port cheaply, took out the motherboard, build it in in my old - works perfectly with Android version 6.01.
But I can't find a stock rom to upgrade to 7.1 that I need to install TWRP, all downloads have been deleted.
Now I have a backup from all partitions - what to I have to flash to the new MB? Boot, recovery, System?
The Partitions I have from the old b2017g (working beside of a hardware defect on the MB):
Disk /dev/block/mmcblk0: 61071360 sectors, 29.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 40 entries
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 2-sector boundaries
Total free space is 1330412 sectors (649.6 MiB)
Number Start (sector) End (sector) Size Code Name
1 131072 303103 84.0 MiB 0700 modem
2 393216 393217 1024 bytes FFFF fsc
3 393218 393233 8.0 KiB FFFF ssd
4 393234 394257 512.0 KiB FFFF sbl1
5 394258 395281 512.0 KiB FFFF rpm
6 395282 399377 2.0 MiB FFFF tz
7 399378 400401 512.0 KiB FFFF hyp
8 400402 433169 16.0 MiB 0700 dsp
9 524288 527359 1.5 MiB FFFF fsg
10 655360 658431 1.5 MiB FFFF modemst1
11 658432 661503 1.5 MiB FFFF modemst2
12 786432 786495 32.0 KiB FFFF DDR
13 786496 786527 16.0 KiB FFFF sec
14 917504 958463 20.0 MiB FFFF splash
15 1048576 1050623 1024.0 KiB FFFF aboot
16 1050624 1181695 64.0 MiB FFFF boot
17 1181696 1312767 64.0 MiB FFFF recovery
18 1312768 1314815 1024.0 KiB FFFF devinfo
19 1314816 9703423 4.0 GiB FFFF system
20 9830400 10444799 300.0 MiB FFFF cache
21 10444800 10510335 32.0 MiB FFFF persist
22 10510336 10512383 1024.0 KiB FFFF misc
23 10512384 10513407 512.0 KiB FFFF keystore
24 10513408 10513471 32.0 KiB FFFF config
25 10513472 10644543 64.0 MiB FFFF oem
26 10747904 10747967 32.0 KiB FFFF limits
27 10878976 10879999 512.0 KiB FFFF mota
28 10880000 10880511 256.0 KiB FFFF devcfg
29 10880512 10882559 1024.0 KiB FFFF dip
30 10882560 10948095 32.0 MiB FFFF mdtp
31 10948096 10949119 512.0 KiB FFFF syscfg
32 10949120 10957311 4.0 MiB FFFF mcfg
33 11010048 11010559 256.0 KiB FFFF cmnlib
34 11010560 11011071 256.0 KiB FFFF keymaster
35 11141120 11141631 256.0 KiB FFFF apdp
36 11141632 11142143 256.0 KiB FFFF msadp
37 11142144 11142159 8.0 KiB FFFF dpo
38 11142160 11404303 128.0 MiB FFFF logs
39 11404304 61071326 23.7 GiB FFFF userdata
Without having a stock rom, what should I flash to the new MB? Recovery, boot, system?
Have you any valid link to an update from Android V6.01 to 7.1 or 7.11 just using stock ROM?
I use Linux Mint and own no Windows (except maybe WinXP).
regards, any help is welcome...

Categories

Resources