[Samsung Galaxy Nexus] segv11:
Some thoughts:

1) Efrant, Did you try flashing the misc partition images back onto the device using dd to see if that would change the lockstate?

2) Does anyone else have a Nexus 4 so we can see if they have the same misc images, or if there are device dependent bits like the N7?

3) I appreciate all the N7 images here, it looks like flashing back boot0 works, but it is a device-specific image. That's great for hackers like us but not much use for the app unless we can figure out the pattern.

I'll xxd the misc images myself and see if I can see any patterns. (I find xxd a little more readable than od for diff'ing...)

EDIT: Anyone with xxd; try looking at the ASCII stuff on the right side of the whole image (not just the diffs). There are _lots_ of goodies in this partition, and I wonder how many of them vary from device to device.

% diff misc-locked.hex misc-unlocked.hex
1026c1026
< 0004010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
---
> 0004010: 0100 0000 0000 0000 0000 0000 0000 0000 ................
1121,1123c1121,1123
< 0004600: 0000 0000 0000 0000 0000 0000 00f0 0100 ................
< 0004610: 00a0 0000 3c18 f288 1f00 0000 0000 0000 ....<...........
< 0004620: 0a00 0000 0000 0000 0a00 0000 1f00 0000 ................
---
> 0004600: 0000 0000 0000 0000 0000 0000 00c0 0100 ................
> 0004610: 00a0 0000 3c18 f288 1c00 0000 0000 0000 ....<...........
> 0004620: 0a00 0000 0000 0000 0a00 0000 1c00 0000 ................
1125,1127c1125,1127
< 0004640: 0000 0000 e812 f288 0000 0000 1b00 0000 ................
< 0004650: 0100 0000 1f00 0000 0000 0000 8412 f288 ................
< 0004660: 88f7 f488 2905 f188 0100 0000 0000 0000 ....)...........
---
> 0004640: 0000 0000 e812 f288 0000 0000 1a00 0000 ................
> 0004650: 0800 0000 1c00 0000 0000 0000 8412 f288 ................
> 0004660: 88f7 f488 2905 f188 0800 0000 0000 0000 ....)...........
1133,1134c1133,1134
< 00046c0: 0000 0000 4835 f488 17f8 3331 3239 3000 ....H5....31290.
< 00046d0: 0400 0000 2cf8 f488 c857 f288 0000 0000 ....,....W......
---
> 00046c0: 0000 0000 0000 0000 0032 3838 3036 3000 .........288060.
> 00046d0: 0000 0000 2cf8 f488 c857 f288 0000 0000 ....,....W......
1137,1152c1137,1152
< 0004700: 8424 f488 d100 f188 1300 0000 1d01 f188 .$..............
< 0004710: 8c01 f488 5cf9 f488 5b33 3132 3930 5d20 ....\...[31290]
< 0004720: 0000 f488 0100 0001 6661 7374 626f 6f74 ........fastboot
< 0004730: 3a20 6f65 6d20 6c6f 636b 0a00 b3bd f088 : oem lock......
< 0004740: 0000 0000 0000 0000 80f8 f488 6074 f388 ............`t..
< 0004750: ffff ffff 0100 0000 c824 f488 d424 f488 .........$...$..
< 0004760: 8424 f488 6814 f488 0000 0000 17be f088 .$..h...........
< 0004770: 0000 0000 0000 0000 584f f488 dfbf f088 ........XO......
< 0004780: 0100 0000 0000 0000 3838 f488 3f62 f088 ........88..?b..
< 0004790: 5423 f288 8024 f488 5423 f288 6074 f388 T#...$..T#..`t..
< 00047a0: ffff ffff 0100 0000 c824 f488 7c24 f488 .........$..|$..
< 00047b0: a824 f488 745f f488 49e3 f088 17be f088 .$..t_..I.......
< 00047c0: 0000 0000 0000 0000 584f f488 dfbf f088 ........XO......
< 00047d0: 5423 f288 8024 f488 5423 f288 03e6 f088 T#...$..T#......
< 00047e0: 5423 f288 df65 f088 4f4b 4159 0000 0092 T#...e..OKAY....
< 00047f0: 0000 0000 6074 f388 4000 0000 7c14 f488 ....`t..@...|...
---
> 0004700: 8424 f488 d100 f188 1500 0000 1d01 f188 .$..............
> 0004710: 0000 0000 5cf9 f488 5b32 3838 3036 305d ....\...[288060]
> 0004720: 2000 0000 0000 0000 6661 7374 626f 6f74 .......fastboot
> 0004730: 3a20 6f65 6d20 756e 6c6f 636b 0a00 6f6d : oem unlock..om
> 0004740: 0d00 f188 4835 f488 97f8 f488 0200 0000 ....H5..........
> 0004750: 0400 0000 91fd f088 0000 0000 6074 f388 ............`t..
> 0004760: aca0 f488 0200 0000 0400 0000 79b9 f088 ............y...
> 0004770: 0000 0000 0000 0000 0000 0000 0200 0000 ................
> 0004780: e458 f388 a1f8 f088 0000 0000 6074 f388 .X..........`t..
> 0004790: ffff ffff 0100 0000 bca0 f488 d424 f488 .............$..
> 00047a0: 8424 f488 6814 f488 0a00 0000 9881 0400 .$..h...........
> 00047b0: 6074 f388 1c00 f488 0100 0000 a000 f488 `t..............
> 00047c0: d424 f488 8424 f488 cee9 cd88 0000 0000 .$...$..........
> 00047d0: 0000 0000 bc84 f388 0000 b088 f0b4 f088 ................
> 00047e0: 3301 0020 2300 0000 0000 0000 6727 0000 3.. #.......g'..
> 00047f0: cee9 cd88 17be f088 c7f3 f088 5cf3 f088 ............\...

The last (big) block looks like a command history; probably not relevant. If flashing the partition back (to the same device it came from) changes the lockstate, then we should get image pairs from other N4's to see which differences are relevant and which are random.