yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maxidastier:
Using my Sony XZ2C dual sim H8324, I tried to install the latest Android 11 AOSP according to this thread's setup instructions. I started from freshly flashed stock firmware and Android 10 OEM Tama binaries.

However, after having flashed the AOSP to slot a, I cannot fastboot the twrp image on the same slot as it does seem to be incompatible with the flashed AOSP 11 ROM. I can fastboot the twrp image on the slot b and flash the dual sim patch, but that doesn't help me, because I need to apply the dual sim patch on the slot were the AOSP 11 ROM is installed. Fastbooting twrp-apollo for the single sim H8314 will get me stuck at the TWRP logo. Trying to boot a TWRP specifically designed for H8324 does not boot on this slot at all. Booting the AOSP 11 directly after flashing, the boot gets stuck at the android logo as others have experienced. Does someone have the same problem or someone knows a fix? Your help is highly appreciated!

side question: is it necessary to flash the stock firmware to both slots in order to get this working?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] StrangeTurtle:
@MartinX3

Thank you for reply, I've find out what cause my system corrupted.

I tried to go stock and install twrp on my xz3 dual for install magisk.

Disable vbmeta caused the system corrupt.

My step was got back to stock with new flasher with H9493_Customized TW_1316-2305_52.1.A.3.92_R4C this rom.

After disabling vbmeta and fastboot boot twrp.img I can connect to pc with twrp but not able receiving any file from my PC.

Also with sideload.

If I reboot to system now, I'm getting a sodp recovery with corrupted system again and telling me to factory reset again.

Just like the problem when I'm flashing A11 AOSP.

Maybe it's because I'm using a H9493?

Any idea?

Thank you!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Hey, I got an idea for a quick hotfix and uploaded SODP TWRP 11 builds.

Please report back, if you can TWRP them now. :)

And yes, on both slots should be the latest stock firmware installed and at least booted one time on one slot until you see your stock apps.

This only need to be done one time in your life, since there are no new stock updates.

Disabling vbmeta should not make the system corrupt, this message should appear if it failed to boot too many times.

Btw. at my site I needed to disable vbmeta or the GAPPS 11 won't appear on my phone.

I hope everything is now fine.

PS: An easy fullwipe is done by doing fastboot -w
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maxidastier:
Thank you, Martin, will try this when I have time!

EDIT: Now stuck at SONY logo instead of TWRP logo with twrp apollo 11.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you flash or boot it?

Did you reboot into the bootloader only with software (fastboot/adb) and not the hardware buttons?

Do you have an adb connection for logs?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maxidastier:
I did boot it.

I did not boot into the bootloader.

After flashing the ROM on the inactive slot with the TRWP I tried to reboot into recovery from within TWRP to be sure I am in the active slot for flashing zips. Instead the phone tried to boot to android system. Stuck at the android logo, I had to shutdown via hardware buttons.

I reconnected into fastboot mode and tried to fastboot into your TWRP 11 on the slot a where the new AOSP 11 ROM was flashed to.

The TWRP did not boot, but got stock at the SONY logo.

While I had adb connection when I used the TWRP 10 at the point where the TWRP 10 logo got stuck, I don't have adb connection using your TWRP 11.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's weird.

I did adb reboot bootloader or fastboot reboot bootloader and then fastboot boot twrp_11.img and now my phone has TWRP running.

This way doesn't work on your phone?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I got good news. With the next OEM.img release we should get GCAM support.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Sounds very promising :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MDLB:
too excited to hear that before giving up
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xcompactvic:
I have just got myself a 2nd hand xz2 compact dual sim. Unfortunately `fastboot devices` would not show any devices, event after installing several drivers for that device. On Linux it works right away after installing android-tools.

I can see devices. I have also installed Magisk on the device already.

Now how to choose Rom and install Andriod 11 and latest firmware? I saw some questions about it here in this post, but I am missing where to start and how to root.

Thanks :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Latest stock firmware -> Xperifirm + Newflasher

Flashing the ROM -> First page manual

You're welcome :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
In theory the next build (march security patch leel) should have wifi and mobile fixed.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
12.03.2021
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Can we use A11 binaries now on XZ2C?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That will be fixed in the OEM binary.

We need to wait for its next release.

https://developer.sony.com/develop/open-devices/downloads/software-binaries

But the newest A10 OEM should got backported optimizations from the A11 OEM.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The new OEMv4 should come next week or if problems happen in 2 weeks.

It is probably not compatible with my current release, since it is technically a big upgrade compared to v3 with many under the hood changes.

Then we'll need to wait for my april build.

And a bird told me, that we probably get a technically big camera upgrade with OEMv5. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Oh that's very interesting (y)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MDLB:
So the AOSP v11 will flawlessly support GCam ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
At least according to the sony developer.

https://xdaforums.com/t/sodp-rom-aosp-xz2-xz2c-xz3-sonyaosp-11-beta.4180835/post-84605365

But I don't know if the gcam fix is part of OEMv4 or OEMv5.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MDLB:
We'll wait and see for the miracle in the next 2 months :)

And you've got a Dual-SIM XZ2 for test purpose?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Luckily it doesn't matter in 90% of the time how many sims fit in your device to test stuff :P

But I own a H8296 (XZ2 Dual Sim with 6GB RAM).

And after my exams I've got much more time to sacrifice my only phone to the demons of SODP.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
two times my XZ2C suddenly rebooted with a message saying performing a factory reset. It rebooted to recovery...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Do you have a pstore from after the reboot to the recovery?

There the crash reason gets written.

Did you test it with the new march build?

Every new release contains bugfixes and enhancements.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
unfortunately not

next time I will try to get pstore

I upgraded to latest A10 binaries and the march release of the ROM yesterday
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Sad.

Great, then we can torture the developers with bug reports. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
It crashed again. I'm still in recovery. /sys/fs/pstore is empty ...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Then please run "adb shell logcat -b all > logcat_sodp.log" while the phone is running. It will write stuff into the logs until your phone crashes.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dsntbc:
Hi, I have A10 OEM, H8266 model, and still cannot boot, stuck at android logo.

Steps i did

fastboot flash oem SW.*10*.img (it said oem doesn't support slots?)

fastboot boot twrp.img

adb sideload aosp-11.zip

EDIT

i did try fastboot flash oem_a and oem_b, now phone is in reboot loop
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you full wipe it?

Do you have access to adb for logs?

Is your pstore filled after a crash?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dsntbc:
I did wipe it, there was mistake with mounting /odm. I have access to android recovery after pressing Power+VolDn

For Adb logs you mean ./adb logcat -v threadtime [device ID]?

Unfortunately I have bricked it again, so I will write firmware, and try again soon.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dsntbc:
I know what mistake i have made, i flashed oem.zip instead of oem.img...

But now, i'm not able to sideload dualsim-patcher.zip
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please follow the instructions for the installation and bug reports on the first page.

On my XZ2 it did work.

You can also look if the feb 2020 version works.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Hihihi

Please try to boot the TWRP for 11.

I used it in my case to flash the dualsim-patcher.zip, OpenGAPPS and Magisk.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
here's the logcat
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Looks like the modem crash.

Did you flash the new may build?

Before using the custom rom, did you boot the newest stock rom on both slots until you reach the app screen?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
When I started using your ROM, first I used Xperifirm and Newflasher to update to the latest firmware in both slots.

I installed H8324_Customized DE_52.1.A.3.49-R3C

Is there a way to fix this without starting the process from zero?

Edit: I'm not sure that I booted the stock ROM :-( This is important for installing modem firmware?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Can you explain for what purpose this thing is needed? Never did it, just flashing stock firmware using newflasher (on active slot as I understand).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, only a boot, doing the entire setup wizard steps and reaching your stock apps will install the newest modem firmware. :)

If it still happens, please open a bug ticket for the devs.

Sadly I'm busy with mathematic exams to do anything time intensive. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Ah btw you can't reproduce his crashes?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
You mean after installing and booting stock rom?

But therefore an full wipe is necessary?

Is there a way to backup my data? in TWRP the partitions seem to be encrypted only cryptically named folders are shown ...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Oh no, I'm waiting for the newest oem :)

I think it's senseless to search bugs on A11 with A10 oem.

But my question was - why it needed to flash stock on both slots and boot until app screen?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, my favorite backup apps are Migrate, TitaniumBackup and OAndBackup.

And weird, it should decrypt your stuff, ask you for your password you need to unlock your phone.

Yes, I would wait, too, until the A11 OEM is fully working :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
It happens with v11 and v12 OEM binaries. So it seems to be depending of the new ROM (I wanted to exclude the newer binaries as the cause of the reboots)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Weird - TWRP never asked for a password!?

Since I only use it with the fastboot boot command to install dual sim patch and gapps i didn't question it ...

Maybe it's because of I don't use any lockscreen security!? :cool:

Edit: So, set a lockscreen pin - TWRP didn't ask for the pin ...

Edit2: reinstalled all from scratch (including booting to stock rom on both slots) - also found the right twrp now

only issue is the (indoor) location - GPS seems to be working but inside I have no location (location service is activated and the google location (wlan / BT) too)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dsntbc:
Hey, me again

After installation Android boots asks for SIM PIN. The problem is it does see two sims, while i have got one.

one is named correctly and second one: "". When i enter PIN for "" what i need to do, phone restarts after 30 seconds(Restarting\ Factory settings) and boots to recovery.

What might I did wrong:

I flashed AOSP and sim patcher without rebooting, cause i'm confused if `fastboot boot twrp.img` won't override my boot, and i have no recovery partition.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Probably the dual sim patcher got flashed to the wrong A/B slot. Please boot TWRP as described in the instructions and install your stuff.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Installed the 20210311-ROM again using adb sideload (for the first time) (TWRP showed an error that the path for /cache cound not be found) then I installed dual SIM patcher, NikiGapps Omni and Magisk 22 - now the location is running as expected - don't know what went wrong in the first attempt ...

But now the system is running without reboots and with working location service :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] der.lange:
New binaries: SW_binaries_for_Xperia_Android_11_4.14_v4b_tama, new hope?!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
They should work, but a new ROM release is needed or they may bootloop or services may crash.

And since I write my exams soon, the next build will be for april. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Why it's new? It's old version from november, that not working with A11 builds.

Update: oh my bad, they didn't post new version in "Latest Updates", only in "Downloads" ...

Skip this :D

So it's time to check it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The first response in the bug tracker issue ticket was positive.

He was able to boot the new OEMv4b.

So the next ROM release will fully work with it.

No more workarounding by using the A10 OEM!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Latest twrp working, gapps (nikkgapps) too. I can test is googe camera working, but don't know which version is compatible with our platform. I tried few mgc from bsg but no luck.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you for testing. Then it's in OEMv5.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
And some other things:

Still no manual exposure control :/

And minimal ISO value 100, when on stock here 40/50. Or it's maximum for aosp?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
As far as I know OEMv5 should contain a camera update.

Probably it will optimize our hardware usage as well.

Or, if the gcam works, it will compensate it for us.

And you can play around with opencamera if it maybe helps. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
For me there is a better choice :D

Optimistically :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
I just got a new problem.

Started the phone to check some settings. A message (SMS) arrived. Then the same message arrived over and over again. Then I got a message that the phone app has repeating crashed. Then the phone restarted ... to TWRP.

An now I only can boot TWRP. I tried the reboot system option in TWRP and also power off and starting again - only TWRP is starting.

Should I reinstall the ROM? Or what could help booting the system?

Edit: Installed the ROM again - still always booting to recovery ...

Edit2: is there the fix recovery bootloop option for?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Now running zhka compiled version and A11 binaries and all seems to be working well.

No reboots for hours and indoor location 😀

Thank you all!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] LineArc:
Is Google camera (gcam) working or not in this rom?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Didn't try since camera is not important to me. But if you want, I could try.

Can you explain me, where to find gcam app?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please wait for OEMv5
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
okay, as I already wrote: camera is not important to me
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yeah, but not for LineArc :P
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] LineArc:
Please try it, coz the only reason I am not flashing is gcam.

For finding simply Google gcam hub and you will get a search with celsaozevedo.*om
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Sorry, that's to complicated! Googeling gcam hub and even finding that celsaozevedo-page there are thousend of links and versions and settings. I'm not willed to bother with such a complicated topic.

If it was just one APK-download and your had provided the link, I'd have installed and tested it but not that way - test it on your own please ...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
You're right. It's nonsense to test all versions of gcam to find working one...

I tried few with no luck and that's it.

+

This version that worked on A9 runs on this rom (buffer fix should be enabled in advanced mode settings) but when you press capture button - nothing happening. Just icon in notification bar (like processing) without any action.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] LineArc:
Just send me camera 2api probe app screenshot, can you shoot raw? Just want to know if you can shoot raw, I will find you guys gcam if raw is working
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Camera2 API Report

airbeat.com
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Yes, raw is available.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ML11:
Hi, sorry for noob questions but I am just starting modding my Sony XZ2C Dual Sim. I would be grateful for any help.

1. Could you please explain to me the main differences between Lineage and SODP ROMs? How do they compare to the stock? Are there any important modifications to the kernel (I am trying to extend battery life of my device)?

2. Is there a viable way of restoring DRM keys after unlocking the bootloader? How big of a problem is it now? If we get gcam support, will the photos quality still be worse because of the lost keys?

3. What can we expect from the OEMv5 and will it be available for XZ2C DS? You aim to release it in April, right?

Thank you for your help!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] NextGeneration9501:
Hi. Is there any detailed guide on how to flash custom rom on XZ2? I just came from XZ1 and I found flashing on XZ2 different as it utilises A/B partition so I have problems. I have followed OP's guide but I can't get GAPPS to work. Here's what I've done.

Used nikkgapps both basic & full. flashing gapps before AOSP march 11 first boot will result in device stuck bootloop when sony logo shows up. flashing gapps after first boot will result in black screen. but the computer can recognise adb connection.

I just wanted to use Play Store :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
I don't see any word about twrp? So how you install gapps then?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] wangyj:
wow,it's cool that i flashed the latest sodp rom for xz3 and it works well.thank u very much.but ,it'a a litttle wrong.

1、my sim is telcom,and network is ok,i can called by people ,but i can't call people...so sad

2、som wrong with the camera maybe, i can't Face recognition for app.

i don't know that it can be repaired for u ,or it's a question for oem
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] NextGeneration9501:
Hi. Why Night Light is missing? Running AOSP 11 March 11.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I just used TWRP to flash OpenGapps 11 Pico and it worked. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you flashed and booted up to the app screen the newest stock rom firmware on both slots first before switching to this ROM?

I am not sure if the next ROM update would fix it for you, since it worked at my side the last time I tried it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I'm sadly not sure if AOSP had night light before.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] muphetz:
Hi,,@MartinX3 ,,is it safe if i have flash all img from payload extract?

I mean all img such system.img,vendor.img too?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I don't know, I just followed the instructions on the first page.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] AgutoX:
Is it worth for gaming?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] NextGeneration9501:
The light sensor not working. HWINFO says light sensor not giving any data
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] LineArc:
cant understand the guide either. need help guys.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Haldi4803:
Download Link for OpenGapps for Android 11

OpenGApps - Browse /arm64/test/20210130 at SourceForge.net

OpenGApps daily releases

sourceforge.net
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Haldi4803:
Found 2 bugs so far.

using aosp-11.0-20210311_aosp_h8216.zip with SW_binaries_for_Xperia_Android_11_4.14_v4b_tama (which are newer than the ROM)

During a call volume is fix and cannot be controlled by volume buttons. Setting speaker volume higher or lower does nothing at all.

I don't receive any SMS. Same as this issue maybe? Does SMS receiving work for you?

Here is the log:

logcat.log

drive.google.com
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] LineArc:
i tried the guide in post #2 but could not comprehend it. therefore it is an humble request if you could help in thorough and step by step guide of flashing the rom and Recovery. tried your twrp guide and when command for booting into recovery is given it just boots normally in android system. need your help bro. BTW i am rocking the single sim variant of the phone.

thanks
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] LineArc:
can you provide the step by step guide how you flashed the rom. I am having difficulties. especially I have no idea what to do with binaries. may be a quick, simple but working guide might also help.

thank you