[ROM][G8231][G8232] AOSP 9.0 Pie for Xperia XZs

Search This thread

amirzaim

Senior Member
Oct 14, 2017
61
22
0
I made this custom ROM project based from Sony Xperia AOSP project. Despite Sony will never release a Pie update for Xperia XZs, Sony still provides some stuffs for building Pie ROMS. However, installing this ROM will never get any kind of benefits similar to its official ROM counterparts. This custom ROM was built with Windows Subsystem For Linux for its very first version. Later version will be built on actual Ubuntu OS later on.

Installing this custom required a device with an unlocked bootloader and here, you will need to perform these guides carefully before doing so. Please note that unlocking the device will voiding the warranty (well who cares? It's a 2-year-old device) and also its DRM key which used for HD content, camera image optimization, 4K recording, etc.
[Official Sony guide on unlocking bootloader]

Download links:
G8231 (version 0.5) - [Google Link]
G8232 (version 0.5) - [Google Link]
TWRP - [Official TWRP Link]
OpenGapps - [Official Link]
Magisk - [Google Link]


Instructions:
STEP 1: Flashing ROM Images:
fastboot erase userdata
fastboot erase cache
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot flash oem SW_binaries_for_Xperia_Android_9.0_2.3.2_v8_tone.img
fastboot flash recovery twrp-3.3.0-0-kagura.img

STEP 2: Installing Google apps (Magisk required):
1. Disconnect the USB cable from the device.
2. Enter TWRP recovery by pressing Power button + volume down untill Sony logo appeared first instead of warning bootlodader unlocked message.
3. Go to Install and select opengapps zip from memory card or USB OTG and install.
4. Also install Magisk zip as well. You will use this to enable Google apps functionality on custom rom and also root functionalities as well.
5. Reboot the device.

Changelogs:

(version 0.5)
- Fixing warning message appeared every time device switched on. Added latest software binaries from Sony.

(version 0.4)
- Fixing building issues, speeding up device booting.

(version 0.3).
- Adding G8232 ROM variant

( version 0.02):
- Fixing building issues

Bugs:
- [G8231] Device going reboot after shutdown button is pressed. You will need to press power button + volume up until feel the vibration 3 times.
- [G8231] Device reboots when performing file transfer from PC to device's sd card.
- [BOTH ROM] Warning message appears when booting into the device (fixed when installing latest version of software binaries)
- [BOTH ROM] Powering Off while charging will reboot the device but in abnormal state, launcher stops working.
- [BOTH ROM] Pixel Launcher from gapps stops working. Stick it to its default launcher and install other 3rd party launcher.


WARNING!: DO IT AT YOUR OWN RISK. BACKUP ALL OF YOUR DATA FIRST BEFORE DOING SO. YOU WILL NOT BE ENTERTAINED IF YOU ASKED SILLY QUESTIONS WHICH PEOPLE KNOWING THAT YOU DID NOT READ THE INSTRUCTIONS!

56790845_2318772831479600_1857174993008328704_n.jpg
57064273_2318772771479606_7745460067880665088_n.jpg

57297882_2318772804812936_6837791791559737344_n.jpg
57056149_2318772774812939_7273221236795113472_n.jpg
 
Last edited:

amirzaim

Senior Member
Oct 14, 2017
61
22
0
Attempted to build a second one on Xubuntu 18.04 and although no issues like stalling while compiling but turns out my device can't boot after that.

Surprisingly, developing custom rom on Windows Subsystem on Linux only requires 2-3GB of source code while developing it on Ubuntu could slapped it with 30GB of source code!
 

amirzaim

Senior Member
Oct 14, 2017
61
22
0
Volte supported? For Indian users.. What about dual sim still working? Xperia XZs Dual

VolLTE support? Not tested because not available on my mobile carrier and this rom only suitable for single sim model. Installing this rom on dual sim model might bricking your device but if you want to try it out by becoming a fearless tester, go on.

I can't just blindly build a custom rom on a device which I don't have and then ended up having a bad reputation because people think I published a broken ROM. I had been made a second build of custom ROM on Xubuntu 18.04 and ended up producing a very broken ROM that can't boot at all, stuck at Sony logo for a very long time.
 

amirzaim

Senior Member
Oct 14, 2017
61
22
0
Okay...rebuilding it again inside WSL with some functions below:
export WITH_DEXPREOPT=false
export DISABLE_DEXPREOPT=true

Enabling these might help to overcome building process from stalling when it comes to dexpreopt the library file.

Also, I'm found the line like this : build/soong/scripts/toc.sh: fork: Invalid argument which happens when setting make -j8 and opening chrome browser in same time with 9-10 tabs, thus the compiler with crash. Turning off cpu-intensive activities including antivirus real-time scanner might help or perhaps just tune it lower at least 2-4 cores.

EDIT: Uh oh...HDD is now full!!! Gotta clear up some spaces and have to disable ccache...
 
Last edited:

Guhl0rd64

Member
Feb 23, 2016
33
2
0
19
Natal RN
I made this custom ROM project based from Sony Xperia AOSP project. Despite Sony will never release a Pie update for Xperia XZs, Sony still provides some stuffs for building Pie ROMS. However, installing this ROM will never get any kind of benefits similar to its official ROM counterparts. This custom ROM was built with Windows Subsystem For Linux for its very first version. Later version will be built on actual Ubuntu OS later on.

Please note that you cannot install any kind of Google apps on this ROM. Please backup all of your data first before doing so. After installing this ROM, please install 3rd party app store like APKPure, Amazon App Store etc in order to download apps. This ROM only suitable for Xperia XZs G8231 model.

Download links:
v0.01 - [Google Link]

Instructions:
fastboot erase userdata
fastboot erase cache
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash oem SW_binaries_for_Xperia_Android_9.0_2.3.2_v7_tone.img


WARNING!: DO IT AT YOUR OWN RISK. YOU WILL NOT BE ENTERTAINED IF YOU'RE ASKING HERE ON HOW TO UNLOCK BOOTLOADER!

56790845_2318772831479600_1857174993008328704_n.jpg
57064273_2318772771479606_7745460067880665088_n.jpg

57297882_2318772804812936_6837791791559737344_n.jpg
57056149_2318772774812939_7273221236795113472_n.jpg


Could someone help me in the fastboot part? My computer is not recognizing my device in fastboot mode (and i have all the drivers installed)
 

amirzaim

Senior Member
Oct 14, 2017
61
22
0
UPDATE: Second build is success...just need a time to test it before uploading it...

Later on I will publish on how to build Pie AOSP custom ROM for Xperia devices...
 
  • Like
Reactions: ning1994

amirzaim

Senior Member
Oct 14, 2017
61
22
0
view


Yes, I installed, all xperia drivers are installed, even the flash mode!!

Installed but not detected? You might need to enable the "Test mode" on Windows 10 if you're using it and perform special boot by disabling the driver digital signature enforcing. Then, reinstall the xperia driver.
 

amirzaim

Senior Member
Oct 14, 2017
61
22
0
ROM UPDATE: Added G8232 ROM variant...

Because I don't have a device of particular model, I need some ROM testers here to check whether the ROM is now able to boot or else.
 

amirzaim

Senior Member
Oct 14, 2017
61
22
0
Bug found on G8231 ROM - Restart happens when phone is shut down. This shouldn't happening when the process isn't stalled!...

Right now, you will need to press power button + volume up in a same time until you will feel 3x vibration and then release it.
 

Guhl0rd64

Member
Feb 23, 2016
33
2
0
19
Natal RN
Installed but not detected? You might need to enable the "Test mode" on Windows 10 if you're using it and perform special boot by disabling the driver digital signature enforcing. Then, reinstall the xperia driver.

I was able to resolve it, the drivers were installed on the wrong partition, I had to uninstall all of them so that I could install again.

And I was able to install the ROM, it was a great job

---------- Post added at 06:51 PM ---------- Previous post was at 06:49 PM ----------

Just a question, why does initialization take so long?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    I made this custom ROM project based from Sony Xperia AOSP project. Despite Sony will never release a Pie update for Xperia XZs, Sony still provides some stuffs for building Pie ROMS. However, installing this ROM will never get any kind of benefits similar to its official ROM counterparts. This custom ROM was built with Windows Subsystem For Linux for its very first version. Later version will be built on actual Ubuntu OS later on.

    Installing this custom required a device with an unlocked bootloader and here, you will need to perform these guides carefully before doing so. Please note that unlocking the device will voiding the warranty (well who cares? It's a 2-year-old device) and also its DRM key which used for HD content, camera image optimization, 4K recording, etc.
    [Official Sony guide on unlocking bootloader]

    Download links:
    G8231 (version 0.5) - [Google Link]
    G8232 (version 0.5) - [Google Link]
    TWRP - [Official TWRP Link]
    OpenGapps - [Official Link]
    Magisk - [Google Link]


    Instructions:
    STEP 1: Flashing ROM Images:
    fastboot erase userdata
    fastboot erase cache
    fastboot flash boot boot.img
    fastboot flash system system.img
    fastboot flash cache cache.img
    fastboot flash userdata userdata.img
    fastboot flash oem SW_binaries_for_Xperia_Android_9.0_2.3.2_v8_tone.img
    fastboot flash recovery twrp-3.3.0-0-kagura.img

    STEP 2: Installing Google apps (Magisk required):
    1. Disconnect the USB cable from the device.
    2. Enter TWRP recovery by pressing Power button + volume down untill Sony logo appeared first instead of warning bootlodader unlocked message.
    3. Go to Install and select opengapps zip from memory card or USB OTG and install.
    4. Also install Magisk zip as well. You will use this to enable Google apps functionality on custom rom and also root functionalities as well.
    5. Reboot the device.

    Changelogs:

    (version 0.5)
    - Fixing warning message appeared every time device switched on. Added latest software binaries from Sony.

    (version 0.4)
    - Fixing building issues, speeding up device booting.

    (version 0.3).
    - Adding G8232 ROM variant

    ( version 0.02):
    - Fixing building issues

    Bugs:
    - [G8231] Device going reboot after shutdown button is pressed. You will need to press power button + volume up until feel the vibration 3 times.
    - [G8231] Device reboots when performing file transfer from PC to device's sd card.
    - [BOTH ROM] Warning message appears when booting into the device (fixed when installing latest version of software binaries)
    - [BOTH ROM] Powering Off while charging will reboot the device but in abnormal state, launcher stops working.
    - [BOTH ROM] Pixel Launcher from gapps stops working. Stick it to its default launcher and install other 3rd party launcher.


    WARNING!: DO IT AT YOUR OWN RISK. BACKUP ALL OF YOUR DATA FIRST BEFORE DOING SO. YOU WILL NOT BE ENTERTAINED IF YOU ASKED SILLY QUESTIONS WHICH PEOPLE KNOWING THAT YOU DID NOT READ THE INSTRUCTIONS!

    56790845_2318772831479600_1857174993008328704_n.jpg
    57064273_2318772771479606_7745460067880665088_n.jpg

    57297882_2318772804812936_6837791791559737344_n.jpg
    57056149_2318772774812939_7273221236795113472_n.jpg
    2
    Hi all...

    The updated second ROM build is now live. You can try it out but only for device model G8231 for now.
    1
    UPDATE: Second build is success...just need a time to test it before uploading it...

    Later on I will publish on how to build Pie AOSP custom ROM for Xperia devices...
    1
    this rom dont have superslow motion ?

    Before you're asking to bring the proprietary stuffs on this rom, please take a look at this link here and please have some time to read about it: https://developer.sony.com/develop/...ty/current-platform-functionality-maintained/

    As I mentioned before, you WILL NOT GET any kind of benefits as the stock rom does. Also, it is not possible to install proprietary sony apps on this custom rom.

    However, you can install GCam either from Play Store or even the modded apk version which listed here: https://www.celsoazevedo.com/files/android/google-camera/

    Modded version of GCam app has many variations so you will expect some bugs on particular version and you will not be entertained if you posted problems or issues during using modded GCam applications on this thread.
    1
    I don't know why but every times I fastboot twrp I will get stuck at sony logo (G232 Oreo and Nougat) I just want to root :( hzzz
    Why the hell you're attempting to flash a custom ROM using different Xperia model? I never built a ROM for that model!

    Rooting an Xperia device is far complex than any kind of a device with simpler process. You will need a lot of work to do during rooting process. Do it at your own risk.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone