[DEV][ Expand System Partition To 4GB - P9 Lite ]

Search This thread

EndemicRocket

New member
May 25, 2022
4
0
Please check LOS 17.1 thread, it's state clearly what TWRP you should have on your device !

EDIT:

> adb shell ls -l data/local should return tmp, try to solve your issues !
My device and frp is unlock.
I've flashed correct TWRP, which is 3.2.3-10.
I have formatted data to decrypt device.
I have rebooted into recovery to use data.
The data was already f2fs.
From advanced wipe, I cleaned everything besides Internal Storage and SD card.
I extracted mkfs.ext4 and parted from zip on 1st post.
I've put them into tmp directory, which is in C:\adb
I had already phone connected to pc and had already booted into recovery.
Finally, I attempted to do next step, which was "adb push tmp data/local" and still got same error, after every single step behind this.
I don't know if I am missing something either on PC or phone but if I do, tell me. The only thing I know is that I've only installed adb on PC.

screenshot:
1653510344449.png
 

surdu_petru

Recognized Contributor
Feb 3, 2010
7,149
23,139
Paris
My device and frp is unlock.
I've flashed correct TWRP, which is 3.2.3-10.
I have formatted data to decrypt device.
I have rebooted into recovery to use data.
The data was already f2fs.
From advanced wipe, I cleaned everything besides Internal Storage and SD card.
I extracted mkfs.ext4 and parted from zip on 1st post.
I've put them into tmp directory, which is in C:\adb
I had already phone connected to pc and had already booted into recovery.
Finally, I attempted to do next step, which was "adb push tmp data/local" and still got same error, after every single step behind this.
I don't know if I am missing something either on PC or phone but if I do, tell me. The only thing I know is that I've only installed adb on PC.

screenshot:View attachment 5622865
I'm sorry, but you should already run LOS 17.1 before to follow this tutorial ... of course you shouldn't format data because there will be no data/local/tmp ...
 

surdu_petru

Recognized Contributor
Feb 3, 2010
7,149
23,139
Paris

EndemicRocket


In your case now, you can try to create "local" & "tmp" directory on data, maybe you can push successfully after , so try these commands :

> adb shell
# mkdir data/local
# chmod 0755 data/local
# mkdir data/local/tmp
# chmod 0755 data/local/tmp
# exit
> adb push tmp data/local
 

Andeos

New member
Jun 12, 2022
1
0
Hello!
I did this yesterday to try the LOS 17.1 ROM on my VNS-L21 P9 Lite, and as much as I like it, I really need the camera support.
I would like to go back to the stock rom now. Do I need to manually restore the partitions to stock with parted before trying to install the stock rom?
I will try to follow this guide: https://forum.xda-developers.com/t/how-to-go-to-stock-rom-with-twrp.3738485/post-75282550
And I got my stock rom from here (I think VNS-L21C22B383 is correct for my phone): https://androidhost.ru/bwv
 

Samuel-124

New member
Jul 24, 2020
1
0
I unintentionally deleted the whole partition and forgot to back it up before hand , I figured how to create new partitions , name and set them but I need the "(parted) print" log (the 6 lines on the threat were the same so I assume the rest should be the same as well) can someone send it to me
 
Hi, I have unintentionally broke my GPT header (I think so) and there are only one partition listed here by `(parted) print` - userdata. Does anyone know how to fix GPT? Please anyone give me the list of partitions with offsets and sizes here from working one (effectively what print returns). Thanks
 

NorthenPL

Member
Nov 27, 2022
5
3
16
Łódź, PL
- copy the two executable files from the computer to the device :
> adb push tmp data/local
> adb shell
When I try to use the first command, what I just get is the blinking cursor and nothing. Doesn't even automatically exit or return some error. Should I wait or do something about it? Nevermind. Done it manually by inserting them into the internal storage and then moving thrm into the sbin folder. After that, I had no problem doing further steps.
 
Last edited:
  • Like
Reactions: surdu_petru

Vrchnak

Member
Aug 9, 2016
8
0
Hello,

maybe you will be able to support me, I have installed Lineage OS 17.1 to my huawei p9 lite 2017. It looks everything what should working is working except audio. I followed steps for dd-ing product.img to product partition, I also tried total wipe of phone and start from beggining, but unfortunatelly audio in LineageOS is still not working. Does anybody have same issue?
 

stefastra

New member
Feb 3, 2023
1
0
Can someone provide the original partition values.. I accidentally deleted partition number 4 and I don't remember what it was used for... I am having trouble flashing roms without it if anyone can help by providing the original print results
missingno.png
 

Mark8:9

Member
Sep 4, 2022
16
0
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 !
Good evening,
Can this version of Android be installed on Huawei p9 lite 2016 vns-l31 smartphones?
Now I'm using lineage 14. Thanks. I await reply.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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 :
    44 1057MB 3137MB 2080MB ext2 system msftdata
    45 3137MB 3339MB 201MB ext4 cust msftdata
    46 3339MB 3372MB 33.6MB ext4 version msftdata
    47 3372MB 4010MB 638MB ext2 vendor msftdata
    48 4010MB 4211MB 201MB ext4 product msftdata
    49 4211MB 15.8GB 11.5GB userdata msftdata

    - 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 :
    > adb shell
    # dd if=/sdcard/product.img of=/dev/block/bootdevice/by-name/product
    393216+0 records in
    393216+0 records out
    201326592 bytes (192 M) copied, 10.460969 s, 18 M/s
    # reboot


    That's all !
    1
    Eventually I was able to boot into TWRP and could follow through. Thanks for the detailed description of all steps. Finally I can use the old phone with Android 10. Thanks a lot.
    1
    - copy the two executable files from the computer to the device :
    > adb push tmp data/local
    > adb shell
    When I try to use the first command, what I just get is the blinking cursor and nothing. Doesn't even automatically exit or return some error. Should I wait or do something about it? Nevermind. Done it manually by inserting them into the internal storage and then moving thrm into the sbin folder. After that, I had no problem doing further steps.