yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Android Development] DuskGolem:
Flash modified kernel first then magisk, magisk patches the kernel for its working so replacing a magisk patched kernel will likely end you having no root access. And i would advice you to disable dm-verity as it may not allow your device to boot after patching kernel
[Xperia Z5 Android Development] Paiji:
Yes' that's true, i forgot about dm-verity (i've read it in this topic)

For magisk, it seems logic but in the official topic of magisk i've seen that : "If you plan to flash a custom kernel, flash it AFTER installing Magisk". That's why i thought that flashing magisk after the mod kernel was better.

But perhaps the boot.img created by rootkernel is not really a custom kernel but just a modified kernel.

I'm gonna try to flash magisk after.

Thanks again ;).
[Xperia Z5 Android Development] DuskGolem:
No Problem;)
[Xperia Z5 Android Development] bruno$0:
I tried to create a verson with ta poc. Rootkernel script say something with modem. After boot up I got no mobile signal and a amazing security test error. LOL
[Xperia Z5 Android Development] Soheil_rf:
[MENTION=3989065]serajr[/MENTION]

Thanks for the update

After I patched my kernel with v2.1 my internal storage drop to 32GB , i have xperia zx dual that with 64 Gb internal.

Any idea?

Update

fix : backup data via twrp and than format data ,after that restore data
[Xperia Z5 Android Development] bruno$0:
Hello mr Soheil.

Do you should be able to restore the drm Keys on your Phone? I try to use drmfix and tá poc but nothing works....

If yes, what magisk version are you used?
[Xperia Z5 Android Development] Soheil_rf:
Hi

Are you try serajr's v2.1 ? drm works with my TA

I use magisk 15.3
[Xperia Z5 Android Development] bruno$0:
Yes. Used 2.1 with flashed dk.ftf... Maybe I missed something in the ftf stock flash (e.g. Wipe/exclude)
[Xperia Z5 Android Development] 3mozz:
updating magisk from 14.5 disabled drm fix

any fix for this issue or i need to stay with 14.5 forever?
[Xperia Z5 Android Development] serajr:
Issue has already been reported to the magisk developer and/or supporters!
[Xperia Z5 Android Development] ch3mn3y:
Have a question about XZ/XZs/Xp Rootkernel.

How to get kernel.elf?

- unpacking using 7zip/WinRar gives file without extension,

- Flashtool (tried with 0.9.23.2 and 0.9.24.2) says that kernel.sin from Oreo firmware (47.1.A.2.58) is not a sin file,

- UnSIN creates kernel.img file, not kernel.elf.

Any idea?

Got it. There is no problem if it is .img file :)

Still it was my mistake, coz I used XZ1 file, not XZ's.
[Xperia Z5 Android Development] serajr:
UnSin kernel_____.sin from bundle downladed from XperiFirm, and kernel_____.elf will be created (attached pic).
[Xperia Z5 Android Development] ch3mn3y:
Yeah. I already found about it.

However at first I made mistake and used XZ1's kernel, which is .img not .elf. FOund about it when the version was to new (4.4) and device name showed "poplar".
[Xperia Z5 Android Development] bruno$0:
Hey guys.

I wipe my data and this solve my internal space (64gb) and flash pure custom kernel and flash magisk 14.5 and Drmfix and bingo! Drm function restored! Thx you!
[Xperia Z5 Android Development] serajr:
Rootkernel V5.23 (UNOFFICIAL 2.2) - OREO - Xperia X Performance, XZ and XZs

What's new:

- Compatibility with any Magisk version

DRM-Fix_Magisk_Module.zip may (or may not) work. I didn't have time to test it out yet (some feedback are welcome)!

If you have previously installed DRM-fix_System_Mode.zip, you do not need to install magisk module version of the zip (remember that both zip do the same thing. Avoid redundancy!).

Credits:

[MENTION=8363210]sToRm//[/MENTION] for finding the issue with selinux vs ld_preload variable (you rock bro \m/)

>> Enjoy it! <<

(please, read instructions before proceeding and patching your STOCK kernel)
[Xperia Z5 Android Development] juanpirulo:
[MENTION=3989065]serajr[/MENTION] maybe you can add to your rootkernel post a list of filesystem to make it easier for people, here i left the filesystem_files for xperia xz last oreo version .58. cheers
[Xperia Z5 Android Development] serajr:
Maybe not! I have very little time for all my android stuff, so it's best to assign this time with really difficult/challenging things! ;)
[Xperia Z5 Android Development] juanpirulo:
I understand, really apreciarte your job anyway. Cheers

Enviado desde mi F8331 mediante Tapatalk
[Xperia Z5 Android Development] fmauNeko:
For me, with a French single SIM Xperia XZ, on the latest 41.3.A.2.58 firmware, it works reliably without any DRM fix.

Using TA_PoC, without Magisk it boots but SIM won't unlock, with Magisk 15.3, either flashed from recovery or patched from the Manager, it bootloops.

Using the DRM Fix Magisk Module, it bootloops.

Using the DRM Fix System Mode, with or without Magisk 15.3, it boots, doesn't even ask for SIM unlock, and stays in Emergency Only mode.

I haven't wiped anything though as I'm just upgrading from the previous Oreo release.

Couldn't find anthing of interest in the logcats I could snag, which means only for the DRM Fix System Mode. I'm attaching it though, in case I missed something.
[Xperia Z5 Android Development] serajr:
Missing SIM and/or Emergency Only Mode may be repaired by flashing kernel and modem again with flashtool, or if you have previously created a backup prior to flash new patched boot.img/magisk, restoring it!

I didn't try ta_poc option with newtest magisk (1531), I will check it out when I have some spare time!

It's better to stick with DRM Fix System Mode then!

Thanks for your feedback :good:

[MENTION=4245743]fmauNeko[/MENTION]

Edit:

You're damn right! Got bootloop with TA PoC option.

Please, download/run "UNOFFICIAL 2.3" version and you're done!
[Xperia Z5 Android Development] Exoder:
3. Run rootkernel script with Oreo stock kernel.elf (eg.: rootkernel kernel.elf boot.img)

4. Say

yes (Y)

to everything - If you want munjeni's TA PoC option, ensure your TA.img (case sensitive) is located at rootkernel's root folder, and say

no (N)

to DRM fix

5. You're done!

Hi friend, how can I repack my stock kernel (of my ftf) with DRM keys (TA.img)?

when I used your method (yours files) with my TA.img my xperia XZ haven´t network and data.
[Xperia Z5 Android Development] serajr:
Maybe you need a fresh firmware installation, also download/run "UNOFFICIAL 2.3" version!
[Xperia Z5 Android Development] serajr:
Rootkernel V5.23 (UNOFFICIAL 2.3) - OREO - Xperia X Performance, XZ and XZs

What's new:

- Fixed bootloop (with TA PoC option) after Magisk installation

>> Enjoy it! <<

(please, read instructions before proceeding and patching your STOCK kernel)
[Xperia Z5 Android Development] russel5:
[MENTION=3989065]serajr[/MENTION] [MENTION=8363210]sToRm//[/MENTION] thanks guys for your hard work and finding a little fix for magisk

On xz1 compact 12.34 works perfect
[Xperia Z5 Android Development] serajr:
Glad to hear that! Thank you for your feedback! :good:
[Xperia Z5 Android Development] Exoder:
Hi, excellent post,

I have a problem, when I use TA_PoC method I lost network signal.

This is my TA.img and my Oreo Kernel.

Can you help me please?
[Xperia Z5 Android Development] serajr:
Mate, never share your personal data, including your device's TA partition backup. Edit your post and remove the link asap.

As for your issue, if you had read only one page back (#2939), you would find the answer!

Also, do not use any repacked *.img as base for rootkernel, instead use always kernel.elf (converted from stock kernel.sin)!
[Xperia Z5 Android Development] juanpirulo:
---------- Post added at 03:56 PM ---------- Previous post was at 03:45 PM ----------

[/COLOR]

Try your last 2.3 version with ta.poc and lastest magisk and everything working perfectly, thanks mate. cheers
[Xperia Z5 Android Development] acme64:
i created the boot.img but now fastboot isn't detecting the phone. flashtool worked just fine, so whats up with my driver?
[Xperia Z5 Android Development] Berni-0815:
Reinstall them... ;)
[Xperia Z5 Android Development] DuskGolem:
[MENTION=3989065]serajr[/MENTION], I have used latest version of your tool for my Xperia Z5 Premium dual, 7.1.1 nougat 32.4.a.1.54 firmware. TA Poc+Magisk combination is not working for me (Gives me bootloop). I have attached magisk log for your consideration. Ask me if any other log is required. :):):)

P.S: I clean installed the firmware before using the tool.......
[Xperia Z5 Android Development] acme64:
no ****, which one? I tried the 3 google ones, they don't work. the SOMC sony one, that doesn't work and the sony XXXX adb driver, that fails too.
[Xperia Z5 Android Development] Berni-0815:
From which packet are you installing? I meant the drivers that are coming with the flashtool package. After installation there is a sub-directory named drivers (C:\Flashtool\drivers). There is a *.exe named flashtool-drivers.exe. Double-click this *.exe and install three drivers:

Flashmode Drivers

Fastboot Drivers

the one for your device (scroll down)

If none of them can be installed, your pc refuses installing drivers. Under Windows 10 search for installing unsigned drivers.
[Xperia Z5 Android Development] acme64:
there are not drivers for the x performance. the other 2 install fine, and the phone shows up as SOMC Flash Device, but fastboot devices doesn't list anything.
[Xperia Z5 Android Development] Berni-0815:
Oh! Then I don't know what to do; sorry...
[Xperia Z5 Android Development] ATomCZ:
Will be some update? The current version doesn't integrate XPOSED framework for Android 7 (xposed-v87-sdk23-arm64.zip) and also TWRP is not supported for the latest kernel (32.4.A.1.54). It just wrote: "Skipping TWRP recovery. No kernel modules for 3.10.84-perf-g99119bc available"
[Xperia Z5 Android Development] mbc07:
Hey [MENTION=3989065]serajr[/MENTION], Xperia X just received Android Oreo update but I can't find fstab.qcom in the system partition, just init.qcom.rc and init.target.rc. Do you have any clue on where I might find the fstab? Would it work if I used the one embedded in the RAM Disk instead?
[Xperia Z5 Android Development] Pouya Rezaei:
thanks [MENTION=3989065]serajr[/MENTION]

this method not work for xperia x oreo,after create kernel by this method still on logo

please update script
[Xperia Z5 Android Development] serajr:
What about this?
[Xperia Z5 Android Development] mbc07:
For my preliminary testing, the Unofficial 2.3 version of Root Kernel 5.23 seems to work fine with Xperia X, even without pulling the mentioned files from system partition (I haven't looked in details but it doesn't matter if the files are there or not, the script seems to skip this part completely when I use Xperia X Oreo kernel). However I'm using DRM Fix instead of ta_poc...
[Xperia Z5 Android Development] YasuHamed:
I was only able to find

/system/vendor/etc/init/hw/init.qcom.rc

/system/vendor/etc/init/hw/init.target.rc

in Stock OREO for F5122/F5121 SUZU

i placed it in the script folder and it ran just about fine

later flashed the img file and twrp and flashed the drm fix with magisk

rebooted and checked the xreality engine, it was is working! so i guess drm fix is re instated!

[MENTION=5604590]mbc07[/MENTION]

---------- Post added at 11:10 AM ---------- Previous post was at 11:09 AM ----------

Even I am using the drm fix, and it seems to be working just fine!

are there any other ways to check drm fix deeper , please guide me

---------- Post added at 11:15 AM ---------- Previous post was at 11:10 AM ----------

brother [MENTION=3989065]serajr[/MENTION]

so you are saying that XZs is on older format of drmkeys than from XZP ?

I know the Script doesn't fix XZP as the keys are hidden on some unknown location but i was always under the impression that XZs is also on new generation of drm keys policy.

this is great if this scrip works for XZs also! :D

because there is NO way that TA.img can be extracted from XZs since the device came out on Nougat and there is no exploit (as far as i know) so XZS owner has to make deal with devil if they want ROOT ACCESS. and your script is LITTLE BIT OF HEAVEN on EARTH for them ;)

---------- Post added at 11:19 AM ---------- Previous post was at 11:15 AM ----------

please check this ....

---------- Post added at 11:24 AM ---------- Previous post was at 11:19 AM ----------

use the original 5.23 script

but it doesnt have POC support but then drm fix works just fine!

---------- Post added at 11:27 AM ---------- Previous post was at 11:24 AM ----------

yes you can call img file to create img file (in and out)

however as we speak, new update of flashtool is out and it reads sin4 files fine!

the UNSIN utility can translate the original kernel.sin to kernel.img

you can use img file as input ONLY IF YOU HAVE translated by yourself.

otherwise we may not know who else have repacked it how and may brick your device!

---------- Post added at 11:35 AM ---------- Previous post was at 11:27 AM ----------

sir

when you created drmfix via this script

does it work?

i am under the impression that like xzp, even xz1 has no direct kernel drmfix available and we need to follower Xperifirx by [MENTION=8363210]sToRm//[/MENTION]
[Xperia Z5 Android Development] russel5:
I'm not tell that i'm using this script, just tell that the finding fix with patch selinux is work, but for xz1c it's not right.

I'm using my own script for building kernel and i'm not using Xperifix at all.
[Xperia Z5 Android Development] serajr:
Answered in the context!
[Xperia Z5 Android Development] YasuHamed:
thank you sir

please refer to the folder after your name

https://mega.nz/#F!zJpBULzI!qouen1ea5cXA0GHgNVdcCQ
[Xperia Z5 Android Development] StingeR116:
in xperia x oreo

the file "fstab.qcom" it is in the root (where the same build.prop)
[Xperia Z5 Android Development] levone1:
So for those of us without fstab.qcom file, any hope? I'm on Xc, Oreo 8.0... (btw - I did pull fstab.qcom from unpacked boot.img, and put it in folder with other 2 files, but tool does nothing...)

Oh I see, (I think), it's not on the device list... Any chance of adding devices? I can provide files...
[Xperia Z5 Android Development] mbc07:
No, it isn't, I searched. In Xperia X Oreo firmware, fstab.qcom is available only inside the RAM Disk...
[Xperia Z5 Android Development] serajr:
Got the files, thanks! I'll look into them next weekend!

You're not without sftab.qcom file (read up my answer at post #2962). Tool still needs to be adapted for Xperia X/XC!

(please send me your kernel.sin)
[Xperia Z5 Android Development] levone1:
Sorry, didn't see that post, (but I did find fstab.qcom in ramdisk...) here's my kernel sin (I rename it when dumping, but it's untouched)

https://mega.nz/#!8sEgWZjY!p5SyL3M6m93pQK92tG5Lgty09v19no5s3kdgJ-3-EkU

Thanks
[Xperia Z5 Android Development] serajr:
Please bro, I need xperifirm's sin file, and not an dumped img.
[Xperia Z5 Android Development] levone1:
OK sorry - 2 minutes...

---------- Post added at 07:18 AM ---------- Previous post was at 07:05 AM ----------

Here - https://mega.nz/#!1hkm1ShK!XVTT3dD8LfpAMLKFYV6XTg9PYiKJvKK5GR5yuk_a4WY . Sorry, I knew better, I've been hung up on boot img's lately... Thanks
[Xperia Z5 Android Development] grapestain.m8:
Thanks!

Works perfectly on my Sony Z1. I'll test it soon with encryption as well and report back (since decryption is not working in official Z1 version of TWRP v3.0.2).
[Xperia Z5 Android Development] serajr:
Kernel you sent me is from Nougat ftf. Please send it again, but Oreo sin file, ok?!

Edit: Nvm... see post below! ( [MENTION=6283426]levone1[/MENTION] [MENTION=5604590]mbc07[/MENTION] too )
[Xperia Z5 Android Development] serajr:
Rootkernel V5.23 (UNOFFICIAL 2.4) - OREO - Xperia X, X Comp., X Perf., XZ and XZs

What's new:

- Xperia X and Xperia X Compact compatibility (Oreo)

(X and XC users, please, do read first line of the post, in red)

Output:

Rootkernel V5.23 (UNOFFICIAL 2.4)

- Unpacking kernel
Found elf boot image
Kernel version: 3.10.84-perf-g78dc059
Found appended DTB
- Detected vendor: somc (Sony), device: [B][COLOR="Blue"]kugo (Xperia X Compact)[/COLOR][/B], variant: row
- Unpacking initramfs
- Detected platform: 64-bit
- Detected Android version: 8.0.0
[B][COLOR="blue"]- Found fstab.qcom (no additional files required)![/COLOR][/B]
- dm-verity is enabled. Disable? (Say yes if you modify /system) [Y/n] Y
Patching fstab in dtb to disable dm-verity
- Sony RIC is enabled. Disable? [Y/n] Y
Disabling Sony RIC
- force-encrypt is enabled. Disable? (Say yes if you decrypt /data) [Y/n] Y
Disabling force-encrypt
- Install DRM fix? [Y/n] Y
1. DRM fix preload line added successfully!
2. DRM libraries still need to be flashed manually on TWRP recovery before 1st boot!!
System mode, flash: DRM-fix_System_Mode.zip
- All done! Continue? [Y/n] Y
- Creating new initramfs
- Creating boot image
- Cleaning up
Done

>> Enjoy it! <<

(please, do read instructions before proceeding and patching your STOCK kernel, also, do always use the elf format as the input file)
[Xperia Z5 Android Development] levone1:
Confirmed Xc. Thank you...
[Xperia Z5 Android Development] ondrejvaroscak:
You are f*cking master of Xperia universe :)
[Xperia Z5 Android Development] pw1nce:
Do you have recovery installed on xc? If yes pls leme know where is it n how, oreo.

---------- Post added at 08:03 AM ---------- Previous post was at 07:37 AM ----------
[Xperia Z5 Android Development] pw1nce:
hi bro, when i make the new bootimg and flash it so my device gets stuck on sony screen n wont go past it , im using oreo on x compact, one thing im confused about is that how would we install magisk because theres no working recovery for x compact on oreo, please guide me , thnx
[Xperia Z5 Android Development] YasuHamed:
i am sorry , perhaps i got too excited

---------- Post added at 10:31 AM ---------- Previous post was at 10:29 AM ----------

damn, there is only one THANKS BUTTON on xda

THANKS x 2
[Xperia Z5 Android Development] kodein:
sony xperia performance Rootkernel V5.23 (UNOFFICIAL 2.3) - OREO work perfectly, but Rootkernel V5.23 (UNOFFICIAL 2.4) - OREO not work...
[Xperia Z5 Android Development] YasuHamed:
v 2.4 is for X and X compact

thats why [MENTION=3989065]serajr[/MENTION] kept v2.3 intact for variants who has those three files in the correct location.
[Xperia Z5 Android Development] serajr:
Aha... thanks mate! :good:
[Xperia Z5 Android Development] serajr:
Thank you for the feedback!

Fastbooting patched boot.img is the first step only, you still need to enter recovery and flash provided drm-fix zip (also magisk, you if want root)!

Thanks bro!

I'll look into this. thanks!
[Xperia Z5 Android Development] tobias.waldvogel:
This is a command line utility.
[Xperia Z5 Android Development] tobias.waldvogel:
Widevine is working, which was not working without the device key before. Everything should work exactly as before but just try it yourself ...
[Xperia Z5 Android Development] butilities:
Oh it works! you are a miracle worker! Thank you!!!
[Xperia Z5 Android Development] Bronnel:
thank you tobias, but My Device is Z5 Dual E6633 and not Z5P, I've already rooted my device successfully on MM, But I want to have root on LP, the only problem is when I press volume up key to enter TWRP when the light is yellow, the device goes into boot loop, this doesn't happen on MM, another thing to point out is the size difference of the modified kernel between MM and LP (the one of LP is about 37 MB, but the of MM is about 21 MB) [provided the latest version of your tool v4.2 has been used]
[Xperia Z5 Android Development] tobias.waldvogel:
Since MM Sony is using attached DTBs ,which requries a gzip compressed zImage. This is why the kernel is smaller on MM.

Is there any particular reason why you don't want to use MM? I don't have any LP device anymore therefore this is difficult to anaylize or test.
[Xperia Z5 Android Development] Bronnel:
The reason that I need LP is the fact that permissions have changed a lot in MM, there is a couple of apps that only run LP and crash on MM like sixaxis controller, game controller 2 touch, dolphin emulator, and also I want to backup some stock app on LP.
[Xperia Z5 Android Development] josephnero:
I opened a CMD .exe there. is that a right way to use it?

So sorry for being a bother.When I do that and use command it says an exeption error happened
[Xperia Z5 Android Development] ninestarkoko:
Tobias, is the TWRP included in the package always compatible also with Z5C and Z5P?

If yes, do you use a recovery built by you or by someone else?

If not, would you suggest flashing specific TWRPs from our device forum?

---------- Post added at 07:51 PM ---------- Previous post was at 07:45 PM ----------

go in the folder of the extracted package and RIGHT CLICK + SHIFT (up arrow on the left) on an empty space inside the folder and select "Open command window here".

Now execute the commands "rootkernel .......". Please report back if you have more problems
[Xperia Z5 Android Development] josephnero:
go in the folder of the extracted package and RIGHT CLICK + SHIFT (up arrow on the left) on an empty space inside the folder and select "Open command window here".

Now execute the commands "rootkernel .......". Please report back if you have more problems[/QUOTE]

Thanks a lot mate. the command returns this error

< was unexpected at this time.
[Xperia Z5 Android Development] milad1993xx:
hey i back up my ta unlocked bl and flashed kernel and then ta ... but Screen Mirroring was not working...i have sony tv and it was ok befor unlocking bl:) now i am trying lock it with restoring ta to see it work again or no....
[Xperia Z5 Android Development] El_Rey:
Dear tobias.waldvogel,

please could you provide me a rootkernel patch, with following twrp included?

<< h t t p s : // w w w . androidfilehost.com/?fid=24459283995316296 >>

i tried to replace the files from your twrp folder, but didnt get any success. I got a bootloop.

You could unpack the twrp image with android image kitchen, i think you even know.

it would be very nice when you can help me, otherwise the touchscreen at twrp on my z4t doesnt work.

many thanks.
[Xperia Z5 Android Development] anjelz2012:
tobias.waldvogel

I created my kernel 4.21 mm with the script and giving flash I noticed that FIDO_KEYS: Provisioned, then flash DK.ftf necessary?
[Xperia Z5 Android Development] tongnt:
Finally we have mm for z5p in our region.

Did all step in first post. It works. I can get to twrp recovery from 1st try as well.

I dont have to flash dk.ftf either.

[MENTION=357342]tobias.waldvogel[/MENTION] Thanks for the great tool. Just strange z5p lp recovery dont work.
[Xperia Z5 Android Development] xxera:
Thank you so much, everything is working as intended! I've got a few follow-up questions, though.

-I used v4.0, which steps would I have to repeat to get the WideWine fix? Use the rootkernel script of the new version and everything after that? Can I just flash the new kernel over the old one?

-Some of you said you have xposed installed, which version do I need? The official thread (http://xdaforums.com/showthread.php?t=3034811) says it doesn't work for sony devices.

Thanks!
[Xperia Z5 Android Development] devilmaycry2020:
C:\rootkernel_v4.22>rootkernel.cmd kernel.elf rootedkernel.img
- Unpacking kernel
Found elf boot image
- Unpacking initramfs
- 64-bit platfrom detected
- Disabling dm-verity
- Disabling SONY RIC
- Installing TWRP
- Found SuperSU_2.65.zip
Adding service entry for SuperSU
source type fsck does not exist
Could not add rule for perm: dac_override
source type fsck does not exist
Could not add rule for perm: write
source type fsck does not exist
Could not add rule for perm: create
- Configuring keyprovd
- Configuring secd
- Configuring wvkbd
- Configuring drmserver
- Creating new initramfs
- Creating boot image
- Cleaning up
Done

I'm using LL .152 not MM
[Xperia Z5 Android Development] tobias.waldvogel:
Pre MM = before MM = LP

The context names in the SEpolicy have changed from LP to MM. Therefore SuperSU integration does not work with LP. You might understand that I am not willing to downgrade my phone again to LP in order to solve that. In change I would encourage you to upgrade to MM ;)

Gesendet von meinem E6683 mit Tapatalk