yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] Berni-0815:
You're welcome! This seems to be the only version of this tool working with the latest MM-Version (E5823_32.2.A.5.11) here on my computer with xubuntu 16.04 LTE linux and for my z5c.
[Xperia Z5 Android Development] bruno$0:
I tried to flash my converted ta image but i keeps receiving an erro: 'FIDO_Key: not provisioned".

I wanna flash my ta.ftf again but at work my notebook was blocked to use usb port. I wanna flash using the device itself. Maybe use some command to flash over a SU terminal.

do you know some way to do that?
[Xperia Z5 Android Development] Berni-0815:
Don't try that! I'm not very sure but that bricks your device!
[Xperia Z5 Android Development] sceryavuz:
Sorry NOT POSSIBLE.
[Xperia Z5 Android Development] russel5:
You can flash only original ta.img file in terminal
[Xperia Z5 Android Development] bruno$0:
This will result in a lock my bootloader.

I just wanna solve my "FIDO_keys: Not Provisioned". I don't have access to a pc right now.

Sorry for inconvenience. I'm curious...
[Xperia Z5 Android Development] mele80:
Had this very similar problem, no flashing other roms or kernels helped. Finally i started from scratch, wiped all with flashtool, installed stock fw and unlocked phone and rooted again.
[Xperia Z5 Android Development] tobias.waldvogel:
This should be fixed in 5.23 ;) Anyway I think you got a copy of 5.0 in the meanwhile
[Xperia Z5 Android Development] sceryavuz:
Thanks for your attention. :fingers-crossed:
[Xperia Z5 Android Development] Berni-0815:
I've tried it again and again. Flashing superuser.zip makes it impossible to access twrp via volume up while booting the device!

---------- Post added at 22:20 ---------- Previous post was at 22:07 ----------

The latest version 5.23 works fine with 6.0.1 and superuser.zip. Twrp is accessable as I want it. Thanks!
[Xperia Z5 Android Development] YasuHamed:
5.11 MM , the impression of kernel 3.10.xxxxxx or Twrp in the commun modules is missing! you need to first identify the kernel version! copy/paste the last known available kernel verison and paste/rename to your .5.11 kernel .

now when you will run the script, it will flash the twrp and it won stuck on sony logo!

rootkernel script 5.1 and above [MENTION=627287]tobias.[/MENTION]waldvoge has designed for android N. it doesn't modify ALL MM kernels!
[Xperia Z5 Android Development] sceryavuz:
kcal support and fix for MM

It was really fast :) Thanks :) (5.23 all options works great)
[Xperia Z5 Android Development] DarkDaemon22:
Great tool. I see that we can disable Sony RIC and DM Verity. Once system apps have been removed (as suggested by other threads), can Sony RIC and DM Verity be re-enabled? Will the phone remain rooted?
[Xperia Z5 Android Development] Gewiz:
Was the same for me on z5c.

However after installing newest version 3.2 everything works as usual with nougat without the need of change the system to writeable via terminal. You can see in the changelog that they made fixes for 7.0.

https://f-droid.org/repository/browse/?fdid=org.adaway
[Xperia Z5 Android Development] Soheil_rf:
Please add support for XZ
[Xperia Z5 Android Development] lebigmac:
Hi. I just flashed the boot.img on Sony Xperia XZ (F8331) running Nougat 39.2.A.0.374. I used the following options:

Do I have to flash the DK.ftf BEFORE flashing the boot.img in fastboot mode or AFTERWARDS?

I try to flash DK.ftf using Flashtool but I'm missing the .fsc script. Does anyone have this .fsc script for Xperia XZ (F8331) ? Can you please share with me? Thanks.

How to check if the boot.img flash was successful? I still get the "this device is not trusted because bootloader is unlocked" warning when booting the phone. It's so annoying. Will it be removed when flashing DK.ftf ?

And should I swipe to allow modifications to /system or not (in TWRP) ?

Thanks for your help. Bye.
[Xperia Z5 Android Development] serajr:
Removed!
[Xperia Z5 Android Development] Soheil_rf:
[MENTION=3989065]serajr[/MENTION]

Thanks man works perfect

How about kcal module ?

update : internal storage 0 MB in TWRP
[Xperia Z5 Android Development] Hamidreza2010:
[MENTION=357342]tobias.waldvogel[/MENTION] would you please see these:

https://xdaforums.com/showpost.php?p=71024950&postcount=310

https://xdaforums.com/showpost.php?p=70975629&postcount=123

https://xdaforums.com/showpost.php?p=71041876&postcount=368

would you please check it and let us know how can we fix it?

thanks a lot
[Xperia Z5 Android Development] serajr:
"How about kcal module ?" - Maybe Tobias helps us with this

"update : internal storage 0 MB in TWRP" - Encrypted storage (decrypted works flawlessly). If so, use sdcard instead!
[Xperia Z5 Android Development] sceryavuz:
just type..

adb reboot recovery

or use

reboot recovery program

not use

volume keys + power key combinations..
[Xperia Z5 Android Development] devilmaycry2020:
HI OP

Please add twrp 3.0.3 to this tool. Thank you very much
[Xperia Z5 Android Development] Hamidreza2010:
:confused: would you please give me some name of app?

---------- Post added at 10:09 PM ---------- Previous post was at 09:47 PM ----------

I try some of them but didnt work and get same result
[Xperia Z5 Android Development] Zaisesl:
You can use minimal adb and fastboot. Is here in xda
[Xperia Z5 Android Development] sceryavuz:
This one works for me..

com.antaresone.quickreboot
[Xperia Z5 Android Development] Hamidreza2010:
i dont want use adb

i want enter recovery in device

but it didnt work for me

i tested also some other app

i think its bug , but i dont know related to which tool?

its for [MENTION=357342]tobias.waldvogel[/MENTION] tool or [MENTION=4120742]munjeni[/MENTION] tool
[Xperia Z5 Android Development] Joeisgood99:
Hi [MENTION=357342]tobias.waldvogel[/MENTION]

I get the following error when using this wonderful tool on stock kernel.elf

Sony Z5C

bash rootkernel.sh boot.img newboot.img
Rootkernel V5.23

- Unpacking kernel
rootkernel.sh: line 257: ./bootimg: Permission denied
rootkernel.sh: line 263: ./bootimg: Permission denied
Unknown boot image format
Aborting

I saw commits by [MENTION=4544860]osm0sis[/MENTION] a few posts back for unpackelf. I can build said binary and test in your tool if you like. Also the twrp build that your tool adds to ramdisk is half broken. If you want I can give you the bits and pieces of a 'less broaken' twrp build if your interested.

tobias thanks again for all your work
[Xperia Z5 Android Development] cyberwytch:
Before using this on Linux you need to

chmod +x bootimg
[Xperia Z5 Android Development] Joeisgood99:
I still ger error

Unknown boot image format

after chmod +x boot.img
[Xperia Z5 Android Development] cyberwytch:
You need to type

chmod +x bootimg # no period in bootimg
bash rootkernel.sh kernel.elf boot.img # now a period is okay, this is your output file
[Xperia Z5 Android Development] Joeisgood99:
Ah got it working!

thanks
[Xperia Z5 Android Development] cyberwytch:
You're welcome, glad to hear it!
[Xperia Z5 Android Development] DiscMan55:
The twrp embedded by this tool is missing prop values such as ro.product.name and ro.product.device which gives status 7 when flashing roms. Also it is missing keymaster module (or doesn't work) so decryption of encrypted userdata doesn't work. I'm trying to make my own twrp build from lineage 14.1 sources and Sony kernel with this working but still a long ways ahead.
[Xperia Z5 Android Development] devilmaycry2020:
adding twrp 3.0.3 please. thanks
[Xperia Z5 Android Development] RyTekk:
Stop asking many times for one thing plz, is there any benefit to update to 3.0.3? I'm using 3.0.2 from OP and get no problem with it, then no need to waste time for.
[Xperia Z5 Android Development] Hamidreza2010:
[MENTION=357342]tobias.waldvogel[/MENTION] whats this error and how can i fix it / or maybe was bug ?
[Xperia Z5 Android Development] tobias.waldvogel:
The properties you are looking for are loaded from the system partition, which is not mounted by default in TWRP.

I am considering to change the init script in a way to mount /system temporarily as readonly (in order not to interfere with DM-verity) to load the properties and the kernel modules from there.

Depending on the time available I think I could provide that next week ;)
[Xperia Z5 Android Development] tobias.waldvogel:
Precisely that was my question as well ;)
[Xperia Z5 Android Development] whalesplaho:
yeah, tho 3.0.2 is working fine.... but yhu can add at free will please!
[Xperia Z5 Android Development] devilmaycry2020:
Hey, i dont beg you. So dont talk to me like that.
[Xperia Z5 Android Development] Hamidreza2010:
[MENTION=357342]tobias.waldvogel[/MENTION] found 1 bug, see please :

https://xdaforums.com/showpost.php?p=71054518&postcount=390

https://xdaforums.com/showpost.php?p=71054589&postcount=391

would you please fix this.

also this one:

https://xdaforums.com/showpost.php?p=71053319&postcount=2170

thsnkssss
[Xperia Z5 Android Development] ondrejvaroscak:
One benefit may be that 3.0.2 doesn't handle encryption on Nougat data.
[Xperia Z5 Android Development] shoey63:
3.0.3 just introduces a nag to install TWRP apk for downloading official twrp.img. Useless for devices which only have unofficial builds.

https://gerrit.omnirom.org/#/c/20831/

And not really applicable for this tool.
[Xperia Z5 Android Development] russel5:
Works perfect for me, compiled myself with omni-7.1.1. ;)

This is not right, you can add default.prop from compiled recovery in Android/twrp_common/

In this case system not modified and twrp know all needed prop values. I'm do this very long time ago, since v.4

One more thing, if add proper /sbin folder with all prog and symlinks you don't had any problems with mount and adb backup
[Xperia Z5 Android Development] Berni-0815:
I had several problems using this tool until I changed the first line of rookernel.sh to

#!/bin/bash

and run this as root

sudo ./rootkernel.sh kernel.elf newkernel.img

In this way it works perfect for me.

---------- Post added at 15:27 ---------- Previous post was at 15:25 ----------

Oh, that's right! I chmod' every file to 777 in all directories
[Xperia Z5 Android Development] a2zonlyt:
i have sony xperia Z5C E5823 and running android 6.0.1, locked bootloader, and want to root my sony because without xposed framework its crap, and i do not want to lose my x-reality engine as well, is there any method to gain root access,

what if i flash my phone to kitkat or lollipop to root via kingroot? is this possible?

please help me
[Xperia Z5 Android Development] Joeisgood99:
https://mega.nz/#!QhoBESZI!XzXzHvoscyLTAghxL5y0CYxRnOMm1X57GnZvRBEPoR4
[Xperia Z5 Android Development] devilmaycry2020:
What is decrypt key?
[Xperia Z5 Android Development] tobias.waldvogel:
I unlocked my phone already 4 months ago, so unfortunately I don't have a TA backup with my device key. Nevertheless I'll try to help you guys who have it ;)
[Xperia Z5 Android Development] swagie:
[MENTION=357342]tobias.waldvogel[/MENTION]

I get the yellow Light, it changes to Orange, then the Phone stays on the White Sony logo and reboots after a while in a boot loop patern with an Orange Light.

After switching of with power+vol up and power on it boots to normal.
[Xperia Z5 Android Development] tobias.waldvogel:
One more question: Which kernel version are you using? MM 163 or 185 or an older LP version?
[Xperia Z5 Android Development] amintox:
v4 is the best. the ftf idea is genus. thank you so much
[Xperia Z5 Android Development] devilmaycry2020:
my fastboot is newest version from android sdk tool. so do i need to unlock bootlader first to do this ? as a guy said to me that this patch create modified stock kernel with DM-Verity , SONY RIC disabled not custom kernel so you dont need to UB. is it right ?
[Xperia Z5 Android Development] swagie:
Kernel is 32.0.A.6.152 from dutch rom

So Lp kernel.
[Xperia Z5 Android Development] zohaib0001:
New recovery 3.0.2.0 is launched by Andro

Please update your mod also
[Xperia Z5 Android Development] ninestarkoko:
You must Unlock you bootloader in order to use/flash/boot modified kernels, roms, recoveries or anything. So, first backup your TA partition going here http://xdaforums.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597

then unlock your bootloader following the steps from Sony (search "Unlock bootloader sony" on google).

Remember that Unlocking the bootloader RESETS you phone and WIPES your internal memory, so backup all your files.

Fastboot will throw error if you try to flash modified kernel on locked bootloader. No other way, sorry. if you modify a kernel, even the stock one, you change its bytes and its signature, so it is no more recognised as official
[Xperia Z5 Android Development] acabreram:
Hi it's possible update te recovery without flash everthing again? And how do it? I have fully active me keys.

Thanks!!
[Xperia Z5 Android Development] 3Shirts:
Is there a way to verify that this worked? It all went OK and phone is working but not sure how to check it's using my DRM keys.
[Xperia Z5 Android Development] paulle:
You can flash an actual twrp with fastboot.
[Xperia Z5 Android Development] acabreram:
Ok but i don't see te flasheable recovery file.

---------- Post added at 06:20 AM ---------- Previous post was at 06:17 AM ----------

In your dial *#*#7378423#*#*

Servicios settings /security

Marlin [keys Ok] [active] it's ok
[Xperia Z5 Android Development] paulle:
Look at andro plus kernel, there is a flashable twrp 3.0.2
[Xperia Z5 Android Development] Vanta-Chan:
Sorry for not reading the older posts, but I've got a question: I've already rooted my Z5P by backing up TA from zxz0O0, unlocking BL and using the DRM Patch from tobias.waldvogel. I downloaded the Busybox Installer from Google Play Store too (but eg. root function in ES File Explorer doesn't work (someone knows a solution?)). Now do I need to do something more to my device? Should I now follow exactly this post or is there a difference now?

Does this thread patch my TA Partition with the original TA Backup without losing root?

Mostly I don't want to lose the settings I set up in the phone.
[Xperia Z5 Android Development] igvk:
I have the following problem when using this tool:

After unlocking bootloader and installing MM (32.1.A.1.185 for Z5 Dual), I unpacked ELF image of kernel from sin file and ran "rootkernel.cmd kernel.elf kernel-root.img". All was successful, the size of new image was 21MB.

But when I run "fastboot boot kernel-root.img" (in fastboot mode), it doesn't work as expected - I get SONY logo on white background, the LED color temporarily stays yellow, and then the screen shows charging battery, and the phone doesn't boot until I turn it on with power button.

Seems that the new kernel is unable to boot - so I didn't flash it.

UPDATE: Flashing the kernel image works, it was "fastboot boot" that didn't for some reason.

UPDATE2: And now after flashing DK.ftf with flashtool, I was unable to enter TWRP, had to flash the kernel image again with fastboot.
[Xperia Z5 Android Development] devilmaycry2020:
+1
[Xperia Z5 Android Development] aessian:
lost noob

Hi there,

I need your help guys.

I'm a noob clearly because I am completely unable to run the "rootkernel" command from my Windows 7.

It keeps saying me that " busybox is Not Recognized as an internal or external command ".

I'm completely lost at this point…

I've already :

1 - saved my DRM with "iovyroot > tabackup"

2 - Unlocked my phone

3 - Extracted my "kernel.sin" and converted it to "kernel.elf" with Flashtools

Now I don't know what to do in order to perform the rest of the procedure as described.

Is there someone kind enough to help me ?
[Xperia Z5 Android Development] ninestarkoko:
First of all, backup your files and make a nandroid backup using TWRP (use the built in recovery if it works for you, or download a TWRP .img for your specific device and fastboot boot recovery.img)

if you used the latest v.4.0 package then DRM restore is ok, but if you used v3. you should redo the new passages.

Now you can modify /system partition, boot and run custom kernels, roms and recoveries, and DRM functions work (100% or near).

To allow root access for apps you now have to install SuperSU. You can flash latest stable SuperSU .zip package from here https://download.chainfire.eu/921/SuperSU/UPDATE-SuperSU-v2.65-20151226141550.zip

using your TWRP recovery.

This is what I would do, i take no responsibilities if your device goes bootloop or brick.

You should always remember that playing with kernels, recoveries and testing new tricks that have not been tested widely in every device, can put your phone at risk of bootloop or worse.

So do a nandroid backup first and test if it restores successfully, and read guides about using flashtool or fastboot in case of bootloop or brick.

Apart from these obivious risks, Tobias is quite precise in his works ;)

(about EsExplorer, once you have installed SuperSU, go into left menu -> tools and enable "root explorer" then , if you want to give Write permission, tap on "root explorer" -> mount R/W and select partitions)
[Xperia Z5 Android Development] Beast14:
Hi

After you converted your kernel.sin to kernel.elf, you need to open up command prompt from the folder rootkernel_v4.0_Windows_Linux.zip that you extracted and run Tobias's instruction

rootkernel <kernel image> <new kernel image>

eg. rootkernel kernel.elf kernel_new.elf

then after that is done, take kernel_new.elf that was put in that folder and put it in the c:\flashtool\x10flasher_lib, then open up command prompt from that folder and run the rest of the commands that Tobias posted.

fastboot boot <new kernel image>

fastboot flash boot <new kernel image>

and carry on with the rest of the commands that Tobias posted.

This is what i did on my Xperia Z5 Dual E6683 and it worked perfectly.

I then booted in TWRP and flashed latest SuperSU

---------- Post added at 08:51 PM ---------- Previous post was at 08:30 PM ----------

@Tobias, i have followed every instruction you gave and everything worked out perfectly without error, and i managed to root my Xperia Z5 Dual E6683 with latest MM OS.

I am just having a few issues with some app removers that use root so that i can remove bloatware such as chrome etc. I have used so many different app removers, and none of them worked, for eg. i used system app remover (root) and when i tried uninstalling a system app it uninstalls but sits there till i reboot my phone then it is gone. Is this normal?

Then trying to uninstall a user app or system app again it says failed, but i know SuperSU has granted permissions. So can you tell me if the kernel i generated and the root i have on my phone, am i REALLY rooted? I tried root verify and it says i am though. I am just having doubts because of these app removers arent working properly, or maybe its because they dont all support MM yet? :( please can anyone tell me your professional opinion?

Does anyone know the best app remover using root to remove system apps as well?

I appreciate the software you have contributed, thank you so much!
[Xperia Z5 Android Development] butilities:
Hi, I managed to backup my TA, when I want to create DK.ftf, i run flash_dk.cmd TA.img Dk.ftf and got error Could not find device key in TA.img (Unit 0x1046B). Please help, thanks in advance
[Xperia Z5 Android Development] Joeisgood99:
Have edited previous link. Not sure why there was no key. Try now. It's just the recovery.img
[Xperia Z5 Android Development] Gewiz:
Dude, look in the z5c section. There are a few threads about how to root your phone. If you have problems, ask there.

https://xdaforums.com/z5-compact/general/guide-how-to-root-z5c-painful-using-t3549388

https://xdaforums.com/z5-compact/general/how-to-backup-restore-ta-partition-root-t3479532

https://xdaforums.com/z5-compact/general/summary-tutorial-root-sony-xperia-z5-t3360515
[Xperia Z5 Android Development] tobias.waldvogel:
The default.prop is different for each device and then I would need to recompile for all of them. Therefore I think it is a better option to mount /system ro for loading and then unmount it again.

Regarding sbin I think I have everything there. Busybox is copied over there and the symlinks are created when starting TWRP. The remaining tools not covered by busybox are in the TWP folder. The idea is to keep it as small as possible as some older devices have a restriction of approx. 20MB for the kernel package. If you include TWRP, supersu and xposed there is not much room.

In particular for adb the idea is to use the one which is coming with the kernel package as it is also device dependent.
[Xperia Z5 Android Development] mcduffie2010:
Maybe you have to be patient. The guy already did enough for us to be very grateful.
[Xperia Z5 Android Development] bruno$0:
It's dosen't matter if you flash Dk.ftf after or before. As Op says: its an only one time task. Even you update the firmware the Dk partition will survive. If you could boot your device using this boot.img, then everything should be allright with it.

I what application do you receive that status: "this device is not trusted because bootloader is unlocked" ?

"And should I swipe to allow modifications to /system or not (in TWRP) ?" -> Good question. I have allowed here.

I have the same issue here to flash dk.ftf. When you click on flash, flashtools ask if you wanna use the FSC script. If you answer 'No' seems that you can write DK.TA successfully.

After all i keep receiving that FIDO_Keys are not provisioned.

How to fix this? How to check if my DK.ta exist and if is correctly ?
[Xperia Z5 Android Development] shoey63:
The annoying "bootloader is unlocked and cant be trusted" cant be removed by simulating original TA restoration. The bootloader reads the "real" Trim Area before even the kernel is loaded and displays the message if the device is unlocked.

Flashing DK.ftf has to be done on an older FlashTool version which doesn't insist on FSC scripts (No such thing as an FSC script with DK.ta in it). Version 9.18.6 should work (maybe others too).
[Xperia Z5 Android Development] Soheil_rf:
[MENTION=357342]tobias.waldvogel[/MENTION]

Flashing DK.ftf on Xperia XZ not available because there is no Loader for XZ also DK.ftf is unknown for available 39.fsc Script
[Xperia Z5 Android Development] piponxs:
Rootkernel V5.23

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-gda8446f

Found appended DTB

- Detected vendor: somc (Sony), device: sumire (Xperia Z5), variant: row

- 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] N

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

- Install DRM fix? [Y/n] Y

- Install busybox? [Y/n] N

- Creating new initramfs

- Creating boot image

error: could not create ''

- Cleaning up

Done
[Xperia Z5 Android Development] x_one:
You should specify name of the new boot.img.

Script ends with error becouse don't know what file have to create. " means empty name.
[Xperia Z5 Android Development] piponxs:
can you be more detailed please.What should I do,thanks
[Xperia Z5 Android Development] x_one:
You have run it like: rootkernel kernelfilesource newbootwithfixes.img

And you run it like: rootkernel kernelfilesource
[Xperia Z5 Android Development] Nown:
Hi, I just upgraded my Z5C to .376 and I experience some battery drain.

I patched the kernel with Tobias' tool v5.23 (supersu, dm-verity disabled, RIC enabled, DRM Fix and TWRP enabled). Everything works fine, but now the CPU seems to be running at top speed for a significant proportion of the time when the screen is off (see CPU Spy screenshot). Before the upgrade, when the CPU was running with the screen off, it was @ 300-400 MHz most of the time. Anybody experiencing something similar, or having any clue how to fix it?

Thx a lot!