yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Looks like the charset gone wild, or is that intendet in your bat script? :P

echo. È·ÈÏµçÄÔ°²×°ºÃ USB Çý¶¯³ÌÐò

and is "echo." a working command with the dot?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
I just tried the pure AOSP to try my bat:silly:

but AOSP rec could get in, just can't get into the system.

---------- Post added at 05:23 PM ---------- Previous post was at 05:20 PM ----------

it is. In windows.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you install the oem drivers?

maybe you need the vbmeta thing here too.

Or does only the dual sim firmware boot?

And is the " È·ÈÏµçÄÔ°²×°ºÃ USB Çý¶¯³ÌÐò" in your .bat intended?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
I install the oem drivers. I tried TWRP just now. It could work. But I still can't boot into system. I think it's the problem in system.img?

BTW, what's the " È·ÈÏµçÄÔ°²×°ºÃ USB Çý¶¯³ÌÐò" ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You used the aosp system IMG?

And wiped your userdata?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
yes, I'm downloading the system img of single sim now. Just have another try.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Your Modell is XZ2 Dual SIM H8296?

Then I will install the xz2 dualsim aosp too
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
Same H8296

---------- Post added at 06:19 PM ---------- Previous post was at 06:06 PM ----------

device boot after flashed single-sim's AOSP, but can't use sin card because of the dual sim hardware

---------- Post added at 06:41 PM ---------- Previous post was at 06:19 PM ----------

I think the system img and vendor img have some issue.

writing 'system_a' 1/3...

OKAY [ 0.001s]

writing 'vendor'...

OKAY [ 0.001s]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
the dual sim version has an error

at my site

fastboot flash system system.img

Sending sparse 'system_a' 1/3 (524284 KB) OKAY [ 1.786s]

Writing sparse 'system_a' 1/3 OKAY [ 0.001s]

Sending sparse 'system_a' 2/3 (524284 KB) OKAY [ 5.209s]

Writing sparse 'system_a' 2/3 OKAY [ 0.001s]

Sending sparse 'system_a' 3/3 (126684 KB) OKAY [ 4.819s]

Writing sparse 'system_a' 3/3 OKAY [ 0.001s]

Finished. Total time: 11.827s

but I am stuck at sony logo (while going into recovery works)

While the single sim XZ2 works.

But crashes right after booting.

Edit:

I think I found the source of the trouble.

Maybe.

I recompile it and flash it again.

Edit2:

I removed my build environment and will clean download the AOSP code.

Maybe the switch from 9.0.0_r16 to 9.0.0_r21 left some unclean traces of code.

If that is the case and the next compilation (tomorrow?) will boot and just work I will redownload the complete source code again every time I need to switch the branch.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] twistedddx:
The file being raw text has no codepage so apps tend to just open in the local 8bit codepage. Eg for most Western countries that is ANSI.

The person that wrote it wanted it to be read as GB2312 but that has to be guessed by an app or be the local users default codepage, eg they set Windows default language to Simplified Chinese.

Some applications can automatically detect the right codepage eg Android text editor and Notepad++ auto detect GB2312 is needed but most apps will get it wrong and just use the users default language codepage.

Eg Windows 10, Firefox(any platform), notepad, wordpad, ted notepad will all display the chars as ANSI for most users in the world eg È·ÈÏµçÄÔ°²×°ºÃ USB Çý¶¯³ÌÐò

The text is supposed to be 确认电脑安装好 USB 驱动程序.

Windows batch files must be written in ANSI; UTF8 or UTF16 etc will not run.

So the best way forward is at the beginning of the file tell Windows what codepage to use!

add this to start of file:

chcp 936
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] twistedddx:
Attached is the batch file that should read correctly on Windows not set to Chinese language.

Of course this only corrects the Chinese chars that the user likely would not be able to read anyway :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
I forgot that. Thanks.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you, I hope the windows User can read it.

In Linux I still see the

"ÊÖ»ú¿ªÆô USB µ÷ÊÔÄ£Êœ£ºÉèÖÃ ^> ¿ª·¢ÈËÔ±Ñ¡Ïî ^> USB µ÷ÊÔ ^> ¹ŽÑ¡"

Charset Garbage. :D

Edit:

Still looks not understandable for the international english speaking enduser, or?

:MENU1
CLS
echo. ----------------------------------------
echo. ÇëÊäÈë 1 ^| 2 Ñ¡ÔñÄãÐèÒªµÄ²Ù×÷
echo. Please enter 1 ^| 2 select what you need
echo.
echo. 1. Ë¢ÈëAOSP
echo. Flash AOSP
echo.
echo. 2. ÍË ³ö
echo. Exit
echo. ----------------------------------------
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] twistedddx:
It will look wrong in text editors that do not auto guess the correct codepage. Most do not attempt to guess, they just use the users local codepage.

I believe this is unfixable as it is raw 8 bit text, batch predates everything that fixed cross language issues. If you save the file as utf8 or utf16 it just will not run.

My suggested fix will only make it look correct when run within Windows console. Windows command prompt should/will understand chcp 936 and change to simplified Chinese.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
But why adding chinese text into the script and not just english?

So English users won't understand what they are doing.

Or are the english sentence the correct translation?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Since the AOSP just crashes after boot and I don't know why, I opened a issue report.

https://github.com/sonyxperiadev/bug_tracker/issues/283
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] twistedddx:
I only assume the English is a correct translation of what was originally written in Chinese.

It is not wrong for something to be in another language, I think I remember reading you are German. Many find it best to write the intended message in their native language so others may pick up on translation errors. Many may just depend on Google translate or similar to translate as they can not read/write English.

XDA does request that English translations are given.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
Because I just modified from the file which I help my friend to flash his device. We are both Chinese. And it's easy to understand to him. I just add English and change some fastboot command.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Now I understand, that you wrote the same stuff in chinese and english.

I was a bit confused by the unknown symbols. :silly:

Uploaded. :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Omni 9.0 runs fine on my XZ2.

Instead of the insteadly crashing AOSP.

So there is no defect with my XZ2 or my build environment.

I hope the SOD team will fix this error soon (of course after the holidays). :)

PS:

So Omni is the second custom rom running on the XZ2, XZ2C, XZ3.

We only need someone who builds it.

I could do it, but I lack of free time. xD

And the AOSP builds are needed to find and fix bugs, which are moving into every custom rom based on AOSP.

Like LineageOS and OmniROM.

PS0:

I can confirm, that you can directly integrate TWRP into the OmniROM (and maybe AOSP, I will test it on the next successful build).

Just build the entire ROM with "-userdebug", but the bootimage with "-eng".
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
Could you provide the source tree? I want to have a try on lineage this weekend.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://github.com/omnirom/android_device_sony_akari

https://github.com/omnirom/android_device_sony_apollo

https://github.com/omnirom/android_device_sony_akatsuki

Just traverse recursive the omni.Dependencies file in every repo :)

Adapting. Will be pretty. Easy.

But. You will Need to maintain and sync These. Repos in github lineageos With These. From. Sony. Aosp. :)

And hopefully provide US dual and Single. Sim builds for xz2, xz2c and xz3 :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] laoli0913:
Hard to understand what you said:silly:

But I find the necessary trees from the links and the Omni's GitHub.;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I can support you :P

Just PM me with your questions :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
OMG! I had no idea Omni has official akari tree by now. Will check it out ASAP. :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Orihamburger:
I want to see some AOSP Screenshots!!

Is there anyone who can give me a screenshot?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] silveraero:
WHAT FOR?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Still crashes

I provided them now a big logcat and an even bigger dmesg

https://github.com/sonyxperiadev/bug_tracker/issues/283

Edit:

https://github.com/sonyxperiadev/bug_tracker/issues/253

It's a bigger issue.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] adwinp:
1: I'm not sure about the dual sim stuff, but the services crashing & reboot reminds be about an issue which was present in Developer Preview 4/Beta 3

I reported it in the forums & it got subsequently fixed in a hotfix release.

So maybe Alin could follow the trail?

https://talk.sonymobile.com/t5/Andr...-3-Device-boot-amp-forced-reboot/td-p/1332499

The question now is: are you using a microsd? If yes, try booting the singlesim variant on your phone without that sdcard & we'll know if this is the same issue in AOSP

My little finger tells me it could be something linked to selinux policies

2: Have you tried using Ubuntu 16.04 instead as host system? I've been running into blockers when trying to compile android on Ubuntu 18.04 & the issue was gone when I downgraded to 16.04.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you for your ideas. :)

Let's wait for closing this issue first. :)

https://github.com/sonyxperiadev/bug_tracker/issues/253

Or builds may unstable, buggy, crashy and so on.

Then I will test of course the single sim variant which doesn't support a microsd card (while it is still adressed in the fstab file). :)

Maybe they copy the fix OmniROM uses. :silly:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] adwinp:
As mentioned, I suspect that the issue with the symlinks not being generated is caused by a buggy shell/bash.

Old versions of bash are not affected, so either try downgrading until this works, or try compilingon Ubuntu 16.04 or even 14.04. I know one of these 2 was compiling correctly, but ubuntu 18.04 is affected by that bash bug.

Issue #253 is not a problem with AOSP.

That, or an issue with locales; try the following:

add the lines "LC_CTYPE=C" and "LC_MESSAGES=C" to /etc/locale.conf & reboot

Alternatively you can do:

LC_CTYPE=C LC_MESSAGES=C make -jx otapackage or whatever you're using to compile

or

export LC_CTYPE=C; export LC_MESSAGES=C; make -jx
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I work on the device and need 18.04 to work with. :)

And I don't know if it is a 18.04 shell bug, they do not mention it either.

It would be nice if you open a bug ticked, if you know this bug. :)

I would like to participate it.

And the guys already know how to fix #253.

So I am happy looking forward to have this bug fixed in 18.04. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The progress:

https://github.com/sonyxperiadev/device-sony-common/pull/552
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] churchner420:
Where are the XZ2 files gone?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Because they are not working.

https://github.com/sonyxperiadev/device-sony-common/pull/552

This is the approach to fix a bad bug. :)

Will test and report back. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
In order to build successfully on 18.04 I set LC_ALL to "C"

export LC_ALL=C

There's some locale assert that fails. And you need python2. python3 is just not working.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Which issue do you want to address? :)

(BTW. this fix shouldn't be needed on native English systems as far as I know)

Edit:

Ahh, you mean [MENTION=1044051]adwinp[/MENTION]

And yes. I use this fix since 16.04.

German systems run amok without it. :silly:

But if you mean my issue with a not booting build:

That has nothing to do with this issue.

The symlinks for, as example, the GPU drivers doesn't get generated, if you lunch again for the same device but switch, as example, from single sim to dual SIM. :)

I would need to clean my build output directory to workaround it.

But an initial rebuild takes ~2:50h on my slow laptop.

While a relunch for another device takes 20 minutes or less.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] adwinp:
Ah, I was under the impression that based on one of the earlier recommendations, you were indeed cleaning the "out" directory after each variant rebuild.

On a sidenote, you can configure the out directory each time you compile, so you can keep code between rebuilds.

If my memory serves me well, it's the OUT_DIR our OUTDIR environment variable.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I want to avoid cleaning my directory.

The problem is that the build system sadly doesn't recognize that it need to generate the symlinks again, which gets addressed by the linked pull request. :)

After that my build environment for 6 devices works again. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] old.splatterhand:
I'm sure you will be successful!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://github.com/sonyxperiadev/device-sony-common/pull/552 got merged.

I will build the AOSPROM's again. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Yeah?!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
With TWRP <3 :highfive:

A first testbuild with Akari Single/Dual Sim successfully regenerated the needed symlinks for the adreno gpu driver. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Sucessfully booted AOSP on my XZ2 Akari Dual Sim.

But now we need to get fixed this bug.

https://github.com/sonyxperiadev/bug_tracker/issues/296

Maybe there need to be more work, than just

https://github.com/sonyxperiadev/device-sony-common/pull/552
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
:good::crying::crying:

thanks for your efforts as always :o

ps. second link is broken ;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you :)

You're welcome :)

Aaargh, fixed :silly:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
martin, just for curiosity in these aosp builds is possible to have d2tw?

I don't know why sony removed this feature so useful (at least for me!) in stock fw in new phones... it was present in older xperias like z3c... :crying::mad: maybe you can ask jerpelea? :p
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Orihamburger:
I have some questions..!!

(I am lack of English, so plz understand me.)

.

.

.

I am using the XZ2 (H8216), and I am planned to change my xz2 rom.

But, I have no experience about the sony xperia's customization.

So, I have many many question.

Q1. Does my xz2(H8216) that use in South Korea, supported??

I am afraid of the LTE, Calling 's inability.

Q2. The Pie Rom is disappeared because they didn't work.

If so, the Oreo Rom is working without fatal bug??

.

.

.

.

.

Thanks for your efforts.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I am just building this Sony AOSP without modifications.

If I would modify it, they would deny my issue tickets. :P

The bugs could be caused by my own modifications.

And jerpelea said, that this Sony AOSP is only a core development plattform for other custom roms. :)

After it became stable we can use LineageOS or OmniROM, if we need extra features. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Q1. The H8216 is a supported single sim device. :)

Q2. It will reappear today. :)

But please be aware of its bugs. :)

(the link to the Bug tracker is on the first post)

You're welcome. :)

Q1. H8216은 지원되는 단일 SIM 장치입니다. :)

Q2. 오늘 다시 나타납니다. :)

그러나 버그를 알고 있어야합니다. :)

(버그 추적기에 대한 링크는 첫 번째 게시물에 있습니다)

천만에요. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Orihamburger:
Thanks for your reply.. ( ㅠ _ ㅠ )
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
thanks what I meant is if dt2w is present in aosp. because afaik it depends from the kernel, not from the rom/extra features, so if kernel is not compatible it can't be enabled even in custom roms..
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You think it is not supported in the sony kernel? :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
According to https://github.com/sonyxperiadev/bug_tracker/issues/296 I will rebuild everything.

(Initial build takes 3 hours)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
yes I think support for dt2w is not included at all (or maybe just disabled for some reason?) in the xz2 sony kernel.

[MENTION=359497]jerpelea[/MENTION] sorry for mentioning you, but would really like to know if there could be any chances to have dt2w back in the xz2 line, either in stock fw or aosp builds, because it is a feature I loved and that I would need a lot in my phone. had it working in my previous sony phones like z3c and others, dunno the reason why it was removed in the xz2 line.

can you please comment on this? :fingers-crossed:;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
He responses to github issue tickets very fast :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
I see but I am not registered there... :silly: so hope he will see this :fingers-crossed:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://github.com/sonyxperiadev/bug_tracker/issues/297

After hours of building, testing, flashing, .... I found the final cause of this ****ing problem.

Don't use a SDCARD, which the AOSP doesn't support.

In my case was it an exFAT formatted SDCARD.....

Need to rebuild AOSP to finally upload it....

TWRP will be included later, now I focus on building, uploading, reformat my SDCARD to ext4, which is of course full of data....

And there are my exams.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] old.splatterhand:
I double your opinion. I was shocked, when i have seen that this was removed!

I thought this is meanwhile a basic feature...:crying:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Maybe adding an issue ticket with the question for this feature add it back :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Started uploading the ROM's for the 6 devices.

I think it will finish in the next 30 minutes, if my brain calculated it correctly. :D

I tested it on the akari.

At the moment please use a fat32 formatted sdcard or no sdcard.

extFAT will lead to crashes.

ext4 is simply not supported.

(I prefer the modern GPT partition table over the old MSDOS partition table)

I did not test NTFS, but it is NOT good for a SSD drive or a SDCARD or USB stick.

Test result on akari:

Smooth, battery saving, no extra apps, stable (if you not be like me finding AOSP bugs instantly. I think I make the sony devs crazy with my exotic bugs, but at least, they get fixed by them :silly:).

Only the minmal apps you need.

I recommend flashing GAPPS or using F-DROID, etc.

PS:

Flash GAPPS right after ROM flashing.

At the moment there is no TWRP.

https://android.stackexchange.com/questions/179471/installing-gapps-without-custom-recovery may work.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Will the fastboot choose automatically the right slot?

And will i get problems with booting when i still have the twrp from you installed?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
some feedbacks about camera maybe? :o
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
fastboot uses only one slot, until you change the slot with special fastboot commands :)

twrp will deleted, since it's part of the bootimage. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
AOSP photos are looking nice at the first time.

But capped at 15.9MP and 1080p at the moment.

buggy camera app and missing camera app features :D

Later camera app bugs starting. :)

Did not test the opencamera app, but there are still open camera issues in the sony bug tracker. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Ok. And what will happen with the stock Firmware? Will it be override from the aosp rom?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Of course, the aosp will override the actual slot, the last one used by NEWFLASHER.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] schmoove:
Is it possible to post some screenshots?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
It looks like a minmal version of lineageOS/omniROM

Sadly i forgot to add screenshots (running the stock rom again).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
[MENTION=6031898]MartinX3[/MENTION]

Hi little question.

I just flash the different parts of your aosp rom. And the commands in fastboot worked but now i'm at the following step:

Fastboot flash oem oem_*.img

But in the unpacked aosp is no img with this name. So my question is the following:

Where can i find this img file? Or can i ignore that step?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Oh ****, I was thinking about something I forgot :P

Tama (latest) -> https://developer.sony.com/develop/open-devices/downloads/software-binaries
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
I done the steps to install the aosp for on my XZ2 dual sim and now it stucks the sony logo.

I used the vbmeta.img in the aosp rom.

Fastboot didn't give any errors.

Mayby the wrong step was that i didn't rename the img by the fastboot oem command to the name on your instructions?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's the device I used with the exact same files.

Did you flashed something else or missed a step?

And did you installed .126 before & booted it one time?

userdata.sin is mandatory, too.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
I'm came from stock firmware .126 (GE market) and it worked without problems.

Must i perform the full Command for vb meta? So with the "disable verification" stuff as described in the twrp thread?

I just typed "flash vbmeta vbmeta.img".

And i thought this "userdata.img" in the aosp rom,was optional. So i didn't use it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Everything was fine :)

Only the userdata.sin needs to be flashed the first time :)

You need to wipe the userdata everytime you switch between ROMS and I recommend also to wipe them between android versions (8.0 to 9.0 as example)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ionSeven:
Quick question, I'm gonna try AOSP also, was gonna skip user data.sin, but guess not...my question is, will my .129 backup on GDrive work or will I have to start from scratch?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I do 2 things

Use Titanium Backup to save my appdata

Use Google Cloud to save my device settings + contacts + wifi + etc

But I do not save the apps in the google cloud

I moved several times between AOSP and STOCK :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
And please, if you find bugs, write them into the sony bug tracker :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Ok then i will first bring my phone back to live with Newflasher.

Then i will try the steps for rom again with "userdata.img" file.