[Q] Resize system partitions? - Nexus 7 (2013) Q&A

hey i recently tried flashed teamaseks cm12 on my nexus 7 and also tried flashing the full gapps package (~450mb) and the Gapps failed to flash because of "insufficient space in system partition". Is there any way to allocate more disk space to system partition?

goboardindude said:
hey i recently tried flashed teamaseks cm12 on my nexus 7 and also tried flashing the full gapps package (~450mb) and the Gapps failed to flash because of "insufficient space in system partition". Is there any way to allocate more disk space to system partition?
Click to expand...
Click to collapse
Why would you flash some random persons CM12 when there is official CM12? Anyway..... Use a smaller gapps package.

khaytsus said:
Why would you flash some random persons CM12 when there is official CM12? Anyway..... Use a smaller gapps package.
Click to expand...
Click to collapse
Oh lol I just like teamaseks "spare parts" tweaks...
But there is no way to adjust partitions?
Sent from my Moto G 2014 using XDA Free mobile app

I second this question
I want to use the full GAPP package since it has everything I want and replaces stock apps I'd have to remove manually. Lots of saved time
On a 32GB tablet, not being able to install a full GAPP package because of a ~850MB system partition it nuts

Kev13Dd said:
I second this question
I want to use the full GAPP package since it has everything I want and replaces stock apps I'd have to remove manually. Lots of saved time
On a 32GB tablet, not being able to install a full GAPP package because of a ~850MB system partition it nuts
Click to expand...
Click to collapse
It's that small?? My moto g 2014 has only 8 GB and its system partition is around 1.2 GB so that's pretty crazy
Sent from my XT1063/64 using XDA Free mobile app

goboardindude said:
It's that small?? My moto g 2014 has only 8 GB and its system partition is around 1.2 GB so that's pretty crazy
Sent from my XT1063/64 using XDA Free mobile app
Click to expand...
Click to collapse
827MB to be exact
I had to modify the partitions on my Touchpad a lot of times, but I haven't seen a utility to do it on other devices...

Kev13Dd said:
827MB to be exact
I had to modify the partitions on my Touchpad a lot of times, but I haven't seen a utility to do it on other devices...
Click to expand...
Click to collapse
I can't believe there's nothing to change partition sizes... Something like Gparted for android
Unless the manufacturer makes physical partitions or separate disks altogether... That's probably a faster option
Sent from my XT1063/64 using XDA Free mobile app

It should be easy for the developers to let the user choose the size of the partition, it's just a logical partition, a number.
I've seen tutorials to change it after the installation but they are specific to the mobile model and Android version.

skanskan said:
It should be easy for the developers to let the user choose the size of the partition, it's just a logical partition, a number.
I've seen tutorials to change it after the installation but they are specific to the mobile model and Android version.
Click to expand...
Click to collapse
Your sure that the partitions are just logical and not physical? If I were an OEM I'd probably prefer separate physical pieces of memory for /system and user. Its faster and also probably more space efficient
Sent from my XT1063/64 using XDA Free mobile app

goboardindude said:
Your sure that the partitions are just logical and not physical? If I were an OEM I'd probably prefer separate physical pieces of memory for /system and user. Its faster and also probably more space efficient
Sent from my XT1063/64 using XDA Free mobile app
Click to expand...
Click to collapse
I've seen how to resize it on other older mobiles (with ported linux tools), that wouldn't be possible if they were physical. And it doesn't make sense to have many physical partitions.
And more important, it would depend on the brand but all new generation phones I've seen have the same /data partition size.
Anyway I'm not an expert.

Did anyone ever figure this out?
Sent from my SM-N920P using Tapatalk

colormedroid said:
Did anyone ever figure this out?
Click to expand...
Click to collapse
There is nothing mysterious about it, however as this device has no unbricking method I would advise against any repartitioning attempts.

As the Nexus 7 is no longer expected to have new software upgrades, I am working to expand my system partition and move towards CM.
I have done a DD backup of metadata, m9kefscs, DDR, ssd and misc partitions - since I have no idea what they are used for - I intended to recreate them after re-partitioning #22-30 to grant #22, the system partition at least 1.5GB of space.
Code:
Number Start (sector) End (sector) Size Code Name
1 131072 306143 85.4M 0700 radio
2 393216 399359 3072K 0700 modemst1
3 399360 405503 3072K 0700 modemst2
4 524288 554287 14.6M 0700 persist
5 655360 656919 780K 0700 m9kefs1
6 656920 658479 780K 0700 m9kefs2
7 786432 787991 780K 0700 m9kefs3
8 787992 794135 3072K 0700 fsg
9 917504 920503 1500K 0700 sbl1
10 920504 923503 1500K 0700 sbl2
11 923504 927599 2048K 0700 sbl3
12 927600 937839 5120K 0700 aboot
13 937840 938863 512K 0700 rpm
14 1048576 1081343 16.0M 0700 boot
15 1179648 1180671 512K 0700 tz
16 1180672 1180673 1024 0700 pad
17 1180674 1183673 1500K 0700 sbl2b
18 1183674 1187769 2048K 0700 sbl3b
19 1187770 1198009 5120K 0700 abootb
20 1198010 1199033 512K 0700 rpmb
21 1199034 1200057 512K 0700 tzb
22 1310720 3031039 840M 0700 system
23 3031040 4177919 560M 0700 cache
24 4194304 4196351 1024K 0700 misc
25 4325376 4345855 10.0M 0700 recovery
26 4456448 4456463 8192 0700 DDR
27 4456464 4456479 8192 0700 ssd
28 4456480 4456481 1024 0700 m9kefsc
29 4587520 4587583 32768 0700 metadata
30 4718592 61079518 26.8G 0700 userdata
I realized they have a lot of space in between each partition, as evidenced in the sector # above, double checked in parted.
Code:
Model: MMC HBG4e (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 67.1MB 157MB 89.6MB fat16 radio
2 201MB 204MB 3146kB modemst1
3 204MB 208MB 3146kB modemst2
4 268MB 284MB 15.4MB ext4 persist
5 336MB 336MB 799kB m9kefs1
6 336MB 337MB 799kB m9kefs2
7 403MB 403MB 799kB m9kefs3
8 403MB 407MB 3146kB fsg
9 470MB 471MB 1536kB sbl1
10 471MB 473MB 1536kB sbl2
11 473MB 475MB 2097kB sbl3
12 475MB 480MB 5243kB aboot
13 480MB 481MB 524kB rpm
14 537MB 554MB 16.8MB boot
15 604MB 605MB 524kB tz
16 605MB 605MB 1024B pad
17 605MB 606MB 1536kB sbl2b
18 606MB 608MB 2097kB sbl3b
19 608MB 613MB 5243kB abootb
20 613MB 614MB 524kB rpmb
21 614MB 614MB 524kB tzb
22 671MB 1552MB 881MB ext2 system
23 1552MB 2139MB 587MB cache
24 2147MB 2149MB 1049kB misc
25 2215MB 2225MB 10.5MB recovery
26 2282MB 2282MB 8192B DDR
27 2282MB 2282MB 8192B ssd
28 2282MB 2282MB 1024B m9kefsc
29 2349MB 2349MB 32.8kB metadata
30 2416MB 31.3GB 28.9GB userdata
Are there anyone with any idea why these free spaces might be there?

So I took the jump in the name of exploration, and bricked my tablet.
All because I was dreaming and recreated with the wrong partition type. I figure that's the root cause...
Sent from my ONE A2005 using Tapatalk

davewpy said:
So I took the jump in the name of exploration, and bricked my tablet
Click to expand...
Click to collapse
Didn't you read the warning?
Now please check the "Repair Options" section, specifically RIFF JTAG Box which can fix your problem easily.

k23m said:
Didn't you read the warning?
Now please check the "Repair Options" section, specifically RIFF JTAG Box which can fix your problem easily.
Click to expand...
Click to collapse
I have.
Thanks for the advise. I have gotten the chip to respond with some very old info from the community research but need to find some time to look at the low level codes - which i have no experience with.

davewpy said:
So I took the jump in the name of exploration, and bricked my tablet.
All because I was dreaming and recreated with the wrong partition type. I figure that's the root cause...
Click to expand...
Click to collapse
Your tablet can be unbricked now. Please read the guide.

It works. It was out of 9008 mode, then I had to leave it charging in power off mode for a night on my pc - otherwise it was impossible to manage fastboot in low battery state.
As the partition table is corrupted, I had to use fastboot boot <kernel using twrp> to boot to recovery and push parted command and work from there manually in a Linux shell.
I will post further updates in the guide thread.
Sent from my ONE A2005 using Tapatalk

Related

Stuck in Samsung logo

Hello!
I have Samsung Galaxy tab 3 10.1 GT-P5210, some time ago i Tried "dd" some files in /dev/block from @moonbutt74, i was supposed to dd recovery in mmcblk0p11 but instead i did it in mmcblk0 and since then the tab is stuck on samsung logo, i tried re-flashing rom didn't help, factory setting, deleting cache, wipe system... nothing helped.
please help me!!
mohali256 said:
Hello!
I have Samsung Galaxy tab 3 10.1 GT-P5210, some time ago i Tried "dd" some files in /dev/block from @moonbutt74, i was supposed to dd recovery in mmcblk0p11 but instead i did it in mmcblk0 and since then the tab is stuck on samsung logo, i tried re-flashing rom didn't help, factory setting, deleting cache, wipe system... nothing helped.
please help me!!
Click to expand...
Click to collapse
mohali256,
that was a very bad mistake. you've written to mmcblk0, you most likely are completely irreversably bricked.
try to boot into recovery mode, then try to boot into odin mode. if you boot into recovery okay stay there and plug your tab in to
hopefully keep it charged. do this first then write back. if you cannot do either then yes your device is truly finished.
m
moonbutt74 said:
mohali256,
that was a very bad mistake. you've written to mmcblk0, you most likely are completely irreversably bricked.
try to boot into recovery mode, then try to boot into odin mode. if you boot into recovery okay stay there and plug your tab in to
hopefully keep it charged. do this first then write back. if you cannot do either then yes your device is truly finished.
m
Click to expand...
Click to collapse
cool... i can boot in to odin mode and i can boot in to recovery mode without any problem?
so what should i do? @moonbutt74
mohali256 said:
cool... i can boot in to odin mode and i can boot in to recovery mode without any problem?
so what should i do? @moonbutt74
Click to expand...
Click to collapse
@moonbutt74 It's charged and ready to go, can you please tell me what should i do?
No more rushing through things. Got it ?
mohali256 said:
@moonbutt74 It's charged and ready to go, can you please tell me what should i do?
Click to expand...
Click to collapse
M,
keep in mind this may fail, keep calm, be patient
do you have a custom recovery already installed ?
if so restore your backup.
do so then write back.
when you respond to this post, do so by clicking the reply button and i will recieve notification by email.
it speeds up the process.
m
moonbutt74 said:
M,
keep in mind this may fail, keep calm, be patient
do you have a custom recovery already installed ?
if so restore your backup.
do so then write back.
when you respond to this post, do so by clicking the reply button and i will recieve notification by email.
it speeds up the process.
m
Click to expand...
Click to collapse
I could do that but there is one problem which is that i restored my backup when I had philzadvcwm which can't be flashed using Odin or twmr, and twmr doesn't read philzadvcwm restore files.
Can't you give me the mmcblk0 file and i push to the tab using adb... Or as I read in other forums mmcblk0 is the partition table files can't you upload pit file for me
Sorry for troubling you
mohali256 said:
I could do that but there is one problem which is that i restored my backup when I had philzadvcwm which can't be flashed using Odin or twmr, and twmr doesn't read philzadvcwm restore files.
Can't you give me the mmcblk0 file and i push to the tab using adb... Or as I read in other forums mmcblk0 is the partition table files can't you upload pit file for me
Sorry for troubling you
Click to expand...
Click to collapse
M,
you need this version of my philz build - old twrp friendly http://d-h.st/SSY
while in recovery adb push to sdcard - the entry may be /sdcard , /sdcard/ , or, /data/media/0
mount all partitions using the twrp mount function first
reboot recovery and you should be in philz
m
moonbutt74 said:
M,
you need this version of my philz build - old twrp friendly http://d-h.st/SSY
while in recovery adb push to sdcard - the entry may be /sdcard , /sdcard/ , or, /data/media/0
mount all partitions using the twrp mount function first
reboot recovery and you should be in philz
m
Click to expand...
Click to collapse
By the way any good news about the mmcblk0 recovery.img or something like that?
Please help me....
M,
okay, try this
this is recovery flashable zip meant to write the first 4mb of mmcblk0 that you overwrote.
the thought is since we share the same partition scheme the 4mb i pulled from my tab should fill in that part
you are now missing. this is step 1. i need you to tell me which recovery build and version you are running.
m
FYI - this is our partition table via parted:
Code:
Model: MMC MAG2GC (sd/mmc)
Disk /dev/block/mmcblk0: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
18 4194kB 6291kB 2097kB BOTA0 <------you also overwrote
19 6291kB 8389kB 2097kB BOTA1 <------these two and
2 8389kB 29.4MB 21.0MB ext4 EFS <-----most of this if i got you right
16 37.7MB 41.9MB 4194kB PARAM
1 41.9MB 45.1MB 3146kB RESERVED1
20 45.1MB 46.1MB 1049kB DNX
21 46.1MB 54.5MB 8389kB OTA
10 54.5MB 75.5MB 21.0MB BOOT
11 75.5MB 96.5MB 21.0MB RECOVERY
12 96.5MB 101MB 4194kB RESERVED3
3 101MB 117MB 16.8MB ext4 CONFIG
4 117MB 120MB 2097kB FACTORY
5 120MB 122MB 2097kB MEDIA
7 122MB 126MB 4194kB RESERVED2
14 126MB 130MB 4194kB CARRIER
15 130MB 134MB 4194kB TDATA
17 134MB 147MB 12.6MB PERSDATA
8 147MB 2621MB 2475MB ext4 SYSTEM
13 2621MB 2726MB 105MB ext4 HIDDEN
6 2726MB 3093MB 367MB ext4 CACHE
9 3093MB 15.7GB 12.7GB ext4 USERDATA
moonbutt74 said:
M,
okay, try this
this is recovery flashable zip meant to write the first 4mb of mmcblk0 that you overwrote.
the thought is since we share the same partition scheme the 4mb i pulled from my tab should fill in that part
you are now missing. this is step 1. i need you to tell me which recovery build and version you are running.
m
FYI - this is our partition table via parted:
Code:
Model: MMC MAG2GC (sd/mmc)
Disk /dev/block/mmcblk0: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
18 4194kB 6291kB 2097kB BOTA0 <------you also overwrote
19 6291kB 8389kB 2097kB BOTA1 <------these two and
2 8389kB 29.4MB 21.0MB ext4 EFS <-----most of this if i got you right
16 37.7MB 41.9MB 4194kB PARAM
1 41.9MB 45.1MB 3146kB RESERVED1
20 45.1MB 46.1MB 1049kB DNX
21 46.1MB 54.5MB 8389kB OTA
10 54.5MB 75.5MB 21.0MB BOOT
11 75.5MB 96.5MB 21.0MB RECOVERY
12 96.5MB 101MB 4194kB RESERVED3
3 101MB 117MB 16.8MB ext4 CONFIG
4 117MB 120MB 2097kB FACTORY
5 120MB 122MB 2097kB MEDIA
7 122MB 126MB 4194kB RESERVED2
14 126MB 130MB 4194kB CARRIER
15 130MB 134MB 4194kB TDATA
17 134MB 147MB 12.6MB PERSDATA
8 147MB 2621MB 2475MB ext4 SYSTEM
13 2621MB 2726MB 105MB ext4 HIDDEN
6 2726MB 3093MB 367MB ext4 CACHE
9 3093MB 15.7GB 12.7GB ext4 USERDATA
Click to expand...
Click to collapse
I have reflashed twmr ver. 2.7 that angel666 made, but if you want I could flash phiz recovery that you made... I will let you notified on every thing I do.
mohali256 said:
I have reflashed twmr ver. 2.7 that angel666 made, but if you want I could flash phiz recovery that you made... I will let you notified on every thing I do.
Click to expand...
Click to collapse
just work with the one you have for now. flash the zip and reboot. if you're still hanging, reboot to recovery and get adb up and ready.
then write back.

[Q] Unbrick I747M problem

I have an SGH-I747m that I believe is on Bell that I bought used from Ebay. I was assured it was working but when I got it it wouldn't turn on. When I plug it in with the battery in a red light will flash for a second and when I pull the battery with the phone plugged in the red light will be steady even after I replace the battery but go out when I hold the power button. Also, if I pull and replace the battery with the phone unplugged the camera light will flash. Other than that it does nothing. I've tried various debrick images in hopes of getting my phone to download mode both using a 16 and 32 GB class 10 card but it does nothing. I'm not believing that the image is copying right from what I've seen from other people's debrick cards. I've used both dd on linux and win32disk imager on Windows 7. Also a note that when I plug the phone to the computer nothing shows up in device manager. Though that could be that this phone has never been used on my computer so no drivers installed for it.
Using sudo parted /dev/sdd print in Lubuntu 15.04 this is what my debrick SD looks like using a 32GB card.
Code:
Model: Generic- SD/MMC (scsi)
Disk /dev/sdd: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 4194kB 67.1MB 62.9MB modem msftdata
2 67.1MB 67.2MB 131kB sbl1
3 67.2MB 67.5MB 262kB sbl2
4 67.5MB 68.0MB 524kB sbl3
5 68.0MB 70.1MB 2097kB aboot
6 70.1MB 70.6MB 524kB rpm
7 70.6MB 81.1MB 10.5MB boot
8 81.1MB 81.7MB 524kB tz
9 81.7MB 82.2MB 524kB pad
10 82.2MB 92.7MB 10.5MB param
11 92.7MB 107MB 14.3MB efs
12 107MB 110MB 3146kB modemst1
13 110MB 113MB 3146kB modemst2
14 113MB 1686MB 1573MB system
15 1686MB 14.8GB 13.1GB userdata
16 14.8GB 14.8GB 8389kB persist
17 14.8GB 15.7GB 881MB cache
18 15.7GB 15.7GB 10.5MB recovery
19 15.7GB 15.7GB 10.5MB fota
20 15.7GB 15.7GB 6291kB backup
21 15.7GB 15.7GB 3146kB fsg
22 15.7GB 15.7GB 8192B ssd
23 15.7GB 15.8GB 5243kB grow
I can't post images so I can't show what it looks like in Windows, but all the partitions are marked unknown save the first one that is FAT16 and contains a folder named image that has a number of files including various dsps, modem and other names. Can anyone help me figure this out to hopefully make a debrick card that works?

[Q] d855 unbricking help :)

OK, I am no noob at rooting, but have drawn a blank with this one. Would very much appreciate some advice.
I have 2 x LG G3 D855s, both running Cloudy G3 ROM. Both have been successfully downgraded to Android 4.4.2 (10L), rooted with purple drake, and Cloudy Lollipop installed. Perfect.
BUT whilst doing a Titanium restore on an app, one of them rebooted this evening, and is now bricked.
- Normal boot - never does anything other than initial LG boot logo;
- TWRP takes about 5 minutes on the splash screen before reaching the main TWRP screen (but has errors, see later);
- LG download mode only shows the initial logo on the phone but the PC does not 'see' it upon cable connection, and the phone never kicks into full download mode. Connecting my other d855 fires up download mode correctly, so PC drivers are OK.
Because download mode never fully starts, I am unable to restore to stock using the kdz / LG flash.
When TWRP DOES start, it is unable to mount /data, /cache, and the log has the following errors:
E: Could not mount /data and unable to find crypto folder
E: Unable to mount /data
E: Unable to recreate /data/media folder
E: Unable to mount /cache
E: Unable to mount storage
... etc.
Within TWRP Internal Storage is shown as (0MB), and /data and /cache are not mounted. My external_sd is mounted OK.
With TWRP running, a device is seen by my PC (Google Nexus ADB Interface) but 'adb devices' shows nothing. This is the same behaviour as the phone that works, so I assume that at least is normal.
I am unable to mount /data manually, or repair within TWRP.
With /data not mounted, I am unable to proceed any further...
So my question - how do I rebuild the screwed up partitions? Or am I barking up the wrong tree?
Some more troubleshooting.
Trying to mount manually in terminal in TWRP gives me a mount unknown error 150.
Running a non-invasive e2fsck gives me:
Code:
e2fsck 1.41.14 (22-Dec-2010)
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Inode 7, i_size is 3082895360, should be 3087097856. Fix? no
Inode 245415, i_blocks is 704, should be 712. Fix? no
Deleted inode 261925 has zero dtime. Fix? no
Pass 2: Checking directory structure
Entry 'net.dinglisch.android.taskerm' in /data (244801) references inode 342934 found in group 42's unused inodes area.
Fix? no
Entry 'net.dinglisch.android.taskerm' in /data (244801) has deleted/unused inode 342934. Clear? no
Entry 'base.apk' in /app/net.dinglisch.android.taskerm-1 (342899) references inode 342932 found in group 42's unused inodes area.
Fix? no
Entry 'base.apk' in /app/net.dinglisch.android.taskerm-1 (342899) has deleted/unused inode 342932. Clear? no
Entry 'lib' in /app/net.dinglisch.android.taskerm-1 (342899) references inode 342933 found in group 42's unused inodes area.
Fix? no
Entry 'lib' in /app/net.dinglisch.android.taskerm-1 (342899) has deleted/unused inode 342933. Clear? no
Entry 'net.dinglisch.android.taskerm' in /dalvik-cache/profiles (1020002) references inode 1020523 found in group 125's unused inodes area.
Fix? no
Entry 'net.dinglisch.android.taskerm' in /dalvik-cache/profiles (1020002) has deleted/unused inode 1020523. Clear? no
Entry '[email protected]@[email protected]@classes.dex' in /dalvik-cache/arm (1020003) references inode 1020522 found in group 125's unused inodes area.
Fix? no
Entry '[email protected]@[email protected]@classes.dex' in /dalvik-cache/arm (1020003) has deleted/unused inode 1020522. Clear? no
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Inode 244801 ref count is 227, should be 226. Fix? no
Inode 342899 ref count is 3, should be 2. Fix? no
Pass 5: Checking group summary information
Block bitmap differences: -(1389467--1390267) -3348514
Fix? no
Free blocks count wrong for group #25 (293, counted=292).
Fix? no
Free blocks count wrong for group #37 (4806, counted=4853).
Fix? no
Free blocks count wrong for group #42 (20629, counted=19028).
Fix? no
Free blocks count wrong (5806109, counted=5471235).
Fix? no
Inode bitmap differences: -261925 -(342932--342935) -(1020522--1020523)
Fix? no
Free inodes count wrong for group #32 (7338, counted=7337).
Fix? no
Free inodes count wrong for group #42 (7950, counted=7945).
Fix? no
Directories count wrong for group #42 (57, counted=58).
Fix? no
Free inodes count wrong for group #125 (7639, counted=7637).
Fix? no
Free inodes count wrong (1692439, counted=1689847).
Fix? no
/dev/block/mmcblk0p43: ********** WARNING: Filesystem still has errors **********
/dev/block/mmcblk0p43: 4841/1697280 files (8.7% non-contiguous), 988001/6794110 blocks
Parted gives me this:
Code:
Model: MMC SDW32G (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 16.8MB 83.9MB 67.1MB fat16 modem
2 83.9MB 84.9MB 1049kB sbl1
3 84.9MB 85.5MB 524kB dbi
4 85.5MB 86.0MB 524kB DDR
5 86.0MB 88.1MB 2097kB aboot
6 88.1MB 89.1MB 1049kB rpm
7 89.1MB 90.2MB 1049kB tz
8 90.2MB 90.2MB 4096B pad
9 90.2MB 91.2MB 1049kB sbl1b
10 91.2MB 91.8MB 524kB dbibak
11 91.8MB 92.8MB 1049kB rpmbak
12 92.8MB 93.9MB 1049kB tzbak
13 93.9MB 94.9MB 1049kB rpmf
14 94.9MB 95.9MB 1049kB tzf
15 95.9MB 96.5MB 524kB sdif
16 96.5MB 98.6MB 2097kB abootf
17 98.6MB 101MB 2093kB spare1
18 101MB 117MB 16.8MB boot
19 117MB 151MB 33.6MB ext4 persist
20 151MB 168MB 16.8MB recovery
21 168MB 171MB 3146kB modemst1
22 171MB 174MB 3146kB modemst2
23 174MB 174MB 4096B pad1
24 174MB 177MB 3146kB fsg
25 177MB 178MB 524kB fsc
26 178MB 178MB 524kB ssd
27 178MB 178MB 4096B pad2
28 178MB 179MB 524kB encrypt
29 179MB 179MB 524kB eksst
30 179MB 179MB 8192B rct
31 179MB 185MB 5226kB spare2
32 185MB 201MB 16.8MB misc
33 201MB 235MB 33.6MB laf
34 235MB 268MB 33.6MB fota
35 268MB 285MB 16.8MB spare3
36 285MB 294MB 8389kB ext4 drm
37 294MB 302MB 8389kB ext4 sns
38 302MB 336MB 33.6MB ext4 mpt
39 336MB 369MB 33.6MB factory
40 369MB 2533MB 2164MB ext4 system
41 2533MB 3171MB 638MB ext4 cache
42 3171MB 3439MB 268MB ext4 cust
43 3439MB 31.3GB 27.8GB ext4 userdata
44 31.3GB 31.3GB 513kB grow
Whenever I try and write, repair, or delete the partitions parted tells me:
Code:
Error: Input/output error during write on /dev/block/mmcblk0
I can read partitions. I have backed up EFS and /boot. For what it's worth
I can't delete partitions:
Code:
/ # dd if=/dev/zero of=/dev/block/mmcblk0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512B) copied, 0.247840 seconds, 2.0KB/s
/ # parted /dev/block/mmcblk0 print
Model: MMC SDW32G (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 16.8MB 83.9MB 67.1MB fat16 modem
2 83.9MB 84.9MB 1049kB sbl1
3 84.9MB 85.5MB 524kB dbi
4 85.5MB 86.0MB 524kB DDR
5 86.0MB 88.1MB 2097kB aboot
6 88.1MB 89.1MB 1049kB rpm
7 89.1MB 90.2MB 1049kB tz
8 90.2MB 90.2MB 4096B pad
...
etc...
So it looks like the whole filesystem has gone read only??? Any way to force reset it? I'd have thought dd would have worked.

Battery failed when formatting filesystem. Phone is semi-hard-bricked

Hello,
Yesterday I was attempting to format my HTC One M8's data partition to f2fs for use with DigitalHigh's GPE ROM. As I was formatting it, however, the phone shut off unexpectedly - just went straight to blank. Plugging it in yields no results - not even the charging light will turn on. Initially, I worried about a hard brick, but there seems to be some hope. Plugging it into my Linux box, the output of
HTML:
ls /dev
yields a number of sdb* entries, numbered 1 through 49. Running
HTML:
parted /dev/sdb print
yields this output:
HTML:
Model: Qualcomm MMC Storage (scsi)
Disk /dev/sdb: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1066kB 1049kB sbl1
2 1066kB 126MB 125MB pg1fs
3 126MB 126MB 16.4kB board_info
4 126MB 134MB 8389kB reserve_1 msftdata
5 134MB 134MB 262kB mfg
6 134MB 159MB 24.8MB pg2fs
7 159MB 160MB 262kB sbl1_update msftdata
8 160MB 160MB 262kB ext2 rpm
9 160MB 162MB 2097kB tz
10 162MB 162MB 32.8kB sdi
11 162MB 166MB 4194kB hboot
12 166MB 171MB 5243kB sp1 msftdata
13 171MB 172MB 1049kB wifi msftdata
14 172MB 172MB 32.8kB ddr
15 172MB 174MB 1049kB dsps msftdata
16 174MB 236MB 62.9MB fat16 adsp msftdata
17 236MB 242MB 5243kB wcnss msftdata
18 242MB 250MB 8389kB radio_config msftdata
19 250MB 252MB 1573kB fsg
20 252MB 330MB 78.6MB fat16 radio msftdata
21 330MB 334MB 4194kB tool_diag msftdata
22 334MB 387MB 52.4MB ext4 custdata msftdata
23 387MB 403MB 15.7MB reserve_2 msftdata
24 403MB 404MB 1049kB misc msftdata
25 404MB 405MB 1573kB modem_st1
26 405MB 407MB 1573kB modem_st2
27 407MB 428MB 21.0MB ext4 fataldevlog msftdata
28 428MB 428MB 4096B debug_config msftdata
29 428MB 428MB 262kB fat32 pdata msftdata
30 428MB 428MB 16.4kB control msftdata
31 428MB 429MB 1312kB local msftdata
32 429MB 429MB 65.5kB extra msftdata
33 429MB 431MB 1049kB cdma_record msftdata
34 431MB 431MB 1024B fsc msftdata
35 431MB 431MB 8192B ssd
36 431MB 431MB 262kB skylink msftdata
37 431MB 457MB 26.2MB ext4 carrier msftdata
38 457MB 457MB 262kB sensor_hub msftdata
39 457MB 489MB 31.5MB ext4 devlog msftdata
40 489MB 489MB 10.2kB cir_img msftdata
41 489MB 499MB 10.5MB vzw_quality msftdata
42 499MB 510MB 10.5MB vzw_logger msftdata
43 510MB 537MB 27.2MB fat16 reserve msftdata
44 537MB 554MB 16.8MB boot
45 554MB 579MB 25.2MB recovery
46 579MB 671MB 92.3MB reserve_3 msftdata
47 671MB 3490MB 2819MB system msftdata
48 3490MB 4563MB 1074MB cache msftdata
49 4563MB 31.1GB 26.6GB ext4 userdata msftdata
There is hope - my phone is not totally gone. However, I have absolutely zero idea where I would go from here.
Any help would be greatly appreciated!
EDIT: After leaving it charging for a few hours, I can get a (slight) response out of it. Holding down the power button and volume down button together for about 10 seconds while plugged in causes the charging light to briefly flash orange. However, I am unable to find any meaning behind this message online. Hopefully, however, this helps narrow it down - perhaps it's a battery problem?
Any response if you hold power and vol up for a minute or 2?

How To Guide Resize internal storage on Xiaomi Pad 5 (nabu) and install PostmarketOS Preview

!!!!!DISCLAIMER!!!!!! --- below info is provided as is without any warranty, do it on your own risk
!!!BACKUP!!! !!!BACKUP!!! !!!BACKUP!!!
This procedure alter your userdata partition and you will lose anything if you do not do a backup.
_______________________________
Donate a coffee to support development:
Donate via PayPal to serdeliuk
Please carefully read all steps twice and be sure you understand them, the last part explains why you may want to have some free/unused space in the end.
0. Your device should be unlocked with Xiaomi
1. Developer options should be enabled
2. Check your MIUI version and download a stock image to have at hand all the original images in case you may need them.
For example is easy to forget to switch the slot a/b and write the wrong slot and break your device boot to android.
3. Reboot to OrangeFOX
- Download OrangeFOX image, please read this thread [UNOFFICIAL] Xiaomi Pad 5 nabu OrangeFox/TWRP recovery
- adb reboot bootloader
- fastboot boot xiaomi-nabu-orangefox.img
- adb shell
- review your partitions: ls -la /dev/block/bootdevice/by-name/
- we are interested in userdata partition location, in the below output we can see that is on /dev/block/sda device and it is the 31th partition on that device.
Code:
sh-5.0# ls -l /dev/block/bootdevice/by-name/ | grep userdata
lrwxrwxrwx 1 root root 16 1970-04-30 14:11 userdata -> /dev/block/sda31
4. Use parted against the /dev/block/sda device and print some info about partitions
Code:
sh-5.0# parted /dev/block/sda
GNU Parted 3.3
Using /dev/block/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
At the parted prompt, type print to see partitions on /dev/block/sda
Code:
(parted) print
print
Model: SAMSUNG KLUDG4UHDC-B0E1 (scsi)
Disk /dev/block/sda: 126GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 24.6kB 32.8kB 8192B switch
2 32.8kB 65.5kB 32.8kB ssd
3 65.5kB 98.3kB 32.8kB dbg
4 98.3kB 131kB 32.8kB bk01
5 131kB 262kB 131kB bk02
6 262kB 524kB 262kB bk03
7 524kB 1049kB 524kB bk04
8 1049kB 1573kB 524kB keystore
9 1573kB 2097kB 524kB frp
10 2097kB 4194kB 2097kB countrycode
11 4194kB 8389kB 4194kB misc
12 8389kB 12.6MB 4194kB vm-data
13 12.6MB 16.8MB 4194kB bk06
14 16.8MB 25.2MB 8389kB logfs
15 25.2MB 33.6MB 8389kB ffu
16 33.6MB 50.3MB 16.8MB oops
17 50.3MB 67.1MB 16.8MB devinfo
18 67.1MB 83.9MB 16.8MB oem_misc1
19 83.9MB 101MB 16.8MB ext4 metadata
20 101MB 134MB 32.9MB bk08
21 134MB 168MB 34.2MB splash
22 168MB 201MB 33.6MB bk09
23 201MB 9328MB 9127MB super
24 9328MB 9328MB 131kB vbmeta_system_a
25 9328MB 9328MB 131kB vbmeta_system_b
26 9328MB 9396MB 67.1MB logdump
27 9396MB 9530MB 134MB minidump
28 9530MB 9664MB 134MB rawdump
29 9664MB 10.7GB 1074MB ext4 cust
30 10.7GB 10.9GB 134MB ext4 rescue
31 10.9GB 126GB 115GB userdata
5. Remove userdata partition, double check the partition's number THIS COMMAND DO NOT ASK FOR CONFIRMATION, BE SURE YOU DID A BACKUP OF YOUR DATA
Code:
(parted) rm 31
rm 31
And check the result
Code:
(parted) print
print
Model: SAMSUNG KLUDG4UHDC-B0E1 (scsi)
Disk /dev/block/sda: 126GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 24.6kB 32.8kB 8192B switch
2 32.8kB 65.5kB 32.8kB ssd
3 65.5kB 98.3kB 32.8kB dbg
4 98.3kB 131kB 32.8kB bk01
5 131kB 262kB 131kB bk02
6 262kB 524kB 262kB bk03
7 524kB 1049kB 524kB bk04
8 1049kB 1573kB 524kB keystore
9 1573kB 2097kB 524kB frp
10 2097kB 4194kB 2097kB countrycode
11 4194kB 8389kB 4194kB misc
12 8389kB 12.6MB 4194kB vm-data
13 12.6MB 16.8MB 4194kB bk06
14 16.8MB 25.2MB 8389kB logfs
15 25.2MB 33.6MB 8389kB ffu
16 33.6MB 50.3MB 16.8MB oops
17 50.3MB 67.1MB 16.8MB devinfo
18 67.1MB 83.9MB 16.8MB oem_misc1
19 83.9MB 101MB 16.8MB ext4 metadata
20 101MB 134MB 32.9MB bk08
21 134MB 168MB 34.2MB splash
22 168MB 201MB 33.6MB bk09
23 201MB 9328MB 9127MB super
24 9328MB 9328MB 131kB vbmeta_system_a
25 9328MB 9328MB 131kB vbmeta_system_b
26 9328MB 9396MB 67.1MB logdump
27 9396MB 9530MB 134MB minidump
28 9530MB 9664MB 134MB rawdump
29 9664MB 10.7GB 1074MB ext4 cust
30 10.7GB 10.9GB 134MB ext4 rescue
6. Note the end of the last partition in the above list, 10.9GB, this number will be used as the start of the new userdata partition, followed by the end of the partition.
Let say that we want to make an approx 40GB userdata partititon using the following command:
NOTE, between userdata and 10.9GB are 3 spaces, one of them replace the partition type flag, it is important to use 3 spaces at this step.
Code:
(parted) mkpart userdata 10.9GB 50GB
7. Use print described at step 5 and see the result
Code:
(parted) print
Then exit/quit parted
Code:
(parted) quit
8. Reboot to Android and let the OS do the job fixing and formatting the userdata on the new size, will take a while to boot first time after resize, so grab a coffee, a beer, or else, note, it is important to keep the original partition name "userdata"
Code:
sh-5.0# reboot
9. Reboot to OrangeFOX again as described at step 3 and now create the PostmarketOS partition, I will name the partition as pmos:
print the actual partitions
Code:
(parted) print
Number Start End Size File system Name Flags
.....
31 10.9GB 50.0GB 39.1GB userdata
Use the last end as the start of the new partition and for end the desired extra size for your partition, let pretend we want a 20GB pmos partition as ext4 (minimum partition size is 4GB)
Code:
(parted) mkpart pmos ext4 50.0GB 70GB
The remaining free space, if any, can be used for future OSes, let say you want to have Windows and/or Ubuntu along your Android and PostmarketOS in the near future, think twice and partition wise your device and keep some free space if you think you will need it.
After each command you can check the free/available space with following command
Code:
(parted) print free
10. At this point your Android should be running well with the new userdata partition and you are ready to install the PostmarketOS nabu preview.
- Download preview images, please read this thread [INFO] PostmarketOS Linux boot on Xiaomi Pad 5 (nabu)
(NOTE THE IMAGES ARE NOT YET AVAILABLE I WILL UPDATE THE ABOVE POST IN THE NEXT FEW DAYS WHEN I AM DONE WITH THEM)
- Reboot to fastboot and check from which slot is your android booted
Code:
:~$ fastboot getvar current-slot
current-slot: a
finished. total time: 0.005s
Keep in mind that your current version of Android use slot A in above case, slot B is temporarily unused and we can take advantage to install our boot loader. Please note, if you update your Android version the new version will use the unused slot to install updates and our images will be lost, i am talking about 3 partitions involved to properly boot PostmarketOS, boot, vbmeta and dtbo partitions.
In order to flash and boot PostmarketOS you should change the active slot, because above the Android slot was A i am changing the slot to B
Code:
:~$ fastboot set_active b
Setting current slot to 'b'...
OKAY [ 0.046s]
finished. total time: 0.046s
11. Write PostmarketOS preview images.
Flash the new vbmeta with disabled verified boot, more info in PostmarketOS Wiki at Android_Verified_Boot_(AVB)
Code:
:~$ fastboot flash vbmeta_b vbmeta_disabled.img
Erase Android DTBO partition, we do not need it, but if present will be loaded and will prevent our boot
Code:
:~$ fastboot erase dtbo_b
Flash PostmarketOS boot.img
Code:
:~$ fastboot flash boot_b boot.img
Flash PostmarketOS image, please use the partition name you created for PostmarketOS at step 9, this process will takew a while, grab another beer
Code:
:~$ fastboot flash pmos xiaomi-nabu.img
Now you are ready to boot your PostmarketOS preview
Code:
:~$ fastboot reboot
You can switch from PostmarketOS to Android via changing active slots with fastboot, out there are some android/linux apps that can change the active slot while rebooting, you may need to search for them and test if they work.
The last step is to use the free space somehow, by creating one or more new partitions, in order to be able to do that you need to alter the GPT size limit, by default the limit is 32 and if you try to add a new partition you will get a similar error as the following one
Code:
(parted) mkpart WIN ntfs 50.5GB 126GB
mkpart WIN ntfs 50.5GB 126GB
Error: Too many primary partitions.
If you are on slot B to use PostmarketOS you need to switch to slot A to boot my OrangeFOX again:
Code:
:~$ fastboot set_active a
:~$ fastboot boot xiaomi-nabu-orangefox.img
To overcome the limit you will need to use the sgdisk tool, the following command should do the job:
Code:
sh-5.0# sgdisk -S 54 /dev/block/sda
Adjusting GPT size from 54 to 64 to fill the sector
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
sh-5.0#
Now you can use parted to create new partitions, up to 64.
Enjoy
Thanks @Vagelis1608 for reminding me to add the last part about increasing the GPT limit.
P.S.
This thread is about how to repartition your device and install PostmarketOS preview images, if you want to discuss about my PostmarketOS please use this thread [INFO] PostmarketOS Linux boot on Xiaomi Pad 5 (nabu)
I would recommend to mount the "extra space" that's left until you need it for something else.
Either for something non vital ( cache/dalvik-cache ? ) or, better yet, simple storage.
I will look into mounting it as a "virtual SD card".
But yeah, this is exciting and I can't wait for you to release the images.
Vagelis1608 said:
I would recommend to mount the "extra space" that's left until you need it for something else.
Either for something non vital ( cache/dalvik-cache ? ) or, better yet, simple storage.
I will look into mounting it as a "virtual SD card".
But yeah, this is exciting and I can't wait for you to release the images.
Click to expand...
Click to collapse
Indeed, this is a way to use it, but there cannot be added a new partition without some extra work to alter the GPT itself and increase the limit of 32 partitions.... an operation that require a few extra steps.
serdeliuk said:
Indeed, this is a way to use it, but there cannot be added a new partition without some extra work to alter the GPT itself and increase the limit of 32 partitions.... an operation that require a few extra steps.
Click to expand...
Click to collapse
Oh, yeah, I forgot about that.
But still, that will have to be done for a 3rd OS, as you mentioned
Though the user won't have to wipe their data again, which is good
Vagelis1608 said:
Oh, yeah, I forgot about that.
But still, that will have to be done for a 3rd OS, as you mentioned
Though the user won't have to wipe their data again, which is good
Click to expand...
Click to collapse
If the space is left unused/free as suggested there is actually an easy step to alter the GPT later and add one or more partitions without losing anything. I just omitted the step as i thought is not related to the scope of this HowTo.
My OrangeFOX image contains a proper version of sgdisk that is able to alter the GPT size.
Actually i think i can add the extra steps at the end of the post #1 indeed, thanks for suggestion.
serdeliuk said:
If the space is left unused/free as suggested there is actually an easy step to alter the GPT later and add one or more partitions without losing anything. I just omitted the step as i thought is not related to the scope of this HowTo.
My OrangeFOX image contains a proper version of sgdisk that is able to alter the GPT size.
Actually i think i can add the extra steps at the end of the post #1 indeed, thanks for suggestion.
Click to expand...
Click to collapse
I find that it's better to do all the work at once.
Helps to not forget something important.
Good thing your sgdisk is ready and it doesn't need any extra tools.
Optional steps, for sure, but still good to have.
Just don't go over 8192 partitions. Things seem to be bugged after that, from what I read.
Vagelis1608 said:
I find that it's better to do all the work at once.
Helps to not forget something important.
Good thing your sgdisk is ready and it doesn't need any extra tools.
Optional steps, for sure, but still good to have.
Just don't go over 8192 partitions. Things seem to be bugged after that, from what I read.
Click to expand...
Click to collapse
I have added the last missing steps, thanks.
When i started to write the HowTo i didn't realized that will be that huge, is too long to read )))
serdeliuk said:
When i started to write the HowTo i didn't realized that will be that huge, is too long to read )))
Click to expand...
Click to collapse
It's fine, don't worry about it.
It's not like ordinary users will follow it. It's for advanced users
Did anyone do it? Do you have Some screenshots or video review?
denis3509 said:
Did anyone do it? Do you have Some screenshots or video review?
Click to expand...
Click to collapse
I did it on my nabu, i do not have any screenshots or videos, but i have doubts that will help more than what is in the first post, if you have any doubts do not do it, read more, study more, ask questions before do anything, this way you will avoid a soft brick.
I've tried to follow your steps for partitioning, and the pmos guide of porting a new device. I used the map220v kernel, and using pmbootstrap i build and solved some configs error. After i've extracted boot.img and xiaomi-nabu.img, flashed vbmeta_disabled, and then the other images. But when i try boot the slot b, it will redirect to fastboot. How can i solve it?
DTBO? You need to erase dtbo on the slot you are using pmos with.
sparky98 said:
I've tried to follow your steps for partitioning, and the pmos guide of porting a new device. I used the map220v kernel, and using pmbootstrap i build and solved some configs error. After i've extracted boot.img and xiaomi-nabu.img, flashed vbmeta_disabled, and then the other images. But when i try boot the slot b, it will redirect to fastboot. How can i solve it?
Click to expand...
Click to collapse
Also you need to disable AVB in vbmeta too and be sure you have the Postmarketos on the right slot.
Yes i did what you all said before flashing on boot_b and pmos, but maybe i'm doing that wrong.
I erased dtbo_b like this guide, and i've generated the disabled vbmeta with
Bash:
avbtool make_vbmeta_image --flags 2 --padding_size 4096 --output vbmeta_disabled.img
and flashed this image on vbmeta_b
sparky98 said:
Yes i did what you all said before flashing on boot_b and pmos, but maybe i'm doing that wrong.
I erased dtbo_b like this guide, and i've generated the disabled vbmeta with
Bash:
avbtool make_vbmeta_image --flags 2 --padding_size 4096 --output vbmeta_disabled.img
and flashed this image on vbmeta_b
Click to expand...
Click to collapse
Then this HowTo guide reached his scope, you had successfully resized your internal storage, why your OS does not boot is out of scope of this thread, you may need to seek assistance from the developer of your packages. At first glance i can say that your kernel is not properly configured and your DTB is not complete, but please ask the developer of your sources to debug his work and maybe to help you with your issues. Or watch my other threads about PostmarketOS on nabu as soon I will make my sources available as well as some prebuild images.
The preview images of my PostmarketOS port for nabe are available now, check post this thread [INFO] PostmarketOS Linux boot on Xiaomi Pad 5 (nabu)

Categories

Resources