problem with restore ta partition - drm keys - Xperia Z1 Compact Q&A, Help & Troubleshooting

hi guys,
i use lineage os, lineage-14.1-20170711-UNOFFICIAL-amami.
i did all the steps, and made a backup of ta via backupTA_v2.
the file has the right size.
now, i try to restore the keys.
i used dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA from adb and twrp.
after that, the device stuck.
black screen, no led, cant boot.
i need to reflash the twrp, but i think there is something wrong.
also i cant set the camera to video mode, only black screen.
i think, this came cause of the missing drm keys?
thankfull for helping me ...
ronny

update: unlock bootloader does also help
but no front kamera and no video possible
i also do not have the service menu, so i dont know, if the keys are working
thanks,
ronny
tux4you said:
hi guys,
i use lineage os, lineage-14.1-20170711-UNOFFICIAL-amami.
i did all the steps, and made a backup of ta via backupTA_v2.
the file has the right size.
now, i try to restore the keys.
i used dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA from adb and twrp.
after that, the device stuck.
black screen, no led, cant boot.
i need to reflash the twrp, but i think there is something wrong.
also i cant set the camera to video mode, only black screen.
i think, this came cause of the missing drm keys?
thankfull for helping me ...
ronny
Click to expand...
Click to collapse

hi ... nobody any idea?
did i understood something wrong?
i think it should possible to restore the drm keys und lineage os, right?
thanks,
ronny
tux4you said:
update: unlock bootloader does also help
but no front kamera and no video possible
i also do not have the service menu, so i dont know, if the keys are working
thanks,
ronny
Click to expand...
Click to collapse

Restoring DRM keys locks the bootloader. That means you can't use any custom rom or recovery after that only stock firmware.
If you want to use your DRM keys with custom rom you have two options:
[PoC][Work in progress] Trim Area Proof Of Concept @ https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893
or
[Z~Z5 Series][EXRxTHS]SONY DRM FUNCTION RESTORATION FOR UB DEVICE | Z3 lines support! @ https://forum.xda-developers.com/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-drm-t2930672
Also in [ROM][Nougat][3] Unofficial LineageOS 14.1 thread there is stated under Bugs/Issues that:
HW overlay needs to be disabled for some full screen video applications and front camera
Camera may not work 100%

Hi
Just a quick, semi-related question:
If I have already unlocked the boot loader (but still with stock rom, untouched), I've lost my DRM keys, right? Or can I still make a backup?

Fesserd said:
Hi
Just a quick, semi-related question:
If I have already unlocked the boot loader (but still with stock rom, untouched), I've lost my DRM keys, right? Or can I still make a backup?
Click to expand...
Click to collapse
yes you lost them, "Certain pre-loaded content on your device may also be inaccessible due to the removal of DRM security keys" (sony developers site)

Related

[Q] Cannot encrypt xperia z1c phone, just reboots

Hi. I wanted to try Cyanogenmod. So i unlocked my bootloader and went to install it successfully, only to realise that i have not backed up my TA and DRM (i know...).
However, i realised that i prefer stock ROM, so i flashed a FTF using Flashtool, and relocked the bootloader.
However i have noted that i cannot encrypt my phone (required for work Exchange email). Every time i enter the password to start encryption, the phone reboots and gets me back to lock screen.
I have tried many different FTFs and always same result.
I have tried unlocking bootloader again, no luck (although did not warn me to wipe off phone this time).
Is that related to the lack of DRMs??? Any solution? I am despairing and i need the phone for work email....
Thanks.
mkhairym said:
Is that related to the lack of DRMs??? Any solution? I am despairing and i need the phone for work email....
Thanks.
Click to expand...
Click to collapse
Seems so, but nothing you can do without a backup. http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/
Thanks for your reply.
However, on this page it says nothing about ability to encrypt the phone?
Any help would really be appreciated.
I'm using encryption with an unlocked bootloader (and RomAur), so this cannot be the reason. I can only say that it works with firmware 757.
Just installing now and i will see if this solves the issue. I will report back once tried.
Thanks
Followed your instructions and all went well. Now the phone can encrypt, even when i re-installed the stock 757 ftf. Functional phone again! Many thanks.
mkhairym said:
However, on this page it says nothing about ability to encrypt the phone?
Click to expand...
Click to collapse
"The secure user data partition may also become inaccessible", I thought might have been your issue, seems not.

[Z5 PREMIUM] Restoring DRM Keys

Hi guys, I unlocked my bootloader a long time ago (maybe August or September) and I made a backup of the DRM Keys (TA Partition). After using it, everything seemed to work fine including the camera quality etc. However, I have recently noticed it is not as good as it was first. How do I restore the DRM keys now? I have them, but I don't know how to, and will my phone mess up even more or not?
When doing the backup which method did you used ?

[Magisk] Root for the Galaxy S10 Series

Here comes official Magisk support for the Galaxy S10!
Let's get Magisk to kick start the development of these Samsung devices!
Link to Instructions
Carefully read through everything in the page linked above! Follow the instructions closely so you don't end up bricking your device
Technical Details
Google enforces all devices that ships with Android 9.0 to use system-as-root in part of "Project Treble", so Samsung finally introduced their own "flavor" of the implementation. More details regarding system-as-root can be found in the official Google dev site. Samsung is using the A-only system-as-root setup, meaning that its boot image will only contain the kernel binary without ramdisk included. Similar setup has already been deployed on many new devices, and the solutions for those devices are rather simple: add a new ramdisk section into the boot image and hexpatch the kernel to always use ramdisk as rootfs. However in Samsung's case, the bootloader simply does not load anything other than the kernel binary to the memory, meaning no matter what we do the kernel will always use the system partition as root directory. This leaves us no option but to install Magisk onto the recovery partition.
Installing to the recovery partition have its own issues: first is that a service called "flash_recovery" will run when the system starts up, which will restore the recovery image back to stock on startup. This is unacceptable because not only does it uninstall Magisk in the process, the data encryption key will also be changed due to fact that Samsung's data encryption keys are tied to the bootloader status and boot/recovery image signatures, and thus causing the device unable to boot in following reboots unless factory reset. The solution to this problem is to simply repack the boot image to remove the binary integrity and also the signature of the partition. The second issue is that since Magisk and recovery shares the same partition, how can we actually boot into recovery? (e.g. to factory reset your device, or have custom recovery co-exist with Magisk) Fortunately a solution that detects button key presses is introduced, which details are already provided in instructions.
To make matters even worse, Samsung introduced a "VaultKeeper" service, which adds another "lock" on top of the OEM lock of the bootloader. By default the service will "relock" the bootloader after data is wiped. Only after the initial setup will it verify the OEM lock option and changes the bootloader state accordingly. If you are running custom firmware with stock system, DO NOT try to wipe data or else you might end up bricking your device due to vaultkeeper locking your bootloader up, which will eventually lead to bootloader refusing to boot because unofficial partitions are detected.
For custom ROM developers, the first few things you would want to remove is VaultKeeper to protect your users from bricking their devices. For stock ROM users, just make sure to always boot to Magisk after a data wipe, or never power off your device before finishing the initial setup and verify OEM lock is enabled.
thx
Yay.
The best day of my life!!
Can I ask, when we install Magisk what sammy stuff will be broken? I understand Knox will be tripped but what 'features' will still be available.
Does the fingerprint still work for instance
Amazing work though, well done buddy
Fantastic!
I hope people carefully read those instructions!
ok, who's trying it first on an European S10+ ?
..
Amazing! Is this for unlocked Snapdragon too?
S9 Exynos not install
On S9 the installation does not give error, but on restart Magisk is no longer installed.
ooonea said:
On S9 the installation does not give error, but on restart Magisk is no longer installed.
Click to expand...
Click to collapse
I'm aware of this issue
cant even boot into download mode with the way you have given... is there a step missing?
ahh, turn the phone off, USB connected and press Bixby and Volume Down.
Fix?
topjohnwu said:
I'm aware of this issue
Click to expand...
Click to collapse
Will you fix it?
A couple of questions:
1. What will happen if I boot from boot partition after installing magisk? What steps will be needed to recover from that?
2. Why final wipe after installing magisk is needed?
ooonea said:
Will you fix it?
Click to expand...
Click to collapse
What an odd question... obviously.
I got some questions about Safetynet
1. Is Safetynet still passing with this method when you boot to system with magisk?
2. Also if you boot to system without pressing any button, so system without magisk, is Safetynet passing or failing?
Thanks for your hard work.
Download Mode doesn´t work for mee
is there a step missing?
Memento_Mori said:
Download Mode doesn´t work for mee
is there a step missing?
Click to expand...
Click to collapse
The cable must be in too
Thanks,
I have one question, after install Magisk can I still install OTA update ?
tiho5 said:
The cable must be in too
Click to expand...
Click to collapse
I know, but it doesn´t work for me too

[HELP REQUEST] WILL PAY TO WHOEVER HELPS ME GET THROUGH THIS SOFTBRICK

.
rodagola said:
Hello everyone on xda, please bare with me. Here's my story
I own a Redmi Note 8 pro, chinese rom model. It was running miui 11.0.3 over android 9 If I recall correctly.
Ok so... I was tired of some of the china apps pushing their notifications over and over and auto installing stuff, so I looked up how to apply adb commands to remove such bloatware, which was a fairly simple process. I copied and pasted a list of safe stuff to delete I found around some forums.
then... there were some other packages I checked out using an app called "app inspector", which directly tells you which app is under which package (totally useful for this purpose).
I tried to be careful not go overboard since I don't have any root access, or custom recovery, and wasn't really planning to have these, just wanted to keep this as my simple daily driver cellphone, but also perform this little maneuver to get rid of some bloatware.
little did I know, I was about to somehow softbrick it. More info: I did not use a screen lock method other than the "swipe up".
Ok, so I uninstalled some packages I cannot remember exactly how they went, but they had the terms "xman" and "yman" on them I think, I wasn't so sure about them because I looked them up on the web yet they didn't appear anywhere. I think they went something among the lines of "com.android.miui.xman". I also uninstalled 2 or 3 more, but after googling, they seemed unsuspecting.
Anyways, I'm aware there's a command to reinstall the packages because they're still on the phone's ROM image. That is in case I had to restore anything back to normal. Turns out I later rebooted the phone and when it launches the lock screen, I keep swiping up but it won't take me over to the actual MIUI launcher. The screen is frozen on the lock screen.
I'm not freaking out at this time because I still tried to connect the device to the pc, and it still shows as connected, I then go to the adb console and type "adb devices", it is still recognized, however, it says next to it that it is unauthorized... damn it. So now I might not be able to run the commands that allow me to reinstall the exact packages that are rendering the phone softbricked (I guess), plus I'm not really sure which package caused this.
After about a minute or two on the lock screen, the phone takes me to the "redmi-recovery 3.0",
which displays 3 options:
Reboot to system: which basically forms a loop
Wipe date: godforbid... really don't want to do it since I likely had many files not backedup
Contact miassistant: not sure what to do with this, says "pcsuite.mi.com" at the bottom
on the miassistant option you can apparently sideload stuff, idk how to go about this, maybe it allows me to install a slightly upgraded ROM, which in turn will work the same as if it was an OTA update (so it will keep my data as it was instead of wipe)? Because the point is not to erase my user data!!
I'm not sure how to feel or what to do without losing my pictures, notes and documents
I have hopes this situation can be turned around back to normal, and like the title implies... I'm WILLING to PAY you through paypal or something to WHOEVER offers to guide me through in the best way possible. Please if you have the knowledge/experience don't hesitate I'll also be grateful timelessly.
I'm not an expert at these scenarios so I might as well ask on xda where most are really skilled! Thanks in advance to those amazing souls
Click to expand...
Click to collapse
tldr;
If you can boot into fastboot mode you can just flash a official MIUI fastboot ROM:
Xiaomi Firmware Updater (where you can download official MIUI ROMS): https://xiaomifirmwareupdater.com/
This is the current hard unbrick method: https://telegra.ph/Installing-Redmi-Note-8-Pro-firmware-via-SP-Flash-Tool-01-21
It should also work in your case and there's even a video guide.
This is another video guide for fixing a hard brick:
Both methods above will format your phone though (afaik all data will be lost).
Compass.
.
rodagola said:
are these the kind of roms that you unzip and have the BL, AP, CP, CSC files? I could try that, but I've heard installing home_csc will not override/wipe my personal data. If this is what you meant, can you confirm? Or do you reckon these linked video tutorials would not wipe the data?
Click to expand...
Click to collapse
Nope, it doesn't.
If you can boot into Fastboot, flash the ROM using Mi Flash, otherwise, use this tutorial:
.
Compass Linux and juliusjr have told you the method, so I will just add supplemential infos.
In your case, I think simple upgrade will do the trick, dirty flash is applicable both via fastboot flash (mi flash) and recovery flash (the mi assistant method). If you want to stop the ads, I will recommend you to unlock your bootloader, move to global, root, and use an adblocker (a bare minimum config, in trade of some bangking apps being blocked).
I don't know the corresponding version for miui china rom, but in global rom, prior 12.0.0.7 (the one with the early 2021 security update), you can dirty flash back and forth while keeping your data.
.
rodagola said:
Hi, thanks for your info, I would like to try the mi flash tool as I've been told before the stock recovery thing has less chances of working. However, I had dev options turned on before but didn't manage to turn on the "OEM unlock" option, will flashing original ROMs work this way? or did I need that option toogled on? That's my last doubt, and thanks a lot. Btw, the China ROM this Redmi N8P had never ever showed me any ads, but thanks a lot as well for such input
Click to expand...
Click to collapse
You still have a locked bootloader? (How do I know? You will see "Unloked" on the bottom of the screen everytime your device reboots and showing mi logo if your device is unlocked)
Hmm, mechanically it work like normal ota update. Full recovery update will ony erase nessesary partitions (system, boot, and some other things) while keeping your data intact. So doing this to your phone technically safe. You can do this with MiFlashPro, do a recovery update using a recovery rom (the 2 gigs one) greater than your current MIUI version. But please bear in mind that I have never done this before to a locked phone. A same distribution version IS A MUST (i.e. global with global).
Oh and it will need you to log in to your xiaomi account. My guess is you need the flash permission open for your account (if you have unlocked your phone you shouldn't have a problem). I have never flashed with an account that never have been used to unlock a bootloader, so I might be wrong.
If your phone is bootloader unlocked, Mi Flash is the least demanding and it can retain your data with "save user data" in the bottom right corner option on, regardless your miui version (but I think there will be some problem with installed apps if you downgrade from A10 to A9).
Hope this help.

Question How can I recover data from device stuck on starting page?(PE+ ROM)

Recently I dirty flashed PE+ ROM into my moto g40 fusion in a hurry without looking at the developer instructions(which clearly says I should clean flash). So ,now my phone is stuck on starting screen with a faded Google logo.I did not even take any backup(Silly Me)!
But somehow I am able to turn on flashlight by long pressing lock button(It was previously set ). I even hear alarms. I think That means phone is awake but for some reason the display is just a grey Google logo
How to fix this?What should I do?‍
I think performing a factory reset might boot the device.But Can I somehow recover the data?
@arsradu Can you please help me out?
tableware said:
Recently I dirty flashed PE+ ROM into my moto g40 fusion in a hurry without looking at the developer instructions(which clearly says I should clean flash). So ,now my phone is stuck on starting screen with a faded Google logo.I did not even take any backup(Silly Me)!
But somehow I am able to turn on flashlight by long pressing lock button(It was previously set ). I even hear alarms. I think That means phone is awake but for some reason the display is just a grey Google logo
How to fix this?What should I do?‍
I think performing a factory reset might boot the device.But Can I somehow recover the data?
@arsradu Can you please help me out?
Click to expand...
Click to collapse
Hello,
I don't have the phone anymore. So this is general info.
For as far as I know, you can't recover the data. However, Google does automatical backups at regular intervals, if you let it. So...chances are you might already have a backup. You could try to use it after factory resetting your phone.
Something else you could try...is flashing back the older version you had on top of this one. Maybe it will let you boot into it successfully so you can get access to your data. After that, I would suggest taking a backup, if you don't have one already.
And if you want the newer version again, make sure you follow the instructions given by the developer and see if that works.
I'm not aware of any other way.
Yeah, it could be that the phone is alive, but...if you can't interact with it...it doesn't help.
Thank you arsradu for replying..
arsradu said:
Hello,
I don't have the phone anymore. So this is general info.
For as far as I know, you can't recover the data. However, Google does automatical backups at regular intervals, if you let it. So...chances are you might already have a backup. You could try to use it after factory resetting your phone.
Something else you could try...is flashing back the older version you had on top of this one. Maybe it will let you boot into it successfully so you can get access to your data. After that, I would suggest taking a backup, if you don't have one already.
And if you want the newer version again, make sure you follow the instructions given by the developer and see if that works.
I'm not aware of any other way.
Yeah, it could be that the phone is alive, but...if you can't interact with it...it doesn't help.
Click to expand...
Click to collapse
I knew you don't have the phone anymore.I read that in the conversations.But I was kinda desperate.So, Sorry that I bothered you.
I hadn't allowed Google to backup my data except for photos and videos.
Flashing the older version of the rom on top of it was the first thing I tried,But the PE Recovery said the data was corrupted , didn't let me to boot into it and it wanted me to factory reset ‍. So in the hope of keeping the data I reflashed the same rom.
But, the exact same advice from you today gave me an idea.I know the data is intact in the device, If I somehow can backup this ,I might restore it in a clean flashed rom!
So I went through other XDA threads,watched some YouTube videos.
Then I boot it into twrp(again, thanks to your tutorial) took a backup of only data,wiped everything, flashed the previous version and restored the backup.And now I am writing from my own device🥹🥹.
But the problem is partially solved.I lost some important files from internal storage (as expected) .When I tap, I cannot open important settings options like individual app info, developer options,restore and backup etc .I can't swipe down the quick settings menu.When I try to toggle night light the display is just getting dark altogether.
tableware said:
Thank you arsradu for replying..
I knew you don't have the phone anymore.I read that in the conversations.But I was kinda desperate.So, Sorry that I bothered you.
I hadn't allowed Google to backup my data except for photos and videos.
Flashing the older version of the rom on top of it was the first thing I tried,But the PE Recovery said the data was corrupted , didn't let me to boot into it and it wanted me to factory reset ‍. So in the hope of keeping the data I reflashed the same rom.
But, the exact same advice from you today gave me an idea.I know the data is intact in the device, If I somehow can backup this ,I might restore it in a clean flashed rom!
So I went through other XDA threads,watched some YouTube videos.
Then I boot it into twrp(again, thanks to your tutorial) took a backup of only data,wiped everything, flashed the previous version and restored the backup.And now I am writing from my own device🥹🥹.
But the problem is partially solved.I lost some important files from internal storage (as expected) .When I tap, I cannot open important settings options like individual app info, developer options,restore and backup etc .I can't swipe down the quick settings menu.When I try to toggle night light the display is just getting dark altogether.
Click to expand...
Click to collapse
Glad you managed to find a way! Good job!
My suggestion would be to make a backup, while you still can, and do a clean installation of the rom.

Categories

Resources