yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] michaelbrender:
Encryption doesn't work?

Hi Tobias, Hi all,

first I want to thank you for your brilliant work for the Z5-community!

Is it possible that the kernel patch makes the phone encryption unusable? Everytime I try to encrypt my device (Z5C) the process fails ("this phone can not be encrypted"). I had the same error on Zombie kernel.

Only with the "pure stock" kernel encryption works (but as far as I know, root, xposed and drm restoration won't).

Thanks!

Micha
[Xperia Z5 Android Development] alex009988:
Hi Tobias could you help z4tablet users to create stock kernel with disabled Sony Ric dm variety and twrp. Thanks in advance!
[Xperia Z5 Android Development] ggriffis420:
Can anyone confirm that V2 works on the Z5C with TWRP working?
[Xperia Z5 Android Development] alex009988:
Please, somebody help to create stock kernel with disabled Sony Ric dm variety.

I've tried tobias script but it doesn't work for tablet Z4
[Xperia Z5 Android Development] Oxoacid:
Can we flash this on Z5 Compact? :)
[Xperia Z5 Android Development] :
Before bricking my phone again, can this can be flashed on a E6653 with 32.0.A.6.152?
[Xperia Z5 Android Development] sheraro:
does v2 includes twrp v3 ?
[Xperia Z5 Android Development] Arturiuz!:
i have tried it but doesnt work,unfortunately

nope! only 2.8.7.0 version..and orange-colored theme,too!! wc is nice as well..
[Xperia Z5 Android Development] coooler2014:
Wait for the release of a patch for the marshmallow?

Thanks
[Xperia Z5 Android Development] pikeylfc:
Would this work on a z3+?
[Xperia Z5 Android Development] blakwhite:
[MENTION=357342]tobias.waldvogel[/MENTION]

We'd appreciate it if you revised this for 6.0
[Xperia Z5 Android Development] yannik~:
hey, can you provide the sources for the binaries you provide in the zip? I am looking especially for unpackelf and build instructions/patches you used for twrp, as the others can easily be extracted from cm/googles android sources.
[Xperia Z5 Android Development] tobias.waldvogel:
I'm currently working on it. You can expect it beginning of next week when I'm from holiday. ;)
[Xperia Z5 Android Development] tobias.waldvogel:
Sure, I will publish it when I'm back next week.
[Xperia Z5 Android Development] Bumblecito:
Enjoy it bro !!!
[Xperia Z5 Android Development] Razuddin:
Guys im running stock 32.0.A.6.200 and want to unlock my bootloader shortly. After ive unlocked my bootloader, can i flash v2 of this zip via fastboot? am i reading correctly and thinking that this will leave me with this kernel and TWRP and also be rooted?
[Xperia Z5 Android Development] tomeei:
Ok, thank you very much for your reply.

So a locked bootloader means the kernel and initramfs need to be unmodified (stock). A stock kernel and initramfs requires the system partition to be unmodified (stock). Therefore a locked bootloader means that any "hackish" stuff like busybox, supersu, vpn modules etc. must be put in a place other than the system partition. Is that correct?
[Xperia Z5 Android Development] tobias.waldvogel:
SELinux does not let you execute it from any other place, so forget about it. And the SELinux policy is then initfs, which you cannot change without unlocking the bootloader.

What's the problem anyway? If you want root access just unlock the bootloader.

This is the last comment I'm going to write about this topic.
[Xperia Z5 Android Development] deepongi:
[MENTION=357342]tobias.waldvogel[/MENTION]

i am having issues with permissions denied executing the script on linux, despite i making the necessary files as executables.

i was able to run it on Windows, but device wont boot. i get sony bootsplash, then the device blinks the led in red, and shuts down.

can someone check if its issue with my files?

kernel in elf format

https://www.dropbox.com/s/mzqg7l8gm7gn783/kernel_S1-SW-LIVE-F936-PID1-0006-MMC.elf?dl=0

my ta backup

https://www.dropbox.com/s/cxd2n0nhh9j27pe/TA-19042016.img?dl=0

many thanks and keep up the good work!

regards.
[Xperia Z5 Android Development] tobias.waldvogel:
Which device is this and which Android version do you have installed?
[Xperia Z5 Android Development] deepongi:
e6653 and running .185
[Xperia Z5 Android Development] tobias.waldvogel:
Are you sure that you flashed the entire upgrade for MM 185, including the bootloader? We only had these kind of issues with MM with people who ommited parts of the image.
[Xperia Z5 Android Development] deepongi:
ive flashed only full .185 ftf first time, then tested androplus kernel.

then i used your tool like i said. and finally i flashed .185, but didnt flashed /system partition. is it related to that?

edit: i flashed full ftf, including system partition, the "reconstructed" boot img did its job, got recovery but no root, but thats not a problem.

ps: is it just me, or it seems theres a color change on the display..? turned a bit more red?!

regards.
[Xperia Z5 Android Development] RyTekk:
DRM fix in kernel is the old method which is using your lib and flash_dk is the new method which is using TA backup to reproduce DRM key, are they right?
[Xperia Z5 Android Development] Beast14:
Tobias, It would really be helpful if you could post another question on the FAQ, stating how to simply upgrade and flash kernel.img from your older rootkernel to the next updated version. As far as i know, i just need to re-generate the kernel.img with your updated version and reflash only the new kernel.img, thats all right? i wont lose root or anything?

If you could confirm this in the instructions, then users(noobs) like me, would know and not mess anything up.

It would be much appreciated :)
[Xperia Z5 Android Development] rolo143:
When I access TWRP recovery it doesn't read the battery stats I guess, because even when I have 90% of battery charge in TWRP recovery says 20% so is there a bug or something while reading the battery percentage or what? Thx
[Xperia Z5 Android Development] deepongi:
+1

same here also.
[Xperia Z5 Android Development] Beast14:
+1
[Xperia Z5 Android Development] celderic:
This bug has been there for months, after a few minutes it shows the correct percentage :) sometimes it works properly.
[Xperia Z5 Android Development] devilmaycry2020:
@tobias.waldvogel

Please update the guide in this thread working on MM only. LL can't boot to TWRP, No SuperSU integrated. Thanks.
[Xperia Z5 Android Development] pinkfloydarg:
Hi all, thanks for your great work!

I've managed to backup the TA, take the kernel, patch it, flash it, then flashed the dk.ftf... phone boots perfectly, TWRP also works but I don't have root! I haven't been able to flash it, either, twrp says it's being completed correctly but when going into MM the app nor the root is available... any ideas? running an e6653, thanks!
[Xperia Z5 Android Development] celderic:
Same here, noticed the su.img was on the data partition, but supersu wasn't installed. When I installed it manually it said superuser binary not found.

To solve this I patched the stock kernel again with the tool in this thread, but without supersu. Then I flashed the kernel and flashed supersu separately in twrp.
[Xperia Z5 Android Development] tobias.waldvogel:
You never told me why you don't want to upgrade to MM. I don't have second phone which I can leave with LP for testing purposes.
[Xperia Z5 Android Development] tobias.waldvogel:
There was a bug in SuperSU integration in V4.23. Please try again with V4.24 ;)
[Xperia Z5 Android Development] tobias.waldvogel:
Yes that's right. I added this question.
[Xperia Z5 Android Development] tobias.waldvogel:
For SuperSU integration there was a bug in V4.23, which is fixed in V4.24.

Regarding TWRP you can pass me a link to the kernel image, which are trying to modify. Recovery itself only depends on the kernel package so I could test it without downgrading my phone.
[Xperia Z5 Android Development] najoor:
I can't thank you enough for this great tool.

One question that I have is that I used drmonly script (drmonly originalkernel.img patchedkernel.img ta.img) and flashed the generated kernel. I did NOT use flash_dk to generate and flash an ftf and from what I can see the kernel and the drm keys are working perfectly. Then why is the ftf flashing necessary? Mine seems to be working fine without that.
[Xperia Z5 Android Development] devilmaycry2020:
Ok. i've send to you 2 kernels. Take a look if you have free time.

https://drive.google.com/open?id=0B6ouvVbSWn4-WmE4UTZrNjloc28

Anyway v4.24 SuperSU integration error had gone. Thank you very much
[Xperia Z5 Android Development] swagie:
[MENTION=357342]tobias.waldvogel[/MENTION]

I run your script but my E6653 is not booting. It starts and after the sony logo it blinks red and reboots with the same problem.

If I flash androplus kernel it boots straight away.

No errors on your script creating stock kernel, running 32.1.A.1.185 T-mobile NL rom with androplus kernel.

Any idea why it won't boot with stock patched kernel?
[Xperia Z5 Android Development] ninestarkoko:
ftf flashing is necessary for FIDO_KEYS restoration. It's a one-time procedure.

If you did it previously, then now you don't need to repeat it.
[Xperia Z5 Android Development] najoor:
I did generate the DK.ftf file and flashed it but I don't see any difference. Under the service menu I still see "FDIO_KEYS: Not Provisioned". Am I doing something wrong?
[Xperia Z5 Android Development] Arturiuz!:
what i could atleast suggest is that; if your device is already unlocked,relock it using flashtool,flash the .ftf LP firmware then repair it using Xperia Companion/PCC. it's gonna be a time-consuming process but definitely you won't see that issue you're having atm after which..i took that advice from someone in somewhere here in this forum or probably in another thread(i'm actually searching it while typing this msg.lol..),& it worked! :D
[Xperia Z5 Android Development] lizen0831:
Hi i try make a boot.img but I am no see Extracting units from TA

this my picture sorry my english very poor
[Xperia Z5 Android Development] lizen0831:
my twrp not work sony z5 e6683
[Xperia Z5 Android Development] najoor:
Very well. So this is what I did, following your advice:

1- Clean-flashed a lollipop ftf.

2- Used the TA backup to lock the bootloader.

3- Checked the service menu and under security everything looks normal (i.e. it looks like the bootloader is properly relocked and DRM is restored)

4- Connected the tablet to PC and ran PC Companion.

5- PC Companion updated the firmware to Marshmallow, while keeping the userdata unchanged (that was the only option)

6- After the update was done I checked the service menu and all is fine again except that now it says "FIDO_KEYS: Not provisioned"

7- So to remove that message I followed your advice and ran PC companion again. This time it gave me the option to repair.

8- I let PCC repair the tablet. After it is done, I started the tablet and looked under service menu and nothing is changed. It says "FIDO_KEYS: Not provisioned". Note that throughout all of this, from step 2 to the end I leave the bootloader locked.

Can someone help me understand why this is happening and how I can fix it?

EDIT: It is entirely possible that this tablet just did not have the FIDO key when it was first issued from the factory so I may be chasing a ghost here.
[Xperia Z5 Android Development] frostmore:
does anyone have the img file for the new twrp for z5p? (E6853)
[Xperia Z5 Android Development] zohaib0001:
[MENTION=357342]tobias.waldvogel[/MENTION]

I need your Help

When I unlocked my boat loader after that I flashed AndroPlus Recovery.img and his kernel.

But now I want to use rooted stock kernel as your mod is providing.

So I make a rooted kernel by using your mod and flashed over androplus kernel

But the problem is that when I restart my phone and try to put it into recovery by pressing volume down it hang on boot logo and did not boot into recovery mod

I think it is conflicting with AndroPlus Recovery.img that I already flashed

Any advice how I can fix to boot into recovery mod ?????
[Xperia Z5 Android Development] tobias.waldvogel:
Please use the volume up key. Volume down tries to boot the recovery from recovery partition instead of the integrated one.

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] deepongi:
theres issues with the twrp recovery. doesnt assume the device is a e6653/sumire

which product override did you used?
[Xperia Z5 Android Development] ahasae:
[MENTION=357342]tobias.waldvogel[/MENTION]

hello my frind

i have kernal and i have recovory

okay

just please give me the command and the steps for using ( drmonly )

from the beginning to the end
[Xperia Z5 Android Development] tobias.waldvogel:
The package your are trying to install is looking for the properties ro.product.device and ro.product.board, which are not set in the kernel package anymore, but in the system properties in /system. As the properties are loaded without mounting /system before they are not available. What you can do is:

boot into recovery

run adb -d shell

set the properties with the following commands:

setprop ro.product.device sumire

setprop ro.product.board E6653

Now you can try again. Please not that this is not persistent.
[Xperia Z5 Android Development] najoor:
Can someone please tell me what FIDO_KEYS are and what happens if they are "not provisioned"?

I relocked the bootloader by flashed the TA backup but I get this "FIDO_KEYS: not provisioned" message in the service menu. I even flashed the DK.ta. What functionality is my tablet missing now because of this?

Thanks a lot in advance.

EDIT: This seemed to be a logical answer to my question: http://xdaforums.com/showpost.php?p=66500051&postcount=15
[Xperia Z5 Android Development] ahasae:
can you help me pls

i have kernal and i have recovory

please give me the command and the steps for using ( drmonly )

from the beginning to the end
[Xperia Z5 Android Development] zohaib0001:
[MENTION=357342]tobias.waldvogel[/MENTION]

i flashed complete ftf on my Z5 E6653

and start it after that i flashed rooted kernel with your v4.24 mod

after that i flashed DK.ftf

but now my phone is not booting up into recovery

i try both keys volume up and down but my phone hang on boot logo

what should i do now ??????
[Xperia Z5 Android Development] KbaB.BroS:
You relocked your bootloader when you restored your TA
[Xperia Z5 Android Development] zohaib0001:
by flashing DK.ftf its not re-lock the boat loader
[Xperia Z5 Android Development] RyTekk:
[MENTION=357342]tobias.waldvogel[/MENTION] Can you help me to make it clear? I'm confuse with them.
[Xperia Z5 Android Development] ninestarkoko:
Are you on lollipop? If yes, then you can't use included TWRP from the modded kernel.

To get out of bootloop just go into fastboot mode (keep vol up pressed when the phone is rebooting while connected to usb) and reflash the kernel.

DRM fix/emulation (libraries, daemon...) is now included in the kernel (boot image) and /system independent (as far as i understand). It will fix all the keys except for FIDO_KEYS. FIDO will be restored by flashing the created .ftf file (but remember that it will NOT relock the bootloader, never ever any relocking)
[Xperia Z5 Android Development] najoor:
It doesn't restore FIDO_KEYS on tablet Z4.

Since I cannot get the FIDO error to go away even after complete TA backup restoration in Marshmallow, I would like to retract this comment. It is entirely possible that this tablet did not have the FIDO keys to begin with.
[Xperia Z5 Android Development] ahasae:
man i have did new kernel img with the new 4.24 and my phone not booting any more and no recovery

so i flash aur-kernel v3 kernel and my phone booted

i need to use your <drmonly> script

what the steps to use it

help me

thanks
[Xperia Z5 Android Development] mochuk:
Thanks for this great tool! I have successfully used it to flash my phone from a Debian (GNU/Linux). However, I had to modify the shell scripts, to make it work. The scripts rootkernel.sh and flash_dk.sh (and probably the others, too) are using the variable "$BB" to execute busybox, if BB was set in the beginning. If, however, BB was not set, they try to execute the empty command "", which results in a "command not found" error. A solution to this problem is to replace all calls of "$BB" with bb and provide the following function:

bb() {
if [ -v BB ]; then
"$BB" "$@"
else
"$@"
fi
}

This should work for BB not set and BB set to a path including spaces.
[Xperia Z5 Android Development] lizen0831:
hello

my phone is not booting up into recovery

i try keys volume up and but my phone hang on boot logo what should i do now ?????? my system 5.1.1 z5 e6683

V4.23 Fix for repacking 3rd party kernel boot recovery ok

V4.24 recovery is do not work bootloop sony logo
[Xperia Z5 Android Development] devilmaycry2020:
[MENTION=357342]tobias.waldvogel[/MENTION]

Did you receive the LL kernel I've sent to you? Can you support LL community?
[Xperia Z5 Android Development] ngelee:
anyone notice is this package has any confilicts with the LMT launcher, please?

my z5 dual (32.1.A.1.163, androplus v3a kernal,rooted and drm restored) has LMT function well, but with z5c (32.1.A.1.185, this thread solution) it can't trigger normal commands like 'home', 'back', nor the apps.

[SOLVED]flash androplus kernel v23 to fix the issue.
[Xperia Z5 Android Development] do_salah:
Hi, I dont have my keys, most of the functions work. cant get ps remote play to work. Anyone else getting this issue?
[Xperia Z5 Android Development] Masoud.Ser:
hi i back up my ta unlocked bl and flashed kernel and then ta ... but Screen Mirroring was not working..

fido-keys: provisioned

my device: Z5dual

what is the solution??
[Xperia Z5 Android Development] tobias.waldvogel:
I added this in V4.3.

Unfortunately -v doesn't work in busybox but ! -z "$BB" does the job. Thanks for the suggestion.
[Xperia Z5 Android Development] tobias.waldvogel:
I will try to have a look on this. Altough it is quite difficult as I lost my device key long ago and don't have a screen mirroring capable device
[Xperia Z5 Android Development] tobias.waldvogel:
I made it work with the older kernel. Actually it was a lot of work because you need to extract the kernel version and change the modules accordingly. Also the SEPolicy is quite different.

Nevertheless I am really curious why you don't want to move on to MM
[Xperia Z5 Android Development] tobias.waldvogel:
This was never tested or built for your device. This is a Z5 thread ;) Unfortunately I don't own such a device.
[Xperia Z5 Android Development] Masoud.Ser:
This solution works good after flash zip file in twrp

but files is for z5 premium no z5:(

solution:

http://xdaforums.com/z5-premium/development/screen-mirroring-fix-drm-function-t3297422
[Xperia Z5 Android Development] devilmaycry2020:
So made it for me, kernel. 152. Or teach me how to do. Thank you very much. I don't want to upgrade to MM cause the battery drain too fast and stamina had gone, :)
[Xperia Z5 Android Development] najoor:
Sorry, I didn't mean to be rude to you about this. Your work is very much appreciated, and I have to say it works very well in every other respect for tablet z4. Thanks again, and my apologies if my comments were inappropriate in any way.

EDIT: reason for stiking out part of the comment above: http://xdaforums.com/showpost.php?p=66499036&postcount=425
[Xperia Z5 Android Development] Mario.D:
Hello i modify the z5p file so it can be used on a Z5 with latest MM (185).

Attaching the file so you can test it, keep in mind that it will replace your build prop so any changes you have done to it will be replaced.

Screen mirroring works with it, but only unprotected material i think.

Edit...

Just noticed you have a dual sim so i attached a version for that one to.

If you have flashed the previous one just redo it with the correct one.
[Xperia Z5 Android Development] celderic:
I never tried encrypting my phone before the bootloader was unlocked the day I got it, but I tried Lastnight and left it for about 6 hours plugged in, it wouldn't move from the encrypting screen, the phone was barely warm to touch either.

Even forcing reboots after the 6 hours just took it back to the same screen, didn't get warm but the encrypting animation was still displaying properly.

I did a full data wipe and tried encrypting again to see if it was anything to do with my setup, but it still didn't work.

Are lost drm keys the cause for this?

Or because it's rooted, modified boot.img etc
[Xperia Z5 Android Development] devilmaycry2020:
@tobias.waldvogel

Very good job. Thank you very much. v4.3 almost seem working flawlessly with LL . Only one minor problem is the temperature and battery percent show incorrectly in TWRP 3.02
[Xperia Z5 Android Development] Duvel999:
Just a question;

Everything works well on my rooted 6653 MM.

But how to reactivate my original device key with the code?

flash_dk <TA backup> DK.ftf or flash_dk TA-####.img restore-drm-keys.ftf

I got in the Rootkernel folder all files like Kernel elf, Patched kernel elf, Supersu V2.65 and my TA backup.

Do I need to move some files?

Rename in the code flash_dk TA-####.img restore-drm-keys.ftf my TA backup code?

But I get a error to make the "restore-drm-keys.ftf". file.

I am on windows 10.
[Xperia Z5 Android Development] swagie:
[MENTION=357342]tobias.waldvogel[/MENTION]

V4.3 is booting on my E6653 but no supersu.

I tried with 2.65 and 2.71. V4.3 installs the app but not able to update the binary.

Also flashing from twrp not working.

did you make any changes to the supersu script in v4.3??

Can you please help?
[Xperia Z5 Android Development] tobias.waldvogel:
Could you tell me a little bit more precisely what "no supersu" means? Without a detailed description is hard to understand what happened.

Don't try to install SuperSU via TWRP if you let the script install it already. That will very likely fail. If you want to install via TWRP then create the bootimage without SuperSU

If something went wrong in the past then might try to boot into recovery and the delete the file /data/su.img
[Xperia Z5 Android Development] Arturiuz!:
give it a minute or two,it should show the correct percentage for battery & temperature..

E5803 using XDA-Developers mobile app
[Xperia Z5 Android Development] swagie:
Ok,

Ran the script. V4.3 with supersu and all was ok.

Flashed with fastboot all ok.

Booted all ok.

Opened supersu app and asked to update supersu binary.

Hit ok/normal and Let supersu do its thing.

Got message failed to update please reboot and try again from supersu.

Did that but still no supersu binary installed.

Opened adaway to check and it says no supersu binary installed.
[Xperia Z5 Android Development] tobias.waldvogel:
Did SuperSU ask to update the binary or did you manually try to update? Which kernel version did you use?

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] swagie:
Supersu asked me opening the app the first time.

Kernel is E6653 MM. 185 Netherlands t-mobile
[Xperia Z5 Android Development] Duvel999:
how to make then file by the flash_dk <TA backup> DK.ftf code?

I got Patched elf kernel wit Supersu & Twrp, but got an error.

Do I need to edit the code in the rootkernel folder with the name of my Ta backup?

Please advise
[Xperia Z5 Android Development] prince10t:
Hey Guys, I saw this article http://xdaforums.com/z3-compact/general/loss-drm-keys-t2890936 for Xperia Z3 about the things that you will lose once you unlock the bootloader.

My question is:

1. Is it exactly the same stuff that you will lose and retain for Z5 once you unclock BL?

2. If I successfully follow OP's Guide here in page 1, will I regain Everything that I am supposed to lose once BL is unlock?

Here is a peek of the above link's page 1 just in case you are lazy to click it:
[Xperia Z5 Android Development] ahasae:
[MENTION=357342]tobias.waldvogel[/MENTION]

4.3 kernel

Xperia z5 E6883 Dual

device booted and there is no dual sim in system ui

dual sim not working
[Xperia Z5 Android Development] tobias.waldvogel:
Mayve you have taken the wrong kernel image? Which model and variant were shown when you ran the script?

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] ahasae:
mmm i have the right kernel for my device i extracted it by my self

this is not first time i use the script