yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
hello. i want to keep DRM Video features on my device. i dont really care about the FOTA. the FOTA allows me to update the phone over the air correct? If so i dont really care about that. I just want to hide unlock bootloader to get the DRM VIDEO functionality and would like Magisk root.

G8441

I am on android pie 47.2.A.11.228

I was planning on using the temproot exploit to backup DRM keys. I am confused if i should downgrade to 47.1.A.2.324_CE1 or if i should downgrade to 47.1.A.8.49_CE1. those are the only versions that the temproot exploit work on apparently. My confusion comes from me not seeing a rooted kernel hiding bootloader unlock for kernel .324 but seeing one for .49 boot-G8441-47.1.A.8.49-hideunlock-magisk-19.1.img on this thread.

47.1.A.8.49_CE1 firmware does not have a *.ta in the boot directory and root and backup drm instructions say to make sure i flash *.ta from boot sub folder so im hesitant to downgrade to 47.1.A.8.49_CE1 but not sure if it matters if 47.1.A.8.49_CE1 does not have the *.ta in the boot subdirectory?

1. is it ok to downgrade from 47.2.A.11.228 to 47.1.A.8.49_CE1 to temproot and backup TA, restore TA and then flash your

boot-G8441-47.1.A.8.49-hideunlock-magisk-19.1.img via twrp to regain DRM and Video functionality?

OR

2. should i just downgrade to 47.1.A.2.324_CE1, temp root to backup TA, restore TA, then flash one of your kernels from this thread to hide unlock and restore DRM and Video functionality? If so which one of your kernel versions should i use?

3. if i dont care about FOTA updates i can flash twrp via adb, is that correct?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=4002550]sabotage154[/MENTION], yes, fota is system update over the air.

G8441_47.1.A.8.49_CE1.rar does contain boot/Lilac_XBootConfig_MiscTA.ta, just re-downloaded and checked.

There is hideunlock kernel just only for 47.1.A.8.49, because that's the newest still exploitable fw, so one may check the drm stuff working on that fw if did the locked TA backup followed by unlock still on it. The 47.1.A.2.324 may be sometime easier to get working with renoroot exploit. In the end it all depends on good preparation to avoid background stuff.

ad 1., yes

ad 2., ok too, you can flash any fw which has hideunlock kernel available, probably best to use the latest

ad 3., yes, without fota, just flash twrp (normally via fastboot, possible via adb and dd command too)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
thank you for quick response. i really appreciate it. i think the reason i dont see the *.ta in my boot folder is because i did a wildcard search for *.ta in main folder and deleted all including the one in the boot sub folder. that was my mistake and should have checked original zip again before messaging you about that, sorry. For anyone who reads this post. DO NOT REMOVE *.ta files with wildcard search of main firmware folder. delete them one by one on the main folder so boot folder remains untouched.

do you recommend i do root exploit on .49 or .324? i think you hinted .324 would be better (easier) but then i would have to flash a second time another firmware compatible with your kernels correct? is the extra step of flashing the compatible kernel worth to make the temp root and TA backup successful?

if .324 is better to do the temp root and then flash a firmware that is compatible with your unlocked kernel do i choose from any from both lists "- hideunlock kernel pre-rooted boot images" and "- hideunlock kernels flashable to multi fw versions" on post #2 here or from the G8441 versions of new format in post #1029 here. I only see 2 different kernels on post #1029. im just confused if i should use new format or the original kernels are ok and am confused of the difference, sorry about the confusion and thank you for your help with this. I REALLY appreciate it.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=4002550]sabotage154[/MENTION], just backup locked TA with any of those exploitable fw versions. Then upgrade to the latest available fw and use the corresponding kernel for it.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
hello and thank you for your reply. just would like to confirm a few things before i proceed.

1. when i extract firmware to newsflasher folder to downgrade and backup TA, partition.zip is extracted to newsflasher folder but is in .zip format. i have to unzip that partition.zip file into its own folder in order for those files to be flashed also correct?

2. i wanted to flash gapps pico over the existing gapps to remove the extra gapps stuff i dont use. i would need dm-verity disabled in order to modify system partition with new gapps package, correct? if so then i would need to use your boot-G8441-47.1.A.16.20-hideunlock-magisk-19.1-noverity.img in order to be able to accomplish this correct? so i would need to flash 47.1.A.16.20 after backing up and restoring my TA and then proceed to flash your boot-G8441-47.1.A.16.20-hideunlock-magisk-19.1-noverity.img via twrp in order to be able to flash gpapps package.

is this the correct way to accomplish my goals?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
so i downgraded to .324, did temp root, backedup TA, unlocked BL, reboot and my camera works perfectly fine. video and pics look perfectly fine. i cant really tell much of a difference. Is that normal? i thought the camera was supposed to stop working if the BL was unlocked? thank you!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
i have succesfully flashed your rooted kernel hiding bootloader unlock to my device. thank you for your help. AWESOME STUFF!!!!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=4002550]sabotage154[/MENTION], my guess that the reason for the errors in your security screen with oreo is that you did not flash the bootloader (the whole boot/ subdirectory, including .ta, .xml and .sin there). In other words, you have downgraded from (working) pie oreo, still running pie's bootloader. That makes drm security stuff not working.

Just be sure when you want to run oreo, that you flash the fw including bootloader - the bootloaders are not compatible and they contain components for drm stuff.

Also I am not sure why do you skip amms* files. That are in my opinion also part of the fw, probably related to modem part.

You could skip appslog instead.

I cannot comment on xposed or other stuff as I never used that...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
thank you for your quick response. just a quick followup on your info"

1. I made sure that bootloader was in the newflasher directory and that the .ta and there was another 3 files in there but i dont think there was an .xml file, that may have been in the main folder. could it also be theres an issue because it was originally in .ftf format?

2. the amms* files i have always deleted even when flashing oreo to pie. i have deleted because those were the instructions on the temp root thread to delete the amms*, qnovo, ssd and persist files so i thought that those should always be deleted when flashing firmware. just to be sure: its ok to flash amms* files but the qnovo, ssd and persist, in aiddition to the apppslog (you mentioned in your reply) i should delete when flashing any firmware, correct?

3. i will try to figure out xposed issues elsewhere. i did find some threads about it.

4. do you know where i can find older firmware files? I saw you had provided an xda link to firmware files on another older thread but the link appears to be broken now.

once again thank you very much.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=4002550]sabotage154[/MENTION], I have no idea what is packed in an .ftf, normally all should be there, but it depends on what a creator of the .ftf packs in I am afraid.

There should be boot_delivery.xml and Lilac_XBootConfig_MiscTA.ta under boot/ directory except the three bootloader_*.sin files.

Deleting amms* files has never been part of renoroot (ta backup) instructions, re-read them carefully. I am always flashing amms* files.

You may try this

https://www.xperiasite.pl/topic/27985-g8441-471a1620-germany/

but it seems also to be a .ftf. I did not check if that works or not. It's only that I know that site contains lot of versions of lot phones' firmwares.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] sabotage154:
hi j4nn, i just wanted to post an update to this:

1. thank you for the link to the 27985-g8441-471a1620-germany link.

2. It appears you are correct that the bootloader was NOT being flashed and thats why i had errors when checking security tests. The .ftf firmware file does have the boot_delivery.xml and partition.xml in it but they are not in their appropriate subfolders /boot and /partition respectively. So because those files were not in their subfolders those files must have not been flashing correctly.

3. if you are going to flash using extracted files from a .ftf firmware please move boot_delivery.xml into /boot sub folder. I also moved partition.xml info partition folder and the flash using newflasher was successful including the bootloader. I dont get security errors anymore. THANKS!!!

4. it was my mistake on not flashing amms* files although the flash seems to work even though those are not flashed. what do the amms* files do?

5. for xposed users:

a. it looks like xposed works by flashing EdXposed via magisk on 8.x+ but it causes some apps not to startup correctly on my device.

b. it works by using [MENTION=4688377]russel5[/MENTION] xposed fix here. i used it on stock firmware 16.20 but other users have said it works on other stock 8.0 firmware. Xposed seems to run better for me using this option instead of EdXposed from option a. above.

Hope this helps someone. thanks
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] nakster:
Hi everyone,

I am hoping to get some help here, I have read the OP, but still unclear as to how to proceed exactly.

My XZ1 has Unlocked bootloader and running 47.2.A.10.80_CE stock, but a few apps are not working due to this, and I would like to hide the Unlock status.

If I understand the OP correctly, do I:

1. Download 'kernel-G8441-47.2.A.10.80-hideunlock.zip'

2. reboot the phone to fastboot mode

3. boot the downloaded kernel via fastboot by running the command 'fastboot boot kernel-G8441-47.2.A.10.80-hideunlock.zip'

?

any help will be much appreciated, thank you
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=4482064]nakster[/MENTION], if you are trying to get some of sony drm conditioned apps working, you need your locked TA restored together with a hideunlock kernel. You may simply flash it, if you do not care about system fota update. The 'fastboot boot' way is needed only in case of system fota update (unmodified stock fw is a precondition though).

Hiding bootloader unlock (or magisk) from google play (or other apps) is a different thing (may be related to Android Attest Key), possibly off topic.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] SXUsr:
Hi [MENTION=4418980]j4nn[/MENTION], I wonder if I could pick your brain?

I've just compiled my first kernel, see HERE, which I'm going to try and Upstream as this phone will be staying on Oreo for the rest of it's life.

It's only after flashing it I remembered that I've been using yours with HBLUL and would like to keep that feature. So my question is how would I go about incorporating it from here - sonyxperiadev-kernel-copyleft?

Thanks.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=2735402]SXUsr[/MENTION], just cherry pick the commit from blu hiding branch kernel version that corresponds to your kernel version...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=2735402]SXUsr[/MENTION], I assume the phone just reboots when booting.

Read the commit log, it is all there.

And try to flash and boot the kernel without magisk, to confirm it.

I wonder why do you need to stay on oreo?

With pie this problem is not there...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] SXUsr:
My bad, I'd forgotten about that. Reinstalled system then used commands in OP to install kernel and Magisk, now works. Just need to figure out git merge now to upstream.

I've installed it a few times but always have issues so sticking with Oreo for the time being.

Thanks.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Flamefire:
Hi [MENTION=4418980]j4nn[/MENTION]. Any chance you can create a patched version for Lineage 17.1 from https://xdaforums.com/xperia-xz1-compact/development/rom-lineageos-17-1-unofficial-coming-t4047763? Or better: Describe how we can do that ourselves? :)

I guess the latest stock patched kernel is not compatible with the lineage 17.1 from above as that uses an own kernel image which would be replaced, wouldn't it?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
You need to ask maintainers of lineage 17.1 to merge the patch in their los kernel - it has been discussed already within los16 thread here, but it seems the patch has not been merged yet unfortunately.

The camera works somehow even in case of drm keys lost (or with drm keys restored while not hiding bootloader unlock state), but it is question, if camera quality is really the same as with still locked phone.

Some photos comparison may be found here: xz1c locked oreo vs unlocked pie comparison. You may check the following posts too.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Flamefire:
I guess they want to stay close to official LOS with the "we do not hide anything" philosophy. I wouldn't mind building the kernel myself, but I haven't been building Android stuff for 7 years now and much has changed since the good old CyanogenMod days... That's why I asked for a guide.

For a quick shot I tried to apply your patch to the synced sources from modpunk (LOS 17.1) which worked cleanly (some line changes, that's all) and started the regular build until "./out/target/product/lilac/obj/KERNEL_OBJ/arch/arm64/boot/Image.gz-dtb" was build. Then I replaced that in your ZIP, fixed the Android version and flashed. But got a bootloop on the Sony logo :/

Just for verification: Is it possible to use it without Magisk? I don't want root or anything, just an up2date system with SafetyNet as Sony isn't providing updates anymore.

Currently building LOS 17.1 with the patch applied and see how that goes. But 120GB diskspace, really? And blew my VM RAM of 9GB so had to restart after adding a swapfile for the initial soong_build to succeed.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
yes, magisk is not needed.

safetynet is a different thing though, the bl hiding patch may help a bit, but it rather targets sony drm stuff.

recent changes in android seem to use android attest key to get a cryptographic proof of stock device and that cannot be faked with unlocked bootloader unfortunately. more details here:

https://xdaforums.com/showpost.php?p=81991455&postcount=125
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Flamefire:
Oh no! Very recent indeed... WTF? Now the end of the device with safetynet? I guess even going back to stock won't work, would it? Or maybe it does. The kernel hiding the BL unlocked state and no security update from google possible to the system...

But that's not what I was going for :/
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=5366259]Flamefire[/MENTION], going back to stock would make no difference.

The only chance in my opinion could be if google accepted not working hw attestation.

Do you have still "working" android attest key? You can test it as described in the Android Attest Key lost thread.

I wanted to test if filtering of attest key related api calls to simulate not present attest key could make some difference even in case with unlocked BL with still working attest key.

Using play store may force google services update even when there are no updates from sony.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Flamefire:
Hm, that's bad.

I guess yes. Downloaded your modded auditor and it works seemingly fine. Have "Device locked: false, verified boot state: Unverified" though.

I'm already on LOS 17.1, so not stock.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=5366259]Flamefire[/MENTION], that is a correct result for unlocked bootloader. Having kernel patched to hide BL unlock makes no difference for hw attestation.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Twin.Twiggs:
Hello. I'd like to flash some Q Rom (likePixel Experience after flash your kernel and get fully DRM

Link https://xdaforums.com/xperia-xz1-compact/development/rom-pixel-experience-10-0-plus-update-t4071563

Can I flash this Rom withour any problem? And when I revert to pie stock, will i lost your kernel and i will flash it agian? Thx
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] GOrMHATRe:
Is ther a .img file for 11.228 firmware ? I don't want to flash twrp to flash zip files cause my phone then goes to recovery on every reboot.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=8268143]GOrMHATRe[/MENTION], not sure what you mean, you can download that fw via xperifirm, it is the last fw released so far, so it should be downloadable from sony servers.

If you mean kernel hiding bootloader unlock with magisk integrated in .img format, that is not needed, just use the .zip for that and take care of dm verity (disable it if you do modifications).
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] GOrMHATRe:
Yes I wanted your kernal in .img format so that I can flash it directly without twrp. Whenever I install twrp, the phone always boots in twrp instead of OS.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
[MENTION=8268143]GOrMHATRe[/MENTION], never heard of that, quite strange. Anyway, you do not need to actually flash twrp, you can just boot to it via 'fastboot boot twrp.img' command. Just make sure to 'adb reboot bootloader' first to enter fastboot via a command (or do a 'fastboot reboot bootloader' after entering it by the key combo).

You can then flash the zip from twrp only booted in memory, not flashed.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] GOrMHATRe:
Thanks man that solved my problem. Flashed your kernel successful ly for 11.228 firmware.

But I always face this problem, on this phone and older Xperia X too. Whenever I flash recovery, the phone boots only into recovery and ignores the OS completely. I have to reflash zip of existing Rom to boot into it. But then it becomes difficult to boot into recovery. Am I doing something wrong here?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] SXUsr:
What command are you using to flash it?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] GOrMHATRe:
I normally flash recovery using flashtool, fastboot mode.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] SXUsr:
And you normally have issues trying to flash TWRP. :silly: Try doing it manually instead.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Shahnewaz:
Well, RIP Google Pay for me. A few days ago I received the dreaded message that my device is no longer enrolled, and now I get CTS profile mismatch on SafetyNet tests.

Current status:

Persist intact

Bootloader unlocked

DRM keys restored

No Magisk

Hideunlock kernel in use

What other options do I have at the moment?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] 7alvoo:
Magisk - don't forget activate the 'repackage magisk manager with random package' option

MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0 - first try v1.1.0 - this version contains cts profile fix already

optional step: if the rom release name/device fingerprint mismatch possible to fix with Termux - MagiskHide Props Config
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] samuells:
Sorry for my dumb question, but couldn't find it on any thread.

My current state unmodified stock FW G8441-47.2.A.11.228, I did unlock BL by official way and flash recovery "twrp-3.3.1-0-lilac-pie-5.img". Yeah, I flashed, didn't fastboot boot. It was to late, crap muscle memory. Also i didn't backup any kind of partition (kernel, recovery, TA)

So, can I flash kernel-G8441-47.2.A.11.228-hideunlock.zip without stock recovery partition? If not, how can I restore recovery partition to stock version without backup, where can I find it? Or do I'm in trouble?

And is it really worth nowadays hiding unlock? Yeah, my goal is root and bypass SafetyNet.

Much appreciated
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] ToddBonzalez:
@samuells did you figure out how to root with kernel-G8441-47.2.A.11.228-hideunlock.zip ? I had root on this version but lost it and have been struggling to get it back.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] ToddBonzalez:
@j4nn I'd be so lost without your work, thanks so much for your help. Is there a rooted version of kernel-G8441-47.2.A.11.228-hideunlock.zip ?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] rudzik12:
Hello. First of all - thanks for great work for community.

Second - maybe someone has archived boot-G8441-47.1.A.16.20-hideunlock-magisk-19.1.img?

Regards!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] mirhl:
The noverity version is still available.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] pop3556:
Hello all,

I'm trying to use the hide unlock kernel on an XZ1C.

Unfortunatly, I am blocked on boot-G8441-47.1.A.12.34-hideunlock-magisk-19.1.img update because the link is dead (on post #3).

Does someone is able to share this file ?

thank you in advance...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Homer-J:
A similar case has already been discussed here, but due to a different initial situation, I can't get any further with the following situation:

For some reason I made the mistake of clicking on 'update' in the Magisk app and it is now permanently requesting a reflash of Magisk because it "does not support versions lower than v22.0." Rebooting the system and accepting the installation prompts from Magisk do not change anything. Some apps _still_ seem to have root status, but the xposed framework does not work, the service menu shows the root status: "not-done".

My initial situation is a pre-rooted boot-G8441-47.2.A.8.24-hideunlock-rooted.img Kernel running with a G8441_Customised CE1_1310-7123_47.2.A.8.24_R1C. I had backed up the keys, except for the Android Attest Key. The system ran relatively stable for the last four years, but now there were more frequent notifications that the device did not support apps like DeviceID or not even sideloaded Chatgpt. Then I noticed that the safety net status under Magisk showed an API error, which unfortunately led me to update Magisk this way.

The question is whether I can use the current Magisk version 26.4 at all with this kernel, or whether I can simply install this kernel-G8441-47.2.A.11.228-hideunlock.zip using this procedure. It would be important for me to keep my user data, so I prefer to ask here first before I do experiments and possibly lose my data. By the way, it is interesting that since last year the bootloader-unlocked warning appears at start, after the device had to dry for a week without function because it suffered a water damage.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] russel5:
Sony not released sources for this kernel yet
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
That is right.

But, [MENTION=7140676]Joper_[/MENTION], you may try my pre-release of the kernels for 47.2.A.8.24 fw posted in the "[XZ1c/XZ1/XZp] temp root exploit to backup drm keys" thread, post#690.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Joper_:
Thx [MENTION=4418980]j4nn[/MENTION] , I will try.

Thank you guys, great work!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Kayant:
[MENTION=4418980]j4nn[/MENTION]

I was wondering could this be used to get root on a device that doesn't allow bootloader unlock? I sadly discovered my phone I got second hand was likely a carrier model that got sim unlocked and after some trying and reading BL unlock won't be possible. I got temp root successfully but forgot to test this :silly: