yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
Do NOT use the SonyOpenDevices OEM image.

Also: The SonyOpenDevices program is an independent project that doesn't use anything from Stock. They meanwhile use the 4.9 Kernel (and previously used a different 4.4 kernel).

However, they've never managed to be even remotely competitive to a simple, stock based bringup (as you're using it with Carbon). There's always been some major drawbacks like camera issues or performance impacts and as soon something was fixed something else broke, which I was eventually tired of (yoshino was way less terrible than tone here, but still far from good).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Sgellz:
M rom better than this beamer?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Guess I'll consider reverting to stock OEM image when updating to the next version. However, I couldn't find a good way to flash it via fastboot (so I might still need to use the .270 FTF file and flash only the part that is supposed to be the OEM image). Also, when using the stock OEM image, are stuffs like DRM Fix needed to ensure camera functionality? With current 20180811 and SonyOpenDevices OEM image I don't have any major issues with camera or audio, though.

As for whether the 2218 ROM still has the "stuck on the sony logo" issue or not, I did not get an answer (the kernel from post #262 might still be needed just to be safe).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] HoiFung:
0911-2218 works very well here.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] beammer335d:
It does. Standby battery drain is good , only 2% in 7hours
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Got locked out again.

Flashed the 20180913 ROM and some other stuffs that needs to be flashed and found myself unable to unlock the phone again.

This time it's different. It's actually prompting me for the PIN, and the PIN can indeed start Android, but when I type the same PIN in the lockscreen (I set to scramble the numbers but unlock automatically), at first the screen suddenly went blank, after I managed to get the screen activated, from this time onwards my PIN (which I decrypted the phone with) refused to unlock the phone. Even typing it with ADB and adding emulated OK input gives me a Wrong PIN even though the PIN is correct and is the one I used to decrypt the phone and boot up.

EDIT: I ended up deleting the locksettings.db so I can bypass the lockscreen and reconfigure the PIN (I'm still prompted for the old PIN to decrypt the phone and it still works anyway).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] beammer335d:
What camera app is anyone using? or just what comes with carbon?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
WARNING: The Scramble PIN layout (maybe with Quick Unlock) can lock you out!

After some usage I finally found that it was probably caused by the "Scramble PIN layout" option (and probably coupled by "Quick Unlock"). Sometimes it would stop shuffling on the surface but still shuffled internally, causing a mismatch: What you input, what you saw (and what the lockscreen recognized) were correct, but the underlying values weren't, which would not trigger Quick Unlock, and by forcefully entering the keycode for the PIN as well as the OK would result in a "Wrong PIN" error.

Additionally, I'm not sure whether the PIN input has internal count limits or not, trying to unlock with the "correct" PIN for as much as 20 times would not trigger anything (like some kind of self-destruct mechanism or else).

If you happen to enable those two features, this would give away that you've been hit by the bug:

- When you input the correct PIN, your phone won't unlock, and if you try to tap backspace twice, your screen will turn off (due to Double-Tap to Wake/Sleep function).

- When you wake up the phone and try to input your PIN again, it still won't work, and if you look at it clearly, you'll find that the numbers remained on the same position, implying the PIN inputs are not shuffled on the surface.

- In case the ROM does have self-destruct mechanisms, since you were inputting the correct PIN (if your phone is encrypted, then it definitely is since you needed it to unlock the data partition), you will never be prompted for the remaining attempt counts.

Usually this would go away with a reboot, but if it still won't work (that is, you input the PIN to unlock the data partition, but the same pin still won't unlock the lock screen), you'll need to delete the locksettings.db through TWRP and reconfigure your PIN. (If your phone's encrypted, you'll still be prompted for the PIN you previously set after deleting the file).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Shellyaffff:
Camera quality not good well looks that way to me like I'm using a really old camera mobile
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Shellyaffff:
Doing anything wrong ?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] killer-0091:
Any fix for okay Google not turning on I go through the process of setting it up but if you tick it on it won't turn on
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Another minor problem and I'm still figuring out why...

Sometimes the navbar is still there (and able to respond to touches) even after it became hidden after a certain period of inactivity.

It can get in the way of games, if I want to touch something on the rightmost corner, during which the touches would be caught by the navbar instead of the game.

When that happens, the only thing to do would be to tap "Home" on the hidden navbar and then return to the game I was playing so it would be correctly hidden this time.

EDIT: You can also tap "Recent Apps" on the hidden navbar and then return to your previous app. It'll correctly hide after that.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Knowbody42:
According to the thread for Lineage OS, they're going to put the stock camera app into it.

Would it be possible to get it on Carbon ROM?

Or alternatively, can Carbon ROM enable the Camera2 API with raw support so that I can install GCam HDR?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] beammer335d:
Thanks for the update.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Andross01:
Thx for the update! :)
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] gabry97:
I unlocked the bootloader and installed TWRP with fastboot. I do not have the root but can I flash this rom? After unlocking the bootloader I have problems with the camera does not display the photos remains a green screen. This Roma solves the problem? Thank you
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Beetle84:
Yes you can flash this rom and it will fix the green pictures
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] fobtob387:
Yes please, at least Camera2 API support if not the stock camera. Even with the API enabler in Magisk it still can't take advantage of the hardware.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] ddwf:
Well,after updating,thev voice match and face unlock disappeared:(
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] TjNiko:
wait a bit longer, myself5 is puting some sugar on pie (mainly fixes **** camera) and u will get it soonish. XD pie with pie flavor. MHHhhhhh yummy.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mine420:
Thanks OP This is a great Rom. I had my phone since day 9 after original release and just now got around to rooting and unlocking the boot loader. This ROM is clean and very fast. I am a bit perplexed as to why this phone has little roms for it. But stock Sony roms are pretty clean. This ROM gives me much better signal for us T-Mobile than I got with the Uk xzp that I was using. The camera works fine hard to compare with the stock Sony camera I for one do not use phones for photography though fun pics and what not camera is just fine hard to tell a difference. Nothing will best the fun old days of the Sony x10 though. Anyways thanks to the devs That out this together.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
Because it is a decent ***** to work on. Sony kinda scared away many developers with all this DRM sorcery, and the few others that are left are mostly working on the Sony Open Devices Project.

BTW: Small status update: Still fighting the camera on Pie, everything else appears to work (device wise).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] TjNiko:
ye mysself5 is right. its decent hardware BUT Drm and CAMERA OUTRAGE any DEV. its even hard to get Pie working as it should. its on the way but will need a looong trip.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] jymmyreevs:
i did a fresh install yesterday of 2218 , plus gapps , plus boot .img , ....i have to say that its working nice and smooth so far , i love it , many thanks , good job.

P.S. its asking me for an update to 2232 , did anyone updated , it is worth? because im happy with 2218.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mine420:
I am using 2232 and microg everything seems to be working fine didn't even know there was a prior version. The zip I have download is for 2232.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] greencartim:
So I noticed with this ROM that half the brightness slider doesn't do anything. And the screen doesn't go as dark compared to stock.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mine420:
I use the 2332 version and it adjusts from dark to bright just fine but been so long since I been using it that I can not compare to stock
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Miustone:
What about the working Camera on Stock Android 9 with unlocked Bootloader? Does it not mean we don't need a workaround on AOSP anymore? I think SONY just did a very important Step to get the Users and Developers back to Xperia...
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] beammer335d:
Installed the Nov 12 ROM, getting green on my pixs.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
This is by far not enough. The camera quality will likely decrease (it always did) so the drm fix is still recommended. What Sony did is avoiding a long overdue lawsuit due to literally breaking users devices.

Isn't it interesting how the update to fix camera issues that existed since the X Performance that was released over TWO year ago has been fixed less then two weeks after class action law suites were made legal in Europe, Sonys main market?

The mere fact, that they PROVED they could fix it throws a big ball of shade on the whole company. You can't tell me it took them 2 years to fix (especially as I know how the DRM fix on XDA works) so they clearly just didn't care at all before.

This is far from being anything near developer friendly. This is a ****show.

The maple trees havn't been touched for over 2 months, yet they randomly break. Surely, a prime example of being developer friendly hahahhaa.

I'll take a look at the issue though.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Say is there any progress on properly enabling 120Hz support for this device? Does the ROM have support for it?

Recently there have been few news about it since this thread.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] ak1213:
xz premium root android 9
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Beetle84:
Go away
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] poid0010:
please fix sound out for usb audio not work
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] yjabra:
Help me

Hello, can the G8142 dual card version in China be able to write carbonrom? Is the camera audio working properly? How big is the difference between photography and the official? It is best to reply to me by the staff of carbonrom by email: 3580920759@qq.com：困惑：
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] HoiFung:
The ROM uses the stock firmware blobs, which is actually as good as the camera firmware of the Stock firmware. What's worse is the camera application experience.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
cr-7.0 is still WIP, with the need of many fixup commits, so that would explain your issues there.

However, the 6.1 issues you encountered looks like you're running out of RAM. Do you happen to have less than 12GB of RAM?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
My system has more than 32GB of RAM... RAM itself shouldn't be an issue. If programs are running out of memory it's more likely that they are reaching the limit they were allowed to use. Is there some configuration needed to allow certain programs (such as Java VM) to use more RAM?

At first I thought it might be ccache related so I even set up a 40GB cache, but it didn't solve any problem, including JACK server issues. I could only proceed building with JACK disabled.

EDIT: I'm not sure if this RAM means physical RAM or swap space... I've only allocated 12GB of swap space because my system has plenty of RAM (that there should be less need to use swap) and the swap file is on the same drive as the system (which is a NVMe SSD).

EDIT 2: It seems the JACK server issue was because I ran ScriBt with proxychains (which is needed for repo sync as normally I need a proxy to be able to properly sync all the source code repos). Running it without proxychains after syncing solved the JACK server problem (so it might be interfering the communication with JACK server), but I still need to see if it can finish building this way.

EDIT 3: Build completed (yeah!), but still, many thanks.

EDIT 4: It appeared that the yoshino-common device tree is still not adapted for Pie (even with cr-6.1), which might explain the build errors as the Pie uses 4.9 kernel, the tree still points to a 4.4.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Cannot pass Safety Net (CTS Profile)

By the way, should point out that as of the latest official build of CarbonROM, the build fingerprint used cannot pass Safety Net.

CTS Profile is failing, but Basic Integrity is passing. The Magisk Props Config module (which can replace the build fingerprint with a known good one) is needed to pass CTS Profile. Not sure if this has been pointed out before.

EDIT: The fingerprint used by the ROM looked like this (from Magisk Props Config).

Sony/G8142/G8142:8.0.0/47.1.A.12.205/1908034680:user/release-keys

If this weren't the case before, wonder if Google now has the ability to revoke a fingerprint that previously passed from passing again... Is there a way to replace this build fingerprint with another one that's still being "certified" during build process?

EDIT 2: Forget about Magisk Props Config... it seems to trip Safety Net now (or maybe it's BusyBox NDK, which the module requires, that tripped it).

EDIT 3: Just confirmed that BusyBox NDK doesn't trip Safety Net by itself.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Thinking about 120Hz...

After I got myself a working cr-6.1 build environment I'm thinking about trying to get 120Hz working.

I'm looking at the dtsi file from sonyxperiadev kernel repo here:

https://github.com/sonyxperiadev/ke...si-panel-somc-synaptics-sharp-4k-cmd-ID6.dtsi

Which has kholk's 120Hz-related commit and the respective file (on the first line) in CarbonROM's kernel repo here. It contains only a part of the contents (mainly dsi_dual0_6_panel), without the timing-related part (1080p60, 1080p120, 4k) and the "dsi_dual1_6_panel" section.

https://github.com/CarbonROM/androi...rm/boot/dts/qcom/dsi-panel-maple-id6_pcc.dtsi

I'm still looking at the code to look for other stuffs, so maybe I'm still missing something.

EDIT: It seems the main contents are here (which included the id6 dtsi file above).

https://github.com/CarbonROM/androi...1/arch/arm/boot/dts/qcom/dsi-panel-maple.dtsi

But there's only 1080p and 4k in there, as opposed to 1080p60, 1080p120 and 4k in the official repo. This might be a starting point.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
The sonyxperiadev kernel is not the "official" kernel but the SODP only kernel based on CAF. The official kernel (which i would define as being the stock kernel) is what the Carbon kernel is based on. That can be found here: https://github.com/sonyxperiadev/kernel-copyleft (use the correct branch) or as an zip archive on the Sony website.

That means (while the SODP kernel drivers are somewhat based on stock) you can't directly compare them.

Just something you should keep in your mind when doing this ;)
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Guess I still need to look for some other clues for initializing 120Hz properly... adjusting the dtsi to 120Hz for 1080p is not enough and I ended up with only 24 fps despite the app FPS Test (looked very old) did show the refresh rate (rr) value is set to 120Hz (maybe the system value is set to that, but not actual frame rate. If the system value is indeed changed then the place I changed was probably the right place to start).

Basically, I just tweaked the values in every 1080p entry in the file arch/arm/boot/dts/qcom/dsi-panel-maple.dtsi:

qcom,mdss-dsi-panel-framerate = <60>;

into

qcom,mdss-dsi-panel-framerate = <120>;

(Actually, I did a 3-way diff with Meld on the timing part in question against the SODP kernel 1080p60, SODP kernel 1080p120, and CarbonROM kernel 1080p, and this line was the only one different)

I'm not sure if there any other aspects needed, especially, driver module itself, or maybe it's just my hardware happened to be not capable as some others once stated they could only manage to bring the panel to 90Hz... may consider trying that value.

EDIT: I only flashed the newly built kernel instead of the entire ROM image, as it's only the dtsi file (in the kernel repo) that I've changed... not sure if this change would alter anything on the ROM side, though.

EDIT 2: It appears setting to 90 still yields only 60 FPS... at least better than 120 which would end up being 24 FPS...
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
You could pick all commits with one command, just use "repopick -t maple-pie".

Anyways theres at least one more commit you'd need which is https://review.carbonrom.org/c/CarbonROM/android_vendor_carbon/+/7784

Other than that, I didn't build for maple in a while now (and theres still quite a few things broken) so chances are it might not build at all yet. I'm working on the Z3 and Z3C ATM, will get back to maple and poplar in a while.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
After cherrypicking the commit you mentioned I'm able to finish building it. However, at present it could not boot (stuck at Sony logo).

From the looks of it, the CarbonROM trees for kernel (msm8998) and vendor (obsd39) are not yet updated for Pie (there are only some minor changes, but still mostly Oreo). Also, it's unknown whether we'll need Sony's stock OEM image from a recent Pie version (such as 47.2.A.2.33), or whether we'll still have to rely on SODP's stuffs (kernel and oem binaries), in order to have a bootable cr-7.0 image.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
I am still using Oreo blobs (because Pie wasn't released when I started working on the Pie bringup) and you should have the latest Stock Oreo on your device.

I don't know how many more times I need to say it that you need to stay away from SODP and their kernel and ESPECIALLY their OEM binary.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
I understand about staying away from SODP kernel and OEM binary, which reminded me of the time when I tried to build AOSP according to the "official guide" and flashed the images (including OEM) into my device only to find out the result was a total nightmare that would throw tons of errors (bluetooth-related and some others) then power itself off after a few seconds, what a disappointment.

Currently I do have recent stock Oreo blobs on my device, yet the generated cr-7.0 ROM zip could not boot after flashing from TWRP. The AOSP fiasco forced me to flash the entire stock Oreo ROM with FlashTool before flashing CarbonROM as the SODP OEM binaries broke the phone call functionality (I could not hear the other side, nor could the other side hear me, a total silence).

As for the question about whether recent stock blobs (from Pie) would be needed was mainly about the changes on stock Pie that people have already noticed, notably the camera, which no longer saves green photos compared to stock Oreo, on an unlocked device, although that alone might not be enough.

Still, It's possible that a 4.9-based stock kernel would be needed to get a bootable build for cr-7.0 (I once asked in the thread regarding the stock Pie firmware and the answer was 4.9).

For now, the 4.9 stock kernel in question (along with recent stock firmware builds) is not yet on the kernel copyleft archives. But anyway, I've got an overall understanding of the current status of cr-7.0 for our device, and I'll be looking forward to an official release in the future.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] xStatiZx:
Downloaded, Flashed, worked 1st time!

Thanks for the hard work!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
I had a long reply to this typed up, but it appears I never sent it. My bad.

Anyways, there is no 4.9 Stock kernel. Pie stock uses 4.4 and you've been bluntly lied to. There is no Qualcomm utilizing OEM that ever did a major kernel version upgrade during releases (not even sure if QComm allows that). The only time I've seen an OEM do that was on a (yes I'm aware of the irony here) a MediaTek chip. Namely the MT6580 that got an upgrade from 3.4 to 3.10.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] jesserly:
i did an update now my phone wants to know it password , i didnt put in one ?!

what now ?

can you help ?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] droem:
Any plans for Pie update? Thanks!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Myself5:
What did you update from, what did you update to?

Yes.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] droem:
Cool, when will it be available?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LazerL0rd:
We don't ask for ETAs here... :).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LSS4181:
Hmmm... so it's only SODP kernel that somehow got bumped to 4.9, not the stock one... I've noticed that on the same thread someone else asked that the Pie is still using 4.4, and the one who once told me 4.9 mentioned something about a xflash kernel...

I don't know what exactly the "xflash kernel" he mentioned is, and I'm not going to discuss it here as it's irrelevant.

What kind of password it asks for? If it's a text password and you set a screen lock of anything but that (PIN, pattern, etc.), then you probably hit a bug. This happens occasionally with ROM updates, if you still have "force encrypt" enabled on the phone (which encrypts the phone the first thing it boots). It seems CarbonROM (or TWRP) has intermittent issues with encryption enabled.

I encountered the issue once during an update, and that time for some reasons, the TWRP was able to decrypt the data partition with default password, despite the fact that I had always been asked to decrypt it using my own PIN. I got out of it, by reverting the update, deleted the lock screen settings (it's not valid anymore), and reconfigured the PIN so that TWRP could only decrypt the partition with the PIN I just configured. The re-encrypted data partition continued to work since then.

I don't know exactly how to disable encryption, but I somehow managed to disable it when I was recovering from the failed attempt of flashing a self-built AOSP Pie ROM based on the official guide. The failure forced me to wipe everything and start from scratch (stuffs properly backed up though), and somehow, after wiping data partition, it no longer auto-encrypts upon first boot. I do prefer having the phone encrypted in case something happens (such as theft), but it seems the mechanism seldom copes well with custom ROMs... will consider re-enabling encryption some time later... if the thing's considered stable.