Hello !
Here you will find the information needed to change the system partition from 2GB to 4GB - this operation is somewhat useful for installing any version of GApps on your device using LOS 17.1 Android 10 : Huawei P9 Lite Kirin version !
Download mkfs.ext4 and parted from here :
https://forum.xda-developers.com/attachments/parted_gdisk_fdisk_mkfs-ext4-arm-zip.4494671/
Warning I: the entire data partition will be deleted following this procedure, make sure you have backed up and saved it to a microsd card
Warning II: if you have sound issues, please check Step III !
Step I : extended system partition from about 2GB to 4GB ( example for a device with 16GB )
- extract "mkfs.ext4" and "parted" from previously download archive and put them into a new created tmp directory
- connect the device to the computer via the USB cable and bring the device into TWRP revovery with this command :
> adb reboot recovery
- copy the two executable files from the computer to the device :
> adb push tmp data/local
> adb shell
# cp -r data/local/tmp/mkfs.ext4 sbin/mkfs.ext4
# chmod 0777 sbin/mkfs.ext4
# cp -r data/local/tmp/parted sbin/parted
# chmod 0777 sbin/parted
- launch the "parted" function as follows :
# parted /dev/block/mmcblk0
- display all properties of all partitions : (I wrote what needs to be displayed as a command before pressing enter, so you just have to type "print" and press enter because (parted) is already displayed as promter ... be careful not to type (parted) twice in the following commands)
(parted) print
- go to line 44, which should be the same for all devices :
- if line 44 is not identical to this one here, please stop the process by writing quit and enter, I'm waiting for a private message with what is written on line 44 in the case of your device so that I can guide you correctly .
- assuming that all devices have the same system partition ( the same 44 line ) - approximately 2GB, we go to the next steps:
- access the Mount menu in TWRP and uncheck Data, and follow the steps below step by step :
(parted) rm 49
(parted) rm 48
(parted) rm 47
(parted) rm 46
(parted) rm 45
(parted) rm 44
(parted) mkpart system ext2 1057 5319
(parted) name 44 system
(parted) set 44 msftdata on
(parted) mkpart cust ext4 5319 5521
(parted) name 45 cust
(parted) set 45 msftdata on
(parted) mkpart version ext4 5521 5554
(parted) name 46 version
(parted) set 46 msftdata on
(parted) mkpart vendor ext2 5554 6192
(parted) name 47 vendor
(parted) set 47 msftdata on
(parted) mkpart product ext4 6192 6393
(parted) name 48 product
(parted) set 48 msftdata on
- for devices with 16GB :
(parted) mkpart userdata 6393 15.8GB
- for devices with 32GB :
(parted) mkpart userdata 6393 31.3GB
- for devices with 64GB :
(parted) mkpart userdata 6393 62.5GB
(parted) name 49 userdata
(parted) set 49 msftdata on
(parted) quit
Step II : activating partitions for reuse :
# mkfs.ext4 /dev/block/mmcblk0p44
# mkfs.ext4 /dev/block/mmcblk0p45
# mkfs.ext4 /dev/block/mmcblk0p46
# mkfs.ext4 /dev/block/mmcblk0p47
# mkfs.ext4 /dev/block/mmcblk0p48
# mkfs.ext4 /dev/block/mmcblk0p49
- go to TWRP -> Wipe -> Advanced Wipe -> select System -> Repair or Change File System -> Change File System -> EXT4 -> Swipe to Change
- go to TWRP -> Wipe -> Advanced Wipe -> select Vendor -> Repair or Change File System -> Change File System -> EXT4 -> Swipe to Change
- go to TWRP -> Wipe -> Format Data -> yes
- reboot device from TWRP to TWRP in order to use data again after formated !
- go to TWRP -> Wipe -> Advanced Wipe -> select Dalvik/ART Cache, Cache, Data, Internal Storage, System, Vendor -> Swipe to wipe
- copy the new updated of LOS 17.1 with system partition of 4GB into your device
- copy any GApps arm64 Android 10 to your device
- Install them like always, enjoy !
Reboot to System in order to enjoy your Android 10 with almost any version of GApps !
Step III: flash back product image to fix sound issues !
- download
product.img md5: 848880f9b74686394b0b4667620b5682
- go to TWRP and copy product.img on your internal memory
- flash product image to product partition :
That's all !