How to lock bootloader after it was unlocked

eried1

Senior Member
May 27, 2016
269
19
0
Stockholm
For those, who have already locked bootloader, it is strictly recommended not to flash stock ROM via flashall.bat.
For flashing stock you should use method for unlocked device, so you need to use START script.
All will go right if you will flash via flashall.bat after bootloader was locked, without any errors, Р2 will be booted as usual - Wi-Fi, SIM-cards (with names of operators), IMEI's and Serial number - all will be OK ...

But!
Calling, SMS and Mobile data will not work, you will see crosses on antenna icons in Status bar (in the string of modem firmware in "About" you will see "X" instead of "R" (Screenshot 9, 10) as it was, modems region will be defective)..
I suppose you mean unlocked?
 

eried1

Senior Member
May 27, 2016
269
19
0
Stockholm
Flash modem via TWRP:
1. Download zip for OS that you need (do not unzip it, rename or choose extension).
2. Copy to the phone memory (or to external micro-SD card).
3. Boot to TWRP and act as it is shown on the screenshots ...


For those of you trying to restore the signal

I downgraded to MM and did OTA till I reached S244. Then I restored my TWRP backup (EFS and modem) and flashed the modem.zip. For some minutes I had 3G and 4G (no 2G). Eventually I was disconnected.

Anybody with a similiar experience?

I did put some paper above the SIM card to increase the pressure. Took it out before I got a signal though.

Edit: Once I get signal it's really weak at -110 dBm. Also, I can't use mobile data, only call at rare occasions.
 
Last edited:

eried1

Senior Member
May 27, 2016
269
19
0
Stockholm
@sergsinger

Once you have locked the P2 as described in OP, do you have the possibility to re-unlock it?

Edit: I realize I seem unskilled. I just want assurance that the OEM unlock fastboot command will work if I ever decide to go back to the unlocked state.
 
Last edited:

eried1

Senior Member
May 27, 2016
269
19
0
Stockholm
Locked Boot-loader with just (3) steps:
1. Wipe sp if you have root: dd if=/dev/zero of=/dev/block/bootdevice/by-name/sp .
2. Wipe secinfo via Fastboot: fastboot erase secinfo .
3. Flash fastboot images(Stock files).

* I was using Cardinal AOSP 8.0.0

*Blankflash not used

Thanks :) Locked :)
Totally missed this post. So in the third step, you don't have to use blankflash? And when you say stock files, do you include modem?
 

eried1

Senior Member
May 27, 2016
269
19
0
Stockholm
When trying to use blankflash I get
". \qboot.exe blank-flash
Opening device: \\.\COM20
FAILED: qb_flash_singleimage<>device_open<>->"error opening device"

Any ideas?

SOLVED! I pressed power + vol up + vol down and clicked the batt.file at the same time. It suddenly worked. Had to try a couple of times.

After automatically booting to fastboot mode it still says unlocked though :( Did steps 1-5 successfully. Got the same output as the screenshots display.
I have tested FW S251 using a P2a42. Since I didn't have access to a desktop I used a laptop.

When I do steps 6 and 7 (which don't seem to be required to lock the bootloader, just set the region) the phone tells me it can't find easyimage.zip.
 
Last edited:

abhi654

New member
Jun 13, 2018
1
0
0
This method was tested on P2a42 4/32 and P2c72 4/64 (both smartphones has 251 firmware installed).

Please, pay attention and read carefully:
You have a risk that P2 will go from EDL (9008) mode to 900E while you make a reconnect of connected to PC phone.
If you haven't successfully returned it by yourself into 9008 state - the only way is repair service. See details on 4Th step below the short instruction.
ADB and EDL (9008) drivers have to be pre-installed on your PC.

For those, who faced with flashing firmware, gaining root, working with ADB and Fastboot commands, EDL mode on P2 and so on, here is the short instruction:
1. Wipe sp if you have root: dd if=/dev/zero of=/dev/block/bootdevice/by-name/sp .
2. Wipe secinfo via Fastboot: fastboot erase secinfo .
3. Wipe userdata via Fastboot: fastboot erase userdata .
4. P2 is connected to PC in EDL (9008) mode, make a reset via launching blank-flash.bat from blankflash folder.
5. Flash 251 firmware as for unlocked device using START script .
6. Choose region ( ####682# ) and then make a reset ( ####7777# ).
7. That's all folks! Now you have locked P2 with a region that you want. So you can set the phone as you always do.


I did everything from 1st step to 4th step but my phone is still unlocked. can anyone help? i was on deodexed 244. i tried on 251 stock firmware as well, still on Unlocked mode.
 
Last edited:

Himmi23

Member
Apr 10, 2017
11
1
0
please help

This method was tested on P2a42 4/32 and P2c72 4/64 (both smartphones has 251 firmware installed).

Please, pay attention and read carefully:
You have a risk that P2 will go from EDL (9008) mode to 900E while you make a reconnect of connected to PC phone.
If you haven't successfully returned it by yourself into 9008 state - the only way is repair service. See details on 4Th step below the short instruction.
ADB and EDL (9008) drivers have to be pre-installed on your PC.

For those, who faced with flashing firmware, gaining root, working with ADB and Fastboot commands, EDL mode on P2 and so on, here is the short instruction:
1. Wipe sp if you have root: dd if=/dev/zero of=/dev/block/bootdevice/by-name/sp .
2. Wipe secinfo via Fastboot: fastboot erase secinfo .
3. Wipe userdata via Fastboot: fastboot erase userdata .
4. P2 is connected to PC in EDL (9008) mode, make a reset via launching blank-flash.bat from blankflash folder.
5. Flash 251 firmware as for unlocked device using START script .
6. Choose region ( ####682# ) and then make a reset ( ####7777# ).
7. That's all folks! Now you have locked P2 with a region that you want. So you can set the phone as you always do.


I did everything from 1st step to 4th step but my phone is still unlocked. can anyone help? i was on deodexed 244. i tried on 251 stock firmware as well, still on Unlocked mode.
When trying to use blankflash I get
". \qboot.exe blank-flash
Opening device: \\.\COM12
FAILED: qb_flash_singleimage<>device_open<>->"error opening device"

followed every step properly with success too. blankflash file giving me this error please help someone

---------- Post added at 07:43 PM ---------- Previous post was at 07:40 PM ----------

This method was tested on P2a42 4/32 and P2c72 4/64 (both smartphones has 251 firmware installed).

Please, pay attention and read carefully:
You have a risk that P2 will go from EDL (9008) mode to 900E while you make a reconnect of connected to PC phone.
If you haven't successfully returned it by yourself into 9008 state - the only way is repair service. See details on 4Th step below the short instruction.

For those, who faced with flashing firmware, gaining root, working with ADB and Fastboot commands, EDL mode on P2 and so on, here is the short instruction:
1. Wipe sp if you have root: dd if=/dev/zero of=/dev/block/bootdevice/by-name/sp .
2. Wipe secinfo via Fastboot: fastboot erase secinfo .
3. Wipe userdata via Fastboot: fastboot erase userdata .
4. P2 is connected to PC in EDL (9008) mode, make a reset via launching blank-flash.bat from blankflash folder.
5. Flash 251 firmware as for unlocked device using START script .
6. Choose region ( ####682# ) and then make a reset ( ####7777# ).
7. That's all folks! Now you have locked P2 with a region that you want. So you can set the phone as you always do.



Remember ...backup rules.


When trying to use blankflash I get
". \qboot.exe blank-flash
Opening device: \\.\COM12
FAILED: qb_flash_singleimage<>device_open<>->"error opening device"

followed every step properly with success too. blankflash file giving me this error please help someone
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone