[Treble-Enabled Device Guides, News, & Discussion] rendroid15:
Android 9.0 flashing guide

Back up all partitions on external sd card.

Check out this video on how to flash using qfil

https://youtu.be/TdkNaKpiiUw

https://xdaforums.com/project-treble/trebleenabled-device-development/9-0-pixelexperience-p-t3833294

Rom: PixelExperienceP-arm64-ab.zip

All the credits for the rom goes to developers in that thread, i have only flashed it to Lenovo z5.

What you will need:

TWRP.img https://drive.google.com/open?id=1yj9Vu-1YqR8kxMReP5pZerpLa-PKnZ1z

boot.img - This is the same boot.img in stock qpst from L78011_CN_OPEN_USER_Q00016.0_O_ZUI_3.9.200_ST_1807 21_qpst

or get it from here https://drive.google.com/open?id=14WNBcstAB3A40fafEhI2NWMAhGBtJge_

vbmeta.img https://drive.google.com/open?id=1dTIuxwKnfZFrE7HFtYSMqUx6gItXvxEB

ROM - PixelExperienceP-arm64-ab.img from the above link

Magisk superuser flash file (To be flashed through TWRP recovery) https://drive.google.com/open?id=1FV_ogrSU488bpI_hhuyA8rHm3Fj_xLqb

Magisk superuser apk https://drive.google.com/open?id=1hi_58d1nJ-PNe3aPKb_0YsLrh5ElOXVn

Step 1: Flash stock version L78011_CN_OPEN_USER_Q00016.0_O_ZUI_3.9.075_ST_180605_qpst using qfil mentioned earlier in this thread

(After flashing this stock rom, if your phone goes in to boot loop then don't worry about it, continue with the rest of the process)

Step 2:Unlock bootloader (This will void your warranty) (unlocking command: fastboot flashing unlock)

Step 3: boot to bootloader

Flash with the following commands.

1. adb reboot bootloader

2. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

3. fastboot flash boot_a boot.img

4. fastboot flash boot_b boot.img

5. fastboot -w flash system_a PixelExperienceP-arm64-ab.img

6. fastboot -w flash system_b PixelExperienceP-arm64-ab.img

7. fastboot flash boot twrp.img

8. Once twrp is flashed, do not turn off or restart your phone, press volume down twice, select option boot to recovery

9. Flash Magisk flash file(mentioned above, once this is done take pictures of the TWRP logs)

10. Do not clear any data or cache, we already did that

11. On first boot install Magisk apk mentioned above. That's it ! :)

Not working:

Notification LED

Working on Android 9:

Call

Camera

Fingerprint reader

WIFI

Mobile data(4G not sure about 3G)

Google Camera (If app crashes then follow procedure in this thread https://xdaforums.com/redmi-note-3/how-to/guide-how-to-enable-camera2-api-t3419579 )

Almost everything

Android 9.0

https://drive.google.com/open?id=1L_q2b8V0V7lIafcQsMVbKgqyRq3Tt2Hp

https://drive.google.com/open?id=1grkAu-FhZ56LKN82ubXYN3163ChTUVwr

https://drive.google.com/open?id=1yd5B0HN9Bund6UbJrEScbRsvrofExtT2

https://drive.google.com/open?id=1lWnH408p6aIREmEzl8IIKyE4UKS5V0Nk

https://drive.google.com/open?id=12EDJRbNm_4KVPD72FJ4Yem0gt3XE-BVr

https://drive.google.com/open?id=1RBt2miHzcvC9punEytJd_9aRyDwwhtV9

https://drive.google.com/open?id=1saTXcINKgbjw4HKxvRrSlbPrYk6GJfRr

https://drive.google.com/open?id=1QfLT5_gUk6k3U7o6ZJig8skn7Ckr--GK

https://drive.google.com/open?id=1pWJxmxO-ZzdNdGCK4LVO_zqxKpCQV5fG

Some snaps taken from the phone

https://drive.google.com/open?id=1w0GCNHKjuhE3x_A6xAwVgkYua0pMWGj-

https://drive.google.com/open?id=1GZ4LXyBHOL-zWEXrJVSMRPc07Nabg-eB

https://drive.google.com/open?id=1kTyVHk2Gr8LHekjvn7AwtnC92xrj0_7G

https://drive.google.com/open?id=1qgADqYoePMN9B5OMcpXw2pUc5DYXPCLI

If Windows doesnt detect phone in File Transfer mode:

Enable Developer options, turn off USB debugging.

If Mobile data doesnt work:

Settings > mobile data > Preferred network type = 4G and Choose your network providers Access point, if there is none then create one.

Special Thanks to EnesSastim and phhusson for their [9.0][GSI] PixelExperience P - UNOFFICIAL

Follow this process if you want to remove encryption:

This will delete the os and data on your phone. please backup everything before proceeding. External SD card will be untouched.

Flash L78011_CN_OPEN_USER_Q00016.0_O_ZUI_4.0.390_ST_180809_qpst via qfil (This step is to flash latest persist, firmware, vendor etc images available in 390, if you want to stay on 075 and you already have this stock image flashed, then you can skip this step)

TWRP: https://xdaforums.com/android/development/recovery-lenovo-z5-special-edition-twrp-t3850041

boot.img and persist.img are from version 390 of stock rom. (you can also use 075 images)

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

fastboot flash boot recovery-TWRP-3.2.3-1002-LENOVO_Z5-CN-wzsx150.img

Press volume down button twice and go to Recovery

(change language to english if needed)

In recovery backup all of your partitions on to External SD card.

Mount system, persist, firmware

Advanced > RM Forceencrypt

Select Remove DMVerity and Remove Forceencrypt

Swipt to confirm

(This should not throw any error in red fonts, should show Done in the end)

(If it says failed to mount Persist, then reboot to bootloader, fastboot flash persist persist.img)

In recovery goto Wipe

Select Format Data

type Yes (This will remove the encryption)

Reboot to bootloader

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

fastboot flash persist persist.img

fastboot -w flash system_a PixelExperienceP-arm64-ab.img

fastboot -w flash system_b PixelExperienceP-arm64-ab.img

fastboot flash boot twrp.img (older version of TWRP)

Boot to TWRP and flash Magisk

Here is the link to the video

https://www.youtube.com/watch?v=brS5tqfx2BQ&index=3&list=PLNqXvI29Azcg9lxA_n6ltytf9aFhn3T1d&t=1081s

download for 075

https://mega.nz/#F!9953xR6a!76EEVKmW3LtjE7tYPF2Z1Q

Return to Stock:

Downloads : ZUI5 https://drive.google.com/open?id=1IL8Pu3Ame9gu6jqAAkBQrEiRL1a93rHK

ZUI10 https://drive.google.com/open?id=1ANAZXbbygyZHAVNGmgoPimJ1fIKbK38D

Credits for ZUI 5 and Zui 10 goes to [MENTION=8374987]M.Z.F[/MENTION] and the original developer of the images in these zip files.

https://xdaforums.com/android/development/lenovo-z5-custom-roms-pie-t3904607

Steps to return to stock:(backup your data or everything will be wiped)

IF you are on Android 9.0

1) go to TWRP and back up all partitions on SD card (persist, vendor, system, data, boot, firmware, ... )

Step 2 and 3 will turn encryption on, so if u want to disable encryption, after step 3, flash recovery-TWRP-3.2.3-1020-LENOVO_Z5-CN-wzsx150.img and disable encryption. v 474 has new firmware and i have seen better call reception and data connectivity.

2) Flash stock L78011_CN_OPEN_USER_Q00016.0_O_ZUI_3.9.075_ST_180605_qpst through QFIL

3) Flash stock L78011_CN_OPEN_USER_Q00016.0_O_ZUI_4.0.474_ST_190118_qpst through QFilL

4) Boot to bootloader

5) go to Zui5 folder (link is above) and click on Batch.bat file

6) Press 2, Hit enter, enter, enter

7) phone will automatically restart and boot to ZUI5

8) go to ZUI10 folder and click on Batch.bat

7) Press 2, Hit enter, enter, wait for phone to restart.

Congrats you are back to stock ZUI.

Don't forget to hit that Thanks button ! :cool:

Cheers