yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] othmane.os:
Hi Bro thanks for reply . to clarify I've already done that and tried several times with different ver of Rootkernel but the restoration didn't take it effect still no drm keys at all

the only way I could restore my keys successfully is by applying this :

CONFIRMATION OF TA RESTORE!

- Ran tool on Xperia X

- Unlocked bootloader

- Flashed TWRP

- Pushed TAbackup.img (I renamed it) to /data/local/tmp and verified md5sum is same as original backup.

- Did

Code:

adb shell dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA

- Rebooted

- Everything back as it was. Original TA restored and DRM keys all active
[Xperia Z5 Android Development] serajr:
Thanks a lot bro (great write up, btw) :good:

Just exactly what must be done!!

This ^^ does restore your TA partition, but also locks your device's bootloader (if you want to use a patched kernel with DRM fix, that's all you shouldn't do)!
[Xperia Z5 Android Development] othmane.os:
Hi serajr , as you see I just only use this method to check if my TA backup was working well, that is why I locked my bootloader , but the point and that's why I'm here is that I want to use a patched kernel with DRM fix (by My TA backup)

So there are two possibility here :

1- maybe the new rootkernel has a problem with creating dk.ftf even though I got the file about 500 bytes As the author said

2-Flashtool could have problem with restoring TA or some compatibility issue but I flash so many firmwares without any issue , So it could be only with TA part

Is anyone faced issue with restoring dk.ftf part ?? especially if flashtool has problem recently

Anyway my device is M4 aqua ,using latest flashtool ver0.9.23.2 and Rootkernel V5

Also I've tried Poc method but when I check service tests and go to security I got blank page nothing written in security

Thanks guys for help , I really find it weird especially for the blank page
[Xperia Z5 Android Development] juanpirulo:
l think the problem is in the new drm libraries as they should be fix to work with ta backup. Cheers

Enviado desde mi F8331 mediante Tapatalk
[Xperia Z5 Android Development] othmane.os:
I'm using android 6.0.1 July 2016 Security Patch , So it's older and should have been working well , but it didn't:confused:
[Xperia Z5 Android Development] dr4go:
This is your problem. Use flashtool version 0.9.22.3 and eventually clean / delete your ".flashtool" folder after uninstallling v0.9.23.x, then it will succeed. Also searched a lot to find this stupid piece of the puzzle....
[Xperia Z5 Android Development] othmane.os:
thanks for the harshness , I've already searched about all of this crappy puzzle and eventually tried different ver of flashtool and deleted .flashtool folder so many times before I write A single word in this thread, but don't be so sure about this method to be working:laugh::good:
[Xperia Z5 Android Development] juanpirulo:
sorry i thought you were taking about oreo. cheers
[Xperia Z5 Android Development] torben5247:
Just updated My z5c with . 154

Aften flashen repacked boot. Img i cant get the data working. Apn is missing and i van cleare a new one..... Normally rootkernel works fine, but i mest be doing something wrong.

Anyone else having issues repacked the . 154

The data connection works fine before flashing the repacked boot.img

I have not included twrp and supersu in the boot.img
[Xperia Z5 Android Development] DuskGolem:
[MENTION=3989065]serajr[/MENTION], awesome work on the unofficial version 2 of this tool. I wanted to ask a few things. I am using xperia Z5 premium e6833, 7.1.1 stock with drmfix+DK.ftf and magisk 14.6.

1) can you please integerate twrp 3.1.1-0 for satsuki device in your tool. I have read your previous posts stating to use ta_poc for kernel integrated latest twrp. I tried it but don't know why, ta_poc+magisk is not working for my device, gives me bootloop.

2) Is there something wrong in my method or the ta_poc. In your tool version 1, ta_poc and magisk used to work but that is not the case with this version 2.

Anyhow, the first question is of greater importance to me as DK.ftf does the trick of ta_poc(i am happy with it). Just tell a way to integrate twrp 3.1.1 in the tool or do it yourself PLEASE.

Waiting for your reply.....
[Xperia Z5 Android Development] whalesplaho:
How can i make DK.ftf buh im using stock modded kernel by tha rom dev.

Thanks
[Xperia Z5 Android Development] DuskGolem:
Just put your kernel and ta backup (TA.img:case sensitive) in rootkernel directory and enter the following in cmd:

flash_dk <ta backup image> DK.ftf

In above command replace ta backup image with TA.img, this is important so name your ta backup exactly like above. By this you will create DK.ftf. Now drm fix will collect your ta backup credentials instead of emulating them.

P.S: first flash DK.ftf, boot normally then reboot to fastboot and flash the modded kernel.
[Xperia Z5 Android Development] whalesplaho:
Gonna give dis a shot...

Thanks man
[Xperia Z5 Android Development] torben5247:
Just tried 5.23 on my z4 tablet. rootkernel working fine on my z5c with 32.4.A.1.154

I have flashed the version in flashtool SGP771_32.4.A.1.54_R4E_SGP771_Customized NOBA_1295-7869

First I tried yes to all options except the busybox.

After flashing the boot.img my touch screen was dead.

I tried to find out what caused the error.

And the boot.img works fine until I say “yes” to drm fix.

If I say “yes” to Dm, ric, it works fine. But if I say yes to drm fix the touch screen wont work.

I flashed twrp seperatly and it is working fine

Any help would be appreciated
[Xperia Z5 Android Development] othmane.os:
Hi again , guys is there any alternative way to flash DK.ftf without using flashtool?? I've tried so many flashtool's versions without any affect on security tab

Thanks in Advance
[Xperia Z5 Android Development] whalesplaho:
IMO its not possible..... What issues re yhu having?

I flashed mine successfully.
[Xperia Z5 Android Development] MKRashka:
will ther be a version for Android 8?

I've just updated to 41.3.A.2.24 (Xperia XZ Kagura (F8331)) and want to root with a stock kernel.
[Xperia Z5 Android Development] Klaus N.:
There already is a version for Oreo (for Dora and Kagura). Take a look at page #280...
[Xperia Z5 Android Development] othmane.os:
I've already posted my issue here , But anyway I wanted to flash that dk file but it won't work flash it several times with different flashtools version but with no effect still no drm in security tab

the only way it's work for me is by the regular restoring method which will lock my bootloader and that's what I don't want it to be

this dk.ftf method well still keep my magisk and recovery working
[Xperia Z5 Android Development] whalesplaho:
I understand yhu now buddy... So sorry bout dat buh gat no idea.

Maybe [MENTION=3989065]serajr[/MENTION] can help.
[Xperia Z5 Android Development] serajr:
DK.ftf has a regular DK.ta file within it (created by rootkernel), so maybe munjeni's Xflasher tool manages its instalallation (DK.ta). I'm just guessing!!

Better asking munjeni in his thread before venturing on this!
[Xperia Z5 Android Development] shoey63:
Xfasher definitely works flashing DK.ta[emoji106] https://xdaforums.com/showthread.php?p=72461663
[Xperia Z5 Android Development] Klaus N.:
A hint for XPerformance (Dora) and XZ (Kagura) users:

Don't use a Magisk version later than 14.5, otherwise it will break DRM!!! Btw, thanks alot to [MENTION=3989065]serajr[/MENTION] for figuring that out :good:

I've got a XZ device running the latest 2.24 Oreo fw. The kernel is patched by [MENTION=3989065]serajr[/MENTION] 's UNOFFICIAL 2 (OREO) version. Everything was ok, until I've updated Magisk. So you better stay on Magisk 14.5 atm.!!! You can check this out by entering *#*#7378423#*#* into your dialer > Service tests > Security

---------- Post added at 23:55 ---------- Previous post was at 23:51 ----------

@shoey63

May I ask you, if you could do your magic again and build a 3.2.1-0 TWRP for Honami (Z1)? I ask, because I want to change the file system of /cache and /data to f2fs (which is supported on unofficial LineageOS 7.12).

Thanks in advance!
[Xperia Z5 Android Development] dr4go:
Currently on dora (xperia xp) and Magisk 15.1. Is it the "generic error" regarding the HUK and the blobs you're referring to?
[Xperia Z5 Android Development] Klaus N.:
That's right!
[Xperia Z5 Android Development] shoey63:
Not sure if I still have the correct repo on my PC, but if I do, I will see what I can do.

Edit: Does this previous build work? https://www.androidfilehost.com/?fid=745425885120742869
[Xperia Z5 Android Development] Antho02:
and that's only today i notice xposed is now nougat compatible ... :/

time to browse the thread to find the last version of the tool :) wish it was possible to edit the 1st post
[Xperia Z5 Android Development] Klaus N.:
Yes, this TWRP 3.1.1-0 (your build) is already on my device, and it works like a charm :good:

But it has no option to format to f2fs...

Thanks in advance!
[Xperia Z5 Android Development] juanpirulo:
hi [MENTION=4675598]shoey63[/MENTION] can you give me the steps to flash dk.ftf with xflasher?. I dont know if i did it well. steps i did

extract xflasher and copy dk.ftf into the xflasher folder

run xflasher

put on flashmode my xz

flash xflasher.bat

its that ok?.

cheers

edit I see i need an specific command to create the xflaher. bat but no idea how to do it. Can you help me with the steps?
[Xperia Z5 Android Development] shoey63:
You need to extract DK.ta from DK.ftf and flash that.

So put dk.ta in the same folder as xflasher, run xflasher, connect in flash mode, then run the created xflasher.bat
[Xperia Z5 Android Development] othmane.os:
Hi Bro thanks for this hint ,it was better than flash tool compatibility issue ,

I've did all the steps correctly but got some problem , still not able to restore that TA ,

this days I tried it so many times to solve this problem but still no change , I did compare my log with yours.

then notice that it said :writing TA Successfully but when it went Verifying crc32 then it report that nothing has been written

Log flasher : https://pastebin.com/24zsrEy0

I didn't understand what that error means code 997

does anyone have any idea??

thanks in advance
[Xperia Z5 Android Development] juanpirulo:
thanks that work. Now i have fido keys as provisioned, it was the only thing that i couldnt get only with drm fix, now everything is as should be, thank you very much. cheers.
[Xperia Z5 Android Development] dr4go:
The same goes for 15.2, no need to try it. ;o)
[Xperia Z5 Android Development] shoey63:
M4 aqua is a mediatek device, and they are problematic with this tool. (search this thread for "mediatek")

Also, dk.ftf only restores fido keys. For the rest, you need to patch the kernel.elf, but I doubt you will succeed.
[Xperia Z5 Android Development] othmane.os:
m4 aqua have a qualcomm sd615 chipset , but the problem here is with writing TA partitions , those fido keys is the only things I need , I already tried with poc but encounter a problem with none on security tab

rootkernel also doesn't apply any drm fix only asked about twrp and busybox , so I think that script isn't compatible with my device & already tried to edit it but has nothing changed
[Xperia Z5 Android Development] shoey63:
Try older versions of rootkernel. 5.23 is optimised for Nougat. And post your Xflasher log in that thread so the author can help with debugging.
[Xperia Z5 Android Development] othmane.os:
OK THANKS FOR HELP , I will try it and report back to munjeni thread:good:
[Xperia Z5 Android Development] YasuHamed:
could you please send me your kernel.sin file, i would like to compile one for u

if possible
[Xperia Z5 Android Development] mind.inc:
Is it possible to add my own twrp file to the whole process? because the implemented twrp's resolution is weird on my scorpion_windy.
[Xperia Z5 Android Development] Al.Mamari:
New oreo rom based on nougat

can anyone help us to download this rom

for xperia z5 and z5 dual

it is stock rom with XZ1 fetures

http://bbs.gfan.com/android-9184891-1-1.html

please someone uplode this rom to Gdrive and give us the link to download it:fingers-crossed:
[Xperia Z5 Android Development] deboopi2:
I think I almost know what to do but there's one line I have a problem with

Run rootkernel script with Oreo stock kernel.elf (eg.: rootkernel kernel.elf boot.img)

I do not know where to find kernel.elf, I haven't seen it in rootkernel_v5.23_Windows_Linux_UNOFFICIAL_2_OREO.zip, so where can I get it from?
[Xperia Z5 Android Development] juanpirulo:
Yo have to stract kernel.elf from inside the ftf firmware. Just download the firmware for your device wiht xperifirm and open with 7zip then you Will see the files inside the ftf. Cheers

Enviado desde mi F8331 mediante Tapatalk
[Xperia Z5 Android Development] deboopi2:
Well, I have renamed the ftf to zip and opened it. I can find a kernel.sin but no kernel.elf.

Should I extract the kernel.sin and rename it to kernel.elf or should I do something else?

regards
[Xperia Z5 Android Development] dr4go:
Nope, use FlashTool to extract kernel.elf from kernel.sin file.
[Xperia Z5 Android Development] juanpirulo:
Also you can use sin conversor to change format . Anyway i dont know if this tool also works with elf format. Just try.

Enviado desde mi F8331 mediante Tapatalk
[Xperia Z5 Android Development] deboopi2:
Flashed my phone with oreo

booted (to get access with adb)

extracted 3 files with adb

copied files to the rootkernel directory

ran the command rootkernel kernel.elf boot.img, pushed 3 or 4 times Y and then got the message

WARNING >> Could not find file: fstab.qcom

ERROR >>>> Script cannot continue!!

The fstab.qcom does exist and it is 2751 bytes.

So how to solve this?
[Xperia Z5 Android Development] juanpirulo:
Have you copy the files to the rootkernel folder or rootkernel/filesystem. The error says can not find fstab and is because they are not in the right folder. Cheers

Enviado desde mi F8331 mediante Tapatalk
[Xperia Z5 Android Development] deboopi2:
holy cow,

indeed I put them in the wrong folder.

Thanks a lot
[Xperia Z5 Android Development] othmane.os:
soorry for my late I was offline this week , here's the kernel.sin : https://mega.nz/#!UNsHlIDA!vjQyZ6qDNLZeN4Mc8S2u5Nq6MwEfhRfraP7cqj2NBdU

thanks in advance Bro:good:
[Xperia Z5 Android Development] YasuHamed:
Bro

i have tried the earlier script along with the one seraj created however even though m4aqua is qcom 615, the script only patches twrp. which means if you flash it, you will have bootloops! since its not switching off dm varity

i am sorry the this script works best for z5/z4/ x/ xpro/xz and their varients.
[Xperia Z5 Android Development] shoey63:
See how you go with this https://www.androidfilehost.com/?fid=745849072291699159
[Xperia Z5 Android Development] othmane.os:
thanks bro & appreciate your efforts , I've got the same script as you with rootkernel even though it's not switching off the Dm verity , the device boot properly , I'm using ta poc it's working well except the security tab that is empty no keys there but after severals reboot got those keys back and working well , and if I restart the device again it returns to empty state again

anyway I think poc worked for me and most important it says unlock allowed and the device is already unlocked so that prove that poc is working well
[Xperia Z5 Android Development] Klaus N.:
Unfortunately it doesn't work. Neither via adb nor with fastboot. It always tells that the file is to big... Do you need a dmesg.log?

Thanks for your efforts :good:
[Xperia Z5 Android Development] YasuHamed:
what about kernels on this post ?

https://xdaforums.com/m4-aqua/general/root-twrp-sony-xperia-m4-aqua-t3503369

if they have drm fix,

should it matter for if or not actual POC is reinstated or not ?
[Xperia Z5 Android Development] asiaon123:
Incorrect storage size

I packaged a kernel as the instruction, it get 30G storage but actually is 64G, my device is X Performance, was anything wrong?
[Xperia Z5 Android Development] Klaus N.:
Edit: Btw, installed it for testing to boot partition. There it's possible to flash and enter TWRP, and I can confirm, f2fs is present in the Wipe section...
[Xperia Z5 Android Development] shoey63:
OK, so no German language for you - just English (and yours is very good)

Try this one https://www.androidfilehost.com/?fid=673791459329071795
[Xperia Z5 Android Development] Klaus N.:
Thanks alot for the kind words ? :)

...and for your support, ofc :good:

I'll give it a try right after work!
[Xperia Z5 Android Development] othmane.os:
this one had no drm fix , and shows script with no dm-verity fix

I tried reinstall poc many times , I also did logcat when the keys is working properly and a logcat when they are not

I'll see how to fix this But I think that Poc is working partially well

Thanks Bro for your help:good:
[Xperia Z5 Android Development] Klaus N.:
Well, that one works like a charm - I haven't recognized any issue :good:

Thank you very much :highfive:
[Xperia Z5 Android Development] mbc07:
Perform a factory reset or use the resize option in TWRP to fix that. Also happened once on my Xperia X...
[Xperia Z5 Android Development] YasuHamed:
DETAILED ANSWER

https://xdaforums.com/showpost.php?p=74573987&postcount=121

in short

after flashing the rom

- REBOOT device, signed into google! etc

after flashing modified kernel

- REBOOT again

shutdown device and flash twrp

- now boot in to twrp and flash your zips!

it will be ok!
[Xperia Z5 Android Development] asiaon123:
Tks,I will try it later
[Xperia Z5 Android Development] Medeon:
I have extracted the firmware ftf file (from my Sony Xperia M5) with Winrar. There's no kernel.sin file but there is a fotakernel.sin file. Is it similar a.i. can I use this file to create the (fota)kernel.elf file?
[Xperia Z5 Android Development] Berni-0815:
In the ftf files of my device (z5c) it's not the same... There are both files (kernel.sin and fotakernel.sin)
[Xperia Z5 Android Development] karrouma:
[MENTION=357342]tobias.waldvogel[/MENTION]

It works with xz premium???

Did you try it??

I know different drmfix but i have it for xzp

Thank you
[Xperia Z5 Android Development] mbc07:
On Xperias with Mediatek SoCs you should use boot.sin instead. But, it won't work with this tool as it can't recognize the Mediatek-specific header that the kernel has...
[Xperia Z5 Android Development] Medeon:
Extracting device key with Root Kernel

Sorry I realised I already have downloaded the kernel with a DRM fix from this thread. It seems I only need to extract my TA.img device key, that I backed up earlier, with the Root Kernel tool. I'm a little confused about that, help me out please. I have downloaded the Root Kernel tool and unzipped the files in my adb folder because I thought it would be most likely the correct location for it. Should I run the command Promp from here and flash my device key?
[Xperia Z5 Android Development] deboopi2:
I've seen Magisk version 15.3 is out, does it work with this version?

I know it didn't work upto version 15.2.

regards
[Xperia Z5 Android Development] serajr:
Rootkernel V5.23 (UNOFFICIAL 2.1) - OREO - Xperia X Performance, XZ and XZs

What's new:

- munjeni's TA PoC option (this option DOES work with Magisk v15.3+). Only for those who still have backup of the device's TA partition (aka TA.img)!

>> Enjoy it! <<

(please, read instructions before proceeding and patching your STOCK kernel)
[Xperia Z5 Android Development] xxera:
I want to update my Z5C to 32.4.A.54 and I'm a bit confused. Can I still use the files from the first post?

Some users asked for a new version of twrp, are there any problems with using the 3.0.2 version integrated into rootkernel? If yes, where can I find the latest compatible twrp?

It seems xposed can't be integrated anymore. Can I just install it via twrp or the installer app later?

Is there anything I missed?

Thanks!
[Xperia Z5 Android Development] bruno$0:
great news!
[Xperia Z5 Android Development] mind.inc:
Is there a way to pack my own twrp.img to the process?
[Xperia Z5 Android Development] bruno$0:
I follow the tutorial for 2.1 version but I can restore the drm functions. Boob error, no kido keys.

Flash Oreo ftf, twrp, and dk.ftf.

I flash a kernel with Y for fix drm and flash zip system Mode.

Keeps error. I missed something?
[Xperia Z5 Android Development] bruno$0:
My currently stats...
[Xperia Z5 Android Development] kientrongtran:
This error happened when I tried the tool (13/1 version), I got kernel.sin (~20mb) from ftf file (latest XZ firmware F8332_41.3.A.2.58 with January security update) using winrar then extracted data in flashtool to a kernel.elf (ballooned to 36.4mb). the three files pulled from adb has also been put inside the system files folder :confused:

Rootkernel V5.23 (UNOFFICIAL 2.1)

- Unpacking kernel

error: Android boot magic not found

Unknown boot image format

Aborting

Update: nevermind, i realised that i need to close flashtool before running the script. thanks for the wonderful tool!
[Xperia Z5 Android Development] korom42:
Great new ,thank you so much for your work .. I can confirm that ta_poc is working !!

I just wonder if there is any way to get rid of the boot warning now ?
[Xperia Z5 Android Development] Paiji:
Hello everybody.

Ok I rooted my z5 E6653 and it’s working great with build 32.4.A.1.54. (last in xperifirm)

But now I would like to use magisk instead of phh superuser (because of safetynet of course)

First, is there someone can tell me what version of magisk can work with my build ?

And then could you confirm or correct my process ?

1-uninstall supersuser

2-flash unmodified boot.img

3-Flash twrp (I think it will be uninstalled by flashing the stock boot/kernel, right ?)

4-flash magisk with twrp

5-flash modified kernel (before or after magisk ?):

6-Reflash DK.tft ???

Options for rootkernel:

---Sony RIC - disable

---dm-verity - disable

---Install TWRP recovery - no

---Install busybox? - no

---Found superuser.zip. Install? - no

---# Make su permissive – yes or no ???

---Install DRM fix - yes

Do I have to do a full wipe after the flash of the unmodified kernel (boot.img) ?

Thanks and have a nice day and a happy new year ?

And thanks Tobias for your work ?.
[Xperia Z5 Android Development] bruno$0:
I personality prefer tô flash all stock fw then:

Flash twrp, modded kernel, dk, drm fix, magisk and you should be able ok.
[Xperia Z5 Android Development] Paiji:
Hello bruno$0.

As i thought it's better to do a full wipe by flashing the stock firmware.

I'm gonna try but before a question remains :

Which version of magisk work with 32.4.A.1.54 ?

If someone knows, please could you tell me otherwise i will have to test all versions and it makes me sad :crying: :D

However Thanks Bruno.
[Xperia Z5 Android Development] DuskGolem:
Hello [MENTION=7291000]Paiji[/MENTION], i am using Xperia Z5 Premium myself with firmware 32.4.A.1.54 and i am using latest magisk beta v15.3 without any problem. Actually I never had any problem with any magisk version on any official build of my phone so freely use any magisk version since the v15 series of magisk is also backwards compatible with older module templates:););)

Note: For magisk just use DrmFix and DK.ftf (if you have your TA backup), don't use TA POC since it doesn't seem to work with 32.4.A.1.54, not for me atleast
[Xperia Z5 Android Development] bruno$0:
Seams that 15.3+ dosen't works with drm fix. I have errors on security test
[Xperia Z5 Android Development] DuskGolem:
You might be using oreo
[Xperia Z5 Android Development] Paiji:
Ok i'm gonna try this

1-Flash stock firmware 32.4.A.1.54

2-Flash twrp

3-flash magisk 15.3 with twrp

4-flash modified kernel (after magisk, that's what topjohnwu say in his official thread)

5-Flash DK.tft

Options for rootkernel:

---Sony RIC - no

---dm-verity - no

---Install TWRP recovery - no

---Install busybox? - no

---Found superuser.zip. Install? - no

---# Make su permissive – no ???

---Install DRM fix - yes

Thanks all of you.