[H815EU _ONLY_] Relock BL cust/misc/persistent.img preemptive dump

blake_spector

Senior Member
Nov 29, 2008
70
73
0
So, for a clean "starting point" I flashed v20j using LGUP over the v20g that was installed. Basically because that was a KDZ quick to download (LG servers) and something that is fresh, proper and working on H815EUR devices.

Next I will dump the partitions in question, unlock via official LG unlock.bin and try to relock.
Stay tuned and happy holidays!
 

Minto107

Senior Member
Aug 10, 2013
3,934
1,383
253
20
So, for a clean "starting point" I flashed v20j using LGUP over the v20g that was installed. Basically because that was a KDZ quick to download (LG servers) and something that is fresh, proper and working on H815EUR devices.

Next I will dump the partitions in question, unlock via official LG unlock.bin and try to relock.
Stay tuned and happy holidays!
Can't wait to hear about results! I'm on v20g right now, didn't touch a thing but if you'll be able to get relock working on marshmallow I'm in for unlocking(thank God that my H815EU is unlockable)

Wysłane z mojego LG-H815 przy użyciu Tapatalka
 

letama

Senior Member
Feb 13, 2008
1,690
2,324
0
Well, just did the test, I confirm that it works! (at least on my device)

I was able to relock without any issue.

Good news also, I did dd back the partitions backup I did after unlock, it does re-unlock the bootloader without factory reset. That's great!
 
  • Like
Reactions: blake_spector

ObiDanKenobi

Senior Member
Dec 15, 2011
328
100
0
Cluj
Which partitions did you dd? Misc, cust and persistent only?

---------- Post added at 02:30 PM ---------- Previous post was at 02:27 PM ----------

Better still, please post the commands to lock and the commands to unlock.
 

letama

Senior Member
Feb 13, 2008
1,690
2,324
0
Which partitions did you dd? Misc, cust and persistent only?
I only did misc, persistent and drm partitions. I didn't bother with cust, I do have a full backup if needed.

****
disclaimer: you can brick permanently your device with this!
This is for my device with my partition layout, I can't be sure that your device has the same one
****


Here are the commands I used to relock (H815 EUR/FRA):

Code:
dd if=/data/media/0/BL/misc_pre.ext4 of=/dev/block/mmcblk0 bs=512 seek=262144 count=32768
dd if=/data/media/0/BL/persistent_pre.ext4 of=/dev/block/mmcblk0 bs=512 seek=380928 count=4096
dd if=/data/media/0/BL/drm_pre.ext4 of=/dev/block/mmcblk0 bs=512 seek=655360 count=16384
the _pre.ext4 were stored in internal storage in a BL directory.

_pre files were done from the full backup (pre_unlock.dmp) I did before unlocking with these commands on PC:

Code:
dd if=pre_unlock.dump of=misc_pre.ext4 bs=512 skip=262144 count=32768
dd if=pre_unlock.dump of=persistent_pre.ext4 bs=512 skip=380928 count=4096
dd if=pre_unlock.dump of=drm_pre.ext4 bs=512 skip=655360 count=16384
I took the pre_unlock.dump directly from device in flash mode with:

Code:
dd if=/dev/block/mmcblk0 of=/data/media/0/pre_unlock.dump bs=512 count=12419072
You have to chmod/chown it to be able to access it afterwards:

Code:
chmod 666 /data/media/0/pre_unlock.dump
chown media_rw:media_rw /data/media/0/pre_unlock.dump
(these two are from memory, I didn't capture the log)

Again, be very cautious with the dd commands!
 
Last edited:

blake_spector

Senior Member
Nov 29, 2008
70
73
0
Well, just did the test, I confirm that it works! (at least on my device)

I was able to relock without any issue.

Good news also, I did dd back the partitions backup I did after unlock, it does re-unlock the bootloader without factory reset. That's great!
That's great news! Thanks so much for your help! :good::good:
 

blake_spector

Senior Member
Nov 29, 2008
70
73
0
Which partitions did you dd? Misc, cust and persistent only?
---------- Post added at 02:30 PM ---------- Previous post was at 02:27 PM ----------
Better still, please post the commands to lock and the commands to unlock.
I will put all the information gathered here in a "guide" when i perform the procedure on my device.
I will try to record it on video with screencapture. . . from locked, send_command.exe on MM, dumping the partitions, unlocking with unlock.bin and relocking it again with the prior saved data.
 
Last edited:

kingtm

Senior Member
Jul 17, 2011
175
94
48
Hello and Merry Christmas to all. I have a question for you. Will it be possible is to lock the bootloader on unlocked phones?

Изпратено от моят LG-D855 с помощта на Tapatalk
 

Minto107

Senior Member
Aug 10, 2013
3,934
1,383
253
20
Hello and Merry Christmas to all. I have a question for you. Will it be possible is to lock the bootloader on unlocked phones?

Изпратено от моят LG-D855 с помощта на Tapatalk
Nah I don't think so. We're using partitions from locked phone to lock it again, ppl who unlocked without dumping their partitions can't relock

Wysłane z mojego LG-H815 przy użyciu Tapatalka
 
  • Like
Reactions: kingtm

jskasia

Senior Member
Jun 4, 2016
206
138
43
Victoria
One more thing, could someone who successfully relock their bootloader post the pre-lock and post-lock partion images here ? So that we could help together to figure out the changes.

If there are more than one device posted, we could find out if unlocking of two phones result the same or not. :laugh:
 

petro_ionut

Senior Member
Jul 4, 2010
98
9
0
Nah I don't think so. We're using partitions from locked phone to lock it again, ppl who unlocked without dumping their partitions can't relock

Wysłane z mojego LG-H815 przy użyciu Tapatalka
I think will it work, but you need the partitions and try!

Sent from my LG-H815 using Tapatalk