Text partition d415 - LG Optimus L90

Hopefully someone here could possibly pull their partition file from their L90 D415 and upload it here, it seems I need it for a possible way to unbrick my d415. The way I found seems to work for all other variants, though from what i've read others with the d415 model have no success, and it is probably due to a different partition table. So please, if one could, post a link or something for the partition text file. I really need it a long with others I assure you. It would be greatly appreciated. Thank you, and have a nice day.

You can find lots of info about partition table here:
http://forum.xda-developers.com/lg-...ck-partition-table-tool-lg-l90really-t2946323
Probably it includes info for D415 as well. Hope it helps.

mattandhimself said:
Hopefully someone here could possibly pull their partition file from their L90 D415 and upload it here, it seems I need it for a possible way to unbrick my d415. The way I found seems to work for all other variants, though from what i've read others with the d415 model have no success, and it is probably due to a different partition table. So please, if one could, post a link or something for the partition text file. I really need it a long with others I assure you. It would be greatly appreciated. Thank you, and have a nice day.
Click to expand...
Click to collapse
If you can get it to boot to recovery, there's a partition tool (executes from recovery) that will fix it up for you. U might be able to get the table from the app itself. Otherwise I have d415 and will get u what u want from mine. Lmk if u still need the help with that

This is from my stock D410HN. Please note the unit.
Code:
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 s
unit s
(parted) print
print
Model: MMC 8WMB3R (sd/mmc)
Disk /dev/block/mmcblk0: 15269888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 16384s 147455s 131072s fat16 modem
2 147456s 149503s 2048s sbl1
3 149504s 150527s 1024s rpm
4 150528s 151551s 1024s tz
5 151552s 152575s 1024s sdi
6 152576s 156671s 4096s aboot
7 156672s 157695s 1024s rpmb
8 157696s 158719s 1024s tzb
9 158720s 162815s 4096s abootb
10 162816s 166911s 4096s pad
11 166912s 173055s 6144s modemst1
12 173056s 179199s 6144s modemst2
13 179200s 211967s 32768s misc
14 212992s 278527s 65536s ext4 persist
15 278528s 323583s 45056s laf
16 327680s 372735s 45056s boot
17 372736s 417791s 45056s recovery
18 417792s 423935s 6144s fsg
19 425984s 427007s 1024s fsc
20 427008s 428031s 1024s ssd
21 442368s 443391s 1024s DDR
22 458752s 459775s 1024s encrypt
23 459776s 460799s 1024s rct
24 475136s 491519s 16384s ext4 drm
25 491520s 507903s 16384s ext4 sns
26 507904s 548863s 40960s factory
27 548864s 614399s 65536s fota
28 622592s 624639s 2048s sbl1b
29 624640s 690175s 65536s ext4 mpt
30 704512s 909311s 204800s ext4 cust
31 917504s 918527s 1024s eksst
32 933888s 5128191s 4194304s ext4 system
33 5128192s 6971391s 1843200s ext4 cache
34 6971392s 15223807s 8252416s ext4 userdata
35 15237120s 15269854s 32735s grow
If you mean the partition table, it can be retrieved from the stock KDZ using LGFirmwareExtract. Download your KDZ and extract it, extract DZ, extract PrimaryGPT_0.BIN.

mattandhimself said:
Hopefully someone here could possibly pull their partition file from their L90 D415 and upload it here, it seems I need it for a possible way to unbrick my d415. The way I found seems to work for all other variants, though from what i've read others with the d415 model have no success, and it is probably due to a different partition table. So please, if one could, post a link or something for the partition text file. I really need it a long with others I assure you. It would be greatly appreciated. Thank you, and have a nice day.
Click to expand...
Click to collapse
so does this mean that if we found what do we need we weill be able to ubrick our harbricked lg l90 d415
i have my bricked for 2 yeras

lgl90 said:
so does this mean that if we found what do we need we weill be able to ubrick our harbricked lg l90 d415
i have my bricked for 2 yeras
Click to expand...
Click to collapse
Yes, i will post the method now, but it uses another method.

F. Gacrux said:
This is from my stock D410HN. Please note the unit.
Code:
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 s
unit s
(parted) print
print
Model: MMC 8WMB3R (sd/mmc)
Disk /dev/block/mmcblk0: 15269888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 16384s 147455s 131072s fat16 modem
2 147456s 149503s 2048s sbl1
3 149504s 150527s 1024s rpm
4 150528s 151551s 1024s tz
5 151552s 152575s 1024s sdi
6 152576s 156671s 4096s aboot
7 156672s 157695s 1024s rpmb
8 157696s 158719s 1024s tzb
9 158720s 162815s 4096s abootb
10 162816s 166911s 4096s pad
11 166912s 173055s 6144s modemst1
12 173056s 179199s 6144s modemst2
13 179200s 211967s 32768s misc
14 212992s 278527s 65536s ext4 persist
15 278528s 323583s 45056s laf
16 327680s 372735s 45056s boot
17 372736s 417791s 45056s recovery
18 417792s 423935s 6144s fsg
19 425984s 427007s 1024s fsc
20 427008s 428031s 1024s ssd
21 442368s 443391s 1024s DDR
22 458752s 459775s 1024s encrypt
23 459776s 460799s 1024s rct
24 475136s 491519s 16384s ext4 drm
25 491520s 507903s 16384s ext4 sns
26 507904s 548863s 40960s factory
27 548864s 614399s 65536s fota
28 622592s 624639s 2048s sbl1b
29 624640s 690175s 65536s ext4 mpt
30 704512s 909311s 204800s ext4 cust
31 917504s 918527s 1024s eksst
32 933888s 5128191s 4194304s ext4 system
33 5128192s 6971391s 1843200s ext4 cache
34 6971392s 15223807s 8252416s ext4 userdata
35 15237120s 15269854s 32735s grow
If you mean the partition table, it can be retrieved from the stock KDZ using LGFirmwareExtract. Download your KDZ and extract it, extract DZ, extract PrimaryGPT_0.BIN.
Click to expand...
Click to collapse
Thank you, i will post the method to unbrick the d415, now that you gave the way to get it unbricked. sadly i got rid of it, but now others can be fixed.

mattandhimself said:
Yes, i will post the method now, but it uses another method.
Click to expand...
Click to collapse
OMMMGG HOW CAN I THANK YOU CAN I DONATE TO YOU PLEEAS
OOOMMGG SORRY IM ANNOYING BUT IM SOO HAPPY
ohh yeah and will this unbrick the qhusb 9008
if yes omg i will donate 50 dollars

lgl90 said:
OMMMGG HOW CAN I THANK YOU CAN I DONATE TO YOU PLEEAS
OOOMMGG SORRY IM ANNOYING BUT IM SOO HAPPY
ohh yeah and will this unbrick the qhusb 9008
if yes omg i will donate 50 dollars
Click to expand...
Click to collapse
im sorry. but I'm having issues at the moment, but I will try to fix it. But there is a method for the lg l90 already, but its for all the models BUT the d415. like i said, im making the fix right now

mattandhimself said:
im sorry. but I'm having issues at the moment, but I will try to fix it. But there is a method for the lg l90 already, but its for all the models BUT the d415. like i said, im making the fix right now
Click to expand...
Click to collapse
No luck?? Or did you just say f*** it?

Related

[INFO] Partition List Nexus 5

Here is the partition list of all Nexus 5 partitions with parted:
Code:
C:\Users\cargo\tools>adb shell
~ # umount /cache
umount /cache
~ # umount /system
umount /system
~ # umount /data
umount /data
~ # parted /dev/block/mmcblk0
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) print
print
print
Model: MMC SEM32G (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.7MB 1049kB sbl1
3 68.7MB 69.2MB 524kB rpm
4 69.2MB 69.7MB 524kB tz
5 69.7MB 70.3MB 524kB sdi
6 70.3MB 70.8MB 524kB aboot
7 70.8MB 72.9MB 2097kB pad
8 72.9MB 73.9MB 1049kB sbl1b
9 73.9MB 74.4MB 524kB tzb
10 74.4MB 75.0MB 524kB rpmb
11 75.0MB 75.5MB 524kB abootb
12 75.5MB 78.6MB 3146kB modemst1
13 78.6MB 81.8MB 3146kB modemst2
14 81.8MB 82.3MB 524kB metadata
15 82.3MB 99.1MB 16.8MB misc
16 99.1MB 116MB 16.8MB ext4 persist
17 116MB 119MB 3146kB imgdata
18 119MB 142MB 23.1MB laf
19 142MB 165MB 23.1MB boot
20 165MB 188MB 23.1MB recovery
21 188MB 191MB 3146kB fsg
22 191MB 192MB 524kB fsc
23 192MB 192MB 524kB ssd
24 192MB 193MB 524kB DDR
25 193MB 1267MB 1074MB ext4 system
26 1267MB 1298MB 31.5MB crypto
27 1298MB 2032MB 734MB ext4 cache
28 2032MB 31.3GB 29.2GB ext4 userdata
29 31.3GB 31.3GB 5632B grow
(parted)
Here is a simple list:
Code:
C:\Users\cargo\tools>adb shell
cat /proc/partitions~ #
cat /proc/partitions
major minor #blocks name
179 0 30535680 mmcblk0
179 1 65536 mmcblk0p1
179 2 1024 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 2048 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 512 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 3072 mmcblk0p13
179 14 512 mmcblk0p14
179 15 16384 mmcblk0p15
179 16 16384 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 22528 mmcblk0p18
179 19 22528 mmcblk0p19
179 20 22528 mmcblk0p20
179 21 3072 mmcblk0p21
179 22 512 mmcblk0p22
179 23 512 mmcblk0p23
179 24 512 mmcblk0p24
179 25 1048576 mmcblk0p25
179 26 30720 mmcblk0p26
179 27 716800 mmcblk0p27
179 28 28551146 mmcblk0p28
179 29 5 mmcblk0p29
179 32 4096 mmcblk0rpmb
~ #
Can I somehow reformat /system & /cache partitions to F2FS? (For the speeeeed )
przemo_li said:
Can I somehow reformat /system & /cache partitions to F2FS? (For the speeeeed )
Click to expand...
Click to collapse
You won't get much speed out of a hosed phone. No you can't.
jd1639 said:
You won't get much speed out of a hosed phone. No you can't.
Click to expand...
Click to collapse
Meaning, kernel must support F2FS otherwise it wont boot? Obvious (for me at least) Just wanted to know if I can find such kernels (already build), and if there are tools to convert existing partitions. (So that changes performed are not too invasive )
Or if there are some mods that already employ F2FS.
(Moto G is my inspiration here, btw)
Any info and specs on the MMC model?
eng.stk said:
Any info and specs on the MMC model?
Click to expand...
Click to collapse
Do not know what MMC is, but if it was question for me I will just assume its hw question about storage specs for my phone.
1) I do not have that phone yet
2) It will be internetional version of Nexus 5 (16GB or 32GB).
eng.stk said:
Any info and specs on the MMC model?
Click to expand...
Click to collapse
Row 16 of the first output in post 1 identifies the model as as "SEM32G" which if you google, is SanDisk iNand... You can see it referenced in this datasheet:
http://omapworld.com/iNAND_e_MMC_4_41_IF_data_sheet_v1_0[1].pdf
rootSU said:
Row 16 of the first output in post 1 identifies the model as as "SEM32G" which if you google, is SanDisk iNand... You can see it referenced in this datasheet:
Click to expand...
Click to collapse
404 error
przemo_li said:
404 error
Click to expand...
Click to collapse
Because the url has [1] in it. Try and copy / paste
rootSU said:
Because the url has [1] in it. Try and copy / paste
Click to expand...
Click to collapse
Did that before I posted 404
No [1], and still 404
przemo_li said:
Did that before I posted 404
No [1], and still 404
Click to expand...
Click to collapse
It works, don't forget [1].pdf in the end.
przemo_li said:
Did that before I posted 404
No [1], and still 404
Click to expand...
Click to collapse
OK I fixed the link.
rootSU said:
Row 16 of the first output in post 1 identifies the model as as "SEM32G" which if you google, is SanDisk iNand... You can see it referenced in this datasheet:
http://omapworld.com/iNAND_e_MMC_4_41_IF_data_sheet_v1_0[1].pdf
Click to expand...
Click to collapse
Sustained Read:15 MB/s​Sustained Write:9 MB/s​
Biggest bottleneck of this great device
"Why Google?" or "Why LG?"
przemo_li said:
Can I somehow reformat /system & /cache partitions to F2FS? (For the speeeeed )
Click to expand...
Click to collapse
Lol, i do
http://forum.xda-developers.com/google-nexus-5/orig-development/nexus-5-f2fs-t2668486
dennes544 said:
Lol, i do
http://forum.xda-developers.com/google-nexus-5/orig-development/nexus-5-f2fs-t2668486
Click to expand...
Click to collapse
I know you're trying to be helpful but why revive and answer a thread that's been dead for 3 months?
Sent from my Nexus 5 using Tapatalk
Partition Stock
Hi I have a problem a wipe system VOL, I have /sdcard/ /sdcard/0/ /sdcard/0/0/ When I use usb have to goo /sdcard/0/0/ to much problem my question .. How I cant reset all partitions? and leave my fone like new..?? So I have 28 Gb free but I didnt put any file.. I wanna clean all fone and start with OEM partition, Thx ...sorry for english
how do you get parted on your N5? I only get sh: parted: not found lol
Can you please post the table again using bits or sectors as units? That will be very helpful.
jd1639 said:
You won't get much speed out of a hosed phone. No you can't.
Click to expand...
Click to collapse
Formatting cache and data DOES provide a speed boost but not with system. System should stay EXT4 because F2FS improves the performance of write operations the most and, typically, system is read only. Stick LineageOS 13 and 14.1 support data and cache as F2FS. Be aware though that switching data to F2FS WILL wipe internal storage so back it up. If you wish to keep your data the backup the data partition in TWRP and then backup the entire internal storage directory to a computer. After you've backed up everything you can go to wipe, advanced wipe and select data and hit repair or change and change it to F2FS. Once that is done you should reboot back into TWRP, open settings and enable "use rm -rf instead of formatting". When in recovery you can copy your entire internal storage back to your phone, ensure you copy it right, the TWRP directory should be in the root of your internal storage, this is important because it contains your precious data backup. After that reboot back into TWRP and you may have to enable rm -rf in settings, make sure that is enabled! These reboots are for good measure, it's best to just do them. After that you can go to restore and restore your data backup. After it is fully restored you may disable rm -rf in settings and format cache as F2FS. Then reboot to system and enjoy!
Sent from my Pixel using XDA Labs

Need help to wipe internal memory

So ivee tried lots of things to get my xt1063 running again, but it looks that dont mater what it always comes to the same point, so the las thing i want to try, as i took the phone to a shop and they couldnt fix it , i would like to wipe all of the internal memory.
Is this even posible? i know i will probably kill the phone and its ok, so i boot ir in TWRP , im using a computer with ubuntu, installed the latest adb and fastboot, got into adb shell and issue the parted print command i got this
Code:
# 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) print
print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 67.2MB 67.1MB ext4 modem
2 67.2MB 67.8MB 524kB sbl1
3 67.8MB 67.8MB 32.8kB DDR
4 67.9MB 68.9MB 1036kB aboot
5 69.4MB 69.6MB 205kB rpm
6 69.9MB 70.4MB 410kB tz
7 70.5MB 70.5MB 32.8kB sdi
8 70.5MB 71.0MB 524kB utags
9 71.0MB 73.1MB 2097kB logs
10 73.1MB 75.5MB 2388kB padA
11 75.5MB 76.5MB 1036kB abootBackup
12 77.0MB 77.2MB 205kB rpmBackup
13 77.5MB 78.0MB 410kB tzBackup
14 78.1MB 78.1MB 32.8kB sdiBackup
15 78.1MB 78.6MB 524kB utagsBackup
16 78.6MB 79.7MB 1077kB padB
17 79.7MB 81.3MB 1573kB modemst1
18 81.3MB 82.8MB 1573kB modemst2
19 82.8MB 83.3MB 500kB hob
20 83.3MB 83.4MB 32.8kB dhob
21 83.5MB 85.1MB 1573kB ext2 fsg
22 85.1MB 85.1MB 1024B fsc
23 85.1MB 85.1MB 8192B ssd
24 85.1MB 86.1MB 1049kB sp
25 86.1MB 86.3MB 131kB cid
26 86.3MB 89.4MB 3146kB ext3 pds
27 89.4MB 93.6MB 4194kB logo
28 93.6MB 97.8MB 4194kB clogo
29 97.9MB 106MB 8389kB ext4 persist
30 106MB 107MB 524kB misc
31 107MB 117MB 10.4MB boot
32 117MB 128MB 10.5MB recovery
33 128MB 129MB 1049kB deviceinfo
34 129MB 146MB 16.8MB ext4 ftmlog
35 146MB 706MB 560MB ext4 cache
36 706MB 1863MB 1158MB ext4 system
37 1863MB 1872MB 8389kB kpan
38 1872MB 7784MB 5913MB userdata
So can anyone help to wipe, format or whatever needs to be done to wipe the internal memory. Also, do you guys see any weird partitions taht might not belong there? thanks for any help.
abispac said:
So ivee tried lots of things to get my xt1063 running again, but it looks that dont mater what it always comes to the same point, so the las thing i want to try, as i took the phone to a shop and they couldnt fix it , i would like to wipe all of the internal memory.
Is this even posible? i know i will probably kill the phone and its ok, so i boot ir in TWRP , im using a computer with ubuntu, installed the latest adb and fastboot, got into adb shell and issue the parted print command i got this
Code:
# 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) print
print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 67.2MB 67.1MB ext4 modem
2 67.2MB 67.8MB 524kB sbl1
3 67.8MB 67.8MB 32.8kB DDR
4 67.9MB 68.9MB 1036kB aboot
5 69.4MB 69.6MB 205kB rpm
6 69.9MB 70.4MB 410kB tz
7 70.5MB 70.5MB 32.8kB sdi
8 70.5MB 71.0MB 524kB utags
9 71.0MB 73.1MB 2097kB logs
10 73.1MB 75.5MB 2388kB padA
11 75.5MB 76.5MB 1036kB abootBackup
12 77.0MB 77.2MB 205kB rpmBackup
13 77.5MB 78.0MB 410kB tzBackup
14 78.1MB 78.1MB 32.8kB sdiBackup
15 78.1MB 78.6MB 524kB utagsBackup
16 78.6MB 79.7MB 1077kB padB
17 79.7MB 81.3MB 1573kB modemst1
18 81.3MB 82.8MB 1573kB modemst2
19 82.8MB 83.3MB 500kB hob
20 83.3MB 83.4MB 32.8kB dhob
21 83.5MB 85.1MB 1573kB ext2 fsg
22 85.1MB 85.1MB 1024B fsc
23 85.1MB 85.1MB 8192B ssd
24 85.1MB 86.1MB 1049kB sp
25 86.1MB 86.3MB 131kB cid
26 86.3MB 89.4MB 3146kB ext3 pds
27 89.4MB 93.6MB 4194kB logo
28 93.6MB 97.8MB 4194kB clogo
29 97.9MB 106MB 8389kB ext4 persist
30 106MB 107MB 524kB misc
31 107MB 117MB 10.4MB boot
32 117MB 128MB 10.5MB recovery
33 128MB 129MB 1049kB deviceinfo
34 129MB 146MB 16.8MB ext4 ftmlog
35 146MB 706MB 560MB ext4 cache
36 706MB 1863MB 1158MB ext4 system
37 1863MB 1872MB 8389kB kpan
38 1872MB 7784MB 5913MB userdata
So can anyone help to wipe, format or whatever needs to be done to wipe the internal memory. Also, do you guys see any weird partitions taht might not belong there? thanks for any help.
Click to expand...
Click to collapse
my suggestion is to wipe 38 userdata and 35 cache if it doesn't reboot after that then try system (36) but only if you believe you will be able to reflash .... I still think its a corrupt userdata (38) (missing ext 3/4? ) if you can find the correct dd= (linux command ) to wipe / format / repartition this , think HTC and samsungs sometimes suffer this
http://forum.xda-developers.com/google-nexus-5/general/howto-repairing-corrupted-data-partition-t2577447 reading / maybe adaptable to fix?
http://android.stackexchange.com/questions/88277/corrupted-data-partition again more info but need to check file system etc
Thanks for the help, so acording to those links i tried
Code:
e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata
and it returned
Code:
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
any idea why?
I think this would not wor either, i formated every single partition or file with this comand
mke2fs /dev/block/platform/msm_sdcc.1/by-name/*****
where ****** i aded the name of the all 38 partition parted tells me i have, everything seems ok i dont get erros, but at the end, same result, reboot the phone to the same state.
Please tell me a simple command ,if theres any, to format the whole internal card....please i dont care about the phone anymore, i just want to know if the internal memory can be erased
abispac said:
Thanks for the help, so acording to those links i tried
Code:
e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata
and it returned
Code:
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
any idea why?
I think this would not wor either, i formated every single partition or file with this comand
mke2fs /dev/block/platform/msm_sdcc.1/by-name/*****
where ****** i aded the name of the all 38 partition parted tells me i have, everything seems ok i dont get erros, but at the end, same result, reboot the phone to the same state.
Please tell me a simple command ,if theres any, to format the whole internal card....please i dont care about the phone anymore, i just want to know if the internal memory can be erased
Click to expand...
Click to collapse
i dont know linux that well, i said ideas - expected you to learn commands are not for your phone , you really need to ask in moto g 1st gen and or linux forum for help as now one here has had this problem , blindly formattting every partiton will kill phone and like I said i think your userdata (data) partition should be ext4 - guessing its just lost its partition table / lable
I believe if you fix 38 userdata partition and only this you will be able to boot or reflash phone
http://forum.xda-developers.com/showthread.php?t=2557781 more ideas but adapt do NOT blindly copy
---------- Post added at 11:30 PM ---------- Previous post was at 11:10 PM ----------
http://androidforums.com/threads/cant-wipe-corrupt-data-bootloop.645860/ READ THIS
---------- Post added 21st February 2015 at 12:07 AM ---------- Previous post was 20th February 2015 at 11:30 PM ----------
Apparently if you relock boot loader then unlock again it formats data and has been used to fix this as a work around.....
http://forum.xda-developers.com/showthread.php?t=2542219&page=136
see posts 1352 and 1353 same problem
reefuge said:
http://forum.xda-developers.com/showthread.php?t=2542219&page=136
see posts 1352 and 1353 same problem
Click to expand...
Click to collapse
thank you ,will take a loo before sending it to motorola tomorrow
delete please, my mistake
im done, sending this to motocare.... thanks again for the help

[D405N]Lost IMEI, need help to restore

After trying to install twrp, my phone bricked.
I managed to unbrick it and flash stock 5.0.2 .kdz ! Through the procedure of unbricking, I performed a low level format which erased everything including my /efs partition and everything included in it.
Therefore my IMEI is currently 0 and my IMEI SV is 00.
I have tried to install my IMEI through QPST but it will not connect to my phone as it will not recognize it (No ESN, No Phone Connected).
I have tried to connect to my phone through CDMA and EFS Professional but still the same.
During my search on the forums, I found that Ishould enter DIAG mode in my phone, but I cannot find an option for this.
LG said I am not covered by warranty as the /EFS partition is not something that could be wiped without root or a modification to the system.
The main problem is that I do not have a backup. Please help me,
Thanks in advance!
If you had a backup made by TWRP then you could restore your EFS partition. Unfortunately I don't know any other way to fix it.
Xemidra said:
If you had a backup made by TWRP then you could restore your EFS partition. Unfortunately I don't know any other way to fix it.
Click to expand...
Click to collapse
That's the thing, my whole trouble begun when I tried to install TWRP!
I'm not sure how could you destroy EFS partition with installing TWRP. You should have stick to instructions.
Xemidra said:
I'm not sure how could you destroy EFS partition with installing TWRP. You should have stick to instructions.
Click to expand...
Click to collapse
TWRP didn't kill my partition, unbricking the device did! Plus If you can't offer a solution or any kind of help, don't answer at all! I am not here for judgement!
baldy21 said:
TWRP didn't kill my partition, unbricking the device did! Plus If you can't offer a solution or any kind of help, don't answer at all! I am not here for judgement!
Click to expand...
Click to collapse
I'm not judging xD
I'm trying to understand how did you exactly destroy your EFS partition. You didn't provide enough information about it, except saying that you did some kind of low-level-format (you didn't mention how or why). What surprised me was that installing TWRP doesn't require to perform any low-level-format. That why I wrote about sticking with instructions. Then you wrote that you messed up your phone while trying to install TWRP and got you IMEI lost during unbricking. You didn't wrote what exactly meant bricking and what "procedure" did you performed to fix your phone.
My point is that you should have written exactly what happened, not only how you got there and what did you tried to do to fix it. In my opinion it's hard to propose any solution when we don't know what exactly did you do.
Try to flash a stock KDZ suitable for your L90 variant.
neverdies said:
Try to flash a stock KDZ suitable for your L90 variant.
Click to expand...
Click to collapse
tried, no success!
I couldn't find any EFS partition in L90, I believe it's stored elsewhere:
Code:
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) print
print
Model: MMC 8WMB3R (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 8389kB 75.5MB 67.1MB fat16 modem
2 75.5MB 76.5MB 1049kB sbl1
3 76.5MB 77.1MB 524kB rpm
4 77.1MB 77.6MB 524kB tz
5 77.6MB 78.1MB 524kB sdi
6 78.1MB 80.2MB 2097kB aboot
7 80.2MB 80.7MB 524kB rpmb
8 80.7MB 81.3MB 524kB tzb
9 81.3MB 83.4MB 2097kB abootb
10 83.4MB 85.5MB 2097kB pad
11 85.5MB 88.6MB 3146kB modemst1
12 88.6MB 91.8MB 3146kB modemst2
13 91.8MB 109MB 16.8MB misc
14 109MB 143MB 33.6MB ext4 persist
15 143MB 166MB 23.1MB laf
16 168MB 191MB 23.1MB boot
17 191MB 214MB 23.1MB recovery
18 214MB 217MB 3146kB fsg
19 218MB 219MB 524kB fsc
20 219MB 219MB 524kB ssd
21 226MB 227MB 524kB DDR
22 235MB 235MB 524kB encrypt
23 235MB 236MB 524kB rct
24 243MB 252MB 8389kB ext4 drm
25 252MB 260MB 8389kB ext4 sns
26 260MB 281MB 21.0MB factory
27 281MB 315MB 33.6MB fota
28 319MB 320MB 1049kB sbl1b
29 320MB 353MB 33.6MB ext4 mpt
30 361MB 466MB 105MB ext4 cust
31 470MB 470MB 524kB eksst
32 478MB 2626MB 2147MB ext4 system
33 2626MB 3569MB 944MB ext4 cache
34 3569MB 7795MB 4225MB ext4 userdata
35 7801MB 7818MB 16.8MB grow
Also, unbricking your phone with other variant image will destroy your radio info and I don't know if there is a way to recover it in L90. Even if you use your variant image, but from other phone, it will probably overwrite your unique info, that's why it's wise to make a backup of your phone after rooting with dd if=/dev/block/mmcblk0 of=/storage/external_SD/unbrick.img bs=1024 count=168960 - this will be YOUR phone backup, don't share with anyone and store it in a safe place.
Back in time when I had the Optimus 2x, it was possible using Tutty (debug mode ON) and accessing LG debug (in our L90 it's 3845#*VARIANT# e.g. 3845#*410#), of course you must use the IMEI printed in the sticker in the back cover (this is not possible anymore FYI).
Actually, there is not EFS partition in L90 indeed, instead, the IMEI and other radio info are stored in modemst1 and modemst1 partitions. As I suspected before, unbrick images takes some NAND blocks and writes to an image file - it takes the partition 1 to 15, which includes modemst1 and modemst2 partitions (11 and 12). These partitions are also not flasheable via KDZ (these partitions are absent), so before doing any modification after rooting your phone, do yourself a favor and backup modemst1 and modemst2 partitions, because if anything goes wrong, unless someone find a way to inject the right IMEI data in modemst1 and modemst1 image files for further flashing, you will end with a "radio brick".
Found a tutorial here at xda how to backup and restore modemst partitions : http://forum.xda-developers.com/lg-g3/development/efs-lg-g3-efs-backup-restore-t2907329
I had the same problem.. I unbricked my phone by low-level format tool .but now I don't have mobile network signal.but I have an twrp recovery .did they help me..
Sent from my LG-D410 using XDA Forums

[GUIDE] Increase your Nexus 4's system partition for more space!

I got tired of installing amazing ROMs created by the talented folks here on XDA, but being held back on things like Google Apps because of the tiny /system partition we have on the Nexus 4. I looked around and found guides to increase the system space in the Nexus 5 and Nexus 7 2013, so I basically just adapted them to work on our beloved Nexus 4.
As always, do this at your OWN risk. I am not responsible for bricking your Nexus 4. I will simply list the process which I used to increase my Nexus 4's system partition (by taking a big ol' chunk from the cache partition). Remember, any sort of modification to your device of this caliber WILL void any warranty you might still have.
REQUIREMENTS:
parted (Uploaded to my Google Drive. If it downloads as a .txt, rename it to remove the extension and make it a plain file)
adb and fastboot, and preferably knowledge on how they work
Step 1: Install TWRP onto your Nexus 4 and reboot into it.
Step 2: Open up command prompt / terminal and check to see if your Nexus 4 is connected properly with "adb devices".
Step 3: Once you've confirmed that adb is fully working and your Nexus 4 is properly connected to your PC, download parted and use adb to push it to your Nexus 4 using the command:
Code:
adb push parted /
Step 4: Now enter the following command:
Code:
adb shell
and then the command:
Code:
chmod +x parted
This will enter adb shell and make the "parted" binary you pushed to your device earlier executable.
Step 5:
Now run the command
Code:
./parted /dev/block/mmcblk0 p
You should see a long list with a bunch of numbers and names in your terminal. These are the partitions on your device. parted will give you the partition number, the "start" and "end" of the partition, the size, and the name.
This is the partition layout on my device. It will probably be the same on your device, though the size of userdata may vary depending on whether you have the 8gb or 16gb Nexus 4.
Code:
~ # ./parted /dev/block/mmcblk0 p
Model: MMC 016G92 (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 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext2 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 15.8GB 14.1GB ext4 userdata
24 15.8GB 15.8GB 524kB DDR
25 15.8GB 15.8GB 507kB grow
Step 6:
Now run the following three commands:
Code:
umount /data
umount /sdcard
umount /cache
Step 7: So, on my Nexus 4, the system partition is number 21, and cache is 22. We're kinda lucky in the fact that system and cache are right next to each other, meaning we don't have to touch any other partition.
You'll want to run these two next commands. These commands will essentially "remove" the two partitions.
Code:
./parted /dev/block/mmcblk0 rm 21
./parted /dev/block/mmcblk0 rm 22
Step 8: Now it is time to recreate these two partitions, however, when recreating them, we will make system bigger and the cache smaller. From the partitions list we got in Step 5, we can see that system starts at 159 and ends at 1040, while cache starts at 1040 and ends at 1627. The following two commands will rebuild /system starting at 159, but ending at 1590, while rebuilding cache at 1590, and ending at 1627. We are essentially stealing a large chunk from cache, since we don't really need that anymore on newer ROMs.
Code:
./parted /dev/block/mmcblk0 mkpart primary 159 1590
./parted /dev/block/mmcblk0 mkpart primary 1590 1627
Step 9: Now run this command:
Code:
./parted /dev/block/mmcblk0 p
This will bring up the partitions list, or table, again. This time, however, we'll see the new partitions where system and cache were, however, they have no names! The following two commands will name the two partitions again.
Code:
./parted /dev/block/mmcblk0 name 21 system
./parted /dev/block/mmcblk0 name 22 cache
Step 10: Great! Now the partitions should be named again! Now, we still have to format the partitions as ext4 so that we can actually use them. The following two commands will do that for you.
Code:
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p21
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p22
Step 11: At this point, feel free to run the command from Step 5 to take one more look at the partition table and make sure everything looks good. Now run the command
Code:
mount -a
and then type in
Code:
exit
.
Step 12: Now we are pretty much done. We've extended the system partition from approx. 881mb to 1431mb, which is a nice large chunk of memory. In the future, we could always mess with the partitions more to add even more space by stealing from userdata, but until we reach that point, I think we are pretty well set for now!
Now...
You'll want to reboot TWRP, and flash a new ROM. You can now use a much bigger Google Apps package, without any worries.
Do note, however, that flashing a ROM will "resize" system to be smaller, but this isn't a huge deal. After flashing a ROM, while still in TWRP, you'll want to go to Wipe > Advanced Wipe > check "system" then head to "Repair or Change File System", > then tap on "Resize File System." If you encounter any errors while trying to resize, try remounting system or rebooting TWRP. Afterwards, you should be able to flash your Google Apps package. I'm not sure if you need to repeat these steps after flashing things other than ROMs, but repeating this process within TWRP should work just as well.
I hope I helped y'all out and feel free to post if this guide worked for you or if you have any other comments!
CREDITS:
@surfrock66 for his Nexus 5 guide here.
@rkhat for his Nexus 7 2013 guide here.
RESERVED
Worked Thanx
It worked here on my 8 Gb mako. Here are the original parted output:
Code:
Model: MMC 008G92 (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext2 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 7817MB 6190MB ext4 userdata
24 7817MB 7818MB 524kB DDR
25 7818MB 7818MB 507kB grow
I'm using Nitrogen OS 8.1 with GZR Gapps
jfsobreira said:
It worked here on my 8 Gb mako. Here are the original parted output:
Code:
Model: MMC 008G92 (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext2 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 7817MB 6190MB ext4 userdata
24 7817MB 7818MB 524kB DDR
25 7818MB 7818MB 507kB grow
I'm using Nitrogen OS 8.1 with GZR Gapps
Click to expand...
Click to collapse
Awesome! Thanks for letting me know. Glad it worked for you. :good:
thank you very much !
Thx !
Thx !
Great guide works perfectly.. has anyone tried to reverse the process and go back to stock to reflash a factory image?
I just tried it on my old Nexus 4, and after resettting the partitions, and reflashing the factory image, its just a permanent bootloop. I've cleared all the cache, tried a wipe from the stock recovery, tried flashing TWRP and wiping there.. nothing seems to work. Im not too worried, but it'd be nice if it could boot again.
Thanks for your guide. It worked like a charm for my Nexus 4.
Just a small addition: To resize the system partition automatically I placed a script in /system/addon.d:
Code:
#!/sbin/sh
#
# /system/addon.d/10-resize-system.sh
#
. /tmp/backuptool.functions
case "$1" in
backup)
# Stub
;;
restore)
# Stub
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
/sbin/resize2fs /dev/block/platform/msm_sdcc.1/by-name/system
;;
post-restore)
# Stub
;;
esac
If it doesn't work for you
Thanks for this great guide!
Decided to breath some new life into an old N4 in my family and now it's going (very) strong again with LineageOS 15.1. Still had to clear a bit over 100 MB with .gapps-config from Stock-OpenGapps, but that's no biggie. I always liked to start with the big package and then remove everything that I don't need from it.
Second issue gave me some headaches at first.
"Resize File System" in TWRP apparently worked and Gapps-Install went through (~100 MB free at the end), but boot would fail and crash back to recovery.
(I'm using the daily LOS-nightlies by Milaq and Stock-Package from OpenGapps, maybe it's no problem with other ROMs and/or Gapps-Packages.)
Turns out the fix in TWRP wasn't really working, nevermind what partition size it shows for /system afterwards. It's somehow corrupted and still has the original size -> most of the gapps stuff get's written to nirvana, thus the failing boot.
I found the solution over in the Nexus5-Thread:
JekaPinsk said:
Hello guys!
Try this:
1) Install ROM
2) Backup ROM
3) Enable "Use 'rm -rf' instead of formatting" in TWRP settings
4) Format /system
4.1) Unmount /system and use 'resize2fs -f /dev/block/mmcblk0p21' in terminal (TWRP)
5) Reboot TWRP
5.1) Uncheck "Use 'rm -rf' instead of formatting" in TWRP settings
6) Restore backup
7) Install Stock OpenGapps
8) Done!
The idea behind it is that ROM installation somehow corrupt /system partition thus any write operations above normal data region silently fail.
Click to expand...
Click to collapse
at step 4.1 I already changed the partition number to 21 for Nexus4. In the original post it says mmcblk0p25, because on the Nexus 5 that's /system.
Now it works.
In theory this procedure should also work for updating the ROM without losing data, but haven't tested it yet. (Maybe throw in a wipe of /system as step 0...?)
To be clear: This isn't the fault of the guide to resize system-partition.
Problem is (at least certain) ROMs resetting size of file system to original and then TWRP failing to fix that doing it the easy way as described in OP (-> bug in TWRP?).
EDIT:
Above procedure also works for an update without data loss. Only difference was I did a normal wipe of /system first, "step 0" so to say.
No idea if all this is still necessary with TWRP 3.2.3-0, I'm not willing to risk a full wipe at this point. ^^
i need this...can't even install the smallest gapps package after oreo.... word!! thanks!
Really wanted to thank-you for this!
Two questions:
1. When you printed the partitions, system (21) was ext2. When you recreated it after resizing, you created it as ext4. Was that intentional?
2. You also made the claim that modern ROMs don't need such a big cache partition (your new one was 37MB, I wasn't so brave). Can you justify that claim or provide some technical details? It's not that I don't believe you (I trusted you enough to do this on my device!), just merely curious as to why/how this would be.
Thanks!
X:\xxx\xxx\xxx\xxx\adb>adb push parted /
487 KB/s (346680 bytes in 0.695s)
X:\xxx\xxx\xxx\xxx\adb>adb shell
~ # chmod +x parted
chmod +x parted
~ # ./parted /dev/block/mmcblk0 p
./parted /dev/block/mmcblk0 p
Error: Can't have overlapping partitions.
~ # 
Please Help!!!!!!!!!!!!!!!!!!!
caliban2 said:
Thanks for this great guide!
Decided to breath some new life into an old N4 in my family and now it's going (very) strong again with LineageOS 15.1. Still had to clear a bit over 100 MB with .gapps-config from Stock-OpenGapps, but that's no biggie. I always liked to start with the big package and then remove everything that I don't need from it.
Second issue gave me some headaches at first.
"Resize File System" in TWRP apparently worked and Gapps-Install went through (~100 MB free at the end), but boot would fail and crash back to recovery.
(I'm using the daily LOS-nightlies by Milaq and Stock-Package from OpenGapps, maybe it's no problem with other ROMs and/or Gapps-Packages.)
Turns out the fix in TWRP wasn't really working, nevermind what partition size it shows for /system afterwards. It's somehow corrupted and still has the original size -> most of the gapps stuff get's written to nirvana, thus the failing boot.
I found the solution over in the Nexus5-Thread:
at step 4.1 I already changed the partition number to 21 for Nexus4. In the original post it says mmcblk0p25, because on the Nexus 5 that's /system.
Now it works.
In theory this procedure should also work for updating the ROM without losing data, but haven't tested it yet. (Maybe throw in a wipe of /system as step 0...?)
To be clear: This isn't the fault of the guide to resize system-partition.
Problem is (at least certain) ROMs resetting size of file system to original and then TWRP failing to fix that doing it the easy way as described in OP (-> bug in TWRP?).
EDIT:
Above procedure also works for an update without data loss. Only difference was I did a normal wipe of /system first, "step 0" so to say.
No idea if all this is still necessary with TWRP 3.2.3-0, I'm not willing to risk a full wipe at this point. ^^
Click to expand...
Click to collapse
I'm using TWRP 3.2.3-0 and it has this bug, too. After I followed your steps I was able to install Nitrogen OS and Open Gapps Micro in my phone without erros.
Thanks!
I believe that resize2fs step can be packaged as a flashable zip so we can batch flashing without manual intervention to it (i.e. manually resize fs on system after each rom flash) .
ivanich said:
I believe that resize2fs step can be packaged as a flashable zip so we can batch flashing without manual intervention to it (i.e. manually resize fs on system after each rom flash) .
Click to expand...
Click to collapse
Maybe then more users would dare to use this solution and could calmly install gapps on Pie.
You have a lot of experience. What do you suggest?
Hi all. I only discovered this thread after independently figuring out the partitioning scheme (plain GPT) and process.
Sadly, even after this effort, it seems L-OS upgrades won't work unless L-OS devs modify their upgrade script to make use of resize2fs. Here's what happens as of package 2018-09-11:
L-OS runs backup procedure for all addons found in the existing /system/addon.d/
The above creates files (I guess) in /tmp
The /system is unmounted
The partition is overwritten with the image in the upgrade package
The script in addon.d/ are then run to restore the addons from /tmp
The problem is, the partition image in the upgrade package is for the old partition size, and therefore step 5 fails when the free space runs out. It seems the install or restore scripts don't detect this failure, and just exit without reporting an error, with 0B free space on /system.
I'm guessing the problem can be "solved" by formatting the system partition and installing LOS and all addons from scratch, but that's ridiculous. has anyone tried to raise this issue with devs? I'm about to report this in L-OS's JIRA, as I haven't seen any relevant report there.
EDIT: If anyone wants to track: https://jira.lineageos.org/browse/BUGBASH-2306
myxal said:
Hi all. I only discovered this thread after independently figuring out the partitioning scheme (plain GPT) and process.
Sadly, even after this effort, it seems L-OS upgrades won't work unless L-OS devs modify their upgrade script to make use of resize2fs. Here's what happens as of package 2018-09-11:
L-OS runs backup procedure for all addons found in the existing /system/addon.d/
The above creates files (I guess) in /tmp
The /system is unmounted
The partition is overwritten with the image in the upgrade package
The script in addon.d/ are then run to restore the addons from /tmp
The problem is, the partition image in the upgrade package is for the old partition size, and therefore step 5 fails when the free space runs out. It seems the install or restore scripts don't detect this failure, and just exit without reporting an error, with 0B free space on /system.
I'm guessing the problem can be "solved" by formatting the system partition and installing LOS and all addons from scratch, but that's ridiculous. has anyone tried to raise this issue with devs? I'm about to report this in L-OS's JIRA, as I haven't seen any relevant report there.
EDIT: If anyone wants to track: https://jira.lineageos.org/browse/BUGBASH-2306
Click to expand...
Click to collapse
You may be able to fix that on your own by adding an add-on.d named 00-resize-system (so that's it's ran first) that just does "resize2fs /dev/block/.../system", with maybe an unmount before and a mount after. This way, LOS can just flash the full image when upgrading and the system is resized before the other addons.d scripts run.
Fif_ said:
You may be able to fix that on your own by adding an add-on.d named 00-resize-system (so that's it's ran first) that just does "resize2fs /dev/block/.../system", with maybe an unmount before and a mount after. This way, LOS can just flash the full image when upgrading and the system is resized before the other addons.d scripts run.
Click to expand...
Click to collapse
Thanks for the tip, will give that a try. Any idea where I could find an "authoritative" docs/guide to those scripts? Just looked at the one supplied by open g-apps, and I don't really see the difference between the various commands that the script is supposed to handle (which is executed when?). Also what list_file() is supposed to provide.
backup
restore
pre-backup
pre-restore
post-backup
post-restore
myxal said:
Thanks for the tip, will give that a try. Any idea where I could find an "authoritative" docs/guide to those scripts? Just looked at the one supplied by open g-apps, and I don't really see the difference between the various commands that the script is supposed to handle (which is executed when?). Also what list_file() is supposed to provide.
backup
restore
pre-backup
pre-restore
post-backup
post-restore
Click to expand...
Click to collapse
You want to put the resize2fs call in the pre-restore section.
It should look like this:
Code:
pre-restore)
unmount /system
resize2fs /dev/block/platform/.../system
mount /system
;;
This includes unmounting and remounting /system which I think are needed, but YMMV. You'll need to fill in the full path to system under /dev.
There is no authoritative resource for backup scripts that I know of, but the gapps script is a good example.
P.S.: If you make it work, please post the script for others...

[Guide] [Parted] [Noob-Friendly] Decrease /system Partition to Expand /data Partition [Z00L]

Basic Ideas—QnA​Q: Why would You want to extend Your /data (userdata) partition (Internal Memory Storage)
A: Of course to gives You a lot more space for Files, & Apps to be installed.
Q: What's things You will need to do this?
A: Parted, & mkfs.ext4. Parted to edit Your partition, & mkfs.ext4 to formats a partition to EXT4 file system.
Q: Will it works on my Zenfone 2 Laser?
A: Most likely, Yes. But I'm partitioning on Z00L model, maybe there's some adjustment to be made to work on for Your phone model if different.
Before proceeding any further You may want:​a. Do a full backup of Your phone to the data of Your phone including your personal data, & files!
b. Prepare a computer or such
c. Having a good USB Micro-B cable. If Your don't have any or broken, You can use USB Type C cable, & USB OTG Micro-B
d. Be patient, brave, & good luck!
If You so choose to proceed, remember:​
/*
* Your warranty is now void.
*
* I'm not responsible for bricked devices, dead SD cards,
* thermonuclear war, or You getting fired because the alarm app failed. Please
* do some research if You have any concerns about features included in this tools
* before doing it! YOU are choosing to make these modifications, and if
* You point the finger at us for messing up Your device, we will laugh at You.
*
*/
Click to expand...
Click to collapse
Now Let's Get Started​
Spoiler: Good Luck!
I. Download:​- Android SDK Platform Tools HERE Extract it (e.g. C:\adb)
- Parted, & mkfs.ext4 HERE Extract it somewhere, & copy the folder location, we will get back to this later!
- A TWRP backup of 'LineageOS [17.1] [18.1] [Fork]' Z00L compiled by @markkiths with NikGApps Core HERE Extract it somewhere, & copy the TWRP folder location, we will get back to this later! (Note: AOSP Keyboard, WebView. & all Forks Apps is removed. You may want to use adb install command or download the apk to the MicroSD to install Gboard, & WebView to get the virtual keyboard working, & able to login to Your Google account
- Android 6 Marshmallow Fastboot stock ROM in case You Hard Brick Your phone HERE See step III if You encountered this problem
- Latest TWRP Z00L Z00T
II. Things to do, & Commands:​a. Plug Your phone to computer while in TWRP, & MTP Enabled (Mount > Enable MTP). Then open Terminal on a folder that contains the Android SDK Platform Tools:
→ Windows: Command Prompt or Terminal
→ Linux distros: Terminal
→ macOS: Terminal
Click to expand...
Click to collapse
b. Push (Copy) Parted, & mkfs.ext4 to /sbin:
> adb devices
> adb push parted /sbin
> adb push mkfs.ext4 /sbin
c. Now You shell into it, & set 777 permission to get the files working:
> adb shell
~ # chmod 777 /sbin/parted
~ # chmod 777 /sbin/mkfs.ext4
Now Disable MTP & untick all partitions in Mount menu. You may want to adb shell again
d. Parted into partition of the phone's MMC:
~ # parted /dev/block/mmcblk0
e. List current unmodified partitions:
(parted) print
The output would looks like:
Model: MMC R1J96N (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1328kB 1311kB sbl1
2 1328kB 2639kB 1311kB sbl1bak msftdata
3 2639kB 3163kB 524kB rpm
4 3163kB 3687kB 524kB rpmbak msftdata
5 3687kB 4212kB 524kB tz
6 4212kB 4736kB 524kB tzbak msftdata
7 4736kB 5260kB 524kB hyp
8 5260kB 5785kB 524kB hypbak msftdata
9 5785kB 5817kB 32.8kB DDR
10 5817kB 5826kB 8192B ssd
11 5826kB 5842kB 16.4kB sec
12 5842kB 11.1MB 5243kB aboot
13 16.8MB 22.0MB 5243kB abootbak msftdata
14 22.0MB 27.3MB 5243kB splash
15 27.3MB 28.3MB 1049kB devinfo
16 33.6MB 35.1MB 1573kB fsg
17 35.1MB 35.1MB 1024B fsc
18 35.1MB 36.7MB 1573kB modemst1
19 36.7MB 38.3MB 1573kB modemst2
20 38.3MB 48.8MB 10.5MB ext4 factory
21 48.8MB 59.2MB 10.5MB factorybak
22 59.2MB 60.3MB 1049kB asuskey
23 60.3MB 61.3MB 1049kB asuskey2
24 61.3MB 62.4MB 1049kB asuskey3
25 62.4MB 63.4MB 1049kB asuskey4
26 63.4MB 64.5MB 1049kB asuskey5
27 64.5MB 65.5MB 1049kB asusgpt
28 65.5MB 66.6MB 1049kB asusgpt1
29 66.6MB 67.6MB 1049kB asusgpt2
30 67.6MB 68.7MB 1049kB misc
31 68.7MB 69.2MB 524kB keystore
32 69.2MB 69.2MB 32.8kB config
33 69.2MB 103MB 33.6MB ext4 asdf
34 103MB 105MB 2097kB abootdebug
35 105MB 106MB 1049kB persistent
36 117MB 151MB 33.6MB oem
37 151MB 185MB 33.6MB boot
38 185MB 218MB 33.6MB recovery
39 218MB 252MB 33.6MB ext4 persist
40 252MB 268MB 16.8MB asusfw
41 268MB 336MB 67.1MB fat16 modem msftdata
42 336MB 369MB 33.6MB ext4 ADF msftdata
43 369MB 587MB 218MB ext4 APD msftdata
44 587MB 621MB 33.6MB ext4 cache
45 621MB 3842MB 3221MB ext4 system
46 3842MB 15.8GB 11.9GB ext4 userdata
Click to expand...
Click to collapse
f. Change the unit to byte:
(parted) unit b
You could list the partitions again by typing print to see in bytes
Model: MMC R1J96N (sd/mmc)
Disk /dev/block/mmcblk0: 15758000128B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17408B 1328127B 1310720B sbl1
2 1328128B 2638847B 1310720B sbl1bak msftdata
3 2638848B 3163135B 524288B rpm
4 3163136B 3687423B 524288B rpmbak msftdata
5 3687424B 4211711B 524288B tz
6 4211712B 4735999B 524288B tzbak msftdata
7 4736000B 5260287B 524288B hyp
8 5260288B 5784575B 524288B hypbak msftdata
9 5784576B 5817343B 32768B DDR
10 5817344B 5825535B 8192B ssd
11 5825536B 5841919B 16384B sec
12 5841920B 11084799B 5242880B aboot
13 16777216B 22020095B 5242880B abootbak msftdata
14 22020096B 27262975B 5242880B splash
15 27262976B 28311551B 1048576B devinfo
16 33554432B 35127295B 1572864B fsg
17 35127296B 35128319B 1024B fsc
18 35128320B 36701183B 1572864B modemst1
19 36701184B 38274047B 1572864B modemst2
20 38274048B 48759807B 10485760B ext4 factory
21 48759808B 59245567B 10485760B factorybak
22 59245568B 60294143B 1048576B asuskey
23 60294144B 61342719B 1048576B asuskey2
24 61342720B 62391295B 1048576B asuskey3
25 62391296B 63439871B 1048576B asuskey4
26 63439872B 64488447B 1048576B asuskey5
27 64488448B 65537023B 1048576B asusgpt
28 65537024B 66585599B 1048576B asusgpt1
29 66585600B 67634175B 1048576B asusgpt2
30 67634176B 68682751B 1048576B misc
31 68682752B 69207039B 524288B keystore
32 69207040B 69239807B 32768B config
33 69239808B 102794239B 33554432B ext4 asdf
34 102794240B 104891391B 2097152B abootdebug
35 104891392B 105939967B 1048576B persistent
36 117440512B 150994943B 33554432B oem
37 150994944B 184549375B 33554432B boot
38 184549376B 218103807B 33554432B recovery
39 218103808B 251658239B 33554432B ext4 persist
40 251658240B 268435455B 16777216B asusfw
41 268435456B 335544319B 67108864B fat16 modem msftdata
42 335544320B 369098751B 33554432B ext4 ADF msftdata
43 369098752B 587202559B 218103808B ext4 APD msftdata
44 587202560B 620756991B 33554432B ext4 cache
45 620756992B 3841982463B 3221225472B ext2 system
46 3841982464B 15757983231B 11916000768B ext4 userdata
Click to expand...
Click to collapse
From this point onward DO NOT do stupid stuffs, like delete unmentioned partitions! You have been warned!
g. Remove partition of userdata, & system:
(parted) rm 46
(parted) rm 45
h. Create, name, & set flag for the new system partition: You could use this tool to convert from Gigabytes to Bytes for more precise result
(parted) mkpart system ext4 620756992 2365985773 Remember: It now only have 2 MB left on Your /system partition. You may either can't really tinker much with the bootanimation.zip nor the Media sounds on /system/product/media to Your liking
Here's You realized there are 2 values. The 620756992 as Start Address, & 2365985773 as End Address. Here's some explanation to specify each address:
→ By adding 1 byte from previous partition: 620756991+1=620756992 ← You got Your Start Address for system partition!
→ By adding Start Address + Your decided value (In my case I just want 1.69 GB or 1,745,228,781 Bytes): 620756992+1745228781=2365985773 ← You got Your End Address for system partition!
Click to expand...
Click to collapse
(parted) name 45 system
(parted) set 45 msftdata on
i. List the Free Space:
(parted) p free
The output would looks like:
Model: MMC R1J96N (sd/mmc)
Disk /dev/block/mmcblk0: 15758000128B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
7168B 17407B 10240B Free Space
1 17408B 1328127B 1310720B sbl1
2 1328128B 2638847B 1310720B sbl1bak msftdata
3 2638848B 3163135B 524288B rpm
4 3163136B 3687423B 524288B rpmbak msftdata
5 3687424B 4211711B 524288B tz
6 4211712B 4735999B 524288B tzbak msftdata
7 4736000B 5260287B 524288B hyp
8 5260288B 5784575B 524288B hypbak msftdata
9 5784576B 5817343B 32768B DDR
10 5817344B 5825535B 8192B ssd
11 5825536B 5841919B 16384B sec
12 5841920B 11084799B 5242880B aboot
11084800B 16777215B 5692416B Free Space
13 16777216B 22020095B 5242880B abootbak msftdata
14 22020096B 27262975B 5242880B splash
15 27262976B 28311551B 1048576B devinfo
28311552B 33554431B 5242880B Free Space
16 33554432B 35127295B 1572864B fsg
17 35127296B 35128319B 1024B fsc
18 35128320B 36701183B 1572864B modemst1
19 36701184B 38274047B 1572864B modemst2
20 38274048B 48759807B 10485760B ext4 factory
21 48759808B 59245567B 10485760B factorybak
22 59245568B 60294143B 1048576B asuskey
23 60294144B 61342719B 1048576B asuskey2
24 61342720B 62391295B 1048576B asuskey3
25 62391296B 63439871B 1048576B asuskey4
26 63439872B 64488447B 1048576B asuskey5
27 64488448B 65537023B 1048576B asusgpt
28 65537024B 66585599B 1048576B asusgpt1
29 66585600B 67634175B 1048576B asusgpt2
30 67634176B 68682751B 1048576B misc
31 68682752B 69207039B 524288B keystore
32 69207040B 69239807B 32768B config
33 69239808B 102794239B 33554432B ext4 asdf
34 102794240B 104891391B 2097152B abootdebug
35 104891392B 105939967B 1048576B persistent
105939968B 117440511B 11500544B Free Space
36 117440512B 150994943B 33554432B oem
37 150994944B 184549375B 33554432B boot
38 184549376B 218103807B 33554432B recovery
39 218103808B 251658239B 33554432B ext4 persist
40 251658240B 268435455B 16777216B asusfw
41 268435456B 335544319B 67108864B fat16 modem msftdata
42 335544320B 369098751B 33554432B ext4 ADF msftdata
43 369098752B 587202559B 218103808B ext4 APD msftdata
44 587202560B 620756991B 33554432B ext4 cache
45 620756992B 2365985773B 1016468480B ext4 system msftdata
2365985774B 15757993471B 14120768000B Free Space
Click to expand...
Click to collapse
j. Create, name, & set flag for the new userdata partition:
(parted) mkpart userdata ext4 2365985774 15757993471
More or less to specify Start Address, & End Address for userdata partition is same as before. Here's quick sums up:
→ 2365985773 is added 1 byte to the End Address of system partition (2365985773+1)
→ 15757993471 is just the maximum MMC range
Click to expand...
Click to collapse
You may get this warning just answer it with y, & i:
Warning: You requested a partition from 2389054446B to 15757992960B (sectors
3197706..30777330).
The closest location we can manage is 2389054446B to 15757982720B (sectors
3197706..30777310).
Is this still acceptable to you?
Yes/No? y
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i
Click to expand...
Click to collapse
(parted) name 46 userdata
(parted) set 46 msftdata on
k. Now quit parted, & format system partition using EXT2 file system, & userdata partition using EXT4 file system:
(parted) quit
~ # mkfs.ext2 /dev/block/mmcblk0p45
Why not format system partition with EXT4? I'm just follows phone's default file system!
~ # mkfs.ext4 /dev/block/mmcblk0p46
Now remount the partitions by typing: mount /dev/block/mmcblk0p45 /system_root, & mount /dev/block/mmcblk0p46 /data
l. Now exit out the adb shell, & push (Copy) a gigs or more file to Your Internal Memory to prevent system partition from messing up: Your phone may restart near the completion of pushing 'system.ext4.win000' file, Calm down it's normal!
~ # exit
> adb push "YourExtractionLocation\TWRP" /sdcard
m. If Your phone rebooted into Fastboot Mode by itself just pulled out the battery, & get back to TWRP by pressing Down Volume Button with Power Button (Note: If You immediately see the screen just go blank, while the phone being turned on, & when plugged into the computer there are many partitions mounted. That means You unfortunately Hard Brick Your phone. See step III below to Unbrick it), & push the TWRP folder once more: Most likely it will be copied successfully without errors!
> adb push "YourExtractionLocation\TWRP" /sdcard
Now You can re-enable MTP in TWRP > Mount, & do adb kill-server then eject Your phone from the computer
n. Now Restore in TWRP menu or flash a new ROM that You may want to modify it with Jancox Tool Unpack Repack ROMs. Done! You now can setup Your phone. To check if You actually expand Your /data partition:
TWRP or Terminal: df -h
Android: Link2SD or DiskInfo
​III. Unbrick Your Phone:​a. Boot into Fastboot Mode (Pressing Volume Up + Power Button), & plug Your phone to the computer
b. Extract the Fastboot ROM zip, & run the flashall_AFT.cmd then wait until it completes (Note: For some reason it still have Bootloader Unlocked. So no need to reunlock it!)
c. When completes, just open Terminal then type fastboot flash recovery twrp-x.x.x_x-x-Z00x.img
d. Then boot into TWRP fastboot boot recovery
e. Now you get Your TWRP back, up & running again!
​IV. Extras:​a. Want custom accent color? Use Accent Colour Creator
b. Want custom Dark Theme Color Bucket other than Pitch Black & Android 12 Dark? Use APK Editor Studio & copy the SystemDark12Overlay.apk from /system/product/overlay/SystemDark12. Edit it on APK Editor Studio then modify the colors.xml & style.xml in /res/values-night folder. Lastly change the package="com.custom.dtcb.name" in AndroidManifest.xml then Save the APK & install it on to Your phone
Spoiler: ⚠️ For Specific¹ Purpose Only
¹ Finding the exact start-end address for extreme storage saving on specific ROM. The free space that'll be available is 20.48 kB.
You may not run this multiple lines of codes without knowing their real function is. If you're running this codes, & your phone got hard bricked that's aren't my problems! That's your typos, miscopied problem!
Code:
adb push mkfs.ext4 /sbin
adb push parted /sbin
adb shell
chmod 777 /sbin/parted
chmod 777 /sbin/mkfs.ext4
parted /dev/block/mmcblk0
unit b
p free
rm 46
rm 45
mkpart system ext4 620756992 2352082431
name 45 system
set 45 msftdata on
mkpart userdata ext4 2352082432 15757983231
y
i
name 46 userdata
set 46 msftdata on
quit
mkfs.ext2 /dev/block/mmcblk0p45
mkfs.ext4 /dev/block/mmcblk0p46
mount /dev/block/mmcblk0p45 /system_root
mount /dev/block/mmcblk0p46 /data
exit
If you're facing 1 of this problem while you Restore Backup in TWRP:
extractTarFork() process ended with ERORR; 255 Then the way to fix it to extend /system by repartition your EMMC with value of the subtraction from the Progress Value that shown just right before it's outputs the error message by the Total Backup Size of /system Partition.
extractTarFork() process ended with ERORR; 9 Then you must recreate the backup. It's caused by formatting the /data partition using TWRP's built in EXT4 formatter especially after you reboot & after partitioned the EMMC, or you didn't answer the last mounted on question after the 21ˢᵗ command has been executed.
Credits:​Thanks to Hovatek for being the first to actually demonstrate it on physical device, & providing the necessary files
Thanks to @markkiths for compiles, & providing LineageOS/Fork 18.1
Thanks to NikGApps for providing GApps for Android 11
Run into problem? Write it down below! I'll try my best to help You out.​

Categories

Resources