yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
It seems Magisk (even the latest stable 18.1) is completely not compatible with Treble v0.8 zip. Did Magisk work with previous versions (0.3 or earlier)?

Actually I just looked at what Magisk really changed in the kernel image and found only these two parts (the changed parts were moved to a folder called .backup):

1. the init binary was replaced to a 390.5kB one, the original one was 2.1MB.

2. the verity-key file was deleted.

So the problem is a possible incompatibility with the init binary (magiskinit, perhaps) and the kernel itself (nothing else appears to be involved at present). If only we know what parameters/changes are needed (from SODP source base) to build a newer kernel image for this (to see if the latest kernel code changes could make a difference)...

Magisk version doesn't matter. I tested Magisk 16.7, 17.1, 17.3, and 18.1. They all show the same behavior (bootloop on Sony logo). Is there a way to debug the boot process to see what might be going wrong? (EDIT: I couldn't find it, even using Magisk Canary debug build, probably because it hasn't really been booted to the system yet)

EDIT 2: Not sure what might be causing the issue with the recovery regarding encrypted data partition (that instead of prompting for decryption credentials upon startup, it simply stuck in an endless loop complaining about XML parser errors when trying to access some encrypted data, leaving it on the splash screen and could not proceed further unless I format/completely wipe userdata somehow). Back then with CarbonROM and official TWRP the decryption worked fine, although if you format data, you might be able to disable encryption completely (which is not the case with the Project Treble here, as it'd still try to encrypt the data partition upon first boot if unencrypted, due to forceencrypt flag).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] :
Could you share the QQ group number?

之前在酷安看到了你的发帖但是现在再看发现你注销账号了，能分享一下你的交流群的群号吗^_^;)
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Thanks for your feedback, I will try a new build to test it. Besides , Magisk 18.1 has been released, maybe you can try it.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
XZ's treble is built by ix5. I had already got communication with him It's really a good idea to use oem partition as vendor. But if you want to try new OEM. you need to rebuild whole rom. I will still use cache as vendor. Our way can upgrade OEM easily, if some bugs can be fixed by new OEM.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
抱歉，交流群已经解散，以后的内容只在xda做更新。
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
I've already tried Magisk 18.1. Same behavior (bootloop).

Is it possible to disable forceencrypt in the kernel? It seems currently your TWRP is unable to prompt for credentials in case of an encrypted data partition. It just stuck there with recovery.log flooded with XML parsing errors against something encoded/encrypted (see previous posts).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Maybe you can try this script.

https://github.com/Zackptg5/Disable_Dm-Verity_ForceEncrypt

EDIT: V0.85 still not support Magisk. You can try to use this script to disable Dm-Verity and ForceEncrypt, if works, feedback please. Thanks!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
I'll take a look once I backed up my stuffs again (I've lost count how many times I've done this, going back and forth between CarbonROM and Treble).

With NFound's AEX 6.2 GSI we're coming very close to a usable Pie (if Magisk's also usable). That one appeared to have proper Bluetooth stack (as well as GApps) compared to the 6.1 one. I'm really looking forward to it.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
I had returned XZP to my friend, so I could only test it on my own XZ1. New version not supports GSI without Feb. 2019 Security Patch. So I guess AEX 6.2 should not work.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Not sure what's going on with the cache partition...

The Treble 0.85 zip apparently ships with a larger system image and it fails with "mkdir /cache/recovery/(some random values)/ failed: No space left on device." error. Am I missing anything? (EDIT: SOLVED. It seems I need to do a full wipe of everything to get things working again.)

EDIT 2: Good news: With Treble v0.85 after flashing Magisk 18.1 it booted! (PS: It seems the kernel image is not AVB 1.0 signed this time) And also, AEX 6.2 works!

Right now the problem would be to deal with the recovery's inability to decrypt the userdata partition, will try if the flashable zip for disabling forceencrypt and such works.

EDIT 3: The link you gave me (about tools to disable things like forceencrypt) is essential here. Flashing it would prevent the system from automatically encrypting the userdata partition, allowing recovery to continue to function.

For now I'll be trying to experiment with some usual Magisk modules, and the apps I've been using to see if they work or not. So far things are looking good. There's an issue, though, that for some reason, the system time is not remembered (after reboot it'd revert to system build time, in AEX 6.2's case, that be January 13th 2019).

REPEAT: Until the encryption-related issues fixed in TWRP, DO NOT let the phone encrypt the data partition, or you'll lose the ability to use TWRP until you fully wipe the userdata partition!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Good job! Thanks for your feedback, it seems userdata is not encrypted in twrp 3.2.x, but encrypted in twrp 3.1.x.

On my XZ1, the same sources code build, Magisk will cause bootloop, so strange.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Some further testing needed.

Not sure about the proper flashing order for the disable forceencrypt script. I think it should be flashed the first thing after you have flashed necessary stuffs (Treble zip, GSI image, OEM image), and before flashing optional stuffs (Magisk and modules, etc.).

Here are some issues observed so far (Treble v0.85 with AEX 6.2), that I cannot be sure who is the real culprit (Treble or GSI build):

1. The system couldn't remember date and time settings, and would revert to build default upon reboot.*

2. The system would not actively connect to WiFi (even when it's already in range). It just stays as "Saved" and I need to connect it manually by tapping on it.

* The phone reverts to the build date and time. In AEX 6.2's case, that'd be around January 13th, 2019 10:43 PM.

And by the way, can I just flash a newer Treble zip in case of future updates with possible bugfixes? The zip's output messages seem misleading (as if it's flashing the system partition while in reality it isn't, after checking the script). Of course, as there would be a kernel image change, I'll need to flash Magisk again myself.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] fallingandroid:
Just flashed the latest treble build. All is good. Magisk is installed. I did have one random reboot when my phone left connection of my Bluetooth speaker, but everything is smooth like butter.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] SilverGamer_YT:
Anyone has screenshots to see how do it looks like

And what about the performance , battery life etc...
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Everything works fine on XZ1, GSI uses Descendant_TwoDotZero_arm64_Aonly.zip.

The bugs you met should be GSI's.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Some bugs belong to GSI, you can try more and choose the best one.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] fallingandroid:
I haven't used a GSI yet. If I can I will. Is it safe to install on a existing loaded rom?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
GSI has more interesting functions, just try it. You will enjoy it !

Recommend one for you : Link

All work fine, I tested. Remember to choose ARM64, A Only.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
I had update EXPerformance Patch, you can fine it on #1. Try it, It will improve performance a lot.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] fallingandroid:
What's the best way to flash it
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Using fastboot, it's a system image

Use command:

fastboot flash system <Path of GSI-image>
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Will have a look at Descendant GSI if it hopefully has some similar feature set compared to AEX (and as a comparison). Apparently, with most Pie ROMs at present capable of tweaking the system accent as well as dark themes I don't even need substratum anymore. Substratum is good, but it can be hard to maintain, especially when both the theme and app upgrade too frequent (a notorious example would be Play Store, which often ends up broken because of frequent updates, plus the overlay auto-rebuild feature never worked even once for me).

Besides, the EX Performance patch indeed works to some extent. Some games that were previously super-sluggish on GSI when I initially tested, became a lot smoother after applying it (comparable to that on CarbonROM which is stock OEM based). However, without any legit benchmarks I cannot say it's now at near-stock performance just yet. Also, not sure about battery life as I often keep the phone connected to a charger and that it was already a very efficient device to begin with (I could play some games for quite a few hours without charging).

Besides, I don't know if it's possible to put some stock device information into the vendor section so our actual device name and model number could be seen on GSI (and regardless of GSI image). Right now it's just the default name (Phh-Treble), and whether it's possible to pass Safety Net (optional at present) is still a mystery. I've also applied Miustone's props patch a few posts back, but I didn't see any noticeable difference (not sure how to confirm if the patch is functional, though it's possibly mostly optional for my current use cases).

EDIT: Sadly, Descendant doesn't boot for me (with Magisk). It just stuck on Sony logo (same behavior as official RR 9 GSI since v0.8, possibly irrelevant to Magisk). Not sure if I'm required to "Format Data" (which I didn't, and I am normally not supposed to). I've restored my previous backup... :(

EDIT 2: Turned out with AEX I can actually change the Device Name in the about screen... although it's still better if we can have this information inside the vendor section so it can be applied regardless of GSI.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] sangkiss:
geekbench

geekbench 4

AEX with 0.85 1659 4983

Official pie 1896 6023

：牛仔：
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
I'm trying to improve performance to stock level. New treble version needs new GSI, we could only wait for them.

About GSI device informations, you need to modify /system/build.prop.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Some additional issues found during usage (AEX 6.2)

I've discovered some other issues. (This is all on AEX 6.2 by NFound. I couldn't successfully boot any other GSI at the moment so it's possible that the issues I have might be caused by the GSI)

1. With AEX 6.2, it's not just Date/Time settings that couldn't be saved. Looks like there are several other things that weren't saved: Home screen preferences (upon startup it'd always ask me which home screen to use even though I've already given a default), SD Card settings (is it normal for a Pie ROM to always show me the SD card for transferring photos and such?).

2. When I did a call today, somehow the screen stayed black after the call has ended and I had to reboot. I haven't reproduced it, but I suspect that can happen if the call was hung up by the other side rather than yourself..

After reboot, the phone remained at H+ mode instead of LTE, which I was able to restore by toggling the network type in the Mobile Network settings (setting to 3G then back to LTE). Since VoLTE isn't available for my phone number, the phone would revert to H+ during calls, and it was possible that when I got the "black screen after call" issue, the phone somehow got stuck on that state and couldn't revert back on its own.

3. With AEX 6.2, my bluetooth headset (Sennheiser CX Sport) is defaulting to SBC instead of aptX. Can anyone with an aptX-capable headset test if aptX is working here?

EDIT: It seems I can't fix the SBC issue with AINUR SAURON alone (and apparently the necessary libraries were included in the /vendor)... either it's my headset or it's some other reasons, but my headset should be aptX-capable and I recall it did correctly pick aptX on CarbonROM. Maybe we need some other Qualcomm-related libraries?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] sangkiss:
I tried Aex6.2 & twodotzero ，Aex6.2 need to look for the network at startup before you can update the time;The SD card problem is the same, my network remains LTE Bluetooth I only tried to connect to gearsport .working normally.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Does Descendant boot after flashing Magisk? No matter what I try I just couldn't boot it (even just flashing Treble zip, GSI Image, OEM image, Disable Forceencrypt and Magisk). It just stuck on Sony logo (a similar behavior like official Resurrection Remix 7.0 GSI which I couldn't boot either, even without Magisk).

Not sure about Bluetooth but it's unlikely that aptX would work without injecting some proprietary stuffs in lower level (something that cannot be done by GSI alone). The reinstall attempt for AINUR SAURON ended up breaking phone call altogether (I couldn't hear or be heard during call, total silence) so I ended up uninstalling it (it was optional anyway).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Beetle84:
Descendant boots with magisk, steps I used are

0.5. Flash stock pie rom and boot once to homescreen

1. Flash twrp-q (first version) via fastboot

2. Flash treble v0.85

3. Fastboot oem binaries (v5a from sjll's afh)

4. Fastboot Descendant image

5. Boot to twrp, format data. (If you get red failure messages, power off and repeat).

6. Power off and reboot to twrp (again, i know)

7. Flash the disable ric zip, flash magisk v18.1 stable, flash performance zip.

8. Reboot, profit.

Mind you, im back on existenz now as i lost wifi connection 4 times in 30 minutes....

And i couldnt get gapps to install using opengapps or mindthegapps.

Little thing i figured out is if the phone boots and the bootanimation starts for a few seconds, then starts again but dimmer, you need to format data.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Okay, I'll try doing this again by flashing stock pie for once (I'm still based on stock oreo as I came from CarbonROM, and being on stock pie broke camera functionality there). It was surprising enough that AEX 6.2 mostly works with stock oreo base (I mean things other than oem binaries).

On the other hand... you can't flash gapps because the system image doesn't leave too much spare room by default. You need to resize it, or use tools that don't touch system image (consider giving MagicGApps a try).

Honestly, due to the way GSI works it looks like quite a hassle to upgrade to a newer GSI... especially since you're probably going to flash system image via fastboot, anything that utilized addon.d for survival won't work here.

EDIT: Regardless of the current status and issues in different GSIs, it's already significant enough, as all issues I'm currently having are not so serious. Looking forward to newer releases as well as possible bugfixes and compatibility improvements.

EDIT 2: Some other issues found (with AEX 6.2):

- Bluetooth calls not working (total silence, can't hear or be heard).

- Orientation sometimes gets stuck. Shifting app focus (switching to another app then back), or restart the offending app, would temporarily fix the issue.

- NFC doesn't seem to work, either.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
Radomly reboot is the bug of SODP, waiting for their fix.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
The random reboot issue has subsided recently. I haven't encountered it once today.

However, it seems AEX 6.2 is the only GSI I could boot and use at present. RR official and Descendant image both stuck on Sony logo, and at present I couldn't build a usable Descendant image (only bootable) due to lots of warnings of unknown origin (either the warnings were present upstream, or there were obviously incompatibilities with compilers on Arch-based distros that need to be addressed).

Speak of the GSIs that couldn boot, I came across a tip that some GSI requires dirty-flashing against Phh AOSP (flash Phh AOSP first, boot it once, then flash the actual GSI), according to ViperOS, and is said that this applies to RR as well, though I haven't tested.

With AEX 6.2 it's mostly usable at present, but it's not at its best yet, so I'm considering giving eXistenZ a try for the time being while Treble can stabilize, though the regions I intended to flash (HK/CN) aren't at 47.2.A.6.30 yet (I think I can just use the CIS one, which is the region I used when I needed a .205 Oreo firmware and it didn't give me any problems)...

EDIT: The recovery can decrypt a data partition encrypted by stock ROM, but it messes things up... Just now, when I set up the stock FW I set a PIN (and TWRP can decrypt it with the PIN), but after restoring stuffs back to internal storage from TWRP, at startup it now asks me for a pattern which I obviously cannot answer since I set a PIN, not a pattern to begin with. Guess eXistenZ might also be a "no" for me now... :(

EDIT 2: Just got eXistenZ working, but sincerely I'm never a fan of stock ROMs... so many bloated (OEM preinstalled) apps that I don't want to see.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Beetle84:
I have a debloat script to remove 99% of that if you want,

Flash it in recovery or unzip and run bat file on pc.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Thanks for the script. I'll try it if needed. For now it seems I can just disable them as those bloated apps (be it on system or oem partition) can actually be properly disabled this time (usually some stock ROMs grey out the "Disable" button and I often need to rely on things like Titanium Backup). Since I use NanoDroid (which has an "overlay" feature that allows debloating unwanted stuffs systemlessly), the script can be a good reference of what to add into the overlay settings.

Still, it's really impressive now that it's possible to even add/customize features on stock ROM now (on framework level), something that I've never seen it done before (it was usually done via Xposed, using things like GravityBox), thanks to eXistenZ (off-topic here).

Anyway, I'm looking forward to more progress on Treble in the future.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sjll:
We could only wait for SODP fix these bugs of kernel 4.9. /(ㄒoㄒ)/~~

I wiil try to disable Decrypt. But it seems related with twrp.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Until encryption/decryption is stable enough... it's better off building the kernel with forceencrypt off (or manually flash the script the first thing after flashing Treble zip).

Back then with CarbonROM and official TWRP similar issues happened before, though only once. I usually set a PIN, but with CarbonROM at that time it suddenly presented me a qwerty keyboard to enter a password instead of a numeric keypad. I was able to resolve the issue back then as it was caused by a particular ROM build (which was subsequently fixed).

It seems with this TWRP I have to disable forceencrypt when using eXistenZ as well... This TWRP can decrypt data partition, but it'd mess up something somewhere (and that thing seem to affect what kind of input Android should present to the user for password input). It seems really ridiculous when you can risk locking yourself out of your own phone just because of things TWRP did that confused Android and presented you an input other than the one you set for password. And it's also my first time seeing Android asking me to draw a pattern for my PIN... usually it'd present me with a qwerty keyboard...

EDIT: Interestingly... with GSIs like AEX, the encryption is somehow not understood by TWRP (that rendered TWRP unusable), while with stock ROM, TWRP could decrypt it, though it can make Android confused. Do GSI and stock ROM encrypt the data partition differently?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
A little update. Maybe you can consult iovf about some TWRP-related fixes. He released a TWRP build that apparently fixed the CPU temperature display, and hopefully encryption-related issues (haven't tested since I've disabled forceencrypt), on eXistenZ telegram channel.

From the looks of it, his build allows backing up OEM and EFS as separate options (as for EFS, your TWRP build seem to back it up alongside boot partition). As his recovery was meant for stock/lineage based ROMs, the partition table needs to be adjusted according to your Treble guideline in order to enable the "Vendor" partition.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LazerL0rd:
So I looked into this a bit more and found out some interesting stuff and [MENTION=3816568]Myself5[/MENTION] kindly informed me that the XZP is built on treble, but does not have a separate vendor.

Since stock is like 28556445x more stable that SODP, has anyone tried interesting stock vendor into a GSI and tried booting up?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Yanun:
I can try out in few hours but correct me in my steps if I'm wrong.

Follow steps from op but flash oem from here:https://developer.sony.com/file/download/open-source-archive-for-47-2-a-8-24/ instead of aosp one?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Chuckl33:
why i cant enter TWRP after booting the GSI rom (AEX, Pixeldust, Pixel Experience, HAvoc,etc)

when i try to enter it , its shows stuck and going bootloop after

and the GPU i think it doesnt work as its have to be

any sugestion for good rom maybe, because my phone just get 110k for all those GSI rom

thanks
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
You probably didn't disable forceencrypt before booting and let your partition auto-encrypted by GSI.

With Sjll's TWRP it cannot decrypt partitions encrypted by GSI and will be stuck in an endless loop reading information, preventing you from using TWRP.

The only way to regain the ability to use TWRP under this situation would be to fully wipe userdata partition.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Chuckl33:
thanks man it worked now,

what GSI rom that i can install soundmod like dolby or viper, because i alwasy fail to install it
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] nvalsc1:
how to instal that rom

help please:confused:
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
It seems the OEM partition on stock and on SODP have different purposes.

The stock OEM partition has mainly region-specific bloatware apks (that you can delete them to effectively debloat the ROM), and some configuration files (which take up only a few megabytes).

The SODP OEM, however, has some extra binaries, firmware files and libraries instead. From the looks of it, the SODP OEM partition is the one that actually looked like a vendor partition. I'm not sure about where these vendor files are located on stock ROM, but I think it's possibly located in /system/vendor.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] wasnty:
hi , i download twrp q for first page , and i downloaded Treble-xzp-v0.85-with-system , (this file 485 mb) my question is , how to install Treble-xzp-v0.85-with-system , just flash twrp or exract it ?

sory my bad english