[GUIDE] Lock/Unlock/Relock Bootloader Using TWRP With DRM keys - Sony Cross-Device General

Hello Guys!
This Guide Is for those who use Computer,Laptops Rarely BUT For This u will Need A PC for First Step!
Lets Get started.
Requirements :-
Flashtool For PC.
Working TWRP Recovery.
Root Is Obvious.
Procedure :-
-First Backup your DRM Keys By Using Backup TA Tool.
-Then open flashtool and Hit The BLU button.
-Connect device In flashmode when it prompts.
-Then Unlock your Bootloader by the code you have received.
[Note - Unlocking bootloader for first time will wipe out your whole data including internal memory]
-After Unlocking Boot into TWRP recovery.
-Goto>Backup>Select TA and Start the process. (Rename the backup as UNlock BL if u want)
-Now Relock your Bootloader again by using Flashtool By hitting BLU button.
-Boot the phone into System and restore the drm keys [Must!]
-After that Reboot into recovery Goto>Backup>Select TA and BOOT IMAGE Also! and Start the process (Rename the backup as Lock BL if u want)
And Done!
Now there will be two backups Named UNLOCK BL and LOCK BL.
So Whenever you want to flash Kernels OR Custom Roms like AOSP,CM,PAC You wont Need a PC to unlock Bootloader!
And Whenever you want to Get back to stock just flash the Stock PRF or Stock Based Rom and Restore (Lock BL Backup) TA and Boot Image!
(Restoring TA From TWRP will also bring back your drm keys)
IF DRM KEYS ARE GONE THE CAMERA GETS WORST IN LOWLIGHT AND WARRANTY WILL ALSO BE VOIDED.
SO THIS GUIDE CAN HELP YOU IF YOU DONT USE PC MUCH AND IN FUTURE U WONT NEED A PC TO UNLOCK/RELOCK BL AND RESTORE DRM KEYS.
Njoy!
Hit Thanx If I helped!

Thnkx bro,worked perfectly for me

Hello working on "bootloader unlock allowed no" ??

daoskar said:
Hello working on "bootloader unlock allowed no" ??
Click to expand...
Click to collapse
Nope.

Quick question
does relocking your bootloader enables OTA updates from Sony !?

chawlasrijan said:
Quick question
does relocking your bootloader enables OTA updates from Sony !?
Click to expand...
Click to collapse
Yes!

SonyRiFle said:
Yes!
Click to expand...
Click to collapse
Thnx, was just making sure

chawlasrijan said:
Thnx, was just making sure
Click to expand...
Click to collapse
No problem As it restores the drm keys u'll get OTA updates and warranty will also b not voided

Never thought of unlocking and relocking this way
Thanks

sshivampp said:
Never thought of unlocking and relocking this way
Thanks
Click to expand...
Click to collapse
I also nvr thought of...Just gave a try n it worked... I Got this idea A year ago...Shared it now

daoskar said:
Hello working on "bootloader unlock allowed no" ??
Click to expand...
Click to collapse
You can unlock the bootloader by s1tools for xperia

SonyRiFle said:
You can unlock the bootloader by s1tools for xperia
Click to expand...
Click to collapse
Really? On which devices? How exactly?
And I have a question about OP.
Can I change the order the backuping TA partition in TWRP?
So may I make a backup from locked BL and TA before I unlocking my BL? Then I unlocking and making backup from unlocked TA or I just can make in your order? (Unloking - > making backup from unlocked BL -> relocking -> making backup from locked BL)
Thanks in advance.

air001 said:
Really? On which devices? How exactly?
And I have a question about OP.
Can I change the order the backuping TA partition in TWRP?
So may I make a backup from locked BL and TA before I unlocking my BL? Then I unlocking and making backup from unlocked TA or I just can make in your order? (Unloking - > making backup from unlocked BL -> relocking -> making backup from locked BL)
Thanks in advance.
Click to expand...
Click to collapse
First backup Locked BL...It will save your drm keys intact

Related

Restore Bravia Engine After Bootloader Unlocking.( Simple & Easiest Method) [SHARE]

Restore Bravia Engine After Bootloader Unlocking.( Simple & Easiest Method) [SHARE]
Here is the most easiest way to restore bravia engine even though you lost your drm keys..
Note : This mods works 100% and this mod doesn't bring back your lost drm keys but this restores the functions of drm
Required Things Before Starting :
Stock Based 4.3 ROM(.205 kernel/.207kernel) ,Flashtool,Restore Bravia engine zip file,cwm/twrp recovery,Root Explorer..
Step 1. Power off your unlocked phone/locked with no drm keys
Step 2. Follow this if your boot loader is unlocked only.
Open Flash tool and click blu icon now.
Then you will be asked to connect your device in flash mode(Hold volume down and then press power button,then plugin the usb cable and you will get green light) Now you will be asked to relock your boot loader. Click relock and now your boot loader is locked.
Disconnect your device
Step 3: then go to recovery flash the restore bravia engine zip and reboot.
Step 4: Go to album now, you will get "Unfortunately credential manager service has stopped".
step 5 : Using root explorer mount system in r/o mode and go to system->apps and delete credential manager.apk(noteelete credential manager.odex if your rom is odexed).
Step 6: Reboot your device once again now.
Step 7: Once Again go to recovery and flash the same "restore bravia engine.ip" and now reboot again.
(Note: when flashing the restore bravia zip second time , if your rom supports x-reality engine such as existenz ultra rom v4 then flash the x-reality zip along with the restore bravia engine and then reboot)
Step 8: Now go to settings and check whether bravia/x-reality is enabled
Then check the difference in movies and album app.
YIPEE U GOT THE BRAVIA ENGINE BACK..
Note:This thread is a share which i found at xda (http://forum.xda-developers.com/xpe...er-mod-bravia-engine-2-bring-install-t2610923)
Great! thanks for sharing, I already tried a lot of methods, but they only worked on .257 roms, this worked for me (A.1.207 based rom)
stayawake said:
Great! thanks for sharing, I already tried a lot of methods, but they only worked on .257 roms, this worked for me (A.1.207 based rom)
Click to expand...
Click to collapse
Yeah It is the easiest method i found
This method should lose our data or deliver our devices to factory settings ?
Thanks !
No need to lose ur data bro if u r on a stock/stock based rom...Just follow the instructions and u will get ur drm functionality back
No will not loss any data on flashing this mod
Drakomord said:
This method should lose our data or deliver our devices to factory settings ?
Thanks !
Click to expand...
Click to collapse
No need to lose ur data bro if u r on a stock/stock based rom...Just follow the instructions and u will get ur drm functionality back
Okk ! Thanks !
Just one last question... ^^
It only restore the Bravia Engine functionality or noise reduction in the photos too ?
Like this thread : http://forum.xda-developers.com/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-drm-t2930672
Thank you for your reply !
Can bring back be 2 without restore TA? Im not back up TA at first time unlock bootloader... If can bring back be 2, my status phone still unlock or lock? Thank you
Yes,It does
drakomord said:
okk ! Thanks !
Just one last question... ^^
it only restore the bravia engine functionality or noise reduction in the photos too ?
Like this thread : http://forum.xda-developers.com/crossdevice-dev/sony/xperia-z1-z2-z3-series-devices-drm-t2930672
thank you for your reply ! :d
Click to expand...
Click to collapse
yes bro it completely restores the drm functions to your sp :d
Yes it does but first u relock your boot loader
risckyaw said:
Can bring back be 2 without restore TA? Im not back up TA at first time unlock bootloader... If can bring back be 2, my status phone still unlock or lock? Thank you
Click to expand...
Click to collapse
No need of restoring TA partition and i too lost my TA a long ago dude. First relock ur bootloader using the flash tool and then apply this mod.
It will work 100% if u are on stock .205 or .207 kernel........
svvnirmal said:
yes bro it completely restores the drm functions to your sp :d
Click to expand...
Click to collapse
F * ck yeaah ! I'll go flash this tonight and I will give feedback ! :fingers-crossed: :victory:
Thanks ! :silly:
It work !! But care, it disable Xposed Framework. Just need to reinstall the framework.
Look the difference before and after this method.
Thanks bro'! :laugh: :highfive:
Enjoy dude
Drakomord said:
It work !! But care, it disable Xposed Framework. Just need to reinstall the framework.
Look the difference before and after this method.
Thanks bro'! :laugh: :highfive:
Click to expand...
Click to collapse
@svvnirmal
Hey can you please tell me how to restore TA backup. Cuz now i want to unlock my bootloader as i need bravia engine. I took TA partion before unlock my bootolader by TA-9.11. So can you please help me step by step to restore TA partion. I am stock .205
Can someone please tell me how to restore warranty, I don't have my original stock firmware and I am not sure which customization number and region my phone is
yash8796 said:
@svvnirmal
Hey can you please tell me how to restore TA backup. Cuz now i want to unlock my bootloader as i need bravia engine. I took TA partion before unlock my bootolader by TA-9.11. So can you please help me step by step to restore TA partion. I am stock .205
Click to expand...
Click to collapse
Too restore TA.img do this
(1) click and run Backup-TA
(2) select 2 to restore
(3) select 3
Its easy bro..But i didn't take a backup..If failed to take a backup..just use this guide to restore bravia engine
Which rom are u using right now..Unlocked Bootloader or locked?
rdlegy said:
Can someone please tell me how to restore warranty, I don't have my original stock firmware and I am not sure which customization number and region my phone is
Click to expand...
Click to collapse
If unlocked boot loader means u cant get ur warranty back...If u r on locked boot loader revert back to stock by flashing stock ftf files using flash tool..
svvnirmal said:
If unlocked boot loader means u cant get ur warranty back...If u r on locked boot loader revert back to stock by flashing stock ftf files using flash tool..
Click to expand...
Click to collapse
Omg why do you speak when you don't know anything. You can make a ta backup and unlock you bootloader, then you can lock it and restore drm keys. I am asking something way different.
Will this work if I have installed Williams Kernel v8? IMO stock kernel does not have recovery so how to flash the second time without changing kernel?
is it work with bravia engine 2 ?

The right way to get back DRM keys if u unlock the bootloader for custom kernel

WHAT YOU WILL ONLY NEED:
- Windows 7/8 and Flashtool.
- .77 (KitKat) Firmware
- .690 Firmware
- DRM LP fix in your SD card (DRM Function Restoration for Xperia Lolipop V2)
- Androplus LP ADV Kernel (I used Z3_ADV_stock_LP_v2)
- THIS GUIDE WILL RESTORE THE DRM KEYS FOR THE SONY FEATURES TO WORK AGAIN(CAMERA X-REALITY ETC...)
NOT UR ORIGINAL KEYS,
Be sure to have the LP DRM FIX in your SD card prior to flashing stuff.
- If your Bootloader is UNLOCKED, LOCK IT (Relock).
- Don't turn it on. If somehow it turns on, hard turn off it by holding VOL UP and POWER until it vibrates 3 times.
- Flash the .77 FTF (Flashtool).
You're back to .77 (KitKat)
- Let it boot till the language selection screen.
- Power it off.
Now you will be going to Lollipop with old TA features, plus a custom kernel so you can use Recovery.
- UNLOCK your bootloader now and:
- Flash the .690 FTF checking the "TA" box. Which means you are EXCLUDING the TA partition from .690 in order to keep the .77's. This is where the magic lies!
- Right now, you are already on Lollipop.
- Right after flashing it, flash the Androplus ADV LP kernelV2 (get it from the Androplus kernel site). That means you are going to get Recovery functions.
- Right after flashing the kernel, access the Recovery screen (holding VOL UP/DOWN when the Z3's led is purple) and FLASH the DRM Fix which should be in your SD card.
I didn't backed up earlier, Already lost my DRM, can I restore it still :$ ?
shakkirk said:
I didn't backed up earlier, Already lost my DRM, can I restore it still :$ ?
Click to expand...
Click to collapse
yes
look post 1
dennis46419 said:
yes
look post 1
Click to expand...
Click to collapse
U shure? If he did no backup and unlocked bl, they are gone as far as i know
shakkirk said:
I didn't backed up earlier, Already lost my DRM, can I restore it still :$ ?
Click to expand...
Click to collapse
Same question here. It is not clear from the first post whether this restores DRM after losing it.
I'm guessing it will work without original backups as there is no part of the tutorial where you restore from a back up. Looks more like a return to stock from any state.
Not that I'm an expert, last Sony I had was a Z1.
Sent from my Nexus 5
This guide will restore the drm keys for the sony features to work again(camera x-reality etc...)
not ur original keys,,added zip drm restore zip in first post
Deleted
I'am not sure if I got this right, please correct me if I'm wrong:
So using this method I will end up with a custom kernel with custom recovery and still got all Sony DRM features that are usually lost when unlocking the bootloader. How exactly does this work? My guess is that the TA partition is not deleted directly by unlocking the bootloader but when booting into Android by the CredentialManagerService. And this hack simply prevents the CredentialManagerService from deleting the TA partition. Am I right?
Edit: I think I got it wrong. This will only restore the Camer and Display features, but not Miracast. Am I right?
Thenetstriker said:
I'am not sure if I got this right, please correct me if I'm wrong:
So using this method I will end up with a custom kernel with custom recovery and still got all Sony DRM features that are usually lost when unlocking the bootloader. How exactly does this work? My guess is that the TA partition is not deleted directly by unlocking the bootloader but when booting into Android by the CredentialManagerService. And this hack simply prevents the CredentialManagerService from deleting the TA partition. Am I right?
Edit: I think I got it wrong. This will only restore the Camer and Display features, but not Miracast. Am I right?
Click to expand...
Click to collapse
Yes i think, i didn't test miracast
I did this procedure and it seems to have worked. I had some trouble with flashing when the bl was locked. I had to keep it unlocked the whole time. I had to flash several times due to some error messages in the flash tool.
After doing this can I flash a different LP customization (the US one) while keeping the TA information or do I have to downgrade to KK first, then go back to LP, doing this whole process again?
scottjb said:
I did this procedure and it seems to have worked. I had some trouble with flashing when the bl was locked. I had to keep it unlocked the whole time. I had to flash several times due to some error messages in the flash tool.
After doing this can I flash a different LP customization (the US one) while keeping the TA information or do I have to downgrade to KK first, then go back to LP, doing this whole process again?
Click to expand...
Click to collapse
Glad hear that worked, now remember everytime u flash a lolipop rom u have to flash again the drm restore zip and then reboot from recovery
frago21ps said:
Glad hear that worked, now remember everytime u flash a lolipop rom u have to flash again the drm restore zip and then reboot from recovery
Click to expand...
Click to collapse
Thanks. Do I only have to flash Lollipop, excluding TA in Flashtool, then the DRM restore zip? Or do I have to go back to KitKat each time?
scottjb said:
Thanks. Do I only have to flash Lollipop, excluding TA in Flashtool, then the DRM restore zip? Or do I have to go back to KitKat each time?
Click to expand...
Click to collapse
No just flash the lop without ta in flastool, no need to go back
frago21ps said:
No just flash the lop without ta in flastool, no need to go back
Click to expand...
Click to collapse
Question, how can you relock your bootloader if you don't have your TA backup?
Sent from my D6603 using XDA Free mobile app
ondrejvaroscak said:
Question, how can you relock your bootloader if you don't have your TA backup?
Sent from my D6603 using XDA Free mobile app
Click to expand...
Click to collapse
From flastool
frago21ps said:
From flastool
Click to expand...
Click to collapse
Of course
Dumb me.
Sent from my D6603 using XDA Free mobile app
what if i directly flash the zip from cm12's recovery maintaining the bootloader locked? (lazyness over 9000)
Anyone tested going from .77 KK to 23.1.A.0.726 ? There's no .690 for D5833
Waiting for confirmation that the AndroPlus kernel will wok on .726.

Relocking Bootloader

Is there a way to relock bootloader? I tried flashing stock rom via TWRP but the prompt still shows that Device cannot be trusted blalbla unlocked.
Can anyone give me a way how to relock my BL? I also tried SRK tool with relock bootloader with my Unlock code, but it doesnt work.
Thanks
EDIT: Please lock thread. I tried locking via eRecovery and it worked. Thanks
Update your device. Use the full update rom like b161, 201 or whatever you like. That will remove the unlocked bootloader and root as well.
​
ErvinSoliven said:
Update your device. Use the full update rom like b161, 201 or whatever you like. That will remove the unlocked bootloader and root as well.
Click to expand...
Click to collapse
are u tested it?
mi.alkhamis said:
​
are u tested it?
Click to expand...
Click to collapse
Yes is tested: at any update (via dialer or three key pressed) with stock firmware, you lose root, twrp and unlocked bootloader (if you have root, twrp and bootloader unlocked).
gtdaniel said:
Yes is tested: at any update (via dialer or three key pressed) with stock firmware, you lose root, twrp and unlocked bootloader (if you have root, twrp and bootloader unlocked).
Click to expand...
Click to collapse
thanks for quick reply/
another question .
i have vns-l21c900b140 .Which ROM root and boot loader problem solved ?
and i download vns-l21c432b160 can i flash this file without any problem such as Antenna ؟i
You have to debrand your phone to make it C432 from C900. Read around forum...

Camera broken after Bootloader Unlock & Relock

Yesterday i've unlocked the bootloader and try AOSP.
Then i go back to stock rom and relocked the bootloader.
Now camera app always say, another application uses the camera and won't start.
alternative camera apps also don't work.
don't backup any drm keys.
is there any chance to get it working?
[-silver-] said:
is there any chance to get it working?
Click to expand...
Click to collapse
You'll need to flash a stock rom and wipe everything in the process.
I had the same problem and flashing using the flashtool with all wipe options checked didn't fix the problem. Any other ideas?
mistarose said:
I had the same problem and flashing using the flashtool with all wipe options checked didn't fix the problem. Any other ideas?
Click to expand...
Click to collapse
I would assume that relocking it without the DRM keys has broken it. To rewrite the TA backup img to the phone you have to use flashtool version 922.3 If I was in your position with or without a drm backup I would try using that version of the flashtool to flash a FW and try the relock procedure again to see if it makes a difference. Have you unlocked it again to see if it brings the camera back?
XperienceD said:
I would assume that relocking it without the DRM keys has broken it. To rewrite the TA backup img to the phone you have to use flashtool version 922.3 If I was in your position with or without a drm backup I would try using that version of the flashtool to flash a FW and try the relock procedure again to see if it makes a difference. Have you unlocked it again to see if it brings the camera back?
Click to expand...
Click to collapse
Ok I unlocked the device again using Sony Mobile Flasher. I'm now flashing an Android 6 ftf file from the UK. I have the TA backup img but am not sure how to restore it. Apparently the Backup TA version 1 had a restore option in the CMD menu. But all the 2nd version does is backup a TA partition key from what I can tell.
Any help restoring the key would be greatly appreciated.
Edit: Ok now I've booted up without locking the boot loader and the camera is working. So now I should be able to lock the bootloader and have it stay working right? But how do I do that?
mistarose said:
So now I should be able to lock the bootloader and have it stay working right? But how do I do that?
Click to expand...
Click to collapse
Lets see. Download Flashtool version 9.22.3 and download Rootkernel, use RK to create a DK.ftf from your TA.img then flash that using the 9.22.3 version of the flashtool. To create a DK.ftf open a cmd window in the Rootkernel folder and enter flash_dk TA.img DK.ftf.
Thank you for the help.
I was using a higher version of the Flashtool so I found the 9.22.3 version and got that installed. I found the Rootkernel and used it to create a DK.ftf successfully from my TA.img.
I flashed that successfully and rebooted the phone but it didn't work. This also didn't automatically relock the device like I read it should of.
I then started over by flashing the Android 6.0 ftf file again. Then I used the flashtool to relock the device. Finally, I flashed the DK.ftf file one more time.
I just booted up the phone and now the camera isn't working with the same error I had before. I also checked the security menu of the phone and it still says the DRM files are not there.
I'm really not sure why it's not working.
EDIT: See below.
mistarose said:
I then started over by flashing the Android 6.0 ftf file again. Then I used the flashtool to relock the device. Finally, I flashed the DK.ftf file one more time.
Click to expand...
Click to collapse
Lets try one last thing. From reading the threads here apparently flashing the DK.ftf is only for those with an unlocked BL wanting to keep DRM functions so places the TA in a location that DRM-fix kernels can pickup. To rewrite the original partition you have to do the following...
shoey63 said:
CONFIRMATION OF TA RESTORE!
- Unlocked bootloader
- Flashed TWRP
- Pushed TAbackup.img (I renamed it) to /data/local/tmp
- Did
Code:
adb shell dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA
- Rebooted
- Everything back as it was. Original TA restored and DRM keys all active:victory:
shoey63 said:
Then flash a stock ftf.
Click to expand...
Click to collapse
NOTE/EDIT: Due to dm-verity, you cannot restore TA on a rooted phone (Z3+ onwards). It won't boot up. Boot and system have to be pure untouched stock.
Click to expand...
Click to collapse
...if this way fails then it's time to talk to Sony or just run an unlocked BL permanently.
Flashing DK.ftf isn't enough. You need to make a boot.img with DRM fix as well using rootkernel.
shoey63 said:
Flashing DK.ftf isn't enough. You need to make a boot.img with DRM fix as well using rootkernel.
Click to expand...
Click to collapse
They're trying to relock but the camera stops working when they do so just trying any method at this point.

Relocking bootloader. Is it possible to keep TA?

Hi!
I was wondering what will happen with the drm keys and TA partition if I would want to relock my bootloader?
I used the dirtycow method to back up and restore my TA partition when I unlocked the phone, but will the camera and other TA related stuff still work if I relock it?
In other words, is it possible to return the phone into "factory state" if it has been unoocked with the TA partition backed up, or does relocking bootloader also empy TA and erase the DRM keys?
vofferz said:
Hi!
I was wondering what will happen with the drm keys and TA partition if I would want to relock my bootloader?
I used the dirtycow method to back up and restore my TA partition when I unlocked the phone, but will the camera and other TA related stuff still work if I relock it?
In other words, is it possible to return the phone into "factory state" if it has been unoocked with the TA partition backed up, or does relocking bootloader also empy TA and erase the DRM keys?
Click to expand...
Click to collapse
Search XDA for relock bootloader. It's been a while and I can't remember exactly, but if you have your backup you can restore it and relock bl somehow.
https://www.google.com/search?ei=R5...13i30j0i67j0i22i10i30j33i22i29i30.lwUunOAEvP4
BTW - practically speaking, don't feel the need to relock it. If you have your TA restored, it's just as good as new. Only if you need to send it to Sony and need it to be locked for warranty purposes.
I was thinking for the possibily to relock the bootloader to get OTA updates working if I want to give the phone to someone not that into tech, who doesn't need root. But I don't know if the phone is updated by Sony anymore anyway...
vofferz said:
I was thinking for the possibily to relock the bootloader to get OTA updates working if I want to give the phone to someone not that into tech, who doesn't need root. But I don't know if the phone is updated by Sony anymore anyway...
Click to expand...
Click to collapse
I think September was the last we'll see for XC...

Categories

Resources