Bootloader - MDA II, XDA II, 2060 ROM Development

Hi,
How do I display my device bootloader? How would I know which version I have?
Thanks

push together :; POWER+NAVIKEY+RESET
if you do it, you will loose all program & data, do backup first !!!!.

Thank You

Related

[Q] xRecovery Question

I have 2 questions.
1st question: I would like to install Championswimmer's Xperia S port rom (http://forum.xda-developers.com/showthread.php?t=1516960) to my Xperia X10i, but I don't want to lose my contacts. So I made a backup on xRecovery.
When I install the ROM and everything else, how do I use xRecovery to get my settings/data/call logs back after it's installed? I think going into xRecovery>Backup and Restore>Restore should do it. So any tips?
2nd question: How do I check if my phone's bootloader is locked or unlocked? Can I use the locked bootloader method of installing his if my phone happens to be unlocked? I tried using s1tool to identify but for some reason it wouldn't work. Are there any other methods?
Thanks.
Xperia X10i
2.3.3 Gingerbread
Wolfxperia Rom
1) If -you- have not unlocked your bootloader it's locked. To make sure it's locked u can find a tool in the unlock bootloader thread which will tell u, if it's locked/unlocked..
2) If you're on stock ROM, I suggest u to backup apps (with data) using Titanium Backup (& not recovery).. And backup sms, contacts, bookmarks, call log, etc with backup & restore application (from se)
Good luck
How would I backup everything else? I got Titanium Backup and it worked great for apps. Could you give me a link to SE's backup and restore for contacts, call logs, everything else, etc. ?
Hey,
here is the Link
http://www.elita-clan.com/downloads/backup_and_restore_v010935.apk
If you only want to save your contacts, you can easily make a backup via the Contact export and then save the created vsc or vcs file on your computer. Easiest way- after that you can easily import contacts. If you don´t like this method , use the above ones.
If you want to check your Bootloader download the S1 tool :
http://forum.xda-developers.com/attachment.php?attachmentid=713763&d=1315496032
Make sure you are admin and you have installed ADB SEMC(Gordons Gate) drivers. Then it will work 100%ly,
If you want to unlock your bootloader just easily download newest flashtool from Androxyde and Bin4ry. After that go to plugins and run and you will see the magic.
For this rom you don´t need an unlocked bootloader - simply install this
usrers on locked bootloader/stock sony kernel are to flash this zip http://forum.xda-developers.com/attachment.php?attachmentid=701480&stc=1&d=1314391453 after installing rom everytime
If I helped don´t be shy and hit the thanks button

[Q] Just rooted, if I upgrade will I lose root though?

So today I managed to root my Z2
Following advice from o0 Matt 0o in another thread, I downgraded from 4.4.4 to 4.42 using flashtool, then using the rootkitXperia_20140719 install.bat the phone is now rooted (for some reason it would not find adb even though running adb from a cmd prompt worked!)
Anyway, now I am on 4.4.2 with root, if I upgrade back to stock 4.4.4 rom will I lose the root?
EDIT: I have installed dual recovery, is there a pre packaged rooted rom for:
Android 4.4.4
23.0.1.A.0.167
United Kingdom - 3 - 1281-2574
Click to expand...
Click to collapse
Dont really want to create a rooted package myself, the steps can be confusing
Thanks!
Since you have dual recovery on 4.4.2 you can use the pre-rooted package by niaboc79 (can be found in the Android Development section) or any pre-rooted stock based ROM based on 4.4.4. It is all down to your preference.
I doubt there will be a 3 branded pre-rooted package either.
Actually you're right I should just get one of those roms which is not branded which would look better anyway
One last thing what is the steps to backup ta partition? At some point I will unlock bootloader but don't want to lose the dry keys
Cheers
Ned_Flanders said:
Actually you're right I should just get one of those roms which is not branded which would look better anyway
One last thing what is the steps to backup ta partition? At some point I will unlock bootloader but don't want to lose the dry keys
Cheers
Click to expand...
Click to collapse
In the Sony cross device development section there is the backup TA tool, simply use that. Also, make sure to upload your backup to a cloud service or something like that, in case your hard drive goes kaput and you need it to relock your bootloader.
Please remember that unlocking the bootloader wipes the internal SD card (not the user one). Also, restoring the TA backup relocks the bootloader so make sure you are on a stock ROM and kernel when you restore the backup.
gamer649 said:
In the Sony cross device development section there is the backup TA tool, simply use that. Also, make sure to upload your backup to a cloud service or something like that, in case your hard drive goes kaput and you need it to relock your bootloader.
Please remember that unlocking the bootloader wipes the internal SD card (not the user one). Also, restoring the TA backup relocks the bootloader so make sure you are on a stock ROM and kernel when you restore the backup.
Click to expand...
Click to collapse
Cool thanks for the tips :good:

[ROOT][UNLOCK WITHOUT WIPE] or Reset Tamper-/Unlockbit for OnePlus 2

Requirements:
[ROOT REQUIRED]
[OEM Unlocking must be allowed under the developer options before flashing this file AND stay activated
as long as you want the device to stay unlocked (OnePlus implemented security features which locks the device on reboot with the switch off)]
* I am not responsible for bricked devices, thermonuclear war, or you getting fired because the alarm app failed.
* Please do some research if you have any concerns about this method before using it!
* YOU are choosing to make these modifications.
* And if you point the finger at me for messing up your device, I will laugh at you.
Click to expand...
Click to collapse
WARNING: THESE FILES ARE BASED ON THE OXYGEN OS 2.1.1 FIRMWARE, PLEASE ANALYZE YOUR DEVINFO IF THE VERSION IS DIFFERENT TO MAKE SURE NOT BRICKING SOMETHING!
I have not upgraded my device to 2.1.2 yet because there have been some issues with the newest firmware.
Tested and confirmed working on:
OxygenOS 2.2.0 - thanks to @pryggi
OxygenOS 2.1.1
Hydrogen OS 1.2.0 - thanks to @fareed_xtreme
I looked at this thread, thanks to Naman Bhalla for this great work.
and found out that the file attached to this post is the answer to my problem, described in another thread.
After the whole day of work analyzing and dumping and saving via adb from my device to the pc and the other way around i finally did it.
On the frist screenshot is my situation before flashing the new devinfo, on the second after flashing the devinfo from the thread mentioned above.
By changing the bits with a Hex Editor of your choice, or by flashing the files below via dd:
Code:
dd bs=4096 of=/dev/block/bootdevice/by-name/devinfo if=/sdcard/oneplus2-devinfo-factory.img
The output should look like the following:
Code:
0+1 records in
0+1 records out
1024 bytes transferred in 0.005 secs (204800 bytes/sec)
You can restore your OnePlus 2 to a factory state while still having root or unlock your phone again without having to wipe it! :highfive:
Credits:
Naman Bhalla
Also to segv11 who already managed this in the OnePlus One and Nexus devices
wow nice job m8
sent from rooted phone
Modified the same location using a HEX Editor (root) whilst on the Hydrogen OS 1.2.0 and I must say it works.
Screenshot Attached. Good Find @thedropdead
Thank you and thanks for testing it out on Hydrogen OS @fareed_xtreme
It is not a Revolution like CM13 on the 1+2, but its helpful for people like me who use their developer devices as daily drivers and still want to lock and unlock the device because of security reasons without wiping the whole device.
fareed_xtreme said:
Modified the same location using a HEX Editor (root) whilst on the Hydrogen OS 1.2.0 and I must say it works.
Screenshot Attached. Good Find @thedropdead
Click to expand...
Click to collapse
thedropdead said:
Thank you and thanks for testing it out on Hydrogen OS @fareed_xtreme
It is not a Revolution like CM13 on the 1+2, but its helpful for people like me who use their developer devices as daily drivers and still want to lock and unlock the device because of security reasons without wiping the whole device.
Click to expand...
Click to collapse
I needed it for resetting the tamper flag. I have certain issues with my phone and might have to return it in the near future and hence this was important. So thanks again.
fareed_xtreme said:
I needed it for resetting the tamper flag. I have certain issues with my phone and might have to return it in the near future and hence this was important. So thanks again.
Click to expand...
Click to collapse
Thats another good thing to do with it
It was a pleasure to help you out mate
Thanks, I was waiting for this for securing my OPT. Has anyone tested, if it works also on OOS 2.2.0?
Just to clarify, the dd command should be executed in TWRP console?
Would be cool if someone could make an app for this like the Nexus devices have:
https://play.google.com/store/apps/details?id=net.segv11.bootunlocker
pryggi said:
Thanks, I was waiting for this for securing my OPT. Has anyone tested, if it works also on OOS 2.2.0?
Just to clarify, the dd command should be executed in TWRP console?
Would be cool if someone could make an app for this like the Nexus devices have:
https://play.google.com/store/apps/details?id=net.segv11.bootunlocker
Click to expand...
Click to collapse
Hello pryggi,
It should also work on OOS 2.2.0, you could check that by dumping the partition (by reversing the dd command) like this:
Code:
dd bs=4096 if=/dev/block/bootdevice/by-name/devinfo of=/sdcard/oneplus2-devinfo-oos220.img
And looking at the file in the hex editor for differences or by posting it here and i can check it for you.
I have executed the dd command from ADB Shell with the Phone connected via wireless ADB.
You can also execute dd in the Android Terminal Emulator App.
Thanks for your reply. My device is already unlocked. As I don't have a computer with ADB/drivers at hand right now, I managed to run the dd command in Terminal Emulator app after elevating with su. Result is attached. Viewing it in hex seems to confirm, that at least the locking bit seems to be in the same position.
pryggi said:
Thanks for your reply. My device is already unlocked. As I don't have a computer with ADB/drivers at hand right now, I managed to run the dd command in Terminal Emulator app after elevating with su. Result is attached. Viewing it in hex seems to confirm, that at least the locking bit seems to be in the same position.
Click to expand...
Click to collapse
Thank you for the Dump, i can confirm that the bit is at the same position and the unlock bit is the same.
I compared the file attached at my first post with yours and they are identical ( see attachment, sorry its german, meaning is they are identical).
So by flashing the factory.img from my first post or unchecking OEM Unlock allowed in the developer Settings your device should be locked again and can be unlocked by flashing the unlock.img via dd in ADB or the Android Terminal Emulator within the Phone.
Thanks for the further explanation. I was just wondering about this OEM Unlocking switch in dev options. What would happen, if one would use dd and the factory image file to lock the bootloader and leave the OEM Unlocking switch still unlocked...
I also am interested if this type of locking-unlocking can be done in TWRP... If it can be done there, then it does not offer any benefits in security, if my logic is correct. Although, I might be drifting off topic here.
pryggi said:
Thanks for the further explanation. I was just wondering about this OEM Unlocking switch in dev options. What would happen, if one would use dd and the factory image file to lock the bootloader and leave the OEM Unlocking switch still unlocked...
I also am interested if this type of locking-unlocking can be done in TWRP... If it can be done there, then it does not offer any benefits in security, if my logic is correct. Although, I might be drifting off topic here.
Click to expand...
Click to collapse
As i can remember i tried that too, by flashing the factory image partition via dd and leaving the switch on, the switch gets toggled off when rebooting, because the switch is just the representation of the unlocking bit in the partition. So when it is turned off, the software will set the bit to zero, means the device will get locked on reboot. Turning the switch on will not override the bit and the device can boot unlocked and the switch will stay on.
It is hard to explain
Your Idea about doing the same thing in TWRP since the ADB is available there is interesting.
I think the problem here is, that once you onlock and flash a custom recovery via fastboot, and relock the device, you already tampered with it, and twrp does provide much more options than the stock recovery image (ADB commands, ...).
So the problem here lies in flashing twrp.
I solved this problem by keeping the stock recovery and locking the device via the image file.
Once i want to use twrp, i unlock the phone by using the unlock.img and use "fastboot boot twrp.img" to boot twrp to backup my device or some other action.
I know that this means if my device gets bricked in this locked state with stock recovery i will have to unlock it normally, but before making any important changes to my software i always unlock my device first in case something goes wrong and with the stock recovery i could not even flash anything so making huge software changes requires me to unlock my device and boot twrp
Hope that this post helps somehow
FYI: The HEX hack must work on almost all OPT OS Releases.Kinda universal
fareed_xtreme said:
FYI: The HEX hack must work on almost all OPT OS Releases.Kinda universal
Click to expand...
Click to collapse
That is right, i just included the notice in the first post so nobody can tell me i have not told them
It is also possible that OnePlus changes the layout of that partition in one of the upcoming updates/releases and that is why it is still mentioned in the first post, thank you anyway.
@thedropdead I've a question: I should use the "modified" devinfo.img AFTER I go back to stock, if I want to unlock my phone without wiping data, right ? So I go back to stock, flash in fastboot or in terminal emulator the .img, and that's good ? I'me unlocked without data wiped ?
casual_kikoo said:
@thedropdead I've a question: I should use the "modified" devinfo.img AFTER I go back to stock, if I want to unlock my phone without wiping data, right ? So I go back to stock, flash in fastboot or in terminal emulator the .img, and that's good ? I'me unlocked without data wiped ?
Click to expand...
Click to collapse
That should be the plan if i have understood everything right.
So you are on the custom ROM, want to go back to the stock ROM?
If that is the case i do not see why you should want to flash any image.
You can use TWRP to wipe and then flash the stock ROM, your phone should still be unlocked right?
Please someone correct me if i am wrong.
It would be great if you could tell me what you are trying to achieve.
The unlock image had the purpose to help someone unlock their device if they have a rooted device but have locked it after flashing everything for security reasons.
thedropdead said:
That should be the plan if i have understood everything right.
So you are on the custom ROM, want to go back to the stock ROM?
If that is the case i do not see why you should want to flash any image.
You can use TWRP to wipe and then flash the stock ROM, your phone should still be unlocked right?
Please someone correct me if i am wrong.
It would be great if you could tell me what you are trying to achieve.
The unlock image had the purpose to help someone unlock their device if they have a rooted device but have locked it after flashing everything for security reasons.
Click to expand...
Click to collapse
Well, for now I'm under CM13, and, yeah, I know I could wipe and flash stock in TWRP, I just want to know in case .
casual_kikoo said:
Well, for now I'm under CM13, and, yeah, I know I could wipe and flash stock in TWRP, I just want to know in case .
Click to expand...
Click to collapse
Okay thanks for the clarification.
In the Case of using some unbrick Tool and thus resetting everything including recovery to stock your phone should lock on the first stock boot.
Once it is locked and you do not have root, which would be the case, you have no possibility to flash the img via fastboot or the emulator.
so in conclusion you are better off with wiping and flashing via twrp so you can still flash something if anything goes wrong
It works on OxygenOS 3.0.2 too. I edit the same location using a HEX Editor. And everything is fine.
Hey guys, sounds like this is exactly what I've been looking for. Thanks for figuring this out.
But, I'm a bit of a noob, so can you break it down into like a hundred very clear steps?

Locking the bootloader

Hi all,
havent posted on Nvidia Shield TV forum for a while...
I settled on Nougat and have unlocked bootlader - think I will avoid any future updates....
Quick one - will locking the bootloader erase anything (data partition or sg)?
I am keen to remove that ugly reminder screen, but not at the price of reinstalling everything...
Thanks
phnikola said:
Hi all,
havent posted on Nvidia Shield TV forum for a while...
I settled on Nougat and have unlocked bootlader - think I will avoid any future updates....
Quick one - will locking the bootloader erase anything (data partition or sg)?
I am keen to remove that ugly reminder screen, but not at the price of reinstalling everything...
Thanks
Click to expand...
Click to collapse
everything is deleted
at fastboot oem lock.
make a backup before
adb backup -all -apk -shared -f
the backup.ab can also be flashed back unrooted

First steps post purchase ?

My OP3 retired and have upgrade to 7T pro (Global version purchased in India). Will receive the phone tomorrow.
Can someone guide based on their experience on what should be the first steps ?
- Do I take backup ?
---- If yes of what - Boot image, EFS etc ( )
---- Should I run all OTA updates first ?
---- Any guide/reference to do the same
- Should I root ? ( Primary need ad blocker, tasker automation etc, freeze bloatware .. heard they are rolling out facebook ) ( No custom roms )
It has been long time that I tried such things. I may need to read guides . Appreciate any inputs.
hyperorb said:
My OP3 retired and have upgrade to 7T pro (Global version purchased in India). Will receive the phone tomorrow.
Can someone guide based on their experience on what should be the first steps ?
- Do I take backup ?
---- If yes of what - Boot image, EFS etc ( )
---- Should I run all OTA updates first ?
---- Any guide/reference to do the same
- Should I root ? ( Primary need ad blocker, tasker automation etc, freeze bloatware .. heard they are rolling out facebook ) ( No custom roms )
It has been long time that I tried such things. I may need to read guides . Appreciate any inputs.
Click to expand...
Click to collapse
With OOS you currently can't make a Nandroid backup meaning TitaniumBackup etc. is your only option.
I would backup your boot image, EFS and persist partition. Here is the guide for EFS: https://forum.xda-developers.com/7t-pro/how-to/guide-backup-efs-partition-decryptable-t4086625
For boot and persist it is the same procedure with these commands in adb shell:
- dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
- dd if=/dev/block/bootdevice/by-name/boot of=/tmp/boot.img
Do you mean OTA updating before rooting or before backuping? I'm not sure what you mean by that question?
Depends on if you need it. If you can live without Widevine L1 and Netflix HD I would unlock the bootloader and try root. If you don't need it, unroot and done. Otherwise you'd need to wipe your device to unlock the bootloader which can be quite some hassle.
Macusercom said:
With OOS you currently can't make a Nandroid backup meaning TitaniumBackup etc. is your only option.
I would backup your boot image, EFS and persist partition. Here is the guide for EFS: https://forum.xda-developers.com/7t-pro/how-to/guide-backup-efs-partition-decryptable-t4086625
For boot and persist it is the same procedure with these commands in adb shell:
- dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
- dd if=/dev/block/bootdevice/by-name/boot of=/tmp/boot.img
Do you mean OTA updating before rooting or before backuping? I'm not sure what you mean by that question?
Depends on if you need it. If you can live without Widevine L1 and Netflix HD I would unlock the bootloader and try root. If you don't need it, unroot and done. Otherwise you'd need to wipe your device to unlock the bootloader which can be quite some hassle.
Click to expand...
Click to collapse
Many Thanks.
I meant should I perform all OTA updates before backuping or should I backup vanilla and then perform the updates.
About root. Didn't know about persist partition, widevine L1 etc. Searched and came across this thread. Will backup the partitions for sure.
hyperorb said:
Many Thanks.
I meant should I perform all OTA updates before backuping or should I backup vanilla and then perform the updates.
About root. Didn't know about persist partition, widevine L1 etc. Searched and came across this thread. Will backup the partitions for sure.
Click to expand...
Click to collapse
I would backup before as some people had issues with /persist after updating. An no backup means you probably have to send your device in to get the sensors (including the fp sensor) restored.
Widevine L1 unfortunately is unfixable as long as the bootloader is unlocked.
I saw your EFS guide. It seems its a choice between EFS and Widevine.
In order to backup EFS one need to unlock the bootloader. But once unlocked it will affect widevine. And it seems there is no other way.
hyperorb said:
I saw your EFS guide. It seems its a choice between EFS and Widevine.
In order to backup EFS one need to unlock the bootloader. But once unlocked it will affect widevine. And it seems there is no other way.
Click to expand...
Click to collapse
Yeah. Ideally, EFS and persist are irrelevant for locked bootloaders. There might be some rare issues where you need a backup but IMHO if you don't unlock the bootloader, the EFS backups aren't really necessary.
You can, however, unlock it, backup and then restore with MSM tool to get a locked device again. Though restoring it would require unlocking it again but you wouldn't need to send it in. If this is useful is another question. It won't hurt but it is unlikely you need it.
Enable USB debugging
Code:
adb devices
adb shell
dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
Results in permission denied error.
EDIT : I guess these require unlocked bootloader > Then use your EFS guide to backup.
However, if I do not plan to root, should I still back these up. Netflix SD is not a show stopper for me
hyperorb said:
Enable USB debugging
Results in permission denied error.
EDIT : I guess these require unlocked bootloader > Then use your EFS guide to backup.
However, if I do not plan to root, should I still back these up. Netflix SD is not a show stopper for me
Click to expand...
Click to collapse
If you plan to unlock the bootloader, back them up.
If not, you can back it up and then lock the bootloader. However, it is highly unlikely you'd need it in this situation
Macusercom said:
If you plan to unlock the bootloader, back them up.
If not, you can back it up and then lock the bootloader. However, it is highly unlikely you'd need it in this situation
Click to expand...
Click to collapse
OK. Thanks for helping with my queries.
1) Unlock bootloader
> Dev option > OEM unlock > Reboot to Bootloader > Fast OEM unlock (wiped data)
> Is this ok ?
2) But what is the safe way lock it back ??
3) If i understand correctly .. by leaving the bootloader unlocked, the only 2 key issues is Widevine L3 + no OTA updates
4) If i continue and decide to root ( leaving the bootloader unlocked )
> What is the current best method to perform root
>> Download firmware > Dump payload to get boot.img > patch in magisk > FLASH and BOOT patched image > FLASH Magisk ... ( is this ok .. or any other way )
hyperorb said:
OK. Thanks for helping with my queries.
1) Unlock bootloader
> Dev option > OEM unlock > Reboot to Bootloader > Fast OEM unlock (wiped data)
> Is this ok ?
2) But what is the safe way lock it back ??
3) If i understand correctly .. by leaving the bootloader unlocked, the only 2 key issues is Widevine L3 + no OTA updates
4) If i continue and decide to root ( leaving the bootloader unlocked )
> What is the current best method to perform root
>> Download firmware > Dump payload to get boot.img > patch in magisk > FLASH and BOOT patched image > FLASH Magisk ... ( is this ok .. or any other way )
Click to expand...
Click to collapse
1) Yes.
2) Either remove everything and lock it manually or simply use the MSM tool which will do everything for you.
3) Widevine L3 yes, OTA is only broken for T-Mobile McLaren editions. Otherwise you'd need to flash the full OTA (which can be done automatically via the System Updater). Only the partial ones won't work.
4) This would be fine. I simply use "dd" to copy the boot.img from my device and patch it then. Either way, it should work. It is a good idea to patch it yourself. A lot of people get Wi-Fi issues etc. as they flash the wrong patched kernel they find. Like an older OOS version or even EU instead of Global etc.

Categories

Resources