yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] acabreram:
it´s posible update only the recovery?

I restored my drm with V3 and working fine if i créate a new rooted kernel with v4.2 if posible flash the new rooted kernel or i have to do a clean installation?

Thanks!!
[Xperia Z5 Android Development] frostmore:
so far, point to point 3 is ok.

for point 4, TA backup made by iovyroot is in the .img (TA.img) file format.

Tobias instructions for using adb to flash is "flash_dk TA.img DK.ftf"

so in summery if i get it right, it should be like this:

1. back up TA using iovyrootv4 (at the moment)

2. follow tobias instruction to extract kernel sin and root it using root kernel and this command "root kernel kernel.elf rootednewkernel.img"

3. unlock bootloader and enter into fastboot

4. using adb, flash the rooted new kernel img into unlocked bootloader

5. flash the TA img file using this command "flash_dk TA.img DK.ftf" which will relock bootloader and restore TA partition as if it was just out from the box(correct me if this assumption is wrong)

6. reboot to TWRP and flash supersu 2.65

when the dust settled, you should have a locked bootloader with a rooted stock kernel and rooted rom.

am i correct?
[Xperia Z5 Android Development] ninestarkoko:
not exactly....

4) using fastboot

5)

as far as i understand from Tobias' words, from v4.0 on, device key (Dk) is restored in TA partition but not in its original position because this is not compatible with Unlocked bootloader. If we could just restore TA.img, we would not need these passages. Restoring TA partition relocks the bootloader and locked bootloader means it can't boot any modded/rooted kernel and rom.

6) in latest versions, SuperSU is included
[Xperia Z5 Android Development] tobias.waldvogel:
​

4.2 integrates SuperSU automatically, if you place the .zip in the same directory as the scripts.

The idea since 4.2 is the flash your device key in TA unit, this will survive any reset and upgrade.

So, there is a one-time step to flash your device key and then you generate a new kernel image.

There is no need change anything else nor will it wipe your device.
[Xperia Z5 Android Development] acabreram:
Thank you for your amaizing work!!

Donated!

---------- Post added at 03:56 AM ---------- Previous post was at 03:39 AM ----------

i don´t understand the last step

1.- genereted root kernel.img

2.- flash boot.img(root kernel)

3.- in cmd flash flash_dk <TA backup> DK.ftf

4.- in flashtool flash DK.tft

it is ok?

thanks
[Xperia Z5 Android Development] tongnt:
i placed supersu.zip in the same directory as the script in v4.2 and create a newkernel.img. it has the same size as the rooted kernel.img that was created in v4. how do we know it has supersu installed?

i also compare the output in command. it has no different.

does the twrp bundle in v4/v4.2 compatible with 320.0.A.6.170 lollipop? i have a z5p and we have not yet receive marshmallow updates.

can someone tell me how to boot to recovery? i follow step from website but still not getting into twrp. press power button and volume key it show orange led and screen just show sony logo splash screen and reboot loop. i cant flash supersu.zip since i cant get into recovery.

TIA.
[Xperia Z5 Android Development] tobias.waldvogel:
The script loops for the pattern SuperSU*.zip (case sensistive). So try to rename to to SuperSU.zip or something like SuperSU_265.zip etc.

To go into recover just restart your phone. After a few seconds the LED will turn yellow. Now press volume up.

I don't see any reason why it should not work with LP. There was an issue in an earlier version, which is fixed since 4.1.
[Xperia Z5 Android Development] acabreram:
ok
[Xperia Z5 Android Development] ops0125:
thank you tobias.waldvogel

work"s GOOD!

How can I add a new language in TWRP?(ex:TW language)
[Xperia Z5 Android Development] devilmaycry2020:
So after step 6 we had rooted locked bootloader rom, am I right?
[Xperia Z5 Android Development] frostmore:
Thanks for the quick reply.

4. yeah,fast boot is the command i use in adb.

5.i read tobias instruction and he did mentioned that the TA keys are retrieved from another location which the drmfixlibary will pickup.

what i know for sure at the moment is :

1. locked bootloader means any modified kernel will not work.period.

2.tobia's instruction on restoring TA keys using his command is only for unlocked bootloaders,therefore its safe to assume that its a workaround.

3.iovy TA restore method will relock bootloader as far as i have read. and therefore if there is a modified kernel detected,nothing will work.

however this guy on this post claims to be able to remain on rooted stock kernel with locked bootloader with TA keys restored. but from step 8 onwards there is no mention of how he was about to restore TA with the conditions i mentioned.but he did post a screenshot showing his TA partition as intact although i still have my doubts.

(http://xdaforums.com/xperia-z5/general/guide-rooting-unlocking-bootloader-t3354307)

my other question will be, since dm-verity (in locked bootloader conditions) will not allow any modifications to the kernel and will not boot, with it switched off,shouldn't it allowed a modified kernel to boot under a relocked bootloader condition?

i would have assumed that the dm-verity is sitting in the kernel itself and a relocked bootloader shouldn't have any impact unless relocking the bootloader will cause verification issues (signed packages by sony and what nots).and the whole issue with rooting the Z5 began with dm-verity restricting modification to kernels/systems etc etc thus unable to gain root exploit and stuff....

i am just curious how a dm-verity switched off kernel is unable to work on a locked bootloader without getting too techincal( since i am a linux/programming noob).
[Xperia Z5 Android Development] acabreram:
someone can explain me why doesn´t show DK.tft in flashtool when i am trying to flash??
[Xperia Z5 Android Development] frostmore:
its just an assumption based on the guide here(the guy missed out explaining how he got a locked bootloader on modified kernel after step 8):

(http://xdaforums.com/xperia-z5/general/guide-rooting-unlocking-bootloader-t3354307)

currently there are 2 ways to restore TA partition: 1)using iovy root (which will relock bootloader) and 2) using tobias' method which is a work around.

tobias method is very clear that the information will be retrived from another location by the drmfixlibary. what i am unsure now is how does a dm-verity disabled kernel is unable to boot in a locked kernel environment with TA keys intact.

---------- Post added at 12:31 PM ---------- Previous post was at 12:28 PM ----------

mate, no. 6 refers to the process where you use adb i.e fastboot command to flash the file...i do not think it was meant to use flash tool to do the flashing...
[Xperia Z5 Android Development] acabreram:
do you have a previus versión of this tool 3.1 I guess?? could you upload??

i dont want relock the bootloader for now.
[Xperia Z5 Android Development] guentergunter:
First of all: I managed to safe my TA partition by the iovyroot method.

Now, here are some things I suggest some clarification about in the first post:

1) "rootkernel <kernel image> <new kernel image>" also gives the possibility to do "rootkernel <kernel image> <new kernel image> [TA partition image]"

If I add the TA image, do I still have to "flash_dk <TA backup> DK.ftf"?

2) How can I check if the DRM-keys are back in place?

Thanks in advance!
[Xperia Z5 Android Development] ctap001:
v

This is what confused me as well. "flash_dk TA.img DK.ftf" does not flash the Device Key but rather said command generates "DK.ftf" from your TA.img (which was in turn generated by iovyroot)

You don't flash the TA.img with rootkernel; rootkernel makes the DK.ftf file which is then flashed with flashtool.

[MENTION=5702551]guentergunter[/MENTION]

Enter *#*#7378423#*#*

Service Tests--->Security

First three entries should say [Key OK]

[MENTION=5194118]acabreram[/MENTION]

You will have to place the DK.ftf file you created to the firmwares folder of your flashtool. For me it was located at
[Xperia Z5 Android Development] acabreram:
Yes i know that, i put the file in the directory but web i try to flash in flashtool doesn't show DK.tft file.

How do I know if my DK.file it's ok?

Actually size 1 kb

Thanks!
[Xperia Z5 Android Development] FluR0:
Hi, I have two problems with this patch.

Firstly, when trying to use flash_dk, this is my command output:

[root@****** rootkernel]# ./flash_dk.sh TA.img DK.ftf
- Extracting device key
- Creating FTF file for device E6653
__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!
__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!
__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!
error: could not read from /root/rootkernel/dk_tmp/META-INF

- Cleaning up
Done

This outputs a corrupt ZIP file which crashes flashtool.

Also, when trying to boot into recovery (volume up when light appears on boot) it gets stuck in a boot loop, requiring me to put the phone into fastboot then reboot the phone manually, I cannot get into the recovery without a bootloop therefore cannot install SuperSU

I am lost and any help would be appreciated, I am using a Lolipop rom (32.0.A.6.152)

Cheers
[Xperia Z5 Android Development] ctap001:
My DK file is also 1kb. It should be there when you select the flashmode option.
[Xperia Z5 Android Development] netaccs:
>rootkernel.cmd kernel.elf boot.img

Rootkernel V5.23

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-g1016077

Found appended DTB

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

- Unpacking initramfs

- Detected platform: 64-bit

- Detected Android version: 7.0

- dm-verity is enabled. Disable? (Say yes if you modify /system) [Y/n] Y

Disabling dm-verity

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

Disabling Sony RIC

- Install TWRP recovery? [Y/n] Y

Installing TWRP

Compressing TWRP image

- Found SuperSU-v2.82-20170528234214.zip. Install? [Y/n] N

- Install DRM fix? [Y/n] Y

- Install busybox? [Y/n] N

- Creating new initramfs

- Creating boot image

- Cleaning up

Done

fastboot flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (17696 KB)...

OKAY [ 0.627s]

writing 'boot'...

OKAY [ 0.375s]

finished. total time: 1.002s

Boot Into recovery (power on, while Sony logo and yellow led, holding the volume up)

from twrp I install SuperSU-v2.82-201705271822.zip

Same result. There is SuperSU icon, adaway and es not working
[Xperia Z5 Android Development] fluffi444:
Try to install supersu via playstore afterwards.
[Xperia Z5 Android Development] netaccs:
i try it - same result.
[Xperia Z5 Android Development] Klaus N.:
Try UPDATE-SuperSU-v2.82-20170528234214.zip from here: https://download.chainfire.eu/supersu

It has got the fix for Xperia devices and works fine for me.
[Xperia Z5 Android Development] sceryavuz:
[MENTION=4919210]netaccs[/MENTION]

I think you do something completely wrong from the beginning or your device is blocked for editing. It is easy to ROOT Z5.
[Xperia Z5 Android Development] netaccs:
I am also thinking as you :)

I don't know how to test step-by-step everything. If someone wanna help I'll be very thankful.

May be some teamviewer, skype connection..
[Xperia Z5 Android Development] YasuHamed:
could you send me the kernel.sin file,

let me try creating boot.img
[Xperia Z5 Android Development] kokokmt:
I am also same result but

My DRM didn't restore and showed

Generic error .i back up TA properly

Could you give me proper instruction
[Xperia Z5 Android Development] Duvel999:
If I read well the log, SuperSU ( Y/N ) N !!!!

This is the cause .

Try again and install it with ( Y ) and Busybox.

I prefer Phh Superuser instead. ( post 1)
[Xperia Z5 Android Development] YasuHamed:
1. since you embed superSU via SCRIPT, then

2. there NO need to reflash it via twrp.

3. altough flashing it with twrp has its benefits, you can update binaries whenever supersu has newest version.

android 7 has /system readonly!!!

even after root you must to do this

https://xdaforums.com/xperia-z5/general/z5-making-writable-32-3-0-372-root-t3551067
[Xperia Z5 Android Development] jianlin3062:
Can I write TA to a third party kernel?
[Xperia Z5 Android Development] YasuHamed:
please explain
[Xperia Z5 Android Development] shoey63:
I think he means "Can I use the tool to make a kernel with someone else's TA.img"

I don't think that would work. ..
[Xperia Z5 Android Development] YasuHamed:
ahhhh!
[MENTION=4686027]jianlin3062[/MENTION]

as [MENTION=4120742]munjeni[/MENTION] xplained

here

https://xdaforums.com/showpost.php?p=72732235&postcount=107

with reference to

https://xdaforums.com/showpost.php?p=72732099&postcount=103

so ta.img can N-E-V-E-R be swapped! :(
[Xperia Z5 Android Development] jianlin3062:
I mean, write the TA to the unofficial kernel
[Xperia Z5 Android Development] YasuHamed:
replied

#2596
[Xperia Z5 Android Development] shoey63:
What for? Use TA.img to make DK.ftf, flash it with Flashtool, then create a boot.img with DRM fix as per the OP. Everything will be as if bootloader was never unlocked, with all DRM keys intact (even though bootloader is actually still unlocked).
[Xperia Z5 Android Development] DanielMalmgren:
Hi. I'm trying to use these scripts for making my own kernel for my X Compact. I guess it isn't fully supported though, I get "There is no TWRP template for kugo. Install anyway?". Any tips on where to go from there? I need twrp...
[Xperia Z5 Android Development] alipendier:
[MENTION=4675598]shoey63[/MENTION]
[MENTION=5613633]YasuHamed[/MENTION]
[MENTION=357342]tobias.waldvogel[/MENTION]

I think what @ jianlin3062 is actually trying to ask is whether or not this tool can be used to create a personal kernel for use with other (non-official) ROMs such as AOSP, in other words would restoring (the correct) TA or DRMs have any effect (such as using xreality, camera etc) on those ROMs :cool:
[Xperia Z5 Android Development] YasuHamed:
well for [MENTION=8004595]FartyParty[/MENTION] i tried this script for Qcom Device msmhamster / variant rumi /

it did create boot image, i didnt hear anything back from him so i am assuming it worked for him (no news is good news)

https://xdaforums.com/showpost.php?p=72787080&postcount=125
[Xperia Z5 Android Development] jianlin3062:
It can not be used in 32.4.A.0.160
[Xperia Z5 Android Development] FartyParty:
OH, so sorry! I flashed AndroPlus v2 kernel instead because he posted he fixed the youtube issue!

But I thought you simply included su? Or did you do something else as well?
[Xperia Z5 Android Development] YasuHamed:
in the kernel provided by me ,

the following are disabled

sonyRIC, Encryptions, DmVarity , TWRP

the following are enabled

DRM FIX

and superSU is flashed.

there is no known twrp for XZP yet, nor for RUMI kernel Qcom so it was skipped
[Xperia Z5 Android Development] FartyParty:
Ok well it booted fine but DRM FIX didn't work but I already knew it wouldn't.

So yea, going back to AndroPlus V2 haha.
[Xperia Z5 Android Development] Berni-0815:
More input please; what error(s) occur(s)?
[Xperia Z5 Android Development] jianlin3062:
No TWRP No root
[Xperia Z5 Android Development] Berni-0815:
Hmmmm.... :confused:

Does the script work? Which errors are shown while executing the script? As you can see, a little bit more input is necessary to help you... ;)
[Xperia Z5 Android Development] arjun.arora:
So, DRM fix hasn't been achieved yet? This is really confusing.
[Xperia Z5 Android Development] FartyParty:
No, the one that currently exist doesn't work on XZP but works fine on XZ/XZS.
[Xperia Z5 Android Development] arjun.arora:
Someone should start a bounty for the XZP's DRM fix..
[Xperia Z5 Android Development] Berni-0815:
Here is the output of the script on my computer:

bernhard@arbeit-lin-win:/opt/rootkernel_v5.23$ sudo ./rootkernel.sh kernel.elf newimage.img
Rootkernel V5.23

- Unpacking kernel
Found elf boot image
Kernel version: 3.10.84-perf-g5e25a09
Found appended DTB
- Detected vendor: somc (Sony), device: suzuran (Xperia Z5 compact), variant: row
- Unpacking initramfs
- Detected platform: 64-bit
- Detected Android version: 7.1.1
- 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.82.zip. Install? [Y/n] y
Adding service entry for SuperSU
- Install DRM fix? [Y/n] y
- Install busybox? [Y/n] y
- Creating new initramfs
- Creating boot image
- Cleaning up
Done
bernhard@arbeit-lin-win:/opt/rootkernel_v5.23$

Later this evening (maybe tomorrow?) I'll try to install this rom and to flash my created bootimage. Then I'll see if it's working... :fingers-crossed:
[Xperia Z5 Android Development] FartyParty:
Yup, I would donate.
[Xperia Z5 Android Development] Mondor1979:
Is it possible to add some custom TWRP build when patching kernel with rootkernel? There is no TWRP supported for Xperia Z5 latest build ... So I have kernel without TWRP in it and it is not good ...
[Xperia Z5 Android Development] Fragmentation:
For those of you facing the notorious Skipping TWRP recovery. No kernel modules for 3.10.84-perf-XXXXXXX available error, @sceryavuz provided a viable solution here.

It's a bit, well... laconic, so I elaborated it in my evergreen Root Stock Firmware of Any Modern Sony Device guide. Check step #5, the section marked with "Attention!".

With this trick, you can use the original script by Tobias, without the need to get obscure modified ones.

And yes, it works for 32.4.A.0.160.
[Xperia Z5 Android Development] Berni-0815:
I've flashed the "Customized AU" 160'er and then my created bootimage and then TWRP 3.1.1.

Booting into TWRP works (Volume UP when LED is orange), but it's version 3.0.2.

System is booting; German language is supported. ;)

Everythings seems to work.

*#*#service#*#* shows that DRM and so on is ok.

System is 7.1.1.

Security patch level is 2017-06-01.

System is rooted.

Restoring of my LineageOS 14.1 is working with TWRP. :cool:

....done.... :good:
[Xperia Z5 Android Development] Mondor1979:
Any ideas how to pass Safety Net? It worked on .33 with patched kernel and it doesn't now on .160 ...

Here it is:
[Xperia Z5 Android Development] sceryavuz:
You can use TWRP 3.1.1.0 for Single and Dual devices..

Link : https://drive.google.com/drive/folders/0BxKcqvQU0FNMb3pyYjlPMTZGdjQ?usp=sharing

Just flash..

---------- Post added at 10:11 PM ---------- Previous post was at 10:06 PM ----------

Good tutorials :) No need to add modules for 3.0.2..

TWRP 3.0.2 is not completely support Android 7.1.x

Use TWRP 3.1.1.0 : https://drive.google.com/drive/folders/0BxKcqvQU0FNMb3pyYjlPMTZGdjQ?usp=sharing
[Xperia Z5 Android Development] Mondor1979:
I want to integrate it into kernel if it is possible. I have it already flashed.
[Xperia Z5 Android Development] jianlin3062:
The script works fine, no display error
[Xperia Z5 Android Development] Fragmentation:
I never managed to pass SafetyNet on Android 7 on my Z5 Premium. I even tried Marshmallow, but still without any success.

Well, TWRP 3.0.2 works fine with 32.4.A.0.160 (7.1.1) in a sense it can flash stuff as usual. Didn't try any other functions.

And as for the modules, rootkernel script requires them. Not sure they are actually used, but when they get added at least the script works as expected and integrates TWRP into the kernel.
[Xperia Z5 Android Development] whalesplaho:
No twrp modules for 3.1.1....

---------- Post added at 07:41 AM ---------- Previous post was at 07:39 AM ----------

Follow dis thread to pass safety net... Works fine!
[Xperia Z5 Android Development] YasuHamed:
out of context

can drmfix for xzp be achieved? they have changed the block location in TA, and now the script which had been pointing to one location has nothing.
[Xperia Z5 Android Development] whalesplaho:
For now nope... But surely soon!

Just hold on before unlocking BL!
[Xperia Z5 Android Development] sceryavuz:
E6633 latest patched kernel & twrp : Google Drive

Sony-RIC, dm-verity, drm-fix and latest busybox-1.26.2 installed.

fastboot flash boot name.img

fastboot flash recovery name.img

Use phh to root : Download

Use phh's SuperUser for ROOT management : Download
[Xperia Z5 Android Development] YasuHamed:
yess, i am waiting anxiously! sony has done WONDER with XZP

let see what XZ1 can do
[Xperia Z5 Android Development] whalesplaho:
I guess yhu own XZP right?? Whats yur take on it and tha comparison to S8 cos S8 was awarded best smartphone.
[Xperia Z5 Android Development] YasuHamed:
i am very biased toward sony!

I have never purchased Samsung ( the weapon of mass destruction :D)

XZP is faster, and everyone looks back at your hand when the golden hue flashback on their eyes :D

who awarded who best smartphone ??? :eek:

MWC2017 crowned xzp the best phone! for year 2017

all samsung did is booked millions of s835 chips so that competitors face shortage and delay their launch
[Xperia Z5 Android Development] whalesplaho:
I really envy yhu man... XZP is powerful, a beast in a mobile!!! Been a Sony boy too.:silly::victory::highfive:

http://www.gsmarena.com/mwc_shangha...alaxy_s8_best_smartphone_award-news-25894.php
[Xperia Z5 Android Development] Ptamigi:
Bro [MENTION=5813612]sceryavuz[/MENTION]

i flash the twrp3.1.1 via fastboot, but i get a error:( .(in attachment)

can you help?

My device is E6633
[Xperia Z5 Android Development] sceryavuz:
Oooh start with "how to use fastboot?" You don't have fastboot..

Install here : https://xdaforums.com/showthread.php?t=2317790

Or use Flashtool, then read my guide on signature.
[Xperia Z5 Android Development] Fragmentation:
Can you please point me to the specific post explaining how this can be achieved?
[Xperia Z5 Android Development] whalesplaho:
Its here buddy..... I posted tha thread already, just follow tha steps

https://xdaforums.com/xperia-z5/development/safetynet-stock-kernel-twrp-magisk-t3621133
[Xperia Z5 Android Development] YasuHamed:
well you MUST buy it then! , 4gigs ram is just too good to be tru! most of the apps you can disable! its awesome!

having said that

1. the phone is missing dt2w, once bootunlocked , the setting are there but disabled in kernel

2. once drm fix is out i will unlock it immediately

at https://xdaforums.com/showpost.php?p=72705384&postcount=44

i asked kernel from the member of his variant and i made modified stock kernel with this script. (remember flashtool don't recognize XZP kernel.sin as sin file as sony is using sinv4 format which is not supported by flashtool) (so i used UNSIN script to make kernel.sin as kernel.img and i ran the script)

the member reported that device woke up as ROOTED ( :D ) but camera not working :( ( drm fix issue)

FRANCE march 2017

http://www.phonearena.com/news/Sony...Best-New-Smartphone-award-at-MWC-2017_id91656
[Xperia Z5 Android Development] nicosea:
Android Nougat 7.1 Z5c - Freeze on boot logo

Anyone with the same problem and a solution?
[Xperia Z5 Android Development] Berni-0815:
You have to wait a few minutes....
[Xperia Z5 Android Development] sceryavuz:
Hi [MENTION=357342]tobias.waldvogel[/MENTION]

Some people said with dm-verity and Sony RIC disabled kernel, fingerprint sensor is not working. What is cause that?
[Xperia Z5 Android Development] Mondor1979:
fingerprint sensor is working fine 4 me. I've made kernel by myself 4 my phone: DM-verity off, RIC off, drm emulation on, busybox included and twrp 3.0.2-0 included (later reflashed to 3.1.1-0)

Root by the latest magisk. And of course many thanks 4 your safety net cleaning tool ...
[Xperia Z5 Android Development] sceryavuz:
I know it is working. I am using too, but not work on some people..
[Xperia Z5 Android Development] Mondor1979:
BTW your safetynet cleaning tool is NOT working with the latest Magisk-v13.0-170703.

Magisk just holds on safetynet check and stops if you try to restart the check.
[Xperia Z5 Android Development] sceryavuz:
You have to start with clean rom when you want to update. Dirty install won't work..