yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 Questions & Answers] nasko_spasko:
As much as I understand: the OpenSource guys are on vacation till Monday, so we'll wait until then. local_manifest isn't updated with the akari device sources and the parent tama device tree (common sdm845 for Sony devices) is empty. No blobs, too. I have no nerves left to wait to build AOSP, there's some movement going on, though. So that's good, I guess...
[Sony Xperia XZ2 Questions & Answers] janjan:
I mean kernel source

https://developer.sony.com/file/download/open-source-archive-for-51-1-a-4-173/
[Sony Xperia XZ2 Questions & Answers] MartinX3:
And someday this will be updated, too.

https://github.com/sonyxperiadev/kernel/commits/aosp/LA.UM.6.3.r1
[Sony Xperia XZ2 Questions & Answers] janjan:
Yep
[Sony Xperia XZ2 Questions & Answers] nasko_spasko:
recovery.fstab + boot.img tree

I've acquired the recovery.fstab file from the bootimage and I'm sharing it if someone wants to take a look. The other file is the output of tree command in the root of the ramdisk. Have fun!
[Sony Xperia XZ2 Questions & Answers] smellz:
when trying to flash the kernel, the following scenario occurred:

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot patched_boot.img

target reported max download size of 536870912 bytes

sending 'boot_a' (22348 KB)...

OKAY [ 0.840s]

writing 'boot_a'...

FAILED (remote: Flashing is not allowed in Lock State)

finished. total time: 0.840s

who has a solution?
[Sony Xperia XZ2 Questions & Answers] FcukBloat:
you unlocked the BL right?
[Sony Xperia XZ2 Questions & Answers] serajr:
It seems he didn't!

[MENTION=7528015]smellz[/MENTION]

Did you?
[Sony Xperia XZ2 Questions & Answers] Milano1899:
Hi guys! Any news about DRM patch and TWRP for XZ2? Camera stays black after unlocking bootloader. Hope for good news :fingers-crossed:
[Sony Xperia XZ2 Questions & Answers] janjan:
Try

fastboot flashing unlock

OR

fastboot flashing unlock_critical
[Sony Xperia XZ2 Questions & Answers] Sony92:
decryption code Mega Download link

a decryption code is required for download at mega. what you have sent me per pn
[Sony Xperia XZ2 Questions & Answers] janjan:
https://mega.nz/#F!NxAAhaoB!BLeey6mOn3XcLWmND_l08g

Please only boot via adb/fastboot to ensure everything is working.

fastboot boot boot.img

Then

fastboot boot recovery.img (TWRP)
[Sony Xperia XZ2 Questions & Answers] nasko_spasko:
These 2 result in a black screen if fastboot-ed. Nothing happens even after several minutes. device stays in fastboot mode after either of the images are booted. If I flash them consequently however (fastboot boot boot.img - wait for the device to reapear in fastboot mode, then fastboot boot recovery.img) the screen with the red triangular sign appears, message says that quote: "the device is corrupted and cannot be trusted. Rebooting in 5 secs.!" fastboot --set-active=a fixes the corrupted device warning and after fastboot reboot device boots as normal.

If I boot them in separate fastboot "sessions" may I say. The warning screen doesn't appear.
[Sony Xperia XZ2 Questions & Answers] janjan:
Ummm.. I just compile a new one. Hopefully it boots now

- fastboot flash boot boot.img

https://mega.nz/#!glAkVQTb!WHWrSDXRE3461xieRywAMmAv3vzU2zLdyVwrlDbU-VY
[Sony Xperia XZ2 Questions & Answers] nasko_spasko:
Hi, there!

Ok, so the same behavior as the prev. version. Shouldn't the boot command be sufficient? I mean I didn't flashed it as I don't have the stock boot dump on this PC to recover in case it didn't boot. If it's of any significance, I'll try with flashing instead tomorrow morning. It's 3am here. :D

-------

Edit: flashing doesn't work either. The stupid thing with the warning appears. I can't seem to find a way to debug it since if I sideload it through fastboot it throws me back in fastboot mode in a couple of seconds and flashing it triggers the corrupted device warning. Any ideas? Thanks for the effort, tho...
[Sony Xperia XZ2 Questions & Answers] janjan:
Need to investigate that.

The only one who can gives us info and help us with TWRP is [MENTION=912474]Dees_Troy[/MENTION]. He has knowledge and info about A/B slots. I am still working with twrp.
[Sony Xperia XZ2 Questions & Answers] Sony92:
So I do not need to try flashing it yet?
[Sony Xperia XZ2 Questions & Answers] nasko_spasko:
Pretty much, yeah... There's no point in flashing if doesn't boot with fastboot boot command. That's what it's for: testing. :)
[Sony Xperia XZ2 Questions & Answers] Sony92:
So that means waiting

For me it was like that, that was a mistake during recovery flashing
[Sony Xperia XZ2 Questions & Answers] chris79:
I was too fast and silly and unlocked my bootloader too.. now black cam :(

Loosing drm isnt important but cam should work...anybody want an unlocked xz2 ? ?
[Sony Xperia XZ2 Questions & Answers] nasko_spasko:
I think it's best if we wait for Sony to release complete deivce tree. They're making progress on github. Right now the build fails with errors for missing sdm845 libs. the akari and apollo are already in local_manifests, so I guess they'll fix the build pretty soon.
[Sony Xperia XZ2 Questions & Answers] mirhl:
I think maybe even Sony might be waiting for this?

https://www.xda-developers.com/qualcomm-snapdragon-845-kernel-source-code/
[Sony Xperia XZ2 Questions & Answers] niaboc79:
Anybody tried rootkernel?
[Sony Xperia XZ2 Questions & Answers] Sony92:
I thought so too. I already discovered the article.
[Sony Xperia XZ2 Questions & Answers] serajr:
Roorkernel does not work with new XZ2/C kernel (2018 devices, including XA2/Ultra)!

I've already created another tool (based on it) for 2018 devices only, but it looks like the sepolicy patch (needed for LD_PRELOAD-ing) is not working properly (need to investigate that)!
[Sony Xperia XZ2 Questions & Answers] Sony92:
At least you can get root, if you change the original kernel.sin into a boot img with the program unSIN and then installed magisk on your smartphone. Next you have to patch the boot img with magisk. then you go to the folder magisk and copy the patched boot.img from the magisk folder on your computer and rename it in boot img. then you bring your smartphone into fastboot mode and flash the boot img.
[Sony Xperia XZ2 Questions & Answers] Haldi4803:
But that doesn't help with the Camera, does it?

Is there a Magisk Module like DRM fix ?
[Sony Xperia XZ2 Questions & Answers] Sony92:
No. the drm fix has to be fixed with a Costum Kernel.
[Sony Xperia XZ2 Questions & Answers] Sony92:
[MENTION=490110]janjan[/MENTION] There is something new, because of the kernel and twrp?
[Sony Xperia XZ2 Questions & Answers] MartinX3:
Please wait until Qualcomm released the source code of the Snapdragon 845
[Sony Xperia XZ2 Questions & Answers] janjan:
I have some free time to play wait kernel + twrp this weekend. (I remember they were missing something in the source from Sony)
[Sony Xperia XZ2 Questions & Answers] Pandemic:
Any news ?
[Sony Xperia XZ2 Questions & Answers] janjan:
Still working on it. I will post my result when I finish. Be patient :)
[Sony Xperia XZ2 Questions & Answers] Sony92:
if you lock the bootloader again now, then you have the complete camera functions again?
[Sony Xperia XZ2 Questions & Answers] MartinX3:
Sadly no.

The unlock function is killing the DRM keys.

And they can't be installed in the hardware ROM again.

But the restrictions are fixable, if you hack the kernel.

Be patient and wait for the DRM fix.

You should also wait 6 months up to 2 years.

If you found a faulty piece of hardware inside your XZ2, you won't be able to get it repaired for free.
[Sony Xperia XZ2 Questions & Answers] serajr:
sepolicy is not present at rootfs anymore (I mean, after system boots up, but inside ramdisk). Treble (SELinux initialization)!

How can we deal with new selinux rules now? Directly patching sys/fs/selinux/policy? sys/fs/selinux/load? sys/fs/selinux/precompiled_sepolicy? Magisk enviroment?

Any help would be great? TIA!!
[Sony Xperia XZ2 Questions & Answers] janjan:
I am still working on kernel. I haven't look at it yet. I will take a look and share my info. (I will say.. directly patching sys/fs/selinux/policy and second attempt precompiled_sepolicy). Need to refresh my mind to read about treble (selinux init..)

Edit: Also possible with Magisk.
[Sony Xperia XZ2 Questions & Answers] mirhl:
Is there any proof of that?

Or is it only speculation like the infamous "imei blacklist"?
[Sony Xperia XZ2 Questions & Answers] MartinX3:
The support test your device hardware, the diagnostic program tells the support, there are no DRM keys.

Now the support knows, you unlocked the device and you are able to install software, which isn't supported, which could brick the hardware.

Why should you get a warranty?
[Sony Xperia XZ2 Questions & Answers] serajr:
Thanks bro. I've already created a tool for that purpose, ofc not yet released. I've also tried patching kernel's sepolicy (ramdisk one, old trick I made with rootkernel) but it does not work (magiskpolicy --live "allow bla bla bla { bla }" also does not work).

I'm able to patch sepolicy using magisk executables (magiskinit, magiskpolicy, 2016-2017 devices).

Tool is ready to patch stock kernel. I will try now attacking sys/fs/selinux/policy (report back here later)!
[Sony Xperia XZ2 Questions & Answers] janjan:
Can someone please test this kernel/boot image and let me know how it does. I also attach the stock boot image incase it doesnt boot at all. Thanks

Follow the steps below

-reboot to bootloader using key combination or using adb command

-install boot and dtbo images using fastboot commands

adb devices
adb reboot bootloader
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot reboot

You can always flash the Stock boot image. See the attachment please.

XZ2-akari-H8266
[Sony Xperia XZ2 Questions & Answers] mirhl:
Again, are you saying this because you have actually seen (or know) it, or is it just ?

If my screen has a burnt pixel, or there is a wacky volume rocker, that's none of their business.
[Sony Xperia XZ2 Questions & Answers] MartinX3:
Try it and post the result, if you don't believe it.

The wouldn't support an official unlock method, if they haven't an indicator to test, if you unlocked it.

An IMEI blacklist makes also sense.

If your device exploded because of a freaky kernel, they need a way to check how this happened and if it was their own software which would trigger their warranty.
[Sony Xperia XZ2 Questions & Answers] FcukBloat:
here in Italy, with my old z3c, they didn't repair in warranty a hw failure (loose magnetic charging connector) because i had an unlocked bl, and also lost the warranty forever because it got blacklisted, don't see why should be different with the xz2c.. ;(
[Sony Xperia XZ2 Questions & Answers] Sony92:
Did someone already try the files?

It works?

I wanted to flash the files via Fastboot now.

Fastboot does not find my device. But I can not explain why, let's go it is not. But I think synonymous with the Sony drivers, I have nothing from the Develop homepage, because of Fastboot. And I have already installed the Fastboot and adb drivers. In ADB mode, the smartphone is also recognized. I've done it several times in Fastboot, but now it does not work. LED is lit but blue.

Kernel works. but the camera does not work
[Sony Xperia XZ2 Questions & Answers] janjan:
Thanks for the feedback. I am going to play with DRM now to fix greenesh picture. Let me see what I can do. Crossing finger. I will post the result soon.
[Sony Xperia XZ2 Questions & Answers] Sony92:
Thanks bro.

I do not know if I ever asked that. Is it possible with a program to find out what kind of sound chip is installed in the Xz2? Because when I use the HTC adapter from u11, the sound sounds strong and the volume is louder. If I use the original Sony adapter, that is not the case. And still have the bose sound sports wireless FREE, that sound great too. Does that mean that the Sony has a bad sound chip installed and the good quality make the headphones via Bluetooth and the htc adapter?
[Sony Xperia XZ2 Questions & Answers] janjan:
You can use devcheck to find out the sound chip. Under hardware at the end. From this thread.

https://xdaforums.com/android/apps-games/app-devcheck-1-4-beta-information-t3171427

It could be HTC adapter. Since u me mention that sounds from Sonys and Bose are great.
[Sony Xperia XZ2 Questions & Answers] Haldi4803:
DevCheck doesn't show anything about Sound :(
[Sony Xperia XZ2 Questions & Answers] janjan:
It shows my sound card. Using Google Pixel 2 XL. But nothing useful. Seems doesn't show anything about sounds. My bad
[Sony Xperia XZ2 Questions & Answers] Pandemic:
Bro you make this also if all works and drm also for single sim H8216?

Btw root/magisk works so yes which version of magisk ?
[Sony Xperia XZ2 Questions & Answers] Sony92:
root rights

root rights can be obtained by patching the Boot.img with Magisk. You need to download the latest version of Magisk (Apk) and install it on your smartphone. You also push the Boot.img on your smartphone. Then you go to install in the app. Now you go to the point Boot.img patching. You have to go to the directory where you copied the Boot.img. Now Patcht Magisk the boat img. Now you go on your smartphone on your internal memory and in the Magisk folder and copy the file Patched_Boot.img into the main directory of the internal memory. Then you plug your smartphone to the computer and copy the Patched_Boot.img on your computer, preferably in the folder where you have installed Fastboot and important to change the file name to boot.img. Now bring the smartphone in the fastboot mode and CMD with the command fastboot flash boot boot.img the boot.img flashing. Now the command Fastboot Reboot and your smartphone should start.
[Sony Xperia XZ2 Questions & Answers] Pandemic:
alright but we all wait on the DRM fix :(
[Sony Xperia XZ2 Questions & Answers] lba810701:
Hi!

When i've got an z3c, and it's touch screen upper side goes wrong / fault, sony service doesn't interest it's bootloader locked or not. My was unlocked, and they don't repair it, they gave me a brand new xc compact for free because the problem was a hardware fault. I'm in Hungary, so maybe it depends the service if they check the bootloader status or not...
[Sony Xperia XZ2 Questions & Answers] xarinatan:
for my XZ2 compact, the camera's preview went black after unlocking the bootloader. Somehow making videos still works, and the preview shows, but when I slide/switch to normal photo mode the preview goes black. Same for apps that use the camera e.g telegram, whatsapp, signal, etc. some can't use the camera anymore at all (discord). resetting the app, or factory resetting the device both don't change anything.

kind of rather upset about that actually, why the hell did they include so much bloatware, and even Spyware that Facebook has been dragged to court for because it sends back info even if you're not logged in, and then they just cripple your device when you try and fix the issue? that ****'s class action worthy imho.. but egh, only in today's world people think it's normal to pay 600+ euros for a device only to receive it loaded up with ads and crap that you not only didn't ask for but also cannot remove. seriously considering flashing back the original firmware and selling the device.
[Sony Xperia XZ2 Questions & Answers] MartinX3:
Please keep calm.

You didn't read the warnings, before unlocking your device.

Your DRM-Keys are lost. Even installing a new sony firmware won't bring them back.

Now you need to wait for a drm fix, which could take several weeks.

And to remove the apps, there is a thread since 11 days.

https://xdaforums.com/xperia-xz2/development/oreo-debloat-script-v1-0-t3798979

I deactivated the apps only.
[Sony Xperia XZ2 Questions & Answers] nreuge:
For people having UB with Sony camera app not working, the best alternative camera apps you can use are:

- Open Camera

- HTC Camera v9.20

You won't have the quality of Sony camera app (especially in low light), but quite decent in the meantime.
[Sony Xperia XZ2 Questions & Answers] chris79:
Wont help, still no preview..
[Sony Xperia XZ2 Questions & Answers] nreuge:
Does it mean that the preview is DRM protected ?? Really weird...

Edit: it may mean that, whatever the camera app, the preview use the Sony camera driver, which is DRM protected...
[Sony Xperia XZ2 Questions & Answers] chris79:
Proberly, but why work the preview sometimes in Video Mode ^^..but only with HDR off ;)
[Sony Xperia XZ2 Questions & Answers] nreuge:
Probably because, depending on the selected mode/options, the preview uses routines that are linked (or not) with the Bionz image processor (which is DRM protected...) :eek:
[Sony Xperia XZ2 Questions & Answers] Razor10707:
Hello i have a xperia xa2 and i been looking forward of unlocking the bootloader i have the h4113 variant and does the camera really fully operational after bootloader unlock? As that was keeping me away from unlocking my bootloader. TIA for your answer.
[Sony Xperia XZ2 Questions & Answers] Haldi4803:
You're in the wrong thread....

here you go: https://xdaforums.com/general/help/sony-xperia-xa2-unlocking-t3753185
[Sony Xperia XZ2 Questions & Answers] xarinatan:
I can't believe you just swallow their bull**** so readily, didn't you also pay more than halfway a thousand euros for your device? You really think this should be legal? If so I hope your next PC comes with superfish and ad injectors like what Lenovo got sued to **** for.

I've had xperia devices since the mk16i pro, I currently have like 5 of them and resold some of them, this is the first phone I've got from them that does this bull**** this extensively. They're bricking the camera on unlocking the bootloader according to the official developer instructions, which mention no breakage of anything, just voiding of warranty; the same as it's done with all previous versions. Even with voiding your warranty that's enough to go to court with over it.

But we'll see about that license partition, I'm pretty confident that Flashtool can put it back to factory state as it's been able to do so in the past as well. You just can't have your bloatloader unlocked. :rolleyes:

As for that script, I had seen it too late of course as I just did what I always did with my new xperia phones, and I already tried deleting apps with adb but that failed, however this script seems to have discovered that you can just run 'pm uninstall -k --user 0' even without your device being rooted, which is pretty neat I guess, but I kind of really want to have my device rooted regardless.
[Sony Xperia XZ2 Questions & Answers] MartinX3:
I know that's **** and I payed 570€ for the H8296.

I hate it, too, but I also know that there will be a DRM patch.

I buyed this phone, because Sony has an open source Programm and because most of their phones got a DRM fix up to a half year after release.

I also buyed it, because it has a strong durability, you can't even break it with your hands.

Other phones got broken.

I needed an outdoor smartphone and this one satisfy my needs.

2 years later, I will install lineage is on it.

But I will wait, because the Sony updates does include vendor and firmware upgrades too.

Which I won't get with a custom ROM.
[Sony Xperia XZ2 Questions & Answers] Sony92:
Mod Edit: XDA is not a place for selling. Thanks!
[Sony Xperia XZ2 Questions & Answers] mirhl:
FFS dude, chill out.

Emma has always been pretty useless compared to flashtool. Last time I checked it ever really was useful to reflash stock rom on unlocked devices, end.

As for the "dur mur required by law", you really don't seem to know what you are talking about.

This is what that is: https://github.com/sonyxperiadev/kernel-copyleft/branches (plus the tarballs on their website)

This instead is the official repo that accepts 3rd party code contributions, that

veeeery few OEMs

have in comparison: https://github.com/sonyxperiadev/kernel

And I better stops here on apologies.

As for the camera, yes it's not working currently. Should you go paranoia? I don't think so.

It must be like the fourth of fifth time they release a new device generation (which added whatever new camera algorithm/sensor) only to get everything busted with bootloader unlock on launch day. Hell, the exact 100% same happened on Z1.

After short time they fixed it all and called it a day. Let alone the absolute magic, folks on Kitakami has pulled off with stock blobs. EDIT: soon on Yoshino boards, and likely even forward too

Speaking of which, I would reasonably assume the current problem now is that SODP ones are missing.

After two months, yes, it kinda starts to be worrisome. But if you don't want to trust them, at least believe this.
[Sony Xperia XZ2 Questions & Answers] Pandemic:
Any news bro [MENTION=490110]janjan[/MENTION] about drm fix ?
[Sony Xperia XZ2 Questions & Answers] mirhl:
Seems like you'd have a far better day if you iust stopped reading and breathing before apeshitting...

Besides I just found the other day they have a bug tracker, I swear to god I don't think even google has a similar close-contact deep *official* support.
[Sony Xperia XZ2 Questions & Answers] xarinatan:
If I buy a new phone in the same series which I've always unlocked with the same instructions from the same official website without even really taking the phones in use, because of their always seemingly opensource friendliness, I don't expect major features to just completely stop working, and I actually also think it's weird that it would void your warranty......

I guess I did go kind of over the top with my rage, it's been a very long week and that phone bit me when I could least use it, but I still think things are wrong as they are right now and they should be corrected by Sony ASAP, preferably also for the previous generations so you don't need crazy BS like a DRM 'fix', or wait half a year after the release date before you can even compile your own ROMs. I remember when PCs and parts came with driver disks that contained everything you needed to set up your preferred OS from scratch, yesterday and today :silly: why aren't phones and tablets like that? they're just small PCs with ARM processors that fit in your pocket, but they run Linux all the same and have all the potential to run Windows' ARM versions or free/openBSD or whatever the **** you'd please, if it weren't for the sorry state of phone hardware drivers >8v

Also the dutch lawyers responded, I should be able to put in a dispute with them so they can respond properly to the request to release the DRM on the sensor/image processor, with government legal aid it shouldn't be too expensive to press them into taking action.. BUT I think I'll wait for both the EFF to respond and the release of Qualcomm's and Sony's sources to see if that fixes things, it should only be a few more weeks of putting up with my older broken phone I guess :/

also with Google it kinda depends on which of their projects you want support for, the Android folks seemed pretty awesome, but don't ever try and get a bug fixed with the Chromium people haha

Sony's bugtracker is nice though, they actually make an effort to close things, I really didn't think they were still as involved with the opensource scene, when my sensor stopped working and support basically hung up on me I feared the worst, but having taken off the rest of my week and having taken some time to research things shows they're actually still pretty on top of it. I just hope that means I can finally use my 600 euro new phone sooner rather than later >_>
[Sony Xperia XZ2 Questions & Answers] Pandemic:
It looks you type a entire book now hahaha :p
[Sony Xperia XZ2 Questions & Answers] Haldi4803:
Hey Guys, i have a question...

Trying to access

c:\ADB>adb shell ls /sys/class/power_supply/battery/
ls: /sys/class/power_supply/battery/: Permission denied

resulted in premission denied...

So Snapdragon Profiler isn't working correctly either... No Power Values.

Anyone with root can check this folder for me and see if the values inside do seem realistic?
[MENTION=334546]chris79[/MENTION] [MENTION=8058158]Sony92[/MENTION] [MENTION=490110]janjan[/MENTION] [MENTION=3989065]serajr[/MENTION]