yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] adop40:
Me too. I'm facing the same problems.

Gesendet von meinem E6833 mit Tapatalk
[Xperia Z5 Android Development] PDesire:
Just a littile thing.... ****S ALL UP, need help

So as far as some people maybe now my E6833 makes many problems on Modifying.

If i want to use this tool i ever have to extract the modified ramdisk of it and compile own kernel with own methods (mkqcdtbootimg, Stock google toolchain and Non compressed Image) and these ones are required to make it boot (weird but okay).

So now come to my real problem: i downloaded the kernel source from Open source archive today (not kernel-copyleft) and a weird thing happened:

I compiled the kernel in same way as i have done before, result: Bootscreen appears without doing anything (ramdisk works because i could boot into twrp). Same with stock ramdisk. The kernel source itself isn't modified at all.

Then i tried a second method to disable dm verity and so on with SuperSU, result: installation fails

Is that just a Z5 Premium problem? It's becoming more and more weird every update.

And if i use the rootkernel made boot.img the phone doesn't start at all anymore

What i can do now to get Nougat work WITH dm off, DRM patch and TWRP?

if you need more infos i can provide them

Thanks

Your PDesire
[Xperia Z5 Android Development] Nyuubi:
PM'ed you the links for the files. Here's the error I get:

Rootkernel V5.20

kernel.elf: line 1: syntax error: unexpected word (expecting ")")
[Xperia Z5 Android Development] cyberwytch:
I get the same error on 5.20. 5.11 works fine though, it's what I used with today's upgrade.
[Xperia Z5 Android Development] RyTekk:
Get error on Linux too

rootkernel.sh: line 865: syntax error near unexpected token `$'do\r''
rootkernel.sh: line 865: `	for target in default_prop log_tag_prop log_prop'logd_prop log_tag_prop dalvik_prop config_prop vold_prop system_prop; do
[Xperia Z5 Android Development] cyberwytch:
Yeah I'm using Linux, it seems like something's wrong in 5.20 but you can use 5.11 as long as you don't need superuser and can use SuperSU. I'm not enough of a bash guru to figure out the issue unfortunately.
[Xperia Z5 Android Development] RyTekk:
I replace rootkernel.sh from 5.11 on 5.20 as a workaround (for me) to run the script and get rid of sdcard mount error in twrp.
[Xperia Z5 Android Development] cyberwytch:
Thanks for the tip, that worked for me too :)
[Xperia Z5 Android Development] Nyuubi:
Just tried as a last resort but I just found out that the only working version of your tool for me is v4.31, so maybe you could work from there for future updates.
[Xperia Z5 Android Development] russel5:
[MENTION=357342]tobias.waldvogel[/MENTION] hello. How about support old sepolicy with your new options like supersu, because new seinject not work with sepolicy 6.0.1

C:\test>rootkernel.cmd kernel291.elf boot.img
Rootkernel V5.20

- Unpacking kernel
Found elf boot image
Kernel version: 3.4.0-perf-gc14c2d5
- Detected vendor: somc (Sony), device: aries (Xperia Z3 compact), variant: row
- Unpacking initramfs
- Detected platform: 32-bit
- Detected Android version: 6.0.1 (sdk 23)
- Sony RIC is enabled. Disable? [Y/n] Y
Disabling Sony RIC
error: error(s) encountered while parsing configuration
- Install TWRP recovery? [Y/n] Y
Installing TWRP
Usage: fctxinject -i input file -o output file -p path -w -d context [ -d (dump) ] [ -q (quiet) ]

error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
- This adbd requires authentication. Add your public key? [Y/n] Y
Compressing TWRP image
- Install DRM fix? [Y/n] Y
- Install busybox? [Y/n] Y
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
error: error(s) encountered while parsing configuration
- Creating new initramfs
- Creating boot image
- Cleaning up
Done
[Xperia Z5 Android Development] knop3x:
Clarification

Hey everyone. I realize after all the back-and-forth with the nougat rollout, and also with the newes version of the tool there is some confusion to its workings - at least for me. So please, can somebody who really knows the answers to the following questions help me:

I would like to achieve the following: I would like to upgrade my Z5C (E5823) to the newest Nougat (32.3A.0.376) with DRM-fix. I would like to have RIC enabled, TWRP installed, busybox not installed. Also, I would like system-less root (either SuperSU or superuser, see Q3 below) and system-less x-posed.

Q1) I have read people having trouble with rootkernel 5.20 and the newest firmware release. Why is this?

Q2) Is it possible to have RIC enabled and root access?

Q3) What's up with this battery-drain with SuperSU since nougat? Where is the difference between SuperSU and superuser? Is it still possible to have a system-less installation of either of the too?

Q4) To make things a lot easier: Does somebody already have a 32.3A.0.376 boot.img with my specification and can provide a link?

Thanks a lot, maybe that clears things up not only for me. Thank you all, and especially [MENTION=357342]tobias.waldvogel[/MENTION], for your excellent work so parasites like me can profit. ;)
[Xperia Z5 Android Development] RyTekk:
1. Maybe due to changes for Android 7.0, older OS kernel isn't compatible anymore.

2. Yes.

3. I think it's caused by ramdisk modified and it prevents init.qcom.post_boot.sh to be executed correctly, lead to performance governor is used instead of interactive, and it seems that HMP cores can't be plugged in as well.
[Xperia Z5 Android Development] tuanck2004:
my z5p have android 7.0 via rootkernel 5.20, it work well but adaway report 'copying of hosts file fail' ==> help me :(

---

it work like charm :) see: http://www.theandroidsoul.com/make-system-writable-android-7-0-nougat/
[Xperia Z5 Android Development] gusde mustang:
how to use rootkernel in linux. when i enter command sh ./rootkernel.sh kernel.elf boot.img it gave me error cant execute binary file. help please .... im new in linux
[Xperia Z5 Android Development] shoey63:
Try

bash rootkernel.sh kernel.elf boot.img
[Xperia Z5 Android Development] zemetal:
so without giving /system to writable, it's like RIC still on. like in MM /system is already writable when patched :confused:

---------- Post added at 17:22 ---------- Previous post was at 17:21 ----------

/system is not writable, that's why.
[Xperia Z5 Android Development] tobias.waldvogel:
I'll fix it. Sorry about that.
[Xperia Z5 Android Development] tobias.waldvogel:
Thanks for reporting this. It should be backward compatible but I can confirm that I can reproduce the issue.

Unfortunately it is a bug in libsepol and might take some time to track it down. Please continue to use version 5.00 in the meanwhile.
[Xperia Z5 Android Development] Nyuubi:
I look forward to this! Btw the only version that worked for me v4.31 could you look in this please?
[Xperia Z5 Android Development] Hamidreza2010:
[MENTION=357342]tobias.waldvogel[/MENTION] bro for next version please disable default recovery vibration

i told you here :

https://xdaforums.com/showpost.php?p=69021995&postcount=1279

thanks
[Xperia Z5 Android Development] knop3x:
Thank you a lot for your answer! It is a little technical for me. Does this mean the battery drain also occurs if I install SuperSU system-less?

If I choose superuser instead: Can I install superuser system-less and permissive?

Thanks again!
[Xperia Z5 Android Development] ondrejvaroscak:
Succesfully did that with 18.22.3

---------- Post added at 17:21 ---------- Previous post was at 17:18 ----------

You need to use 0.9.18.22.3.

You also need first completely uninstall Flashtool, delete Flashtool directory where program and flasher was and also (!) the user directory under C:\Users.... when flashing DK.ftf and Flashtool asks if you want to use default.fsc, choose NO.
[Xperia Z5 Android Development] knop3x:
linux script syntax error

[MENTION=357342]tobias.waldvogel[/MENTION]

I feel that there is an error in your linux-version of the script. I get this:

[COLOR="Blue"].../rootkernel$ ls[/COLOR]
Android busybox.exe kernel.elf SuperSU-v2.79-201612051815.zip
bootimg flash_dk.cmd rootkernel.cmd superuser.zip
bootimg.exe flash_dk.sh rootkernel.sh xz.exe
[COLOR="Blue"].../rootkernel$ bash rootkernel.sh kernel.elf boot.img[/COLOR]
[COLOR="Red"]rootkernel.sh: line 865: syntax error near unexpected token `$'do\r''
rootkernel.sh: line 865: `	for target in default_prop log_tag_prop log_prop'logd_prop log_tag_prop dalvik_prop config_prop vold_prop system_prop; do[/COLOR]
[COLOR="Blue"].../rootkernel$ chmod +x rootkernel.sh
.../rootkernel$ ./rootkernel.sh kernel.elf boot.img[/COLOR]
[COLOR="Red"]./rootkernel.sh: 865: ./rootkernel.sh: Syntax error: word unexpected (expecting "do")[/COLOR]

Am I doing sth wrong?

edit: This is rootkernel version 5.20
[Xperia Z5 Android Development] YasuHamed:
technically yes!

by default android N file system is different than all previous versions of android! so even when u have rooted android, you can't easily alter /system
[Xperia Z5 Android Development] tobias.waldvogel:
There were some CR/LF inside the script which caused that problem. Please try 5.21 ;)
[Xperia Z5 Android Development] tobias.waldvogel:
I found the issue in libsepol.

The structure of xperms inside the policy was changed, although both are SE policy version 30. I made a patch to libsepol and now it works again with Android 6.x as well.

You may try 5.21 ;)
[Xperia Z5 Android Development] tobias.waldvogel:
32.3.A.0.376 is out

It seems that Sony published a new version 32.3.A.0.376.

Let's check if the Bluetooth battery drain bug is fixed ;) Downloading ....
[Xperia Z5 Android Development] knop3x:
Tobias, unfortunately in 5.21 nothing changed for me. (--> Line 865 ....)

Thanks for trying!
[Xperia Z5 Android Development] tobias.waldvogel:
Could you double check one more time that you got the right file? The version is reported as first line.

According to your error message there was a \r in 5.20, which I can confirm.

I downloaded one more time 5.21 and checked it and there is definitely no \r anymore. On my GenToo Linux it runs without any issues (include superuser, where your issue occurred)
[Xperia Z5 Android Development] cyberwytch:
5.21 works perfectly for me on Debian using Bash! Thanks a lot :)
[Xperia Z5 Android Development] knop3x:
That is very strange! I was indeed in the 5.21 rootkernel-folder. But somehow in the terminal this was not used. I even deleted and re-extracted the files from 5.21. Only when I deleted the trash and restarted the terminal I finally got it to work. I have no idea what went wrong.

Anyways, many thanks, after setting all the permissions ("chmod +rwx *") your script 5.21 runs perfectly now using bash.
[Xperia Z5 Android Development] barjawid:
dear tobias

please help me

i have xperia z5 dual

firware 5.11,i want root n install twrp

i use all root kernel in your post

but no kernel cant boot my xperia z5

it say failed remote dtb not found

cant u figure it what its problem with my kernel

sorry in y bad english

THX
[Xperia Z5 Android Development] YasuHamed:
please read the process in the first post by OP

the process is all given
[Xperia Z5 Android Development] Berni-0815:
Just for fun I downloaded the latest nougat for my z5c yesterday and flashed it with flashtool. Then I created a bootimage using this tool in version 5.20 and flashed it with fastboot. Everything works perfect! Twrp and everything else was included without any problems. The rom works well but as it is not for my country/region I stopped testing it. As I said, it was just for fun and to test this tool.

BUT, as I tried to reinstall my previous rom with twrp, I can't access twrp anymore! I used to start twrp by pressing volume down and power on until yesterday. But now my device stayed in sony boot logo. No way! I have to "kill" it by pressing volume up and power on.

Ok, I flashed the androplus kernel image and the recovery image with fastboot as I did before. No change. :confused:

Then I flashed the new kernel image again and then I was able to access twrp and reinstall my previous rom.

But the method I'm using until yesterday to access twrp (volume down and power on) is gone. I can only access twrp by powering on my phone and, when the led turns yellow, press volume up. Then I'm in twrp 3.0.2 as before. When I press volume down at this time I'm in twrp 3.0.0, what wasn't able before.

Something has been changed in my system...

What can be the reason? This tool or nougat rom? :confused:
[Xperia Z5 Android Development] whalesplaho:
Did yhu tried to flash FTF of previous rom, setup den flash custom kernel and restore yur backup?
[Xperia Z5 Android Development] Berni-0815:
No. I just deleted cache/dalvik, system and data with twrp and then restore my backup.

Do you think your way would help?

---------- Post added at 15:44 ---------- Previous post was at 15:39 ----------

F*ck! (Sorry... :D ) I've just seen another weird thing: Apps disappeared (xposed installer) after a reboot. And apps I've never used or installed are now installed, i.e. linked-in. :eek:

I swear, I've never installed such bloatware. And I don't have deinstalled the xposed installer!

Is it possible that something remains from the nougat installation? :confused:
[Xperia Z5 Android Development] whalesplaho:
Why not just try dat and see... See N is another OS!
[Xperia Z5 Android Development] Berni-0815:
Ok, I'll try it tomorrow; today I've no time...

Sure! But does it change the whole system including the file-systems? Can't believe that...

In my opinion it should be clean after deleting cache/dalvik, system and data... But I'm still learning and I'll give it a try. :good:
[Xperia Z5 Android Development] knop3x:
How are you doing on this? I used your script (to switch off dm-verity and RIC and to installe TWRP) after I used [MENTION=4120742]munjeni[/MENTION]'s TA-PoC script and then installed SuperSU 2.79 system-less via ZIP.

So far my battery is doing better than ever!
[Xperia Z5 Android Development] Gewiz:
Vol down let you boot the recovery from FOTA partiton which has been overwritten by flashing nougat per flashtool.

You can get it back by restore FOTA backup via TWRP from kernel or by flashing it via fastboot.

I explained how to do via fastboot here: https://xdaforums.com/showpost.php?p=70807294&postcount=132
[Xperia Z5 Android Development] russel5:
[MENTION=357342]tobias.waldvogel[/MENTION] can you tell me, why now in /vendor/bin i'm see app from /vendor/app and not see app from real /vendor/bin? Bug?

Thanks.
[Xperia Z5 Android Development] sahilg009:
Using z4 tab after installing kernel touchscreen no longer working works again after restoring to stock
[Xperia Z5 Android Development] blakwhite:
[MENTION=357342]tobias.waldvogel[/MENTION]

Thanks pal, everything works smoothly here on z5 with phh's superuser.

By the way, battery life is really improved on nougat compared to mm if you do the right optimization settings and whatnot. A full day is easily possible now on heavy usage (no games). I can't imagine how z3's endurance would be if it ever had nougat.
[Xperia Z5 Android Development] Nyuubi:
[MENTION=357342]tobias.waldvogel[/MENTION] The only version working for me is still v4.31 and here's what I've got with v5.21:

C:\Users\user\Desktop\Personal file\B,P,O\Z5 Dual\rootkernel_v5.21_Windows_Linux
>rootkernel kernel.elf boot.img
Rootkernel V5.21

kernel.elf: line 1: syntax error: unexpected word (expecting ")")

What am I doing wrong ???!!!?!?!
[Xperia Z5 Android Development] tobias.waldvogel:
I'm afraid you need to provide some more details and examples. On my Z5 E6683 I can't see anything unexpected
[Xperia Z5 Android Development] tobias.waldvogel:
Same here. Android 7 is really a great improvement for battery life. Most of the time I still have 40% left before charging in the night. 372 still had the bluetooth bug but now with 376 everything looks good. :D:D
[Xperia Z5 Android Development] russel5:
Ok, I had /system/vendor/app and /system/vendor/bin

When your script made /vendor, it's create app's folder in app and bin, but real folder /system/vendor/bin not symlink, ie /vendor/app/ims (this is correct) and /vendor/bin/ims (not correct) should be RIDLClient.exe and slim_daemon like in real /system/vendor/bin
[Xperia Z5 Android Development] tobias.waldvogel:
Could you try to run it in path without "," ?
[Xperia Z5 Android Development] Nyuubi:
Still the same:

C:\rootkernel_v5.21_Windows_Linux>rootkernel kernel.elf boot.img
Rootkernel V5.21

kernel.elf: line 1: syntax error: unexpected word (expecting ")")
[Xperia Z5 Android Development] tobias.waldvogel:
Now I got it. Thanks for reporting this, it was a bug in the new script for the vendor layout. As the linker in Android 7 now verifies the whole target path of a library I had to modify it in order to create links to a bind mount for the libraries. Du to a bug existing directories like /vendor/bin have not been replicated correctly. This is now fixed in 5.22. ;)
[Xperia Z5 Android Development] Berni-0815:
Ah, ok. Didn't know that!

Don't know how to do it...

That worked! Thanks! :good:

But this doesn't explain why apps are disappearing and others appearing... :eek:

---------- Post added at 16:46 ---------- Previous post was at 16:29 ----------

Found it...
[Xperia Z5 Android Development] sceryavuz:
[MENTION=357342]tobias.waldvogel[/MENTION]

Hi, I know this thread not related my question, but somehow.

My carrier signal always 0-1-2, never seen 3-4. Is that changes for FTFs? I always use the original one SA.

The problem is phone? or modem file? selected region SA?

How can I improve my carrier signal with kernel?
[Xperia Z5 Android Development] Nyuubi:
Could somebody tell me if this tool works for them on Win 7 64-bit? Because it doesn't work on mine but it worked on my notebook which has Win 10 32-bit.
[Xperia Z5 Android Development] Mario.D:
Yes no issues with win 7 64 bit.

Skickat från min E6653 via Tapatalk
[Xperia Z5 Android Development] kurtzkmg:
Need help. .when i tried to run rootkernel script (5.11) on kernel.elf for E6883 i got an error: Android boot magic not found. Unknown boot image format.

I'm using win10x64 OS. Please help on how to resolve this.
[Xperia Z5 Android Development] YasuHamed:
5.11 was not supporting kernel N

its been updated to 5.21, plz try that one!

---------- Post added at 01:11 PM ---------- Previous post was at 01:03 PM ----------

all proper drivers required! adb / xperia sa107 / fastboot / flashmode
[Xperia Z5 Android Development] Berni-0815:
But now the (by this tool) integrated twrp isn't accessible anymore! The led turns orange but the device remains in sony boot screen. :confused:
[Xperia Z5 Android Development] Gewiz:
That's indeed really strange.

Which apps are new? Maybe they came with the rom as bloatware.

Just try to reflash the boot.img again.
[Xperia Z5 Android Development] Berni-0815:
I only remember linked-in. This might be in the nougat rom; I don't remember; there is so much bloatware coming with nougat (but most of it can be uninstalled or deactivated).

And the xposed framework apk has been deleted, so I had to re-install it. But with restoring my backup via twrp all nougat stuff should be deleted. Or?

This happens only twice. Since then my system is stable.

Ok, that helped me. Thanks.
[Xperia Z5 Android Development] barjawid:
still no luck tobias
[Xperia Z5 Android Development] barjawid:
hi tobias

cant u upload rootkernel v5.21

i read your it says competible with android 6
[Xperia Z5 Android Development] Klaus N.:
There's already v5.22 (see op).

Edit: Ok, neither 5.22 nor 5.21 or 5.11 work with Z5 5.11 fw. So I took v5 (with kernel module 3.10.84-perf-g0802f10 to get twrp support) - all fine again.
[Xperia Z5 Android Development] devilmaycry2020:
[MENTION=357342]tobias.waldvogel[/MENTION]

Thank you for hard work. Could you intergrate newest TWRP 3.0.3 to kernel ?
[Xperia Z5 Android Development] barjawid:
Dear klaus

I already downloaded version 5.22

It not work, I use kernel elf to make boot. Img

After done

I use command fastboot boot boot. Img

after klik enter

failed:dtb(download tree blob) not found

Can u tell me what is wrong with the step
[Xperia Z5 Android Development] Nyuubi:
Hey Captain Obvious I already got all that right but it's only the script that isn't working. So where does "adb / xperia sa107 / fastboot / flashmode" come into play?
[Xperia Z5 Android Development] YasuHamed:
sir

in this case its your windows / pc issue ,

for me any version has worked on win7 easily and i have patched multiple kernels of various variants accross different script versions 5.0 / 5.11 / 5.20 ....

kindly be specific what error u get or what happens when you try try opening the script.
[Xperia Z5 Android Development] Nyuubi:
Here's the error:

Rootkernel V5.22

kernel.elf: line 1: syntax error: unexpected word (expecting ")")
[Xperia Z5 Android Development] Hamidreza2010:
Hi

I used this tool for add recovery and superuser.phh.me

all steps are good but now i cant enter to recovery.stay at sony logo

anybody has this problem?

on xperia z5

---------- Post added at 12:13 PM ---------- Previous post was at 11:24 AM ----------

seems happen this problem when i used both tool ( tobias and munjeni ):

https://xdaforums.com/showpost.php?p=71024950&postcount=310
[Xperia Z5 Android Development] YasuHamed:
and version 5.22 works fine on win10?

plz also try 5.21 / 5.20
[Xperia Z5 Android Development] Nyuubi:
Already did that. They don't work. The only version that works on my win 7 is 4.31
[Xperia Z5 Android Development] Berni-0815:
When I reflash my custom kernel, I can access twrp on bootup by pressing volume up. But, when I also flash superuser.zip with twrp, I can't access twrp anymore this way.

Could someone please confirm that?

IMHO, this doesn't happen with supersu... :confused:
[Xperia Z5 Android Development] sceryavuz:
Hi [MENTION=357342]tobias.waldvogel[/MENTION]

I tried V5.22 V5.21 V5.20 V5.11 V5.1 for 5.11 MM.

They are not work, it does not boot.

TWRP opened restarted and stuck on SONY logo.

I used V4.51, it works but twrp gone. Where is the V5.0 download link? It was working before.
[Xperia Z5 Android Development] Berni-0815:
Here....
[Xperia Z5 Android Development] sceryavuz:
It WORKS :fingers-crossed: Thanks..
[Xperia Z5 Android Development] bruno$0:
exist a method to flash the ta.ftf directly on android via terminal command?
[Xperia Z5 Android Development] sceryavuz:
you can flash only system.sin file.

you have to use flashtool for fully installation.

why you just flash with flashtool?