yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] Purecut:
[MENTION=357342]tobias.waldvogel[/MENTION]

I wanna thank you for your great work. Now I have a working Z5C with Kernel 5.23, TWRP and Superuser, root and N 7.1.1

Great - Thank you

---------- Post added at 05:37 PM ---------- Previous post was at 05:11 PM ----------

Go to the adb folder via command promt directly. If the adb stuff is not in the system path the file will not befound. In you cmd box go with cd to the right place where your files exists and star the flash from there. I should work.
[Xperia Z5 Android Development] Purecut:
Hi,

Q: Is it possible to update TWRP 3.0.2 with version 3.2 and if there's a way to integrate the version into the kernel
[Xperia Z5 Android Development] RaXelliX:
Not sure about integrating but updating is easy. Just flash 3.2 zip in existing TWRP and then power off. Once you boot into recovery again it will be running 3.2. Did this myself just yesterday. All my settings were still there too like timezone etc.
[Xperia Z5 Android Development] Purecut:
Hi,

you know hat 3.02 was integrated into the kernel. Did that mention in any way. You are using also this kernel? You have flashed it with flashtool?
[Xperia Z5 Android Development] RaXelliX:
Yes i know but i don't think it's a good idea to integrate it. I'm using this tool yes but stock kernel on X Compact. Just flashed system and kernel from 34.4.A.2.85 FTF to get June security patch. Then flashed modded kernel made with this tool on top.
[Xperia Z5 Android Development] Purecut:
Can you explain me how you did that. The 34.4.A.2.85 is for the X Compact version. Will the firmware 34.4.A.2.85 for X Compact run on theZ5C. So what must I do.

Can you explain the steps. Thanks
[Xperia Z5 Android Development] RaXelliX:
For Z5C i believe you have to user older version of this tool (or maybe it was for Z3C instead). Each firmware is for a specific phone. The last one for Z5C is 32.4.A.1.54 (Nougat 7.1.1) .Use XperiFirm to get it (Smartphone 2015 > E5803).
[Xperia Z5 Android Development] Purecut:
Oh I see. We are taking about to different kernels and Smartphones. To clear that to my first question.

I'm using the Z5C with firmware 32.4.A.1.54 (rooted) with kernel 5.23 (from this thread). I motified the stock kernel from 32.4.A1..54 with the tool from here. This tool integreates the TWRP 3.02. My question was to update the TWRP to version 3.1.1.

You wrote: Not sure about integrating but updating is easy. Just flash 3.2 zip in existing TWRP and then power off. Once you boot into recovery again it will be running 3.2. Did this myself just yesterday. All my settings were still there too like timezone etc.

Thats different. You are using a different phone with different firmware.
[Xperia Z5 Android Development] Berni-0815:
You are not the first one who asks this. It is asked and answered several times. Please read this thread more carefully and your question is answered... ;):angel:
[Xperia Z5 Android Development] Purecut:
Hi serajr;

can you please tell me where I can get your version that's integrate twrp 3.1.1 for N and Z5C. I only see version 2.5 for O. I read the complete thread but can not find it

---------- Post added at 12:20 PM ---------- Previous post was at 12:17 PM ----------

for me not. Some are telling to flash alone, serajr said hes working on a version to integrate 3.1.1. - nowhere a clean statement about this and yes i read the COMPLETE thread so I'm asking
[Xperia Z5 Android Development] Berni-0815:
No one has integrated twrp 3.1.1 (or newer; in fact there is a working 3.2.1!) into this tool until now! If someone is working on something, than he should tell us if he has finished... Until then I think any question is useless...

So, you have to flash twrp 3.1.1 (or newer) manually to get this version working.

And that's what you can read several times in this thread. :angel:
[Xperia Z5 Android Development] Purecut:
but no one is so clear words like you. Thank you for these words.

Q: If I run the script 5.23 again without the including of TWRP (3.02) must I clean something after flashing the boot.img and after the flash of TWRP 3.2.1, because I do not want to loose my settings.

I see also that the in 3.2.1 decryption is not working. What does that mean?
[Xperia Z5 Android Development] Berni-0815:
There is no need to clean anything.

If you are using an encrypted filesystem (or one partition), it may be that you can't access this anymore. But, unfortunately, I don't know exactly, because I don't use encryption...
[Xperia Z5 Android Development] YasuHamed:
what is your device! the script is no more supported by the owner. hence, the only way to flash latest twrp is via fastboot.

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

[MENTION=3989065]serajr[/MENTION] 's script doesn't integrate twrp because the script serves multiple devices hence integrating ONE specific twrp will not work for other devices (z4/z4c/z5/z5c/z5p/X/Xp/XZ/Xc & XZs)

hence twrp has to be flashed separately
[Xperia Z5 Android Development] KarsteinE:
Modified kernel for Xperia Z4 SGP712

I have tried this tool for various versions of the software, either I get bootloop and the device is stuck in flashscreen or it actually boots but the tabet is totally unresponsive to any touch. I'm currently on SGP712_Customized NOBA_1295-7866_32.2.A.5.11_R2C, the Nordic version. Does anybody have a solution to get this working? My main goal is to get TWRP recovery working but I haven't managed to get that either. I'm really at loss here.....
[Xperia Z5 Android Development] DHGE:
For my tablet I use for about a year now LineageOS.

Right now this is updating itself to the latest version.

The instructions on their website tell you how to integrate TWRP.

You might follow my link to get info on how to obtain the tool if you want for whatever reason stay with (unmaintained?) stock rom or how to just start TWRP.
[Xperia Z5 Android Development] Purecut:
how to integrate the latest security fixes or will there be a new version of the kernel coming out?
[Xperia Z5 Android Development] Purecut:
[MENTION=247703]tobias[/MENTION]waldvogel

Anyone here who is answering any questions or is this thread dead.
[Xperia Z5 Android Development] Klaus N.:
This is a tool for patching and repacking a stock kernel of some Xperia devices ;)

Have you already read the op?

What is your device? - If you have a Xperia X, X Compact, X Performance, XZ or XZs, then you should also take a look at this post!
[Xperia Z5 Android Development] shoey63:
If your device no longer receives them, you would have to compile the kernel from the last available source and cherry pick all the subsequent security fixes. Totally beyond the scope of this thread.
[Xperia Z5 Android Development] simply F:
Hi

Does it work only on Z5 and nougat? I'm trying to use it with my XA1 with Oreo.

Thank you
[Xperia Z5 Android Development] mbc07:
It won't work with Mediatek-based Xperias...
[Xperia Z5 Android Development] simply F:
Thank you...
[Xperia Z5 Android Development] javiwz:
Hello, the drm key of my z5 has gone, I don't need backup it anymore, so how I can root my Z5 got a custom recovery and flash a custom rom to it?
[Xperia Z5 Android Development] casouzaj:
If you already flashed TWRP, install Magisk beta v16.7 (https://xdaforums.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589) through it, in order to have your phone rooted. If you happen to fail the Saferynet tests, try to install 'MagiskHide Props Config' module through Magisk Manager's Download page, and reboot
[Xperia Z5 Android Development] Praetoriani:
Need some help.

I tried to make my own kernel for my Xperia Z5 Dual E6633.

So I took the Kernel.elf from an Android Nougat 7.1.1 FTF (32.4.A.1.54 1309-3895 R1E)

I started the script with:

rootkernel E6633_32.4.A.1.54_1309-3895_R1E_DE_Kernel.elf boot.img

This was the Output after the above command:

Rootkernel V5.23

- Unpacking kernel
Found elf boot image
Kernel version: 3.10.84-perf-g99119bc
Found appended DTB
- Detected vendor: somc (Sony), device: sumire (Xperia Z5), variant: dsds
- 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] N
- Sony RIC is enabled. Disable? [Y/n] N
- Skipping TWRP recovery. No kernel modules for 3.10.84-perf-g99119bc available
- Found SuperSU-v2.82-SR5-20171001224502.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

My Problem actually is following line:

- Skipping TWRP recovery. No kernel modules for 3.10.84-perf-g99119bc available

Why does this script not include TWRP? I know that there is a TWRP-Version which works with Android Nougat

I previously used TWRP 3.1.1.0 from the following post. And it worked.

[FTF][Android 7.1.1][ROOT][R/W][32.4.A.1.54] E66xx + Patched Kernels (Google Drive)

So what can I do, to include a TWRP-Version in my Kernel? Or, ... if this doesn't work for me:

Can I still flash the TWRP-Version mentioned above in fastboot mode after flashing this kernel?

Would be great if you can help me.

EDIT:

Additional Question:

I backed up my TA-Partition and now I want to reactivate them.

But how do I have to flash the DK.ftf I created with following command:

flash_dk TA-11082018-1655.img DK.ftf
[Xperia Z5 Android Development] yannik~:
Oh, I forgot to add how to actually use those:

build for your current platform:

make

cross compile for android:

export CROSS=/home/yannik/Downloads/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
export SYSROOT=/home/yannik/Downloads/android-ndk-r11c/platforms/android-21/arch-arm
export CC=${CROSS}gcc
export LD=${CROSS}ld
export AS=${CROSS}as
make ARCH=arm build

---------- Post added at 20:02 ---------- Previous post was at 19:51 ----------

Maybe to fix a bug or add a feature? Also, it helps the paranoid to be sure that the binary matches the code. It just allows contributions, just like the Makefiles I wrote or porting it to different sony platforms. It's the same reason it would be so great if you published the source of the LIB_PRELOAD wrapper you wrote, it just gives users freedom and decreases effort for you. Of course this is something that mostly developers would use this, but not ordinary users. Seeing how much interest your project sparked, this could be a great chance though! So many positives for no apparent downsides.

I would love to talk about this to you in private (I'm fine with german). Maybe I could take on the work of publishing the sources, possibly creating a README, if it decreases the effort for you.

Edit: Version control is ofc also very useful to quickly find the source of regressions, as these can be pin-pointed to specific changes much easier.
[Xperia Z5 Android Development] jackq:
I just want to make things clear, maybe i am wrong.

Im using old method - rootkernel 3.2

Extracted kernel.sin form ftf .185 germany, then extratced sin to kernel.elf

then sucessfully patched with rootkernel 3.2 using stock kernel and my TA backup

rootkernel <kernel image> <new kernel image> [TA backup]

then i flash this patched kernel via ADB

fastboot flash boot boot.img

then i flash TWRP trough ADB and SuperSU using recovery.

so if i am correct:

-i have restored up my TA keys,

-i have locked bootloader,

-i have a root

-i check and i can flash this patched kernel.img and recovery-TWRP.img trough ADB whenever i want (it's normal?).

my posts on other thread

http://xdaforums.com/showpost.php?p=66260239&postcount=18

http://xdaforums.com/showpost.php?p=66261585&postcount=22

So summary locked bootloader with root...

Here is my ss if i missunderstood something please explain and forgive ;)

BR, Jack.
[Xperia Z5 Android Development] tobias.waldvogel:
Your bootloader is unlocked, otherwise it wouldn't boot the modified kernel.
[Xperia Z5 Android Development] jackq:
So service info shows "fake locked" status?

Previously i have info "unlock allowed: no" when i have unlocked bootloader.

Let me quote
[Xperia Z5 Android Development] ninestarkoko:
Did you try wiping its data and cache and try again?

Thanks a lot mate. the command returns this error

< was unexpected at this time.[/QUOTE]

Try to redonwload the package, extract it in a folder without spaces in C: folder and try again.

if more errors then:

in the cmd window (black window where you enter commands) righ click and do "select"

Now select the errors you got and then just right click. This will copy the content of the cmd window and you can copy the errros here so we can analyze.

use androxyde flashtool http://www.flashtool.net/downloads.php to flash Dk.ftf. It's necessary for full DRM keys restoration

You should repeat the kernel patching using the latest version of the package by tobias. But before doing it you might need to unistall SuperSU as it might make the phone bootloop. You just need to patch kernel and not redo the DK.tft flashing if you've already done it. After that you should flash SuperSU 2.71 beta

You should redo all the passages again using the latest package if you want full restoration, including DK.tft flash. But before doing it you might need to unistall SuperSU as it might make the phone bootloop. After that you should flash SuperSU 2.71 beta.
[Xperia Z5 Android Development] tobias.waldvogel:
Where is it saying that it is locked? It is saying that unlock is permitted in contrast to some US models where it is not permitted.

What did you think what happened when you entered the unlock code with fastboot? The only way to lock it again is restoring the original TA partition. But then of course your device will not boot anymore until you restore the original Sony kernel image. Is that so hard to understand?

Before it may have shown "not permitted" before you activated the option "oem unlock" in the developer menu.
[Xperia Z5 Android Development] anjelz2012:
Thanks:thumbup: [MENTION=357342]tobias.waldvogel[/MENTION]

Enviado desde mi E6653 usando Tapatalk 2
[Xperia Z5 Android Development] Momogs:
Thank you Tobias. Working like a dream on 32.1.A.1.185!
[Xperia Z5 Android Development] Beast14:
Hi Tobias,

I understand, we have the same phone So let me confirm a few things from my side.

I have reflashed my phone's ROM like 5 times all together, confirming the below:

1. I flashed my stock ROM and wiped all data.

2. Generated the kernel.img with latest script 4.22 without SuperSU.

3. Flashed kernel.img with fastboot command and then I manually flashed SuperSU v2.65 after.

4. Boot into phone and see that after connecting with Flashtool, it gives root access denied in Flashtool. See screenshot.

5. I use 'System App Remover (Root)' to remove stupid apps i dont want. I try remove a system app and it succeeds. I then try remove a simple user app from there and it says failed (Ironic for a system app remover, isnt it?)

At this point, i knew something is wrong.

Step 4 and 5 always occurred 3 out of the 5 times i flashed from scratch, when i flashed SuperSU v2.65.

However, The other 2 times i flashed SuperSU v2.71 BETA LATEST. Flashtool confirms i am REALLY rooted (see 2nd screenshot) plus my system app remover no more gives error about user apps being removed and removes successfully.

To my understanding, SuperSU 2.65 with the generated kernel does not truelly root device because SuperSU isnt compatible with something in the generated kernel or something.

Though, flashtool confirms that when flashed with v2.71 BETA LATEST, device is really rooted with no issues.

I assume everyone trusts Flashtool to confirm if device is really rooted or not.

And yes in both instances i did Grant rights to ADB Shell in SuperSU when prompted.

My questions to you are:

- Will my SuperSU v2.71 update binaries successfully when newer SuperSU update comes out?

- Have you tried Xposed Framework and is it working flawlessly on your handset with SuperSU v2.65?
[Xperia Z5 Android Development] RyTekk:
Then you should come to SuperSU thread by Chainfire to report it, not here. And simpler, you just use 2.71 if it's OK, why do you want to flash 2.65 since it didn't work?
[Xperia Z5 Android Development] tobias.waldvogel:
Well that depends on SuperSU, not on me. ;) What I can tell you is that the actually SuperSU reside in an image file su.img in /data, which is writable. So I don't any reason why it shouldn't update. But as RyTekk already pointed out this probably more a question for the SuperSU thread.

Yes, it does. At least v79-v81.
[Xperia Z5 Android Development] slaskbak:
Excellent work!

Fully rooted with unlocked bootloader but with drm-keys fully working on a Xperia Z5 Premium E6853.

Thank you very much for your great work!
[Xperia Z5 Android Development] devilmaycry2020:
Really? All DRM key working, nothing lost
[Xperia Z5 Android Development] devilmaycry2020:
hi all

After run the command "rootkernel.cmd kernel.elf rootedkernel.img"

it created rootedkernel.img I rename it then run the command again it created same size rootedkernel.img but had different md5 checksum ? so is it ok ?

And this happened with flash_dk <TA-xxx.img> DK.ftf command. Same size DK.ftf but different md5
[Xperia Z5 Android Development] tobias.waldvogel:
The Sony MM kernel uses appened DTB, therefore it need to be gzipped. Gzip uses a stochastic algorithm for compression, therefore the result of a gzip operation is everytime different, which in change leads to a different MD5.

In Sony ELF format kernel and DTB are stored separately.
[Xperia Z5 Android Development] devilmaycry2020:
my phone still running LL so it's as same as MM ?
[Xperia Z5 Android Development] tobias.waldvogel:
Is the script somewhere saying "appended DTB detected"?
[Xperia Z5 Android Development] devilmaycry2020:
i don't understand what you say. i mean that i want to know the rootedkernel img is different but it's normal so i can flash it no problem ? Thanks
[Xperia Z5 Android Development] El_Rey:
Tobias.Waldvogel

i asked for help serveral times.. post #291, #169, but no reply.

Please could you say me how or provide a package of your rootkernel which include the touch_fusion_panel driver (max11945) from the twrp image i posted the link in post #291.

it would be very nice, if you could answer.

Thanks

Fabian
[Xperia Z5 Android Development] tobias.waldvogel:
I will have a look this weekend ;)

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] dermaze:
Hello,

the solution to have your appropriate kernel modules has already been described in this post.

The OP states as much regarding your TA-Partition:

In this post under "Step 7" the flashing of your DRM keys is described in detail.

Have fun. :)
[Xperia Z5 Android Development] Purecut:
Is it possible to include init.d into the kernel?
[Xperia Z5 Android Development] Asuka93sama:
Who can make root and twrp for Sony xperia l2 Duo?
[Xperia Z5 Android Development] Kommissar47:
Does this tool support Z4 Tablet with the latest stock firmware 32.4.A.1.54? I have touch screen issue after boot into system. TWRP 3.1.1-0 works fine
[Xperia Z5 Android Development] ouzqan:
Which device version? H43311 or H4331 . I can try but i havent L2 Duo. :(

---------- Post added at 03:27 PM ---------- Previous post was at 03:19 PM ----------

Hi man can you update twrp version pls?

---------- Post added at 03:46 PM ---------- Previous post was at 03:27 PM ----------

I can help you.

[MENTION=357342]tobias.waldvogel[/MENTION] Hi man can you update twrp version pls?
[Xperia Z5 Android Development] Asuka93sama:
device version H4311. software 49.0.A.5.70_R7A
[Xperia Z5 Android Development] ouzqan:
okey :good:
[Xperia Z5 Android Development] stereo007:
Is there a download for rootkernel_v5.23_Windows_Linux.zip? Please
[Xperia Z5 Android Development] Klaus N.:
OP???
[Xperia Z5 Android Development] ouzqan:
You must look first message.
[Xperia Z5 Android Development] stereo007:
I know I had 404 all day today. Now it works. :good:
[Xperia Z5 Android Development] tanfidzularus:
Syntax error

Please help guys,

Im on x compact and getting this error
[Xperia Z5 Android Development] DHGE:
PATH too long?

What happens if you move your stuff to c:\rk ?
[Xperia Z5 Android Development] tanfidzularus:
Still got the same error. Im on win 7 64
[Xperia Z5 Android Development] Klaus N.:
Give it another try with

rootkernel.cmd kernel.elf boot.img

Btw., I'd recommend to use Igor Eisberg's UnSIN tool to convert the kernel.sin. In that case the command must be:

rootkernel.cmd <name of your kernel>.img boot.img
[Xperia Z5 Android Development] tanfidzularus:
I manage to extract sin file With igor tool. But unfortunately the results when i try to repack it just the same error. Is there any other way to do it?
[Xperia Z5 Android Development] Klaus N.:
What is the exact output of the kernel after converting it with UnSIN? Btw., when you use UnSIN to convert, you have an img file, and not an elf; therefore you have to enter in cmd:

rootkernel.cmd <name of your kernel>.img boot.img, and

not

rootkernel.cmd <name of your kernel>.elf boot.img :D
[Xperia Z5 Android Development] tanfidzularus:
I think im at lost here. I thought Unsin only convert kernel.sin and create kernel.elf

Can u be more spesific please...
[Xperia Z5 Android Development] Berni-0815:
Yes! Try FlashTool...
[Xperia Z5 Android Development] M althaf:
Hiii, i havent yet updated the rom to new version ill wait till he resolves the bugs , i have to say the rom is super smooth i get better battery usage than stock and phne is faster .i have one question, ive enabled guestures now and there is a pill like icon from which i used to swipe it looks big (to me lol) can anyone tell me how do i reduce the size of it?? Or edit the gesture settings am on 2.9 something?
[Xperia Z5 Android Development] Klaus N.:
If you upload your kernel.sin, I will it repack for you ;)
[Xperia Z5 Android Development] tanfidzularus:
If its not too much, why dont i just upload my backup TA file & kernel.elf and please run this root kernel scripy for me :D
[Xperia Z5 Android Development] Klaus N.:
Please send me a pm.
[Xperia Z5 Android Development] tanfidzularus:
Done. Link sent
[Xperia Z5 Android Development] Xentiran:
It works?

So I managed to repack the boot image and everything, the phone boots up and all. The only thing that doesnt work is TWRP. It used to work before. I have a Xperia Z2 and I all I want to do is to disable RIC basically, but unless it can but up into TWRP mode idk what to do basically lmao.

Edit: Nvm HAHA, it worked anyway. Idek myself lmao. Been so deep into this with my old phone using Marshmallow because thats what it and people usually did **** with it long before Marshmallow so... yeah
[Xperia Z5 Android Development] Ps24u:
How can I update busybox after I used Rootkernel to incorporate busybox in boot.img?

The busybox bundled in rootkernel is super old..

When i try to use busybox stericson apk installer from play store, it's unable to install/update to /su/bin.

Please help.

Also something strange, i cannot disable Developer Options, the slider always comes back to "on" on its own.

I suspect it is because "Allow unlock OEM BL" feature has been used before..?

Edit:

Ok , this patcher, while excellent is outdated.

When embedding superSU 2.82, it installs to su/bin, which is deprecated and the reason why busybox from play store won't install properly.

When saying no to superSU and busybox when patching, and then flashing superSU 2.82 manually, it installs properly to su/xbin and busybox from Play store installs its binary correctly systemless.

[MENTION=357342]tobias.waldvogel[/MENTION] please update the patcher to support the new path for superSU, and the busybox binary if possible too!
[Xperia Z5 Android Development] Berni-0815:
Last Activity: 5th May 2018 16:53

:confused:
[Xperia Z5 Android Development] YasuHamed:
thanks for the workaround

however if you flash MAGISK, reboot and simply install this busybox, it works too

https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer
[Xperia Z5 Android Development] capaill:
Hi, would anyone have a download link for V5.23? I and getting 410 error with the link in the first post. Thanks
[Xperia Z5 Android Development] zynexiz:
Just downloaded it, worked for me.