yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] DiscMan55:
I know about the added vol down plus power on combo. I am talking about the orange led behavior so that you can just reboot and then press down at Sony logo when the orange led lights up.

That behavior is added to init script by rootkernel.
[Xperia Z5 Android Development] mhaha:
This doesn't work for me, flashing superuser.zip from TWRP causes my phone to hang at SONY boot screen, and also no longer able to access TWRP. Integrating using v5.23 just results in no root access (notification about outdated binary, AdAway for example claims no root is detected and refuses to open, inability to check root everywhere in Total Commander... etc.). Basically, the exact same things as someone previously mentioned:

I also was unsuccessful with a transition from SuperSU to superuser, same as another person reported. The suggested solution failed:

Phone is Z5 compact, firmware 32.2.A.0.305, disabled everything rootkernel offered to. I have tried dirty flashing and complete clean flash for every possible case to no avail. I also tried integrating/flashing superuser.zip with modified config.txt (noverity), same results.

Any help greatly appreciated, thanks in advance.
[Xperia Z5 Android Development] iwilltouchthesky:
First off, great tool and thanks for all of your hard work.

I am on 32.3.A.0.376 on a z5 premium E6853. I am able to unpack and repack the kernel no problem, but when I use

fastboot boot boot.img

to test my repacked kernel, it boots to the first white Sony splashscreen, but then it goes to a black screen and my device just shuts off...I can't get a logcat because it shuts off before Daemon starts.

Anyone else experience this or know why this is happening?? I even tried just saying no to all options when running the script and even then I got the same result. Really has me scratching my head. I also tried tool versions 5.23 and 5.11..... Please help :(
[Xperia Z5 Android Development] serajr:
This one does the job (MM only), and also the device-sony-common-init project (MM and N).
[Xperia Z5 Android Development] shoey63:
The problem with those scripts is that they boot into recovery running on top of the STOCK kernel. And with Nougat kernel the security is super strict. Kernel panics as soon as "permissive" is detected, and TWRP must do that to function properly.

The best way is to flash a recovery.img to Fotakernal, and boot into it with hardware keys (as you have stated many times).
[Xperia Z5 Android Development] serajr:
You are right bro. That's why I gave up playing with integrated/"scripted" twrp!

I have to say that I don't know what Adrian DC did, but second one does work fine on N too (with his Sony Stock Patcher only). The "problem" is the multirom twrp.

Btw, are you still working on yours?
[Xperia Z5 Android Development] Mario.D:
It was the same for me then i wanted to test without flashing.

Then i did flash it worked as it should.

Dont flash the image you said no on all options that one will bootlop i think.

Skickat från min E6653 via Tapatalk
[Xperia Z5 Android Development] iwilltouchthesky:
Okay, I will try flashing it to memory, thank you very much my friend.

Will report back results.

+thanks given :)

UPDATE: Yah it works fine, just had to actually flash it to boot partition via fastboot instead of just booting it. Thanks again for your post. I kind of figured that's what the problem was, but wanted to be sure before flashing.
[Xperia Z5 Android Development] shoey63:
Intermittently. Real life activities are hindering development.
[Xperia Z5 Android Development] mobiware:
Hi there,

Awesome thread!!!

I backed up my TA keys, unlocked the bootloader and flashed the E6683_Customized MY_1298-9654_32.3.A.0.376_R1D firmware. I flashed the FTF removing the "fwinfo.xml" and excluding the TA files, and everything worked fine.

I have a few noob questions, if you don't mind:

1. Do you know if I can use the "tarestore.bat" file from iovyroot?

2. Would munjeni's proof of concept that restores the TA partition work in a similar way?

3. If I flash the patched kernel, will that give me TWRP? I assume it would.

4. If I use TWRP, can I flash "superuser" instead of "SuperSU" which has a lot of battery drain?

5. Can we "DM-Verity" and "Sony RIC" for sure?

6. Is access to the external microSD card missing?

Thank you so much in advance,

MW
[Xperia Z5 Android Development] panecondoin:
Hey there,

I can answer some of your questions (No idea about 1 and 2, though):

3. You assume right. You are prombted to answer several steps during the process of which one asks for TWPR implementation.

4. Absolutely. Personally, I had the battery drain issue with SuperSU and can vouch for superuser's superiority in that regard. I highly recommend phh's superuser!

5. Do you mean whether we can disable them? Yes we can.

6. Access to microSD is not a problem anymore.

All of the answers refer to .378 firmware.

Cheers!
[Xperia Z5 Android Development] :
Hello

I own a Sony z5 Premium Dual E6833

I have followed this (very good) blog (in German)

https://reraise.eu/2016/09/12/xperia-z5c-aktuelle-firmware-aufspielen-und-rooten-teil-3

- save the TA partition

- get the code from Sony and unlocked the bootloader

- downloaded the V6.1 code via Flash tool

- used the rootkernal to disable dm-verity, Sony RIC, Install TWRP, Install SuperSU, install DRM fix.

- flashed the kernel and TA

Worked fine.

The I deploated about 100 programs.

I produced a second kernal without SU etc, and used it under a MDM solution without issues. Super.

Now that V7 is available, I thought I follow the same track again.

So I used latest rootkernel_v5.23_Windows_Linux.zip, latest SP3-SuperSU-v2.79-SR3-20170114223742.zip sein. And yes, a kernel is produced successfully.

C:\__SonyZ5Premium\rootkernel_v5_23>rootkernel kernel.elf kernel.img

Rootkernel V5.23

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-gda8446f

Found appended DTB

- Detected vendor: somc (Sony), device: satsuki (Xperia Z5 premium), variant: dsds

- Unpacking initramfs

- Detected platform: 64-bit

- Detected Android version: 7.0

- dm-verity is enabled. Disable? (Say yes if you modify /system) [Y/n] Y

Disabling dm-verity

- Sony RIC is enabled. Disable? [Y/n] Y

Disabling Sony RIC

- Install TWRP recovery? [Y/n] Y

Installing TWRP

Compressing TWRP image

- Install kcal kernel module? [Y/n] N

- Found SuperSU-v2.79-SR3-20170114223742.zip. Install? [Y/n] Y

Adding service entry for SuperSU

- Install DRM fix? [Y/n] Y

- Install busybox? [Y/n] N

- Creating new initramfs

- Creating boot image

- Cleaning up

Done

C:\__SonyZ5Premium\rootkernel_v5_23>

The I flash the new firmware via Flashtool

flash - Flashmode - Sony Xperia z5Premium - E6833 - Customized CE1 - 32.3.A.0.376 (without any wipes to keep my data) (Vol down, wait for green light)

Then I flash my new build kernel (Vol up, wait for constant blue light)

fastboot flash boot kernel.img

And the phone boots. So far so good. The good news: All data is still there.

BUT

I can not debloat.

Neither the 'App Deinstaller' from jumobile but any other deinstaller I tested actually can deinstall a system app.

Seems like there is root, but access to the system directory is missing?

Sorry if I have overlooked the solution somewhere in the board, although I have searched.

Any hints?

DerderDON
[Xperia Z5 Android Development] Klaus N.:
[MENTION=7176962]DerDerDon[/MENTION]

Your question has nothing to do with this tool, it's rather related to Android 7. But on my 2 devices (Z5 + XZ, both running Android N), I have no problem to deinstall a system app.

Maybe it's because I've deodexed the system apps, on the other hand I use Titanium Backup.

But now we should go back to topic ;)
[Xperia Z5 Android Development] Hamidreza2010:
[MENTION=357342]tobias.waldvogel[/MENTION] how can i make recovery.img from recovery files in Android\twrp_common_kmodules ?
[Xperia Z5 Android Development] YasuHamed:
Google has made /system READONLY from android N. even when u have root access, you cannot remove app!

you need to give /system RW access

https://xdaforums.com/xperia-z5/general/z5-making-writable-32-3-0-372-root-t3551067
[Xperia Z5 Android Development] mobiware:
THANK YOU SO MUCH; I APPRECIATE IT!

On #3, do you think it might be a good idea to download the latest TWRP from the respective thread?

Also, should I assume it would be OK to use the scripts/app on the .376 firmware? I would think it should be OK, since they work on the .378.
[Xperia Z5 Android Development] panecondoin:
[MENTION=2024468]mobiware[/MENTION] The latest rootkernel comes with TWRP 3.0.2, which has served me well so far and seems to be the latest release anyway. No need to download anything else. I also think the rootkernel tool works for a lot of sony firmwares. I have used it on several MM and Nougat builds myself.

Have a nice day everybody!
[Xperia Z5 Android Development] :
Hey YasuHamed, thanks a lot for the hint. I was not aware but will try today.

Oh happy day!
[Xperia Z5 Android Development] :
Thank you very much for your work and instructions!

Trying to root my Tablet Z4 (SGP771, Android 6.0.1, Kernel-Version 3.10.84-perf-gf1cfa5f, Build-Nummer 32.2.A.0.253) I fail at the very first step:

In order to use these scripts you need the kernel boot image of your current version. There two different ways to obtain it:

1. If you have a .ftf image…

2. Run your favourite recovery…

How can I get my .tft image or how can I run a recovery without root?

Do I need to downgrade the Android version for the first root access/install a recovery?

Will the recovery stay on the tablet when flashing a newer version with Sony flash tool?

Thanks in advance
[Xperia Z5 Android Development] YasuHamed:
ROOTING 6.01 of any xperia is possible only when you have unlocked bootloader

and before you unlock! , SAVE you drmkeys/ta backups by running dirtycow script (you can search in xda about it) (dirtycow doesn't support android N)

once you have bootloader unlocked and drmkeys/ta backups taken successfully

by using latest flashtool

you can download your build (ftf) via FLASHTOOL's xperifirm, once donwload, extract kernel.sin from tft (by using 7zip) , and then in flashtool click TOOLS > SIN EDITOR >> (select kernel.sin ) and click extract data. i will convert kernel.sin to kernel.elf.

this kernel.elf can be modified the script given in OT and you can create boot.img in order to have root access.
[Xperia Z5 Android Development] shanpao:
Where can I download this phh's superuser card brush package
[Xperia Z5 Android Development] panecondoin:
Not sure what you mean by "card brush package" but here is the relevant thread. Find superuser.zip under "update.zip format".
[Xperia Z5 Android Development] shanpao:
THANK YOU
[Xperia Z5 Android Development] :
Thanks a lot for your answer! Now I was able to build the boot image, but with my boot.img the touchscreen did not react anymore.

What dit I wrong? Is <kernel_S1-SW-LIVE-F936-PID1-0006-MMC.elf> the wrong file to create the boot image? Any solution (I went back to the old .elf and now it works again but is not rooted of course)

(btw I tried to root Android 7 (32.3.A.0.378) on a Tablet Z4)
[Xperia Z5 Android Development] mhaha:
Filename doesn't look right, I suspect you used the "raw" file xperifirm downloaded rather than the file extracted from a FTF file. You're supposed to create a FTF file using Flashtool. See steps 3, 4 and 6 from this guide.
[Xperia Z5 Android Development] :
Thanks mhaha

You are right, I missed the steps 3 and 4. But also with the new kernel.sin and building the boot.img with the new kernel.elf it ends up in exactly the same result:

After flashing the boot.img and restart the tabblet Z4 the touchscreen doesn't react. Then I flash the kernel.elf file and restart the tablet and everything works fine again…

Tablet Z4, Android 7.0 (Build 32.3.A.0.378)
[Xperia Z5 Android Development] Shammy7861:
Dear serajr

I have been looking at your work with Unofficial - Rootkernel V5.23 - XP and XZ + munjeni's TA PoC. It is brilliant and amazing it works realy well with the Sony Z5 Compact.

I am wanting to donate some money to you munjeni & tobias.waldvogel. But was wanting to know do you have this with the changes mujeni's has made to the TA POC.

It is a brilliant tool and works amazingly well integrating. Where can I download it from please. I have used both tools and they are amasing in their own way but can't get them to work together. Look forward to hear from you.

Thanks Sham

Credits:
[MENTION=357342]tobias.waldvogel[/MENTION]
[MENTION=4120742]munjeni[/MENTION]
[MENTION=3989065]serajr[/MENTION]
[Xperia Z5 Android Development] YasuHamed:
i have it here

please download the sd zip version to flah via twrp

https://mega.nz/#F!3FYhTbSC!9MraM-zYNRNMPzmTkSSs9g

make sure you install phhs superuser apk from playstore later after booting
[Xperia Z5 Android Development] :
On my tablet Z4 it is possible to get Root Access but the Touchscreen is not reacting any more.

This happens on all 3 builds, I tryed: 32.3.A.0.378, 32.2.A.5.11 and 32.3.A.0.376.

Has anyone any idea how to solve this?

Has someone with a tablet Z4 managed Root Access with Android 6.0.1 or 7.0?
[Xperia Z5 Android Development] morlack02:
Can I have a proper rooting for Xperia z3+ Dual Android Version 6.0.1.?

Thanks
[Xperia Z5 Android Development] dario2510:
I tried to include superuser instead of supersu, but after flashing it all, i hadn't root access, so i made it again with supersu and everything is ok. Can anyone tell me why?
[Xperia Z5 Android Development] DarnellBomar:
Need recovery

So I'm really rusty at doing all of this but I will get right to it. I got Android 7.0 (.376 is build number) on my Z5 E6653 but now I have no recovery. Can anyone post a link to TWRP recovery image for 7.0 that I can flash through the flashfy app or do I have to flash through PC? My root and bootloader are all done already I just need a working recovery and can't find one please help.
[Xperia Z5 Android Development] derfritz:
Alright guys I need your help here. Basically, I wanna play Pokemon Go. Installed Magisk, runs perfectly, but for Pokemon Go I need to have safety net working, which it is not right now, because I have dm-verity disabled am I right? Whats the problem when I enable it? Using Nougat, Xperia Z5, unlocked bootloader.

Gesendet von meinem E6653 mit Tapatalk
[Xperia Z5 Android Development] Klaus N.:
Take a look here: https://xdaforums.com/showpost.php?p=71336702&postcount=946. All thanks go [MENTION=4675598]shoey63[/MENTION], ofc :good:

Just flash it with: fastboot flash recovery recovery.img

---------- Post added at 17:12 ---------- Previous post was at 17:08 ----------

If dm-verity is enabled, the problem will occur, that your device won't boot anymore ;)
[Xperia Z5 Android Development] derfritz:
Oh. I wanna avoid that. Any way circumventing this?

Gesendet von meinem E6653 mit Tapatalk
[Xperia Z5 Android Development] YasuHamed:
good day brother [MENTION=3989065]serajr[/MENTION] [MENTION=357342]tobias.waldvogel[/MENTION]

is it possible to integrate twrp 3.1 ?
[Xperia Z5 Android Development] paulo_andre:
I play Pokemon go without problems. Basically, repack the kernel and only install TWRP, don't disable dm-verity. Then, in TWRP, flash magisk. I think it will patch or disable dm-verity. Then, install the magisk app. Finally, inside magisk app, enable magisk hide. Enjoy!
[Xperia Z5 Android Development] sceryavuz:
I also wonder. I can't find any twrp_common for 3.1
[Xperia Z5 Android Development] derfritz:
Gonna try that!
[Xperia Z5 Android Development] dario2510:
I tried to to flash a kernel patched with superuser, but after that it said that i had no root permissions, so i did it again with supersu. Now i'm having battery drain.... What could i do?
[Xperia Z5 Android Development] Berni-0815:
Once again:

You have to install die App "phh's SuperUser" afterwards.... :cool:
[Xperia Z5 Android Development] mobiware:
Order of running PoC or Repack of the Stock Kernel first

Wow,

This is unbelievable [MENTION=3989065]serajr[/MENTION]! Great work. Now we can have the best of both worlds. I was curious:

Do we run Tobias Waldvogel's Repack of the Stock Kernel first and then [MENTION=4120742]munjeni[/MENTION]'s TA PoC? I know I should ask [MENTION=4120742]munjeni[/MENTION], as he suggested early in his post to a user to run his PoC first and then Tobias' script, but it sounds like you are suggesting to run Tobias' script first. Am I correct to think so?

Also, I noticed that on the TWRP site, the Xperia Z5 is not supported. Does anyone have any report that this unofficial_rootkernel_v5.23_Windows_Linux_XP_XZ_TA-PoC will work on the Z5?

Thanks in advance,

MW
[Xperia Z5 Android Development] serajr:
Bro, I've never suggested to run one or other tool first. Both work great, but as stand-alone tool.

Run one of them only!
[Xperia Z5 Android Development] morlack02:
Downgrade

Can someone help me fix Battery issue.

I have 6.0.1 version of Z3+ Dual and my battery drain so fast.

I read thread from XDA and suggested to downgrade it to 5.0 or 5.5 version.

Any steps how to do that?, your response is much appreciated.

:confused::confused::confused::confused:
[Xperia Z5 Android Development] mobiware:
I was actually referring to your unofficial rootkernel script that includes the orange and blue lines. Isn't that a combination script of both of Tobias' and Nintendo's scripts? Am I missing the whole point?
[Xperia Z5 Android Development] shoey63:
That script was for before PoC had recovery integrated, which it now does. What is it you are looking to achieve?
[Xperia Z5 Android Development] mobiware:
Thank you so much for the time you are taking to respond to me.

I am new to rooting and using recovery. I have read a lot but it's all fragmented as you know, so I have about 80% of what I need.

I have an Xperia Z5, I have taken a backup of the TA partition, I have unlocked my bootloader and I have flashed the Malaysian 32.3.A.0.376 firmware.

I want to get:

1: Disabled DM-Verity, disabled Sony RIC, root.

2: TWRP.

3. Restore the TA partition.

I noticed in serajr's script that it uses Tobias' part of it, excluding the DRM fix but having new lines from munjeni's TA PoC.

My concerns are that:

1. I don't want to brick the phone (of course.)

2. TWRP 3.0 (or even 2.78 or so) is not compatible with the Z5 (from what a few people say, and also from their web site.)

3. I want to restore all of the TA partition including WideVine, which from what I understand only the TA ToC does.

4. I do not want to be vulnerable to new exploits in the future, but I do not mind if my bootloader stays unlocked.

What do you think? Which of the 3 solutions should I follow?

Thank you so much again.

MW
[Xperia Z5 Android Development] serajr:
Answered in context!
[Xperia Z5 Android Development] mobiware:
Thank you so much again! I have one more quick question:

Does the newest version of this script reinstate the WideVine, CKB, Marlin and FIDO keys, or only x-Reality engine and camera de-noise functions? There are posts where those didn't all get restored, especially the FIDO keys (e.g. on post #1135). Any input would be great.
[Xperia Z5 Android Development] mobiware:
Nice step-by-step breakdown!

Nice step-by-step breakdown!
[Xperia Z5 Android Development] mobiware:
Does the newest version of this script reinstate the WideVine, CKB, Marlin and FIDO keys, or only x-Reality engine and camera de-noise functions? There are posts where those didn't all get restored, especially the FIDO keys (e.g. on post #1135). Any input would be great.
[Xperia Z5 Android Development] nabeelrazanaqvi:
Hi guys. I wanted to ask a noob question.

As we are flashing the Do.ftf which is actually the TA.img of our own device then what is the purpose of DM variety patch?
[Xperia Z5 Android Development] mobiware:
Latest TWRP 3.1.0

How can we flash the latest TWRP 3.1.0 instead? At what point? After the script?
[Xperia Z5 Android Development] serajr:
The only requirement is the unlocked bootloader, and you can do that just after you unlock it, with fastboot commands (fastboot flash recovery your_recovery_image.img)

But you can also integrate the recovery image into kernel's ramdisk, to do that so, rename it as recovery.img and push it in the munjeni's PoC tool root folder.
[Xperia Z5 Android Development] iwilltouchthesky:
Anyone have any luck implementing and using the KCAL kernel module with this repack script?

I selected yes to include KCAL kernel module when I used the repack script, but when I use the App that goes with the module it says

"KCAL support not found! Go bug your kernel developer or blame SELinux!"

Thoughts? Using stock repacked kernel on 32.3.A.0.376 on an E6853. The E6853 has a 8994 board so it should be fully compatible with the KCAL module.

Thanks!
[Xperia Z5 Android Development] tanago:
rootkernel.cmd kernel.elf boot.img
- Unpacking kernel
error: Android boot magic not found

Unknown boot image format
Aborting

latest .333 xperia x
[Xperia Z5 Android Development] mobiware:
[MENTION=3989065]serajr[/MENTION],

I understand you are talking about the PoC script, but if I were to update the recovery to 3.1.0 using this script, I don't think I would be able to do it, since it has the 3.0.2 recovery in the kernel. Am I right?

Thanks again,

MW
[Xperia Z5 Android Development] fralik:
Man, of course we install apk afterwards. The problem people refer to is well described in #2272.

Anyone got superuser to work in 2017?
[Xperia Z5 Android Development] Berni-0815:
This is not sure. They're always talking about integrating superuser.zip, not about installing the apk afterwards.

Hmmmm, me!

Proof:
[Xperia Z5 Android Development] fralik:
Good too hear! Then it is probably something device specific.

Ok. I managed to get it to work with ta_poc. What I did in the end:

1. Prepared boot image with ta_poc (disabled Sony RIC and dm verity).

2. Prepared boot image with rootkernel on top of ta_poc. Answered No to all the questions (so, maybe I didn't really need to run rootkernel).

3. Flashed new boot image.

4. Rebooted into TWRP.

5. Flashed superuser.zip.

6. Wiped cache.

7. Rebooted.
[Xperia Z5 Android Development] serajr:
Bro, get your kernel.sin (from your ftf) and put it the ta_poc folder (TA.img and recovery.img as well), run the tool and you're done!

If you want to run rootkernel tool, ok, get your kernel.sin (from your ftf) and convert it to kernel.elf (with Flashtool), and put kernel.elf in the rootkernel folder (TA.img as well), and follow the instruction of the unofficial version (some pages ago).

1st option - recovery.img (3.1.0-0) will be integrated into the new_boot.img

2nd option - rootkernel twrp (3.0.2-0) will be integrated into the boot.img (if you choose Y when prompted to do so)
[Xperia Z5 Android Development] mhaha:
Uh, no, apk installation was definitely mentioned. For example, this quote I quoted in my reply where I said I was experiencing the exact same thing:

If the app wasn't installed, there wouldn't be any notification at all.

Can you kindly describe exactly what you did to obtain root with superuser? Because I am pretty confident in my abilities to follow instructions, and I am completely at loss as to why I can't get root. Seeing your proof of it working on 6.0.1 has reignited my motivation to try again.

Did you install superuser using rootkernel's integration? Or through TWRP? What options did you choose with rootkernel, in case it matters? What other details have you performed that I might have missed?

And for the record, I had installed phh's superuser app from both the Play store and f-droid, with the same results. Shouldn't be rocket science, but I just couldn't get it to work. Help me Obi-wan-Berni, you are my only hope!