yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] Hamidreza2010:
I tried with SlimX REBORN and RXSW Moonbreakers Edition and Moonwalker Amaluna.also with my custom rom ( just deodex and removed extra app and included repack kernel with all option except busybox )

but all of them has same result

would you please try later this process ?

i mean repack kernel with supersu and all other thing ( xposed , drm fix and .... except busybox )

then replace with kernel in rom.zip and flash it

then see what happen

special thanks for your guidance :highfive:
[Xperia Z5 Android Development] goRt:
I've got the latest 5.11 working with a similar change as that for .305
[Xperia Z5 Android Development] slayerz:
This might help someone:

The drmfix conflicts with my VPN app (VPNUnlimited) - it prevents it from running. So I prepared another kernel without this fix and flashed the conventional drmrestore.zip and could run the app.
[Xperia Z5 Android Development] Klaus N.:
I don't know, but it could be, that there's problems, if you include the - with xposed framework - repacked kernel into the rom.zip. Why don't you just flash the rom.zip and fastboot flash your repacked boot.img right after? I can confirm, with Wolfbreak's RXSW 1.7.0 this way it works like a charm. But take care: This rom is based on 253 fw - so take the appropriate stock kernel to repack!
[Xperia Z5 Android Development] Hamidreza2010:
:confused:

You mean i put repack kernel with xposed into rom.zip and flash rom , then exactly after flash rom , turn off phone and flash same kernel ( which include in rom.zip ) via fastboot yes?
[Xperia Z5 Android Development] Klaus N.:
No, just flash the rom as it is, then power off, flash your repacked boot.img and reboot into system.
[Xperia Z5 Android Development] lexxm6:
Hello!

Is it works last root kernel with 5.11 boot.img?
[Xperia Z5 Android Development] Ryuu.:
Forgive for very noob question because i didn't see any in the first post. Is this work with .305 firmware?
[Xperia Z5 Android Development] Hamidreza2010:
yes i know bro

but i want to put kernel in rom.zip

not flash separately
[Xperia Z5 Android Development] goRt:
mmm
[Xperia Z5 Android Development] dodo1515:
Hello,anyone has been able to patch correctly kernel in firmware 32.2.A.5.11??

l'm getting this (Skipping TWRP recovery. No kernel modules for 3.10.84-perf-g0802f10 available)?

Any help plz?
[Xperia Z5 Android Development] DeathStroke:
Try this http://xdaforums.com/showthread.php?p=69869590

I haven't yet updated my device, waiting for existenZ rom v 2.0, but you can try from above link.

Sent from my E6683
[Xperia Z5 Android Development] lexxm6:
Thanks!

It's working!
[Xperia Z5 Android Development] Klaus N.:
You could try it by exchange the kernel inside the rom.zip with a repacked boot.img (except xposed, for testing). If it works that way, and with a repacked boot.img containing xposed not, then you've got the answer ;)

Btw., I didn't find a custom rom with a boot.img you try to generate (but maybe I'm blind :D)...
[Xperia Z5 Android Development] YwaFTW:
Yes it does.
[Xperia Z5 Android Development] Hamidreza2010:
I test it on both way ( flash separate and inside in rom ) but both of them are same and make lag phone ( repack kernel with xposed )

but without that everything was ok.i dont know where is make problem.rom or tobais tool ? :confused:

i,m tired and i think i should Dissuade it
[Xperia Z5 Android Development] Hamidreza2010:
:D:D:D:D

Finally i found problem :good:

just xinstaller.apk module make phone laggy

i disable one by one my modules and restart device and understand this module make problem ;)

thanks for your before helps
[Xperia Z5 Android Development] Hamidreza2010:
is it true?
[Xperia Z5 Android Development] shanpao:
How to extract modules in the kernel？
[Xperia Z5 Android Development] Hamidreza2010:
i didnt extract it
[Xperia Z5 Android Development] shanpao:
Copy the latest kernel module all the content, where to copy?
[Xperia Z5 Android Development] DeathStroke:
You can go to setting > about phone and check the kernel name from there and copy the module from latest last folder to the a new folder with new kernel name.

That particular code is there in about phon under kernel particular.

No need to worry.

Sent from my E6683
[Xperia Z5 Android Development] fluffi444:
Thanks you very much for this great tool! First tests with Z3C were successful!

Is there any informartion at which position this DK.ftf will be flashed to?

Or is there a way to revert this flash by flashing one of my previous backuped partitions?

Or is it also in TA?

EDIT

Looks like its TA :) - Thanks to master [MENTION=3989065]serajr[/MENTION] for his nice conclusion (in Dirtycow-based TA Backup thread)

http://xdaforums.com/showpost.php?p=69993876&postcount=86
[Xperia Z5 Android Development] mhaha:
He's talking about the files within the OP's tool. Using V5.0 as an example, navigate to the folder rootkernel_v5.0_Windows_Linux\Android\twrp_common_kmodules

There should be 4 folders in there:

The last folder 3.10.84-perf-gf1cfa5f has a last modified date of 2016/7/13, that's the "latest" kernel module we're talking about. Make a duplicate of that folder, and rename the folder to 3.10.84-perf-ge3d2b1c-05062-g5276cd7

Run the script as usual, it should now work.
[Xperia Z5 Android Development] shanpao:
http://xdaforums.com/showpost.php?p=69059940&postcount=1287This tool which has the latest module, I tried to be successful

---------- Post added at 10:17 AM ---------- Previous post was at 09:38 AM ----------

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-g0802f10

Found appended DTB

- Detected vendor: somc (Sony), device: suzuran (Xperia Z5 compact), variant: ro

w

- Unpacking initramfs

- Detected platform: 64-bit

- Detected Android version: 6.0.1 (sdk 23)

- 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

- Found SuperSU.zip. Install? [Y/n] Y

Stripping SuperSU app

Adding service entry for SuperSU

- Install DRM fix? [Y/n] Y

- Install busybox? [Y/n]
[Xperia Z5 Android Development] DavideSony:
Hi guys, could this kernel work on z3 compact with an already installed concept rom? If it's possible, can you explain me the steps to install this kernel with no errors? Thanks a lot
[Xperia Z5 Android Development] DannyWilde:
So i got a big problem. I unlocked my X compact and if i reboot i got message to enter passwort in order to start android. what can i have no idea, which password could be meant.

Does anyone know what to do?
[Xperia Z5 Android Development] chawlasrijan:
Relock, unlock again with Sony's official guide.

Don't use flashtool to unlock.
[Xperia Z5 Android Development] DannyWilde:
i didn't know that using flashtool doesn't work. I did it cause user data is not wiped in that case. unlocking via fastboot will wipe everything, right?

i unlocked z3 compact via flashtool, there was no problem.
[Xperia Z5 Android Development] Klaus N.:
It's the same code you gave alternatively to your fingerprint ;)
[Xperia Z5 Android Development] DannyWilde:
i got fingerprint not active. i got no code to unlock my display. i only wipe to unlock.

i tried code from SIM card und Google password, but i did not work.
[Xperia Z5 Android Development] Klaus N.:
I'd suggest to boot into system, give it a alphanumeric code instead of "swipe to unlock", then try again to enter twrp with the code you've fixed before.
[Xperia Z5 Android Development] DannyWilde:
I will try tomorrow
[Xperia Z5 Android Development] MitoTakatori:
Already solved. Thanks!
[Xperia Z5 Android Development] DannyWilde:
I tried this morning, did not work.

Did you unlock via flashtool or fastboot?
[Xperia Z5 Android Development] shoey63:
Happened on my X as well. As soon as you unlock the bootloader, encryption is forced and a factory reset is the only way out. Obviously a security measure.
[Xperia Z5 Android Development] DannyWilde:
Okay, so the only way to unlock is via fastboot, right?
[Xperia Z5 Android Development] shoey63:
Fastboot, flashtool, makes no difference on X series. Result is always the same.
[Xperia Z5 Android Development] DannyWilde:
Does unlocking via fastboot not factory reset automatically? I unlocked my z5 compact via fastboot and everything was wiped.
[Xperia Z5 Android Development] shoey63:
Unlocking with fastboot ALWAYS forces a factory reset. Just with X series, encryption is enabled as well, hence the message for the password when you reboot.

Edit: But you have already unlocked, right?

Edit 2: If you think relocking and trying to unlock with another method will solve the problem you are mistaken. Your data is gone unfortunately.
[Xperia Z5 Android Development] DannyWilde:
Yes, I relocked again. I did it cause I didn't know what to do. So if I unlock again via fastboot my problem is solved? I know that all data is lost then.
[Xperia Z5 Android Development] shoey63:
I sincerely hope you used This tool to backup your TA partition before unlocking your X compact, otherwise you have lost your DRM keys as well. Anyway, just flash a full ftf with flashtool to get your device working again.

Also, your problem is beyond the scope of this thread. Let's not spam the board any further.
[Xperia Z5 Android Development] DannyWilde:
Okay, thanks a lot!
[Xperia Z5 Android Development] kanikorhanveli:
sudo bash rootkernel.sh kernel.elf bootimg

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-g19d6d92

Found appended DTB

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

- Unpacking initramfs

- Detected platform: 64-bit

- Detected Android version: 6.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

- Found SuperSU-v2.78-20160905010000.zip. Install? [Y/n] y

Stripping SuperSU app

Adding service entry for SuperSU

- Install DRM fix? [Y/n] y

- Install busybox? [Y/n] y

- Creating new initramfs

- Creating boot image

error: could not create 'bootimg'

- Cleaning up

Done

Why i cant achieve that :rolleyes:. I checked every permissions but still same. Can someone help me please? I am on linux btw
[Xperia Z5 Android Development] mele80:
sudo bash rootkernel.sh kernel.elf boot.img

boot.img instead bootimg
[Xperia Z5 Android Development] kanikorhanveli:
thank you very much :D
[Xperia Z5 Android Development] alex.do:
Maybe off-topic but i was using this method to have a custom kernel of Nougat (for my XZ F8332 39.2.A.0.327) however it just stops at

- DRM fix is unsuppported/untested for model kagura. Install anyway? [y/N] Y

without any further details. Probably because this script doesnt support Nougat, yet?
[Xperia Z5 Android Development] Nakebod:
At first I got the message: - Skipping TWRP recovery. No kernel modules for 3.10.84-perf-g0802f10 available

After a small search the solution seems to be easy

So I copied 3.10.84-perf-gf1cfa5f (Those files had the most recent date) to a new folder 3.10.84-perf-g0802f10

When I ran the rootkernel command, with TWRP, SuperSU and busybox options enabled, I could boot (Without flashing) fine, but I didn't have root / SU binaries.

Flashed the boot image, not sure if that matters anyway, but that didn't help.

Booted to TWRP, and tried flashing SU. That didn't work either as I already expected. TWRP said that it was already patched.

So I ran the rootkernel command again, except now skipping TWRP, SuperSU and busybox.

First booted the new boot image, and that did work. Of course still no root because I didn't flash SuperSU yet.

Since it booted fine, I decided to flash the boot image. Next I booted into TWRP, flashed SuperSU, reboot my phone, and I got root back.

Not sure what initially went wrong.
[Xperia Z5 Android Development] mhaha:
Of course it matters, that's literally how you get root, it's why you're patching the boot.img file, aka the modified kernel. How in the world are you supposed to get root without flashing it? :confused:

The procedure isn't that complicated. Put the SuperSU zip file (and xposed framework zip file too if you want it, not sure why you wouldn't if you're rooting) into the same folder as the patch, run patch, select Y for all options, flash boot.img file to phone, boot and you have root. There's no need to boot into recovery and flash anything else.
[Xperia Z5 Android Development] Berni-0815:
Wow! I know that I can install SuperSu this way but that I can install XPosed too is new for me! Thanks a lot!! :good:

---------- Post added at 05:12 PM ---------- Previous post was at 04:57 PM ----------

Hmmmm, something's going wrong this way. My (two) XPosed modules are working but the framework itself says that it's not working... :confused:
[Xperia Z5 Android Development] Klaus N.:
What Xposed installer apk have you installed? If it's th official one, so deinstall it, reboot, and after that install this one instead: http://xdaforums.com/xposed/material-design-xposed-installer-t3137758. After installing, open the app, restart device (via the 3 dots in the right upper corner) and grant su rights, of course. Done; all should work as it should ;)

---------- Post added at 22:44 ---------- Previous post was at 22:43 ----------

What Xposed installer apk have you installed? I guess, it's th official one, so deinstall it, reboot, and after that install this one instead: http://xdaforums.com/xposed/material-design-xposed-installer-t3137758. After installing, open the app, restart device (via the 3 dots in the right upper corner) and grant su rights, of course. Done; all should work as it should ;)
[Xperia Z5 Android Development] waleedsq81:
is it tool support XZ?
[Xperia Z5 Android Development] Berni-0815:
Ja. ;)

I'll try it... Tnx!

---------- Post added 17th December 2016 at 12:20 AM ---------- Previous post was 16th December 2016 at 11:45 PM ----------

Yeah! Works great! The xposed zip is included into the kernel image and the apk is installed manually. :good:
[Xperia Z5 Android Development] Klaus N.:
I would say, restricted support of XZ under Android 6.0.1 (TWRP has to be installed separately, and mounting or unmounting /system via recovery isn't possible). Afaik, it doesn't work with Android 7.0.1 atm. But I couldn't test it until now, because I'll stay on MM, until Xposed supports Nougat.
[Xperia Z5 Android Development] mhaha:
Solution is already supplied by Klaus, reason it's funky is because v5.0 of the patch supports and by default installs xposed using systemless method, but the official xposed installer doesn't support systemless (yet). Interestingly, the unofficial material design version does, that's why the solution is to use the unofficial installer.
[Xperia Z5 Android Development] darwusch:
Will this tool be updated to support the Xperia XA Ultra (F3211), Android 6.0.1?
[Xperia Z5 Android Development] dermaze:
Same goes for me (no root / SuperSu working when booted up) when trying to patch the 3.10.84-perf-g0802f10 (it's from E5823_32.2.A.5.11_1298-1220_R2C.ftf, localized to Germany).

With one exception, though: I simply flashed the 2.79 SuperSu.zip from here with the "broken" kernel, TWRP did not complain, everything is fine for now.

But of course I would appreciate it, if this tool was updated to the latest kernel version. :)
[Xperia Z5 Android Development] Lefteris Fragiadakis (Frago):
Always freeze when trying to include drm keys in xperia xz nougat kernel, why? Any other way?
[Xperia Z5 Android Development] shoey63:
N isn't supported and dev is on an extended (permanent)? break. Need to wait for someone to work it out.
[Xperia Z5 Android Development] VJSXZ:
If you managed to backup for TA partition before then you can reactivate your original device key as follows:

flash_dk <ta backup image> DK.ftf

Flashing this file with flashtool will write your device key to an alternative unit, from where the drmfix library will pick it up.

This is a one-time task. It will survive a complete reset of the phone or Android system upgrade. The device key has a length of just 16 bytes, so it is correct that the resulting DK.ftf has a size of only aprox. 500 bytes.

my DK.ftf was just 1KB ..

flashtool doesnt spot the DK.ftf ..

how to flash it on flashtool 0.9.22 ??
[Xperia Z5 Android Development] YoLO13:
Extracting DRM Keys from Backup

Hi there!

I just wanted to say thank you for creating this tool, for it really does help people like me to unlock their BL and still keep all Sony 'things' intact!

I just have one major issue though:

Currently, my BL is still locked and I haven't unlocked it yet. I've taken THREE different TA Backups using this too:

>> http://xdaforums.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236 << (v2 only)

And I've attempted to extract the DRM Keys out of all of them.

Obv, you only need one DRM key but since the program kept failing with one of the backups, I thought maybe the backup was corrupt.

The device I'm using is the Xperia XZ.

I've read and searched for a solution, and someone posted that 'you should use: v 4.22' I think? But having a look at the ones available to download right now, I couldn't find this specific one, but instead tried all the other three:

v5.0, v4.51 & v4.31

Unfortunately, they keep returning the same issue:

C:\Users\M\Downloads\rootkernel_v4.31_Windows_Linux>flash_dk TA_F8331_CB512C6MV1_24122016-1338 DK.ftf
- Extracting device key
error: Can't open file TA_F8331_CB512C6MV1_24122016-1338

Could not find device key in TA_F8331_CB512C6MV1_24122016-1338 (Unit 0x1046B)

C:\Users\M\Downloads\rootkernel_v4.31_Windows_Linux>

This is using the THIRD backup btw, so I really don't know where I'm going wrong?

I don't want to unlock my phone until I have the DRM keys extracted, since this is my first Sony phone in a LONG time (since W995 =D) and I don't want to waste my parents money (sorry if you think Im over exaggerating!)

Could someone help me please?

This sh*t was never this complicated when rooting a SGS3 xD but then again, that phone is just a waste... but I digress!

Thank you for your time!
[Xperia Z5 Android Development] shoey63:
Add .img extension to the backup name and try again.

Edit: Allow showing of system file extensions in Windows.
[Xperia Z5 Android Development] YoLO13:
Ahh f**k... You're legit a legend mate!

Thank you for your help and I seem so stupid for not even realising that!

Sorry about that and thank you so much for your help!

Merry Christmas Guys btw!! =D
[Xperia Z5 Android Development] YoLO13:
DRM Installation

I'm sorry to those who think I'm spamming this thread - I really am not!

So far, with my Xperia XZ, I've managed to backup my TA and extract the DRM Keys; Unlock the bootloader (it presents a really annoying warning sign... Wish I knew how to code so I could remove that); Attempted to restore the DRM keys but have no idea if it worked...

So - I've looked online and seen that under 'Security' via *#*#7378423#*#*, it SHOULD say --> [Key Active][OK]

Or something similar but I found that written for the Xperia Z2....

Now, I've tried to flash the DK.ftf via Flashtools but it really doesn't indicate whether it's succeeded or not, and everytime I power on the phone, and gone to Display via Settings, changing the option between Standard and X-Reality modes presents NO CHANGES whatsoever to the image above the settings. Now, I'm guessing that the keys haven't been restored at all... How can I be definite that the keys either HAVE or HAVE NOT installed themselves back onto the phone?

I have some questions about this - is it because I'm running Nougat that the keys refuse to install? Do I need to install the patched >> boot.img << with verity AND RIC off in order to install the DRM keys? (Please tell me if I need both disabled or just verity? Please?) And how exactly do I flash the DK.ftf via flashtools or any other method?

I get that via Flashtools, the .ftf needs to be under the firmware folder, then locate Device Keys/1.0 in the program and flash that... Does any box need to be ticked (just for the record, I haven't ticked any box because I thought it meant exclude OR wipe the checked box respectively, but then again I have no idea?)

Btw, if possible, could someone point me to where I can find the 39.0.A.1.250 ftf for Customized UK is please? I'm using the 3 UK version since that's the only MM one still available from the UK and the logo is pissing me off!

If anyone could help me in ANY shape or form or literally anything, I really would appreciate that! Currently, my phone prompts for an encryption key since I installed the 3 UK .ftf and since wiping it, (thought it was like my SGS3) it's also wiped the whole OS so my phone is currently 'empty' till it fully charges once again...

Seriously guys, thank you ever so much for all your help! I CAN HELP YOU GUYS BACK IN ONE WAY OR ANOTHER! =D

===========================================================================

Update: Right so having installed the 3 UK MM f

.ftf, it prompts for a password - I remember reading this elsewhere before but could someone plesae tell me how I could go about removing encryption?

I've used TWRP to remove DATA - it says encryption will be gone, but upon rebooting into the system, the phone hangs on the 'SONY' logo... This really is confusing me now as to what I need to do to enter the system???

I've just installed EMMA to see if I can get into the system this way now...

I've attached the log from Flashtools showing when I flashed the DK.ftf...

It doesn't appear to have installed when checking the phone? What do I do??
[Xperia Z5 Android Development] kukuh05:
how can you relocked ur bootloader again?
[Xperia Z5 Android Development] shoey63:
[MENTION=245148]YoL013[/MENTION] Your DK.ftf was successfully flashed.

To get DRM functionality, you need to create a boot.img using this tool with DRM fix integrated.

Flashing DK.ftf alone is not enough.
[Xperia Z5 Android Development] DannyWilde:
You can restore TA, that will relock your bootloader.

You also can use flashtool to relock.
[Xperia Z5 Android Development] Dilesh Perera:
hi

while running the script i get this in the log

This adbd requires authentication. Add your public key?

i did enter N

C:\Users\dilesh.STNAV\Desktop\test\rootkernel_v5.0_Windows_Linux>rootkernel kernel.img boot.img

- Unpacking kernel

Found android boot image

unlzop: header_error 16

Kernel version:

- Detected vendor: somc (Sony), device: sirius (Xperia Z2), variant: row

- Unpacking initramfs

- Detected platform: 32-bit

- Detected Android version: 6.0.1 (sdk 23)

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

- Install TWRP recovery? [Y/n] Y

Updating TWRP

- This adbd requires authentication. Add your public key? [Y/n] N

Compressing TWRP image

- Install DRM fix? [Y/n] Y

- Install busybox? [Y/n] Y

- Creating new initramfs

- Creating boot image

- Cleaning up

Done

have i done everything okay ?
[Xperia Z5 Android Development] Klaus N.:
You have to disable Sony RIC.
[Xperia Z5 Android Development] Dilesh Perera:
hi

but what if i want not to disable RIC ? and which option is correct ? Add your public key? yes or No ?

and do u have any idea what unlzop: header_error 16 in the first few lines of the log :)

thanks

EDIT- and i just tested while RIC disable - Y

Same shows in the log

Kernel version:

- Detected vendor: somc (Sony), device: sirius (Xperia Z2), variant: row

- Unpacking initramfs

- Detected platform: 32-bit

- Detected Android version: 6.0.1 (sdk 23)

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

Disabling Sony RIC

- Install TWRP recovery? [Y/n] Y

Updating TWRP

- This adbd requires authentication. Add your public key? [Y/n]