yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] joshuajau:
Hey,

I'm currently using LOS 18.1, do I need to follow the step or need to flash the original firmware first before flash this ROM?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Make sure you did flash and boot the newest stock rom once last year, before you moved to the mighty custom roms.

It's needed for every custom rom, not only SODP based, to minimize bugs.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
A bird told me, we get a kernel upgrade from 4.14 to 4.19 with android S/12.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] patomovil:
Wow, congratulations on the advances in this project!

My device is still running stock ROM. In the past, I understood that flashing the device erased some special keys that meant the camera would never be as nice as stock, any maybe some other things got lost. Now that this custom ROM is on OEMv6, is there anything I lose by flashing from stock?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] patomovil:
Also, what's the difference between this SonyAOSP ROM vs the LineageOS 18.1 ROM?

(I'm looking for a stable daily driver with a good camera and security updates, so those are the differences I'm most interested in, but if there's a complete description of the difference somewhere, maybe I'll notice something else important to me.)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
DRM keys are only used on vanilla stock. Not on custom roms based on stock or SODP.

The camera won't degrade on stock as well now if you booted the newest stock firmware on both slots before unlocking.

The stock based LineageOS has a better camera, but will stay on the old 4.9 kernel forever.

Also they need to workaround the old qcom closed source drivers more with every new android version.

SODP has a newer kernel and will move again to a newer kernel.

In the end the device will get the kernel.org mainline kernel directly (first device trees for sony xperias will appear until the end of this year if every kernel patch got merged upstream by linus torvalds or whoever is the kernel maintainer for this topic)

Sadly currently the camera is worse, if you don't manually fine tune it with camera apps like open camera etc. The automatic stuff isn't calibrated enough.

And IMS need to get fixed. At my provider it's needed for VoLTE, VoWIFI and IPv6.

And there is a battery drain. The RPMh by QCOM prevents the phone from deep sleeping. Probably fixed with the 4.19 kernel, but definitely fixed after the device runs the mainline kernel and is free from any closed source blobs and get updated like your home computer for years.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nickocou:
Hi, I had difficults installing the ROM but in the end I was able to do it thanks to an alternative tutorial from a previous reply.

Now I'm trying to set up my Google account and backups but it's impossible to do since I don't get messages. Phone doesn't register in the mobile network and doesn't find any either when searching, and fails to send SMS. Sorry if this has been already answered before but I haven't found any solution yet.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did flash and boot the newest stock firmware, before you moved to the world of custom roms?

Shoud be 10 in mid 2020.

And of course OEM v6 binary, the newest ROM version and the dual sim flasher if your device is a dual sim device.

All described on the first page.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nickocou:
I moved from Lineage 18.1 and before doing it I indeed installed the latest stock firmware. Also did install the last Tama binary and the dual sim patcher just in case even though I have a single SIM model (H8216).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
xD Case closed
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nickocou:
But it wasn't working at first when it wasn't installed anyways, so that's not the reason.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's sad.

Then I need a logcat.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
A bird twittered to me, that we got a booted 5.14 mainline kernel on the xz2.

Now features like usb, sdcard, etc gets added.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] patomovil:
How do I boot the newest stock on both slots?

Ok, then I'll go with LineageOS for now, and migrate to this AOSP ROM when the camera and battery issues are resolved. The VoLTE and VoWiFi probably won't work here in Ecuador until 2030 anyways, so I'm not concerned about those.

There are open source Qualcomm drivers now!?!? That might be the most exciting news I've heard this month.

Thanks for your detailed replies :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Newflasher and switching slots via fastboot

No, but after sodp finished the mainline kernel for the xz2 there will be mostly no closed source.

But don't expect the kernel in stock based roms like LineageOS.

They will stay on kernel 4.9 with all of the kernel modules and closed source blobs.

You're welcome. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Next kernel is delayed for after the 15. :)

Maybe we get OEMv7 by then. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danj1:
OEMv7 has just been released. 🙈
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice then only my exam prevents the release :D

Btw. it contains more camx camera fixes

Since all camx devices got unified fixing them got far easier. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
On latest build r43 with latest oem v7 - when system boots, 15sec after appears message about factory reset and phone restarts to recovery (?) with offering make wipe. After wiping, again - boots > message > restart...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's sad

Please open an issue ticket with logcat

Thanks for testing
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
But maybe in this case it's issue on my side, who knows... and when you'll compile your rom it will work :)

There were accidents before.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Strange, I tried x2 before and there was issue like mentioned above. But after third install all seems fine.

Update: No restarts if phone connected to pc over usb cable :D If disconnected - restart as a result.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Oh yes, it will work if I compile it, because thanks to your report it got fixed :D

Yes, to ease debugging it won't crash with a connected USB cable :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Ah, i sounds delay the next build.

I heard about a sleep of dead bug with the XZ3
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
ETA?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
We expect his logcat today, without it, it can't be fixed. :)

Or he reports, that it doesn't happen again, then maybe he did something wrong and we can build. :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
Build it

But sir, the logcat

Just do it!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Let's deploy it.

This is fine.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zackkiara2013:
Hy @MartinX3 I'm now at existenz a10 rom.. Can i just flash this rom or i should on a11 stock rom?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Every Rom change, either android version or distribution, requires a full wipe.

And a only once booted newest stock firmware on both slots until you reach your app homescreen or you won't get the newest baseband modem firmware.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Seems he didn't complain again so I compile the ROM today.

And fight against HTTP 429 on the AOSP repos.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
Niceeee, I'm waiting for your works.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
XZ2/XZ2C are up on the ftp server, which makes somehow problems (being slow)

So i can't let it copy to the AFH server atm and the xz3 build follows later.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
17.09.2021
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
So it works? And problem somewhere on my side? :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
What is your problem?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
My compiled rom after system boots goes to factory reset.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
Same here, but I be able to boot properly if I don't flash gapps, magisk, or probably twrp too.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Just flash rom, disconnect from pc and boot system :) Without installing gapps, magisk or twrp.

Is there no restart issue then?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
Ya, but I don't want have phone without gapps for now. Because almost every apps I needed is need a GMS
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Strange then :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danj1:
Same here. I can get across this when I fastboot -w to clean userdata. On system start com.android.phone force closes but system runs properly. If I add sim card it restarts itself and suggests to do a factory reset.

Latest opengapps (2021-09-17-pico) and dualsim-patcher-v4 is applied after rom install.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Gib logs or open an issue ticket.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danj1:
I'm currently redoing the process and will send logcat asap.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
I don't think they didn't see posts/mentions in closed ticket, new log was attached in it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danj1:
Can not reproduce atm. Now it starts normally but SIM service does not come up properly.

Logcat attached.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] landsome:
Gcam? :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
I did this on my XZ2 compact DualSIM:

newflasher with H8324_Customized_DE.1.A.3.49-R3C (wrote to both slots)

Booted and installed updates. (Might have forgotten one slot, but baseband version is the same on both.)

fastboot flash oem_a SW-binaries_for_Xperia_Android_11_4.14_v7.tama.img

fastboot flash oem_b SW-binaries_for_Xperia_Android_11_4.14_v7.tama.img

With 2021-03-02_17-09-00-twrp_apollo (Or maybe one extra turn with 2020-06-14_21-07-37_twrp_apollo_stock - I don't remember, nut it was sodp in the end):

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot boot apollo-twrp.img

Installed aosp-11.0-20210917_aosp_h8314.zip

Installed sony-dualsim-patcher-v4.zip

Installed the recovery image

(repeated with the other slot)

booted AOSP, checked baseband version (double entry, see above)

booted TWRP, installed magisk

booted AOSP, set up WiFi, installed LSPosed via magisk

rebooted, installed XPrivacyLUA from apk

rebooted

Then, out of nowhere: Factory reset. :oops:

There's no way to boot AOSP anymore now. Tried a wipe, with TWRP and fastboot -w, but no success.

I think, I'll try the last AOSP 10 build with SW_binaries from before the release date. A11 just doesn't look stable yet.

a shor rant:

Why on earth does such thing as an *automatic* factory reset even exist? I mean, seriously, are we doing this to get control over our hardware? Because if not, I might just give up my fight for a more secure and more privacy friendly android phone and keep the stock ROM. Damn, this irritates me much more than any other bug since Android 4.

/rant
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you for the logs.

We need to wait for

[TRANSPOWER] [3/4] Convert all makefiles to BluePrint by MarijnS95 · Pull Request #14 · sonyxperiadev/transpower

Depends on #13 Blueprint is easier to read, has less possibilities for complicated configuration (for the better) and is much quicker to parse by the build system. Note that an extra android_librar...

github.com

[TRANSPOWER] [4/4] [WIP/RFC] Make SDK-28 compliant, use HookMediator for qcrild by MarijnS95 · Pull Request #11 · sonyxperiadev/transpower

Depends on #14 Hi @jzoran, This PR attempts to fix a multitude of things related to recent changes on SODP and Android API compatibility. Let me run through them sequentially: Kumano requires qcril...

github.com

getting merged.

So we need to use the previous builds for now.

I'll delete the newest builds from the servers.

But only for the error

AndroidRuntime: java.lang.IllegalArgumentException: invokeOemRilRequestRaw failed with rc = -2

If your crash is caused by a different error, please report it.

@xperinaut

You just got bad luck.

The previous releases were fine.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
But even with the August's build my device isn't booting up, has the data been corrupted?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
What do you mean?

Upgrading from July to August was fine and using a fresh wiped phone with august was fine too.

(OEMv6)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
19.09.2021
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
I mean that I installed September's build and had the "factory reset issue" but even after reverting to August's build my device isn't booting up...

So the data has been corrupted and I have to perform a clean install including data wipe?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
Try to flash to stock first and boot up once. Then start from the first step.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
We only need this merged.

libpower/transmitter: Don't consider SET_TRANSMIT_POWER failure fatal by MarijnS95 · Pull Request #15 · sonyxperiadev/transpower

We already know that SAR backoff doesn't work, and were previously conveniently ignoring any failures. The transition to TelephonyManager in #13 changed that and considers this to be fatal, but un...

github.com

Then I can make new builds :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
A downgrade is not possible, sadly. And i can only start building this evening, after I came home.

That's only needed once in a phone life on both slots (including the boot into the app screen to update the modem) with the newest stock firmware.

(If we would still get stock updates, we would need to do it monthly)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Playing with the august version of AOSP 11 now. Got the dreaded "factory reset" message once again. (Might be related to TWRP, or Magisk, not sure yet.)

The A/B scheme can causes confusion so I started to make notes about what is installed in what slot... :coffee:

After the "factory reset" message it's impossible to boot anything except TWRP. No kind of wipe would help. After I reinstalled AOSP I ran the AOSP recovery's reset and could boot again. After that I can even change the slot and launch TWRP. I assume AOSP wants it's own recovery to actually perform the factory reset. (Maybe it sets an unknown flag?)

I just let the phone sit for a while, then installed Riru. No reset yet,

Anyway, the installation script comlained about permissive SElinux. Hmm. :cautious: How's that? I never set it to permissive.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The problematic commit got merged 9 days ago, the august build is older, so probably you confused yourself.

Flashing an OTA zip a recovery also switches slots automatically.

About A/B, the only this you need to do is putting the newest stock on both slots and booting it to the app screen.

Since we don't get monthly stock updates anymore you only need to do it once in your phones life.

fastboot -w also does a full wipe.

As far as I know currently we've got permissive, because we're missing selinux rules.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Yep, that didn't help.

It's possible I accidentally installed the september build in one slot. No unwanted resets yet...

That sounds terribly dangerous. The message said that without SELinux every app would be able to lift itself to user 0, i.e. root privileges, but I assume that's an exaggeration, right? I mean, the Android security model doesn't solely rely on SELinux, or does it?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Gee, I really want to kill the stupid Google search bar. 🪓
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, as log as you install software from the store, you're fine.

The app permission model prevents the app from using phone features.

Of course the selinux rules will be added, too.

Currently every deny gets logged in the logcat.

Someone would need to filter the bad denies out (like happening from magisk) and generate rules from the good denies with the converter app and open a pr in the sodp sepolicy repo. :)

Google removed the ability in aosp 11
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The commit got merged, it's time for a new build. (And offline charging works now, if it didn't work for you in the past)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
20.09.2021
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
You mean, they removed the ability to remove something from open source code? :sneaky:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I mean they removed the option to hide the google search bar in the aosp launcher

(╯° □°） ╯︵ ┻━┻
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danj1:
Just installed the latest version and it works quite fine. Modem is not complaining anymore. Thank you very much @MartinX3 !🥳
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
XZ2C should now running fine?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
@MartinX3

There's file lineage-17.1-20200713-UNOFFICIAL-apollo.zip in your androidfilehost folder. Is that build any different from LineageOS builds from the Lineage OS website? You wrote something about cherry picking and OEM drivers...? Will there ever be an A11 version?

(I know, this is the AOSP-Thread, but I couldn't find anything about the LineageOS build in this category.)

Edit: Found this thread.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Looks stable to me.

I have a slightly lower baseband version now, though. I wonder why.

Also, I can't get a root shell with adb.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Freshly compiled rom works without restarts :)

Unfortunately no changes in that way.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
you probably didn't flash the newest stock rom on both slots and booted it into the app screen.

activate root in the developer settings.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, I stopped it, since there is already an official LOS which uses automated build servers to release frequently OTA updates.

I look forward for arrowOS.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
If it doesn't work, take logs and add them to the gcam issue tracker. :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Actually, I went through the whole process from start yesterday including a full reset to stock FW with newflash, boot, some updates, oem-Images and so on. Does any of that reset the baseband version? Or is baseband info stored in the modem?

Aynway, I updated at least one slot for sure. I just botted and checked the other. Both slots have the same version. The difference is only in the last numbers, so maybe it's a country code or something. Can anyone confirm prodQ-0052-00 845-sdm845.gen.prodQ-0052-00 is the newest for Germany?

Concerning the adb root problem: I can su in an adb shell. The reason why adb root doesn't work is most probably a change in the props which is caused by a Magisk module I activated to pass SafetyNet. (Not yet successful with that.) See https://stackoverflow.com/questions/25477424/adb-shell-su-works-but-adb-root-does-not

I have not yet checked if disabling the module turns the props back (probably not nope, doesn't), but as I can just su, I'm happy for now I think... I hope...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
fastboot flash oem_a *.tama.img ; fastboot flash oem_b *.tama.img

The TWRP installation thread is https://xdaforums.com/t/recovery-android-10-11-stock-sodp-xz2-c-p-3-twrp-3-4-0-0-unofficial.4074305/ but I'd recommend NOT to install TWRP.

You can run TWRP from memory:

fastboot reboot bootloader

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot boot twrp.img

Use the TWRP from 2020 for stock builds until you have installed AOSP. After that use the TWRP from 2021 for sodp.

If you install TWRP, you might get stuck when AOSP asks for a factory reset / user data wipe which it does once during the installation process. Somehow it seems you have to run the AOSP recovery's wipe process.

i decided to just run TWRP from memory if you I need it. For now.

Edited to add: There is no official TWRP build for the XZ2c. So you can't use the TWRP app or download anything other than MartinX3's TWRP builds. Or you can build your own TWRP. There's a thread on that as well: https://xdaforums.com/t/dev-how-to-compile-twrp-touch-recovery.1943625/

Not sure if that's a good idea inless you're relly into computer science.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Open Launcher FTW. ✌️
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] hibikase:
Rom is stable enough. Nice work!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I flashed H8266_Customized DE_1313-6279_52.1.A.3.49_R3C
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
That's the image file, not the baseband version. You can see that in your settings. (Search for "baseb".)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You said german firmware and this is the newest :P

845-sdm845.gen.prodQ-00052-48
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Hmm. Is there any way to update it except with the stock firmware?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Sadly no
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
I wonder where the baseband info is stored. If it was in the modem, it wouldn't downgrade I guess.

I'll try a full backup, flash stock, update both slots, restore the backup and check if the baseband version goes back to -00.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Look at it in the stock Rom phone info.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Stock shows -46, restored backup shows -00. Weird...?!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
So, I flashed stock again but didn't setup wifi. It showed version 52-46. Looks like the update is permanent and has to be done only once.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Uploaded a lot logs, but something says to me that nothing will change.

Since AOSP9 they can't fix this...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danj1:
Hi,

maybe this is unrelated to this rom but I have issues getting opengapps running.

After I flash the AOSP I install opengapps and dualsim-patcher-v4 via recovery. But then gapps do not show up on startup. I just have the plain UI without playstore and google stuff.

Here is what I do after I flashed everything to stock with newflasher.

Terminal:

TWRP:

Terminal:

TWRP:

When booting up the rom I have the AOSP with working SIM service but no gapps. I also tried to install opengapps and dualsim-patcher-v4 with AOSP recovery but then I get manifest validation error.

Any idea what I'm doing wrong?

Thanks in advance
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xperinaut:
Only difference I see is that I used the nano instead of the pico variant.

Are you sure you didn't mix slots or something?