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

!!!!!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)

Related

Still Stuck on TWRP, but now able to see device via Linux!

Hey all,
So I was able to run KFU and it got me stuck on the boot screen. Got help with that and was able to run KFU again but it got stuck on removing boot check and now I'm stuck with the TWRP homescreen.
My device was recognized in device manager but in the KFU it says ADB Status: Offline and Boot Status Unknown. ADB Device List is empty.
I am unable to mount the device from TWRP it keeps failing. I am also unable to mount the sdcard partition what-so-ever.
Pooch sent me info on how to boot up via usb drive into Linux (Mint) and I can find the device in the adb device list but I am not familiar enough with Linux to know how to push the ROM to the device as well as a better/newer version of TWRP. Any help in this would be greatly appreciated. Thanks.
I sent you full instructions on how to proceed in a pm the reason I chose that system is because its nice and small it will get you going.. you only have 150 mb to work with follow instructions and you should be fine
Issues persist
Hello! So, I was able to detect my device via adb in Linux with the help of ThePooch. (thanks a bunch!!!) However we have a small problem.
I am unable to mount my SD Card partition in TWRP at all. I wasn't sure why so we tried a bunch of stuff: We tried pushing a ROM, We tried mounting it via adb in terminal on Linux... We tried "fastboot oem format"... We tried adb shell echo /dev/block/mmcblk0p12 >> /sys/devices/platform/usb_mass_storage/lun0/file
We tried updating the recovery to TWRP 2.2.2.0.
We tried a lot of things however we were very unsuccessful in this and I am still unable to click "Mount SD Card" in TWRP or format it or wipe it.
What's confusing is that I was able to push files (zips) to the sd card temporarily and see them when we click "install" on TWRP however they fail to install and anything pushed to the sd card is, or course, erased on rebooting.
Really don't know what to do at this point as I am at a loss and would appreciate any assistance in this. Thanks so much!
Boot into recovery and enter:
Code:
adb shell
parted /dev/block/mmcblk0
print
...and post the results here.
soupmagnet said:
Boot into recovery and enter:
Code:
adb shell
parted /dev/block/mmcblk0
print
...and post the results here.
Click to expand...
Click to collapse
Model: MMC MMC08G (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 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 2041MB 1192MB ext4 userdata
11 2041MB 2309MB 268MB ext4 cache
12 2309MB 7690MB 5380MB media
hmm wish I knew what I was looking at it looks to me like some things still exist even after a full wipe if I`m reading it correct glad soup knows what to look for
sphinxdog said:
Really don't know what to do at this point as I am at a loss and would appreciate any assistance in this. Thanks so much!
Click to expand...
Click to collapse
I've ran into this a couple of times and what I usually do is to delete the "media" partition, create it again with parted, name it "media", and then finally let the stock Kindle Fire recovery repair it. You may be able to skip the delete/create part and just boot into the stock recovery to see if it can repair it.
probably would work if in fact he had a working system but there isnt a bootable one at least..
Code:
Model: MMC MMC08G (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 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 2041MB 1192MB ext4 userdata
11 2041MB 2309MB 268MB ext4 cache
12 2309MB 7690MB 5380MB media
Thepooch said:
hmm wish I knew what I was looking at it looks to me like some things still exist even after a full wipe if I`m reading it correct glad soup knows what to look for
Click to expand...
Click to collapse
The 'parted' program manipulates the partition table, which basically tells the device how the storage partitions are laid out. The 'print' command used to obtain the output above just displays the information stored in the partition table. I set the output in CODE so it's easier to read. The bottom portion of the data is the more interesting part and you can see the column names there...
Number - This is the partition number. You may have seen "/dev/block/mmcblk0p5" in the past referring to the recovery partition. That number after the letter 'p' refers to the partition number.
Start - This is the offset value for where the partition begins.
End - This is the offset value for where the partition ends.
Size - This is the size of the partition calculated by the difference of the two offset values above. Imagine a ruler where your "Start" offset is the 1 inch tick mark and your "End" offset is the 6 inch tick mark. The "Size" between the tick marks... 6 - 1 is 5.
File system - This is how the partition has been formatted... ext4 is a commonly used filesystem for linux. It's blank if parted doesn't recognize the filesystem type or none has been specified.
Name - The name given to the partition. You'll recognize some as ones you've used to refer to these partitions in fastboot. FYI, userdata typically gets mounted to /data and media gets mounted to /sdcard.
Flags - Used to indicate special characteristics of the filesystem.
The significant part of the output above is the missing filesystem for the media partition. It should have a fat32 filesystem. I'll leave it to soupmagnet to explain how to fix it.
kinfauns said:
The significant part of the output above is the missing filesystem for the media partition. It should have a fat32 filesystem.
Click to expand...
Click to collapse
As always, kinfains is correct. I've dealt with an issue similar to this on my own device pretty recently, so I knew immediately what we'd be dealing with. So you're going to remove, recreate and repartition your sdcard and then you'll be all set. Needless to say, any data on your sdcard will be lost, if it isn't already. Not to worry though, considering everything you have gone through up until this point, this part should be pretty painless.
Code:
adb shell
parted /dev/block/mmcblk0
rm 12
mkpartfs primary fat32 2309 7690
name 12 media
quit
mount /sdcard
exit
adb reboot
You may not need to reboot, but in my case, I did. You'll then be able to mount your sdcard over USB, or use "adb push" to transfer a ROM to flash in recovery. Just remember to wipe System and "Factory Reset" in recovery first, or you may very well find yourself in the exact same situation as before.
Have fun.
SUCCESS!!!! That took care of it! And I was able to load up the ROM with no problem. Thanks for all the help ThePooch & SoupMagnet!!!
Sent from my Kindle Fire using xda app-developers app

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.

[6039y] **GUIDE** Repartitioning of the internal memory

Here it is as I promised.
This phone (the model with one sim card) is sold as a device with 8GB internal memory. In fact the memory chip inside is 16GB, so we can increase the available internal space.
PLEASE READ CAREFULLY AND IF SOMETHING IS NOT CLEAR DO NOT HESITATE TO ASK.
*** The data on your device will be untouched after this operation. But again please read carefully! ***
*** A good practice is always to make a backup of everything which will be changed. I do it and I've made a backup of the entire internal memory of the device before the start of the operation which is described below. ***
*** At the end of the post there is a link to a ZIP file which can be flashed through TWRP in order to perform the procedure automatically. Also includes a check for the size of the EMMC (as there are devices on which the resizing cannot be performed...their chip is smaller).***
1. You can go to this thread and to say Thanks! @meghd00t as his static build of gdisk is used in the recovery below.
2. What is needed:
- A different TWRP Recovery with gdisk inside. It can be downloaded from here twrp-2.8.7.0-idol3-6039y-with-gdisk.img - md5sum: 66b3f82a3e2e1afe14627b3b900a9319
- (Optional) An SD card for backup of the original GPT partition layout.
- Patience and careful reading.
- The Windows users probably need the drivers from this post, for access to the device in recovery mode.
3. How to do it (the output used below is from the terminal window from which I've done this operation on my device):
- reboot to bootloader:
Code:
adb reboot-bootloader
- start the recovery
Code:
fastboot -i 0x1bbb boot twrp-2.8.7.0-idol3-6039y-with-gdisk.img
- go to the device
Code:
adb shell
- unmount all partitions of the internal memory
Code:
~ # umount /cache
~ # umount /sdcard
~ # umount /and-sec
- ensure that there are no mounted partitions from mmcblk0. The output from the mount command should looks like this:
Code:
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=713016k,nr_inodes=157853,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=713016k,nr_inodes=157853)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/mmcblk1p1 on /external_sd type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
- start gdisk
Code:
~ # gdisk /dev/block/mmcblk0
all partitions can be listed by pressing 'p' but we are interested by the last two:
Code:
37 5000400 15269853 4.9 GiB FFFF userdata
38 15269854 30535646 7.3 GiB 0700 userdatabak
and their information which will be shown by pressing 'i' and entering the partition number:
Code:
Command (? for help): i
Partition number (1-38): 37
Partition GUID code: 1B81E7E6-F50D-419B-A739-2AEEF8DA3335 (Unknown)
Partition unique GUID: BDD7FA27-93D4-40BC-B266-313E074E0E87
First sector: 5000400 (at 2.4 GiB)
Last sector: 15269853 (at 7.3 GiB)
Partition size: 10269454 sectors (4.9 GiB)
Attribute flags: 0000000000000000
Partition name: 'userdata'
Command (? for help): i
Partition number (1-38): 38
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: BD12CF41-10E7-BBF7-D096-5553B89882E7
First sector: 15269854 (at 7.3 GiB)
Last sector: 30535646 (at 14.6 GiB)
Partition size: 15265793 sectors (7.3 GiB)
Attribute flags: 0000000000000000
Partition name: 'userdatabak'
The information which is needed from the above output is Partition GUID code, First sector, Last sector and Partition name. You can write these somewhere (if your values are different from the above) from where can be pasted easily later (alternatively you can use the scrollback function of the terminal ).
- if you have an SD card make a backup of the partitions layout (in case that something goes wrong):
Code:
Command (? for help): b
Enter backup filename to save: /external_sd/gpt_partitions_table.backup
The operation has completed successfully.
- delete partitions 37 and 38:
Code:
Command (? for help): d
Partition number (1-38): 38
Command (? for help): d
Partition number (1-37): 37
- create a new partition 37, bigger in size with the same (as before) Partition GUID code, and the same (as before) start sector:
Code:
Command (? for help): n
Partition number (37-40, default 37): 37
First sector (34-30535646, default = 5000400) or {+-}size{KMGTP}: 5000400
Last sector (5000400-30535646, default = 30535646) or {+-}size{KMGTP}: 30535546
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 1B81E7E6-F50D-419B-A739-2AEEF8DA3335
Changed type of partition to 'Unknown'
The difference here is in the last sector of the partition 30535546.
- create a new partition 38 with same Partition GUID code, but with different First sector:
Code:
Command (? for help): n
Partition number (38-40, default 38): 38
First sector (34-30535646, default = 34) or {+-}size{KMGTP}: 30535547
Information: Moved requested sector from 30535547 to 30535548 in
order to align on 2-sector boundaries.
Use 'l' on the experts' menu to adjust alignment
Last sector (30535548-30535646, default = 30535646) or {+-}size{KMGTP}: 30535646
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
Changed type of partition to 'Microsoft basic data'
Please note that here in the output after 'n' the default first sector is 34, so you explicitly must enter the value!!! As can be seen I've entered the next available sector (after partition 37) 305355547 but it has been corrected automatically to 30535548. So you can use directly 30535548 as a start sector. The last sector is at the end of the memory 30535646.
- write the names of the new partitions:
Code:
Command (? for help): c
Partition number (1-38): 37
Enter name: userdata
Command (? for help): c
Partition number (1-38): 38
Enter name: userdatabak
- if you list the partitions again (with 'p') the end of the table should looks like this:
Code:
37 5000400 30535546 12.2 GiB FFFF userdata
38 30535548 30535646 49.5 KiB 0700 userdatabak
- now it is safe to write the changes by pressing 'w':
Code:
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/block/mmcblk0.
The operation has completed successfully.
- resize the file system:
Code:
~ # resize2fs -p /dev/block/mmcblk0p37
resize2fs 1.42.9 (28-Dec-2013)
Please run 'e2fsck -f /dev/block/mmcblk0p37' first.
... hmm ... let's run it:
Code:
~ # e2fsck -f /dev/block/mmcblk0p37
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p37: 12519/321280 files (5.8% non-contiguous), 678615/1283425 blocks
~ # resize2fs -p /dev/block/mmcblk0p37
resize2fs 1.42.9 (28-Dec-2013)
Please run 'e2fsck -f /dev/block/mmcblk0p37' first.
... well the resize2fs have some checks and refuses to resize the file system therefore we must force the execution:
Code:
~ # resize2fs -fp /dev/block/mmcblk0p37
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/block/mmcblk0p37 to 3191893 (4k) blocks.
The filesystem on /dev/block/mmcblk0p37 is now 3191893 blocks long.
The device now can be rebooted and its internal memory will be almost 12GB which compared to its previous size is a very nice upgrade. Screenshots before and after the repartitioning can be seen here.
Update (19.09.2015): This is a link to a flashabable zip which can be used from the TWRP to automate the process. Can be used with any TWRP recovery for 6039.
md5sum: c3f685310283bdc00cee5412fa33259c
Just tried it, and it worked like a charm. Thank you very much!
Wow ! Kudos to meghd00t and petrov.0. I just ordered this phone as a backup, waiting for my beloved Xperia Z1 Compact to be saved from watering (medium rain during less than 10min, so long Sony waterproof phones...). Can't wait to receive it and play with this extra storage !! Thank you :victory:
Here i'am, crazy thinking that if the 6039y(Single chip, SDcard and 8Gb) come with 8Gb worth of wasted money, that the 6039j dual chip and 16Gb non-SDCard version may very well come with a SDCard reader hardware worth of wasted money.
It would be like just changing the Chip Support slot thing or whatever...
Can someone support my craziness and post a picture of thi "where the chip stays" of the SDCard reader version of this phone??
Thanks a lot!!
evilinheaven said:
Here i'am, crazy thinking that if the 6039y(Single chip, SDcard and 8Gb) come with 8Gb worth of wasted money, that the 6039j dual chip and 16Gb non-SDCard version may very well come with a SDCard reader hardware worth of wasted money.
It would be like just changing the Chip Support slot thing or whatever...
Can someone support my craziness and post a picture of thi "where the chip stays" of the SDCard reader version of this phone??
Thanks a lot!!
Click to expand...
Click to collapse
Well ... I like crazy things. But is impossible just to add a chip.
The thread itself is for other things. I don't want more reminders from the moderators. So please use the general section next time.
Thank you in advance.
Here is the complete partition list for 8Gb single sim variant:
Code:
Disk /dev/block/mmcblk0: 30535680 sectors, 14.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 40 entries
First usable sector is 34, last usable sector is 30535646
Partitions will be aligned on 2-sector boundaries
Total free space is 256464 sectors (125.2 MiB)
Number Start (sector) End (sector) Size Code Name
1 131072 262143 64.0 MiB 0700 modem
2 262144 265215 1.5 MiB FFFF tunning
3 265216 267263 1024.0 KiB FFFF traceability
4 267264 267265 1024 bytes FFFF fsc
5 267266 267281 8.0 KiB FFFF ssd
6 267282 268305 512.0 KiB FFFF sbl1
7 268306 269329 512.0 KiB 0700 sbl1bak
8 269330 270353 512.0 KiB FFFF rpm
9 270354 271377 512.0 KiB 0700 rpmbak
10 271378 272401 512.0 KiB FFFF tz
11 272402 273425 512.0 KiB 0700 tzbak
12 273426 274449 512.0 KiB FFFF hyp
13 274450 275473 512.0 KiB 0700 hypbak
14 275474 278545 1.5 MiB FFFF modemst1
15 278546 281617 1.5 MiB FFFF modemst2
16 281618 283665 1024.0 KiB FFFF simlock
17 283666 286737 1.5 MiB FFFF efsdata
18 393216 393279 32.0 KiB FFFF DDR
19 393280 396351 1.5 MiB FFFF fsg
20 396352 396383 16.0 KiB FFFF sec
21 396384 398431 1024.0 KiB FFFF aboot
22 398432 400479 1024.0 KiB 0700 abootbak
23 400480 466015 32.0 MiB FFFF boot
24 466016 531551 32.0 MiB FFFF recovery
25 531552 4306427 1.8 GiB FFFF system
26 4325376 4390911 32.0 MiB FFFF persist
27 4390912 4407295 8.0 MiB FFFF splash
28 4407296 4448255 20.0 MiB 0700 tctpersist
29 4448256 4468735 10.0 MiB 0700 hdcp
30 4468736 4468751 8.0 KiB FFFF fota
31 4468752 4993039 256.0 MiB FFFF cache
32 4993040 4995087 1024.0 KiB FFFF misc
33 4995088 4996111 512.0 KiB FFFF keystore
34 4996112 4996175 32.0 KiB FFFF config
35 4996176 4996303 64.0 KiB FFFF oem
36 4996304 5000399 2.0 MiB FFFF FactoryRP
37 5000400 15269853 4.9 GiB FFFF userdata
38 15269854 30535646 7.3 GiB 0700 userdatabak
Maybe someone can post the list for 16Gb dual sim variant?
Ok, I bit the bullet and resized the "userdata" partition. Only that I did not create the smaller #38 partition, I did not see any reason to do it (if any update tries to store something inside it, will fail anyway; this partition does not look special, all *bak partitions have the same GUID). Plus there isn't any "userdatabak" partition on 16Gb models. Instead I made partition #37 up to the latest available sector (30535646). The phone is working just fine.
rioachim said:
Ok, I bit the bullet and resized the "userdata" partition. Only that I did not create the smaller #38 partition, I did not see any reason to do it (if any update tries to store something inside it, will fail anyway; this partition does not look special, all *bak partitionshave the same GUID). Plus there isn't any "userdatabak" partition on 16Gb models. Instead I made partition #37 up to the latest available sector (30535646). The phone is working just fine.
Click to expand...
Click to collapse
OK. But don't be fulled by the GUID. Most of the bak partitions contain data which is equivalent to the data in the primary ones (aboot, rpm, sbl1 etc.). The data is patched in both partitions with the same patch during an upgrade.
Script to repartition "internal memory"
Hello petrov.0, all
Is it possible to create a shell for all thoses commands ?
In this case if partitions are lost (upgrade, patchs....) we could apply it easily.
And nice discovered.
Regards
Google99
google99 said:
Hello petrov.0, all
Is it possible to create a shell for all thoses commands ?
In this case if partitions are lost (upgrade, patchs....) we could apply it easily.
And nice discovered.
Regards
Google99
Click to expand...
Click to collapse
No it is not:
Code:
GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition tables.
Hi petrov.0 great news and thanks.
Just a doubt, a friend of mine will receive Idol 3 4,7" 8 GB tomorrow, he can made OTA update (that I think are available for security reasons as "stagefright" and another I know Alcatel get users a way to set SD as main memory) and then use your guide to expand memory t 16 Gb or for this operation is better been in a fresh unchained device not updated?
Because in this second option device become 16 Gb Rom but will be afected by stagefright and for the rest of his life
Thanks!
Romagnolo1973 said:
Hi petrov.0 great news and thanks.
Just a doubt, a friend of mine will receive Idol 3 4,7" 8 GB tomorrow, he can made OTA update (that I think are available for security reasons as "stagefright" and another I know Alcatel get users a way to set SD as main memory) and then use your guide to expand memory t 16 Gb or for this operation is better been in a fresh unchained device not updated?
Because in this second option device become 16 Gb Rom but will be afected by stagefright and for the rest of his life
Thanks!
Click to expand...
Click to collapse
It shouldn't be updated. The official updates for 6039 removes the fastboot commands therefore you will not be able to do the repartitioning nor to root the device. Give me the update file and will modify it in a way which will preserve the commands (there is a risk for a broken device after it though ... I wish to try such modification first on my phone, but unfortunately I still do not have official update for it with which to test).
petrov.0 said:
It shouldn't be updated. The official updates for 6039 removes the fastboot commands therefore you will not be able to do the repartitioning nor to root the device. Give me the update file and will modify it in a way which will preserve the commands (there is a risk for a broken device after it though ... I wish to try such modification first on my phone, but unfortunately I still do not have official update for it with which to test).
Click to expand...
Click to collapse
By the way is there any hope (other than getting Alcatel to push an update to put fastboot commands back in, cause is anyone that optimistic?) for people who have indeed updated to recover those?
Sent from my 6039Y using Tapatalk
Rorshan said:
By the way is there any hope (other than getting Alcatel to push an update to put fastboot commands back in, cause is anyone that optimistic?) for people who have indeed updated to recover those?
Sent from my 6039Y using Tapatalk
Click to expand...
Click to collapse
If you find a way to root the device after the update then may be there is a hope.
petrov.0 said:
It shouldn't be updated. The official updates for 6039 removes the fastboot commands therefore you will not be able to do the repartitioning nor to root the device. Give me the update file and will modify it in a way which will preserve the commands (there is a risk for a broken device after it though ... I wish to try such modification first on my phone, but unfortunately I still do not have official update for it with which to test).
Click to expand...
Click to collapse
Understood the problem is new update that remove some action from fastboot needed for repartioning. Idol 3 was received and he resize rom from 8 to 16 with no issue with your guide, after that he made OTA update and they are working perfectly, no issue with the new partitioning size and device is working well.
Romagnolo1973 said:
Understood the problem is new update that remove some action from fastboot needed for repartioning. Idol 3 was received and he resize rom from 8 to 16 with no issue with your guide, after that he made OTA update and they are working perfectly, no issue with the new partitioning size and device is working well.
Click to expand...
Click to collapse
Not some but all fastboot commands are removed. Glad to see that you have made it though. The OTA update however is a mistake. Now you can't get root access nor the fastboot commands are available.
petrov.0 said:
Not some but all fastboot commands are removed. Glad to see that you have made it though. The OTA update however is a mistake. Now you can't get root access nor the fastboot commands are available.
Click to expand...
Click to collapse
Yes, it was risky but probably he is not interested in root, I only inform you that new partitioning with OTA is still there, I think is a goodnews and a base to start, now the perfect situation is if Alcatel made a future OTA as soon as possible with fastboot perfectly working.
Romagnolo1973 said:
Yes, it was risky but probably he is not interested in root, I only inform you that new partitioning with OTA is still there, I think is a goodnews and a base to start, now the perfect situation is if Alcatel made a future OTA as soon as possible with fastboot perfectly working.
Click to expand...
Click to collapse
There is nothing wrong with the fastboot commands prior the update. I have doubts that they will be returned. Thanks for the info though (despite that I already know this by looking in the update files). I can't live without root access however therefore there is no option to loose it.
I'm kinda confused here. Are all the steps done from a terminal on the computer or is some of that to be typed inside the TWRP terminal? Because as soon as I boot TWRP with gdisk I get a device not found from typing adb shell. I'm pretty sure I have all the drivers mentioned in the linked post (and even more too). Any kind soul to explain how stupid I am being (because I know that's the solution in the end, I'm a fool)
Rorshan said:
I'm kinda confused here. Are all the steps done from a terminal on the computer or is some of that to be typed inside the TWRP terminal? Because as soon as I boot TWRP with gdisk I get a device not found from typing adb shell. I'm pretty sure I have all the drivers mentioned in the linked post (and even more too). Any kind soul to explain how stupid I am being (because I know that's the solution in the end, I'm a fool)
Click to expand...
Click to collapse
Everything after adb shell must be done directly on the device. The VID & PID of the device are different in the recovery and you don't have the necessary drivers. Try to install the drivers mentioned in the first post (- The Windows users probably need the drivers from this post, for access to the device in recovery mode).

GUIDE: How to repartition for vendor and how to use GSIs

Guide to repartition your LG V30 to have a vendor partition
This guide is for people who are willing to repartition their V30 (Tested so far on my H930).
It will make your system partition smaller by 512MB, and create a vendor partition instead.
You will still have enough space for (full) stock ROMs too (they just ignore the new partition then)
Code:
#include "std_disclaimer.h"
/*
* Your warranty is now void.
*
* I am 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 ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
What you need:
The scripts attached in the zip file
TWRP
A PC with working ADB (I doubt you wanna write everything in the TWRP command line)
Oreo firmware recommended (for LOS and GSIs)
Bravery
(should be quite safe though, as I did it myself, and know other people who did it)
Steps
Read this carefully before you execute it, twice! Make sure you understand every step. Learn it to the point of when i wake you up in the middle of the night, and ask you questions about it, you can answer instantly.
Boot into TWRP!!!
Make a backup of EVERYTHING on your phone (system, boot, recovery, data and so on)
Code:
The script will format system again, its important to backup!
Copy the contents of the .zip file to your phone
Open a command line/terminal on your PC (wherever you have access to ADB)
Connect your Phone to your PC
Everything now in command line/terminal
adb shell
cd /path/to/the/script/folder
Code:
e.g.
cd /external_sd/repartition/
./backup_gpt.sh
Code:
This will create a backup of your current gpt table on /external_sd/GPT_orig.bin
Code:
Todo this manually execute:
sgdisk /dev/block/sda --b=/path/to/GPT_orig.bin
./make_vendor.sh
Code:
Follow instructions on screen if you really wanna do this!
To apply the changes, remove the --pretend from the sgdisk commands! Otherwise it will just pretend to apply the changes (so you can check if it would fail or not)
(not an automatic script incase something goes wrong)
Reboot into recovery again
Restore your previous backup
How to revert the changes?
Do everything till step 7
./restore_gpt.sh
Code:
This will take the backup of your gpt table on /external_sd/GPT_orig.bin
Code:
Todo this manually execute:
sgdisk --load-backup=/path/to/GPT_orig.bin /dev/block/sda
Wipe system again
Flash a .kdz (Instructions case be found on XDA)
How to use a GSI (Generic System Image)
Make a backup of EVERYTHING on your phone (system, boot, recovery, data and so on)
Flash treble enabled lineage build: link
Wipe data (if it isnt)
Reboot into bootloader
in commandline/terminal:
fastboot flash system <name_of_gsi>.img
OPTIONAL:
fastboot boot <twrp>.img
Code:
fastboot doesnt provide a way to reboot to recovery directly, you can also optionally do the button dance
flash magisk/gapps
fastboot reboot
Thanks for the original script from here
what happens if it is partitioned and we flash a kdz using lg up (without reverting the partitions)?
iRS_ said:
what happens if it is partitioned and we flash a kdz using lg up (without reverting the partitions)?
Click to expand...
Click to collapse
I believe that it just changes the gpt to its original state, so if everything goes right, nothing will happen except you losing the vendor partition
Will this allow my US998 to be supported by the treble project?
AutinDroid said:
I believe that it just changes the gpt to its original state, so if everything goes right, nothing will happen except you losing the vendor partition
Click to expand...
Click to collapse
Yep, it should do that. The kdz rewrites your GPT, atleast it should. Doesnt contain that for nothing i suppose?
liushangrong said:
Will this allow my US998 to be supported by the treble project?
Click to expand...
Click to collapse
It should work also on your US998 to create a new partition. The treblelized ROM isnt yet built for the US998 though. Dont have any testers that could have tried it out on the US998.
SGCMarkus said:
Yep, it should do that. The kdz rewrites your GPT, atleast it should. Doesnt contain that for nothing i suppose?.
Click to expand...
Click to collapse
so if i make the changes i can safely flash a kdz and revert everything back to stock?
iRS_ said:
so if i make the changes i can safely flash a kdz and revert everything back to stock?
Click to expand...
Click to collapse
Should do the trick
Or, less hassle, you restore the GPT that you should backup before anyway (see guide) ^^
That also works.
i'm trying to repartition my v30+ (h930g).
i've succesfull backup my gpt, but i've problem when trying to format vendor. i have the following error:
/external_sd/repartition # make_ext4fs /dev/block/sda23
filesystem size too small
Click to expand...
Click to collapse
here is complete output:
/external_sd # cd repartition/
/external_sd/repartition #
/external_sd/repartition #
/external_sd/repartition # ./make_vendor.sh
/vendor missing
*********Resize /system to 1505792 = 1585541 - 79750 + 1 (inclusize) = 1505792
To really repartition, copy the following commands, and execute them
e2fsck -f /dev/block/bootdevice/by-name/system
resize2fs /dev/block/bootdevice/by-name/system 1505792
Setting name!
partNum is 17
REALLY setting name!
Setting name!
partNum is 22
REALLY setting name!
Disk /dev/block/sda: 31137792 sectors, 118.8 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 32 entries
First usable sector is 6, last usable sector is 31137786
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 6 12293 48.0 MiB FFFF laf
2 12294 24581 48.0 MiB FFFF lafbak
3 24582 32773 32.0 MiB FFFF mpt
4 32774 35333 10.0 MiB FFFF drm
5 35334 36869 6.0 MiB FFFF sns
6 36870 37125 1024.0 KiB FFFF misc
7 37126 45317 32.0 MiB FFFF ftm
8 45318 62213 66.0 MiB FFFF factory
9 62214 62341 512.0 KiB FFFF encrypt
10 62342 62469 512.0 KiB FFFF eksst
11 62470 62597 512.0 KiB FFFF rct
12 62598 62725 512.0 KiB FFFF ssd
13 62726 62853 512.0 KiB FFFF keystore
14 62854 71045 32.0 MiB FFFF persist
15 71046 73093 8.0 MiB FFFF srtc
16 73094 79237 24.0 MiB FFFF qni
17 79238 79749 2.0 MiB FFFF pstore
18 79750 1585541 5.7 GiB 8300 system
19 1716614 1847685 512.0 MiB FFFF cache
20 1847686 1935749 344.0 MiB 0700 OP
21 1935750 31137785 111.4 GiB FFFF userdata
22 31137786 31137786 4.0 KiB FFFF grow
23 1585542 1716613 512.0 MiB 8300 vendor
sgdisk --pretend --delete=18 --new=18:79750:1585541 --change-name=18:system --new=23:1585542:1716613 --change-name=23:vendor --print /dev/block/sda
This will format system and vendor again, so it can be used
make_ext4fs /dev/block/sda18
make_ext4fs /dev/block/sda23
/external_sd/repartition # e2fsck -f /dev/block/bootdevice/by-name/system
e2fsck 1.43.3 (04-Sep-2016)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system: 9726/403200 files (0.0% non-contiguous), 1229698/1611326 blocks
/external_sd/repartition # resize2fs /dev/block/bootdevice/by-name/system 1505792
resize2fs 1.43.3 (04-Sep-2016)
Resizing the filesystem on /dev/block/bootdevice/by-name/system to 1505792 (4k) blocks.
The filesystem on /dev/block/bootdevice/by-name/system is now 1505792 (4k) blocks long.
/external_sd/repartition # sgdisk --pretend --delete=18 --new=18:79750:1585541 --change-name=18:system --new=23:1585542:1716613 --change-name=23:vendor --print /dev/block/sda
Setting name!
partNum is 17
REALLY setting name!
Setting name!
partNum is 22
REALLY setting name!
Disk /dev/block/sda: 31137792 sectors, 118.8 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 32 entries
First usable sector is 6, last usable sector is 31137786
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 6 12293 48.0 MiB FFFF laf
2 12294 24581 48.0 MiB FFFF lafbak
3 24582 32773 32.0 MiB FFFF mpt
4 32774 35333 10.0 MiB FFFF drm
5 35334 36869 6.0 MiB FFFF sns
6 36870 37125 1024.0 KiB FFFF misc
7 37126 45317 32.0 MiB FFFF ftm
8 45318 62213 66.0 MiB FFFF factory
9 62214 62341 512.0 KiB FFFF encrypt
10 62342 62469 512.0 KiB FFFF eksst
11 62470 62597 512.0 KiB FFFF rct
12 62598 62725 512.0 KiB FFFF ssd
13 62726 62853 512.0 KiB FFFF keystore
14 62854 71045 32.0 MiB FFFF persist
15 71046 73093 8.0 MiB FFFF srtc
16 73094 79237 24.0 MiB FFFF qni
17 79238 79749 2.0 MiB FFFF pstore
18 79750 1585541 5.7 GiB 8300 system
19 1716614 1847685 512.0 MiB FFFF cache
20 1847686 1935749 344.0 MiB 0700 OP
21 1935750 31137785 111.4 GiB FFFF userdata
22 31137786 31137786 4.0 KiB FFFF grow
23 1585542 1716613 512.0 MiB 8300 vendor
/external_sd/repartition # make_ext4fs /dev/block/sda18
Creating filesystem with parameters:
Size: 6704594944
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 25576
Label:
Blocks: 1636864
Block groups: 50
Reserved block group size: 399
Created filesystem with 11/409600 inodes and 54888/1636864 blocks
/external_sd/repartition #
/external_sd/repartition #
/external_sd/repartition # make_ext4fs /dev/block/sda23
filesystem size too small
Click to expand...
Click to collapse
what i'm wrong?
Having the same issue here
HD1999 said:
Having the same issue here
Click to expand...
Click to collapse
do you own a h930(64gb) or h930g(128gb)?
I own a H930
ah ok, so this happen on 64gb version too
Hmm...
Ok, forgot to add a message to the script ?
you have to remove the --pretend from the commands, otherwise it will just do like it does it, without actually doing it (to see if everything will work the way it should before actually applying the changes)
sorry about that
SGCMarkus said:
Hmm...
Ok, forgot to add a message to the script
you have to remove the --pretend from the commands, otherwise it will just do like it does it, without actually doing it (to see if everything will work the way it should before actually applying the changes)
sorry about that
Click to expand...
Click to collapse
EDIT: i reboted into recovery again and i was able to format /vendor. is normal that i can see vendor partition in backup section of twrp?
now i'm going to flash yoru los
hi markus, i figure it reading the script, but same error here!
this is the comannd ì execute after run ./make_vendor.sh:
e2fsck -f /dev/block/bootdevice/by-name/system
resize2fs /dev/block/bootdevice/by-name/system 1505792
sgdisk --delete=18 --new=18:79750:1585541 --change-name=18:system --new=23:1585542:1716613 --change-name=23:vendor --print /dev/block/sda
make_ext4fs /dev/block/sda18
make_ext4fs /dev/block/sda23
i ran the script and the command above ehn the phone are in twrp(assuming is right to do this!)
okaiuz said:
EDIT: i reboted into recovery again and i was able to format /vendor. is normal that i can see vendor partition in backup section of twrp?
now i'm going to flash yoru los
Click to expand...
Click to collapse
Will also add this, to reboot into recovery again then
Glad it worked. And ehhm, i dont think its normal that TWRP sees it for backups? But if it does, no need for a new TWRP (tbh, during all my testings, i didnt check this, or didnt look if vendor is there or not)
i restore the original gpt and i start from ascratch.
iin restore_gpt.sh you have to change "external_SD" to "external_sd"
don't think need to rebbot, after restoring original gpt, and execute above command, formatting /vendor work on first run!
another problem...i'm trying to flash your los(non treblelized) but i receive:
Updater process ended with ERROR: 7
I:Install took 0 second(s).
Error installing zip file '/sdcard/Download/lineage-15.1-20180516-UNOFFICIAL-h930.zip'
Updating partition details...
Failed to mount '/system' (Invalid argument)
full log attached
okaiuz said:
i restore the original gpt and i start from ascratch.
iin restore_gpt.sh you have to change "external_SD" to "external_sd"
don't think need to rebbot, after restoring original gpt, and execute above command, formatting /vendor work on first run!
another problem...i'm trying to flash your los(non treblelized) but i receive:
Updater process ended with ERROR: 7
I:Install took 0 second(s).
Error installing zip file '/sdcard/Download/lineage-15.1-20180516-UNOFFICIAL-h930.zip'
Updating partition details...
Failed to mount '/system' (Invalid argument)
full log attached
Click to expand...
Click to collapse
EDIT: maybe related to content of META-INF/com/google/android/updater-script file?
i see this :
assert(getprop("ro.product.device") == "v30" || getprop("ro.build.product") == "v30" ||
getprop("ro.product.device") == "joan" || getprop("ro.build.product") == "joan" ||
getprop("ro.product.device") == "h930" || getprop("ro.build.product") == "h930" || abort("E3004: This package is for device: v30,joan,h930; this device is " +
Click to expand...
Click to collapse
my device is h930g, same as h930 but with 128gb of rom (also called v30+). i check with adb and my device show this values:
[ro.build.product]: [joan]
[ro.product.device]: [joan]
okaiuz said:
i restore the original gpt and i start from ascratch.
iin restore_gpt.sh you have to change "external_SD" to "external_sd"
don't think need to rebbot, after restoring original gpt, and execute above command, formatting /vendor work on first run!
another problem...i'm trying to flash your los(non treblelized) but i receive:
Updater process ended with ERROR: 7
I:Install took 0 second(s).
Error installing zip file '/sdcard/Download/lineage-15.1-20180516-UNOFFICIAL-h930.zip'
Updating partition details...
Failed to mount '/system' (Invalid argument)
full log attached
Click to expand...
Click to collapse
Seems like you need to reboot inbetween, or try to format /system before flashing?
I dont encounter that problem :/
SGCMarkus said:
Seems like you need to reboot inbetween, or try to format /system before flashing?
I dont encounter that problem :/
Click to expand...
Click to collapse
i've made several test on it...wiping system data cache & art, reflash your recovery,format system in recovery & via adb..
The only thoing i haven't tested is to flash full kdz and then repartition.
i don't know if this can be useful for debugging,but when i've switched to oreo i don't flash full kdz, but the twrp flashable rom found on v30 section of xda
okaiuz said:
i've made several test on it...wiping system data cache & art, reflash your recovery,format system in recovery & via adb..
The only thoing i haven't tested is to flash full kdz and then repartition.
i don't know if this can be useful for debugging,but when i've switched to oreo i don't flash full kdz, but the twrp flashable rom found on v30 section of xda
Click to expand...
Click to collapse
Hm... that shouldnt matter actually. Its a weird behaviour though you have there. Can you "tick" system in the mount options of TWRP? if no, send me a log of that too. This seems really weird to me.

[GUIDE] [DANGEROUS] Resize system partition

WARNING​
Code:
This process is extremely dangerous. You may brick your device.
Do it only if you know what you are doing!
I am not responsible of bricked devices or dead sdcards.
Hello guys,
I've decided to write this guide since this seems to be the only way to resize system partition to install larger GSIs.
Before starting remember to always make a backup since you will loose all your data.
Also DO NOT DO a simple copy-paste compare with yours first and if you have any doubts write in the comments before enter the doubtful command. Prevention is better than cure!!
This process has been tested on my own device but it has not been tested restoring stock firmware.
(You can also join the telegram group to ask for help https://t.me/MotorolaOneAction)
Requirements​
Latest TWRP downloaded (to be booted through fastboot later)
Parted arm64 static binary (attached below)
Latest fastboot and ADB commands installed
Patience
Process​
Boot to TWRP from fastboot
Run the following commands:
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/sda
p free
Now parted will list your partition table which should be like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Save the output of the command above (this is very important to restore original partition table if you will run into issues in the next parts)
Now with extreme attention type
Code:
rm partition_number
replacing partition_number with the number of the partition following the reverse order until you reach system_b partition removing it too . In my case I'll type:
Code:
rm 42
rm 41
rm 40
rm 39
Once you removed these partition it's time to recreate them following the original order but increasing the target partition size, in our case system_b. Type
Code:
mkpart name fs_type start end
replacing name with the original partition name (refer to the command output you saved at point 5), fs_type with original file system type, start with the end value in MB of the previous partition, and end with start + size, where size will be the size of the target partition (size is the original size of the partition except for system_b which I've decided to change to 4221MB, 1000MB larger than original one). If it says that the partition isn't aligned, type Ignore. In my case I'll type:
Code:
mkpart system_b ext4 5630MB 9851MB
mkpart oem_a ext2 9851MB 9918.1MB
mkpart oem_b ext2 9918.1MB 9985.3MB
mkpart userdata ext4 9985.3MB 128GB
Now restore the partition flags typing
Code:
set partition_number msftdata on
replacing partition_number with the number of the partition. In my case I'll type:
Code:
set 39 msftdata on
set 40 msftdata on
set 41 msftdata on
set 42 msftdata on
Now type again
Code:
p free
and compare the output with the original table saved before, they should be quite identical.
Type:
Code:
quit
exit
Reboot to bootloader and boot again into TWRP
If in the logs you see lot of red lines saying it could not mount oem partition and userdata partition don't panic, it is normal since they have not been formatted yet (they are registered into fstab with a different file system type). Type:
Code:
adb shell
mkfs.fs_type /dev/block/sdapartition_number
replacing fs_type with original file system type, partition_number with the number of the partition. In my case I'll type:
Code:
adb shell
mkfs.ext4 /dev/block/sda39
mkfs.ext2 /dev/block/sda40
mkfs.ext2 /dev/block/sda41
mkfs.f2fs /dev/block/sda42
Now reboot to bootloader and again into TWRP. Logs now should be free of red lines and you should be able to mount all partitions again.
You have done it!! Now you are able to flash larger GSI (I suggest you doing it from TWRP since fastboot may have some problem recognizing the resized partition size, also remember to change the active slot to the resized one, in my case the slot b)
Reserved
Why this?
GSI running like Havoc, Dotos...
Is this for running Android 12?
Vanilla GSIs will work without this. But larger GSIs that include Gapps will not because they are larger than system partition (like Pixel Experience, dotOS with Gapps, etc.). You can still flash vanilla build and Gapps zip of course to avoid doing this.
Regarding Android 12 I have not tried it yet.
please someone port postmarketos to this device, kane has a lot of potential
edit: i'm talking about pmos, because this resizing process has sense only for postmarket, if any other roms are bigger than system part, than they are just bloated worthless ****s.
sorry to bother you.
i found your post after long time of searching. I'm noob for installing GSI,to do so i need to resize system partition.but i have zero idea about resizing and also seems like its very critical,and if i made any mistake to resizing it i may have to lost my phone forever.
I'm here to make a request to you that if you help me out to resize partition by a easiest way .i hope you won't reject me. I'm really fed up about resizing.here is my device details
phone: mi 8 pro
codename: equuleus
Rom : 128 GB
Default system partition size : 2.74GB
Hope you will help me
shahrair said:
sorry to bother you.
i found your post after long time of searching. I'm noob for installing GSI,to do so i need to resize system partition.but i have zero idea about resizing and also seems like its very critical,and if i made any mistake to resizing it i may have to lost my phone forever.
I'm here to make a request to you that if you help me out to resize partition by a easiest way .i hope you won't reject me. I'm really fed up about resizing.here is my device details
phone: mi 8 pro
codename: equuleus
Rom : 128 GB
Default system partition size : 2.74GB
Hope you will help me
Click to expand...
Click to collapse
what did you do wrong?
my device does not have /sda, any solution?
Sammm77 said:
my device does not have /sda, any solution?
Click to expand...
Click to collapse
it might be mmcblk0
lol.mam said:
it might be mmcblk0
Click to expand...
Click to collapse
Yep, but partitions like /system /vendor /system_ext and product do not appear, is it because of super partition?
Some phones also need system_a resized. I couldn't install a bigger GSI on One Action/troika and resizing system_a fixed it.
as partições ( parted /dev/block/mmcblk0 )e (parted /dev/block/sda) não contém partições, mas as
(parted /dev/block/sdb) (parted /dev/block/sde) (parted /dev/block/sdf) contém as partiçoes. posso trabalhar nelas??
SDF (parted) parted /dev/block/sdf
Number Start End Size File system Name Flags
1 131kB 655kB 524kB aop_b
2 655kB 4850kB 4194kB tz_b
3 4850kB 5374kB 524kB hyp_b
4 5374kB 5505kB 131kB storsec_b
5 5505kB 5636kB 131kB devcfg_b
6 5636kB 6160kB 524kB keymaster_b
7 6160kB 6685kB 524kB cmnlib_b
8 6685kB 7209kB 524kB cmnlib64_b
9 7209kB 7471kB 262kB prov_b
10 7471kB 8520kB 1049kB abl_b
11 8520kB 8602kB 81.9kB qupfw_b
12 8651kB 10.7MB 2097kB uefisecapp_b
13 10.7MB 10.8MB 32.8kB multiimgoem_b
14 10.8MB 10.8MB 32.8kB multiimgqti_b
15 10.8MB 10.9MB 65.5kB vbmeta_b
16 10.9MB 36.0MB 25.2MB ext2 fsg_b
17 36.0MB 183MB 147MB ext2 modem_b
18 183MB 216MB 33.6MB ext4 dsp_b
19 216MB 217MB 1049kB ext2 bluetooth_b
20 217MB 251MB 33.6MB logo_b
21 251MB 318MB 67.1MB boot_b
22 318MB 343MB 25.2MB dtbo_b
23 343MB 1149MB 805MB ext2 vendor_b
24 1149MB 4638MB 3490MB ext2 system_b
25 4638MB 4949MB 310MB ext2 oem_b
SDB parted /dev/block/sdb
Number Start End Size File system Name Flags
1 131kB 139kB 8192B ssd
2 262kB 33.8MB 33.6MB ext4 persist
3 33.8MB 42.2MB 8389kB ext4 prodpersist
4 42.2MB 43.3MB 1049kB misc
5 43.3MB 43.8MB 524kB keystore
6 43.8MB 44.3MB 524kB frp
7 44.3MB 44.8MB 524kB utags
8 44.8MB 45.4MB 524kB utagsBackup
9 45.4MB 45.5MB 131kB cid
10 45.5MB 62.3MB 16.8MB metadata
11 62.3MB 70.6MB 8389kB kpan
12 70.6MB 79.0MB 8389kB sp
13 79.0MB 95.8MB 16.8MB carrier
14 95.8MB 97.9MB 2097kB modemst1
15 97.9MB 100MB 2097kB modemst2
16 100MB 100MB 131kB fsc
17 100MB 100MB 32.8kB dhob
18 100MB 100MB 4096B devinfo
19 100MB 109MB 8389kB logfs
20 109MB 109MB 262kB apdp
21 109MB 117MB 8389kB spunvm
22 117MB 118MB 524kB uefivarstore
23 118MB 118GB 118GB userdata
SDE (parted) parted /dev/block/sde
Number Start End Size File system Name Flags
1 131kB 655kB 524kB aop_a
2 655kB 4850kB 4194kB tz_a
3 4850kB 5374kB 524kB hyp_a
4 5374kB 5505kB 131kB storsec_a
5 5505kB 5636kB 131kB devcfg_a
6 5636kB 6160kB 524kB keymaster_a
7 6160kB 6685kB 524kB cmnlib_a
8 6685kB 7209kB 524kB cmnlib64_a
9 7209kB 7471kB 262kB prov_a
10 7471kB 8520kB 1049kB abl_a
11 8520kB 8602kB 81.9kB qupfw_a
12 8651kB 10.7MB 2097kB uefisecapp_a
13 10.7MB 10.8MB 32.8kB multiimgoem_a
14 10.8MB 10.8MB 32.8kB multiimgqti_a
15 10.8MB 10.9MB 65.5kB vbmeta_a
16 10.9MB 36.0MB 25.2MB ext2 fsg_a
17 36.0MB 183MB 147MB ext2 modem_a msftdata
18 183MB 216MB 33.6MB ext4 dsp_a
19 216MB 217MB 1049kB ext2 bluetooth_a
20 217MB 251MB 33.6MB logo_a
21 251MB 318MB 67.1MB boot_a
22 318MB 343MB 25.2MB dtbo_a
23 343MB 1149MB 805MB ext2 vendor_a
24 1149MB 4638MB 3490MB ext2 system_a
25 4638MB 4949MB 310MB ext2 oem_a
My device: SM-A528B
Hello, I need to increase the partition for GSI. Could you please help me? Which section should I enlarge and what commands should I enter? (I tried to do everything according to the instructions, but I had questions and nothing happened)
1. I put the file (parted) in the root of the disk (C) and wrote (adb push C:/parted /sbin/ parted) is that correct?
2. What should I enter in (fs_type), (msftdata) if I have spaces here?
3. After the second input (p free), I lost the names of the modified sections.
4. The red lines in TWRP did not disappear anywhere and I could not boot into the system.
Sammm77 said:
Yep, but partitions like /system /vendor /system_ext and product do not appear, is it because of super partition?
Click to expand...
Click to collapse
Were you able to figure out how to expand the system partition with a super partition?
For fastboot to take the partition names use the following parted command:
Code:
name <partition-number> <partition-name>
On some devices this helps a lot, consider adding it to the main thread ^^
Some devices also use /dev/block/mmcblk0 instead of /dev/block/sda
Hi, how can i add partition like product and vbmeta, tried to add using "mkpart PRODUCT ext4 start end" then "mkpart VBMETA space start end" it added but cant flash using twrp, tried on fastboot "Fastboot flash product product.img" then same with vbmeta. but nothing works, zip files cant mount those. Please help

Categories

Resources