[XZ1] rooted kernel hiding bootloader unlock with working fota - Sony Xperia XZ1 ROMs, Kernels, Recoveries, & Othe

rooted kernel hiding bootloader unlock
with working sony stock fw fota updates
for Sony Xperia XZ1​
Firmware Over the Air system updates have been disabled/not working with sony xperia phones with unlocked bootloader.
Also many sony drm functions are disabled if fw detects unlocked bootloader even if device master key was recovered.
I've implemented a kernel patch for xperia XZ1 Compact / XZ1 / XZ Premium phones that properly masks bootloader unlock status so it appears as still locked for sony stock firmwares.
This allows FOTA updates to be installed if running completely unmodified stock firmware. This is possible if this kernel is just booted from usb via fastboot instead of flashing it.
The kernel is pre-rooted, so you can have root as usual with magisk when running this kernel (you can use magisk system less patching to make changes to system/vendor partitions without actually modifying them).
For oreo fw the boot process is patched to hide magisk from sony ric daemon that stops the boot in case it thinks the bootloader is still locked. This special patch allows to pass safetynet including cts while having properly working magisk.
This kernel may be used (flashed) just to properly enable sony drm features, like video image enhancements, if device master key was recovered via locked state TA restore.
The bellow described way to install FOTA system update works with both - phone with TA restored and phone with drm keys lost. Both variants have been tested with xz1c.
How to use this kernel while planning to do FOTA system update eventually
Update: please see here for the latest usage instructions for kernels in flashable zip archive.
Please see screenshots bellow for this kernel in action (with xz1c) doing fota system update from oreo to pie and from pie to next pie version. There is also a video documenting this here. Few longer waiting parts have been cut out to fit the video under 15 minutes of youtube limit for not verified accounts.
if your bootloader is still locked
Use renoroot exploit to backup your TA, unlock your bootloader and restore TA-locked to recover device master key as described in
[XZ1c/XZ1/XZp] temp root exploit to backup drm keys implemented thread.
select one of the prepared kernels and download it
make sure you are running unmodified stock firmware
You need the version corresponding to the selected kernel - reflash the firmware to make sure it is unmodified.
Please note: any mount of /system or /vendor partitions in write mode would result with modifications even if nothing is copied there.
Be aware that some zip packages flashed from twrp may mount the partitions for write access even when that is not needed.
reboot the phone to fastboot mode
Use either "adb reboot bootloader" or
enter fastboot by holding powered off phone's volume up key while connecting it to PC via usb cable and use 'fastboot reboot bootloader' command.
boot the downloaded kernel via fastboot
For example (xz1c):
Code:
fastboot boot boot-G8441-47.1.A.16.20-hideunlock-rooted.img
enjoy your rooted phone which thinks it is still locked
Sony apps will be offered to install/update. System FOTA update may come.
Magisk will provide your root when magisk manager app is installed (offered on the first boot).
if you need to use a custom recovery, like TWRP
Do not flash it. If you do, FOTA update verification will fail.
Instead use 'fastboot boot' the same way as with the kernel above, but instead of the kernel, boot the twrp image without flashing it.
to install a FOTA system update
just start the update as usual
let it run until it finishes the installation
try to catch the restart then and hold volume up that time to enter fastboot
you need to use following command to make next boot working
Code:
fastboot reboot bootloader
use 'fastboot boot' to boot kernel for fw to which fota updating to,
for example (xz1c):
Code:
fastboot boot boot-G8441-47.2.A.4.45-hideunlock-rooted.img
if you miss the restart (or do not have the right kernel version),
it does not matter, the installation will finish even when bootloader unlock is detected with the last reboot to updated system,
so just 'fastboot boot' the corresponding 'hideunlock-rooted' kernel then
Alternative use of this kernel
If you do not like booting from usb via fastboot to startup your phone, you can flash the kernel and boot normally.
But if you like to install FOTA system update then, you would need to flash the stock kernel first in order to make the fw untouched again (assuming no other changes to the fw, like system or vendor partitions, have been done) and boot the patched kernel via 'fastboot boot' as described above.
You can backup stock kernel (and recovery) to avoid need to download full stock fw when you need to restore stock kernel & recovery when you decide to install fota system update - see here and following post for more details please.
If you do not care about FOTA, just do not install it.
And use this kernel just to enable all sony drm features that are available on a locked phone (assuming locked state TA has been restored).
In case you like to make some modifications to system or vendor partitions (as you do not care about fota), you would need to disable verity in the kernel - please see post#3 for noverity variants of oreo kernels and linked post describing howto switch verity off via magisk in all pie kernels.
Downloads
See the post#2 please.
Source code
patched kernel sources to hide bootloader unlock (my-bluhide/* branches)
https://github.com/j4nn/sonyxperiadev-kernel-copyleft
patched magisk sources to hide magisk from sony ric daemon on early boot phase (v19.1-manager-v7.1.2-ric branch)
https://github.com/j4nn/Magisk/tree/v19.1-manager-v7.1.2-ric
The patches are provided under GPL (that means you may include them in your builds, but you need to provide buildable source of released binaries /true for any kernel change btw/).
Credits
Thanks to @tonsofquestions for lot of initial testing of this concept when I did not have a phone with unlocked bootloader and for discovering the need to reboot to fastboot by a command to make the 'fastboot boot' command properly boot the supplied kernel image.
Thanks to @topjohnwu for his excelent magisk tool.
If you find my work useful, consider donating here please:
https://j4nn.github.io/donate/
Thank you.
XDA:DevDB Information
kernel_bluhide_poplar, Kernel for the Sony Xperia XZ1
Contributors
j4nn
Source Code: https://github.com/j4nn/sonyxperiadev-kernel-copyleft
Kernel Special Features: proper hiding of bootloader unlock, sony ric with magisk hack
Version Information
Status: Stable
Stable Release Date: 2019-02-10
Created 2019-02-10
Last Updated 2019-08-07

Downloads
- hideunlock kernel pre-rooted boot images:
Xperia XZ1 (G8341/G8343)
boot-G8341-47.1.A.16.20-hideunlock-magisk-19.1.img
boot-G8341-47.2.A.4.45-hideunlock-rooted.img
boot-G8341-47.2.A.6.30-hideunlock-rooted.img
boot-G8341-47.2.A.8.24-hideunlock-rooted.img
boot-G8341-47.2.A.10.28-hideunlock-rooted.img
boot-G8341-47.2.A.10.45-hideunlock-rooted.img
boot-G8341-47.2.A.10.62-hideunlock-magisk-19.3.img
Xperia XZ1 Dual (G8342)
boot-G8342-47.1.A.16.20-hideunlock-magisk-19.1.img
boot-G8342-47.2.A.4.45-hideunlock-rooted.img
boot-G8342-47.2.A.6.30-hideunlock-rooted.img
boot-G8342-47.2.A.8.24-hideunlock-rooted.img
boot-G8342-47.2.A.10.28-hideunlock-rooted.img
boot-G8342-47.2.A.10.45-hideunlock-rooted.img
boot-G8342-47.2.A.10.62-hideunlock-magisk-19.3.img
- hideunlock kernels flashable to multi fw versions (see here for usage howto):
Xperia XZ1 (G8341/G8343)
kernel-G8341-47.1.A.16.20-hideunlock.zip
kernel-G8341-47.2.A.10.62-hideunlock.zip
kernel-G8341-47.2.A.10.80-hideunlock.zip
kernel-G8341-47.2.A.10.107-hideunlock.zip
kernel-G8341-47.2.A.11.228-hideunlock.zip
Xperia XZ1 Dual (G8342)
kernel-G8342-47.1.A.16.20-hideunlock.zip
kernel-G8342-47.2.A.10.62-hideunlock.zip
kernel-G8342-47.2.A.10.80-hideunlock.zip
kernel-G8342-47.2.A.10.107-hideunlock.zip
kernel-G8142-47.2.A.11.228-hideunlock.zip
Screenshots of XZ1c FOTA system update from oreo 47.1.A.16.20 to pie 47.2.A.4.45
(video available here)

Downloads
This is for alternative use only - please see post#10 for more details.
boot-G8341-47.1.A.16.20-hideunlock-magisk-19.1-noverity.img
boot-G8342-47.1.A.16.20-hideunlock-magisk-19.1-noverity.img
Screenshots of XZ1c FOTA system update from pie 47.2.A.4.45 to pie 47.2.A.6.30 version
(video available here since 08:10 time)

This should be the first paragraph!
j4nn said:
[...] use this kernel just to enable all sony drm features that are available on a locked phone (assuming locked state TA has been restored).
Click to expand...
Click to collapse
Since I do not care about OTA updates, because we can download every firmware via XperiFirm and flash it via newflasher, I will use your modded kernel in the 'alternative' way! :good:
j4nn said:
Alternative use of this kernel
If you do not like booting from usb via fastboot to startup your phone, you can flash the kernel and boot normally.
Click to expand...
Click to collapse

@j4nn - I flashed "boot-G8341-47.2.A.6.30-hideunlock-rooted.img" on my G8341 which has the latest Pie firmware (G8341_47.2.A.6.30_Customized DE_1310-4290_R6C) installed, but the device did not boot into Android after that! :crying: I flashed the latest official Magisk before your kernel. Do I need to use your patched Magisk instead?
Did you forgot to add the patched magisk flashable img file? "hide magisk from sony ric daemon on early boot phase (v18.1-manager-v7.0.0-ric branch)"
j4nn said:
Downloads
Click to expand...
Click to collapse
Maybe the firmware version is not compatible with the one you took the kernel from? The firmware folder includes:
kernel_X-FLASH-ALL-C93B.sin
boot/bootloader_X_BOOT_MSM8998_LA2_0_P_107_X-FLASH-ALL-C93B.sin
...
Click to expand...
Click to collapse

@SGH-i200, I just compared the stock kernel boot image extracted from G8341_Customized DE_1310-4290_47.2.A.6.30_R6C (which I have used to create it) and it seems all good to me:
- os version and patch level match
- device tree blobs are the same
- kernel command line is the same
- extracted kernel config is (except few comments as it is usual) the same, with poplar target (i.e. single sim XZ1)
- ramdisk is the same except changes that are expected (integrated magisk in order to provide root when booted from usb having unmodified stock fw)
Did it result with an infinite hang during boot (which phase of the boot splash animation)?
Or did it reboot during boot (a boot-loop) - which phase?
I am sorry I forgot to mention the kernels for other targets than xz1c have not been tested (I have only xz1c for testing).
But it should be safe to test the above howto as described. Even if the kernel was flashed (instead of just fastboot booted), recovering from this should be as simple flashing stock kernel back.
Anybody else tested this with XZ1?

j4nn said:
Did it result with an infinite hang during boot (which phase of the boot splash animation)?
Or did it reboot during boot (a boot-loop) - which phase?
Click to expand...
Click to collapse
The SONY white splash screen appeared (with only black SONY text) and then it hang forever.
j4nn said:
Even if the kernel was flashed (instead of just fastboot booted), recovering from this should be as simple flashing stock kernel back.
Click to expand...
Click to collapse
I flashed the kernel_X-FLASH-ALL-C93B.sin (and everything else as I did to upgrade to latest Pie) from the stock fw to recover.
After the XZ1 was booting again, I executed the fastboot booting, without problems!
adb reboot bootloader
fastboot boot boot-G8341-47.2.A.6.30-hideunlock-rooted.img
Click to expand...
Click to collapse

@SGH-i200, that sounds good. Now just flash it:
Code:
adb reboot bootloader
fastboot flash boot boot-G8341-47.2.A.6.30-hideunlock-rooted.img
disconnect from usb and power on.
If it booted from usb, I believe it should boot just fine if flashed as above too.

j4nn said:
If it booted from usb, I believe it should boot just fine if flashed as above too.
Click to expand...
Click to collapse
I flashed your patched kernel again and got into a bootloop: Bootloader unlocked warning and white SONY splash screen in an endless loop.
Since my XZ1 was connected to my Windows workstation already, I simply long pressed the volume up button till the notification light went blue, and booted into twrp to restore the stock kernel (rooted by Magisk to remove the dmverity stuff).

@SGH-i200, you are right, it is the verity thing.
I've assumed that verity is ignored when kernel detects unlocked bootloader, because the dm-android-verity kernel component used that is_unlocked() call to:
/* Allow invalid metadata when the device is unlocked */
- that comment is in the dm-android-verity.c source code.
But it looks like that is only a corner case and if verity metadata is valid, verity is active (if not disabled in device tree) even with unlocked bootloader.
Now I am wondering: for OTA updates we need untouched system, so having verity enabled in the kernel is good for this purpose - when you flash something that writes to system or vendor, you may detect it soon enough to be able to tell what it was. The main feature of magisk is that you should be able to "modify" system "systemlessly", i.e. without really writing to system or vendor partitions.
From this point of view it should be all good then.
But I understand that the "alternative" use of this kernel, i.e. not planning to do FOTA at all, just using only the unlock hide feature restoring drm functionality and using root the old way (with real writes to system) may be liked.
For this, just use magisk manager main screen, in "Advanced Settings" unselect the "Preserve AVB 2.0/dm-verity" option and then use the "Magisk INSTALL" button, confirm install of Magisk-v*.zip, select "Patch Boot Image File", browse to sdcard where you put my kernel image and select it.
Magisk will repack the boot image disabling dm-verity in device tree blobs, noting where you can find patched_boot.img.
Flash that and you should be good to go.
This procedure is valid for all my pie kernel builds.
I will repack the oreo 16.20 build as using magisk manager gui would not keep the magisk patch for sony ric daemon.
-- edit --
Updated post#3 with downloads of oreo kernels noverity repacks.

Thanks for the kernel but after flashing the kernel the phone don't go into doze (deep sleep). Any suggestions on this?

j4nn said:
Now I am wondering: for OTA updates we need untouched system, so having verity enabled in the kernel is good for this purpose - when you flash something that writes to system or vendor, you may detect it soon enough to be able to tell what it was. The main feature of magisk is that you should be able to "modify" system "systemlessly", i.e. without really writing to system or vendor partitions. From this point of view it should be all good then.
Click to expand...
Click to collapse
I use AdAway and activated NightLight by copying a apk to /vendor/overlay .
Thanks for creating the noverity Oreo kernel versions! :good:
---------- Post added at 09:04 AM ---------- Previous post was at 08:57 AM ----------
j4nn said:
The main feature of magisk is that you should be able to "modify" system "systemlessly", i.e. without really writing to system or vendor partitions.
But I understand that the "alternative" use of this kernel, i.e. not planning to do FOTA at all, just using only the unlock hide feature restoring drm functionality and using root the old way (with real writes to system) may be liked.
For this, just use magisk manager main screen, in "Advanced Settings" unselect the "Preserve AVB 2.0/dm-verity" option and then use the "Magisk INSTALL" button, confirm install of Magisk-v*.zip, select "Patch Boot Image File", browse to sdcard where you put my kernel image and select it.
Magisk will repack the boot image disabling dm-verity in device tree blobs, noting where you can find patched_boot.img. Flash that and you should be good to go. This procedure is valid for all my pie kernel builds.
Click to expand...
Click to collapse
If I flash your patched Pie kernel via TWRP and flash Magisk right after, this should have the same effect as patching your kernel via the Magisk app, right?
@j4nn - "using root the old way (with real writes to system)" - will flashing Magisk via TWRP change this to system-less root?

sinkoo1979 said:
Thanks for the kernel but after flashing the kernel the phone don't go into doze (deep sleep). Any suggestions on this?
Click to expand...
Click to collapse
I have no idea. In my opinion, if you get such behaviour with my kernel, you will get exactly the same behaviour with stock kernel of the same version.
My kernel is compiled from sony's open source kernel package, with kernel config that's identical (except few comment lines) to the one compiled in stock kernel.
My kernel patch only fixes kernel command line that comes from bootloader and hijacks trust zone api to mask the bootloader status to appear as still locked to firmware's userspace.
These changes hardly could have any influence on power saving behaviour.
Please flash the same version stock kernel and test again for deep sleep.
Could not be that caused by some app you've installed?
SGH-i200 said:
If I flash your patched Pie kernel via TWRP and flash Magisk right after, this should have the same effect as patching your kernel via the Magisk app, right?
@j4nn - "using root the old way (with real writes to system)" - will flashing Magisk via TWRP change this to system-less root?
Click to expand...
Click to collapse
Most likely flashing magisk via twrp after flashing the patched pie kernel would disable verity too.
Using the image file - you have it under your control.
Flashing from twrp - some magisk scripting tries to detect if verity should be disabled or not.
Also a kernel image already containing magisk contains the setting of verity and encryption - not sure how that is used when flashing magisk again over it.
I tried it with my xz1c and verity was flipped from enabled to disabled - so the same effect (this time).
But as described, some detection is used, so the results might not always be the same.

j4nn said:
I have no idea. In my opinion, if you get such behaviour with my kernel, you will get exactly the same behaviour with stock kernel of the same version.
My kernel is compiled from sony's open source kernel package, with kernel config that's identical (except few comment lines) to the one compiled in stock kernel.
My kernel patch only fixes kernel command line that comes from bootloader and hijacks trust zone api to mask the bootloader status to appear as still locked to firmware's userspace.
These changes hardly could have any influence on power saving behaviour.
Please flash the same version stock kernel and test again for deep sleep.
Could not be that caused by some app you've installed?
reflashed stock firmware and everything is fine. Thanks for the kernel.
Click to expand...
Click to collapse

j4nn said:
Downloads
This is for alternative use only - please see post#10 for more details.
boot-G8341-47.1.A.16.20-hideunlock-rooted-noverity.img
boot-G8342-47.1.A.16.20-hideunlock-rooted-noverity.img
Screenshots of XZ1c FOTA system update from pie 47.2.A.4.45 to pie 47.2.A.6.30 version
(video available here since 08:10 time)
Click to expand...
Click to collapse
Hi j4nn
I unlocked my bootloader on 47.1.A.16.20 and lost my drm keys. I upgraded via newflasher_v13 to 47.2.A.4.45 Customised SG as that is where i am based and where my phone is from. Unfortunately when I flash boot-G8342-47.2.A.4.45-hideunlock-rooted.img my phone still boots up showing the device has been unlocked and the Backup and Restore feature of Xperia devices does not work. Am I correct to say if I lost my drm keys that I am unable to use this kernel to hide my bootloader unlock?
Thank you for answering me.

Working fine on xz1 pie 47.2.A.6.30 with blx firmware, Kernel flashed with twrp, widevine is L1 now, and Bravia engine working

@leonaheidern, the kernel would hide the unlocked bootloader regardless you lost drm keys or restored locked TA.
Please check you kernel build date when you boot your phone in about menu.

@j4nn, I have a quick question and a bit off topic, I'm still tinkering a bit but I did manage to backup my ta. and I flashed janjan's so things may seem a bit off, (see pic).. but I did restore my ta. before flashing Jan's kernel, any idea what may happen if I flashed yours on top?
oh and everything is working..

@lilbrat, I guess that the result would be the same if you flashed my kernel without flashing janjan's before it.
Just note please, my kernels as they are have verity enabled, so you need to have unmodified stock fw.
Or disable verity as hinted for alternative use.
With my kernel and restored TA your security screen would look perfect as with a still locked phone.

j4nn said:
@lilbrat, I guess that the result would be the same if you flashed my kernel without flashing janjan's before it.
Just note please, my kernels as they are have verity enabled, so you need to have unmodified stock fw.
Or disable verity as hinted for alternative use.
With my kernel and restored TA your security screen would look perfect as with a still locked phone.
Click to expand...
Click to collapse
OK.. thanks for the info... now I have another question, now that xz1 has a new update out and granted it will take you a bit to catch up if you need to redo all your kernels you have going... (great work by the way) Will I need to reflash my ta. backup for the new firmware and or just your kernel?

Related

[RECOVERY][UNOFFICIAL][Sanders] TWRP-3.2.1-r20 (64bit Supported!)

Unofficial TWRP for Moto G5S Plus (Sanders)​
Additional Features over Official TWRP:
Supports flashing of both 32bit and 64bit ROMs and Kernels.
OREO Images/ROMs support.
Decryption and Encryption support.
No SuperSU by default.
No TWRP app.
No HTC Dumlock cruft.
Updated pigz compressor (slightly faster and more tolerant of corruption).
NTFS support(Both Read and Write).
Covers more partitions for nandroid backup (OEM, FSG and FSC).
Experimental support for SD cards that are partitioned for partial adopted storage and partial removable storage.
Faster I/O performance.
Fixed Gapps/aroma freeze issues.
IMPORTANT!!! : READ INSTRUCTIONS CAREFULLY BEFORE PROCEEDING TO FLASHING PROCESS..!!
At first boot twrp will ask for "Swipe to allow modifications for /system" and if you choose to allow it system partition will get modified. So if you choose to reboot back to OS without performing anything in twrp, the OS won't boot (as verity check is enabled in stock OS/kernel) . To avoid this you have to flash either Magisk or flash any of the verity disabler zips available on xda.
Force encryption is enabled by default in stock OS and twrp will successfully decrypt /data at first boot if all goes well
If in case decryption doesn't go fine, twrp will popup a dialog box asking for password and that means decryption went wrong and you would need to wipe data once via twrp wipe options and reboot back to twrp for functioning of /data
Flashing Instructions:
Using Existing TWRP:
Reboot to recovery > Click on Install > Install Image > recovery > select recovery image and flash > reboot to recovery
Other Methods(Fastboot) :
Make sure you have unlocked bootloader
Reboot to bootloader
Enter following command in terminal: fastboot flash recovery twrp-****.img (if you want permanent flash) or fastboot boot twrp-****.img (if you want temporary boot)
Incase your device is encrypted (while coming from stock rom), Follow these steps to decrypt:
Reboot to recovery > cancel the password prompt > mount all partitions > Format Data/Userdata (on f2fs) > Reboot Recovery > Mount all partitions again > Flash Magisk > Reboot
Now you are free to use Stock ROM (Decrypted) or Flash any custom rom you want.
Download Links: https://www.androidfilehost.com/?w=files&flid=216298
TWRP Themes: Check 3rd post
Known Issues: None || Report if you find any.
XDA:DevDB Information
[RECOVERY][UNOFFICIAL][Sanders] TWRP-3.2.1-r20 (64bit Supported!), Tool/Utility for the Moto G5S Plus
Contributors
CheckYourScreen
Source Code: https://github.com/CheckYourScreen/twrp_device_motorola_sanders
Version Information
Status: Stable
Current Stable Version: r20
Stable Release Date: 2018-04-04
Created 2017-10-26
Last Updated 2018-04-04
|| Changelog ||
r20:
Fixed Encryption support on custom roms.
Updated kernel
Updated build fingerprint for latest bootloader support.
Reverted pigz changes.
Switched back to original twrp themes. (TWRP Themes can be found in 3rd post )
Various bug fixes and improvements.
r16:
Fixed compatibility with New Bootloader (C2.07-December patch)
Merged october patches in kernel.
Various twrp upstream patches and fixes.
Fixed remote wipe process (Earlier remote wipe issued from play account wasnt processed due to twrp)
r15:
Added 64bit Support (You can flash both 32bit/64bit roms or kernels with it).
Fixed Encryption Support! (No need to format data to decrypt and mount).
Updated to 3.2.1 upstream changes with full oreo support.
Remove android reboot during password check on multiple wrong inputs.
r9:
Fixed F2FS mount issues(You can flash magisk modules or SuperSu now).
Enabled NTFS Write Support (You can make backups on sdcard/pendrives formatted on NTFS).
Fixed size of various partitions.
Switched to LZMA compression to decrease size.
r7: Initial Public Release
|| Themes ||
Here are some of the twrp themes:
Preview images: https://photos.app.goo.gl/DLrfDseGzfxE8Uq93
Download link: https://androidfilehost.com/?w=files&flid=233551
:good:
Only one that has actually be working for me ever since I got the phone. Thank you for your efforts.
this seems to suffer from the same thing the stock rom/kernel suffers from, the weird f2fs bug that makes certain mounts fail. geneticengineer has shared a kernel that fixes this in stock rom , maybe you could get in touch with him about how he updated f2fs
Thank you for your work, this seems to work well on my device. If you would like to swap the kernel, I posted a newer firmware NPS26.116-45 here:https://forum.xda-developers.com/showpost.php?p=74325160&postcount=33
revengineer said:
Thank you for your work, this seems to work well on my device. If you would like to swap the kernel, I posted a newer firmware NPS26.116-45 here:https://forum.xda-developers.com/showpost.php?p=74325160&postcount=33
Click to expand...
Click to collapse
But its for xt1806 only i think. Not real help. The most user here are outside usa.
Schrotty35 said:
But its for xt1806 only i think. Not real help. The most user here are outside usa.
Click to expand...
Click to collapse
Well my guess is that the kernel in the present twrp is from the -26 firmware posted in the other thread. That firmware was US Retail also. The OP in the other thread states in can be used on other models. But I am not going to tell you that because I do not know. I have not found any other firmware for the sanders model.
Ae3NerdGod said:
this seems to suffer from the same thing the stock rom/kernel suffers from, the weird f2fs bug that makes certain mounts fail. geneticengineer has shared a kernel that fixes this in stock rom , maybe you could get in touch with him about how he updated f2fs
Click to expand...
Click to collapse
Afaik it doesnt affect TWRP, you just need to be on a custom kernel if you are running stock rom.
Twrp has nothing to do with it.
If you face any problem flashing anything then post a screenshot or log.
revengineer said:
Thank you for your work, this seems to work well on my device. If you would like to swap the kernel, I posted a newer firmware NPS26.116-45 here:https://forum.xda-developers.com/showpost.php?p=74325160&postcount=33
Click to expand...
Click to collapse
Schrotty35 said:
But its for xt1806 only i think. Not real help. The most user here are outside usa.
Click to expand...
Click to collapse
Stock kernel is same in both the firmwares.
-45 is just for US variant, i dont recommend you to even flash that firmware on other variants.
CheckYourScreen said:
Afaik it doesnt affect TWRP, you just need to be on a custom kernel if you are running stock rom.
Twrp has nothing to do with it.
If you face any problem flashing anything then post a screenshot or log.
Click to expand...
Click to collapse
but i have a custom stock kernel, and things that fail in TWRP work in flashfire or magiskmanager
its mostly magisk modules im having problems with, ill reproduce an error when i get the chance
Ae3NerdGod said:
but i have a custom stock kernel, and things that fail in TWRP work in flashfire or magiskmanager
its mostly magisk modules im having problems with, ill reproduce an error when i get the chance
Click to expand...
Click to collapse
Flash the magisk module via twrp > take screenshot when flashing completes > go to advance section of twrp and take recovery log > reboot system > send that screenshot and recovery log here.
CheckYourScreen said:
Flash the magisk module via twrp > take screenshot when flashing completes > go to advance section of twrp and take recovery log > reboot system > send that screenshot and recovery log here.
Click to expand...
Click to collapse
will do, it happens with every magisk package i try. they used to fail in stock too till i used geneticengineers kernel from telegram now they work
didnt know you could screenshot in recovery, i assume its the same buttons
Ae3NerdGod said:
will do, it happens with every magisk package i try. they used to fail in stock too till i used geneticengineers kernel from telegram now they work
didnt know you could screenshot in recovery, i assume its the same buttons
Click to expand...
Click to collapse
Yes, same buttons to take a screenshot in TWRP
TWRP backup is frozen at 13% completed. The progress bar is still showing its animation.
I unlocked the bootloader, and then rebooted. Android came up with the language selection screen. I powered off, connected the phone to the PC, and booted into TWRP (not flashed yet):
Code:
fastboot boot twrp-3.1.1-sanders-r7.img
I did not let TWRP format /data.
Then I started a backup, selecting all partitions, so that I could always go back after flashing TWRP and Magisk.
Does anyone know why backup is stuck at 13%? Last log line says "Backing up System..."
I tapped "Cancel" after two hours. That stopped the progress bar animation, but not the backup itself.
BTW: I used TWRP from this thread, the one in another thread freezes at the TWRP boot logo.
Edit: after two hours I killed the backup by powering down (the only way it seemed). On retry it froze at 21%.
Edit 2: Retried, this time backing up everything except system. No problem. I then tried to backup system. Frozen at 1%. What is the problem here?
Edit 3: Finally, a complete backup of system! Only one to go: system_image. But unfortunately that froze at 0%. Every subsequent try freezes at 1666MB (40%). The card has over 30GB free. I tried backup to USB-OTG, but that also froze.
gewe said:
TWRP backup is frozen at 13% completed. The progress bar is still showing its animation.
I unlocked the bootloader, and then rebooted. Android came up with the language selection screen. I powered off, connected the phone to the PC, and booted into TWRP (not flashed yet):
Code:
fastboot boot twrp-3.1.1-sanders-r7.img
I did not let TWRP format /data.
Then I started a backup, selecting all partitions, so that I could always go back after flashing TWRP and Magisk.
Does anyone know why backup is stuck at 13%? Last log line says "Backing up System..."
I tapped "Cancel" after two hours. That stopped the progress bar animation, but not the backup itself.
BTW: I used TWRP from this thread, the one in another thread freezes at the TWRP boot logo.
Edit: after two hours I killed the backup by powering down (the only way it seemed). On retry it froze at 21%.
Edit 2: Retried, this time backing up everything except system. No problem. I then tried to backup system. Frozen at 1%. What is the problem here?
Edit 3: Finally, a complete backup of system! Only one to go: system_image. But unfortunately that froze at 0%. Every subsequent try freezes at 1666MB (40%). The card has over 30GB free. I tried backup to USB-OTG, but that also froze.
Click to expand...
Click to collapse
Might be due to data partition being encrypted, you cant write anything in it without decrypting it first.
Format data and reboot recovery, then make the backup. You can flash magisk after taking the backup.
Btw r9 new release on its way with some really important changes
CheckYourScreen said:
Might be due to data partition being encrypted, you cant write anything in it without decrypting it first.
Format data and reboot recovery, then make the backup. You can flash magisk after taking the backup.
Btw r9 new release on its way with some really important changes
Click to expand...
Click to collapse
I was not trying to write the backup to the data partition, but to external SD card (tried OTG-USB as well without success).
I have flashed TWRP, formatted the data partition, and flashed Magisk. I have not tried to create a new backup yet. First I want to find out why Magisk does not pass the Safetynet check.
Can't wait to see what r9 brings. Thanks for your efforts. :good:
gewe said:
I was not trying to write the backup to the data partition, but to external SD card (tried OTG-USB as well without success).
I have flashed TWRP, formatted the data partition, and flashed Magisk. I have not tried to create a new backup yet. First I want to find out why Magisk does not pass the Safetynet check.
Can't wait to see what r9 brings. Thanks for your efforts. :good:
Click to expand...
Click to collapse
Magisk won't pass safety net with stock boot.img (kernel). Here is a modified kernel.
https://forum.xda-developers.com/showthread.php?p=73930507
After flashing new kernel Magisk passes no problem.
Sent by way of magic
lilcdroid said:
Magisk won't pass safety net with stock boot.img (kernel). Here is a modified kernel.
https://forum.xda-developers.com/showthread.php?p=73930507
After flashing new kernel Magisk passes no problem.
Sent by way of magic
Click to expand...
Click to collapse
When I flash this my WiFi stops working completely. I'm running aosp extended rom. I'm not sure if I can achieve battery life as good as I can on the stock ROM as I can on this one so im not sure what I should do about that..
Brycearuuni said:
When I flash this my WiFi stops working completely. I'm running aosp extended rom. I'm not sure if I can achieve battery life as good as I can on the stock ROM as I can on this one so im not sure what I should do about that..
Click to expand...
Click to collapse
Sorry I wasn't aware you weren't still on stock. That kernel will only work on stock. I would verify with the maintainer of AOSP extended ROM that the kernel is patched to work with Magisk.
Sent by way of magic

[GUIDE] Full root with Magisk and DRM fix [UNMAINTAINED]

Prefix: my xz1 died on me so I was forced to buy a new phone and therefore I won not be maintaining this thread any further. The guide should be relevant even without my help but I just won't be answering any questions regarding this thread or anything to do with the xz1.
YOU DO NEED TO UNLOCK YOUR BOOTLOADER AND THEREFORE WILL LOSE YOUR DRM KEYS!
NONE OF THIS IS MY ORIGINAL WORK BUT MY PROCESS IS ORIGINAL. YOU CAN THANK @modpunk FOR HIS PORT OF TWRP TO THE XZ1 AND YOU CAN THANK @janjan FOR HIS HARD WORK IN CREATING THE FIRST FULLY FUNCTIONAL KERNEL THAT SUPPORTS MAGISK AND STILL OFFERS A WORKING CAMERA AND SONY FEATURES
Here we go.....
1: Download modpunk's port of TWRP from this thread: https://forum.xda-developers.com/xperia-xz1/development/recovery-twrp-3-2-1-t3727602
Make sure to check the dates on the files and always download the latest version.
2: Download Janjan's kernel and DRM package here:
https://forum.xda-developers.com/xperia-xz1/development/kernel-sony-xz1-23-january-2018-t3739586
Make sure to check the dates on the files and always download the latest version.
3: Enable developer settings and enable ADB Debugging. I shouldn't have to say this part but something tells me if i don't then i'll get loads of questions about not being able to connect to the phone, lol.
4: Connect the phone to your pc and copy the 3 zip files contained in the janjan download to your phone. You don't need to copy the boot.img to your phone.
5: Open a cmd window on your pc and type the following:
adb reboot bootloader
6: Once the pc recognizes the phone in bootloader mode then type:
fastboot flash boot path/to/the/boot.img (I usually just type "fastboot flash boot " and then just drag and drop the boot image into the cmd window.
7: Once the boot image is flashed unplug the cable from the phone then reboot it. Once it's running then make sure the kernel info has changed to say "[email protected] #1
8: Once again, boot into bootloader by running the adb command
adb reboot bootloader
9: Once in the bootloader type into the cmd window:
fastboot flash recovery path/to/the/recovery.img
10: Reboot to system and then power off the phone.
11: Once it's off, boot into TWRP manually by holding the power button + the vol down button until the phone vibrates once, then let go and it'll boot into TWRP.
NOTE: It will ask you for your password to decrypt the data partition. This password is whatever your pin number or password you use on your phone lockscreen. If you don't use any lockscreen security then the password is: default_password.
12: Once in TWRP flash 2-Patching_drm_Su and 3-Magisk and then reboot to system and check that magisk is installed.
13: Finally open magisk and open the Modules section then tap the + icon and locate and flash the last zip 4-kernel_permissive and then reboot the phone and open magisk and check the modules section to ensure the Magisk SELinux Permissive Script is active.
Now you have a fully functional XZ1 with Magisk root and a properly functioning camera and Sony features.
Enjoy!
N1ghtr08d
Sorry.You forgot to flash SR5-SuperSU-v2.82-SR5-20171001224502.zip in TWRP recovery after step 13
Posting not relevant anymore!!!
1:st posting fixed by N1ghtr08d
Thanks bro. I had edited it and I must have missed putting that back in. Fixing it now
Any try to use Magisk instead of SuperSU ? I need to use some apps witch don't work with root phone.
If you turn the phone off, press and hold 'Volume Up' and attach a USB Cable from your PC it will boot into the bootloader. The LED will be blue then ...
Thanks modpunk, that is very true. I guess my preference is just to use ADB.
As far as magisk is concerned, I believe that none of the magisk releases work with this device. I would prefer to use magisk also so if anyone figures out how to install it successfully without putting the phone in a bootloop, please share it here and I will update this guide. I'd rather have SuperSU than no root at all.
Does anybody have any tips for installing Viper4android? I renamed the audioeffects file in System/Vendor/Etc and installed the Nougat test io fix version and when I opened the app and allowed it to update the drivers, everything went well and looked successful, however upon reboot and opening the app to set it up, it just tells me to update the drivers and reboot again and even doing that just lands me back at the same point.
Does anybody know how I can get it installed and running properly?
Coincidentally V4A installs and runs perfectly now that it can be installed through Magisk Manager!
What FOTA kernel.img are you referring to? There wasn't one linked in the post, and Sony's fotakernel files are in .sin formats. Flashing just the boot.img linked in your post results in a brick. Flashing the fotakernel_X-FLASH-ALL-C93B.sin included in Sony's firmware also results in a brick. Has anyone got this to work?
trevorftard said:
What FOTA kernel.img are you referring to? There wasn't one linked in the post, and Sony's fotakernel files are in .sin formats. Flashing just the boot.img linked in your post results in a brick. Flashing the fotakernel_X-FLASH-ALL-C93B.sin included in Sony's firmware also results in a brick. Has anyone got this to work?
Click to expand...
Click to collapse
Flash boot.img to both boot partition and FOTAKerner partition
fastboot flash boot boot.img
fastboot flash FOTAKernel boot.img
---------- Post added at 02:50 PM ---------- Previous post was at 02:45 PM ----------
Can I use the aledoom's port of the Andro+ kernel at https://mega.nz/#!00l3mABT!RCuCfvwxROggim9D_GwfdhZDTPQJomNrfWZy_lsq0-U for the new 47.1.A.8.49 release?
pergoteborg said:
Flash boot.img to both boot partition and FOTAKerner partition
fastboot flash boot boot.img
fastboot flash FOTAKernel boot.img
Click to expand...
Click to collapse
What FOTAKernel boot.img though? Am I supposed to download one from somewhere? It's not in OP or in the Sony firmware that I've downloaded.
trevorftard said:
What FOTAKernel boot.img though? Am I supposed to download one from somewhere? It's not in OP or in the Sony firmware that I've downloaded.
Click to expand...
Click to collapse
The link https://mega.nz/#!00l3mABT!RCuCfvwxROggim9D_GwfdhZDTPQJomNrfWZy_lsq0-U is the download link for boot.img
fastboot flash FOTAKernel boot.img
The parameters is:
fastboot - An Android SDK command and library used to communicate with a connected android device
flash - The fastboot command you wish to execute. "fastboot flash" takes two parameters, which are:
FOTAKernel - The partition on the connected phone you want to flash and
boot.img - The file you want to flash into FOTAKernel partition.
In this case is the same file (boot.img) flashed into BOTH boot partition(fastboot flash boot boot.img) and into FOTAKernel partition(fastboot flash FOTAKernel boot.img)
Thank you for the help Pergoteborg. I thought the guide was fairly self explanatory.
I pointed out in the op that the one boot image I provided in the download is to be flashed to 2 different partitions.
If you follow my instructions as provided you will have success. It's really easy to follow along if you read it properly.
pergoteborg said:
Can I use the aledoom's port of the Andro+ kernel at https://mega.nz/#!00l3mABT!RCuCfvwxROggim9D_GwfdhZDTPQJomNrfWZy_lsq0-U for the new 47.1.A.8.49 release?
Click to expand...
Click to collapse
I tested myself and answer is NO. Therefor no magisk for 47.1.A.8.49 yet since we do not have kernel support. Root achieved by SuperSU
So I :
Got phone in flash mode (Vol- when putting in computer USB cable, Green light). Ran NewFlasher with 47.1.A.8.49
Booted phone, turned it of and set it to fastboot mode (Vol+ when putting in computer USB cable, Blue light)
Flashed TWRP: fastboot flash recovery twrp-3.2.1-0-poplar-patchlevel-2017-11-05.img
Booted phone, Uninstalled Magisk manager, Installed SuperSU App from Google Play.
Turned off phone, booted into TWRP (Vol- and pwr, release pwr button when phone vibrates, hold on the Vol- button)
Installed Magisk-uninstaller-20171123.zip to get rid of Magisk. Installed SR5-SuperSU-v2.82-SR5-20171001224502.zip to get SU
HIPP!!!
pergoteborg said:
The link https://mega.nz/#!00l3mABT!RCuCfvwxROggim9D_GwfdhZDTPQJomNrfWZy_lsq0-U is the download link for boot.img
fastboot flash FOTAKernel boot.img
The parameters is:
fastboot - An Android SDK command and library used to communicate with a connected android device
flash - The fastboot command you wish to execute. "fastboot flash" takes two parameters, which are:
FOTAKernel - The partition on the connected phone you want to flash and
boot.img - The file you want to flash into FOTAKernel partition.
In this case is the same file (boot.img) flashed into BOTH boot partition(fastboot flash boot boot.img) and into FOTAKernel partition(fastboot flash FOTAKernel boot.img)
Click to expand...
Click to collapse
Thanks for being actually helpful. I wasn't familiar with the FOTAKernel partition. I though it was a typo that was supposed to be the name of some boot.img. I'm familiar with everything else about fastboot. I'm still getting a glitchy display after flashing the boot.img to the boot and FOTAKernel partitions. I think I'll just check out and give up on this one.
Hi There
Thank's to my hero aledoom who ported XZ1 (G8342) FW47.1.A.8.49 to Androplus we can now enjou latest FW and Magisk
Download the patched kernel here (aledoom´s direct link here)
If you currently have root with SU, get rid of it by flasching UPDATE-unSU-signed.zip in TWRP
Then follow the OP, but use kernel from here instead of OP boot.img.
I currently testing MAGISK 15.0 and it's working fine except there is no modules ported to the new template just yet,
Hi all, do you think that TWRP, Androplus kernel et Magisk work on a XZ1 Dual ?
I don't know. To be honest, you'd need to check with modpunk and aledoom if their recovery and kernel are compatible
So this is actually my first official post as a new member on this site but have been a long time user of the guides here. I have a question but I want to root my xz1 to optimize the performance and what not and just cause haha. My question is about what's being lost. I noticed something called xreality or something won't be accessible. What is this? Reason I'm asking is that I playmobile legends and this phone and only this phone I've found has an in game option for. "high frame rate" mode.. I'm not interested in rooting it if all I'll do is make it perform less rather then the opisite anywho Sony's alot different then most android im finding so I figure what the hell better make an account finally and ask.
I have no idea what xreality is. Is it a Sony app?
As far as what's lost, you lose the DRM keys so the camera stops working correctly, as in when you take a photo it just turns out as a green image instead of the picture you intended.
Now with that being said, someone over on the root bounty thread apparently discovered a fix for this that allows the camera to function fully as before. I have tried flashing this fix on my personal device and it didn't work as expected however I'm using magisk for root instead of SuperSU like the poster stated so I'm waiting on a reply from him regarding the usage of magisk Vs SuperSU with his fix.
Here's the thread in question. He posted right at the end of the thread just before me.
https://forum.xda-developers.com/xp...z1-compact-lb-root-drm-backup-t3672176/page16

[stock 8.0][Unlocked bl][34.4.A.2.19; ...32; ...85] Root and Recovery (3 clicks)

Thanks to serajr here - https://forum.xda-developers.com/showpost.php?p=75505302&postcount=2973 Go directly to that post and give thanks.
You need:
Stock O ftf (best to use Flashtool/Xperifirm)
Modded boot img for 34.4.A.2.19 - https://mega.nz/#!AgtQ2Sob!JjLRcUVjuy6FNanjGY49g-YYmkcda04witfHp4hwvmo
Modded boot img for 34.4.A.2.32 - https://mega.nz/#!Z1tzEJbZ!e9ET_RtUpKjXRwnJa_TDsMrVwvT-hPxmk06KtryHOuc
Modded boot img for 34.4.A.2.85 - https://mega.nz/#!p5UwAabR!_ofmr_WdId9RdH48Xb3cZtSIzsQ6qcTJTAFYcKHFWJE
Kernel elf file to use with rootkernel [34.4.A.2.85] - https://mega.nz/#!M102lYTZ!9bj2KE-vbNWlej3Dw0NuiXJcfpgiy16svSHud73bLfw
Modded boot img for 34.4.A.2.107 - https://mega.nz/#!Nls0EQBR!Cc4lVcA85f8YeNTo8nMqsuwLzveW5duSbyeZDlI5kDE
Kernel elf file to use with rootkernel [34.4.A.2.107] - https://mega.nz/#!Zp10CASK!iGLE94Tj1SSk1U2p4KLpVrcGmD68C3YvqKMXD6VPFjI
Modded boot img for 34.4.A.2.118 - https://mega.nz/#!14VkzCCB!GK-KEv0A-ZyhysXc1-IusyJjJEB-D5ZWOLm1DRt31tA
Kernel elf file to use with rootkernel [34.3.A.2.118] - https://mega.nz/#!Ylcm1SwA!GuX9dfd2HAqLXy1jom-C6mgP0s4jYXl9qSySkvb_mtA
TWRP - https://forum.xda-developers.com/x-compact/development/ub-twrp-v3-2-1-xperia-x-compact-t3793837
1. Flash stock ftf from Xperifirm via Flashtool
2. After flash, connect in fastboot (before booting phone) and type in command line 'fastboot flash boot boot.img' (this assumes that your modified boot img is in the current directory,and is named 'boot.img'; otherwise, you need to edit the command accordingl)
3. Then type 'fastboot flash recovery twrp-3.2.1.img' (same note as above)
Done
Now, you can flash Magisk, (or whatever), and have root access.
If you want Drm fix, flash serajr's zip here - https://forum.xda-developers.com/attachment.php?attachmentid=4404527&d=1517335127
If you want to restore your own ta with munjeni tool, you will need to patch boot img yourself with rootkernel tool here - https://forum.xda-developers.com/showpost.php?p=74724162&postcount=2793
How to get stock kernel elf and patch your boot img with rootkernel:
1. Download and build stock ftf from Xperifirm via Flashtool
2. Go to Flashtool > tools > sin editor, and navigate to stock kernel sin file, in the downloaded firmware folder. Click on sin file and choose 'exrract data', and it will create a kernel elf.
3. Follow the guide by serajr. You need only to put the kernel elf into rootkernel folder, then open a command prompt there and run 'rootkernel kernel.elf boot.img'. Answer all questions 'yes', unless you want to skip drm fix and restore your own ta, (if that's the case, you need your target file in that folder renamed to TA.img). After script runs, you will have a new boot img that you can use to follow the guide.
Done...
Magisk, MicroG, and Xposed tested... (update - I haven't tried yet, but I've read that Xposed not working on ...85; update 2 - confirmed, bootloop; update 3 - Xposed fix now available here - https://forum.xda-developers.com/x-compact/themes/xposed-fix-118-t3870673)
I made a patched boot img with rootkernel tool and uploaded it. Link in op. Don't forget to thank serajr...
Can confirm the above method worked for me. I used the TA.img instead of drm fix, and i get root and security test still have widefine and fidokeys enabled.
Just slight reminder for linux user, you need to add execute permission on both `rootkernel` and `bootimg`, otherwise rootkernel tool will fail with permission issue.
levone1 said:
I made a patched boot img with rootkernel tool and uploaded it. Link in op. Don't forget to thank serajr...
Click to expand...
Click to collapse
With which options is your modified boot image prepared?
maluus said:
With which options is your modified boot image prepared?
Click to expand...
Click to collapse
Dm-verity disable - yes
Force encrypt disable - yes
Drm fix - yes
For Drm fix you still have to flash serajr zip. If you want to restore ta with munjeni tool, you will need to patch boot yourself.
Op updated for 3-click root...
SuperSU,Xposed
Hello,
can you please help me with a little problem? I just did everything step by step, but I can't still get root access (after flashing boot.img SuperSU still shows "no root detected"). And one more question. I used that DRM fix zip, but still get "Not provisioned". Am I miss something? (but nevermind, I can use my TA backup, but I'm just curious about that).
Thanks guys.
Arsis said:
Hello,
can you please help me with a little problem? I just did everything step by step, but I can't still get root access (after flashing boot.img SuperSU still shows "no root detected"). And one more question. I used that DRM fix zip, but still get "Not provisioned". Am I miss something? (but nevermind, I can use my TA backup, but I'm just curious about that).
Thanks guys.
Click to expand...
Click to collapse
...
Arsis said:
Hello,
can you please help me with a little problem? I just did everything step by step, but I can't still get root access (after flashing boot.img SuperSU still shows "no root detected"). And one more question. I used that DRM fix zip, but still get "Not provisioned". Am I miss something? (but nevermind, I can use my TA backup, but I'm just curious about that).
Thanks guys.
Click to expand...
Click to collapse
Boot img just enables modification by disabling Sony security stuff, but you still need to flash whatever mod you want. So after flashing boot and recovery img, then flash supersu (or whatever), and you should have root.
I can't say about drm fix, since I've never used it before, but I don't think it will show fido provisioned, etc, because it simply recreates the drm functions through a different method, (not with ta).
I was able :laugh::good: Xposed release link
levone1 said:
Boot img just enables modification by disabling Sony security stuff, but you still need to flash whatever mod you want. So after flashing boot and recovery img, then flash supersu (or whatever), and you should have root.
I can't say about drm fix, since I've never used it before, but I don't think it will show fido provisioned, etc, because it simply recreates the drm functions through a different method, (not with ta).
Click to expand...
Click to collapse
Oh, well. Thank you! It's working now.
Hello,
i flashed on my sony with oreo this boot.img and twrp and im stuck on sony logo. Any ideas what could be wrong? I tried android 34.4.A.0.364 singapure and UK versions and neither of these works with this twrp.
I have the newest platform-tools and flashing went well.
Thanks
Stephenhs said:
Hello,
i flashed on my sony with oreo this boot.img and twrp and im stuck on sony logo. Any ideas what could be wrong? I tried android 34.4.A.0.364 singapure and UK versions and neither of these works with this twrp.
I have the newest platform-tools and flashing went well.
Thanks
Click to expand...
Click to collapse
Can you try running the tool and creating the boot.img yourself? I use the singapore ftf and doesn't have problem booting the system (with the boot img I created myself). I do not put twrp on boot img though. I boot twrp from fastboot when needed
I created boot.img and everything works Thanks a lot!
I dont understang the part that says :
Android Oreo ramdisk patching needs some additional files, and they must be copied from Oreo /system into the rootkernel's filesystem_files folder, prior to run the script, and they are:
Code:
/system/vendor/etc/fstab.qcom
/system/vendor/etc/init/hw/init.qcom.rc
/system/vendor/etc/init/hw/init.target.rc
(you can pull these files through adb, or even converting system.sin to system.ext4 and take them out from there - just copy them, and DO NOT touch its contents)
how to do that!? im noob...
Kianush said:
I dont understang the part that says :
Android Oreo ramdisk patching needs some additional files, and they must be copied from Oreo /system into the rootkernel's filesystem_files folder, prior to run the script, and they are:
Code:
/system/vendor/etc/fstab.qcom
/system/vendor/etc/init/hw/init.qcom.rc
/system/vendor/etc/init/hw/init.target.rc
(you can pull these files through adb, or even converting system.sin to system.ext4 and take them out from there - just copy them, and DO NOT touch its contents)
how to do that!? im noob...
Click to expand...
Click to collapse
Post linked in op has special instructions for us with Xc - skip that part.
https://forum.xda-developers.com/showpost.php?p=74724162&postcount=2793
hello guys, i've created a boot.img whit the tool of rootkernel whit my ta.backup but it does not work. the boot it's ok but if i chek my drm keys they say not provisioned. my ta.backup load 2.097.152 byte like the post shows. can someone help me? thanks
update:
sorry guys, i've done again the kernel patch whit my ta backup and this time goes perfect. i don't know why the first time didn't work but now it's ok!
I tried the 3 click method, without doing any boot image myself, but impossible to decrypt with TWRP (or reboot to system).
Wxfdswxc said:
I tried the 3 click method, without doing any boot image myself, but impossible to decrypt with TWRP (or reboot to system).
Click to expand...
Click to collapse
Twrp - https://forum.xda-developers.com/x-compact/development/twrp-3-2-1-decryption-t3751998
As for rebooting to system, can't say for sure... Root method involves only changing boot img, so shouldn't affect system. Any errors in fastboot, etc?
Original flash should be clean flash official stock ftf from Xperifirm. First boot could be 10 minutes...

My Sony Xperia XZ1 is stuck on a boot loop after flashing a boot.img file

So I wanted to root my XZ1 and I followed this guide: https://forum.xda-developers.com/xperia-xz1/how-to/guide-how-to-persistant-root-xperia-xz1-t3718375
I unlocked the bootloader, I flashed the boot.img file.
But now the phone just boots until the "SONY" logo screen and reboots....
I flashed a TWRP and thankfully it works.
Please help me, I am desperate.
Also, will the camera work or not (because I lost the DRMs)?
@tesla005
This guide you link is pre-Pie.
You may only flash kernels that are particularly made for your ROM version and device!
The latest ROM version ...10.45 has no matching Janjan kernel as of today (SONY have not released the sources yet).
Flashing anything else -> bootloop
To fix:
Download the latest ROM, unpack it and flash it (plug USB with volume down pressed on switched off device) with newflasher.
To root:
Boot your recovery (fastboot boot twrp is enough): Flash latest Magisk (today 18.1)
install Magisk Manager
On Pie the camera should work.
It is very stupid not to have a backup of your device specific keys.
DHGE said:
@tesla005
This guide you link is pre-Pie.
You may only flash kernels that are particularly made for your ROM version and device!
The latest ROM version ...10.45 has no matching Janjan kernel as of today (SONY have not released the sources yet).
Flashing anything else-> bootloop
To fix:
Download the latest ROM, unpack it and flash it (plug USB with volume down pressed on switched off device) with newflasher.
To root:
Boot your recovery (fastboot boot twrp is enough): Flash latest Magisk (today 18.1)
install Magisk Manager
On Pie the camera should work.
It is very stupid not to have a backup of your device specific keys.
Click to expand...
Click to collapse
is it easy to back up drm keys..? the steps are so long. unlike on the previous sony devices that its just a basic autorun exe. afraid id might mess up something.
pattriccio said:
is it easy to back up drm keys..? the steps are so long. unlike on the previous sony devices that its just a basic autorun exe. afraid id might mess up something.
Click to expand...
Click to collapse
If you have already unlocked your bootloader your keys are gone.. Now j4nn has given us a method to back up your keys and reinstall them after you unlock your bootloader, it is a bit daunting when you read it and there a nice pdf guide but it will take a bit of patience and time..
lilbrat said:
If you have already unlocked your bootloader your keys are gone.. Now j4nn has given us a method to back up your keys and reinstall them after you unlock your bootloader, it is a bit daunting when you read it and there a nice pdf guide but it will take a bit of patience and time..
Click to expand...
Click to collapse
can you share the pdf? yhanks already downloaded the xz1 firmware to have the temp root.

Development [UPSTREAM] Sekiyama Kernel for Oneplus N200 5G "dre"

Sekiyama-Kernel for Oneplus N200 5G
Features:
Main Features:
- Based on latest kernel sources from OnePlus for Android 11
- Upstreamed against latest kernel-common (android12-5.4-lts)
- Linux-Stable-Upstream included to latest 5.4.179
- compiled with Clang 13.0.1 prebuilt from Google
- built with -O3 speed optimizations
- Link-Time-Optimization (ThinLTO)
- Link the kernel with LLD and use RELR-Relocation
- fix several coding issues detected by newer Clang-Toolchains
- include important fixes/improvements from kernel/common
- Supports ALL variants, NA/TMO/OEM
- Wireguard Support
- If you want magisk, you must patch first!!!
Downloads:
https://github.com/ArtiicPanda/oneplus-sm4350/releases
Requirements
- Unlocked Bootloader
- USB Debugging in developer options enabled
- Latest adb and fastboot
How to flash the Kernel:
Boot to fastboot/bootloader to flash boot.img:
Either select Reboot to bootloader option via buttons
or type:
Code:
adb reboot-bootloader
Now in fastboot flash boot.img
Commands:
Code:
fastboot flash boot boot.img
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
Reboot either via buttons
or by typing
Code:
fastboot reboot
@Freak07 for his kernel thread from which I drew inspiration.
Source Code: https://github.com/ArtiicPanda/oneplus-sm4350
reserved
reserved
Any updates?
blowtorchhonor said:
Any updates?
Click to expand...
Click to collapse
Need some time to create a great OP
Tests builds are available here:
Join «Nord N200 Testers» on Telegram: https://t.me/OnePlusNordN2005G
Released. Thank you to all that helped test prior to release. Enjoy!
I can vouch that this kernel really helps this device run faster. I already tested many things from bluetooth to phone calls and everything works. Enjoy everyone!
11.0.2 Update posted, changelog on github
Wonderful work to you and @Travisholt92. Really surprised how far everyone has gotten in such a small amount of time.
Wivioo said:
Wonderful work to you and @Travisholt92. Really surprised how far everyone has gotten in such a small amount of time.
Click to expand...
Click to collapse
Apparently all it took to kick things off was me extracting the defconfig from the stock kernel and showing it could be built (partially) and then @ArtiicPanda being awesome decided to get in on the action
Travisholt92 said:
Apparently all it took to kick things off was me extracting the defconfig from the stock kernel and showing it could be built (partially) and then @ArtiicPanda being awesome decided to get in on the action
Click to expand...
Click to collapse
definitely was a team effort. again thanks to the testers as well. @blowtorchhonor @TheLoonyRebel
Just flashed 11.0.1 (couldn't find a binary for 11.0.2) and it successfully booted on my TMO/metropcs flashed to unlocked firmare running latest Pixel Experience A12 GSI
cognitoinc566 said:
Just flashed 11.0.1 (couldn't find a binary for 11.0.2) and it successfully booted on my TMO/metropcs flashed to unlocked firmare running latest Pixel Experience A12 GSI
Click to expand...
Click to collapse
I think they forgot to post 11.0.2
edit: they forgot to compile the source to a .img
No, there were some minor issues with 11.0.2 so it's being reworked, just use 11.0.1 until then.
Update posted, change log on GitHub
I have this notification that says serial console enabled performance is impacted to disable check bootloader and I have no idea how to disable it. I'm also unable to use usb debugging for more than 2 seconds as it goes away and stops
Tyreethetruth said:
I have this notification that says serial console enabled performance is impacted to disable check bootloader and I have no idea how to disable it. I'm also unable to use usb debugging for more than 2 seconds as it goes away and stops
Click to expand...
Click to collapse
Same here. I installed 11.0.2.1, the most recent one on T-Mobile stock 11.0.1.9 and the same notification shows up.
After reboot, the screen got darker, and can't control brightness anymore.
Going back to stock boot...
lentm said:
Same here. I installed 11.0.2.1, the most recent one on T-Mobile stock 11.0.1.9 and the same notification shows up.
After reboot, the screen got darker, and can't control brightness anymore.
Going back to stock boot...
Click to expand...
Click to collapse
I fixed it, you just have to reflash magisk via fastboot
Tyreethetruth said:
I fixed it, you just have to reflash magisk via fastboot
Click to expand...
Click to collapse
I patched kernel image via magisk then flashed magisk patched kernel image via fastboot and it happened.
lentm said:
I patched kernel image via magisk then flashed magisk patched kernel image via fastboot and it happened.
Click to expand...
Click to collapse
Try flashing the kernal via fastboot then fully boot the phone then flash the magisk patched image again via fastboot and it will get rid of the notification

Categories

Resources