FORUMS
Remove All Ads from XDA

[TREBLE][PORT] Android 9.0 Pie GSI for Moto X4 [20180731]

8,554 posts
Thanks Meter: 2,959
 
Post Reply Email Thread
Credits

Moto X4 is getting some custom rom love, because @erfanoabdi worked in BEAST mode and created the trees for this device, even though he does not own the device.

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.



This is an initial release and it WILL have bugs. If your phone is a daily, and you cannot afford downtime or random reboots then please do not flash.

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 - check post 2
  • You tell me


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
[YOUTUBE]JLKWA7CtbSY[/YOUTUBE]

Moto X4 A/B Slots Explained
[youtube]zVwYxp30dps[/youtube]

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

2. This step needs to be done only once, unless you flash stock firmware in which case you have to do it again. In short, if you are coming from stock this step needs to be done. If you are running a custom rom already then you can skip this step.

Prepare your phone for AOSP style ROMs.

Unzip the Firmware Flash Zip File and boot phone into fastboot mode. Open terminal/command prompt and Naviagte to extracted folder. Then flash_all.bat (Windows) file or the flash_all.sh (Linux & Mac)

Windows

Code:
flash_all.bat
Mac/Linux

Code:
./flash_all.sh
Tested only on XT1900-1 on Android 8.0 model for now. Feel free to try on other models. Check for any errors in the process, DO NOT proceed if you have any errors. Once flashed successfully, reboot into Android to make sure all is well.

Windows
Code:
fastboot reboot
Mac/Linux
Code:
./fastboot reboot
3. Unzip A/B GSI zip file. Unzip Magisk Zip file. Unzip fastboot and adb zip file. Rename treble image file to twrp-payton-treble.img. Go to magisk folder, common and copy magisk.apk file and place it in AndroidP folder on computer.

Create folder AndroidP in internal memory of phone.

Move below files to AndroidP folder on phone

* Android P GSI Image
* Post GSI 1 and 2.
* Permessiver zip file
* FBE_disabler zip file
* Trebelized Lineage OS
* trebelized twrp zip file

Reboot device into bootloader mode.

4. 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

5. Once booted into TWRP,

Wipe -> Swipe to factory reset.
Main menu, click on Install - navigate to Android P folder. 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, swipe to factory reset. Go back to TWRP main menu. Click on Install, select Image option on bottom right. Select P_DP5_AB.img. Select System. Swipe to flash.


7. Go back to TWRP main menu. Click on mount. Make sure vendor is checked. Go back to TWRP main menu. Install, select Post GSI 1 zip, add more zips, select Post GSI 2 zip. Swipe to flash.

8. Go back to TWRP main menu. Go to install. Select Permessiver zip file. Add more zips, select FBE_disabler zip file. Swipe to flash.

9. If you want root, go back to main menu and install Magisk zip file.Else, skip this step.

10. Go back to TWRP main menu. go to wipe, format data. yes.

11. go back to main menu. Reboot -> System. If stuck in TWRP, press and hold volume down and power button and device will reboot.

11. Device be may reboot once or twice. it's normal.

12. Once in Android P. Go to Settings -> System -> About Phone -> tap on biild number 7 times. Go to developer options. Scroll down, and go to default usb configuration. Check data transfer.

13. Connect device to computer. Accept adb prompt. Transfer below apks to phone.

Google Play Services.
Open Camera
Magisk apk

14. Go to phone, open app drawer. Open Files app, click on 3 dot menu, top right -> show internal storage. Click on hamburger menu (top left) -> Pixel XL.

Install all three apks.

15. If you want Android P gestures. Go to settings -> system -> gestures -> Enable swipe up on home button.


How to go back to stock


[youtube]8tLFnkJrJ40[/youtube]

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 :
Latest ADB & Fastboot - https://developer.android.com/studio...platform-tools
Treble Enabled TWRP Image File - https://www.androidfilehost.com/?fid...45805528063210
Treble Enabled TWRP Zip File - https://www.androidfilehost.com/?fid...45805528063564
Lineage OS (Trebelized)- https://www.androidfilehost.com/?fid...45805528063250
Firmware Flash Zip File - https://www.androidfilehost.com/?fid...45805528063846
Android P GSI (A/B Only) - https://androidfilehost.com/?w=files&flid=280192
Post GSI Files (Download 1 and 2) - https://androidfilehost.com/?w=files&flid=280192
Permissiver Zip File - https://androidfilehost.com/?w=files&flid=279429
FBE_Disabler Zip File - https://androidfilehost.com/?w=files&flid=279429
Google Play Services apk - https://www.apkmirror.com/apk/google...-apk-download/
Magisk Trebelized - https://github.com/topjohnwu/Magisk/...gisk-v16.7.zip
Open Camera APK - https://www.apkmirror.com/apk/mark-h...-apk-download/



Reporting Bugs :
  • Grab a logcat right after the problem has occurred. (Please include at least a few pages of the log, not just the last few lines, unless you know what you're doing.)
  • If it is a random reboot, grab /sys/fs/pstore/console-ramoops and /sys/fs/pstore/dmesg-ramoops-0. (Do not bother getting a logcat unless you can get it just before the reboot. A logcat after a reboot is useless)

Remember to provide as much info as possible. The more info you provide, the more likely that the bug will be solved. Please also do not report known issues. Any bug not reported in the bug report format above may be ignored.


Donations :
Buy me Coffee.





XDA:DevDB Information
pbetapayton, ROM for the Moto X4

Contributors
munchy_cool, erfanoabdi
ROM OS Version: 2.3.x Gingerbread

Version Information
Status: Testing

Created 2018-08-01
Last Updated 2018-08-06
The Following 19 Users Say Thank You to munchy_cool For This Useful Post: [ View ] Gift munchy_cool Ad-Free
 
 
1st August 2018, 07:01 PM |#2  
munchy_cool's Avatar
OP Senior Member
Flag void (0)
Thanks Meter: 2,959
 
Donate to Me
More
Headphone Jack Fix courtesy @erfanoabdi - https://www.androidfilehost.com/?fid...68719832239538
flash in twrp.
The Following 6 Users Say Thank You to munchy_cool For This Useful Post: [ View ] Gift munchy_cool Ad-Free
1st August 2018, 07:02 PM |#3  
munchy_cool's Avatar
OP Senior Member
Flag void (0)
Thanks Meter: 2,959
 
Donate to Me
More
reserved 001
The Following User Says Thank You to munchy_cool For This Useful Post: [ View ] Gift munchy_cool Ad-Free
1st August 2018, 09:07 PM |#4  
Junior Member
Thanks Meter: 2
 
More
It works for xt19007?
1st August 2018, 09:12 PM |#5  
munchy_cool's Avatar
OP Senior Member
Flag void (0)
Thanks Meter: 2,959
 
Donate to Me
More
Quote:
Originally Posted by luis199914

It works for xt19007?

should work on all Moto X4 with unlocked bootloader. I dont have that model to try, but it should work.
The Following 2 Users Say Thank You to munchy_cool For This Useful Post: [ View ] Gift munchy_cool Ad-Free
1st August 2018, 09:58 PM |#6  
Junior Member
Thanks Meter: 0
 
More
error 7 when flesh POST-sGSI_1_v0.14.zip
1st August 2018, 10:08 PM |#7  
munchy_cool's Avatar
OP Senior Member
Flag void (0)
Thanks Meter: 2,959
 
Donate to Me
More
Quote:
Originally Posted by [email protected]

error 7 when flesh POST-sGSI_1_v0.14.zip

mount vendor.
The Following 2 Users Say Thank You to munchy_cool For This Useful Post: [ View ] Gift munchy_cool Ad-Free
1st August 2018, 10:16 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by munchy_cool

mount vendor.


I tried several times, but still the same error
1st August 2018, 10:51 PM |#9  
Member
Thanks Meter: 15
 
More
Treble?
The Following User Says Thank You to zenstonetiger For This Useful Post: [ View ] Gift zenstonetiger Ad-Free
1st August 2018, 11:02 PM |#10  
Senior Member
Flag San Luis
Thanks Meter: 264
 
Donate to Me
More
For those who want HDR and portrait mode this camera is fully working for me (video recording only works in UHD 4K 30fps, also in Full HD 1080p or 720p if you turn off video stabilization, but without flash it's dark, you can use open camera for that though). Thanks to @Arnova8G2
https://www.celsoazevedo.com/files/a...va8G2-V8.1.apk
The Following User Says Thank You to igna.98 For This Useful Post: [ View ] Gift igna.98 Ad-Free
1st August 2018, 11:06 PM |#11  
munchy_cool's Avatar
OP Senior Member
Flag void (0)
Thanks Meter: 2,959
 
Donate to Me
More
Quote:
Originally Posted by [email protected]

I tried several times, but still the same error

provide recovery log please.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes