yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] levone1:
Happens with fastboot boot... So yes, cable is connected initially. I did try unplugging and turning screen on/off and still the same.

Model is H8314 (right? XZ2c...). Clean flash stock fw with Flashtool (107)

Can't get into terminal in recovery to test script. Maybe I can get some logs. I'll be back at computer in a few...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's weird now.

June did work?

Because if you just "fastboot boot" you come into an environment with the same kernel and touch drivers, since I did implement the "fastboot boot" mode.

Meaning there is no differences to June in the kernel and touch behavior.

Terminal can get accessed by "adb shell". There you can run the script, too.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
"permission denied"? The script should simply run and initialize the stock touch.

You did "bash preptouch.sh" ?

Can you give me a "ls -lha" from the /sbin folder?

You mean if you start the TWRP with an connected usb cable MTP & ADB doesn't work?

That's weird, too.

The logcat looks perfect, not a single weird error.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] levone1:
I chmoded preptouch.sh to 755, and ran it, and it seemed to run, (prompt hangs for 10-15 seconds with no message, then resets), but still no touch.

MTP and ADB are not affected whether starting with cable or not, but if I want to get a log from boot, usually I would run logcat command, get 'waiting...', and then connect the phone, and it would output log when adb starts. It won't do that, but it just hangs on waiting forever. So, if I kill it, and then type logcat command, it prints log no problem.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
You use flashtool ? Try to use newflasher bro and install twrp for July and see what happen ;)

Disconnect your usb cable ofcourse when using twrp.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] levone1:
OK, maybe I'll give it a try, (I'm a long-time [MENTION=4120742]munjeni[/MENTION] fan anyway, since my first Z1c). I am a bit skeptical of how it would matter, since they both use the same fw files (right?) and I don't have any reason to think anything went funny with the original flash, but one thing I know - you would know better than me... ;)

It would be nice to get confirmation from another XZ2c user, if it's working for them...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You use the newest platform tools by google? (r29.x)

or try "adb shell logcat".

I wonder if more user experience this weird touch issue.

But I don't know what could be different between june and july if you only "fastboot boot".

And yes, what pandemic said.

I made bad experience using a different tool than newflasher.

Edit:

What I could test is to upgrade the touch drivers to the .107 version and upgrade the kernel to the .107 version.

But I still wonder what may be the problem.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] serajr:
I got the same touch issue with new .107 twrp build (XZ2 - H8216, Stock fw), so I "fastbooted boot" the old .87 to get the touch working back again (but I didn't integrate it).

The old .87 twrp build (strangely, or not) also decrypted data successfully!

Off-topic (but for the record), I also need to update my debloat script, due

/system

not present in

/proc/mounts

anymore, so stay tunned!

Edit:

^ Done!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] turnout96:
I also encountered the same touch problem in the 107 twrp version.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Only xz2 compact or also xz2 ? [MENTION=6031898]MartinX3[/MENTION]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
I will check the new twrp with the new OmniROM today or tomorrow on my xz2 dual. Will report then.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Try also with stock fw 107 July patch.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's the problem.

Only the stock TWRP needs a touch driver workaround. (The executed bash script).

The SODP kernel has the touch drivers inside the kernel.

I'll create a new TWRP with .107 kernel and .107 touch drivers after the SonyAOSP July release.

And looking why the preptouch.sh script is shipped with a wrong permission.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] serajr:
#3880
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Sorry bro [MENTION=3989065]serajr[/MENTION] :)

When is your xposed module ready for the new launcher by Sony ? :angel:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] serajr:
Maybe even today, or maybe not (new questions related on this, please at the old xposed module thread)!

(Sorry Martin for OT)!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Grrr, no separate XDA thread [emoji14]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] levone1:
So, nothing we can do in the meantime?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You could Mount vendor and direct the scripts filepaths to the ones in vendor.

or copy the listed vendor files into /sbin

But it is weird.

It shouldn't happen since kernel and touch drivers are the same since months.

I hope the new twrp will fix it for a cause I don't know at the moment.

Or it is simply this weird "permission denied" on execution of the preptouch.sh script, which shouldn't happen, because it shouldn't be able to save the ext4 file permission rights from my computer.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
[MENTION=6283426]levone1[/MENTION]

could maybe the file permission of every touch related file be wrong?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I think I found the issue cause, I refactored my HDD folder structure and the source code folder of the stock kernel did change, but not in my build script.

Fixed and rebuilding now!

Sorry guys. :S

The weird thing is, it shouldn't boot at all (and didn't in the past), because the stock DTBO is different from the SODP DTBO partitions content.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I heard from a xz2 user touchscreen still not works.

I remember I did activate logcat too now in this build.

Maybe it has a race condition with the touchscreen workaround.

Rebuilding it without logcat now...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yep, it's the logcat activation preventing the stock touch drivers from loading.

Sad to get error logs nicely covered by logcat like decryption, but no leg breaker.

I can reactivate it in special builds for diagnostics.

Funny, in the SODP twrp it does work.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
13.07.2019
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Fixed now the touch bro and you test by yourself also on fw 107 ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] turnout96:
After testing, touch issues have been resolved
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
I can confirm, TWRP touchscreen now works. The only thing I've recognized is, that there's an error message while installing Magisk, but installing went through without any problem though :good:

I guess you're already aware of that.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Error message?

Did install 18.1, did boot once and then installed 19.3.

Sadly never saw it.

What does it say?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danieltam:
It seems that twrp for XZ2 Premium can't touch on .107
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Sorry, I don't remember what the error message exactly was. Maybe it occured because I directly flashed Magisk 19.4 Canary and did not the detour over Magisk 18.1? But nevermind! Flashing it worked though - no problems so far ;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
After "fastboot boot twrp.img" or after rebooting into the persistent TWRP?

And you did redownload the fixed TWRP version?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danieltam:
After “fastboot boot twrp.img".

I downloaded on 7-14 , but I'm not quite sure whether it has been fixed. I'm going to redownload it and try again.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Then it shouldn't use anything touch related from the installed firmware and a redownload should fix the twrp bug :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Danieltam:
Thanks a lot
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You're welcome :)

And if it doesn't still work, I'll release a TWRP with updated touch kernel modules after my next exam.

And I would need a dmesg & /tmp/recovery.log
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you and you're welcome :)

I plan to use the xz2 until it is not repairable or lost, so I should be able to support all for a few years I assume :)

Please read on the first page the instructions and the FAQ for the camera :)

It's much easier now.

PS:

Sadly you didn't unlock in PIE :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] cesar65:
Hmm, I probably used too many words and had too many questions ... anyway, seems I am going to take some risk and trust my limited understanding, keeping fingers crossed.

Btw: why is it sad that I did not unlock in Pie?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Just ask which part of my instructions aren't clear and I can optimize them [emoji14]

Unlocked on pie means you wouldn't need the camerafix on pie. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] cesar65:
So I have done it. Got some way to the goal, but there are still some problems:

I cannot enter recovery with the key combination at boot. Only way to enter recovery so far is via adb reboot recovery. Reboot into recovery does not appear in the boot menu.

Magisk 18.1 is installed. Question is if I can now install 19.3 without boot loop.

su requests sometimes don't get answered. TB does not get a response at the moment. No idea why that may be the case.

I am not sure if the Magisk installation is ok. Behaves a bit weird. I accidentially installed MM for the second time through recovery, although it was installed previously and did not get wiped. Behaviour was strange, so I uninstalled both versions and reinstalled it. Still as noted above, TB does not get a response on its root request.

Edit: The TB root request does work now. No idea what the problem was.

Edit2: Reboot into recovery works with switch on through volume down + Power button pressed simultaneously. Seems to be new with Pie, I did not know that. So that appears fixed as well.

Edit3: Camera fix was required to make the camera work. Now it does!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
Hi hello everybody, since yesterday, I don't know why, I have this notification(screenshots on attach files) on my XZ2. The phone is rooted, twrp and xperifix are installed and the phone is under Android 8.0.0 (51.1.A.11.51)....

It's possible to made the update via ota ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Only a notification can get shown, the delta OTA updates are sadly not possible due to the fact you could modify anything on the system which could make them incompatible with your system.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice, is something still open or all is fine? :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Udo K.:
Can't permanently install TWRP

I was able to boot into TWRP through fastboot.

However when I try to install the twrp image from the temporary recovery it comes up with a red error message:

E:Error getting bootctrl module.

What am I doing wrong?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nothing, this module is needed to switch slots.

You can "fix" it by manually Mount the vendor partition.

The weird thing is, I already copied the files so they are in the ramdisk without mounted vendor

A security patch level of omnirom introduced it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
XDA Server Error
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Udo K.:
OK, I was able to "fix" it and install TWRP, but now it gets hung up booting into the recovery. I can boot into the system, but when I try to boot the installed recovery it gets hung up on the splash screen.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Means the security patch level doesn't match or anything else with decryption.

Are you sure using the correct twrp matching your firmware security patch level?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Udo K.:
OK, yeah that was the problem... I was hoping to not have to wipe the device, but after doing the update with XperiFix, wiping the partitions and installing everything from a clean sheet it finally worked.

I also had the problem with Magisk 18.1 not working, so I tried version 19.3 which got me in a bootloop. Finally I found the newest version Magisk Canary. Everything seems to work great now, even Google Pay!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Weird happening of bugs and a fullwipe is only hardly needed on a downgrade to an older security patch level, but I am glad, that everything works now :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
My phone doesn't unlock bootloader, Can do install recovery

My phone is Xperia XZ2
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
What did you do on the unlocking try?

Did you follow the instructions from the sony dev site?

Regarding your question:

As far as i know you need a unlocked bootloader to do any modification on your phone.

That includes the installation of twrp in my understanding. So without unlocked bootloader no twrp.

PS: if your unlock your bootloader on Oreo you will loose the camera preview in stock rom. So be sure that you are on stock pie when you unlock the phone. Then the camera will stay working.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Does is unlockbootloader lose drm key on xperia XZ2. This firstime I Try and My phone is on Pie

( Sorry my english is not well)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes

But you can still use the camera in PIE.

No problem, maybe the Google translator is your friend
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Yes. With unlock the drm keys are gone. So for example some sony features in the stock camera won't work anymore.

It's up to you how important you consider this fact.

If you want to go to a custom rom then it doesn't matter because there aren't sony apps and the camera gets better with every oem file from sony.

I using OmniROM since months as daily driver and except the not complete camera i'm lucky with the custom rom.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Thank everyone, Can the custom rom install Gcam and battery is good
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Double yes

The next monthly update of sonyaosp & omnirom will contain further stability and speeeeeeed updates in the kernel.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Thanks

According to you which custom rom is the best
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Pure AOSP => SonyAOSP

AOSP with some more customization possibilities => OmniROM

PS: If you consider microG, too then OmniROM is the best option. It has out of the box option for that.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
thank you

i have a question

When unlock bootloader to step

fastboot oem unlock 0x<insert your unlock code>

What shoul i enter ''fastboot oem unlock 0x123456789'' or '' fastboot oem unlock 123456789''
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
With 0x

You're welcomeeeeee
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
thank you

---------- Post added at 06:02 PM ---------- Previous post was at 05:52 PM ----------

I can't find file recovery and rom in your link in topic
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The link is on the first page in this thread.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
I can't find link download
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please follow the text file there
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
For twrp:

On my download server go to "xperia xz2" -> "android_9" -> "twrp" .

If you want a custom rom choose the newest twrp in the folder "custom_rom".

If you want the stock firmware choose the newest twrp in the folder "stock"

For OmniROM:

On my download server go to "xperia xz2" -> "android_9" -> "custom_rom".

If you want OmniROM choose the newest OmniROM in the folder "omnirom".

If you want AOSP choose the newest AOSP in the folder "aosp".

Be sure that the downloaded twrp and the rom match according date together. So for example for this month all the downloaded files should be from July.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Deleted

---------- Post added at 04:24 AM ---------- Previous post was at 03:49 AM ----------

Hi MartinX3, How to do in step
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
after i flash rom

now, what must i do :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Install twrp as described in the instructions (and use the variant for custom roms; not stock twrp).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
yes i did but it still failed
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
What exactly failed and what steps did you do?What errors did you get?

Did you flash newest stock firmware with Newflasher (with erasing the userdata) before rom and twrp? Which version of twrp did you use?

We need more information to help you.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
First I unlocked the bootloader, my phone is stock rom 52.0.a.8.83, then i Install twrp 2019-06-11_14-37- 22_sony_stock_twrp_xz2_52.0.A.8.83 as described in the instructions, then i flash rom SonyAOSP as described in the instructions and i reboot system

i install TWRP version 2019-07-12_12-15-28_twrp_sodp_xz2
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Did you use the aosp from Juni or july?

If the aosp is from july that could be the problem because of the different stock and aosp version. That could explain the data partition problem in your Screenshot.

So i would do start from scratch and do the following:

1. Flash the right stock rom for your device from this month (with .107 ending) with Newflasher (and with userdata.sin file to clean the data). And then no twrp installation in your case at that point. You want AOSP with twrp, not stock rom with twrp.

2. Then install aosp for your device in the july version.

3. Then install the twrp in the july version for custom roms (as you mentioned right you need the twrp with sodp and xz2 in the name).

Thats the procedure i use when i installing custom rom and twrp on my device. And it works since month.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
1. flash the stock rom with flashtool, that right?

Can you give me your contact (facebook, skype ...) for easy discussion?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
No with Newflasher as i said. Look in the first post of this thread. MartinX3 supports only this tool.

Link to the Newflasher xda thread:

https://xdaforums.com/crossdevice-dev/sony/progress-newflasher-xperia-command-line-t3619426

You can write me pms via xda or contact me via xmpp (if you want). Sorry but skype, facebook etc are no go for me because of privacy reasons. So i don't use these services.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
i did it, and i install AOSP rom july vesion but when i flash recovery version july, my phone reboot Screen turns on with "SONY" logo and i wait 20m but still it, My phone no into recovery
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Did your phone hangs when you try to boot the twrp temporarliy or is twrp now installed via ramdisk option?

I asking because the flashing of twrp are two steps:

Boot into twrp and then install it. Where are you now?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Yes, My phone is hang logo Sony when boot into twrp after install it
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Hm ok. That is weird.

Because if it would hang after the fastboot boot twrp.img then the problem would be the bootloader bug.

But you installed the twrp now via recovery ramdisk so it should work.

And i assume all software (stock rom, twrp and aosp) are on july so i don't think that the problem is there.

Try the vbmeta again command. Mayby it helps.

[MENTION=6031898]MartinX3[/MENTION]

Any other ideas?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I assume he tried to install the stock twrp.img on the custom rom firmware or otherwise around. :)

Stuck on Sony Logo sounds like a kernel problem.

I would fixed it at first if it would be a twrp problem, because I use the XZ2, too.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Now I have to do :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You'll achieve success, I feel it :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
[MENTION=7396026]nhtu1997[/MENTION]

Are you sure that you use all the right files? Mayby you mixed some.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Yes, I'm Sure

all night i try everything but i can't go in recovery to flash dual sim patch

I really like AOSP rom :(

Do you use teamviewer, can you help me with teamviewer
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
I had it years ago. Do i need it a account for it? If no i can install it again and we can try it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
This file i flash, I can't go in recovery for custom rom, but stock rom i can, I don't understand @@
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
According to your Screenshot i see one difference in comparision to my monthly procedure.

I don't use the fastboot reboot command. I always boot the custom rom after Installation, then activate usb Debugging in the rom settings and type in adb this command:

adb reboot bootloader

This brings me back to fastboot mode on my xz2 and then i boot the twrp and install it permantly.

That works by me.

The files in the Screenshot are right.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I am still unsure if he doesn't install the stock twrp ramdisk after he did boot the aosp twrp.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nhtu1997:
Thank everyone

I returned rom stock, How to install Gcam on stock rom
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
It needs one of the custom ROMs to have an effect.

Stock has no camera RAW support.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
Martin hi I'm still here!:) and I still can't install twrp on my phone...i have a two questions.

1-) What is the error I get on the screen?what is the solution?

2-I'm using sony xperia xz2 premium.when I put my phone in fastboot mode and enter command gives me error "waiting for the devices "or like .(when green light on).but when i put my phone flash miode(blue light on)The commands are successful except for the above error command. im using stock rom 107 uk .I don't understand why these are happening