[GSI][ANDROID 12 STABLE] Android 12 and any GSI larger than 2.6GB - Google Pixel 2 XL ROMs, Kernels, Recoveries, & Oth

If you need help, feel free to post logs here. For more discussions about Android 12/GSIs join the telegram group!!
*REQUIRED FOR GSI* Follow the guide I made here to increase your system partition.
Click to expand...
Click to collapse
Download Android 12 Stable (Pixel 4a) GSI here: Direct link.
You don't need Gapps, they are preloaded.
Click to expand...
Click to collapse
Make sure to use Android 11 as base before flashing the GSI.
After that, you can install any GSI/flash any size Gapps without issue.
Reboot into fastboot mode.
Wipe your data partition: fastboot format:ext4 userdata
Clean cache and factory reset: fastboot -w
flash the GSI: fastboot flash system_a path/to/system.img
flash the GSI in other slot: fastboot flash system_b path/to/system.img
Test boot.
If it doesn't boot, download vbmeta for your device and flash in fastboot mode.
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
fastboot -w
Bugs:
No sound in call.
Some fixes:
Install GMS with adb install -r -d path/to/gms.apk to login to Google (not necessary anymore)
After flashing system image, don't reboot into system, immediately boot into TWRP and flash this file! This is necessary to disable encryption, so TWRP can boot successfully.
{
"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"
}
download

@Dollscythe
Appreciate the resize guide, especially as i like a full GApps install
But the ROM is impossible to download it seems...
Note: Im able to download other files at SF
Update: Finally found a working mirror - for anyone else try the Gigenet mirror (Chicago), by clicking "Problems Downloading"

Dollscythe said:
If you need help, join the telegram group.
Follow the guide I made here to increase your system partition.
USE STOCK RECOVERY!!!!!!!!
After that, you can install any GSI/flash any size Gapps without issue.
Download Android 12 Beta 3.1 GSI here: Direct link
You don't need Gapps, they are preloaded.
Reboot into fastboot mode.
Wipe your data partition: fastboot format:ext4 userdata
Clean cache and factory reset: fastboot -w
flash the GSI: fastboot flash system_a path/to/system.img
flash the GSI in other slot: flash system_b path/to/system.img
Test boot.
If it doesn't boot, flash this file in fastboot mode.
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot -w
View attachment 5371367View attachment 5371395View attachment 5371423View attachment 5371425View attachment 5371427View attachment 5371429View attachment 5371431View attachment 5371433
Click to expand...
Click to collapse
Be great to know who's working who no on this rom. Thank you

irmas5 said:
Be great to know who's working who no on this rom. Thank you
Click to expand...
Click to collapse
For now FP and calling is not working. Everything else is perfect. This rom is for those who want to test new theming etc.
I am working on a fix for fp and RIL.

Wait... Does it for Pixel 3 but not Pixel 2 XL?

123哆3 said:
Wait... Does it for Pixel 3 but not Pixel 2 XL?
Click to expand...
Click to collapse
This guide is for pixel 2xl.
the GSI is ported from pixel 3 android S beta 3.1, but it works on pixel 2xl and all A/B devices.

Dollscythe said:
For now FP and calling is not working. Everything else is perfect. This rom is for those who want to test new theming etc.
I am working on a fix for fp and RIL.
Click to expand...
Click to collapse
it's necessary resize system partition? i'm scared to brick phone.

irmas5 said:
it's necessary resize system partition? i'm scared to brick phone.
Click to expand...
Click to collapse
for android 12 and some GSI, yes.

Update! With GMS, overlay, and fingerprint sensor fixes. We are getting closer!
And the users that had unbootable slot error, it should be fixed too if you flash vbmeta. Make sure to follow the fixes section too.
EDIT: RIL is fine, SMS is fine, we can even accept and take calls. But there's no sound! Any devs can chime in and help?

Dollscythe said:
Update! With GMS, overlay, and fingerprint sensor fixes. We are getting closer!
And the users that had unbootable slot error, it should be fixed too if you flash vbmeta. Make sure to follow the fixes section too.
EDIT: RIL is fine, SMS is fine, we can even accept and take calls. But there's no sound! Any devs can chime in and help?
Click to expand...
Click to collapse
tryed repart and get a bootloop. deleting partition disconected phone from laptop, Tryed flash via deuces script. showing installed, restarting, but never not booting. stuck at google logo. Can you help me please?

irmas5 said:
tryed repart and get a bootloop. deleting partition disconected phone from laptop, Tryed flash via deuces script. showing installed, restarting, but never not booting. stuck at google logo. Can you help me please?
Click to expand...
Click to collapse
show me your new partition table
boot to twrp
Copy parted to /sbin.
adb push path/to/parted /sbin
Enter shell mode.
adb shell
Change permissions of parted.
chmod 777 /sbin/parted
then do parted /dev/block/sda

Dollscythe said:
show me your new partition table
boot to twrp
Copy parted to /sbin.
adb push path/to/parted /sbin
Enter shell mode.
adb shell
Change permissions of parted.
chmod 777 /sbin/parted
then do parted /dev/block/sda
Click to expand...
Click to collapse
PS C:\platform-tools> adb push "C:\Users\irmas\Desktop\Pixel 2 xl\parted"/sbin
2250 KB/s (470788 bytes in 0.204s)
PS C:\platform-tools> adb shell
taimen:/ # chmod 777 /sbin/parted
taimen:/ # parted /dev/block/sda
GNU Parted 3.2
Using /dev/block/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) p free
Model: SAMSUNG KLUCG4J1ED-B0C1 (scsi)
Disk /dev/block/sda: 62.5GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
12.3kB 24.6kB 12.3kB Free Space
1 24.6kB 50.4MB 50.3MB laf_a
2 50.4MB 101MB 50.3MB laf_b
3 101MB 101MB 8192B ssd
4 101MB 134MB 33.6MB ext4 persist
5 134MB 135MB 1049kB misc
6 135MB 169MB 33.6MB ftm
7 169MB 2853MB 2684MB ext2 system_a
8 2853MB 5538MB 2684MB ext2 system_b
9 5538MB 5546MB 8389kB pstore
10 5546MB 5546MB 524kB aes_a
5546MB 62.5GB 57.0GB Free Space
(parted)

I fixed.

irmas5 said:
PS C:\platform-tools> adb push "C:\Users\irmas\Desktop\Pixel 2 xl\parted"/sbin
2250 KB/s (470788 bytes in 0.204s)
PS C:\platform-tools> adb shell
taimen:/ # chmod 777 /sbin/parted
taimen:/ # parted /dev/block/sda
GNU Parted 3.2
Using /dev/block/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) p free
Model: SAMSUNG KLUCG4J1ED-B0C1 (scsi)
Disk /dev/block/sda: 62.5GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
12.3kB 24.6kB 12.3kB Free Space
1 24.6kB 50.4MB 50.3MB laf_a
2 50.4MB 101MB 50.3MB laf_b
3 101MB 101MB 8192B ssd
4 101MB 134MB 33.6MB ext4 persist
5 134MB 135MB 1049kB misc
6 135MB 169MB 33.6MB ftm
7 169MB 2853MB 2684MB ext2 system_a
8 2853MB 5538MB 2684MB ext2 system_b
9 5538MB 5546MB 8389kB pstore
10 5546MB 5546MB 524kB aes_a
5546MB 62.5GB 57.0GB Free Space
(parted)
Click to expand...
Click to collapse
You didnt finish the partitions.
there's supposed to be aes_b, and userdata, etc.
you didnt follow the tutorial properly

plus, from what you sent me, your system is still 2.6 GB. you didnt properly finish deleting the partitions with 'rm' command. you stopped at aes_b.

Dollscythe said:
plus, from what you sent me, your system is still 2.6 GB. you didnt properly finish deleting the partitions with 'rm' command. you stopped at aes_b.
Click to expand...
Click to collapse
I restarted again everything from begining and now goes well. Now flashed proton aosp and booting. now showing
PS C:\platform-tools> adb shell
taimen:/ # chmod 777 /sbin/parted
taimen:/ # parted /dev/block/sda
GNU Parted 3.2
Using /dev/block/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p free
Model: SAMSUNG KLUCG4J1ED-B0C1 (scsi)
Disk /dev/block/sda: 62.5GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
12.3kB 24.6kB 12.3kB Free Space
1 24.6kB 50.4MB 50.3MB laf_a
2 50.4MB 101MB 50.3MB laf_b
3 101MB 101MB 8192B ssd
4 101MB 134MB 33.6MB ext4 persist
5 134MB 135MB 1049kB misc
6 135MB 169MB 33.6MB ftm
7 169MB 3269MB 3100MB ext2 system_a
3269MB 3269MB 459kB Free Space
8 3269MB 6369MB 3100MB ext2 system_b
9 6369MB 6379MB 9953kB pstore
10 6379MB 6380MB 999kB aes_a
11 6380MB 6381MB 999kB aes_b
12 6381MB 6391MB 9998kB align_parti
6391MB 6391MB 69.6kB Free Space
13 6391MB 62.5GB 56.1GB ext4 userdata
62.5GB 62.5GB 12.3kB Free Space

73sydney said:
@Dollscythe
Appreciate the resize guide, especially as i like a full GApps install
But the ROM is impossible to download it seems...
Note: Im able to download other files at SF
Update: Finally found a working mirror - for anyone else try the Gigenet mirror (Chicago), by clicking "Problems Downloading"
Click to expand...
Click to collapse
since opengapps is back, this guide is perfect to flash the highest gapps package possible. i have 4GB system partition XD

134|taimen:/ # parted /dev/block/sda
Warning: Device /dev/block/sda has a logical sector size of 4096. Not all parts
of GNU Parted support this at the moment, and the working code is HIGHLY
EXPERIMENTAL.
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p free
p free
You found a bug in GNU Parted! Here's what you have to do:
Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:
Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:
http://ftp.gnu.org/gnu/parted/
Please check this version prior to bug reporting.
If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:
http://www.gnu.org/software/parted
for further information.
Your report should contain the version of this release (1.8.8.1.179-aef3)
along with the error message below, the output of
parted DEVICE unit co print unit s print
and the following history of commands you entered.
Also include any additional information about your setup you
consider important.
Error: SEGV_MAPERR (Address not mapped to object)
Aborted
What caused this????

make sure to push parted again and give it chmod perms (even if you did it before.)

This tutorial only applies to Taimen (2XL).
Can this operation not be performed in win10 environment

Related

[Discounted] [ONSCREEN KEYBOARD] [20-oct-2012] Linux on your Kindle Fire

hi!
This is my manual for how to install linux on your Kindle Fire.
there are some some steps you should to do.
1. Assure you have working adb and fastboot.
2. Download the follwing files: kernel (http://narod.ru/disk/59236733001.2e2d29e2c7bd762bd285ddf22a9c3fc6/boot1.img.html), bootloader (http://www.mediafire.com/?l6aaqgsdkiksfw0), and linux rootfs (new image has been uploaded.[url]http://depositfiles.com/files/mkpjrbixe
) , COTR recovery (http://narod.ru/disk/59880845001.8639567518823dcc1a9e4d51161ad75b/recovery_CTOR.img.html)
3. unpack these files and place them to adb & fastboot directory
4. reboot your kindle into fastboot.
5. boot CWM recovery by fastboot boot recovery_COTR.img
6.it's very important step. be careful with your sdcard partition.
now you'll resize it and make partition for Linux installation.
type the following in command line (windows/msdos) (terminal (linux/mac)):
~$: adb shell
then parted /dev/block/mmcblk0
then resize
then 12
then 2309 (start?)
then 5680 (end?) (it takes some time to resize partition)
then mkpart 13 5680 7597
then mkpart 14 7597 7609
then type quit
then mke2fs -T ext4 /dev/block/mmcblk0p13
then parted /dev/block/mmcblk0 name 14 linuxboot
then parted /dev/block/mmcblk0 name 13 linux
after doing this do the following:
mount sdcard storage to computer
now you must format sdcard partition.
in Windows select "Format" in main menu.
then place deb.img file to storage (it also called sdcard)
after copying debian image select safely remove in tray, but don't disconnect your kindle from computer.
on the screen tap Unmount button.
then type in command line: adb shell
then cd /mnt/sdcard/
then dd if=/deb.img of=/dev/block/mmcblk0p13
it took me about 20 minutes.
after that reboot into fastboot and type the following:
fastboot flash linuxboot boot1.img
fastboot flash bootloader u-boot.bin
7. all done.
8. enjoy
videos of how-to:
http://www.youtube.com/watch?edit=vd&v=4DBELK0cCpI
http://www.youtube.com/watch?edit=vd&v=F-IjFgBVHVM
there are images and video:
http://www.youtube.com/watch?v=NEXxSxhLoOI
{
"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"
}
Thanks to:
Hascode
Seishuku
And others
If it's plug and play I would love to try it out.
Sent from my MB855 using xda premium
rbeavers said:
If it's plug and play I would love to try it out.
Sent from my MB855 using xda premium
Click to expand...
Click to collapse
what does you mean by p`n`p?
rbeavers said:
If it's plug and play I would love to try it out.
Sent from my MB855 using xda premium
Click to expand...
Click to collapse
you should follow guide by seishuku to install this. i simply solved some causes for myself. i think that my vision of this debian setup is rather good.
i also working on touchscreen bug and wifi.
later i`ll add suspending by power button and ability to managing sound volume and screen brightness
I was downloading it. But it looks kind of hard to install
Sent from my Amazon Kindle Fire using XDA Premium HD app
Very good job .
Envoyé depuis mon GT-I9000 avec Tapatalk
partition layout
link to download deb.img: http://depositfiles.com/files/aq1vtxbr0
after downloading my image you should make the same partition layout.
simply reboot your kindle in fastboot and boot it from CWM recovery (it contains program parted( partition manager). you should know how to use it).
after repartitioning select "reboot into fastboot" in reboot options in "reboot options"
and flash debian partition with my image (i called mine as "linux"(flash command is: fastboot flash linux deb.img))).
also you must install the seishuku's bootloader http://www.mediafire.com/?l6aaqgsdkiksfw0
and make empty partition to flash kernel (it must be named linuxboot link to download is:http://upwap.ru/2675690) (partition number for debian should be 13!!!!)
you MUST flash bootloader ONLY after flashing debian image!!!
because every when you flash bootloder you update partition scheme in bootloader configuration.
MacBook-Aroslav:~ yaroslav$ adb shell
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC 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 5680MB 3371MB fat32 media msftres
13 5680MB 7597MB 1917MB ext2 linux
14 7597MB 7609MB 12.0MB linuxboot
(parted)
after doing all this you`ll get fully working deabian tabletop
installing is easy)
enjoy)
just for fun.
a little later i`ll make a detailed guide how to install this if you have stock kindle.
it'll be simple, so beginners colud follow my future guide and install debian and make dualboot for android and debian
a little later i`ll make a detailed guide how to install this if you have stock kindle.
it'll be simple, so beginners colud follow my future guide and install debian and make dualboot for android and debian
I will continue to fix bugs and add features and improve performance
Please feel free to ask any questions about this topic
Someone needs to try booting Chromium on it!
BTW, you still need OTG, correct?
Jessical said:
Someone needs to try booting Chromium on it!
BTW, you still need OTG, correct?
Click to expand...
Click to collapse
yes of course.
you still need OTG. but. but. i`m working on wifi and touchscreen. also i want not to use OTG with kbd and mouse.
He would be nice if you could make a video about how to install it
Sent from my Amazon Kindle Fire using XDA Premium HD app
jsisaev said:
what does you mean by p`n`p?
Click to expand...
Click to collapse
I can flash it, and it works ;')
Sent from my MB855 using xda premium
rbeavers said:
I can flash it, and it works ;')
Sent from my MB855 using xda premium
Click to expand...
Click to collapse
you can flash this using dd or fastboot. i recommend you to reboot in recovery, place deb.img to sdcard and do the folowing: open a terminal. do adb shell (your kindle must be in recovery). then change current directory to /sdcard and enter this: dd if=deb.img of=/dev/block/mmcblk0p13
Do you need a keyboard or can you use the on-screen one?
FroyoShark said:
Do you need a keyboard or can you use the on-screen one?
Click to expand...
Click to collapse
i'm searching onscreen keyboard.
at once i got touchscreen working correctly.
I`ll upload new image tomorrow
After installing it on my Fire, I have a few questions, One: Do you have the mouse bugout fixed? Two: Am I going to have to download a big IMG again? And three: Can you make a DSL port after this one is perfected?
Also, Can you fix it to support OTG please?
Starzie said:
After installing it on my Fire, I have a few questions, One: Do you have the mouse bugout fixed? Two: Am I going to have to download a big IMG again? And three: Can you make a DSL port after this one is perfected?
Also, Can you fix it to support OTG please?
Click to expand...
Click to collapse
otg is supported.
at once you may not to download new image. just do the following:
in file /usr/shrare/X11/xorg.conf.d/10-evdev.conf replace last section with the following:
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Option "SwapAxes" "yes"
Option "InvertY" "yes"
#Option "InvertX" "no"
Option "Calibration" "0 3950 0 2370"
#Option "IgnoreRelativeAxes" "yes"
Driver "evdev"
EndSection
after that reboot.
all done. you now have correctly working touchscreen

Unable to mount data & cache

Hi all, got my kindle fire brick. I think my partition is messed up. I bought a factory cable which able me to install twrp and i succefully(i guess) flashed energy ICS. But it prompt me "e:unable to mount '/data" e:unable to mount '/cache". I were to boot to normal boot it will just boot endlessly but i still can access to fff and twrp.i did some research on repartitioning for kindle fire but i need some guidance. Help is much appreciated
Sent from my GT-I9100 using xda app-developers app
Usually this is a fairly bad indication but do this go to the mount section in twrp and make sure there are no checks in the boxes of data and system if so uncheck them, I know you said data and cache but this should have a check in the box then try a reboot also were you previously using cwmr? If so you may have been bitten by the bug a very unsightly one that generally means the death of your kindle unless you know how to repartition around a broken emmc. What did you do prior to this that caused this to happen?
Also energy is not the best for good mounting just saying...
I was using fireparted to backup my partition when my pc suddenly shut down. Thats when everything screws up. Also my data and cache are not able to check or uncheck. I hope theres a kind soul to guide me through this process
Sent from my GT-I9100 using xda app-developers app
If you ask me I would say its toast but maybe someone knows a way to restore factory partitions I know many are looking for a solution for thier parts only kindle....
From what I understand...
Code:
fastboot oem format
...will rewrite your partition table to stock. And as long as you haven't messed with the partition sizes, your data will stay intact.
Enter:
Code:
shell cat /proc/partitions
To get a list of your current partitions and sizes to check to see if they even exist to begin with. And if so, it's likely just a case of broken or missing mountpoints.
Now, whether or not "fastboot oem format" will restore broken or missing mountpoints, I couldn't tell you for sure; I've never had to try it. But in your situation, it probably couldn't hurt to try.
You can also recreate mountpoints manually if needed.
[Edit:] It has just been explained to me that "fastboot oem format" won't do anything about mountpoints.
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
kinfauns said:
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
Click to expand...
Click to collapse
Pardon me for my Noob-ness, are the code to be execute on pc or on TWRP?
dean11 said:
Pardon me for my Noob-ness, are the code to be execute on pc or on TWRP?
Click to expand...
Click to collapse
Step back a bit and figure out how all of these things work together by reading the first 3 posts here...
http://forum.xda-developers.com/showthread.php?t=1552547
It will be a lot easier for you to understand what you are doing and why you are doing them. It will also explain how and where to run the commands.
kinfauns said:
Step back a bit and figure out how all of these things work together by reading the first 3 posts here...
http://forum.xda-developers.com/showthread.php?t=1552547
It will be a lot easier for you to understand what you are doing and why you are doing them. It will also explain how and where to run the commands.
Click to expand...
Click to collapse
OH MY GOOOOD!!!! MY KINDLE IS ALIVE!!!! THANK YOU SO MUCH @kinfauns!
kinfauns said:
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
Click to expand...
Click to collapse
I have the similar situation.
And when I use "parted" to check my kidle partition, there is no cache, and the userdata is ext2.
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 849000447B 178176B ext2 userdata
12 2448000000B 7748000255B 5300000256B fat32 media msftres
When I use the mke2fs to change the file system type, it returns this error
Not enough space to build proposed filesystem while setting up superblock.
Please help!
Thank you in advance!
june12 said:
I have the similar situation.
And when I use "parted" to check my kidle partition, there is no cache, and the userdata is ext2.
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 849000447B 178176B ext2 userdata
12 2448000000B 7748000255B 5300000256B fat32 media msftres
When I use the mke2fs to change the file system type, it returns this error
Not enough space to build proposed filesystem while setting up superblock.
Please help!
Thank you in advance!
Click to expand...
Click to collapse
I don't know who or what did that to your partition table, but partitions 10-12 are not right. It looks like mke2fs is complaining because your userdata partition is only ~178KB. I'm also a bit concerned that you've extended the media partition as far as you have. You might have some additional problems there.
The easiest way for you to get started on a fix is to get into fastboot mode with FFF and run...
Code:
fastboot oem format
That will bring your partition table back to stock, so you can run those mke2fs commands to remake those filesystems on the two partitions. You'll also have to remake the media partition in parted. You can find some instructions on how to do that here...
http://forum.xda-developers.com/showthread.php?t=1658885
Hey,
My current ROM is fine, but I can't mount data & cache in TWRP.
Nothing happens when I click mount data or mount cache in TWRP 2.6.3.1
I reflashed twrp two times and checked the md5sum.
When I try to backup my rom:
When I try a factory reset:
This is what I tried in fastboot:
Code:
fastboot oem format
...
OKAY [ 0.064s]
finished. total time: 0.065s
fastboot oem idme bootmode 4000
...
OKAY [ 0.081s]
finished. total time: 0.081s
fastboot reboot
rebooting...
finished. total time: -0.000s
adb shell cat /proc/partitions
major minor #blocks name
7 0 8348 loop0
179 0 7553024 mmcblk0
179 1 128 mmcblk0p1
179 2 256 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 196608 mmcblk0p4
179 5 16384 mmcblk0p5
179 6 65536 mmcblk0p6
179 7 10240 mmcblk0p7
179 8 5120 mmcblk0p8
179 9 524288 mmcblk0p9
179 10 1164288 mmcblk0p10
179 11 262144 mmcblk0p11
179 12 5254144 mmcblk0p12
179 64 512 mmcblk0boot1
179 32 512 mmcblk0boot0
254 0 8347 dm-0
The parted command isn't working for me.
I have never repartitioned them as far as I know.
Wha't wrong with my partitions?

[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

[GUIDE] Dual-Boot for P20 Lite

Code:
disclaimer
/*
* Your warranty is... still valid?
*
* I am not responsible for bricked devices, dead SD cards,
*/
Hello
This Guide to make Dual-Boot for P20 lite that keep Stock rom untouched and install any GSI. It allows two Android os installed at the same time and switch between them using SHRP Recovery for dual boot.
This method tested and worked on P20 lite (ANE LX1), Watch this video
Spoiler: General information
This done by creating a new system partition using Parted (shrink userdata partition and creat the new system partition)
To Boot from the new system partition: change the name of the new system partition to "system" and the name of old system partition to any name e.g. "system-b"
To Boot from the old system partition: change the name of the old system partition to "system" and the name of new system partition to any name e.g. "system-b"
Dual boot for P20 lite - demonstration video (I am using SHRP RECOVERY (like TWRP) with tweaks to change boot partition easily, instead of writing terminal commands. This a video shows the dual boot process)
Requirements​
TWRP/SHRP
Parted (attached arm64, unzip the file)
Latest fastboot and ADB commands installed
Backup all your data because you will make a factory reset and format data partition
Steps:​
Boot to TWRP/SHRP
Run the following commands
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
p free
3- it will show the list of partition "save this you may use it later". remember the number of old system partition which is in my case "52"
{
"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"
}
4- remove "userdata" partition which in my case number 59 using the following command
Code:
rm 59
5- create the new system partition (partition number 59 in my case ) using the following command
Code:
mkpart name fs_type start end
name: name of new partition e.g "system-b"
fs_type: file system type e.g "ex4"
start: the end value in MB of the previous partition, in my case "7153MB"
end: equal to start + size where size will be the size of the target partition. in my case in need 4GB partition so end=7153MB + 4GB =11153MB
In my case I'll type:
Code:
mkpart system-b ext4 7153MB 11153MB
set 59 msftdata on
name 59 system-b
6- create the "userdata" partition (partition number 60 in my case, start= 11153MB )
In my case I'll type:
Code:
mkpart userdata ext4 11153MB 31.3GB
set 60 msftdata on
name 60 userdata
7- get the new partition list
Code:
p free
8- exit
Code:
quit
9- format userdata and the new system partition using "mkfs.type /dev/block/mmcblk0pxx" (in my case partition number 59 and 60). you may need to reboot to stock recovery to make factory reset
Code:
adb push /path/to/mkfs.ext4 /sbin/mkfs.ext4
adb shell
chmod 777 /sbin/mkfs.ext4
mkfs.ext4 /dev/block/mmcblk0p59
mkfs.f2fs /dev/block/mmcblk0p60
10- You can now switch between two systems using either of these two methods
Spoiler: Using SHRP Recovery
SHRP is a beautiful TWRP-based recovery with modern UI, custom layout, useful functions, and more.
In this method you must have "System" and "System-b" partitions, other names not accepted
1- Download SHRP Recovery for DUAL Boot from here
2- Flash it on recovery_ramdisk or erecovery_ramdisk
3- from the main screen choose tweaks
A- Active new system partition and new data profile
(Important Note: Now "System partition" is the new created partition and "System-b partition" is the default system partition)
B- Active default system partition and default data profile
(Important Note: Now "System partition" is the default system partition and "System-b partition" is the new created partition)
Reboot before make any change
Spoiler: manually
A- To Boot from your new system partition > boot to twrp and run the following command
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
name 52 system-b
name 59 system
or from TWRP terminal write the following
Code:
parted -s /dev/block/mmcblk0 name 52 system-b
parted -s /dev/block/mmcblk0 name 59 system
change the number 52 and 59 according to your partition list (in my case 59: new system partion, 52 old system partition ). Then reboot TWRP and flash your new android os
B- To Boot from your old system partition > boot to twrp and run the following command
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
name 59 system-b
name 52 system
or from TWRP terminal write the following
Code:
parted -s /dev/block/mmcblk0 name 59 system-b
parted -s /dev/block/mmcblk0 name 52 system
change the number 52 and 59 according to your partition list (in my case 59: new system partion, 52 old system partition ). Then reboot
-------------------------------------------------------
Google Chrome may lag on the new data profile use this method to solve this problem
Abdelhay.ali said:
Code:
disclaimer
/*
* Your warranty is... still valid?
*
* I am not responsible for bricked devices, dead SD cards,
*/
Hello
This Guide to make Dual-Boot for P20 lite that keep Stock rom untouched and install any GSI. It allows two Android os installed at the same time and switch between them using SHRP Recovery for dual boot.
This method tested and worked on P20 lite (ANE LX1), Watch this video
Spoiler: General information
This done by creating a new system partition using Parted (shrink userdata partition and creat the new system partition)
To Boot from the new system partition: change the name of the new system partition to "system" and the name of old system partition to any name e.g. "system-b"
To Boot from the old system partition: change the name of the old system partition to "system" and the name of new system partition to any name e.g. "system-b"
Dual boot for P20 lite - demonstration video (I am using SHRP RECOVERY (like TWRP) with tweaks to change boot partition easily, instead of writing terminal commands. This a video shows the dual boot process)
Requirements​
TWRP/SHRP
Parted (attached arm64, unzip the file)
Latest fastboot and ADB commands installed
Backup all your data because you will make a factory reset and format data partition
Steps:​
Boot to TWRP/SHRP
Run the following commands
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
p free
3- it will show the list of partition "save this you may use it later". remember the number of old system partition which is in my case "52"
View attachment 5781191
4- remove "userdata" partition which in my case number 59 using the following command
Code:
rm 59
5- create the new system partition (partition number 59 in my case ) using the following command
Code:
mkpart name fs_type start end
name: name of new partition e.g "system-b"
fs_type: file system type e.g "ex4"
start: the end value in MB of the previous partition, in my case "7153MB"
end: equal to start + size where size will be the size of the target partition. in my case in need 4GB partition so end=7153MB + 4GB =11153MB
In my case I'll type:
Code:
mkpart system-b ext4 7153MB 11153MB
set 59 msftdata on
name 59 system-b
6- create the "userdata" partition (partition number 60 in my case, start= 11153MB )
In my case I'll type:
Code:
mkpart userdata ext4 11153MB 31.3GB
set 60 msftdata on
name 60 userdata
7- get the new partition list
Code:
p free
View attachment 5781193
8- exit
Code:
quit
9- format userdata and the new system partition using "mkfs.type /dev/block/mmcblk0pxx" (in my case partition number 59 and 60). you may need to reboot to stock recovery to make factory reset
Code:
adb push /path/to/mkfs.ext4 /sbin/mkfs.ext4
adb shell
chmod 777 /sbin/mkfs.ext4
mkfs.ext4 /dev/block/mmcblk0p59
mkfs.f2fs /dev/block/mmcblk0p60
10- You can now switch between two systems using either of these two methods
Spoiler: Using SHRP Recovery
SHRP is a beautiful TWRP-based recovery with modern UI, custom layout, useful functions, and more.
In this method you must have "System" and "System-b" partitions, other names not accepted
1- Download SHRP Recovery for DUAL Boot from here
2- Flash it on recovery_ramdisk or erecovery_ramdisk
3- from the main screen choose tweaks
View attachment 5781195
A- Active new system partition and new data profile
View attachment 5781197
(Important Note: Now "System partition" is the new created partition and "System-b partition" is the default system partition)
B- Active default system partition and default data profile
View attachment 5781199
(Important Note: Now "System partition" is the default system partition and "System-b partition" is the new created partition)
Reboot before make any change
Spoiler: manually
A- To Boot from your new system partition > boot to twrp and run the following command
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
name 52 system-b
name 59 system
or from TWRP terminal write the following
Code:
parted -s /dev/block/mmcblk0 name 52 system-b
parted -s /dev/block/mmcblk0 name 59 system
change the number 52 and 59 according to your partition list (in my case 59: new system partion, 52 old system partition ). Then reboot TWRP and flash your new android os
B- To Boot from your old system partition > boot to twrp and run the following command
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
name 59 system-b
name 52 system
or from TWRP terminal write the following
Code:
parted -s /dev/block/mmcblk0 name 59 system-b
parted -s /dev/block/mmcblk0 name 52 system
change the number 52 and 59 according to your partition list (in my case 59: new system partion, 52 old system partition ). Then reboot
-------------------------------------------------------
Click to expand...
Click to collapse
Hi.
I see from the video that you have riceos and evolution. How can I get these roms for the p20 lite. Also how are these roms?
ancient12 said:
Hi.
I see from the video that you have riceos and evolution. How can I get these roms for the p20 lite. Also how are these roms?
Click to expand...
Click to collapse
From here
Android 13 for P20 lite (Tested GSIs)
Here are recent A13 GSIs that booted and worked on my P20 lite Hi6250 Requirements: You can flash SHRP recovery that have all the requirements to make Android 13 boot normally (including permissive kernel, decrypt data, selinux fix, AIO fix and...
forum.xda-developers.com
Hi,
Is it possible to enable the A/B system updates feature on our devices with this method?
art0001 said:
Hi,
Is it possible to enable the A/B system updates feature on our devices with this method?
Click to expand...
Click to collapse
I think you have to implement it from the scratch like "OTA update" by phh. The new update should be flashed to the new system partition "system-b" then change it's name to "system"

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