• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Guide][Video/Text] Install Android 9.0 Pie GSI on Moto X4 (Windows/Mac/Linux)

Search This thread

munchy_cool

Senior Member
Apr 6, 2008
8,622
2,373
void (0)
Install Android 9.0 Pie GSI on Moto X4 (Windows/Mac/Linux)
Obligatory Warning: This guide and ROM assumes you know the fundamentals of fastboot, flashing TWRP, and running a flash all. Your warranty is voided because of the unlocked bootloader. This is a Third Party ROM. Things may not work as expected compared to stock (for better or for worse).


Warning 2: If you can't do fastboot commands, do a flash all, root your device or flash TWRP/ROM, please do not ask for help here. If you cannot flash all back to stock, please stay stock for everyone's sake.

Warning 3: if you don't flash the firmware zip so both slots have the firmware, when you boot after flashing, you WILL have a bootloop or even a brick.

Warning 4: You will loose all your data. Make sure to backup your data.



Code:
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

Not Working :
  • headphone jack


How to Boot into fastboot/bootloader mode

1. Reboot phone, and keep volume down pressed while device is rebooting until you see bootloader mode screen.
2. While phone is off, press volume down and then press power button. Keep holding both until you see bootloader mode screen.


How to Install

Video

Moto X4 A/B Slots Explained

Steps
1. Download all the files listed in downloads section and place them inside one folder.


2. Unzip A/B GSI zip file. Unzip fastboot and adb zip file. Rename treble image file to twrp-payton-treble.img. move twrp img file to platform-tools folder.

Create folder PieGSI in internal memory of phone.

Move below files to AndroidP folder on phone

* Android P GSI Image
* Gapps
* Trebelized Lineage OS
* trebelized twrp zip file
* partition copy zip file

Reboot device into bootloader mode.

3. Navigate to platform-tools folder. Boot to TWRP using fastboot. Using command prompt/terminal navigate to folder where fastboot is.

Windows
Code:
fastboot boot twrp-payton-treble.img

Mac/Linux
Code:
./fastboot boot twrp-payton-treble.img


4. Once booted into TWRP,
Go to install, Navigate to PieGsi folder.
Flash the partition copy zip file.

5. Next, go to home screen.
Wipe -> Swipe to factory reset.
Main menu, click on Install. select Lineage OS zip, add more zips and select TWRP zip. Swipe to flash. Once done, go to main menu. Reboot -> Recovery.

6. Once back in TWRP. Go to wipe, Advanced. Select system,data and cache. Swipe to wipe. Go back to TWRP main menu. Click on Install, select Image option on bottom right. Select AB GSI img. Select System. Swipe to flash. Once done, go to main menu. Reboot -> Recovery.

7. Once back in TWRP. Install -> Select gapps file. Swipe to flash. Reboot -> System.

8. If stuck in bootloop. Reboot to twrp. Go to wipe. Select format data. Enter yes. This will wipe your internal storage so make sure to backup. Reboot -> System.

9. Android 9.0 Pie. Profit!


How to go back to stock



Support :


1) Search. Search, search, search. If you make the effort of reading atleast 5 pages back, most if not all your questions will be answered. I personally, will ignore any questions, if I know they have been answered in the last 5 pages. Not being rude, but please read.
2) If you can't find answers in last 5 pages, ask here, be respectful and have a good time.

Downloads :
Downloads
Partition Copy Zip File :- https://drive.google.com/file/d/1oiry9UfP2tf-5A6nQBF7pn2t2eSGKt0F/view
Lineage OS Moto X4(Treble) :- https://www.androidfilehost.com/?fid=5862345805528063250
TWRP Image File Moto X4(Treble) :- https://www.androidfilehost.com/?fid=5862345805528063210
TWRP Zip File Moto X4:- https://www.androidfilehost.com/?fid=5862345805528063564
Android 9.0 Pie GSI Download Links (Download arm64 AB):- https://github.com/phhusson/treble_experimentations/releases
Gapps for Android 9.0 Pie (Use Micro) :- https://builds.nezorfla.me/?dir=opengapps/pie/arm64
Winrar (Windows) :- https://www.rarlab.com/
The Unarchiver (Mac):- https://theunarchiver.com/
ADB & Fastboot :- https://developer.android.com/studio/releases/platform-tools

Important Links
Android 9.0 Pie GSI Thread :- https://forum.xda-developers.com/pr...ice-development/aosp-9-0-phh-treble-t3831915/

Donations :
Donate to Phhuson
Buy me Coffee.


Contributors
munchy_cool, erfanoabdi
@phhusson
 
Last edited:

DarkLara

Member
Jan 5, 2018
37
30
I don't have a navigation bar, not that it has the new style, it's non existent.

I have a similar problem but on the contrary I wanted to make the navigation bar disappear, when I started I put a backup of the cloud and the navigation bar appeared and now I can not get it xD ....
 

Attachments

  • Screenshot_20180829-210808.jpg
    Screenshot_20180829-210808.jpg
    235.1 KB · Views: 317

DarkLara

Member
Jan 5, 2018
37
30
Do I update GSI just by flashing the new system img?
I would lost all user data that way right?

1. TWRP main menu. Click on Install, select Image option on bottom right. Select AB GSI img. Select System. Swipe to flash. Once done, go to main menu. Reboot -> Recovery.

2. Once back in TWRP. Install -> Select gapps file. Swipe to flash. Reboot -> System.

I followed those steps and it worked and you do not lose the data greetings..
 

x1357246

Member
Dec 6, 2015
46
7
1. TWRP main menu. Click on Install, select Image option on bottom right. Select AB GSI img. Select System. Swipe to flash. Once done, go to main menu. Reboot -> Recovery.

2. Once back in TWRP. Install -> Select gapps file. Swipe to flash. Reboot -> System.

I followed those steps and it worked and you do not lose the data greetings..

Awesome:cool: Thanks, man!
These treble, A/B partition devices are so complicated compared to old devices :eek:
 

retro486

Senior Member
Aug 1, 2012
87
29
I'm sorry if I missed it, but why does the lineage os zip have to be flashed and then the system image specifically flashed? I thought the whole point of treble was to only need to flash the system image?
 

abrfilho

Senior Member
Jan 3, 2018
238
124
Rio das Ostras
I'm sorry if I missed it, but why does the lineage os zip have to be flashed and then the system image specifically flashed? I thought the whole point of treble was to only need to flash the system image?

It's because Moto X4 don't have project Treble, but the Lineage build is treblelized, and when you flash it, will flash the vendor partition too, with that we can install and boot GSIs.
 
  • Like
Reactions: retro486

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Install Android 9.0 Pie GSI on Moto X4 (Windows/Mac/Linux)
    Obligatory Warning: This guide and ROM assumes you know the fundamentals of fastboot, flashing TWRP, and running a flash all. Your warranty is voided because of the unlocked bootloader. This is a Third Party ROM. Things may not work as expected compared to stock (for better or for worse).


    Warning 2: If you can't do fastboot commands, do a flash all, root your device or flash TWRP/ROM, please do not ask for help here. If you cannot flash all back to stock, please stay stock for everyone's sake.

    Warning 3: if you don't flash the firmware zip so both slots have the firmware, when you boot after flashing, you WILL have a bootloop or even a brick.

    Warning 4: You will loose all your data. Make sure to backup your data.



    Code:
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    Not Working :
    • headphone jack


    How to Boot into fastboot/bootloader mode

    1. Reboot phone, and keep volume down pressed while device is rebooting until you see bootloader mode screen.
    2. While phone is off, press volume down and then press power button. Keep holding both until you see bootloader mode screen.


    How to Install

    Video

    Moto X4 A/B Slots Explained

    Steps
    1. Download all the files listed in downloads section and place them inside one folder.


    2. Unzip A/B GSI zip file. Unzip fastboot and adb zip file. Rename treble image file to twrp-payton-treble.img. move twrp img file to platform-tools folder.

    Create folder PieGSI in internal memory of phone.

    Move below files to AndroidP folder on phone

    * Android P GSI Image
    * Gapps
    * Trebelized Lineage OS
    * trebelized twrp zip file
    * partition copy zip file

    Reboot device into bootloader mode.

    3. Navigate to platform-tools folder. Boot to TWRP using fastboot. Using command prompt/terminal navigate to folder where fastboot is.

    Windows
    Code:
    fastboot boot twrp-payton-treble.img

    Mac/Linux
    Code:
    ./fastboot boot twrp-payton-treble.img


    4. Once booted into TWRP,
    Go to install, Navigate to PieGsi folder.
    Flash the partition copy zip file.

    5. Next, go to home screen.
    Wipe -> Swipe to factory reset.
    Main menu, click on Install. select Lineage OS zip, add more zips and select TWRP zip. Swipe to flash. Once done, go to main menu. Reboot -> Recovery.

    6. Once back in TWRP. Go to wipe, Advanced. Select system,data and cache. Swipe to wipe. Go back to TWRP main menu. Click on Install, select Image option on bottom right. Select AB GSI img. Select System. Swipe to flash. Once done, go to main menu. Reboot -> Recovery.

    7. Once back in TWRP. Install -> Select gapps file. Swipe to flash. Reboot -> System.

    8. If stuck in bootloop. Reboot to twrp. Go to wipe. Select format data. Enter yes. This will wipe your internal storage so make sure to backup. Reboot -> System.

    9. Android 9.0 Pie. Profit!


    How to go back to stock



    Support :


    1) Search. Search, search, search. If you make the effort of reading atleast 5 pages back, most if not all your questions will be answered. I personally, will ignore any questions, if I know they have been answered in the last 5 pages. Not being rude, but please read.
    2) If you can't find answers in last 5 pages, ask here, be respectful and have a good time.

    Downloads :
    Downloads
    Partition Copy Zip File :- https://drive.google.com/file/d/1oiry9UfP2tf-5A6nQBF7pn2t2eSGKt0F/view
    Lineage OS Moto X4(Treble) :- https://www.androidfilehost.com/?fid=5862345805528063250
    TWRP Image File Moto X4(Treble) :- https://www.androidfilehost.com/?fid=5862345805528063210
    TWRP Zip File Moto X4:- https://www.androidfilehost.com/?fid=5862345805528063564
    Android 9.0 Pie GSI Download Links (Download arm64 AB):- https://github.com/phhusson/treble_experimentations/releases
    Gapps for Android 9.0 Pie (Use Micro) :- https://builds.nezorfla.me/?dir=opengapps/pie/arm64
    Winrar (Windows) :- https://www.rarlab.com/
    The Unarchiver (Mac):- https://theunarchiver.com/
    ADB & Fastboot :- https://developer.android.com/studio/releases/platform-tools

    Important Links
    Android 9.0 Pie GSI Thread :- https://forum.xda-developers.com/pr...ice-development/aosp-9-0-phh-treble-t3831915/

    Donations :
    Donate to Phhuson
    Buy me Coffee.


    Contributors
    munchy_cool, erfanoabdi
    @phhusson
    2
    dont know ..try and let us know :highfive:

    I tried and it did not work....


    Edit: NFC and tethering dont work...
    1
    Hi, have you tried this version on the x4? What things do not work with that version of GSI on the X4 ?

    thanks......

    yes tried it. headphone jack is the only thing thats broken.
    1
    I don't remember now which line you can edit to make it appear, but you can install a magisk module to make the nav bar appear.
    qeum.hw.mainkeys=1 is off qeum.hw.mainkeys=0 is on. For me the recents button doesn't work though and when the navbar is on it (recent apps) doesn't even work with the fingerprint sensor gesture.
    1
    I'm sorry if I missed it, but why does the lineage os zip have to be flashed and then the system image specifically flashed? I thought the whole point of treble was to only need to flash the system image?

    It's because Moto X4 don't have project Treble, but the Lineage build is treblelized, and when you flash it, will flash the vendor partition too, with that we can install and boot GSIs.