How It Works
BootUnlocker for Nexus Devices
avoids using "fastboot oem unlock", with its associated "userdata" wipe by writing directly to the "param" (or "misc") partition of your device's internal storage. On the Galaxy Nexus, the PRIMELA03
bootloader stores the lock status at position 0x000007C
(124 decimal) of this partition: fastboot updates this when locking and unlocking the bootloader.
On the Nexus 10, the MANTALJ12
bootloader uses position 0x0000224
On the Nexus 4, the MAKOZ10l
bootloader uses position 0x0004010
(16400 decimal) of the "misc" parition.
uses root privileges to write to to the appropriate location directly, bypassing fastboot. This allows you to lock and unlock your bootloader from within Android, without wiping your "userdata" partition.
The technique used was discovered through the efforts of several contributors on another XDA thread: http://forum.xda-developers.com/show...650830&page=13
Special thanks go to those who posted raw images of their "param" partitions for analysis (Archpope, AdamOutler, efrant, NCguy, Raftysworld, and others) as well as to the beta testers of this application (efrant, Mach3.2, Meep70, and others). This application could not have been written without their contributions.
To learn more about how this app works, and plans for future functionality, follow this project on Google Code: https://code.google.com/p/boot-unlocker-gnex/