yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] tassee:
Thanks for your reply. I did just that but now I am stuck again, all those threads that exist and different downloads with different names are EXTREMELY confusing.

I just want to have TWRP with AOSP.

I tried different TWRP versions but nothing is working.

I managed to get into TWRP using 2020-06-11_22-14-33_twrp_stock_apollo_52.1.A.2.1 yet I do not have the option to "install recovery ramdisk" in advanced menu as described in the TWRP installation thread here

// edit: finally got it to work using 2020-06-14_21-07-37_twrp_apollo

Thanks for your work @ Martin, yet here some feedback:

* the number of threads, their similiarities and there links in between make it very complicated to keep an overview over what to do when

* many technical terms terms are used but not explained properly anywhere (the probably are *somewhere* but its not easy to find)

* its completely unclear what one should install when and where, e.g. sometimes there are instructions like "fastboot flash oem_a oem_*.img" without any explanation / hints on where those files are supposed to be downloaded from

Suggestion: Create a proper walkthrough on how to install everything from 0 to 100 without having the user to click through 100 different sites.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you and you're welcome

About the instructions, I just go into the TWRP thread and follow the instructions on the first page while using the TWRP with the newest datetimestamp on it. :)

The OEM driver download link are directly above the installation instructions.

The instructios for TWRP and the custom ROMs are in their own threads, they aren't splitted on several sites.

About technical terms, the word "fastboot" is described in the FAQ on the first page in the ROM/TWRP thread. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] tassee:
Regarding the instructions: Yes, I figured that out eventually, but you have to find the correct TWRP thread first. Then e.g. regarding the "newest" timestamp: it wasn't clear, why is the naming schema different for every published release? Why not follow a standard one? Why put all those technical terms in there? (I do not mean "fastboot" or "adb" here but "aosp", "sodp", "apollo" and so on) and explain them nowhere (maybe I didnt find it)? Would be simple to just have a link for each and everything would be fine.

Furthermore why are the different folders on android filehost vs. the mirror? E.g. for the DUAL sim there is only a 8+9 folder on AFH but on the mirror there is a 10 that is directing to the SINGLE Sim - all this stuff causes confusion.

Regarding the OEM drivers: For example instructions regarding "the last before my build" are very unspecific and unclear. If e.g. your release was on 2020-07-14 and the oem driver was well, which one should be picked? (just an example).

Please don't get me wrong, I highly appreciate the work you are doing, I just figured that the hurdle for technically inexperienced people is even higher through this confusion.

I come from the XZ1 compact and there it was really straight forward compared to here - but maybe that is because it's technically way harder to accomplish here - idk.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I changed the naming change after refactoring my build system code, but the timestamp still remains to show the users what's the newest one

I mean the TWRP is still in the same folder structure. :)

AOSP means Android Open Source Project since 2008

SODP means Sony Open Devices Project, its target is to make Xperias be able to run AOSP (or custom ROMs, since every android custom ROM is based on AOSP).

Apollo is just the code name of the XZ2C.

Every android device has its model name and code name.

As example the Samsung Galaxy S2 from 2011 has the codename i9100 in its basic edition.

The android 9 folder in the dual sim model just contains an old firmware not part of the instructions and probably I can remove it.

Same for the android 8 folder, which contains the last android 8 stock TWRP and the last android 8 stock firmware, which I can delete, too.

But maybe someone wants to downgrade it. (But I don't support that)

If you are in the TWRP 10 thread, it's okay to stay in the android 10 folder.

And if you look in the dual sim folder, you see a file called "Look_In_Single_Sim_Device_Folder.txt" as a hint to look into the single sim folder.

Part of the instructions is a dual sim patcher for the recovery to enable the dual sim functionality.

The stock firmware and the SODP base has some differences between single and dual sim and this patcher saves me from uploading a big dual sim firmware with almost the same content as the single sim firmware.

About the OEM driver, in my changelog I always declared which OEM version is now supported to avoid the confusions.

If not stated a OEM version before the build date should get used.

I am open for critics/debating and you're welcome. :)

And probably you came from a XZ1 compact stock based ROM.

I try to support STOCK and SODP based solutions via TWRP, which is a bit difficult, since google now requires a DTBO partition with a partially outsourced kernel which is different in STOCK and SODP.

But I hope I can combine the TWRP with the DTBO to make something universal compatible.

At the moment the TWRP is compatible with the stock firmware, SODP based ROMs, but not with the stock based LineageOS.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
18.08.2020
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
XZ3 EU Single sim

Hi [MENTION=6031898]MartinX3[/MENTION], trying to install this through fastboot using Payload Dumper.

Bootloader struggles to flash a 3,9 GB system file.

Also you shouldn't just drop the bomb of using an standalone code without advertising how to setup and use it.

You should add to OP that python2 is needed and dependencies for it are:

python2-google

python2-protobuf

python2-backports.lzma

python2-pyliblzma

Maybe some of those aren't needed but i just installed them all to cover myself.

Now when it tries to boot it goes to stock recovery (i did follow all steps for flashing an SODP rom), with the next error message:

Cannot load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory data reset and erase all user data stored on this device.

I just flashed latest ODP for TAMA and went from stock upgrade with August security patch.

Are you sure we have to flash a 3,9 GB system image all at once?

Any help will be appreciated.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Hey

The dumper is just a corner case workaround

The easiest way would be to fastboot boot the stock twrp on the stock ROM, flash the AOSP zip, maybe the dual sim patcher and what you need

Then in fastboot flash the OEM binary

And then you could boot the system or install the sodp twrp.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
Nvm, it worked flawlessly at the end.

It was me just being impatient at fastboot commands thinking that bootloader just got stuck.

Also i managed to boot to SODP TWRP and did the mistake of wiping system.

So went back to flash stock again (twice today).

What's the difference between the codenames at your TWRPs in SODP folder at Android FIle Host (like one dated at 11 of June with SODP codename on it, and the other dated at 13 of June without it, as they're both under a SODP folder; again feel to forgive my dumbness if that's a silly/obvious question to you)?

P.D.: Yours is a smart solution. It's just me being dumb or something (it's not only today when it happens to me sadly, lol), or liking to make even harder my life (in this case was the first, rofl).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
Now the problem i have is that mobile data connection isn't working.

SIM registers and RIL works.

Back on stock it was working and also before of that.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Just use the newest TWRP.

I refactored / reduced the source code, which required a name change.

It made my developer life easier, hehe.

don't worry, I tend to ignore easier solutions as well some times, while I am too much focused fixing something. :silly:

It just needs a few minutes to calibrate?

You have a dual sim device and flashed the dual sim patcher?

You need to enable roaming based on your location?

Your provider has problems in this moment?

You get specific errors in your logs?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Just a moment. I use payload_dumper with python3. README.md says

### System requirement

- Python3, pip
- google protobuf for python `pip install protobuf`

I use payload_dumper.zip with python3 on Fedora 33 and it works great.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
The payload Dumper [MENTION=6031898]MartinX3[/MENTION] links in OP says in the first line of extract.py:

#!/usr/bin/env python2

Sharing that referral to us to that Payload Dumper python3 updated code would be much appreciated, thanks.

---------- Post added at 06:54 PM ---------- Previous post was at 06:46 PM ----------

No problem about those names of TWRP.

Now the problem i have is that it's unable to read nor write Internal Storage.

I think it's a problem with SODP encryption. I've seen that kind of behaviour before (random letters and names for files and directories). Tried to format data, wipe internal storage and stablishing a password on the system as it seems to force encryption once it boots.

1. Yes, but doesn't get data.

2. No, it's a H8416 (physically only has a SIM hole and a microSD on the plastic pieze).

3. No, it's the main ISP provider for my country.

4. Nope, other SIM for the same provider on a Realme 5 Pro (with LOS 17.1) and works flawlessly

4. Should i get any logcats?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The decryption should work after you installed the TWRP.

This bug should disappear after the migration to the native TWRP 10 and it doesn't harm your data.

Yes, a "logcat -b all" from a fresh boot after you entered your SIM pin and tried the internet.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
XZ3 H8416 EU Single SIM

Decryption is not working after TWRP is installed. Bug is still there.

Logcat attached.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Weird, I hope that will be fixed by TWRP 10 as well

Is your APN correct, like on stock (where mobile data works)?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
Yes.

Gonna flash Pixel Experience although i don't want any relationship in anyway with google...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Weird

Please open an bug tracker issue ticket

It may not work on PE as well, since it uses this project here as core.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] xz499:
It works right OOB with Pixel Experience.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice

Then hopefully the next security patch release will fix it
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
01.10.2020
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bigrammy:
Help our Sony devices.

Hi MartinX,

Well I have been reaching out to the Sony Open Devices Project but got zero help or advice so far.

Thing is Sony now have quite a extensive range of Mediatek device with most even having functioning custom ROM's like Lineage but we ALL hit the exact same brick wall when it comes to getting the modem working and sim detection working on custom roms :mad:

I am 99.9% sure this is to do with the Sony stuff and NOT Mediatek's.

I don't think any of us working on these MTK devices really understand how all the ta, miscta, nvram modem etc all tie up together :silly:

We would really appreciate some hands on help from someone fully immersed in SODP to pick through the kernel source, ROM, etc to see if they can see what we are all missing.

I could donate a device to anyone who's up for the challenge

To sum up If we can get a top flight dev on board I could donate.

1. Sony L1 (Mediatek MT6737) release firmware Android 7.0

2. FULL Mediatek Android 8.1 source for the MT6737 SoC should any of Stock pre built binaries need tweaking

3. Kernel Source that builds and works 100% with the stock ROM (Courtesy of Sony)

While the L1 is basic it's pretty solid and works well It's sister phone the L2 also shares the same SoC and Kernel source and runs Android 7.1.1.

I think once the missing piece of the puzzle is found this will have a domino effect with all the Sony MTK's being able to run AOSP ROM's and others.

Feel free to PM me if needs be.

Some Example Projects and info:

https://xdaforums.com/xperia-l1/development

https://github.com/PineDevelopment

https://xdaforums.com/xperia-xa/development/tuba-lineageos-14-1-t3878212

https://github.com/SonyCustoms

https://xdaforums.com/xperia-m5/rom-lineageos-13-sony-xperia-m5-hollyss-t3589082

https://github.com/krkshalil/android_device_sony_holly-common

( mt6795 is in the main Linux Kernel if I am not mistaken)

https://github.com/mbgg/linux-mediatek

https://android.googlesource.com/kernel/mediatek/

This smart display BSP below has the mtk drivers left in (drivers/misc/mediatek) and what seem more linux / android def_configs.

https://android.googlesource.com/pl...s/android-o-mr1-iot-release-smart-display-r12

.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Hey :)

As far as I know most of the xperia experience at SODP was made with snapdragons.

But I redirected your message, maybe someone will respond. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bigrammy:
Thanks I appreciate that :fingers-crossed:

Nothing mystical about mediatek SoC really. Sure it's a little bit different to snapdragons but I don't think the leap is too far for anyone used to this stuff.

Much more confusing is Sony's implementation of TA, Misc-TA, modem configs, device ID's USB's and general data shuffling :eek:

It's like the old ball under the 3 cup's trick with Sony shuffle shuffle where's it now?

Answer: Not a ****** clue here's my money! Go again I will watch closer this time. mmm Yeh still not got it. Go again :laugh:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Haxk20:
Could you share logcat and dmesg please ?

Otherwise we have no clue what is possibly wrong. It may be a missing library or just wrong code. We dont know without dmesg and logcat.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bigrammy:
Hi sorry for the late reply I have been at work today.

Here are some radio logs I have to hand.

This one is without the sim card inserted:

The IMEI's display and everything looks normal.

https://gist.github.com/bigrammy/52f621364c7bb346827e68d5b2d81594

This is the same with the sim inserted:

IMEi's all show as UNKOWN

https://gist.github.com/bigrammy/54d7ac3fbf4696b5189311fc5515246d

I have a dmesg some place and I will point to it when I find it.

I don't want to hijack [MENTION=6031898]MartinX3[/MENTION] thread so can we switch over to the assistance thread I just started in the Xperia L1 dev section.

https://xdaforums.com/xperia-l1/development/sodp-assistance-thread-t4174977

Thanks for the interest. :highfive:

.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] kirin72212:
can't flash sony-dualsim-patcher v4

HI

My device is H9493

i flash the rom is OK

but when i reboot my phone and used recovery to adb sideload sony-dualsim-patcher v4

it shows e:error in /sideload/package.zip(killed by signal 11)

how can i do to solve this problem?

please help me thank u.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The aosp recovery is not compatible
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] kirin72212:
thank u, i found my problem and test other rom.

Happy~~~~

:):)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Or just use twrp [emoji14]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
Hello guys ! Half-newbie here!

I need to knew which gapps should I flash for XZ3 (H8416). Arm? Arm64? X86? X86_64?? And which size preferably?

Edit : found it ! Arm64

Please excuse my newbieness but TWRP sodp or TWRP stock. And how do i root ? Magisk or SuperSU ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
@MartinX3

Hello I've just installed the rom (a looonng story, but I succeeded) , I do have network signal but no internet... I have installed the right internet parameters provided by the network provider

What should I do to fix this ? It should have displayed LTE or H+ next to signal bar but nothing

Merry Xmas by the way
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
A hint is in the thread title.

Magisk.

Please try AOSP 11.

Or maybe you got some issues with your provider.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
I switched to Lineage OS 17.1. Maybe the issue was the Sony Binaries I flashed (I flashed the last version).

But I was wondering how could I get rid of the glitches appearing here and there while locking the screen or watching videos on Youtube, or swiping pictures on Google Photos...

Graphic drivers compatibility issues ???

It happens on all the roms I tried (PixelExperience 10, Sony AOSP 10, and Lineage 17.1 android 10)

And by the way, last time, I tried Magisk, It messed up with the boot (bootloop) so please tell if I have to do anything else after flashing Magisk via TWRP...

Thanks in advance.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Sadly I can't help you with this

I don't get tearing or bootloops with magisk after following my instructions on my XZ2.

Maybe there is an issue ticket on github about the tearing
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
It's not screen tearing. There are stripes of screen noise appearing randomly when the system squeezes the GPU (video playback, games., Etc..). I've never seen them on Stock Rom, even when playing heavy games. Now just a simple swiping image is enough to cause that. Maybe my device is getting old...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
If it happen in stock lineageOS or stock ROM out of nowhere, then it might be.

Or you just achieved to trigger a bug I'm unable to.

But maybe you'll find a matching issue ticket on the issue thread linked on the first page here.

And the development continues in the AOSP 11 thread. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] PCRath:
Remove, wrong Thread
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] DaniyalAhmad:
What are the pros of this ROM over the stock Android 10
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Beisik:
She's completely clean
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Beisik:
I installed it according to the instructions without recovery. I launched it and it didn’t turn on. I downloaded Tama for Android 10 for September. I installed it. It started, but after a couple of minutes the robots itself turns off and goes into recovery to reset the data. And so on all the time.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Beisik:
What did I do wrong? Phone xz2 dual
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Was the phone hot or something?

Keep power and VolUP pressed until it vibrates one time to restart it (if it vibrates 3 times you shut it down)

Or does it come back?

And recognize your computer the phone?

Maybe the GPU / display driver just crashed

It is still work in progress

But it would be nice if you can provide a logcat and dmesg :)

And don't worry.

No phone hardware died until now during development. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Nope.

Tried all variants: VolUp+connect to PC, VolDown+connect to PC, VolUp+Power button, just connect charger.

No any sound, any popup, any vibration, any LED indication.

Taking off sim/sdcard holder - nothing.

Completely dead.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Which phone model do you have?

Even the charger doesn't show the charging animation?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
xz2c, dual and yes.

P.S. used rom - 2019-11-24_12-05-45_sonyaosp_xz2c_ds.tar.gz
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Weird.

I asked now in the development team if something in this direction happened.

But they probably say no.

They do report anyway any device dead. (Which was only a single one back in the 4.9 kernel development for android 9.0)

If it is really really really dead and long pressing the power and volume up buttons doesn't help and you are very very sure it is dead and you still have your warranty, you can RMA the device.

The repair partner most probably won't dismantle the device and dump the storage via UART to check if you modified the device if it doesn't work / respond to USB on the computer.

(If the UART still works)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
On 100%.

I have no other options/variants why phone without signs of life.

Of course, I'll try to do same manipulations in the morning and if nothing will change - then yes, SC waiting :fingers-crossed:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nos1609:
What about the current camera state? It is the only thing keeping me on ExistenZ right now, as I need working camera functionality in external apps. Previously it was buggy and crashing in messenger apps, quite usable if not at all.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
In 9.0 with OEMv9 the camera doesn't crash for me or maybe just very rarely.

In 10.0 with kernel 4.14 all further camera updates happen.

So of course it become better over time.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please keep VolumeUP+Power pressed for 60seconds to make sure you completely shutdown the device.

It could be that it still runs but is in a crashed basic state. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
OMG! MAGIC HAPPENS! :victory:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice to hear that it works now and your device was just not responsible :))))
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
To rescue a not responding phone:

VOLUP+POWER for 3 Seconds -> RESTART with one Vibration.

VOLUP+POWER for 20 Seconds -> SHUTDOWN with 3 Vibrations.

VOLUP+POWER+CAMERA for 30 Seconds -> HARDWARE SHUTDOWN by discharging a capacitor.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Needed to wait little bit more ~90sec (volup+power), then LED blinked green light.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Are you sure not releasing the buttons by accident a bit earlier ?

In my opinion it is hard to keep the buttons pressed, you can easily slip away with the fingers.

Usually it takes 3 seconds for a restart (1 vibration) and 20 seconds for a shutdown (3 vibrations).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
No way :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Guangd:
Has the speakers bug been repaired:confused:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] :
Newcomer question about this ROM:

Does it have any of the Sony customizations (be it any apps, visual stuff, anything really) or is it just totally plain Android (I don't even know what that looks like)?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
According to the changelog the speaker bug should be repaired or optimized on every xperia with OEMv2.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
This ROM is just AOSP with Sony Open Devices Program modifications to make it compatible with the hardware of the supported Sony Xperia Devices.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Just tried, sound starts to crack on 19 volume level of 24.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you!

Which device exactly?

I will report it! :)