yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] DeathStroke:
Can someone patch this kernel, I tried with many different ways but my system don't boot after flashing it with flashtool fastboot mode.

I patched it with copying twrp file so that it can be integrated with kernel, but all these tricks didn't work. Now my bootloader is unlocked still it's not booting on patched kernel.

Please help me on this.

https://drive.google.com/file/d/0Bx-hqcqceKBbUzhBNGt1cXB5YUE/view?usp=sharing

This kernel is from E6683 MM .305 firmware.
[Xperia Z5 Android Development] riedenthied:
What exactly are you doing? V5 works perfectly with the little mod posted earlier in this thread. Only a folder has to be renamed, simple as that.
[Xperia Z5 Android Development] Srtk9599:
Xposed Framework for xperia z5 e6683

i want to flash stable xposed framework for xperia e6683 . how to do it ??
[Xperia Z5 Android Development] denk_mal:
Using rootkernel doesn't work on my Z4 Tablet and while TWRP even not work with the original kernel I have used the old standard fashion way;

Install the .ftf with FlashTool, install Androplus V40 and TWRP as described on the androplus site.

Afterward I have installed SuperSU.zip and drmverify.zip from TWRP.
[Xperia Z5 Android Development] Klaus N.:
What stuff should be included?
[Xperia Z5 Android Development] DeathStroke:
I already tried with many combination from here and there, its not working at all.

thanks btw.
[Xperia Z5 Android Development] nabeelrazanaqvi:
Anyone able to root 305 and Xposed working
[Xperia Z5 Android Development] riedenthied:
Sure, works perfectly.
[Xperia Z5 Android Development] nabeelrazanaqvi:
I have rooted and when I flash Xposed my phone bootloops E6633
[Xperia Z5 Android Development] riedenthied:
Copy the Xposed zip into the script's folder and let the script add it to the boot image. There is no need to flash it separately.
[Xperia Z5 Android Development] risk_06:
thanks for answer, juste i dont have drmverify.zip, i don't know what can i do for get it .
[Xperia Z5 Android Development] wd121366:
I used the rootkrnel4.5 and androplus 40,305.

I have try use the rootkernrl5.0,it doern't work,i can't touch screen.
[Xperia Z5 Android Development] mele80:
Too hot? Can't touch this taadadadaandaan can't touch this ohohohoohooh.
[Xperia Z5 Android Development] Klaus N.:
I've made a boot.img for your E6683-device, 305 MM firmware, (with the kernel.sin you've provided), incl.: dm-verity off, Sony RIC off, SuperSU (v2.78 SR1), Xposed (v86-sdk23-arm64), DRM fix and busybox. Here you go: https://www.dropbox.com/s/gmxu48u7zazfz96/boot.img?dl=0
[Xperia Z5 Android Development] nabeelrazanaqvi:
I have done it but it boot loops my phone
[Xperia Z5 Android Development] wd121366:
no no no, What I mean is that Touch screen no response. I am weak at English.
[Xperia Z5 Android Development] mele80:
Yes i know, im sorry i was just joking.
[Xperia Z5 Android Development] rrdna:
Could someone please tell me, which method will work for .305 + E6653 (with root, drm-keys and xposed fully working?) Could not verify, if this will work on my model no.

thanks in advance

EDIT: solved
[Xperia Z5 Android Development] denk_mal:
Sorry, my mistake; The file is called drmrestore.zip and it is from this thread:

http://xdaforums.com/xperia-z5/development/sony-credentials-restore-unlocking-t3296383
[Xperia Z5 Android Development] mele80:
There is no need for that....its outdated and already included in this tool. It is said so in the op.
[Xperia Z5 Android Development] denk_mal:
There IS a need for that file because this tool WON'T work on Xperia Z4 Tablets.
[Xperia Z5 Android Development] nabeelrazanaqvi:
Hello guys. I have placed Xposed v86 in the rootkernel folder to patch it. When I flash that kernel my phone bootloops. Help needed urgently
[Xperia Z5 Android Development] Klaus N.:
Have you flashed the Xposed Framework via TWRP prior fastboot flash the boot.img? If yes, you've to flash the appropriate xposed uninstaller first, turn off your device and fastboot flash the boot.img right after that.
[Xperia Z5 Android Development] nabeelrazanaqvi:
I have flashed patched kernel.elf but can not see Xposed module in menu
[Xperia Z5 Android Development] Klaus N.:
You have to install a working xposed installer; take this one: http://xdaforums.com/xposed/material-design-xposed-installer-t3137758
[Xperia Z5 Android Development] rrdna:
Did the rootkernel steps (E6653 + .305)and everything (xposed with modules, supersu) is working fine. Except for the recovery: I can enter it but backups and mounts will fail. Anyone else experiencing this problem?

[IMG="TWRP 3.0.2"]http://i.imgur.com/wpaLSj7.jpg[/IMG]

Another thing:

I can no longer hide packages via adb shell and pm (wanted to hide sony small apps and whats new) since there is a recent permission issue since this update.
[Xperia Z5 Android Development] Klaus N.:
Try mine; I've got the same device (E6653), running 305 MM fw (incl. SuperSU, TWRP & Xposed [busybox isn't included here, because I've installed "Busybox Pro" from PlayStore]): https://www.dropbox.com/s/gcidag2jc4pe0zh/boot.img?dl=0
[Xperia Z5 Android Development] josephnero:
Mine also says OK
[Xperia Z5 Android Development] Chito307:
If I remember correctly all the lines in security should say key ok not only the first three
[Xperia Z5 Android Development] jugglerpl:
Chito307, you aren't right. If DRM keys was lost first lines should say [Unknown Error][Active].. I think that we have locked bootloader, DRM keys and root and it is fantastic information. But when Sony will push update for Marshmallow probably we must unlock bootloader once again and create new kernel (but maybe kernel won't be change in next release)

I shouldn't delete credmgr from data. I can check more option or function but I must know what I have to do :)

Wysłane z mojego E6653 przy użyciu Tapatalka
[Xperia Z5 Android Development] goofnorf101:
Problems with bootimg.exe

On my XP VM machine I get "bootimg.exe is not a valid win32 application"

I tried Linux but the Linux binary in version 3.2 appears to be for ARM architecture, the one in version 3.1 is x86 compatible but seems to miss the "readta" command needed.

So I have not yet been able to run this fantastic looking tool.

Any ideas?

Thanks
[Xperia Z5 Android Development] Chito307:
I had the first three lines say key ok however photo enhancements including low light were not active. I was confused that with keys active, photo enhancement screen did not have a divider to show the before and after enhancement. Now that I have deleted data -> credmgr -> credmgr.db, the divider returned. Does anybody know what effects deleting this file has? It seems that photo enhancements have returned when deleting this file.
[Xperia Z5 Android Development] acabreram:
C:\root>rootkernel kernel.elf rootedkernel.img [TA.img]

- Unpacking kernel

Found elf boot image

Found appended DTB

- Unpacking initramfs

- Disabling dm-verity

- Disabling SONY RIC

- Adding tools

- Adding TWRP image

- Installing init script

- Renaming init to init.bin

- 64-bit platfrom detected

- Extracting units from TA failed

- Configuring keyprovd

- Configuring secd

- Installing library

- Creating new initramfs

- Creating boot image

- Cleaning up

Done

my TA partiotion was succesfuly backedup 2.4 mb
[Xperia Z5 Android Development] jugglerpl:
acabreram, you have kernel without your TA. Please look at your log:

Unpacking kernel

Found elf boot image

Found appended DTB

- Unpacking initramfs

- Disabling dm-verity

- Disabling SONY RIC

- Adding tools

- Adding TWRP image

- Installing init script

- Renaming init to init.bin

- 64-bit platfrom detected

- Extracting units from TA failed

- Configuring keyprovd

- Configuring secd

- Installing library

- Creating new initramfs

- Creating boot image

- Cleaning up

Done

My log was:

http://xdaforums.com/attachment.php?attachmentid=3710385&stc=1&d=1460015098

Brackets [] inform that this element is optional and I think that your command is incorrect. I think too that you have kernel without your TA. Please check your bootloader status.
[Xperia Z5 Android Development] acabreram:
you are absolutly ok

it was the command wrong!

Thanks working 100%

marlín : key ok active
[Xperia Z5 Android Development] jugglerpl:
acabreram, You flashed kernel with TA now, is it?

Can you check your bootloader status? Press *#*#7378423#*#* -> Service info->Configuration->Rooting Status : Do you have

Bootloader unlock allowed: Yes

or

Bootloader unlocked: Yes ?
[Xperia Z5 Android Development] acabreram:
yes i have

rooting status:

Bootloader unlock allowed: Yes
[Xperia Z5 Android Development] jugglerpl:
So that is mean that flashing root kernel with TA was blocked bootloader. 3 persons confirm that :) I think that is good idea add this to first post.
[Xperia Z5 Android Development] acabreram:
maybe it´s just the "state" so restoring original ta back up change to the original state eve the bootloader it´s already unlocked but is just a idea jejeje

anyway xposed it´s working!!!! and i don´t think flash another kernel for the moment!

Excellent work from all the people who could make this possible!!
[Xperia Z5 Android Development] tongnt:
Hi, I keep having issue on the command. i notice i dont have the "found append DTB" like the others and when it reached the bottom create boot image, it come out with a usage error.

Can someone please help? Thanks. I am running it on windows 7 32bits,

C:\rootkernel_v3.2_Windows_Linux>rootkernel.cmd kernel.elf rootedkernel.img TA-07042016.img

- Unpacking kernel

Found elf boot image

- Unpacking initramfs

- Disabling dm-verity

- Disabling SONY RIC

- Adding tools

- Adding TWRP image

- Installing init script

- Renaming init to init.bin

- 64-bit platfrom detected

- Extracting units from TA

- Configuring keyprovd

- Configuring secd

- Installing library

- Creating new initramfs

- Creating boot image

usage: mkbootimg

--kernel <filename>

--ramdisk <filename>

[ --second <2ndbootloader-filename> ]

[ --cmdline <kernel-commandline> ]

[ --board <boardname> ]

[ --base <address> ]

[ --pagesize <pagesize> ]

[ --kernel_offset <base offset> ]

[ --ramdisk_offset <base offset> ]

[ --second_offset <base offset> ]

[ --tags_offset <base offset> ]

[ --dt <filename> ]

[ --id ]

-o|--output <filename>

- Cleaning up

Done

C:\rootkernel_v3.2_Windows_Linux>
[Xperia Z5 Android Development] sovanyio:
Anyone else getting 'Unknown boot image format' trying to use an FTF extracted kernel?

Edit: looks like bootimg won't run on os x, maybe the root binary is for android?

Edit2: linux bootimg executable is bad, windows version works though
[Xperia Z5 Android Development] goofnorf101:
Widevine doesn't work

So after taking all the steps, the security page says that WideVine DRM key is active but widevine protected content wont play, at least the All4 app doesn't work and reports widevine error.
[Xperia Z5 Android Development] jugglerpl:
Did you check working of WideVine earlier? (before taking all the steps)

Can you explain how we can check working WideVine?

---------- Post added at 08:44 PM ---------- Previous post was at 08:00 PM ----------

Ok, I checked widevine modular on my phone and it works. You should know that Android 6 may not support Widevine Classic and maybe All4 using Classic not modular. On my second mobile - Xperia M5 Android 5.1 with locked bootloader Widevine Classic works, but on Android 5.1 Classic is supported.
[Xperia Z5 Android Development] goofnorf101:
I checked Widevine using the All 4 app on Android 6 before unlocking the bootloader and it worked.

Afterwards it doesn't work. The Service menu security shows the WideVine key as OK but when I try to play the content I get in logcat:

WVMLogging: :LicenseManager::ReadLicense: GetEmm failed(-10, xxxxxxxxx)
WVMLogging: :GetConstraints : invalid license info 2, 2 code

coming from the drmserver process

I don't know enough about widevine to know how to test it like you did other than trying to access content on the all4 app which I regularly use.
[Xperia Z5 Android Development] jugglerpl:
Hmm. All4 is unavailable in my country and I can't check this but I checked INPLAY apk from Google Play and widevine modular is ok.

https://play.google.com/store/apps/details?id=com.ideanova.inplaysample

Are you having a root now or not? I ask about because All 4 inform that we can problem with apk with root

---------- Post added at 10:57 PM ---------- Previous post was at 10:41 PM ----------

Today Sony released update of Marshmallow. Someone check does update via ota works?
[Xperia Z5 Android Development] goofnorf101:
I tried the inplay apk you mention and modular works and classic doesn't. Widevine Classic fails with a different error message which doesn't mention the ReadLicense failure.

ALL 4 worked until I unlocked the bootloader and applied the rootkernel. I had not yet applied supersu because I know that it doesn't like root and I wanted to test the widevine out first. I believe the patch method we are using somehow isn't working with this. I don't know enough about how it works to know why.
[Xperia Z5 Android Development] Chito307:
Try adding the app in rootcloack xposed module some apps don't work because they detect root even if your keys are active

---------- Post added at 09:54 PM ---------- Previous post was at 09:37 PM ----------

I have gotten the app via ota too not sure if it is recommended to upgrade ota with root and xposed
[Xperia Z5 Android Development] rrdna:
Thanks. I flashed your kernel via fastboot, but the problem still persists. Operation not permitted on almost every partition.

I also tried to flash the following recovery via fastboot, but it did not seem to help:

http://xdaforums.com/xperia-z5/development/twrp-3-0-2-cm-aosp-roms-t3373008

Any other ideas?

thanks in advance
[Xperia Z5 Android Development] Klaus N.:
That's the wrong TWRP. I'd suggest to flash the rom again via FlashTool. In FlashTool on the right-hand-side "Exclude" > "Sin" exclude/check everything, without "SYSTEM" (so your data should be untouched). After that, flash the boot.img via fastboot again and reboot.
[Xperia Z5 Android Development] rrdna:
Ok, now i flashed the system.sin component from the .305-ftf only via flashtool successfully and right after this your provided boot.img via fastboot, but the problem still exists in the same way as before :(

The only 3 partitions i can mount in recovery are "firmware", "persist" and "external sd".
[Xperia Z5 Android Development] Klaus N.:
Then probably something went wrong. I'd install the whole rom with FlashTool (wipe everything in the left box [eject your ext sd before]), followed by the repacked boot.img. I hope for you, you've made a backup!
[Xperia Z5 Android Development] venkat kamesh:
SuperUserMod

Finally i found a solution for Disabling Complete Signature Verification

No need to Edit ramdisk

no Drm function will be affected

Pure and Complete SuperUserMod was done today

Tested it and working perfectly now

Soon i will share Guide

6.x need a lot other files to get edited and easy , will simply it soon
[Xperia Z5 Android Development] Muhammadsoli:
Can somebody patch kernel for me plz

My device is Sony Xperia Z

I need only DRM key patch as I didn't have backup before unlocking bootloader

Will it then improve the pic quality?
[Xperia Z5 Android Development] risk_06:
Please can you give me kernelroot 4.5 for my xz4t , i can't get it.

---------- Post added at 08:25 AM ---------- Previous post was at 08:22 AM ----------

Thanks a lot for your help
[Xperia Z5 Android Development] Klaus N.:
If you send me the kernel.sin, I'd do it for you after work.
[Xperia Z5 Android Development] Muhammadsoli:
On I'll thank you

And now I have flashed Resurrection Remix ROM

Is it possible to patch its kernel or it should be stock boot image?
[Xperia Z5 Android Development] Klaus N.:
No, it works only with Sony stock or stock-based rom!
[Xperia Z5 Android Development] Muhammadsoli:
OK here's the kernel
[Xperia Z5 Android Development] hoangluongvinh:
Sorry for noob question, but after flash file dk.tft, my phone become relock bootloader?
[Xperia Z5 Android Development] Klaus N.:
Ok, here you go: https://www.dropbox.com/s/igsm2g9xyz0saj7/boot.img?dl=0 (DRM fix, TWRP recovery & busybox are included)

You have to flash the boot.img in fastboot mode via cmd: fastboot flash boot boot.img > reboot > done!

No, your device will be still unlocked.
[Xperia Z5 Android Development] Muhammadsoli:
Thank you. I hope the picture quality will be increased
[Xperia Z5 Android Development] Klaus N.:
Doesn't matter :)

Does your device boot up? If yes, check it in settings > Image enhancement (switch between "Off" and "X-Reality for mobile").
[Xperia Z5 Android Development] Muhammadsoli:
Now I'll flash ROM based on offcial firmware(XROM) and try

I'll definetely let you know)

P.S can you attach the file here/ Having troubles with dropbox

And can flash the image through TWRP coz I don't have USB wire now?
[Xperia Z5 Android Development] Klaus N.:
Ok, here you are (I patched it again - only with drm fix). You've to unzip and flash it via fastboot command or in TWRP.
[Xperia Z5 Android Development] nabeelahmad909:
unable to start command prompt, only open and then it is closed, im using windows 10 64 bit
[Xperia Z5 Android Development] venkat kamesh:
Here go pure superusermod

Without loss of Drm

Without ramdisk edit

Have fun guys

http://xdaforums.com/showthread.php?t=3492324
[Xperia Z5 Android Development] wd121366:
View attachment rootkernel_v4.51_Windows_Linux.zip
[Xperia Z5 Android Development] osm0sis:
So I decompiled the rootkernel v5.0 newer Windows bootimg.exe and the older included Linux+Android bootimg binaries to get at the updated unpackelf source changes... ;):cowboy:

https://github.com/osm0sis/unpackelf
[Xperia Z5 Android Development] Hamidreza2010:
thanks man

how we should use it? :laugh:
[Xperia Z5 Android Development] Ab.Shaheen:
Thanks bro, got so important info by this tutorial ,
[Xperia Z5 Android Development] osm0sis:
Well, if tobias never comes back, it's nice that we didn't lose his great work on having 1 tool able to unpack all the ELF variants, and it can be updated for any ELF format changes in the future. I've also got some fixes/changes in mind to bring it more in line with unpackbootimg. ;)

Not to mention now it can be easily cross-compiled from source to work on whatever platform you want. :good:
[Xperia Z5 Android Development] deepongi:
could it be used on Xperia X?
[Xperia Z5 Android Development] osm0sis:
Most likely, but tobias was the expert on the format, so I'm not sure what would need to be changed if it isn't currently working already. Point is the unpackelf source is now available in its most up-to-date form from tobias' work.
[Xperia Z5 Android Development] deepongi:
i think last time i tried, i bumped into an error related to twrp template not available for the device.
[Xperia Z5 Android Development] osm0sis:
Yeah that's rootkernel. I'm only talking about the unpackelf utility that is part of this package.
[Xperia Z5 Android Development] deepongi:
so technically, if i choose not to include the twrp option, the rest would work. ill might give a try to see if device boots.

edit: yep, everything works, supersu and drm fix inc., i just dont have twrp | http://pastebin.com/bE5yffts
[Xperia Z5 Android Development] Klaus N.:
Yes, it works (also with the Xperia XZ I own) - even repacked with Xposed Framework. The only thing is TWRP...
[Xperia Z5 Android Development] hoangluongvinh:
How to patch .305 kernel? I have read v5.0 only support .253 kernel.
[Xperia Z5 Android Development] Klaus N.:
Here you go: http://xdaforums.com/showthread.php?p=69082728
[Xperia Z5 Android Development] Nown:
I patched the .305 kernel with the method described above (with modded v5.0, supersu, and no xposed). I have been having quite a few connection problems since. Every time my phone switches carrier (I am currently roaming) or every time I turn off the wifi, it just loses the data connection (but voice and text remain ok). Then, rebooting, switching airplane mode on and off, etc., don't help. The only thing that helps is displaying the list of available carriers (without changing anything there). Then it just works again until next time.

Maybe it is actually unrelated to the patched kernel, but it really started when I updated to .305, and I would like to know if anybody else is experiencing this.
[Xperia Z5 Android Development] DannyWilde:
Is it possible to patch Xperia X compact Kernel this way? (34.1.A.3.22)
[Xperia Z5 Android Development] riedenthied:
No problems here with 305. Works perfectly, so I don't think it's related to the patched kernel.
[Xperia Z5 Android Development] Klaus N.:
Yes, it might work - except TWRP. Just try it by yourself ;)
[Xperia Z5 Android Development] DannyWilde:
I'm a little bit afraid of opening my bootloader.

I tried to patch kernel with the latetest rootkernel-tool.

This is what i did:
[Xperia Z5 Android Development] Klaus N.:
To avoid problems with installing SuperSU separately, I'd suggest to include it also into the boot.img (simply delete the existing boot.img inside the rootkernel folder and do it again :p). And if you want to use Xposed Framework: Just place the suitable xposed.zip for your Xperia X Compact into the rootkernel folder, too.
[Xperia Z5 Android Development] nahsha:
Hi guys, I have restored drm. However, when I access the service menu - service tests - security, I see:

Blobs: generic error!

HUK: generic error!

What do you have?
[Xperia Z5 Android Development] DannyWilde:
Thanx for your help!

here is my second trial.

Do you think, android 7 kernel will be possilble to patch same way?
[Xperia Z5 Android Development] Klaus N.:
Yes, your repacked kernel should work; I did it the same way. Regarding Xposed: As the official XposedInstaller.apk does not support the systemless Xposed Framework, take that one from here: http://xdaforums.com/xposed/material-design-xposed-installer-t3137758
[Xperia Z5 Android Development] DannyWilde:
You did it with the Xperia XZ?
[Xperia Z5 Android Development] Klaus N.:
I've already repacked kernels for the Z3, Z3C, Z5 and for the XZ, indeed :o

This tool is really excellent - thanks again [MENTION=357342]tobias.waldvogel[/MENTION]
[Xperia Z5 Android Development] DannyWilde:
I did it for the z5c too. But there was no risk because of saving DRM keys. So im not really sure if I should give it try.
[Xperia Z5 Android Development] nahsha:
How's the battery life on your stock z5 with the patched kernel? On .305?
[Xperia Z5 Android Development] rolo143:
So it is impossible to install twrp recovery with the new firmware? (.305) ??
[Xperia Z5 Android Development] riedenthied:
TWRP works fine.
[Xperia Z5 Android Development] DannyWilde:
Battery life is fine for me. 4.5-5.5 DOT from 6.30 am to 11 pm.
[Xperia Z5 Android Development] rolo143:
Can't install TWRP with this new firmware. Idk why

Anyone got TWRP with this version -305?
[Xperia Z5 Android Development] Devo7v:
I'm having an issue with getting the kernel to flash. I recently updated to the Customized UK firmware 32.2.0.A.305 and I'm using the following steps:

open Customized UK 32.2.0.A.305 ftf with 7-zip and extract kernel.sin (30MB)

Use flashtool -> Tools -> Sin Editor -> Extract Data to create kernel.elf (30MB)

Place kernel.elf in latest_rootkernel folder

Open command line and type "rootkernel kernel.elf boot.img"

Disable dm-variety? NO

Disable Sony RIC? NO

Install TWRP? YES

Install DRM fix? NO

Install busybox? NO

Boot phone into fastboot mode and flash the newly created boot.img using the following command: "fastboot flash boot boot.img"

The new kernel flashes properly and when I boot the phone, I am able to enter TWRP, however the phone will not boot to Android, it hangs at the Sony screen. The only way I can boot Android is to flash another kernel (in my case AndroPlus v40). Flashing the original kernel (30MB) also causes the phone to not boot. Does anybody have any ideas what I'm doing wrong?