• If you are experiencing issues logging in, we moved to a new and more secure software and older account passwords were not able to be migrated. We recommend trying to reset your password, then contacting us if there are issues.
  • Nearly done! Migration cleanup is mostly done. There are a small number of issues left that we continue to work on, but all the heavy lifting is done. We still would love to hear feedback over at this thread and also check out the new XDA app! Thanks and we hope you enjoy the new forums, and thanks for your support of XDA <3

Project Treble for Xperia XZ [F8331/2] [Android 10]

local__hero

Senior Member
Oct 13, 2018
116
262
0
Project Treble for Xperia XZ

Hey everyone,
I've updated the Project Treble builds for Android 10 and system-as-root.

No repartitioning necessary! This method is re-using the oem partition.

What is Project Treble?
Understanding Project Treble and Android updates
Talkin’ Treble: How Android engineers are winning the war on fragmentation
What are GSIs?
Android Source: Generic System Image (GSI)

Downloads:

How to install:
  • Back up your stuff
  • Wipe data and caches
  • Install the zip via TWRP (or unzip and install just the /boot and /vendor images via fastboot)
  • Install any GSI via "fastboot flash system your-gsi-image.img"
  • To use Magisk: Flash twrp-kagura-oem-to-vendor.img as recovery. Reboot into recovery and install Magisk like you usually would. If you want to go back to another ROM, you need to re-flash your old TWRP recovery as well. Note: Magisk is untested at the moment, needs tweaked recovery to accept new system-as-root status I guess.

Bugs: See post #2

DO NOT POST HERE FOR FLASHING HELP OR YOU WILL BE REPORTED. Read everything before posting.​

If you have questions, ask them in this thread: Xperia XZ Pie ROMs Questions and Answers Thread

List of GSIs: phhusson's treble Generic System Image
Important: You need an AB, ARM64, system-as-root GSI! This is different from the Pie Project Treble builds!
GSIs based on phhusson's work offer the best compatibility.

Magisk: For Magisk to work, you need to tweak your TWRP installation, since it doesn't know that we have shuffled /vendor to the oem partition. You need to change /oem to /vendor in TWRP's fstab file.
See above for a tweaked TWRP.

If you want to go back to any other AOSP-based ROM that is not a GSI, simply re-flash the regular oem image and install like you usually would.

For developers:
This method is repurposing the oem partition to hold /vendor and odm(blobs). There's 400mb of space on that partition and we are only using ~260mb for blobs, while vendor is only about 20-30mb.
Re-partitioning can be quite dangerous if you do not know what you are doing. This method should be safe for everyone.

Developer guide to building yourself: sx.ix5.org

Tested:
  • LineageOS 17
  • Pixel Experience
  • Camera should work everywhere

Bugs are the same as the regular AOSP builds, plus some more if the GSI is not built well or doesn't have tweaks for Sony devices.

XDA:DevDB Information
Project Treble for Xperia XZ [F8331/2], ROM for the Sony Xperia XZ

Contributors
local__hero
Source Code: https://sx.ix5.org/info/fake-treble-for-xperia-xz/

ROM OS Version: Android 10
ROM Kernel: Linux 4.x
ROM Firmware Required: Stock .184 or .192
Based On: AOSP

Version Information
Status: Nightly

Created 2020-01-03
Last Updated 2020-07-22
 
Last edited:

local__hero

Senior Member
Oct 13, 2018
116
262
0
Reserved

Reporting bugs

Important: Read the bug list before posting. Anyone can add bugs to the list, just follow the rules.

DO NOT REPORT ISSUES WITH GSIs! Ask the GSI maintainer to fix them!

I will repeat the rules again here:

Rules:
  • New bugs must include version where error popped up and which oem version you are using
  • Only reproducible errors
  • Should include adb logcat (linked in a pastebin service like https://del.dog)
  • Must include clear description what is wrong
  • If it is a visual/SystemUI bug, only report it here
  • If it is an internal bug(e.g. fingerprint crashes device), report it to the Sony bugtracker as well!
  • Always try to fix the bug yourself first! Then submit a pull request to Sony
  • Must search if error has already been reported (bug tracker, this document, dev buglist)
  • If you've reported the issue somewhere else already and just want to track it here as well, add a link
  • Before reporting a bug, always make sure to isolate it. That means, wipe everything, install only the ROM without GApps and Magisk and see if the problem still exists. Only then report the bug!
 
Last edited:

Alfaiz_sry

Member
Sep 19, 2019
9
0
0
Project Treble for Xperia XZ

Hey everyone,
I've updated the Project Treble builds for Android 10 and system-as-root.

No repartitioning necessary! This method is re-using the oem partition.

What is Project Treble?
Understanding Project Treble and Android updates
Talkin’ Treble: How Android engineers are winning the war on fragmentation
What are GSIs?
Android Source: Generic System Image (GSI)

Downloads:
ROM: Download the latest aosp_f8331_*-TREBLE-NIGHTLY.zip from sx.ix5.org/files/builds/kagura/treble/
TWRP: Download twrp-kagura-oem-to-vendor.img


How to install:
Back up your stuff
Wipe data and caches
Install the zip via TWRP (or unzip and install just the /boot and /vendor images via fastboot)
Install any GSI via "fastboot flash system your-gsi-image.img"
Fix /dsp labels: See DSP file relabeling for SODP
To use Magisk: Flash twrp-kagura-oem-to-vendor.img as recovery. Reboot into recovery and install Magisk like you usually would. If you want to go back to another ROM, you need to re-flash your old TWRP recovery as well. Note: Magisk is untested at the moment, needs tweaked recovery to accept new system-as-root status I guess.



Created 2020-01-03
Last Updated 2020-01-03
Do i have to fix dsp label even if my xz still on stock rom?
 

jhon_bayu

Member
Jan 22, 2016
36
3
0
I was Rom Oreo .192,,, I want to install ROM GSI pixel experience 10 ... do I have to flash OEM v9? or directly flash treble aosp10 then flash gsi rom
sorry I want to know more?
 
  • Like
Reactions: Alfaiz_sry

maricn

Member
Jan 4, 2020
10
3
0
I've tried Lineage 17 from phh github (Andy Yan sourceforge) on my F8331:


fastboot flash recovery twrp-kagura-oem-to-vendor.img
cp aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip to phone
flash aosp from twrp
fastboot flash system lineage-17.0-20191231-UNOFFICIAL-treble_arm64_bvN.img


And over 24h, I've noticed:
* wifi is getting lost, must reboot
* battery drain during the night, almost no deep sleep

---------- Post added at 03:38 PM ---------- Previous post was at 03:16 PM ----------

I've tried Havoc OS
Stuck on boot screen.

I'll try Lineage OS next

---------- Post added at 12:45 PM ---------- Previous post was at 12:44 PM ----------



The fingerprint works on F8332
but I'm not sure about F8331
I've tried HavocOS from phh github (ExpressLuke's sourceforge) on my F8331:


fastboot flash recovery twrp-kagura-oem-to-vendor.img
cp aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip to phone
flash aosp from twrp
fastboot flash system Havoc-OS-v3.0-20191225-ARM64AB-Unofficial.img


And I can confirm it's stuck in bootloop.
 

maricn

Member
Jan 4, 2020
10
3
0
I've tried Lineage 17 from phh github (Andy Yan sourceforge) on my F8331:


fastboot flash recovery twrp-kagura-oem-to-vendor.img
cp aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip to phone
flash aosp from twrp
fastboot flash system lineage-17.0-20191231-UNOFFICIAL-treble_arm64_bvN.img


And over 24h, I've noticed:
* wifi is getting lost, must reboot
* battery drain during the night, almost no deep sleep

---------- Post added at 03:38 PM ---------- Previous post was at 03:16 PM ----------



I've tried HavocOS from phh github (ExpressLuke's sourceforge) on my F8331:


fastboot flash recovery twrp-kagura-oem-to-vendor.img
cp aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip to phone
flash aosp from twrp
fastboot flash system Havoc-OS-v3.0-20191225-ARM64AB-Unofficial.img


And I can confirm it's stuck in bootloop.
Now I've tried AOSP 10.0 v208 from phh github on F8331:


fastboot flash recovery twrp-kagura-oem-to-vendor.img
cp aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip to phone
flash aosp from twrp
fastboot flash system system-quack-arm64-ab-vanilla.img


And after 24h I've experienced:
* random reboot (with fingerprint setup)
* random reboot (without fingerprint setup)
* phone getting stuck in reboot loop on low battery
* wifi drop, unable to see any network until phone is restarted
 

kaka35

Member
Oct 7, 2016
9
0
0
Working great on Pixel experience, but can't run game smoothly. I don't know why almost trebelized rom can't run game smoothly? I tried PUBGM
 

elmxx

Member
Sep 19, 2019
24
5
0
Sony Xperia XZ sensors issues!

Except fingerprint sensor, rest of sensors are not working "accelerometer, gyro, proximity, barometer, compass,".

First of all , I flashed "aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip" after that flashed "system-quack-arm64-ab-gapps.img.xz" on it.

Everything works fine, as I said above "except sensors".


Generic System Image That I tested ;
1. PixelExperience_ARM64AB-10.0-20191208-1826-UNOFFICIAL.img.xz
2. system-quack-arm64-ab-gapps.img.xz

Both gave me same issue.
 
Last edited:

oguzbatu

Senior Member
Oct 29, 2015
299
84
0
İstanbul
Except fingerprint sensor, rest of sensors are not working "accelerometer, gyro, proximity, barometer, compass,".

First of all , I flashed "aosp_f8331_10.0_2019-12-24-TREBLE-NIGHTLY.zip" after that flashed "system-quack-arm64-ab-gapps.img.xz" on it.

Everything works fine, as I said above "except sensors".


Generic System Image That I used ;
1. PixelExperience_ARM64AB-10.0-20191208-1826-UNOFFICIAL.img.xz
2. system-quack-arm64-ab-gapps.img.xz

Both gave me same issue.
On some reboots sensors can be disabled try rebooting it should fix the issue. All of my sensors are working fine.
Why flash gapps over pixel experience? Pixel experience already comes with gapps.

---------- Post added at 08:26 AM ---------- Previous post was at 08:24 AM ----------

Working great on Pixel experience, but can't run game smoothly. I don't know why almost trebelized rom can't run game smoothly? I tried PUBGM
Because performance is not good as stock. You can try setting min cpu and gpu clock to higher frequency to improve it but if you want to game use stock.