yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] shoey63:
Not quite that simple I'm afraid. . .

I still own, and use an XZ, (as well as a Z3).

- On Windows, unpacking and repacking the XZ elf with RC1 (even without modification) APPEARS to work fine. However, flashing the resultant boot.img causes a persistent red LED. ie: No boot.

- On linux Mint Sarah (Based on Ubuntu 16.04) It won't even unpack using

bash rootkernel.sh kernel.elf boot.img

It errors out saying

- Unpacking kernel
Found elf boot image
rootkernel.sh: line 55: unlzop: command not found
Kernel version:
- Could not determine device
Abort
[Xperia Z5 Android Development] Antho02:
so the rc1 includes z5 compact files for the twrp working with .253 kernel?
[Xperia Z5 Android Development] Phazonclash:
EDIT: Nevermind. 5.0 RC1 works with .253

Solution to patch the .253 kernel + TWRP 3.0.2, until tobias updates rootKernel:

1) Go to rootkernel/Android/twrp_common_kmodules

2) Make a copy of the 3.10.84-perf-g4a67e86 folder

3) Rename the new folder you just copied to 3.10.84-perf-gf1cfa5f

4) Use RootKernel as usual

You'll be able to patch your kernel using rootkernel normally, with all the needed stuff (disable RIC and dm-verity, install TWRP, busybox and DRM fix, etc.)

View attachment 3811770
[Xperia Z5 Android Development] KbaB.BroS:
Too late bro, the RC1 file you can download in OP has already done this.
[Xperia Z5 Android Development] Phazonclash:
Nice, that was fast! I didn't know ;)

You guys can ignore my previous message then :P
[Xperia Z5 Android Development] SovPanda:
Placed xposed 86 inside your script, but after everything is done, I get the following log after downloading the xposed installer. I'm probably missing a step, would appreciate any help

Cannot read log/data/data/de.robv.android.xposed.installer
[Xperia Z5 Android Development] Nayibmc:
How can I re-unlock the bootloader after restoring the TA partition? I can't update SuperSU binaries nor install a new ROM
[Xperia Z5 Android Development] Mastermagnus:
Wait, does the script add xposed too? The first post didn't say that... How can I add xposed with the script? TWRP still doesn't work on my phone...
[Xperia Z5 Android Development] SheridanJohn:
Greetings!

Thanks for this really great tool!

I have two issues with the 5.0-rc1:

On my Z5 dual (E6683), everything works nicely (TWRP, SU, DRM), just Xposed (85 and 86 tested) is not found, when I install it with rootkernel. If I flash it through TWRP, XPosed works.

On my Z4 Tablet (SGP771), it is not so fine: The touch screen is not working with the rooted kernel (settings: DM-verity off, RIC on, TWRP installed, busybox no, SuperSU 2.76, no Xposed, DRM fix yes (device key was flashed). Just to clarify: The touch screen is not working at all, also in the normal system. With rootkernel 4.51 and AndroPlusKernel, the touch screen works nicely, both in normal system AND TWRP.

If I can help with logs or so, please let me know!
[Xperia Z5 Android Development] Chito307:
Xposed will not work properly on beta 10 or rc1 without busybox. Busybox needs to be installed in order for xposed to show up properly in xposed app
[Xperia Z5 Android Development] SheridanJohn:
A litte side note: In the AndroPlusKernel thread of the Z4 Tablet (http://xdaforums.com/z4-tablet/development/kernel-andropluskernel-v1-t3170689) it is indicated that the touchscreen issues are related with the new DRM fix. AndroPlusKernel in v32/v33 also has this issue currently and the maintainer is working on it. Could it be that the DRM fix used for the rootkernel script is also the cause?
[Xperia Z5 Android Development] ninestarkoko:
Hello Tobias, can you confirm there was a battery-draining bug in Drm emulation and this has been fixed in the latest betas? Everyone out there claims this is the solution to idle battery drain, but I could not find precise confirmation in your posts...have I missed something?
[Xperia Z5 Android Development] zacharias.maladroit:
I'd say it's probably both:

improvements and changes in the Sony ROM itself and improvements in Tobias ramdisk changes and DRM emulation,

because even before unlocking the bootloader I had very high battery drain,

but now it's gone (9 hours 0% lost with Airplane mode)
[Xperia Z5 Android Development] Soheil_rf:
[MENTION=357342]tobias.waldvogel[/MENTION]

Please update rootkernel for lastest frimware 32.2.A.0.253 Xperia Z5 Dual
[Xperia Z5 Android Development] osm0sis:
Looks like ramdisk support for the one you tried needs lzop, but that it otherwise split the ELF correctly.

I was just using his unpackelf applet, not actually applying his whole patching script. Can you try just unpackelf and see if what it splits (plus the info it outputs) will build a working boot.img from AIK's mkbootimg?
[Xperia Z5 Android Development] shoey63:
unpack. elf is inside bootimg binary right? How do I execute it on the command line?
[Xperia Z5 Android Development] RyTekk:
Download latest version (5.0 rc1), dude.
[Xperia Z5 Android Development] osm0sis:
It's a multi-call binary like busybox, so (if I recall correctly): bootimg unpackelf -i kernel.elf -k zImage -r ramdisk.cpio.gz -d dtb
[Xperia Z5 Android Development] ShadowElite:
Hi, it seems that DRM fix doesn't work on lastest 5.0 RC1 for Z2, thanks.
[Xperia Z5 Android Development] Soheil_rf:
Yes its worked perfect :good:

Thanks for reply
[Xperia Z5 Android Development] doinkydoink:
Disabling Sony RIC

I have left Sony RIC enabled when I first root my Z5 using the tool.

Realise that is I do really prefer to have the option to make changes to file in /system without going to recovery since I do not have the technical know how.

Do I just run the tool again?

Do I just need o choose disable Sony RIC when prompt and ignore the rest or do I need to redo TWRP and SupserSU?

May thanks!
[Xperia Z5 Android Development] Klaus N.:
- Yes, you have to rerun the tool.

- As you're flashing the boot.img, you've to say "yes" to all you want to include/change inside the kernel, because flashing the boot.img overwrites the old kernel settings on your target device.
[Xperia Z5 Android Development] doinkydoink:
Thanks. So I need to also repeat the flash dk step?

Sorry for the typos..am using auto correction.
[Xperia Z5 Android Development] tobias.waldvogel:
The flash_dk step is only once. You never need to repeat it again [emoji6]

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] YasuHamed:
sirs,

i am getting stuck at this

- it fails to write boot.img

plz help

- Detected vendor: somc (Sony), dev
- Unpacking initramfs
- Detected platform: 64-bit
- Detected Android version: 6.0.1
- Disabling dm-verity
- Sony RIC is enabled. Disable? [Y/
Disabling Sony RIC
- Skipping TWRP recovery. No kernel modules for 3.10.84-perf-gf1cfa5f available
- Install DRM fix? [Y/n] Y
Configuring keyprovd
Configuring tpm-service
Configuring credmgrd
Configuring secd
Configuring wvkbd
Configuring drmserver
- Creating new initramfs
- Creating boot image
error: could not create ''
- Cleaning up

edit1. i was giving incorrect command, its CREATING BOOT.IMG now :)
[Xperia Z5 Android Development] doinkydoink:
Thanks! Managed to toggle RIC setting :)
[Xperia Z5 Android Development] jing000l:
hi sir

is there any un necessary files that i can remove to have both xpose and supersu?

Edit : the issue is not related to size of new supersu and xposed,i tested older versions that have less file size and got same error.

so my question is, if flash xposed in recovery (TWRP) the device will boot up?

another problem is when i encrypt the device,is there any way to mount system and data on recovery?

thanks in advance

edit2: yes it boots
[Xperia Z5 Android Development] YasuHamed:
i would suggest to install ONLY TWRP or any other recovery via this method. embedding SU / BusyBox / Xposed etc later give issues such as

1. battery draining

2. updating problems (either via APK (google play) or flashable.zip)

once you have recovery, flash every thing via recovery.

Tip: (run CMD as administrator)

thankx
[Xperia Z5 Android Development] Klaus N.:
Is someone able to boot his E6653 (with 253 fw and repacked kernel with v5 rc1) from system directly into recovery (e.g. with NEO Power Menu or APM+)?

Thanks in advance!
[Xperia Z5 Android Development] sandeep_sp:
not able to boot . any idea ?
[Xperia Z5 Android Development] SovPanda:
Anyone else not getting the drmfix on.253 using rc1?
[Xperia Z5 Android Development] tobias.waldvogel:
Which device do you have?

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] Klaus N.:
It works both here, repacking with Linux and Windows 10.

The only thing I've recognized is that in post #71 mentioned. But I don't really know, if it's related to rc1 or the new 253 fw.
[Xperia Z5 Android Development] raphoun:
In RC1 version Windows Defender found a Trojan:Win32/Varpes.M!cl in bootimg.exe, am I the only one??
[Xperia Z5 Android Development] tobias.waldvogel:
That would be very surprising. But you are welcome to compile it yourself and to compare the result.

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] simonwil:
I have the same on Windows 10 though previous versions download OK. I then downloaded at work which has Trend antivirus with no issues. Must be a false positive in Defender.
[Xperia Z5 Android Development] raphoun:
I replaced it by the one of v4.51 version which is not detected by Defender
[Xperia Z5 Android Development] tobias.waldvogel:
The version from v4.51 does not support unpacking the boot images of the very old Xperia models besides that there is no difference

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] shafiq01:
Write block towards system partition as I understand. Maybe same as adb shell mount -o remount,rw /system
[Xperia Z5 Android Development] paulle:
Thank you for explaining

---------- Post added at 05:44 PM ---------- Previous post was at 05:34 PM ----------

TWRP 3.0.1-0 is out
[Xperia Z5 Android Development] acabreram:
[MENTION=357342]tobias.waldvogel[/MENTION] sorry for being noob

I extracted kernel. elf but when I try to run script I get output : kernel.sh no found

what can i do?

I want to learn how to do this please,

I just want the stock kernel with DM-Verity, Sony RIC switches off

Drm restore i want apply separate because you are planning release a version with the drm backup with iovyroot right?

Device: Z5C E5823

Thanks in advance!
[Xperia Z5 Android Development] tobias.waldvogel:
Try to run it in a directory without spaces in the name. (There is a space between Arturo and Cabrera ;))

I will fix this in future versions.
[Xperia Z5 Android Development] acabreram:
I tried but still nothing i got the same rootkernel.sh not found

I ran it on c:

---------- Post added at 02:36 AM ---------- Previous post was at 02:33 AM ----------

Ok solved! The problem was ths spaces in the folder´s name!!

Thanks bro!!!

unlocking bootloader now....
[Xperia Z5 Android Development] zohaib0001:
[MENTION=357342]tobias.waldvogel[/MENTION]

I have Xperia Z5 E6653 running 6.0 23.1.A.1.163 firmware

i convert my kernel.sin in kernel.elf and also root it with your tool, but after flashing it into phone, my z5 not boot up and restart it self from xperia kernel logo

my phone is rooted and i am using AndroPlusKernel with his recovery 3.0.1

Where i am doing wrong, Can you help me ??
[Xperia Z5 Android Development] josephnero:
Sorry if it's been asked before but I have imported Z5 dual E6633.would this work?
[Xperia Z5 Android Development] celderic:
SuperSU in the system partition? Sounds like the same issue I had.

http://xdaforums.com/showthread.php?p=65933687
[Xperia Z5 Android Development] tobias.waldvogel:
Did you build the ftf image yourself? May be you have forgotton to update the bootloader. It happended to someone else as well
[Xperia Z5 Android Development] tobias.waldvogel:
It should work on any Sony 64bit device, in particular all Z5 ;)
[Xperia Z5 Android Development] sxtester:
[MENTION=3555225]pikeylfc[/MENTION]:

Anyone able to confirm this indeed works on Z3+/Z4? Just went through the whole of the thread but could not find anyone posting success, hence asking again to play it safe.
[Xperia Z5 Android Development] amintox:
the kernel created with 3.1 with your first DRM patch works. but the new method (which uses my original DRM) doesn't. i used 3.2 and my TA backup

EDIT: i do confirm that this works after deleting (data/credmgr/credmgr.db) in recovery. i tried noise cancelling headphones and it works very nice. what else can i try to see if everything is working ?

NOW unlocking a Boot Loader is not a problem anymore. Thank you SO much...
[Xperia Z5 Android Development] ramone01:
E6603 works confirmed, but recovery is not works %100, (with v3.2).

Im changed my stock MM kernel.elf file that tool and, flash over androplus v20. Then phone boots vell, than i want drmrestore than go to recovery but it dont show my phone memory, after restart it show phone memory but it dont show sd card (0MB). I hope you will fix this. And thank you very much.
[Xperia Z5 Android Development] devilmaycry2020:
[MENTION=357342]tobias.waldvogel[/MENTION]

So do I have to unlock bootloader first then use your tool to convert stock kernel to modded stock kernel with DM-Verity and Sony RIC disabled Or not ? Thanks
[Xperia Z5 Android Development] acabreram:
[MENTION=357342]tobias.waldvogel[/MENTION] bro if I flash another recovery it will change the kernel too?? or only the recovery partition will be change?

I want update the recovery (3.0.1) with this http://xdaforums.com/z5-compact/orig-development/twrp-suzuran-twrp-3-0-t3334568

Thanks!
[Xperia Z5 Android Development] addicted1900:
you should backup your TA-Partition first with iovyroot (OEM-Cross development Section). Then you can unlock your Bootloader.
[Xperia Z5 Android Development] tobias.waldvogel:
I will port it in the next days

Basically it is just updating the files in /Android/twrp of my script package ;)
[Xperia Z5 Android Development] jugglerpl:
Hello.

I try use tutorial. Firstly I did a copy of my TA-Partition with iovyroot. Next I unlocked bootloader. Now I am trying create kernel:

1. I extracted kernel.sin to kernel.elf.

2. I did command and I created new file kernel_mod.sin:

rootkernel kernel.sin kernel_mod.sin

3. I try testing new kernel with command below, but when my mobile finished started carrier network is unavailable (information about missing SIM, but SIM is present).

fastboot boot kernel_mod.sin

Is it normal? I am not sure should I flash this kernel.

Second question is about using my backup. Is it this command is correct and it create kernel with my backup?

rootkernel kernel.sin kernel_mod.sin TA.img

Kernel.sin is part of my firmware (Android 6.0 32.1.A.1.163). My copy was created on 32.0.A.6.152 (Android 5)
[Xperia Z5 Android Development] Arturiuz!:
i think the problem started with the .152 firmware you'ved used & backed up..not sure about this though,but i THINK this works on .200 firmware with no issues like yours now..
[Xperia Z5 Android Development] jugglerpl:
Ok, but in first post wrote that tutorial should be works on Android 6 ;)

Finally I flashed kernel and carrier works (in testing mode it doesn't work). :)

Can someone confirm does command which I placed below is correct and I created correct kernel with my DRM keys?

rootkernel kernel.sin kernel_mod.sin TA.img

How I can check simply does my functions of Sony works? Is it confirmed that quality of photo are the same as earlier?
[Xperia Z5 Android Development] WildBit:
Thanks dude, you Rock!

Get yourself a coffee... PP Confirmation number: 27Y41203TE418141P
[Xperia Z5 Android Development] SovPanda:
xperia z5, using the generic german firmware
[Xperia Z5 Android Development] mdmrecords:
Hi! Sorry for the question, but is there any possibility to root the new Sony Xperia x, yet? I do not mean xperia x performance, since this device seems to be available to root.

Thank you!
[Xperia Z5 Android Development] jing000l:
Thanks mate,

Correct me if I'm wrong, but i think flashing supersu via recovery (system root) causes to not working encryption

Is it related to kernel? Or maybe I'm doing something wrong?
[Xperia Z5 Android Development] YasuHamed:
it has nothing to do with encryption. everything works just fine. i am on UB, rooted kernal to have /sys folder access via superuser. 2.76. batterlife is also ok.

if you send me your kernel.elf, i will make BOOT.IMG for you to flash your device
[Xperia Z5 Android Development] Klaus N.:
I don't know, what's going on with my device. My phone works fine so far, but I can only enter twrp manually (vol+). Even when in twrp, tapping "reboot > recovery" or "reboot > bootloader", it always reboots into system. I believe, at least I've to do a factory reset - or install from the scratch :rolleyes: :p
[Xperia Z5 Android Development] tobias.waldvogel:
This happens only with 5rc1. I removed the check for the command line recovery request in order to let the Sony fotaupdate handle the recovery request. But as it seems that fota update is not working anyway I can activate it again or add a new option to the script so you can choose [emoji6]

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] Klaus N.:
Thanks Tobias for your quick reply, that'd be great (unfortunately I've already deleted the beta10 from my computer)!
[Xperia Z5 Android Development] escolhido:
Hi,

Sorry for such a base question, but can you list the practical differences between a drm-fix and a full TA-restore?

I have UB without TA backup but applied your fix with success and now have been offered to trade my Z5 for a new one (which I would be able to bkp TA prior to UB), and would like to know if it is worth the hassle...

Thx in advance.
[Xperia Z5 Android Development] guhvanoh:
Yep, it's worth the hassle. You get a new fone. You get to do things properly. It's summer (in the northern hemisphere), what better way to while away time...
[Xperia Z5 Android Development] Klaus N.:
Does someone still have v5 beta10 on the pc?
[Xperia Z5 Android Development] bruno$0:
How can i disable the root temporarity?
[Xperia Z5 Android Development] zacharias.maladroit:
Lol, you're lucky

I had one still on my Windows partition :D
[Xperia Z5 Android Development] Klaus N.:
[MENTION=3037651]zacharias.maladroit[/MENTION]

Thanks alot :D
[Xperia Z5 Android Development] KbaB.BroS:
I'm getting error 1 on Xposed systemless v86.2 when trying to install in TWRP included in the kernel. Works fine on other recoveries like Androplus multiboot version.

I tried making a kernel with the tool and at the same time use another recovery, however if I exclude TWRP installation in the script the kernel is not patched and cannot therefore boot into TWRP.

Edit:

Anything that tries taking advantage of SuperSU 2.76 doesn't work. XtremeMusic systemless can't add its files into the /su folder when flashing with this recovery. Again, if I tried it with Androplus TWRP recovery it works.
[Xperia Z5 Android Development] Klaus N.:
The only thing I can say, take the official one of Xposed Framework by repacking the kernel.

Edit:

About v5 beta10:

Ok, I forgot, with 253 fw, there's no twrp availabe. Good, went back to rc1 and live with manually entering twrp ;)
[Xperia Z5 Android Development] KbaB.BroS:
QUOTE=allayarov.i;67716583]Everything seem to be ok except TWRP. I think new kernel modules (for 3.10.84-perf-gf1cfa5f) should be added in order to include recovery. I asked guys from Xperia Z5 Compact thread upload module files.

Attached new kernel modules for rootkernel. I think it will be useful for Tobi. :o

Patched kernel http://xdaforums.com/showpost.php?p=67716814&postcount=312[/QUOTE]

Download the file attached from [MENTION=5550858]allayarov.i[/MENTION], unpack it and move it to this directory in the rootkernel folder:

Android\twrp_common_kmodules

TWRP recovery should work now

Follow this guide to make beta10 work with. 253
[Xperia Z5 Android Development] KbaB.BroS:
Download the file attached from [MENTION=5550858]allayarov.i[/MENTION], unpack it and move it to this directory in the rootkernel folder:

Android\twrp_common_kmodules

TWRP recovery should work now

Follow this guide to make beta10 work with. 253[/QUOTE]

Attaching the file here instead
[Xperia Z5 Android Development] Klaus N.:
Attaching the file here instead

There's no problem so far: Using v5 rc1 from startpost works fine. The only thing is, you can't enter neither (reboot) recovery nor bootloader directly from twrp; you've to do it manually (vol+). But Tobias already left a comment to that. I thought, that with the beta 10 it still worked. It does, but only until fw 224. Skipping the install of twrp occurs in beta10 only on fw 253 ;)
[Xperia Z5 Android Development] KbaB.BroS:
Ok then, I only wanted to help you make beta10 work on .253
[Xperia Z5 Android Development] Klaus N.:
Thank you, you're welcome. I'll try that tomorrow.
[Xperia Z5 Android Development] palmacas:
Hi, with this method can I restore the DRM Keys and then relock the bootloader?

Thanks
[Xperia Z5 Android Development] KbaB.BroS:
Short answer: no

Long answer: any type of modification to the stock kernel will result in that the system won't allow it to boot.
[Xperia Z5 Android Development] Klaus N.:
No, this tool fully reactivates your drm-keys, if you managed a ta-backup before unlocking the bootloader; the bootloader will not be relocked with it (see startpost).

If you want to restore the drm-keys (restore the ta-backup) and relock the bootloader, take a look into post #2 of this thread: http://xdaforums.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597
[Xperia Z5 Android Development] xtacy!:
Uh, so there's no TWRP when on .253 fw? (I used v5.0_rc1)
[Xperia Z5 Android Development] KbaB.BroS:
Yes there is TWRP for .253
[Xperia Z5 Android Development] xtacy!:
Hmmm. Can't seem to boot into recovery neither through phone nor by pressing volume up/ volume down keys. Any tips?
[Xperia Z5 Android Development] KbaB.BroS:
When you run the script, what does it say?

Also which phone do you have?
[Xperia Z5 Android Development] xtacy!:
Don't have the log right now. Will try patching the kernel again.

I use a Xperia Z5 (E6653).
[Xperia Z5 Android Development] xtacy!:
Doesn't seem to have worked. Still can't boot into recovery.

C:\Users\xxxxx\Downloads\rootkernel_v5.0_rc1_Windows_Linux>rootkernel kern

el.elf kernel_patched.elf

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-gf1cfa5f

Found appended DTB

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

- Unpacking initramfs

- Detected platform: 64-bit

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

- Install busybox? [Y/n] Y

- Found SuperSU-root-BETA-v2.67.zip. Install? [Y/n] Y

Stripping SuperSU app

Adding service entry for SuperSU

- Install DRM fix? [Y/n] Y

- Creating new initramfs

- Creating boot image

- Cleaning up

Done
[Xperia Z5 Android Development] tobias.waldvogel:
Does the LED change to yellow for a few seconds when you boot up your device?

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] palmacas:
Ok, what if in the future I want to relock the bootloader? Can I just flash a stock kernel and it will work fine?
[Xperia Z5 Android Development] KbaB.BroS:
If you didn't make a TA backup,

You need to flash stock everything and then relock bootloader with Flashtool for example. Your DRM keys are forever lost however so keep that in mind.

If you made a TA backup,

Downgrade to lollipop and restore your TA backup with iovyroot, bootloader will relock automatically. You have stock with your DRM keys now. Flash the latest FW and you're good to go.

You have to factory reset in both scenarios to avoid bootloop when you relock or downgrade.
[Xperia Z5 Android Development] yok3r:
Any option to install TWRP in 32.2.A.0.253 firmware for Z5 Compact?

Thanks in advance :)
[Xperia Z5 Android Development] Klaus N.:
With v5 rc1 it should be possible.