yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] ecksdeeay:
You don't need the ric...that's your problem...not sure what the attachment is about?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] wandervogel:
Of course I don't need sony_ric. I want to get rid or kill it.

Using TWRP I installed Magisk 20.1 + my attachment kernel above (hideunlock w/ devcheck=0)

It went like a charm w/ system R/W enabled, but only at the beginning

After a while, I couldn't write to /oem, saying Read only filesystem or Permission denied,

even after mount -o rw,remount

In Nougat

echo 0 > /sys/kernel/security/sony_ric/enable

will solve the problem but I don't know in Pie
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] shoey63:
[MENTION=8012394]wandervogel[/MENTION]

Its not ric, it's Magisk. Disabling write to system is a new "feature" to make it easier for Magisk to work with Google's new policies. Check the discussion thread...
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] wandervogel:
Magisk?!

So how can I (temporarily) disable this "feature" to enable system R/W again?

Enabling "Magisk Core Only Mode" doesn't seem to solve the problem
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] jugglerpl:
To delete
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=8012394]wandervogel[/MENTION], writing in /oem is possible after remount into rw if you temporarily disable selinux too (setenforce 0).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] OmaeKumiko:
Where can I get the G8142 47.2.A.11.228 firmware?

Tried XperiaFirm Downloader, But only shows 47.2.a.10.107

Search in google only get this: https://developer.sony.com/file/download/open-source-archive-for-47-2-a-11-228-2/
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Xspeed:
Could someone reupload kernel-G8141-47.2.A.10.107-hideunlock.zip ?

AFH returns no mirrors error.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=5292510]Xspeed[/MENTION], that is quite crazy that androidfilehost looses a file on all of the mirrors.

And there seems not to be an option to re-upload it in the same old file link.

I just uploaded it in the same folder, the file is listed there twice, the same md5 checksum.

The old link did not get any mirrors available even after the new upload with the same checksum.

The new upload is here:

kernel-G8141-47.2.A.10.107-hideunlock.zip

I wonder if other files on AFH can get lost in the same way.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] zheshifandian:
hi pal ,could you can make a patch for so-04j?

i can be the tester

thank's a lot

here is ftf https://drive.google.com/file/d/14CiQzhN3d119RNkIF-gpUWAwDbh5HSFk/view

here is open source https://developer.sony.com/file/download/open-source-archive-for-47-1-f-1-100-and-47-1-f-1-105/
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Dematen:
Does this system allow you to restore your smartphone to its initial conditions, as if it had never been altered?

I still haven't read a clear testimony of compatibility with Google Pay.

As far as photos and videos are concerned, does it seem to be more a subjective and post-processing issue, and only for smartphone without TA backup?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] zheshifandian:
this is the lastest frim for so-04j, it can restore phone clearly
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] zheshifandian:
hi pal ,could you can make a patch for so-04j?

i can be the tester

thank's a lot
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] jt14010516031040:
Hello to all dear ones

I downloaded the "kernel-G8142-47.2.A.10.107-hideunlock" zip file, but I need to convert it to img format so that I can flash the kernel with flash tools. What should I do to create the img format?

Thank you very much!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] ecksdeeay:
rename the extension

i.e instead of.zip

.img
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Shujath:
Here you go if you are still looking for it.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] nitrams:
Can you add support for xzp g8142 service exchange unit/store front? This is android 7 only build number 45.0.a.1.229. Or do you have a way to convert it to global. I tried several global fw but I'm getting a boot loop
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] nitrams:
Please see:
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Tadanga:
Ever since I unlocked BL, I haven't been able to register on WhatsApp and get the infamous "You need the official WhatsApp to use this account", I think Meta has started blocking rooted phones, would this patch help? As the process to flash it seems complicated for a noob like me, I need to see if anyone can confirm before attempting it.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Hellas72:
Is this only for FOTA or bankikg apps also work? Cannot find a workaround. It's either root or unlocked BL being detected by ID app and there is no way to lock bootloader also so it looks like i'm stuck :( This patch is my last hope, although after flashing it i didn't pass check so guess it's only for FOTA
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LazerL0rd:
I've picked your commit so I don't see why FOTA update shouldn't work (if there is any additional change please do tell me) - the users will need to flash stock then fastboot boot "my kernel" and that's about it, right? I haven't built it to my latest branch yet, however, as I'm waiting on Magisk to pull in the PR. My main use is to mask bootloader unlock (unfortunately for me personally I don't have a TA backup :crying:).

If possible could you build canary Magisk with your PR and provide the installer for it? I tried using your boot.img and it wouldn't boot for me (both with and without my AK2 kernel flashed on top).
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=7836278]LazerL0rd[/MENTION], with pie firmware, you do not need my patch of magisk. It is needed only for oreo fw which contains the sony ric daemon in initramfs of the kernel.

So for pie you can pre-root your kernel with upstream magisk, no need to wait for the pull request to be integrated. Kernel is pre-rooted in order to simplify it for users to have root when simply booted from usb via 'fastboot boot' having unmodified stock fw ready for fota system update. Customizations of stock fw may be done systemlessly using properly implemented magisk modules.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LazerL0rd:
I'd like to take this into PM if you don't mind as I have a few questions with what you just told me. I don't really want to clutter your thread as it's partly related to my kernel.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] niaboc79:
[MENTION=4418980]j4nn[/MENTION]

You seems to be experienced, so could you work on a drm fix for users whi didn't backup TA partition before they unlocked bootloader?

Envoyé de mon H8266 en utilisant Tapatalk
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=599722]niaboc79[/MENTION], I am not sure that drmfix for pie is needed that much, considering camera seems to work with pie even when locked TA is not restored.

But it would be interesting to see comparisons of camera quality, like oreo vs pie still locked, oreo vs pie drm keys lost or pie locked (or TA restored with kernel hiding BLU) vs pie drm keys lost.

What feature you like to get back with drmfix for pie? Only the video image enhancements or anything else?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] niaboc79:
Users reported lower qualified in low light condition, personally I didn't see any difference. I'm even wondering if camera is still affected by drm key. I've analysed the camera app and logcats while launching the camera and anything seems to call secd or security.

X-reality doesn't work without drm, some new service like app prediction (used by side sense) does not work neither.

Backup restore app does not work neither.

Also new Xperia are coming and I want to be sure to be able to use Xperia 1 new camera fully before unlocking the boot loader.

So that's why I would like to get a working drm fix on Pie.

Envoyé de mon H8266 en utilisant Tapatalk
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Vaith:
[MENTION=599722]niaboc79[/MENTION] [MENTION=4418980]j4nn[/MENTION] What can say is that camera is much worse that before unlocking bootloader. We need to fix it with some patches. Night shots are worse, camera is not focusing properly. I have to take 2-3 shots before I get sharp photo. We are missing something...
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mad0701:
I've send your a PM, to send you 2pics for compare : same SW (one Germany the other on Central Europe) one is full stock the other one with BL unlooked, TWRP and Secd flashed.

---------- Post added at 05:17 PM ---------- Previous post was at 05:02 PM ----------

From my point of view: I can not agree this one... OK, I haven't make any "normal" pic before unlook... only for test..... But I didn't have the feeling, that the Autofocus doesn't work. The camera was also up from start not the best for night shoots. A hint in other threads /test and so on was and is: The best quality you received in the night with the XPZ with manual settings.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=7055162]mad0701[/MENTION], please, post the pictures here in the thread (you might put them in a zip to be sure quality is not changed) or use some file sharing service.
[MENTION=599722]niaboc79[/MENTION], [MENTION=3667958]Vaith[/MENTION], it would be great to see a proof, otherwise it's all like feeling about this and that.

Moreover, is not that guy that went commercial working on an updated fix for pie?

In any case I am sorry but I do not have time for that. It would certainly not be trivial.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] LazerL0rd:
Camera, even on Pie, relies on DRM. The thing that changes is WHAT relies on it. Camera "enchantments" by Sony (which unfortunately only make the image bearable, in my opinion) still rely on Sony's DRM platform. They have no longer tied the main Camera HAL to the DRM platform and freed the ability to use it unrooted. Camera enhancements include signal processing to improve the image and may or may not include the ability to go over 1600 ISO (a SODP limitation too).

Video enhancements, do and will always rely on Sony DRM probably. It's a non-essential feature that they like, and is nice - so it's fair play to lock that one off.

DSEE HX is a confusing one. While I could not prove it doesn't work on unlocked Pie (without your work) I heavily suspect it isn't working. I have usually sharp (but unbalanced, lol) ears and cannot tell. I should do an Audacity line-in. Clearaudio+ 100% does work unlocked, and the other features seem fine. I do suspect S-Force has a type of checking DRM (due to logs) but doesn't enforce it's need.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] Vaith:
The problem is while we have one source of light and we have really dark spots on photo. We get white dots on photo. I took photo in my bedroom before unlocking and after unlocking. After quality of photos are worse. I have white dots. I think that Sony engine was helping to delete them while taking photo and photo quality was improved with Sony enhancements. Right now I think it is not working after unlocking BL.

Wysłane z mojego G8142 przy użyciu Tapatalka
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=7836278]LazerL0rd[/MENTION], interesting post, thank you. Still, it would be great to check that further - at least camera signal processing differences if they are depending on drm should be possible to find in pictures comparison.

Unfortunately it's lot about using right camera setup for special scenes to be able to find the differences (I am not that experienced in photography).

Concerning video enhancements - in my opinion - it's only a gimmick.

Just checked it recently. You can extract the sample video from it's apk (ImageEnhancer.apk).

From that it can be proved that it is only playback post processing in Album (and maybe other) video playback app.

For example it is not active when played with vlc (did not try to tune any vlc settings).

So it has no influence to quality of camera captured video (or photos), that means when you extract your captured stuff to PC or whatever, that post processing will not be there.

And moreover it does not seem to be that difficult to achieve similar results - at least with those tomatos frame - using Colors->Saturation in gimp with something like 1.3 increase ratio looks very similar...
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] niaboc79:
Storm stop development due to personal problems, unfortunately he did not share sources of his fix so we can't adapt hos code to new secd implementation.

Envoyé de mon H8266 en utilisant Tapatalk
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=599722]niaboc79[/MENTION], I am afraid that not only it is now more difficult to implement drmfix for pie than it was with oreo, but it is even more difficult to somehow distribute/port it to all those phone variants.

It is not possible anymore to override the needed functions with preloaded dynamic lib, because sony compiled those functions statically into multiple daemons/binaries.

That is also the reason I think my way to hide bootloader unlock on kernel level is the only proper way to do it instead of patching multiple binaries.

Patching multiple binaries in multiple fw versions is not easily portable - comparing to injecting dynamic libs.

And it would need reverse engineering work for each fw revision where those binaries involved got some changes.

Implementing the drmfix on kernel level is also very difficult - would need to reverse engineer communication protocol from userspace to the involved trust zone applets and intercept those calls.

I've done that just for the unlock state and it took me unbelievably lot of time to analyse that with a locked phone.

I am sorry but I do not have that time (as I can really imagine what needs to be yet done) to extend bootloader unlock hide patch into a full kernel level drmfix.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] niaboc79:
Thanks for these detailed explanations and I understand that it's a huge work nearly impossible.

Envoyé de mon H8266 en utilisant Tapatalk
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mad0701:
The 2 pic to compare can found here

https://c.gmx.net/@329163833899752290/JKVmsm6zR2CXMCAajgCDrA

It was a short shoot.... I'm not so familiar with make pic by touch into the picture, but I have move the settings so as in the phone of my wife.

to be honest : if I want make good pictures for history I'll use a DSLR or if it should a lightweight camera a good compact camera... no the cam from the phone....
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] 1Chigo:
Thanks bro!!! It's really nice but I still have a few questions.

I have a G8142 which unlock the bootloader and have no drm backups, and my version is in pie and it's still work, I can use FOTA with your guide. But I still have a few questions. First is does it means everytime when I need reboot I must boot your img via adb command right? If I just reboot without going to fastboot mode when i go to service info i can see boot unlocked:yes not the boot unlock allowed:yes. Second is i need to do step4 and step5 twice then i can see magisk on my phone, but i just wanna report this to you. Third is i am chinese, i think many chinese friends will show great interests to your kernel，may I translate your kernel into a chinese website which same to xda? I will tell them it's your kernel and i will show them the direct link to this XDA web , can I ? sorry about my poor english LOL...thanks to you and your great kernel again!!!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=7055162]mad0701[/MENTION], those two pics look interesting. Did you take them from hand or with some kind of tripod?

I also tried taking few pics and it sometime happen to me that a resulting picture is not that sharp as I would assume it should be, even when phone is fixed-mounted.

So I guess that there may be worse and good results even with still locked phone.

But if you can consistently reproduce what you did, possibly even with tripod and multiple pictures in sequence, it would be convincing...

[MENTION=9763198]1Chigo[/MENTION], thanks for letting me know, I guess it would be ok to translate, just do not mirror the files, instead link to this thread, please.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mad0701:
It was a very quick shot out of hand, with sun in background....

Also I'm not aware, where the focus frome the camera was (I touch only on the 'finger' (same settings as on the phone of my wife)

I haven't the possibility to use a tripod with the phones, but on the next WE I can used more time.... hopefully
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] alagga:
Guys can you please answer me some questions:

1. Do I need Fota Updates (are these just the "overtheair" updates?)?

Isn't there an option to just dirty flash the new Update, or must the device get wiped in order to update to the new Firmware without Fota?

2. Am i right that this Kernel is needed to get full DRM-functions back (of course after applying the TA-backup)?

-> Which DRM- functions wouldnt work if I'd only restore the TA-Backup?

3. We aren't able to remove Bloatware apps, as it would break the Fota updates (system gets modified)?

Again isn't it just possible to dirty flash the update above a modified system?

Thanks in advance for the answers and sorry for the questions, but I'm coming from a Z3 where the whole process wasnt that complicated.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=4976984]Antiallergiker[/MENTION], these are very good questions you are asking...

1. no, you do not need fota system update if you do not like to have it - it is here as an option to get even closer to a locked stock phone (while having root) with regard to features, that includes fota system update, which has not been possible after bootloader unlock until now...

You still can download next version fw and flash it, when upgrading, wipe would not be needed.

2. yes, this kernel hides unlocked bootloader properly, so when having TA-locked restored, it enables drm-functions that may be disabled when fw detects unlocked BL (regardless TA-locked had been restored)

If you only restore TA-locked, you get camera functionality back with oreo firmware. With pie, camera somehow works even without TA-locked restored (i.e. drm keys lost). But it is still not clear if quality is still the same or worse in case of drm keys lost.

If you do not use this kernel (and not use the secd patch either) video image enhancements would be disabled.

There are other drm related features, like SOMC FIDO Key, but it is not clear, how to test for example this one to prove it works or not.

Having TA-locked restored and running this kernel simply provides the best pre-conditions to have fully functional stock phone with root integrated.

3. Why would not we be able to "remove" something? Just check magisk and it's systemless feature - that's the way you may achieve any customization of system or vendor partitions without physically changing them, still the final result would be the same (bloatware "removed" for example) except the disk space on system/vendor partitions would not change, as no real modification would be done.

Customizations via proper magisk modules are done on runtime via bind-mount and therefore without real changes in verified partitions (the modules are stored in data partition).

So even such customized system may still be able to be upgraded via fota!
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] alagga:
First thank you very much for your whole development. And thanks for your support here :)

2. Is there a secd patch for the XZ Premium? Thought it was just for XZ1 (I just quickly read some threads about it) Sorry i found out what you mean: The secd patch would be a alternative for this kernel (but it's better to use this kernel instead of the patch)

3. To be honest, I know the systemless features, but I'm not able to write Magisk Modules, so I don't think I can fully rely on Magisk.

So would it be possible to just dirty flash the newest fw above a modified system? (I am aware that most system changes would be gone then)

Thanks again :)
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] khanhesham:
[MENTION=4418980]j4nn[/MENTION] could you upstream this stock g8142 xzp kernel to 47.2.A.8.24 feb sec patch ?
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=4976984]Antiallergiker[/MENTION], you can find the secd patch for XZp linked at the end of the step 11. (even though the title of the step says "only for XZ1c maybe XZ1") of the renoroot howto.

This kernel is in my opinion superior to the secd patch. And it is possible to use it with modified system and/or vendor partitions if fota is not required, just check the alternative use sections.

[MENTION=6250451]khanhesham[/MENTION], I am sorry, but this is not a binary patch to any stock fw kernel. This kernel needs to be built from sources, it is patched on source level.

Sony has not released sources for the latest fw (47.2.A.8.24) yet, so I cannot build the updated kernel.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] mad0701:
Just for information :

The SOMC Fido key is still available (with the Secd Patch) on my phone
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] khanhesham:
thanks for the insight on how the kernel is really modified..
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=6250451]khanhesham[/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 XZ Premium ROMs, Kernels, Recoveries, ] xtc_in_my_mind:
This boot image works perfect tested on xperia xz premium G8142 ..thnx for the support
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] niaboc79:
[MENTION=4418980]j4nn[/MENTION] I tried your xz2 kernels but they doesn't boot, any hint?

My system and vendor have custom files, do you think that magisk is needed?

I tried with stock dtbo and with the one you provided too.

Thanks
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] j4nn:
[MENTION=599722]niaboc79[/MENTION], there is only one purpose for the xz2 'standalone' kernel - to be used with 'fastboot boot' command, to test system fota update, having unmodified stock firmware before the try. Another use might be to boot twrp, that needed some customizations, but eventually worked too as documented here by [MENTION=4675598]shoey63[/MENTION].

I am afraid if you try to flash it, it does not boot because bootloader tries to merge dtbo with the in-kernel's dtbs.

Who knows what happens, because the merge had already been done on compile time - possibly it errors out due to clashing entries... I do not know, I do not have any tama phone to test that.

If you want to test the unlock hide thing with XZ2, you may try to use kernel with dtbo posted here - that has been built according to sony's instructions and it has been tested - it worked (i.e. booted) only when flashed (both kernel and dtbo), unlock hidden, but system fota update failed due to changes of boot and dtbo partitions.

That's why we need the 'standalone' kernel which boots via fastboot and can have unmodified stock fw.

If you have modified system and vendor partitions, that could be the reason too, why it does not boot.

I am not sure what needs to be done with tama to disable verity in kernel/dtbo - I have seen some command with fastboot flashing vbmeta or something with special options, but I am not sure if that's enough.

I would recommend to flash complete stock fw to ensure there are no changes and then try the 'standalone' kernel with 'fastboot boot' from usb - that should work, including possibility to fully install system fota update.
[Sony Xperia XZ Premium ROMs, Kernels, Recoveries, ] khanhesham:
thanks brother ?