yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ1  Guides, News, & Discussion] pbarrette:
Eh..

All this fuss.

The DRM fix from [MENTION=8363210]sToRm//[/MENTION] fulfills the requirements of this bounty.

It's true that he hasn't packaged it for the XZ1/XZ1c yet, but his secd modifications and drm[terribleName].so can be easily put to use by anyone who knows how to re-pack a kernel image.

That's why I gave him my $20 on 25-October when I saw his XZP fix. Because I had been looking at the secd binary for the XZ1c and knew it was just a matter of time before a proper re-pack was done.

If it's not for you because you're waiting for a true TA partition backup or a working root without BL unlock, then just withdraw your donation and move on. Or start a different bounty for those purposes. Hell.. I'd join that bounty too. I like having options.

Just take the drama somewhere else.
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
Well, in that case why dont you help the community and post the lastest kernel for XZ1 here repacked with Storms solution so we all can enjoy working camera and Magisk?

It would really be appreciated since noone else has been able to give such a solution to us.

A community is all about give an take [emoji4]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Send from my Xperia XZ1 Dual (G8342) using Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] pbarrette:
Primarily because I prefer to personally test the things that I release to ensure that they are working.

But because I haven't unlocked my bootloader, I wouldn't be able to test it.

I made an exception to that rule and created a flashable zip for an unlocked XZP user to enable VoLTE, but that's far less risky than a total kernel re-pack and was initially broken because of my lack of ability to test.

I have looked into creating an AnyKernel2 based package, but can't make any real progress on it with a locked bootloader.

But for anyone else looking to to so, here's essentially where I left off:

# begin ramdisk changes

#Get phone version
revision=$(grep "^ro.semc.version.sw_revision" "$ramdisk/default.prop" | cut -d= -f2 | cut -d. -f1)

case $revision in
"45")
#do stuff for nougat
insert_file init.rc "security nosuid nodev noexec" after "on post-fs" init;
backup_file init.environ.rc;
append_file init.environ.rc "drmfix" init.environ;
remove_line init.sony-platform.rc "# SONY: Enable Sony RIC"
remove_line init.sony-platform.rc "mount securityfs securityfs /sys/kernel/security nosuid nodev noexec"
remove_line init.sony-platform.rc "chmod 0640 /sys/kernel/security/sony_ric/enable"
patch_fstab fstab.qcom /system ext4 flags "wait,verify=/dev/block/platform/soc/1da4000.ufshc/by-name/fsmetadata" "wait";
patch_fstab fstab.qcom /data ext4 flags "wait,check,forceencrypt=footer" "wait,check,encryptable=footer";
"47")
#do stuff for oreo
fi;

# end ramdisk changes
write_boot;

#/patch/init file contents
mount securityfs securityfs /sys/kernel/security nosuid nodev noexec
write /sys/kernel/security/sony_ric/enable 0

#/patch/init.environ file contents
export LD_PRELOAD drmfix.so:drm****.so

(note that the XDA auto-censor is stripping sToRm//'s juvenile library name even inside code tags.)
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
Get your point, but if it is risky, not easy and noone succeded and posted a succesful result, then the case can not be closed.....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Send from my Xperia XZ1 Dual (G8342) using Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] pbarrette:
Well. It's risky only in that handing a non-technical user a broken kernel ramdisk could lead to a situation where they don't know how to fix it.

For a user with more knowledge, it isn't really a problem.

That said, if nobody has done it, then what is this post about? Or this one?

And if nobody has posted a successful result, then this guy and this guy?

I'm not sure what you mean when you say "the case can not be closed".

There's a DRM fix that [MENTION=8363210]sToRm//[/MENTION] created.

There's a package that [MENTION=6844550]M-Rom[/MENTION] created to install it.

It reportedly works.

Seems like case closed to me.

Your specific case where Magisk doesn't work? Granted, that's a popular use case, but it's not really a requirement for the purposes of this bounty thread.
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
Well, I'm absolutely not dizzing [MENTION=8363210]sToRm//[/MENTION], but as stated i XZ1 Compact thread [oreo]XZ1C-drmfix-root-ricoff by M-Rom did [MENTION=6844550]M-Rom[/MENTION] get his hand on an unofficial test package from [MENTION=8363210]sToRm//[/MENTION], modified it slightly to a crappy implementation not at all up to [MENTION=8363210]sToRm//[/MENTION] standards where we have to live with SuperSU and more or less permanent turned off ricof (as far as I understand)

[MENTION=8363210]sToRm//[/MENTION] is rightfully pissed of

Well in a way is mission accompished but as a part of the "deal" was the promise from sToRm// to update future releases. Since [MENTION=8363210]sToRm//[/MENTION] has proven himself to be a man of honour, more than one can say about [MENTION=6844550]M-Rom[/MENTION], that promise is worth something. Withour the involvement from [MENTION=8363210]sToRm//[/MENTION] or someone making it work in some other way will we be stucked on current version until the end of days.

As I said, [MENTION=8363210]sToRm//[/MENTION] is a hero and I think everybody with selfrespect should buy him a pizza (me myself sent him a small tribute of USD$ 10), but I really would like a more reliable and futureproof solution than the stolen dirtyfix we now have. and Yes, magisk would be great :)
[Sony Xperia XZ1  Guides, News, & Discussion] pbarrette:
Yes, that is sToRm's assertion, but it's equally believable that M-Rom did a binary diff of the stock

secd

file and sToRm's modified

secd

then looked up those offsets in IDA Pro and discovered the suntory functions affected. From that point, the simplest path is to document the function bypass modifications and port them over to the XZ1/c

secd

binary and produce a patch with IDA.

I went through that process myself (stopping just short of creating my own binary patch) in October just out of my own curiosity.

That's essentially what M-Rom is claiming, but sToRm could also be correct that it was a leaked binary of his own modification and it was taken and repackaged without his explicit permission.

It's not rocket science to do the

secd

mods when you can see sToRm's changes in IDA.

Of course, for the hard work of finding, modifying and validating those changes in the first place, and for creating the shim library to intercept the required function calls, sToRm absolutely deserves 100% of the credit.

To be honest, I think that sToRm's solution is less portable and sustainable than M-Rom's solution even though the M-Rom solution is far less elegant.

Barring major changes in the function of the

secd

binary, M-Rom's package will continue to work because he co-opts SuperSU to make the minimum required init script changes. So the whole thing works as a simple TWRP flashable zip.

On the other hand, sToRm has decided to try to maintain an ever increasing multitude of re-packed kernel images into an ever larger Windows-only binary which means that a new release has to be put out for every new Sony release across all supported models because of the constantly changing version numbers even if there are no changes to the

secd

binary or modified kernel ramdisk functions at all.

That's why I think an AnyKernel2 based solution would be a better way to go in the long run.

You'd have a flashable zip that only needs a couple of different

secd

binaries and another flashable zip that does the ramdisk re-pack at the user end.

That way there's no need to constantly maintain new kernels and no reliance on another package like SuperSU to make the init mods for you.

I absolutely agree (except possibly about the "stolen dirtyfix" part as I note above).

I think it is totally great that he has put so much time and hard work into this and completely agree that he should be rewarded by the community for having done, and continuing to do so, which is why I paid out my bounty to him in October.

Though I would note that sToRm himself laments the lack of source-code from [MENTION=357342]tobias.waldvogel[/MENTION] which results in him having to include two separate libraries, yet he also provides no source for his.

So if sToRm were to drop out and changes needed to be made in the future, someone would have to either recreate his work from scratch, or decompile and analyze his library, or build yet a third shim library.
[Sony Xperia XZ1  Guides, News, & Discussion] M-Rom:
think I'm for money? I'm not interested, the money should be @ sToRm //.

I use SuperSU want to simplify, do not need boot.img.

How to modify secd

modify

E803003206000014E8031F3204000014E807003202000014E8031E32

for

08008052060000140800805204000014080080520200001408008052

How to modify SuperSU

Modify init.supersu.rc.24 and init.supersu.rc.24.bindsbin

on post-fs

exec u:r:supersu:s0 root root -- /sbin/fbe_bypass.sh

export LD_PRELOAD drmfix.so:drm****.so

You can also modify magisk14.3

init.magisk.rc

on post-fs

start logd

start magisk_daemon

wait /dev/.magisk.unblock 5

rm /dev/.magisk.unblock

start magisk_pfs

wait /dev/.magisk.unblock 10

export LD_PRELOAD drmfix.so:drm****.so

ramdisk modification

In init.environ.rc add

export LD_PRELOAD drmfix.so:drm****.so

How to close RIC

Add to

mount securityfs securityfs /sys/kernel/security nosuid nodev noexec

write /sys/kernel/security/sony_ric/enable 0

SELinux changes to permissive(android 8.0)

ramdisk modification

Modify init.rc

on early-init

# Set init and its forked children's oom_adj.

write / proc / 1 / oom_score_adj -1000

write / sys / fs / selinux / enforce 0
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
I thing all involved in this infected matter have the best of intentions and I´m convinced the goal for [MENTION=8363210]sToRm//[/MENTION], [MENTION=6844550]M-Rom[/MENTION], [MENTION=4782500]pbarrette[/MENTION], [MENTION=8769837]_Mdroid_[/MENTION], [MENTION=1428502]-Happy Feet-[/MENTION] and everybody else who has contributed is just to contribute fore and most.

Anyway, I have very mixed emotions concerning the bounty thread phenomenom and I started a new, generic thread about it.

Bounty threads - to be or not to be

Maybe it´s just me, but I reckon the new thread will reveal if that is the case :)
[Sony Xperia XZ1  Guides, News, & Discussion] -Happy Feet-:
I have done Answer B ;) I sell this phone and get shipped tomorrow. And for this money I get an Pixel Device.

Gesendet von meinem G8341 mit Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
Sorry to hear you leave us. Good luck with your HTC :)
[Sony Xperia XZ1  Guides, News, & Discussion] JALACB:
Ok so please retire my offer as I think this is not what I pledged for .....

I thought the bounty was for TA backup solution before unlocking the bootloader not for a DRM check bypass.
[Sony Xperia XZ1  Guides, News, & Discussion] nickcaper:
Sony is dead to me... Im NEVER buying another Sony again... Im on the hunt for a better solution. If These companies think they can do this, lock up the phone and we will be just fine with it, then Ill just get a iPhone.
[Sony Xperia XZ1  Guides, News, & Discussion] Braindeadz:
True story :svetius:
[Sony Xperia XZ1  Guides, News, & Discussion] pr0jesse:
uhh, so does this work now? I don't really care about the drm backup atm, as long as I can get the new updates with root when they get released with all the drm features. Does this mean that storm/// has to update the package every time a new (major) update gets released?
[Sony Xperia XZ1  Guides, News, & Discussion] _Mdroid_:
It works somehow, depending on your skills. Unfortunatly, I can't do it myself :( Even so I donated, for me mission is accomplished .

Basically [MENTION=8363210]sToRm//[/MENTION] wants to refine his work, add aditional devices and maybe there is even a solution to reduce the effort of modifying the image. I really hope there is a solution for my XZ1C in the future.

At the moment [MENTION=8363210]sToRm//[/MENTION] has no phones to for testing available. The way to send his files to some testers here in the forum was not really a success story, as we all know. But there could be a solution in the future, see here.

Before I forget ..... **** you Sony for your sick DRM solution.
[Sony Xperia XZ1  Guides, News, & Discussion] _Mdroid_:
If you are interested in a key backup, stop reading now. ;)

OK everybody else, there is a proposal. [MENTION=8363210]sToRm//[/MENTION] needs an XZ1 for testing, this will substantially speed up development.

The total pledge was $1132, but some are no longer interested, searching for something else or have already sold their phone. On the other side, some have donated anyway. Everything is welcome. If you don' want to pay out the full amount, what about half now, half in case of success? I try to give an overview here and keep it up to date.

And of course you can donate your phone as well. :p

$291

pbarrette - $20 (25.10.2017

aikon96 - $61 [€50] (29.12.2017)

Belyavin - $10 (04.01.2018)

_Mdroid_ - $20 (09.01.2018)

pergoteborg - $10 (12.01.2018)

VeixES - $50 (21.01.2018)

jgreene617 - $100 (21.01.2018)

Nickcer - $20 (22.01.2018)
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
pergoteborg - $10 (12.01.2018) Message to [MENTION=8363210]sToRm//[/MENTION]:A small contribution 'casue you've been treated unfar regarding XZ1
[Sony Xperia XZ1  Guides, News, & Discussion] jgreene617:
I'm a little late joining this thread. And this is my first post ever. But it is a serious post, because: 1) I love the XZ1C and don't want to use any other phone right now, and... 2) Sony's #$*&^@!! DRM is wasting my time and costing me money, so I'm willing to pay for a solution.

I will make 3 pledges:

I will immediately give 100 USD to [MENTION=8363210]sToRm//[/MENTION] for the excellent work he has done so far. Just let me know how to send the money.

I will give an additional 100 USD to [MENTION=8363210]sToRm//[/MENTION] if he can publish a supported version of xperifix for my phone, by 10 Feb. 2018. I have an Xperia XZ1 Compact (G8441). Stock Sony firmware version 47.1.A.2.324. Firmware variant (aka customization version, or CDA) 1310-4371_R8B.

I will pledge 150 USD to anyone for a root exploit that is delivered by 10 Feb. 2018. It must work on the above-mentioned phone, with a locked bootloader, and allow backup of the DRM keys.

//Jeremy
[Sony Xperia XZ1  Guides, News, & Discussion] sToRm//:
Awesome support. Thank you! You can donate with PayPal (link in my profile and signature).

I will include the XZ1 & XZ1 Compact in XperiFIX asap. But first I want to get a working fix with Magisk 15+ because I don't like SuperSU... ;)
[Sony Xperia XZ1  Guides, News, & Discussion] pergoteborg:
Magisk 15 works out of the box, at least with the 12.49 FW, but of course the current DRMFix does not work with Magisk

You're a rock, sTorm//; [emoji4]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Send from my Xperia XZ1 Dual (G8342) using Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] sToRm//:
Exactly. Magisk itself works, but it prevents a modification of the environment variables in the ramdisk on current firmware versions. That's the reason why the fix actually doesn't work.
[Sony Xperia XZ1  Guides, News, & Discussion] N1ghtr08d:
The question is, is there any way around that...a so called "fix for the fix" if you will? ?
[Sony Xperia XZ1  Guides, News, & Discussion] -Happy Feet-:
What happens when we unlock the Bootloader and Flash TWRP and drm fix. Can we get the latest Updates from Sony or only over xperifirm?

Gesendet von meinem G8341 mit Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] sToRm//:
We will get this **** done. Be sure ;)
[Sony Xperia XZ1  Guides, News, & Discussion] Nickcer:
I sent for sToRm// 20$ in the hope of success.
[Sony Xperia XZ1  Guides, News, & Discussion] naoya92:
Please scratch my pledge. I've already donated to sToRm// and have sold my xz1c- really wanted to love that phone, but was an overall garbage fire experience. **** Sony tbh.

Good luck with everything folks.
[Sony Xperia XZ1  Guides, News, & Discussion] albmanzi:
I pledge 15€ for a tool or method for TA partition / DRM keys backup and restore that will be kept updated to support current and future firmware versions of ZXC1
[Sony Xperia XZ1  Guides, News, & Discussion] JALACB:
This post looks dead. The sad thing is It seems not many deveolpers keep working on this phone....

:rolleyes::rolleyes::rolleyes:
[Sony Xperia XZ1  Guides, News, & Discussion] Mega99:
You don't know what you're talking about. Storm is on the verge of releasing an update to his tool thay adds support for XZ1 and XZ1c. Be patient!
[Sony Xperia XZ1  Guides, News, & Discussion] snake218:
First time in a bounty thread. Ok.. Count me in with 30$ for a root method without unlocking bootloader.

---------- Post added at 01:10 AM ---------- Previous post was at 12:55 AM ----------

Will work with a locked bootloader? If not, is there a hope for a device with unlocking bootloader not allowed?
[Sony Xperia XZ1  Guides, News, & Discussion] JALACB:
I´m afraid not. I believe they´re talking about a "bypass method" just to restore Sony capabilities once you have opened bootloader and lost your keys ....

The thread was created for a bounty looking for a truly keys backup method but currntly I think this option is commpletely abandoned now .....It must be unachievable with Sony security.

:(
[Sony Xperia XZ1  Guides, News, & Discussion] -Happy Feet-:
I think we running better when we unlock and flash the DRM Fix. But at this time, no custom Roms available.

Gesendet von meinem G8341 mit Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] pbarrette:
Well, there's always a possibility.

Sony updated the bootloader in the 47.1.A.5.51 firmware (from Nov-2017 IIRC), so there must have been some reason for it.

The images suggest that the older bootloader (LA1_1_O_77) has OS Level "2017-05" and the newer one (LA1_1_O_79) has OS Level "2017-08" which suggests that it might incorporate bootloader fixes from Qualcomm up to that point.

There were 4 separate CVE's between June and August marked as high severity escalation of privilege vulnerabilities in the bootloader during that period:

CVE-2017-7365

CVE-2017-8255

CVE-2016-10389

CVE-2017-8273

I, personally, don't know how to exploit them, but someone might eventually figure it out.
[Sony Xperia XZ1  Guides, News, & Discussion] -Happy Feet-:
Any news?

Gesendet von meinem G8341 mit Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] JackyJacks:
Yep, here is the latest news (posted February the 2nd).

(Sorry for the BIG size of the image, the XDA bbcode does not allow to resize images...)
[Sony Xperia XZ1  Guides, News, & Discussion] snake218:
Developer janjan just released today his kernel with latest magisk+drm fix working

https://xdaforums.com/xperia-xz1/development/kernel-sony-xz1-23-january-2018-t3739586
[Sony Xperia XZ1  Guides, News, & Discussion] JackyJacks:
Hello snake218, thanks for the information.

But from what I understand in the thread, the DRM fix is not included and this kernel cannot be fixed using RicOff.

Edit: Sorry I did not read the latest page where there is a full inclusive package, well that's great we finally have the all-in-one Magisk + DRM fix then. sToRm// release is still awaited because easier to apply (piece of software to do it for you), and will use a more stock kernel (janjan kernel has lors of tweaks).
[Sony Xperia XZ1  Guides, News, & Discussion] janjan:
I am going to release a "patched" stock boot image incase anyone wanna use it. It will be ready for drmfix+magisk. Consider XZ1 Compact and XZ1. Will be up very soon.
[Sony Xperia XZ1  Guides, News, & Discussion] snake218:
Question: then we have a "winner" for the bounty?
[Sony Xperia XZ1  Guides, News, & Discussion] zippy01:
Depends on what terms you think defines a winner

Some people have already donated
[Sony Xperia XZ1  Guides, News, & Discussion] nickcaper:
smh... dam shame sony does these things to OUR product... We paid for it.. WHy do we not have ability to use it like we want?
[Sony Xperia XZ1  Guides, News, & Discussion] albmanzi:
I posted my pledge to donate for a full TA Partition and DRM keys backup/restore method, as per title of the thread. I'm in no hurry to buy the XZ1C even though I'd like to, so anything less than that doesn't count as a victory to me.

Some people who already donated or have pledged to do so are satisfied with a drm fix to use their unlocked devices. I guess for those users the bounty can be regarded as "won".
[Sony Xperia XZ1  Guides, News, & Discussion] 4rz0:
You probably should open a separate bounty thread for that as this one clearly states in (C) that it also counts for other ways to retain DRM features without having to back up the keys, which Storm's DRM-fix falls under.
[Sony Xperia XZ1  Guides, News, & Discussion] sToRm//:
To all XZ1 and XZ1 Compact users:

XperiFIX now supports your devices! You can download the current version (fixed) again, install and run it.

https://www.xperifix.com/download/xperifix-latest/

Please report if it works for you!

Original thread: https://xdaforums.com/xz-premium/development/hack-mod-sony-xperia-xz-premium-twrp-t3695171

Cheers!
[Sony Xperia XZ1  Guides, News, & Discussion] spike7701:
Works with XZ1 Dual G8342? Thanks

Gesendet von meinem G8341 mit Tapatalk
[Sony Xperia XZ1  Guides, News, & Discussion] sToRm//:
Latest XperiFIX v2.2 should work with that model. Feel free to try it. :)
[Sony Xperia XZ1  Guides, News, & Discussion] jgreene617:
Thanks!! I got it working on my XZ1c and will send another donation. I'll post more detailed feedback in the XperiFIX thread.
[Sony Xperia XZ1  Guides, News, & Discussion] kpjs4s:
Is unlocking bootloader required ?

Do we need to unlock bootloader manually before running the XperiFix application/ or the application will take care of it ?

FYI I using XZ1 Compact, - G8441 version.
[Sony Xperia XZ1  Guides, News, & Discussion] snake218:
Jan Jan kernel too I guess... just saying.

Anyway is great having 2 ways to get the most of our devices.

With this and Xperia open device project, let's hope see more development of roms and mods.
[Sony Xperia XZ1  Guides, News, & Discussion] sToRm//:
Yes, for sure. The unlock key is provided by Sony and will be generated by their servers and then sent via email. Would be nice if I could imolement this, but seems to be impossible. I don't know their algo... yet... Hahaha...
[Sony Xperia XZ1  Guides, News, & Discussion] burtallicus:
are you saying something ? :D
[Sony Xperia XZ1  Guides, News, & Discussion] sivabharani:
Just unlocked my XZ1 and annoyed by green photos it take. I was not aware of DRM issue. Gonna try installing your fix.
[Sony Xperia XZ1  Guides, News, & Discussion] albmanzi:
My wallet is ready to open for the bounty, I won't root the phone immediately as soon as I'll receive it because that post gives me hope :fingers-crossed:
[Sony Xperia XZ1  Guides, News, & Discussion] Matzeee:
I am reading for some time now but still got some questions left. Hope you can help me.

My XZ1 offers to install 47.1.A.12.119

Is rooting still possible after upgrading?

Are OTA updates from Sony still possible after unlocking and rooting? Or at least manually (newflasher or Xperia Companion) without hardresetting each time?

Is the phone still manageable with Xperia Companion?

Has anyone compared the kernel by janjan to xperifix and would share the experience so far?

How do you think are the chances to get a real DRM backup/restore?