yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] riedenthied:
Yes. Me. And a lot of other guys here, too.

Ok, I could finish my post here. But I have a little hint for you: could you be so kind to read at least

some

of the latest posts in this thread? I guess you will find the solution. If not, I will ask my crystal ball what you are doing wrong.
[Xperia Z5 Android Development] Klaus N.:
Yes, I see: You've got to disable DM-verity at least; otherwise your device will never boot into system. Btw., I also suggest to install the DRM fix, and if you want to have write access to system partition (e.g. with Rootexplorer), you've to disable Sony RIC, too. Without disabling Sony RIC, modifying system partition is only possible via TWRP.
[Xperia Z5 Android Development] Devo7v:
Thank you for your help. I will disable dm-verity, do I need to disable Sony RIC even with Magisk root? I'm trying to make as few modifications to the stock kernel so I can still pass SafetyNet.

EDIT: Any ideas why I can get the unmodified stock kernel working? It seems like i should just be able to flash it and have everything working since it works after flashing the entire ftf file.
[Xperia Z5 Android Development] rrdna:
I hope somebody can help me:

I own a E6653.

I clean flashed the .253 firmware (all wipe options in flashtool checked and all .sin included), because i need it for the new SlimX battery optimized rom.

Next i was using rootkernel 5.0 and modified the extracted .253 kernel.elf, included SuperSU 2.78 and added all options except busybox and fastbooted the patched kernel via flashtool.

Now it always skips recovery when i try to access recovery to install the SlimX rom.

When i flash this TWRP via fastboot, i can access it, but almost every partition is not mountable (operation not permitted)

http://xdaforums.com/xperia-z5/development/twrp-3-0-2-cm-aosp-roms-t3373008

Is there anything else i can try? Another twrp version for my setup maybe?

I have tried clean flashing and applying patched kernel a couple of times and it always failed like this.

thanks in advance
[Xperia Z5 Android Development] nabeelrazanaqvi:
Using root kernel and everything no seems strange. Why using rootkernel just for twrp?
[Xperia Z5 Android Development] Devo7v:
I'm trying to find a kernel that can pass SafetyNet. My problem right now is that if I flash a custom kernel, the only way to return to stock is to reflash the entire .305 firmware which overwrites everything and takes a long time.

I don't necessarily need a kernel with TWRP built in, but it would make it a lot easier to flash Magisk. Does anybody have an unmodified stock .305 kernel that I can flash? For some reason the one I extracted from my ftf file fails to boot so I'm stuck on a custom kernel right now.
[Xperia Z5 Android Development] rolo143:
If you flash Magisk you will have to ROOT your device, and you WON'T be able to pass SafetyNet.

If you want stock kernel you have to accept these

disable dm-variety? YES

disable Sony RIC? YES

Install DRM fix? YES

Otherwise you phone won't boot.
[Xperia Z5 Android Development] Devo7v:
I'm pretty sure with Magisk v9 and Magisk Hide you can still pass SafetyNet but I'll test it out.

I didn't realize I needed to modify the stock kernel with the DRM fix to get the phone to boot. I'll give it a shot and report back. Any ideas why I can't just flash the unmodified stock kernel?
[Xperia Z5 Android Development] DannyWilde:
No idea, but you could flash stock firmware without any wipes, or am I wrong?
[Xperia Z5 Android Development] Devo7v:
Sorry to keep spamming this thread with questions, but this is my first Sony phone and I've only had it for a month. If this conversation would be better in the Q/A section let me know and I'll move it. That said, here it goes:

Following the advice above, I enabled all options for the stock .305 kernel (disable dm-verity, disable RIC, enable TWRP, enable DRM fix, and flash DK.ftf). All is working well and I am passing SafetyNet checks. My issue comes when attempting to flash Magisk v9. In TWRP I flash Magisk v9, all seems successful, the kernel is patched and reflashed within TWRP, but when I reboot, nothing. Just a black screen. Holding the power button causes the phone to vibrate once, pressing and holding the power button and volume up does nothing, plugging in to a wall adapter or computer causes the led to flash red, and it is not detected by a computer. The only thing I can do is press and hold the power button and volume down, this causes the Sony splash screen to appear and the phone to boot into TWRP. Once there I can either reflash my stock kernel or flash the Magisk Uninstaller and the phone will work as normal.

So after that long explanation, I guess my question is has anybody tried to use Magisk with a patched stock kernel? And if you were successful, what steps did you do to get it to work? Thanks.

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

I honestly haven't tried, but from what I remember reading, you need to wipe everything within FlashTool in order to get it to (re)flash properly. But maybe I'm wrong and this only applies when coming from a different ROM or when upgrading the stock firmware. At this point I've got the patched kernel working, so I'm going to try to avoid reflashing the stock firmware if I can.
[Xperia Z5 Android Development] AndriyeZ:
Just start from beginning, for my Z5C 6.0.1 fw .253 stock (not unlock+root yet) is this script works for my device? Do I have to make rooting steps first, downgrade to LP-backup TA-Unlock BL-root-upgrade to MM-run this script?

Or just run this script?? ?

Regards
[Xperia Z5 Android Development] Duvel999:
Read the first post & http://xdaforums.com/xperia-z5/general/guide-how-to-backup-drm-unlock-rootfor-t3373312
[Xperia Z5 Android Development] Andrew9011:
I don't know why, but I can't update SuperSu Binary, it just fail every time, even when I flash SuperSu Beta 2.78, when the phone boots up, it still shows update Binary.

Can someone tell me what can I do?
[Xperia Z5 Android Development] Klaus N.:
What device do you have, and what fw version?

While repacking the kernel, what options did you answer with "Y?

Why didn't you repack the kernel within SuperSU?
[Xperia Z5 Android Development] Andrew9011:
I have Xperia Z5 my device is E6653 but I flash E6603, when I was using this tool I did press Y, but I think the version is an older version of SuperSU. I saw some that said I need to repack SuperSu, and I need to flash the SuperSU too. Maybe is because I repack an older version of SuperSU, I will try to repack with 2.78 again when I got home.
[Xperia Z5 Android Development] Klaus N.:
Why E6603? I have an E6653 too (305 fw), and my device works flawlessly. I said yes to all (except busybox), and SuperSU 2.78 SR4 and Xposed framework v86 arm64 is included.

Btw., you should deinstall SuperSU through the app, if you've flashed it via recovery. After that power off your phone (don't let it boot after unroot!). Then fastboot flash the boot.img (which contains SuperSU) > reboot > done!
[Xperia Z5 Android Development] Andrew9011:
After I done this, the root is gone! What??

SuperSu shows no SU binary installed, what can I do next?

---------- Post added 18th November 2016 at 12:14 AM ---------- Previous post was 17th November 2016 at 11:53 PM ----------

Oh HAHA I found out because of the file name of SuperSu, so this tool doesn't found my SuperSu file, and it doesn't pack it in. Thanks a lot I have slove the problem.
[Xperia Z5 Android Development] DeathStroke:
If you want to use stock kernel, just use patched stock kernel and magisk give systemless root, so i don't think there will be any problem for passing safetnet or whatever.
[Xperia Z5 Android Development] Devo7v:
The problem is you can't patch the stock kernel with just Magisk because there is no way to enter recovery to be able to flash Magisk. Maybe I'm misunderstanding what you're trying to say.
[Xperia Z5 Android Development] DeathStroke:
You can attach recovery to a patched kernel (thats what it actually means) using a tool called "Root Kernel" , download from here http://xdaforums.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605/post69082728#post69082728

and read instruction from first post.

Try installing Magisk Manager from this http://tiny.cc/latestmanager

after installing this apk, install the Magisk from within the app.

I did the installation this way, I didn't flash any zip from recovery. But I'm already rooted, so don't know if this will work for you.

Please explain, what exactly you want to do?

if you ain't able to boot into system with patched kernel, I've one doubt on that too, I had a lot of research on that part, since I had the same issue while I first rooted my device on 305 MM.
[Xperia Z5 Android Development] snurre:
Hi,

Sorry for asking you directly, but it seems like you have this under full control :p

I have a Z5 E6653 and I recently clean flashed .305 and used venkat's rootkernel mod with 305 support to make the boot.img with the same options as you, included xposed (and without drmfix, I don't know why :p )

Everything work fine, except exposed. After installing the Xposedinstaller after boot, it just says that the framework is not installed, and no modules will activate.

Tried to flash xposed from recovery, got a bootloop.

Files I used:

SuperSU-v2.78-201609011115.zip

xposed-v86-sdk23-arm64.zip

XposedInstaller_3.1.1.apk

Any suggestions? :)
[Xperia Z5 Android Development] Klaus N.:
The 1st thing is, repack the kernel again - with drm fix (important!); the files you use are ok.

About Xposed: The official Xposed Installer version doesn't support systemless atm. What you have to do is, uninstall your Xposed Installer and take the version DVDandroid provides: http://xdaforums.com/xposed/material-design-xposed-installer-t3137758
[Xperia Z5 Android Development] Klaus N.:
[MENTION=5096181]Hamidreza2010[/MENTION]

See my post above yours ;)
[Xperia Z5 Android Development] Hamidreza2010:
my bro , i patch with all option except busybox but get bootloop ( just i flash kernel on stock ftf and then deodex it) .i installed official xposed installer.

i test it with UNOFFICIAL and report later the result ;)

thank you
[Xperia Z5 Android Development] snurre:
That was a quick one!

Did a new kernel repack with drmfix and replaced xposed installer. Now everything is working perfect!

Thank you, really! :)

I saw something about that installer earlier, but didn't quite get it :p
[Xperia Z5 Android Development] rolo143:
Dude why do you want to install Magisk anyway? Lol

You need root for that, and SafetyNet seems to detect rooted phones. If it is for playing Pokemon GO it won't work. There is a method with suhide I think using Systemless SuperSU app but I'm not really sure. They keep updating the app and improving the security, so new methods dont work.

Also i think you won't be able to flash the unmodified stock kenrel without flashing the full firmware (.ftf) file. But this only takes a few minutes so I don't see what's the problem with that.

I just updated my phone like 2 weeks ago, and I haven't root it and everything works great and i can pass SafetyNet. :)
[Xperia Z5 Android Development] Hamidreza2010:
bro this is my problem.i dont know whats my mistake :(

this is my big problem.i repack stock kernel with all option except busybox and after flash kernel and install xposed installer ( official and unofficial ) but get this error. sometimes get bootloop.
[Xperia Z5 Android Development] Klaus N.:
[MENTION=5096181]Hamidreza2010[/MENTION]

This is a standard warning while running that app the 1st time. I also got that message, but I never ran into a bootloop until now.

As the 1st step I would suggest to open the Xposed app and disable every module in the modules tab.

Have you installed Xposed Framework as a zip via twrp before flashing your boot.img containing Xposed? If yes, download the Xposed uninstaller, boot into twrp, flash it, wipe cache and dalvik/art cache and power off your device. Finally fastboot flash your boot.img again and reboot. Then open the Xposed app again, tap the reboot option inside the app and give it root permissions if asked. After rebooting, enable your Xposed modules and reboot again.
[Xperia Z5 Android Development] Hamidreza2010:
No i didnt install xposed before

ok.hope didnt see bootloop after that

-------------------------------------------------------------------------------------------------

you said " This is a standard warning while running that app the 1st time "

but in normal mod ( when i flash ftf fw and rooted and install recovery , then flash xplosed manually and install xposed installer , didnt saw this warning at all.

dont know whats different between that
[Xperia Z5 Android Development] Devo7v:
I have a couple of reasons for trying to get Magisk working.

I'd like to root and install adblocking and potentially get Android Pay working.

Easily take updates. If I can get Magisk working properly, I should be able to take updates without having to flash the ftf.

As for PoGo, I really wish it never existed. Because of everybody trying to cheat in PoGo Google has made SafetyNet a lot harder to bypass. All I really want is Android Pay and PoGo is ruining that.
[Xperia Z5 Android Development] shoey63:
Actually, it is users wanting to use Android pay whilst rooted that is making Google crack down on safety net. They need to show the banks that their product is secure. They couldn't care less about a Pokemon game.
[Xperia Z5 Android Development] shanpao:
Will the latest update 32.2.A.4.3 system how to make the kernel

---------- Post added at 09:30 AM ---------- Previous post was at 09:23 AM ----------

32.2.A.4.3 system kernel production tools
[Xperia Z5 Android Development] Hamidreza2010:
[MENTION=4433143]venkat kamesh[/MENTION] my bro new fw ( 32.2.A.4.3 ) was released.would you please make and pack recovery for this tool?

thanks again
[Xperia Z5 Android Development] venkat kamesh:
no official source yet released bro

once source is available

i can build it ;)
[Xperia Z5 Android Development] Hamidreza2010:
No problem dear we wait ;)

thanks :good:
[Xperia Z5 Android Development] MrMmmkay:
Sources are released for some days now...

http://developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-32-2-a-4-3/
[Xperia Z5 Android Development] vajra_naga:
//SOLVED//

I have z5 compact E5823 (got it a few days ago), and still having issues running the script. I loaded up UK custom firmware (E5823_Customized UK_1298-5497_32.2.A.0.305_R13C), running fine (no issues so far after two days).

What I've done so far:

Followed the procedure here: http://xdaforums.com/z5-compact/general/summary-tutorial-root-sony-xperia-z5-t3360515

(Lots of info, thanks to all involved :) )

Stuck on step 4. Root MM (which is why I'm posting here).

-I used flashtool to create kernel.sin (I've repeated this a few times to see if there were any errors in this part).

-Copied SuperSU to same folder as rootkernel.sh

-Run script - here is where I have the problem.

--I have tried executing in a few ways. I am running zsh on ubuntu MATE 16.04

[rootkernel_v5.0_Windows_Linux] /bin/bash ./rootkernel.sh kernel.elf boot.img
- Unpacking kernel
./rootkernel.sh: line 242: ./bootimg: Permission denied
./rootkernel.sh: line 248: ./bootimg: Permission denied
Unknown boot image format
Aborting
[rootkernel_v5.0_Windows_Linux] ./rootkernel.sh kernel.elf boot.img
kernel.elf: kernel.elf: cannot execute binary file
[rootkernel_v5.0_Windows_Linux] bash ./rootkernel.sh kernel.elf kernel-patched.elf
- Unpacking kernel
./rootkernel.sh: line 242: ./bootimg: Permission denied
./rootkernel.sh: line 248: ./bootimg: Permission denied
Unknown boot image format
Aborting
[rootkernel_v5.0_Windows_Linux] /bin/bash ./rootkernel.sh kernel.elf boot.img
- Unpacking kernel
./rootkernel.sh: line 242: ./bootimg: Permission denied
./rootkernel.sh: line 248: ./bootimg: Permission denied
Unknown boot image format
Aborting
[rootkernel_v5.0_Windows_Linux]

Here is the contents of the folder:

[rootkernel_v5.0_Windows_Linux] ls -l
total 38140
drwx------ 16 me me 4096 Nov 22 01:44 Android
-rw-rw-r-- 1 me me 465644 Jul 11 00:24 bootimg
-rw-rw-r-- 1 me me 222720 Jul 13 12:29 bootimg.exe
-rw-rw-r-- 1 me me 424960 Apr 6 2016 busybox.exe
-rw-rw-r-- 1 me me 82 Apr 8 2016 flash_dk.cmd
-rw-rw-r-- 1 me me 1484 Apr 25 2016 flash_dk.sh
-rw-r--r-- 1 root root 29659289 Nov 22 08:18 kernel.elf
-rw-rw-r-- 1 me me 85 Apr 6 2016 rootkernel.cmd
-rwxrwxr-x 1 me me 21191 Jul 25 08:08 rootkernel.sh
-rwxrwxr-x 1 me me 5912009 Nov 22 01:29 SuperSU.zip
-rw-r--r-- 1 me me 2097152 Nov 21 23:39 TA-21112016.img
-rw-rw-r-- 1 me me 219136 Feb 26 2015 xz.exe

I've tried the above (and following) with rootkernel 4.51 also. I looked through the script but I'm not so savvy with this, nothing really popped out at me as a problem. The kernel.sin file was made by root, I've tried the above leaving it as root, and chown to me. I've tried the above under sudo, both options had no difference. I did a full system update of my computer, restarted. Still no change.

What else can I try? Is there something I'm missing? Should I just swap the kernel with adb as per "deprecated alternative 1"? I don't have access to a windows machine at present.

Thanks for any any all further help/suggestions.
[Xperia Z5 Android Development] Devo7v:
For .305 firmware, you need to use an updated version of the program

http://xdaforums.com/xperia-z5/deve...-repack-stock-kernel-dm-t3301605/post69082728
[Xperia Z5 Android Development] vajra_naga:
same result

Just tried it, same result, unfortunately. Thanks.

[latest rootkernel] bash ./rootkernel.sh kernel.elf boot.img
- Unpacking kernel
./rootkernel.sh: line 242: ./bootimg: Permission denied
./rootkernel.sh: line 248: ./bootimg: Permission denied
Unknown boot image format
Aborting
[Xperia Z5 Android Development] snurre:
Without having looked at the script, it seems to me that it's trying to run the file 'bootimg' with the command './bootimg', but that file doesn't have the execute permission set.

Maybe try 'chmod 755 bootimg' or something similar before running the script?
[Xperia Z5 Android Development] Klaus N.:
[MENTION=7876631]vajra_naga[/MENTION]

The only thing you've to do is, right-click on the "bootimg" file, click on properties and finally activate the checkbox there to make it executable. Then run the command "bash rootkernel.sh kernel.elf boot.img" (without "./"), and it should work ;)
[Xperia Z5 Android Development] vajra_naga:
aha!

Indeed it did work. Thank you soo much. Such a simple oversight.
[Xperia Z5 Android Development] shanpao:
Look at the 4.3 kernel build tool for firmware
[Xperia Z5 Android Development] lexxm6:
Where is it?
[Xperia Z5 Android Development] shanpao:
I am also waiting for the 4.3 firmware kernel build tool
[Xperia Z5 Android Development] lexxm6:
me too :)
[Xperia Z5 Android Development] riedenthied:
Could you please stop spamming? It comes when it comes.
[Xperia Z5 Android Development] Klaus N.:
Maybe here's someone who could help me:

I tried to repack [MENTION=4675598]shoey63[/MENTION] advanced stock kernel for the Sony Xperia Z from his thread here: http://xdaforums.com/xperia-z/development/kernel-ub-t3198491

What I did: I unpacked the twrp3-222_228-boot.zip, took the twrp3-222_228boot.img and tried to repack, but unfortunately repacking ends with

It'd be very kind, if someone could give me a hint, what I could do :confused:

Thanks in advance!
[Xperia Z5 Android Development] eos:
Included Xposed Framework breaks further updates

Hi. Not sure, if I am the only one with this issue, but I have gone to some trouble now trying to resolve it. Before I go ahead and give you the gist of it, kindly refer to the following issue I reported yesterday on the Xposed GitHub forum:

github.com/rovo89/android_art/issues/57

Now the short version: I updated my E6853 to .305 a month ago including v86 of the Xposed SDK23 with the help of the option provided by this script. I ran into a boot loop on first start and had to downgrade to v85. That is where I got stuck until today. Apparently, the script sort of breaks the logic at some point because when updating to v87 for instance, both versions (v86 *and* v87) would get invoked at boot time. See the GitHub issue above for more details.

In rootkernel.sh, there is the corresponding function called add_xposed(). I see two options now: 1. undo all of the changes working myself manually through this routine and use the Xposed installer to install the current version (v87). 2. Apply the same changes based on the new v87 files from the original framework ZIP.

Any thoughts? Thanks!
[Xperia Z5 Android Development] sandsandsand:
No kernel modules for 3.10.84-perf-ge3d2b1c-05062-g5276cd7 available

I tried rootkernel, but it didn't work out. I got this:

- Unpacking kernel

Found elf boot image

Kernel version: 3.10.84-perf-ge3d2b1c-05062-g5276cd7

Found appended DTB

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

- Unpacking initramfs

- Detected platform: 64-bit

- Detected Android version: 6.0.1 (sdk 23)

- 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

- Skipping TWRP recovery. No kernel modules for 3.10.84-perf-ge3d2b1c-05062-g5276cd7 available

- Install DRM fix? [Y/n] Y

- Install busybox? [Y/n] Y

- Creating new initramfs

- Creating boot image

- Cleaning up

Done

Is it possible to get support for this kernel?
[Xperia Z5 Android Development] Klaus N.:
You can try the following:

Navigate to rootkernel > Android > twrp_common_kmodules, right-click on a free space inside this folder, create a new folder and rename it to <3.10.84-perf-ge3d2b1c-05062-g5276cd7> (without "<>"). Right after that copy the whole content of the most current kernel module inside the "twrp_common_kmodules" folder and paste it into the new folder you've created. Once done, try again to repack your desired kernel. Btw., do a backup of your system before, of course ;)
[Xperia Z5 Android Development] Hamidreza2010:
i dont know why when i repack kernel with xposed , and flash kernel , my rom is very laggy and unstable

i try on both of fw ( .253 and .305 )

any idea?
[Xperia Z5 Android Development] ilovebrazil:
Deleted
[Xperia Z5 Android Development] Hamidreza2010:
anybody cant help me here?
[Xperia Z5 Android Development] DeathStroke:
That doesn't make any sense, but don't include xposed within kernel rather flash it via recovery. See if that helps.

Sent from my E6683
[Xperia Z5 Android Development] Hamidreza2010:
but i want to combined both of them , my problem just is here
[Xperia Z5 Android Development] Klaus N.:
If you want to use the kernel within Xposed, then download the rovo89's current xposed uninstaller, put it onto your sdcard and flash it via twrp (and don't forget to wipe cache and dalvik/art right after). Right after that, power off your device. Now connect it in fastboot mode with your pc and flash the boot.img you've repacked.
[Xperia Z5 Android Development] Klaus N.:
How did you manage to backup your ta? The only possibility to backup is using iovyroot before you've unlocked your bootloader. If you did it that way, you could repack the appropriate stock kernel with drm fix to see if it works then.
[Xperia Z5 Android Development] Hamidreza2010:
thanks bro but my major problem is this:

i removed kernel from some custom rom.zip and replace my repack kernel within xposed.but when i flash rom , that is not normal speed and stably ( its has very lag and ..... )

but same roms , when i put same repack kernel ( except xposed ) every thing was good and no problem

problem just that

hope could explain clearly
[Xperia Z5 Android Development] Klaus N.:
Ok, what custom rom are you on atm? If you want to replace the kernel of the rom.zip-package, it's very important to know what things of the custom rom are kernel related and which not (e.g. SuperSU, Xposed and busybox)!