Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Guide]CWM for Locked Bootloaders[Most LG and other Devices]

$
0
0
I have a LG Optimus L5 II at this point in time there is now way to unlock my bootloader.
after some research I noticed that other devices can get CWM on there phones with locked bootloader. but I did not find any tutorials explaining how to do this. so I decided to write this tutorial to help everybody in the same situation.

Disclaimer

Code:

* Your warranty is now void.
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about changes made using this guide
* 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.

Thanks To

thanks to everyone who made a 2nd init script.
@artas182x
http://forum.xda-developers.com/show....php?t=2099238
@pedrodh
http://forum.xda-developers.com/show....php?t=1032212
@IGGYVIP
for inspiration and the push
Optima Team
For being a awsome team

First Step

understanding how it works.

basically when your phone boots it starts it begins to load the system.
when the system loads it starts t read a series of files. we intercept the files and tell it to stop loading and launch cwm from a tar file.
because you phone is loading it has already passed the check to see if the system is secure(IE checks that its not loading a custom software).
this process is called 2nd init.

Step 2

getting your phone to load a script at startup.

so now we have to get a script to load on startup. there are numerous ways of doing this. the most universal way is to use init.d.
because your bootloader is locked you most likely dont have init.d support.

to give support we need to change the install recovery file located

Code:

/system/etc/install-recovery.sh
this file is present on most devices. when your phone loads this file we will tell it to execute all files in /system/etc/ini.d

attached is a init.d installed that you can download so you dont have to manualy change anything yourself.

Step 3

Making sure script are loading on startup.

in the previous step I included a init.d script called datetest.
after completing step 2 restart your phone.
using root explorer go to

Code:

/data/local/tmp/
there should be a file called

Code:

init.d_log_test.txt
if you open that file you should have the date and time that the script was run.


Step 4

Installing the custom script.

Now that we have init.d support all we need to do is install the script
once again I have included a recovery installer.
this will put the unsecureboot in the init.d folder as well as create a folder in your system directory called bootstrap with all required files

Step 5

Getting the key

when the script is executed it will run the key check to identify what key is being pressed. in my case the vol + key is 115
if the correct key is being pressed it will launch the recovery.

to identify the correct key
use root explorer and navigate to

Code:

/system/bootstrap
open the file get key and select open as script
press execute and press the key you want to use to launch the recovery.
you need to do this at the same time

it will then return the key being pressed

if it returns -1 then it is not identifying the key try a different key.

Step 6

Modding the script

open the init.d script 001unsecureboot

find this line

Code:

  if $BB [ "$key" = 115 ]; then
replace the key with the key you got from the previous post

Step 7

Modding the Recovery

I have never ported a recovery before so i am not sure what needs to be changed in the recovery.tar

I was lucky enough for the recovery to work out of the box. with a few minor adjustments to the recovery.fstab.

but if you are familiar with cwm I am sure you will be able to understand.

Step 8

Rebooting to Recovery

there are two ways of doing this.

ether reboot and keep pressing the key that you selected

or you can run the app provided.

Step 9

Enjoy

now you should have CWM on your phone with a locked bootloader.

If not please leave me a comment. I will try my best to identify the problem.

Download

INIT.D INSTALLER

CWM INSTALLER

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>