MAKE BOOT.IMG/SIN using POC TA - Sony Xperia M5

I have tried to make a modified boot.img (from 6.0 rom)using Munjeni POC TA tool for our m5. Unfortunately, when flashed phone gets stuck in bootloop.
The tool is supposed to remove :
Dm verity
(make system modification possible)
Sony Ric (enable r/w)
And ultimately enable TA on unlocked bootloader
(meaning device will perform as though bootloader has never been unlocked before)
......
I will keep trying, probably get in touch with Munjeni to assist
Has Anybody tried the tool on marshmallow (6.0) boot.img/SIN with success?
The Tool:
https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893/amp/

It looks like this great phone got no fans around, tried to sell mine for 3 months - only 1 interested person in this time. And even the one got lost in space

Related

[APP][Testing]Kernel/Zip/Recovery Flasher [flashify]

Hello guys,
Whilst searching on google for some kernel flashing methods I saw an app named flashify...
Since I can't use flashtool on my pc for flashing stuff, luckily got my bootloader unlocked via fastboot and half root turned into full root...
Well, cutting the crap...
Test this app... Flashify on both locked and unlocked bootloaders....
Get it from here -
http://forum.xda-developers.com/showthread.php?t=2349847
Bugs--
Locked bootloaders--
None yet
Unlocked Bootloaders --
Recovery image can't be flashed...
Warning -- Half/Full root is needed in order to use this app..
Test and report back.. I will contact the developer to add support for our device too... So people without pc can have custom kernels with recoveries..
Thanks.
kaustubh.rockstar said:
Hello guys,
Whilst searching on google for some kernel flashing methods I saw an app named flashify...
Since I can't use flashtool on my pc for flashing stuff, luckily got my bootloader unlocked via fastboot and half root turned into full root...
Well, cutting the crap...
Test this app... Flashify on both locked and unlocked bootloaders....
Get it from here -
http://forum.xda-developers.com/showthread.php?t=2349847
Bugs--
Locked bootloaders--
None yet
Unlocked Bootloaders --
Recovery image can't be flashed...
Warning -- Half/Full root is needed in order to use this app..
Test and report back.. I will contact the developer to add support for our device too... So people without pc can have custom kernels with recoveries..
Thanks.
Click to expand...
Click to collapse
"Your device didn't pass the compatibility test, therefore it isn't fully supported yet. Flashing boot/recovery will not work. I'll work to try to support as many devices as possible."
kaustubh.rockstar said:
Hello guys,
Whilst searching on google for some kernel flashing methods I saw an app named flashify...
Since I can't use flashtool on my pc for flashing stuff, luckily got my bootloader unlocked via fastboot and half root turned into full root...
Well, cutting the crap...
Test this app... Flashify on both locked and unlocked bootloaders....
Get it from here -
http://forum.xda-developers.com/showthread.php?t=2349847
Bugs--
Locked bootloaders--
None yet
Unlocked Bootloaders --
Recovery image can't be flashed...
Warning -- Half/Full root is needed in order to use this app..
Test and report back.. I will contact the developer to add support for our device too... So people without pc can have custom kernels with recoveries..
Thanks.
Click to expand...
Click to collapse
Hey people I thinks this app is good but the negative you need custom recovery to flash zip files "then what's the point", I suggest you use this app Flash Gordon you don't need a custom recovery to flash zip file meaning those with locked bl can use this app to flash mode etc.
In the current release of Flashify and with my XM dual (locked bootloader) I can only backup the Kernel... none of the flashing options work, gives the "Your device didn't pass the compatibility test, therefore it isn't fully supported yet. Flashing boot/recovery will not work. I'll work to try to support as many devices as possible." message =/

Unlocking Bootloader and root

YES, I have read as much as I can in the forums (all day today, rather nice way to spend a holiday though).
I have a Xperia Z1 Compact D5503 handset (FR SFR version, from eBay). I have recently updated it to Android 5.0.2 via XperiFirm tool. I flashed the Customized_IN version (D5503_Customized IN_1281-0184_14.5.A.0.242_R3D). It WAS NOT rooted and I don't remember if I had unlocked the bootloader.
[I have a laptop running Windows 8.1 x64, with latest versions of XperiFirm, FlashTool x64, Android Studio (with Google USB driver), PC Companion. My laptop detects my phone as MTP (or MSC when I choose so), but in the Device Manager, it never shows as android adb device (always MTP, or USB stick). I tried Update Driver option but to no avail, it says the Google USB driver or the downloaded Z1 Compact driver (from Sony site) is not supported (either by the phone or the PC). But the phone shows debugging connected, even prompts my authorization (first time only). Flashmode and Fastboot modes are detected well enough.]
Now, it says I am not allowed to unlock bootloader (via "*#*#7378423#*#* > Service Info > Configuration" menu). It shows the following:
------------------------------------------------------
Rooting Status:
Bootloader unlock allowed: No
------------------------------------------------------
I am unable to unlock the bootloader (or root, yeah, that's the ultimate goal) via the following methods:
1. Official Sony Method,
2. ZergRush
3. TowelRoot,
4. Easy Root Tool,
5. Newroot (by Doomlord),
6. Flashtool (that BLU option),
7. Fastboot via cmd.exe,
8. Flashing pre rooted zip files (cannot open stock recovery option, does this have any? I used the stock recovery a lot on my old Samsung).
Flashtool, cmd and Newroot showed variants of this same error: "only position independent executables (PIE) are supported."
Sony gave me a code, but that also yielded another variant of the same.
Now, as far as I have understood, what I need is one or more of the following:
1. a pre-rooted ftf file (someone said that is impossible as for Sony's encryption, is that right?)
2. some way to root without unlocking bootloader (Newroot does that, but did not work)
3. some way to override that crazy arrogance of Sony and unlock the bootloader and be my white knight...
Can anyone provide me with a guide or some example? It is not at all fair of Sony to create these non-allowance nonsense.
P.S. Please do not mind my tone, I am usually very docile but a whole day (literally; 6 AM to 6 AM next day!!!) in front of my PC without any result have mutated me a bit.
BTW, I am fairly proficient in following complex instructions only if they are conclusive (I don't want to spend another day figuring out how to follow them)
i cannot contribute in any way, i just wanted to tell you you´re not the only one with the problem. if i find a solution i will get back to you
Flash .108 firmware, root with "rootkitxperia", install dualrecovery, use prf creator to make a flashable rooted zip of lollipop (if that's what you want) and flash in recovery. Job done
I'm actually relieved to see someone else experiencing the exact same problems, I've already spent several days figuring out how to unlock the bootloader and get my phone rooted, but to no avail. However my device does state that the bootloader can be unlocked, but can't be found through cmd prompt when connected in fastboot mode and get's the same error: 'only PIE (position independent executables) are supported when trying to unlock the bootloader with flash tool.
White knights on problem solving horses would be greatly appreciated indeed!
I got a Z1C recently from eBay but have also done this on a Z Ultra and Z2, because of the cross development Sony stuff this is very similar for all of them.
You only need to unlock the boot loader if you want to flash a custom kernel or ROM. You don't need to unlock it to get root access, however to get root access you'll have to flash an old version of Android. You're flashing an old version from before they patched the exploits you want to use to get root.
So the steps are:
1. Get an old version of the official Sony ROM.
2. Flash the old ROM.
3. Exploit it to obtain root access.
4. Install a custom recovery.
5. Make a custom flashable zip of the firmware you want to use with root included.
6. Enter custom recovery and flash the zip you created in step five.
The files I used to do this are:
From XperiFirm I download "1280-5440 Netherlands T-Mobile NL 14.4.A.0.108 / R9C".
Using Flashtool I made an FTF from it and flashed it.
Then I used "EasyRootTool v12.4" to get root access.
I installed "Z1C-lockeddualrecovery2.8.21-RELEASE.installer.zip" from Nut's site.
Then you go back to XperiFirm and grab the version of Android you want to use. I used the 5.0.2 Customised AU one as I'm in Australia, you probably want the Indian one.
Use PRFCreator to make a flashable zip with a custom recovery and SuperSU, for that you need the "Z1C-lockeddualrecovery2.8.21-RELEASE.flashable.zip" not the installer.
There are posts with this info around, it's almost 5am for me so I'm not going to go looking for the links to the posts, you'll have to do that yourself. If you read for the day you've probably found them already.
First of all, I would advise against unlocking your bootloader unless you have a backup of your TA partition. Otherwise you risk losing your DRM keys and might criple your camera. This is irreversible damage without a backup. Second, on the official Sony unlock page it states specifically that not all devices are allowed to unlock the bootloader. If it doesn't, though luck then I guess but I could be wrong.
Now to backup the TA partition you need to be rooted which is not possible up to now with Lollipop unless your bootloader is unlocked. So this is a bit of a problem. Luckily flashtool (make sure to use the older 0.9.18.6 version at the bottom of the download page) allows you to flash a previous version without unlocked bootloader or being rooted. Choose one from the list at the bottom of this link but make sure to use a .108 one from the "KitKat [Old]" section (I chose Generic UK unbranded => link points to UA version, UK FTF here). Then root it through one of your preffered methods, backup TA partition and install a recovery.
Then create your own stock FTF with flashtool. Use this method with PC Companion or just download it through flashtool's built-in Xperifirm with this method.
Then create your own pre-rooted flashable zip with PRFCreator with part 2 from this guide. Continue with part 3 from the same guide (maybe skip the 3 big cups of coffee), exhale and get on with your life.
Maybe check out this one and this one (basically the same process) too.
It's the same procedure as written above but with some links I used to gather the information. I just went through this myself so still had all the tabs open. These were most of the useful ones I believe. It really is a PITA to gather all the bits and pieces from miscellaneous posts scattered all over this forum.
Why flash a 108 kk and then root? Just create lollipop rom with prf creator and flash that.
spudata said:
Why flash a 108 kk and then root? Just create lollipop rom with prf creator and flash that.
Click to expand...
Click to collapse
PRFCreator doesn't make FTF's but flashable zips. From the PRFCreator thread:
To flash a pre-rooted firmware, you need a recovery menu
Click to expand...
Click to collapse
To install a recovery you need to be rooted (at least as far as I know) or have an unlocked bootloader. The point is not to unlock the bootloader at all (like when it is not possible) or maybe only after taking a backup of TA partition if not already done so (which again needs root access).
You're absolutely right, my mistake. Think i had a memory lapse

Zenfone 2 issues in 2017

Hello,
I bought a Zenfone 2 in 2015 and have loved it ever since. Back then it was simple to root, unlock the bootloader, and neither required the other.
To root, just enable ADB and run this.
To unlock the bootloader, just download this from azus.
Now, buying a phone fresh, to remove all the bloat is becoming a challenge.
To root, you need an unlock the bootloader. To unlock the bootloader, you need to downgrade to an early 5.0 image.
So I downgrade, unlock the bootloader, and root. To get back on 6, I need to upgrade to a newer version of 5.0, so I do. Root gone, bootloader still unlocked, splash screen is normal. Fine, I root again.
Finally, after upgrading to 6.0 (using adb sideload) both root and the bootloader unlock are gone. So I have to start again, and either live with unbloated 5.0, or unrooted, bloated 6.0.
As far as I can tell the only way around this is downgrade to 5.0, unlock my bootloader, then flash a pre rooted unsigned system.img.
Sadly I cannot find a recent pre rooted unsigned system.img, and have no way of knowing how to create one. If someone could help me make one I would greatly appreciate it.
Am I doing this all wrong? Is there a better way?
Because now I have a phone that I'm either stuck with a buggy 5.0 or a bloated 6.0; and the original, two year old zenfone is stuck in the bootloader because I was experimenting with various tools from around here.
I am well aware that I could just nuke the old phone with xFSTK to get out, but I refuse to. I have no such problems nuking the new one though.
Any and all help would be greatly appreciated, the Zenfone 2 is still a great device and is fantastic value for money, so if I can sort out all this I will happily make a full, comprehensive guide with my new knowledge to replace the errors in the outdated one here, and to add far more comprehensive knowledge about unbricking:
https://forum.xda-developers.com/zenfone2/general/asus-zenfone-2-flashing-recovery-mode-t3096596
Thank you all for your time
assuming you are already on MM version ww4.21.10.233... if no update to this version and download the following tool..
https://drive.google.com/open?id=0B72QQTXqZSRwTDNtU1N6OEdMdmM
reboot phone in fastboot mode. now extract the downloaded zip and double click unlock.bat phone will reboot 2 times. then you will get white screen and stuck there. when you see white screen. simply turn off mobile. reboot in fastboot mode with volume plus and power button. and run restore.bat from extracted zip.
now download twrp from official twrp website version 3.1.1.0. and flash it in fastboot mode. hope you know how to ( place twrp image in adb fastboot tool and open command windows in same folder reboot phone in fastboot mode and connect to pc. run the following command
fastboot flash recovery twrp-3.1.1-0-Z00A.img
then use volume button to find recovery mode and click power button to boot into twrp.
now download super su from following link use this version only as i have just tested it few minutes ago.
https://download.chainfire.eu/1114/SuperSU/SR1-SuperSU-v2.82-SR1-20170608224931.zip
place superuser zip on internal memory or sd card and click install in twrp and install super userzip. alternatively you can sideload supersu zip as well. then wipe cache and dalvik cache and reboot system. note phone may bootloop or restart 2,3 times. don't interrupt it. it will boot itself into system.
this is 100 percent safe way.
---------- Post added at 11:12 PM ---------- Previous post was at 11:05 PM ----------
x86fanboy said:
Hello,
I bought a Zenfone 2 in 2015 and have loved it ever since. Back then it was simple to root, unlock the bootloader, and neither required the other.
To root, just enable ADB and run this.
To unlock the bootloader, just download this from azus.
Now, buying a phone fresh, to remove all the bloat is becoming a challenge.
To root, you need an unlock the bootloader. To unlock the bootloader, you need to downgrade to an early 5.0 image.
So I downgrade, unlock the bootloader, and root. To get back on 6, I need to upgrade to a newer version of 5.0, so I do. Root gone, bootloader still unlocked, splash screen is normal. Fine, I root again.
Finally, after upgrading to 6.0 (using adb sideload) both root and the bootloader unlock are gone. So I have to start again, and either live with unbloated 5.0, or unrooted, bloated 6.0.
As far as I can tell the only way around this is downgrade to 5.0, unlock my bootloader, then flash a pre rooted unsigned system.img.
Sadly I cannot find a recent pre rooted unsigned system.img, and have no way of knowing how to create one. If someone could help me make one I would greatly appreciate it.
Am I doing this all wrong? Is there a better way?
Because now I have a phone that I'm either stuck with a buggy 5.0 or a bloated 6.0; and the original, two year old zenfone is stuck in the bootloader because I was experimenting with various tools from around here.
I am well aware that I could just nuke the old phone with xFSTK to get out, but I refuse to. I have no such problems nuking the new one though.
Any and all help would be greatly appreciated, the Zenfone 2 is still a great device and is fantastic value for money, so if I can sort out all this I will happily make a full, comprehensive guide with my new knowledge to replace the errors in the outdated one here, and to add far more comprehensive knowledge about unbricking:
https://forum.xda-developers.com/zenfone2/general/asus-zenfone-2-flashing-recovery-mode-t3096596
Thank you all for your time
Click to expand...
Click to collapse
do you state that you have an old device which you are unable to revive with xFSTK. what error do you get? put device on charge for 5,6 hours with original charger and use the following guide. use correct gp flag value use 4 zeros not 5
https://forum.xda-developers.com/zenfone2/help/thead-bricked-phone-updating-to-mm-tips-t3452785
wow, no need to do all this... just use one of the available tool, my prefered one is this one:
https://forum.xda-developers.com/zenfone2/general/bl-unlock-ze551ml-toolkit-t3546293
very easy to use, to unlock, it will temporaly downgrade your boot to 5.0, unlock bootloader, then reflash boot 6.0.
Once there, just flash TWRP recovery and Magisk, from the tools.
I also had a locked ZF2 in MM 6.0 and using this tool it took less than 5 minutes to have an unlocked rooted phone, and I haven't wiped or lost anything.

Imaging and rooting

Hi XDA
I have a son with Asperger syndrome and that give parents sometimes unusual task to solve.
He got a Sony xz2 compact, but he refuses to use a phone until the camera and google services are disabled, do to security lags. He wants to remove the system camera software to make sure no one can exploit the camera.
In other words, he wants to be so anonymous and hacker free as possible - and the camera is a big issue for him.
And yes, I know is possible to disable the camera in Sony configuration (and it's done) but that is not enough.
I hope getting some help to find a solution this two tasks:
1) How to get or make an image of the phone to store/save in my pc so it can be restored if needed.
2) How to root the xz2 compact and uninstall the camera
I will really appreciate some help in this issue.
(sorry my English)
Regards.
1. There is not much you can do, backup related on a Sony phone with locked bootloader. You can use google backup, if you want, but even Sony's solution won't work on a phone with Android Pie, after bootloader is unlocked (it would, if you are on Oreo and you would apply drm-fix after unlocking). Almost all other solutions need root, which you don't have on a locked phone.
2. In this thread you will find a step-by-step guide to install twrp recovery and root (by flashing Magisk) and the download for twrp recovery, made by @MartinX3
I won't link the recovery file itself, because it depends on the way you want to proceed. You can use Sonys stock rom or you can install aosp/omnirom.
In your case i would use aosp or omnirom, because it comes without google crap and it is pure Android. You only need to delete/rename the camera with a root explorer and you are good to go.
But i'm sure, @MartinX3 can tell you more about aosp or omnirom and how to flash it, because i have not used it yet. Anyway, camera is not finished on aosp/omni, so you won't loose very much.
old.splatterhand said:
1. There is not much you can do, backup related on a Sony phone with locked bootloader. You can use google backup, if you want, but even Sony's solution won't work on a phone with Android Pie, after bootloader is unlocked (it would, if you are on Oreo and you would apply drm-fix after unlocking). Almost all other solutions need root, which you don't have on a locked phone.
2. In this thread you will find a step-by-step guide to install twrp recovery and root (by flashing Magisk) and the download for twrp recovery, made by @MartinX3
I won't link the recovery file itself, because it depends on the way you want to proceed. You can use Sonys stock rom or you can install aosp/omnirom.
In your case i would use aosp or omnirom, because it comes without google crap and it is pure Android. You only need to delete/rename the camera with a root explorer and you are good to go.
But i'm sure, @MartinX3 can tell you more about aosp or omnirom and how to flash it, because i have not used it yet. Anyway, camera is not finished on aosp/omni, so you won't loose very much.
Click to expand...
Click to collapse
Thanks for the useful information. I'm not very firm at the Android version (oreo or pie) - but the phone is a Sony Experia xz2 model H8324 and Android ver. 8.0.0 (patch level april 1, 2018). Hope this make sense
This is my first sony, so i'm not the "most helpful hand", i think.
Backup related, if you use sony backup before unlock on oreo, you can flash drmfix after unlock and then you should be able to use sony backup to restore your data.
If this is successful, you are rooted and you should be able to use Titanium Backup.
But as sony newbie i don't know how far sonys backup solution goes.
Anyway, i'll recommend in your case a rom like aosp or omni, because there are no Google things in it.
Why not cover the cameras with stickers if that's the biggest issue? You'll have to root the phone to completely disable all the G Apps, some of the firmware versions allow you to completely disable the G services - if you trust it.
You can use pm uninstall command thru adb shell. This way the app gets removed for the user, and thus seems totally removed. The apk itself do still remain in the system folder, and can be reinstalled if wanted, but can't be launched. This method do not need rooting either.
You can't make and image of the phone, at least not without rooting it first. But that will break some stuff, like camera, and that can NOT be restored in ANY way (drm keys are lost forever). For most (all?) Xperia devices there are images available for flashing with FlashTool/Xperifirm, but note that this will not recover the lost drm keys if you unlocked the bootloader in the first place.

[XZp] rooted kernel hiding bootloader unlock with working fota

rooted kernel hiding bootloader unlock
with working sony stock fw fota updates
for Sony Xperia XZ Premium​
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_maple, Kernel for the Sony Xperia XZ Premium
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 XZ Premium (G8141)
boot-G8141-47.1.A.16.20-hideunlock-magisk-19.1.img
boot-G8141-47.2.A.4.41-hideunlock-rooted.img
boot-G8141-47.2.A.6.30-hideunlock-rooted.img
boot-G8141-47.2.A.8.24-hideunlock-rooted.img
boot-G8141-47.2.A.10.28-hideunlock-rooted.img
boot-G8141-47.2.A.10.45-hideunlock-rooted.img
boot-G8141-47.2.A.10.62-hideunlock-magisk-19.3.img
Xperia XZ Premium Dual (G8142)
boot-G8142-47.1.A.16.20-hideunlock-magisk-19.1.img
boot-G8142-47.2.A.4.41-hideunlock-rooted.img
boot-G8142-47.2.A.6.30-hideunlock-rooted.img
boot-G8142-47.2.A.8.24-hideunlock-rooted.img
boot-G8142-47.2.A.10.28-hideunlock-rooted.img
boot-G8142-47.2.A.10.45-hideunlock-rooted.img
boot-G8142-47.2.A.10.62-hideunlock-magisk-19.3.img
- hideunlock kernels flashable to multi fw versions (see here for usage howto):
Xperia XZ Premium (G8141)
kernel-G8141-47.1.A.16.20-hideunlock.zip
kernel-G8141-47.2.A.10.62-hideunlock.zip
kernel-G8141-47.2.A.10.80-hideunlock.zip
kernel-G8141-47.2.A.10.107-hideunlock.zip
kernel-G8141-47.2.A.11.228-hideunlock.zip
Xperia XZ Premium Dual (G8142)
kernel-G8142-47.1.A.16.20-hideunlock.zip
kernel-G8142-47.2.A.10.62-hideunlock.zip
kernel-G8142-47.2.A.10.80-hideunlock.zip
kernel-G8142-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 of XZ1 thread for more details.
boot-G8141-47.1.A.16.20-hideunlock-magisk-19.1-noverity.img
boot-G8142-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)
I am 47.2.A.2.33,can I use 47.2.A.6.30?
So this doesn't work at all with unlocked devices that doesn't have a backup
@j4nn
If the bootloader is unlocked???
And flashing this kernel, nothing happen
nonokirton said:
I am 47.2.A.2.33,can I use 47.2.A.6.30?
Click to expand...
Click to collapse
If you have 47.2.A.4.41 fw, flash that and then you can try FOTA to 47.2.A.6.30.
Let me know, if you need a build of 47.2.A.2.33 kernel, which variant of xzp, if you want to test fota and cannot find the appropriate older fw.
SilverGamer_YT said:
So this doesn't work at all with unlocked devices that doesn't have a backup
Click to expand...
Click to collapse
Actually FOTA works even with devices where "drm keys" have been lost.
I've just tested that (restoring TA-unlocked to get the lost keys state) and I was able to fully install fota from 47.2.A.4.45 to 47.2.A.6.30 using my patched kernel with XZ1c.
So for FOTA it is working. And with pie, camera works without device master key (both with stock and with this unlock hiding kernel).
You would not get video image enhancements obviously, but currently there is no drmfix available with pie that would make it work, is it?
So I guess this is quite good actually (in pie case) even for devices without TA restored.
@karrouma, I am not sure what you mean.
j4nn said:
If you have 47.2.A.4.41 fw, flash that and then you can try FOTA to 47.2.A.6.30.
Let me know, if you need a build of 47.2.A.2.33 kernel, which variant of xzp, if you want to test fota and cannot find the appropriate older fw.
Actually FOTA works even with devices where "drm keys" have been lost.
I've just tested that (restoring TA-unlocked to get the lost keys state) and I was able to fully install fota from 47.2.A.4.45 to 47.2.A.6.30 using my patched kernel with XZ1c.
So for FOTA it is working. And with pie, camera works without device master key (both with stock and with this unlock hiding kernel).
You would not get video image enhancements obviously, but currently there is no drmfix available with pie that would make it work, is it?
So I guess this is quite good actually (in pie case) even for devices without TA restored.
@karrouma, I am not sure what you mean.
Click to expand...
Click to collapse
If you unlocked your bootloader
And you are in pie,
This patch is not working
You want a brand new device to backup the drm from oreo
And it is ok after
karrouma said:
If you unlocked your bootloader
And you are in pie,
This patch is not working
You want a brand new device to backup the drm from oreo
And it is ok after
Click to expand...
Click to collapse
The kernel can be used on UB, just for updates though.
Beetle84 said:
The kernel can be used on UB, just for updates though.
Click to expand...
Click to collapse
Yes i know
But if you don't backup your ta partion
The message when booting still appearing
karrouma said:
If you unlocked your bootloader
And you are in pie,
This patch is not working
You want a brand new device to backup the drm from oreo
And it is ok after
Click to expand...
Click to collapse
As described above, the patched kernel enables fota system update even in case of unlocked phone with drm keys lost and the update can be installed as described.
So it is working even in the case which I originally assumed it would not work.
karrouma said:
Yes i know
But if you don't backup your ta partion
The message when booting still appearing
Click to expand...
Click to collapse
If you mean the "Your device software cannot be checked for corruption. Please lock the bootloader." message displayed right at the beginning of boot - that has nothing to do with (patched or not) kernel or not even with the state of phone's TA (if it was restored after unlock with from locked state backup or if "drm keys" got lost because TA was not backed up before unlock).
That message will be there just from the fact that the bootloader had been unlocked. It is displayed by bootloader even before kernel is loaded.
Restore of TA does not re-lock the bootloader (like it has been the case with some previous xperia generations), so we cannot get rid of that message ever after unlock of a phone.
But with that message Sony suggests to (re)lock the bootloader - maybe someone could claim it to make sony tell us how we should do the re-lock of the bootloader.
Great work I'll implement this into my kernel with credit to you!
@LazerL0rd, thanks for letting me know.
Just wondering, do you plan to support fota system update of stock fw as I did or is your goal just to mask that bootloader had been unlocked?
Anyway, it's good to see that my work is useful.
j4nn said:
As described above, the patched kernel enables fota system update even in case of unlocked phone with drm keys lost and the update can be installed as described.
So it is working even in the case which I originally assumed it would not work.
If you mean the "Your device software cannot be checked for corruption. Please lock the bootloader." message displayed right at the beginning of boot - that has nothing to do with (patched or not) kernel or not even with the state of phone's TA (if it was restored after unlock with from locked state backup or if "drm keys" got lost because TA was not backed up before unlock).
That message will be there just from the fact that the bootloader had been unlocked. It is displayed by bootloader even before kernel is loaded.
Restore of TA does not re-lock the bootloader (like it has been the case with some previous xperia generations), so we cannot get rid of that message ever after unlock of a phone.
But with that message Sony suggests to (re)lock the bootloader - maybe someone could claim it to make sony tell us how we should do the re-lock of the bootloader.
Click to expand...
Click to collapse
So if I use this kernel will I just have the same device as if it were locked but with root and that message? I'm currently having some issues with root at the moment. I'm using existenz ROM and the kernels in the thread and Snapchat keeps detecting that I'm not using legit software even though I don't even have magisk. Another thing is that if I uninstall magisk right now then my safetynet checks all fail without magisk which gives me issues with Google pay and these two problems are what make me wanna relock my bootloader. But after reading this apparently I can't even with the ta backup. So I'm mainly more concerned on a way to be able to use those applications right now and what the best possible way would be to go for it because I'm finding it difficult to find a method with or without magisk where I wouldn't get banned from Snapchat and where I would be able to use Google pay. Thanks for any suggestions it would be highly and greatly appreciated!
@RJASSI21, if you restored locked state TA and run unmodified stock fw with this kernel booted from usb via 'fastboot boot' command, you would get very close to still locked phone, but with fully working root (magisk), obviously with the unlocked warning message on boot.
I believe if you run the setup as just described, you would not have problems with apps detecting root, easily passing safetynet cts check.
The problem is when you install something like the mentioned existenz - that patches stock fw files directly and there may be processes (either in sony fw or downloaded with safetynet stuff from google or even in some apps) that discover these changes and therefore detect rooted system.
If you installed only proper magisk modules that comply with magisk system less rooting (i.e. no modifications in system nor vendor partitions) - such modules may be made hidden with magiskhide to certain apps or google's safety net check. If something simply is flashed into system or vendor partitions, it cannot be made hidden for picky processes.
That means if using only proper magisk systemless modules, you could have root and customizations, still run stock fw with verity enabled kernel booted from usb 'fastboot boot' and even allow fota system update and get it successfully installed (assuming that twrp is not flashed either, instead it is also booted from usb if needed).
j4nn said:
@RJASSI21, if you restored locked state TA and run unmodified stock fw with this kernel booted from usb via 'fastboot boot' command, you would get very close to still locked phone, but with fully working root (magisk), obviously with the unlocked warning message on boot.
I believe if you run the setup as just described, you would not have problems with apps detecting root, easily passing safetynet cts check.
The problem is when you install something like the mentioned existenz - that patches stock fw files directly and there may be processes (either in sony fw or downloaded with safetynet stuff from google or even in some apps) that discover these changes and therefore detect rooted system.
If you installed only proper magisk modules that comply with magisk system less rooting (i.e. no modifications in system nor vendor partitions) - such modules may be made hidden with magiskhide to certain apps or google's safety net check. If something simply is flashed into system or vendor partitions, it cannot be made hidden for picky processes.
That means if using only proper magisk systemless modules, you could have root and customizations, still run stock fw with verity enabled kernel booted from usb 'fastboot boot' and even allow fota system update and get it successfully installed (assuming that twrp is not flashed either, instead it is also booted from usb if needed).
Click to expand...
Click to collapse
Ok thank you for this information. So if I return to stock fw and use this kernel will I no longer get banned from things like snapchat?
https://forum.xda-developers.com/oneplus-6/help/snapchat-locking-magisk-hide-t3895685/page4
ive read in this link that its possible they detect root not magisk or the app. Also would i have to boot the kernel everytime i reboot the device? Also will i have 960fps recording back as an option and 4k in youtube?
@RJASSI21, sorry, I have no experience with snapchat or whatever that is.
As mentioned in my post above, you can get very close to locked stock particularly if locked TA was restored, including fota system update possibility.
But to keep fota system update, you would need to usb boot the kernel instead of flashing it. Or flash it and revert it before starting fota update. Same thing for twrp.
Everything is mentioned in the first and second post.
j4nn said:
@RJASSI21, sorry, I have no experience with snapchat or whatever that is.
As mentioned in my post above, you can get very close to locked stock particularly if locked TA was restored, including fota system update possibility.
But to keep fota system update, you would need to usb boot the kernel instead of flashing it. Or flash it and revert it before starting fota update. Same thing for twrp.
Everything is mentioned in the first and second post.
Click to expand...
Click to collapse
Ok so flashing this kernel would be like having a locked bootloader with root? This includes all the same features as a locked bootloader so 960fps recording and things like that. It would make it seem like it's locked and that if you put an XZP with a locked bootloader next to one with an unlocked bootloader you wouldn't be able to tell the difference?
Is that correct? Like is there anything at all that makes it noticeable at all that it's unlocked? Sorry for all the questions I just don't want to do this and then still have the same results after.
@RJASSI21, I would say so, at least in case of XZp.
With XZ1 / XZ1c you can tell the difference with use of Android Attest Key - but if I am not mistaken, that has never been present with XZp.
See "Android Attest Key lost" xz1c thread, post#98 and following posts up to post#103.
btw, could you please avoid full quoting of just last post you are replying to?
I do not think it is that useful, if the post that has been replied to is just above it, is it?
Sure thing sorry about that but everything should be answered for me now. I was unaware when unlocking the bootloader that having a ta backup wouldn't allow me to relock it so I'm just going to relock it on my z4 tablet instead since I wanted to anyway. Thanks for all the help.

Categories

Resources