yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] lebigmac:
Thanks for your reply.

I get that annoying "device untrusted" warning during bootup which is totally normal when you unlock your bootloader as [MENTION=4675598]shoey63[/MENTION] stated. I wish we could somehow disable it though.

That's a good question.

Thanks for the info. I might try it again with the latest Flashtool version, this time selecting "no" at the FSC prompt.

Will the FIDO keys be restored once the DK.ftf is flashed?

I tried to flash DK.ftf without success using the following Flashtool versions:

flashtool-0.9.23.2 (needs a .fsc script to do it)

flashtool-0.9.18.6 (can't find loader.sin file for Xperia XZ F8331 - just like [MENTION=1881378]Soheil_rf[/MENTION] noted)

flashtool-0.9.18.1 (no flash script found. flash script is mandatory)
[Xperia Z5 Android Development] Hamidreza2010:
do not combined supersu with kernel

just flash it via recovery
[Xperia Z5 Android Development] ondrejvaroscak:
You need to use older version of Flashtool (9.22.3). If you have already more recent Flashtool installed, you must uninstall it first and delete (or rename) the installation directory (usually C:\Flashtool) and user directory (".flashtool" under you user profile). When flashing DH.ftf, Flashtool should aks, if you want to use "default.fsc" - answer NO.

Modern Flashtool (9.23.x) does not work correctly without FSC script, and older (9.18.6) refuses DK.ftf because of "wrong bundle".
[Xperia Z5 Android Development] Soheil_rf:
Yes. i can confirm Flashtool (9.22.3) works perfect with flashing DK.ftf , now i'm Androplus kernel with DRM key fix and flashed my DK.ftf

Now Screen Mirroring working as it should be

Thanks
[Xperia Z5 Android Development] Nown:
Ok. So I reflashed the stock FTF and then reflashed the modded kernel (without supersu this time), and then finally flashed supersu zip from TWRP (everything seemed to go smoothly). But now the supersu app tells me there is no binary installed... What is wrong? I did try to uninstall / reinstall supersu app (and to reflash the zip from TWRP also). My setup is dm-verity disabled, RIC enabled.

Thanks!
[Xperia Z5 Android Development] sceryavuz:
phh's Superuser
[Xperia Z5 Android Development] zegovernator:
was confronted with the same issue, however integrating pph's superuser in the kernel with this tool does grant me permission when I try to delete bloatware system apps with titanium backup. but titanium is still not able to do so. Sony-ric was is set to off. flashing pph s superuser via twrp, and not integrating it in the kernel doesn't bring a change. is titanium backup not compatible with pph superuser? any suggestions?!
[Xperia Z5 Android Development] Nown:
Ok, using it now, and no more battery drain :)! However, Titanium Backup indeed seems to be very limited (it only sees a few apps). Any idea how to fix that?
[Xperia Z5 Android Development] ondrejvaroscak:
Answer is is phh's superuser thread.
[Xperia Z5 Android Development] whalesplaho:
can someone help with dis please.... got dis error when i try to integrate an app as a system app in Link2SD cos it was a system app & i updated it.... thanks

using supersu 2.79 SR3
[Xperia Z5 Android Development] Nown:
Thanks, but could you please be more specific? I've searched for "Titanium" in that thread and read the few dozen results. In all cases there, Titanium Backup either crashes, or complains about not finding root. This is not my case since it tells me root is ok. It just doesn't see any apps...
[Xperia Z5 Android Development] sceryavuz:
Here is my thread. System writeable..

https://xdaforums.com/xperia-z5/general/ftf-e6633-53-83-google-drive-patched-t3553825

---------- Post added at 02:00 PM ---------- Previous post was at 01:59 PM ----------

Here is my thread. System writeable..

https://xdaforums.com/xperia-z5/general/ftf-e6633-53-83-google-drive-patched-t3553825
[Xperia Z5 Android Development] lebigmac:
Thanks this worked great.

Keep in mind that you must be connected to the internet for this to work. Or else it won't prompt you for the FSC script and you will get an error.

EDIT:

I have to correct myself. This also works while offline using the old Flashtool 9.22.3.

Thanks!
[Xperia Z5 Android Development] Art Vanderlay:
Thread cleaned.

Please be respectful at all times and keep the discussion on topic.
[Xperia Z5 Android Development] Berni-0815:
For z5c?
[Xperia Z5 Android Development] ondrejvaroscak:
Superuser

Can anybody point me little bit in installing superuser? When I try to integrate it by putting zip in tool folder, superuser app complains about older binary and root privileges are not working. When I patch the kernel and install superuser from twrp, it hangs on Sony logo after reboot. Using Nougat on Xperia X Compact, version .311. Disabled dm-verity/ric/encryption. Do I need to configure the config.txt in superuser zip file?
[Xperia Z5 Android Development] Joeisgood99:
Yep. It can't install twrp app because I built it in aosp not omnirom so app not available at compilation time, and I haven't tested inscription (I never use it for backups) But everything else is good to go.
[Xperia Z5 Android Development] lebigmac:
While this technique works great with Xperia XZ (F8331), it doesn't work with Xperia XA (F3111)

18/023/2017 20:23:03 - INFO - Root Access Allowed
18/029/2017 20:29:32 - INFO - Selected Bundle for Sony Xperia XA(F3111). FW release : 1.0. Customization : DeviceKey
18/030/2017 20:30:00 - INFO - Start Flashing
18/030/2017 20:30:00 - INFO - No loader in the bundle. Searching for one
18/030/2017 20:30:10 - INFO - Processing loader.sin
18/030/2017 20:30:10 - INFO - Checking header
[COLOR="Red"]18/030/2017 20:30:10 - ERROR - Processing of loader.sin finished with errors.[/COLOR]
18/030/2017 20:30:10 - INFO - Ending flash session
[COLOR="red"]18/030/2017 20:30:10 - ERROR - null
18/030/2017 20:30:10 - ERROR - Error flashing. Aborted[/COLOR]
18/030/2017 20:30:11 - INFO - Device connected in flash mode
[Xperia Z5 Android Development] leso60:
[MENTION=357342]tobias.waldvogel[/MENTION] i get this after delete Bloatwares
[Xperia Z5 Android Development] whalesplaho:
I tried to use poc tool and tobias tool buh cant get into twrp.... If i patch with tobias tool first den i ll get bootloop but if i patch wif poc tool den use tobias tool to add twrp n kcal drivers, it ll boot buh if i try to enter recovery, it freezes.
[Xperia Z5 Android Development] Hamidreza2010:
+1
[Xperia Z5 Android Development] Mario.D:
I have it the same on my phone and i have not deleted anything.

I think its bequse the bootloader are unlocked.

Skickat från min E6653 via Tapatalk
[Xperia Z5 Android Development] Aklo01:
I've repacked 32.3.A.0.

378

kernel for Z5 E6653

and tried it with fastboot boot boot.img

SIM card is not detected.

I've searched this thread for a solution but found none.

Any idea?

> rootkernel kernel.elf boot.img
Rootkernel V5.23

- Unpacking kernel
Found elf boot image
Kernel version: 3.10.84-perf-gda8446f
Found appended DTB
- Detected vendor: somc (Sony), device: sumire (Xperia Z5), 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
- Install kcal kernel module? [Y/n] N
- Found superuser.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 boot boot.img
downloading 'boot.img'...
OKAY [ 0.475s]
booting...
OKAY [ 0.549s]
finished. total time: 1.031s
[Xperia Z5 Android Development] shoey63:
Try fastboot flash boot boot.img
[Xperia Z5 Android Development] whalesplaho:
yeah +1....
[Xperia Z5 Android Development] Aklo01:
I know the difference between "fastboot flash" and "fastboot boot"

(I'm using this tool since Android 5)

I've flashed the repacked kernel and SIM card is now detected and working.

I didn't knew if you "fastboot boot ..." sim card won't work.

thanks
[Xperia Z5 Android Development] dape16:
Thanks for your work with this fix! It's working great on my Z5 Premium but on my Z4 Tablet the touchscreen is not working when using versions of this tool newer then 4.5. Is there anything I can try to get it working?
[Xperia Z5 Android Development] nabeelrazanaqvi:
Hi Guys, i have xperia z5 dual, android Nougat, rooted with this superb tool, i want to know if i want to unroot can i flash just stock kernel to unroot and able to receive OTA updates or i have to flash the full FTF again? and will it restore my TA partition? if not is there any way to restore TA img on android Nougat?

quick response is much appreciated and thanks in advance
[Xperia Z5 Android Development] goRt:
Just flash a kernel without SU in it - I run like that and manually choose to root - makes things much simpler.

Others can answer on the TA partition question.
[Xperia Z5 Android Development] nabeelrazanaqvi:
if I dont choose anything like ric of etc and no twrp just drm fix will it make my phone stock and will i be able to receive OTA updates?, i was thinking if i can flash TA image in FTF format created with falsh-dk?

thanks in advance
[Xperia Z5 Android Development] ondrejvaroscak:
No, no and no.

The DRM fix will NOT make your firmware stock. Your bootloader remains open. You are not going to receive OTA.

TA image created with flash-dk is not a TA image, it is just Device Key retrieved from your TA backup. DRM fix uses this device key to provide DRM functionality, since the TA partition have been cleared and must remain cleared in order for bootloader to remain open.
[Xperia Z5 Android Development] nabeelrazanaqvi:
Thanks brother. Much appreciate your help
[Xperia Z5 Android Development] nicosea:
DRMfix not working with Z5 Compact + AndroplusKernel.V43 + Build 32.3.A.0.378

I instralled andropluskernel V.43 but camera and many other thins are not working like before, so I tried to patch the andropluskernel v43 with the script, to have the DRM fix.

I used the boot.img (renamed to boot1.img) of the andropluskernel with the script:

rootkernel boot1.img boot.img

It worked, not errors:

Rootkernel V5.23

- Unpacking kernel
Found android boot image
Kernel version: 3.10.84-v43
- Detected vendor: somc (Sony), device: suzuran (Xperia Z5 compact), variant: row
- Unpacking initramfs
- Detected platform: 64-bit
- Detected Android version: 7.0
- Sony RIC is enabled. Disable? [Y/n] N
- Skipping TWRP recovery. No kernel modules for 3.10.84-v43 available
- Install DRM fix? [Y/n] Y
- Install busybox? [Y/n] N
- Creating new initramfs
- Creating boot image
- Cleaning up
Done

But after flashing the new boot.img , DNR fix does not work, pictures are horrible, no display improvement avaiable, etc.

What is it wrong? Maybe the Build 32.3.A.0.378 is not OK with the script? By the way thea andropluskernel.V43 is for Build 32.3.A.0.376, there is not yet androplus kernel for Build 32.3.A.0.378.
[Xperia Z5 Android Development] kgalv419:
Quick Question

Hi I have a very quick question, which of these versions is best suited to create repacked kernel for Z3+ E6533 Ver 32.2.A.5.11 1 2?The reason why I am asking is I experience some errors with others before for eg. stuck on boot, reboot red light blinks. Any insights would be greatly appreciated. I
[Xperia Z5 Android Development] devilmaycry2020:
i dont know why DRM fix not work because i never got this issue. i've flash "flash_dk <ta backup image> DK.ftf " just once time and never flash this again. and DRM key all working.

i think you have to flash supersu after flash rootedkernel.img. i always flash supersu after flash new kernel if not DRM will not fix. you can check X-reality in display setting

---------- Post added at 08:47 AM ---------- Previous post was at 08:40 AM ----------

you can use v5.23. no problem at all
[Xperia Z5 Android Development] nicosea:
I extracted the kernel.elf from original firmware and I used the script. First time including also TWRP, but when I used TWRP and than rebooted, the phone did not work anymore, it stopped on SONY Logo or reboot again and again but than still only SONY Logo.

So I used the script with only DRM fix and it works now perfectly, many thanks. :D

(Unfortunately I do not have backup of my DRM keys, at the time I unlocked the boot loader it was not possible yet :()
[Xperia Z5 Android Development] topjohnwu:
May anyone upload a kernel.elf file for me to test?

I'm currently adding ELF support to Magisk, and need a real binary for testing.

Thank you very much!
[Xperia Z5 Android Development] whalesplaho:
here is for Z5 .376 Nougat......

https://drive.google.com/file/d/0B6Q-veJIWV_GSU1VN3NBRUJUcGM/view?usp=sharing
[Xperia Z5 Android Development] the_brad:
Here you go: Elf-Files

Firmware-version and model-names are in the filenames :)
[Xperia Z5 Android Development] topjohnwu:
Hello, if you have time, may you test if this boot image I repacked (assuming your bootloader is unlocked) even boots?

(Removed)

It's nothing but a repack of the elf file to standard AOSP-ish Android boot images.

Thanks in advance!

(Edit: I think I missed something, remove for now)
[Xperia Z5 Android Development] whalesplaho:
Not a prob.... Hope yhu fix things soon!!!
[Xperia Z5 Android Development] serajr:
Unofficial - Rootkernel V5.23 - XP and XZ + munjeni's TA PoC

Rootkernel V5.23 (UNOFFICIAL)

- Unpacking kernel
Found elf boot image
Kernel version: 3.18.31-perf-g6ca3aed-02969-g71aee3f
Found appended DTB
- Detected vendor: somc (Sony), device: dora (Xperia X Performance), 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
- force-encrypt is enabled. Disable? (Say yes if you wipe and decrypt /data) [Y/n] Y
Disabling force-encrypt
- Sony RIC is enabled. Disable? [Y/n] Y
Disabling Sony RIC
- Install TWRP recovery? [Y/n] Y
Installing TWRP
Compressing TWRP image
- Found superuser.zip. Install? [Y/n] Y
# Make su permissive (Permits any action as su)? [Y/n] Y
Adding service entry for superuser
Adjusting SE Linux policy for superuser
[B][COLOR="DarkOrange"]- Install DRM fix? [Y/n] N
Skipping drmfix[/COLOR]
[COLOR="Blue"]- Install munjeni's TA PoC? [Y/n] Y
Installing TA PoC[/COLOR]
[/B]- Install busybox? [Y/n] Y
- Creating new initramfs
- Creating boot image
- Cleaning up
Done

Features:

- Added support for Dora (XP) and Kagura (XZ)

- Added option to disable force-encrypt

- Added option to install munjeni's TA PoC

Notes:

- Unsupported version (try it at your own risk)

- Tested only on my XP running latest Nougat stock fw

- TA PoC option (blue lines above) will only be available if:

1st: DRM fix installation is skipped (orange lines above), or if the

libdrmfix.so

library is not found (custom kernels)

2nd: TA.img (case sensitive) is found in the rootkernel's main folder

Credits:

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

[MENTION=4120742]munjeni[/MENTION]

(I hope everyone here knows about the risks of using a third-party TA backup!)
[Xperia Z5 Android Development] sceryavuz:
[MENTION=3989065]serajr[/MENTION]

Thanks for your work. munjeni said this is not open source work :) but you share script :)
[Xperia Z5 Android Development] whalesplaho:
[MENTION=3989065]serajr[/MENTION] respect devs work.... he wont share without permission!
[Xperia Z5 Android Development] serajr:
So please, show me the close source script I shared! If it's closed, how did I get access to it? Did you at least read changes I've made, or even compare them to what he wrote?

I'm used to talk to munjeni almost every day about android stuff, yeah, we help each other, and ofc I ask his permission prior doing this! Do not expose what you don't know!!

Not yet convinced? These are munjeni's words (pm) about code/tool integration (sorry mate) "... you can send too your integration of the my poc no prob at all"
[Xperia Z5 Android Development] sceryavuz:
I loked at rootkernel.sh

I just said, dont be angry..
[Xperia Z5 Android Development] rocker00:
[MENTION=3989065]serajr[/MENTION] Thank you so much, working flawlessly on my z2, i can call it the complete kernel : :good:
[Xperia Z5 Android Development] shoey63:
rootkernel is on Github, therefore it is open source.

https://github.com/tobiaswaldvogel/android_rootkernel
[Xperia Z5 Android Development] sceryavuz:
We talked about PoC, not rootkernel.

serajr's edited rootkernel.sh

First read, then write..
[Xperia Z5 Android Development] fluffi444:
Here you are... For Xperia D5803 Z3C
[Xperia Z5 Android Development] casouzaj:
Lucky you! I tried [MENTION=3989065]serajr[/MENTION]'s unofficial build for my Z3C running MM, but if I select ta_poc, instead of drmfix, I have no mobile signal and no DRM keys. It happens the same if I run the ta_poc tool, instead of rootkernel. So, I have to stick to the drmfix option.
[Xperia Z5 Android Development] xaaaj:
[MENTION=3989065]serajr[/MENTION] thanks for this going to try later with my z5! :good:
[Xperia Z5 Android Development] rocker00:
delete
[Xperia Z5 Android Development] whalesplaho:
its working greatly buddy.......:highfive:
[Xperia Z5 Android Development] serajr:
Did you patch stock or custom kernel?

Anyway, dmesg (adb shell dmesg) can help on fix things up. Also, if you have previously copied TA.img to /data/local/tmp try remove it from there and reboot.
[Xperia Z5 Android Development] casouzaj:
Thank you! Yes, I've patched the stock kernel from the 23.5.A.1.291 firmware, but my TA.img was stored in /data/local/tmp. After deleting it, everything is working as it should No need for a dmesg now, I suppose. Thanks, again!
[Xperia Z5 Android Development] torben5247:
First of all thank you for the great tool!!

I want to share my experience using the rootkernel tool, it might be usefull for others.

I used the 5.23 version for my z5c.

The phone was running very hot.

Root kernel tool showed that cpu frequencyes was 1555 mhz all the time.

Lowest frequency was also set to 1555 mhz.

I used version rootkernel tool 5.11 instead and the phone was running normal.

Software version: E5823_32.3.A.0.378_R3D_NOBA_1298-7782
[Xperia Z5 Android Development] serajr:
Glad to hear that!

Exactly the same scenario I faced some few times. Deleting it or simple rebooting the phone may be enough fixing it.

Btw, script I wrote (based on munjeni's one) may be improved for removing the remaining /vendor/TA.img file (like rootkernel does with its overlay files). But this is not important once file there does nothing!

I will try something out when I have a spare time. Any help is welcome!
[Xperia Z5 Android Development] Hamidreza2010:
Bro you are great as always like [MENTION=4120742]munjeni[/MENTION]

i didnt test it your integration tool yet to see my recovery problem was solved or not but i have question

if rootkernel tool or munjeni ta_poc get new update , what can i do?

how can we update integration tool?

did you update it or so something else

again special thanks for your hard work
[Xperia Z5 Android Development] serajr:
Good point! I will do it always when I have some spare time.

The toughest part is already done, so it is easy now to copy changes I made to the new versions. I'd really hope OP could see this as an update and apply changes to official version, but it's up to him!
[Xperia Z5 Android Development] whalesplaho:
POC received a new update....... Hope to see an update soon!!!:highfive:
[Xperia Z5 Android Development] serajr:
Thank you bro, I will check it out! Anyway, only rootkernel updates will trigger new unofficial updates, once ta poc hack will be always be the same!

Script I wrote for this tool doesn't make use of busybox to copy/perm things anymore.
[Xperia Z5 Android Development] whalesplaho:
Guess yhu already nailed it man.... Bigups!

Buh it shows maybe custom kernel bug solved.
[Xperia Z5 Android Development] fluffi444:
You can just use both tool separate as it was before. There is no reason to update at this point. TA tool is still PoC.

Just let the devs do their work as they want and help if they ask for help. Mostly testing stuff... Too much asking for ETA kills development... That's proven for many cases... Even munjeni was short before to stop TA tool because to much hassle with us... ?
[Xperia Z5 Android Development] little_tincek:
Hi, can someone tell me why the script stops, in my case it looks like this:

Rootkernel V5.23 (UNOFFICIAL)

- Unpacking kernel

Found elf boot image

Kernel version:

- Detected vendor: mediatek, device: MT6735, variant: MT6735

- Unpacking initramfs

- Detected platform: 32-bit

- Detected Android version: 6.0

And that's it, nothing happens after that, am I doing something wrong? Tried latest version, older ones and unofficial one and it's the same with every version.

I have Xperia E5, stock firmware, unlocked bootloader with TA image. Win10.

Thanx.
[Xperia Z5 Android Development] Janzomaster:
Hi,

I used root kernel on .378 for my z5c. As it said that SuperSU drains the battery, I used superuser as recommended. Sadly, root didn't work after that, so I reran the script with SuperSU instead and it worked. But now I'm experiencing some major battery drain. I had SuperSU before, so I guess superuser not working was due to having SuperSU installed parallel.

How would I go about make a clean switch from SuperSU to superuser?
[Xperia Z5 Android Development] Klaus N.:
Just try it by uninstalling SuperSU through the SuperSU app, then shutdown your device. Once done, flash the repacked kernel via fastboot again.
[Xperia Z5 Android Development] bam80:
I flashed stock MM ROM and DRM Fix works correctly there, so DK was flashed properly.

I suspect the problem on the custom ROM indicated by following lines:

02-26 04:32:47.832 1153 1219 E tadif : Failed to connect to tad.

I can see Trim Area daemon was started at the beginning and accepting connections:

$ adb logcat |grep -i tad
01-01 03:02:13.105 1094 1094 I tad : Trim Area daemon starting.
01-01 03:02:13.105 1094 1094 I tad : Using trim area info (0,16) from arguments.
01-01 03:02:13.106 1094 1094 I tad : TA library configured on /dev/block/bootdevice/by-name/TA (virtual block size 128kB, 16 blocks, start block 0)
01-01 03:02:13.151 1094 1094 I tad : Accepting connections.
......
02-26 22:01:14.057 1137 1137 E tadif : Failed to connect to tad.
02-26 22:01:14.058 1137 1137 E tadif : Failed to connect to tad

What can be the reason it can't be connected?
[Xperia Z5 Android Development] alex009988:
Hi. I used 5.23 tool for last nougat. But touchscreen doesn't work after booting. My device is tablet z4 lte.
[Xperia Z5 Android Development] dape16:
I'm also interested in a solution for this.
[Xperia Z5 Android Development] Joeisgood99:
Hey [MENTION=357342]tobias.waldvogel[/MENTION] when rootkernel splits boot.img, is rd.gz a renamed image.gz-dbt ot renamed zImage etc. Just wondering if half way through modding the /ramdisk I can switch the kernel out as well?..

Thanks in advance
[Xperia Z5 Android Development] DiscMan55:
[MENTION=357342]tobias.waldvogel[/MENTION] I got full encryption / decryption working in TWRP for Sony Z3+: https://xdaforums.com/xperia-z4/development/recovery-twrp-v3-0-3-0-encryption-t3564016

Maybe you can adapt my changes for all kitakami devices and add to TWRP here. The blobs needed to support it are not very big and may fit to be embedded directly in kernel ramdisk.

Also, can it be possible to have an option to enable down button on sony logo only (without embedding twrp) to boot from FOTAKernel ? Would be very convenient for quickly entering recovery one handed :) (and also fixing reboot to recovery).
[Xperia Z5 Android Development] zacharias.maladroit:
You know, if the (p)re-packaging doesn't work,

you can still flash superuser manually from TWRP ;)

Flash kernel, (re)boot into TWRP,

flash superuser zip-file:

https://superuser.phh.me/superuser.zip

That works for me pretty reliably,

I tried repackaged kernels with superuser (stock) and it wouldn't boot or cause other trouble
[Xperia Z5 Android Development] RyTekk:
New bootloader supports that, following guide on development site of Sony to get into recovery.