yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] osm0sis:
I don't know about everyone else but sometimes I find I've rebooted into the bootloader only to realize I've forgotten to unlock in BootUnlocker beforehand. Well, I decided to make a BootUnlocker Script for my GN so I could just boot to recovery quick, unlock, then adb reboot-bootloader to get back without having to fully boot the OS to make the change.

I've posted the script here: http://xdaforums.com/showpost.php?p=37841533&postcount=176. Tested and working on my maguro device, not sure if it's all the same offset for toro and toroplus, but if so, then it could work for them too once the build.prop assert is changed to match. It'd be relatively simple to change it for the other supported devices as well, so if anyone feels like adapting it, feel free. :good:

Thanks to scary alien for the help on trimming the dd output to something testable. :)
[Samsung Galaxy Nexus] segv11:
Re: [APP][2012-12-24][root][GNex/Dev] BootUnlocker for Nexus Devices -- version 1.3

Maguro, toro, and toroplus all use the same offset. Check the BootUnlocker source code on Google code.

Sent from my 4.1.2 toro Bugless Beast.
[Samsung Galaxy Nexus] osm0sis:
Cool! Thanks, will do. Updated. :)
[Samsung Galaxy Nexus] spartak0s:
may have bricked my phone

Alright, I was running one of the CyanogenMod nightlies and downloaded this app. Set my phone to locked, then forgot about it -- I downloaded today's latest nightlie, but when I rebooted, my phone was unresponsive. I was able to restore an older backup, but naturally everything was gone, and an attempt to flash my previous ROM failed.

So my question is, what do I have to do to unlock the bootloader and get this thing working properly again?
[Samsung Galaxy Nexus] osm0sis:
If you have a custom recovery flashed you can unlock it with the edify script I linked a few posts back. That's your only option if you can't boot to unlock.
[Samsung Galaxy Nexus] spartak0s:
I'm a bit of a noob, how exactly would I run this script?
[Samsung Galaxy Nexus] osm0sis:
Okay, well I assume you're running a GN? If so, http://www.sendspace.com/file/2p2l3c :good:

Edit: Link died. I'll repost it with some of my other minor script zips sometime soon.
[Samsung Galaxy Nexus] spartak0s:
that seemed to do the trick, will have to check next time before updating the nightly. thanks a ton! :good:
[Samsung Galaxy Nexus] segv11:
New version

New Version 1.3.1: Adds koush's android.permission.ACCESS_SUPERUSER permission

OP Updated.
[Samsung Galaxy Nexus] Mach3.2:
Re: [APP][2013-03-08][root][GNex/Dev] BootUnlocker for Nexus Devices -- version 1.3.1

Anyway, what is the purpose of the superuser permission?

Beamed from my Maguro.
[Samsung Galaxy Nexus] segv11:
Re: [APP][2013-03-08][root][GNex/Dev] BootUnlocker for Nexus Devices -- version 1.3.1

Koush's new superuser app will start requiring it in order to grant root.

Sent from my Shiny 4.2.2 toro.
[Samsung Galaxy Nexus] Mach3.2:
Re: [APP][2013-03-08][root][GNex/Dev] BootUnlocker for Nexus Devices -- version 1.3.1

I see, should not be an issue with chainfire's supersu right?

Beamed from my Maguro.
[Samsung Galaxy Nexus] VivaErBetis:
Re: [APP][2013-03-08][root][GNex/Dev] BootUnlocker for Nexus Devices -- version 1.3.1

No problem at all. In fact newest SuperSU version had an option to show an advice if this new permission is not declared, but it's not mandatory.
[Samsung Galaxy Nexus] osm0sis:
Would someone with a N4 or N10 in here please be able to give me a hand testing my flashable zip BootUnlocker Scripts for those devices?

I tested the version for the GN myself and since the N4 and N10 just have a different location in the partitions and swapped value (0/1) for lockstate (as segv's written in the OP), I've modded my script and it should work without a hitch, but I'd still obviously prefer someone test them first.

Basically you just need to backup the appropriate partition for your device (misc for N4, param for N10) with dd so that you're covered in case it somehow doesn't work.

For N4: http://d-h.st/4bO

adb shell

dd if=/dev/block/platform/msm_sdcc.1/by-name/misc of=/tmp/misc.img

exit

adb pull /tmp/misc.img misc.img Confirmed working.

For N10: http://d-h.st/ENx

adb shell

dd if=/dev/block/platform/dw_mmc.0/by-name/param of=/tmp/param.img

exit

adb pull /tmp/param.img param.img Confirmed working.

Then just flash the correct zip and test to make sure it runs correctly then reboot to check the lockstate has properly changed.

Thanks in advance!
[Samsung Galaxy Nexus] efrant:
The N4 script works as advertised, both for locking and unlocking.
[Samsung Galaxy Nexus] osm0sis:
Fantastic! Thanks [MENTION=1566190]efrant[/MENTION]. :)

If that works I'd imagine the N10 does too since all that's different is the partition location and the position (as per the OPs) between the two. It'd still be nice to have someone test though. Then I'll post them up somewhere.

Edit: I suppose I could have put them all in one big single zip, but big long if/else statements in edify are a huge pain in the ass. ;)

Edit 2: Posted them all up in my "Odds and Ends" thread over in Android Development and Hacking. :good:
[Samsung Galaxy Nexus] koko98:
Will this work for n7?

Enviado desde mi GT-I9000 usando Tapatalk 4 Beta
[Samsung Galaxy Nexus] segv11:
N7 bootloader uses a different method to store lockstate, so no it will not work.

Sent from my stock 4.2.1 manta
[Samsung Galaxy Nexus] lion7718:
Thanks, worked great on my N4.
[Samsung Galaxy Nexus] segv11:
Galaxy S4 Google Edition

I've been contacted by someone wondering if we can support the Google Edition of the Samsung Galaxy S4. He seems to have root and the ability to pull partition images. I have high hopes for this one, since Samsung devices have been good to us so far (except the Nexus S).

If anyone else has (or is getting) one of the Google Play Edition devices (either the SGS4 or the HTC One), and plans to unlock and root it, then the instructions for pulling images are here:

http://xdaforums.com/showpost.php?p=33065779&postcount=80
[Samsung Galaxy Nexus] osm0sis:
Root issues aside PRIMEMD04 appears to lock and unlock exactly the same as LC03. :good:

I'm seriously contemplating reverting to LC03 because of how long it takes the bootloader to kick in now though.. :rolleyes:
[Samsung Galaxy Nexus] aosp:
Might have something to do with this kernel change HACK: tuna: blank screen at reboot time

Avoid display artifacts on Tuna due to temporary removal of DSS/panel

shutdown at reboot time, which can hang. http://goo.gl/lNgvb8

Sent from my Cooler Faster Smarter Vanir-ize Galaxy Nexus using a AK
[Samsung Galaxy Nexus] osm0sis:
Hmm maybe but this isn't kernel it's bootloader stuff. The wait is between the vibration after pressing the power button to boot and lasts 2-3 seconds until the Google logo appears. Anyway, I reverted and it works fine again. :p
[Samsung Galaxy Nexus] VivaErBetis:
Only 2-3 seconds? The nexus 10 takes no less than 5 seconds to start with the new bootloader...
[Samsung Galaxy Nexus] SnowBeer:
Has anyone tried this with the new bootloader associated with 4.3 on the nexus 4? I know several things changed including how security is handled so I wanted to see if someone else had given it a go before I try it.
[Samsung Galaxy Nexus] VivaErBetis:
Don't worry at all. It works like a charm with the new Nexus4 MAKOZ20i bootloader.

BTW: here you have the thread devoted to this fantastic tool in the Nexus4 forum:

http://xdaforums.com/showthread.php?p=35827951
[Samsung Galaxy Nexus] segv11:
New Nexus 7

Got a request to try to support the new Nexus 7, and I'm hoping that it stores lockstate in a more accessible way than the old Nexus 7.

A volunteer is willing to pull partitions. But look, there are THIRTY of them. Did ASUS go nuts?!?

/dev/block/platform/msm_sdcc.1/by-name:
lrwxrwxrwx root root 2013-08-12 21:48 DDR -> /dev/block/mmcblk0p26
lrwxrwxrwx root root 2013-08-12 21:48 aboot -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2013-08-12 21:48 abootb -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 2013-08-12 21:48 boot -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2013-08-12 21:48 cache -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 2013-08-12 21:48 fsg -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2013-08-12 21:48 m9kefs1 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2013-08-12 21:48 m9kefs2 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2013-08-12 21:48 m9kefs3 -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2013-08-12 21:48 m9kefsc -> /dev/block/mmcblk0p28
lrwxrwxrwx root root 2013-08-12 21:48 metadata -> /dev/block/mmcblk0p29
lrwxrwxrwx root root 2013-08-12 21:48 misc -> /dev/block/mmcblk0p24
lrwxrwxrwx root root 2013-08-12 21:48 modemst1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2013-08-12 21:48 modemst2 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2013-08-12 21:48 pad -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2013-08-12 21:48 persist -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2013-08-12 21:48 radio -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2013-08-12 21:48 recovery -> /dev/block/mmcblk0p25
lrwxrwxrwx root root 2013-08-12 21:48 rpm -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2013-08-12 21:48 rpmb -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 2013-08-12 21:48 sbl1 -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2013-08-12 21:48 sbl2 -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2013-08-12 21:48 sbl2b -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 2013-08-12 21:48 sbl3 -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2013-08-12 21:48 sbl3b -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 2013-08-12 21:48 ssd -> /dev/block/mmcblk0p27
lrwxrwxrwx root root 2013-08-12 21:48 system -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 2013-08-12 21:48 tz -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2013-08-12 21:48 tzb -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 2013-08-12 21:48 userdata -> /dev/block/mmcblk0p30
[Samsung Galaxy Nexus] Mach3.2:
Wow..

Beamed from my Maguro
[Samsung Galaxy Nexus] Archon810:
So how's the new Nexus 7 support looking? Probable?
[Samsung Galaxy Nexus] segv11:
There are changes in some unusual partitions. Not feeling well today, haven't been able to do the analysis. I have a feeling that images from a second device may be needed for comparison.

Sent from my stock 4.3 mako.
[Samsung Galaxy Nexus] osm0sis:
Any progress on Flo? I asked for volunteers a few places but doesn't look like any of them bothered.

Here's the link to the instructions when we do get a volunteer: http://xdaforums.com/showpost.php?p=36681712&postcount=197

Edit: Asked a few more. ;)
[Samsung Galaxy Nexus] Bronto9:
I don't know how to do that. If you explain me how to pull partitions from my Flo, i'll send you them

Inviato dal mio Nexus 7 usando Tapatalk 4
[Samsung Galaxy Nexus] osm0sis:
Instructions linked in my post above yours. Thanks for volunteering! :)
[Samsung Galaxy Nexus] osm0sis:
Basically: is your bootloader unlocked? Reboot to custom recovery and connect via usb to your pc, hopefully you've already got the Android Universal Naked Driver installed so you can use adb and fastboot. Type adb shell in the command prompt to open the device's terminal shell, then enter the following command:

for block in $(ls /dev/block/platform/msm_sdcc.1/ | grep mmc); do
test ! ${block} == "mmcblk0p30" && dd if=/dev/block/platform/msm_sdcc.1/${block} of=/sdcard/${block}.img &
done;

Then adb pull those files to your pc and put them in a folder by lockstate (locked or unlocked), then reboot to bootloader fastboot oem lock or unlock, reboot back to recovery and do it again. Please upload the files somewhere so we can analyze them.
[Samsung Galaxy Nexus] Bronto9:
I'll do that tomorrow morning(actually I'm not at home)

EDIT: I've started dumping partitions to IMG files, but they're quite big, so it'll take long to upload them(here in Italy upload bandwith sucks, my maximum speed is about 50 KB/s)

EDIT2: While creating IMGs it says that there's no space left on the device, but the process goes on. I think I'll have to recreate the bigger ones and then pull them, one by one
[Samsung Galaxy Nexus] Bronto9:
I can't create the image of /dev/block/mmcblk0p30 (userdata), because it is of the exact same size of the free space of my device, so the .img can't be created.

How do I dump the userdata partition?
[Samsung Galaxy Nexus] efrant:
Skip that one. It is not required. (You can also skip system, boot and recovery.)
[Samsung Galaxy Nexus] VivaErBetis:
Well, in fact I think that it's not recommended to share your userdata partition with anyone :sly:
[Samsung Galaxy Nexus] Bronto9:
Here you are: https://www.dropbox.com/s/2fwjgus44kjuj47/flo_partitions.7z
[Samsung Galaxy Nexus] osm0sis:
[MENTION=4551856]segv11[/MENTION] Here are the ones with changes between locked and unlocked (segv11 was right, pretty interesting):

radio -> /dev/block/mmcblk0p1
persist -> /dev/block/mmcblk0p4
aboot -> /dev/block/mmcblk0p12
cache -> /dev/block/mmcblk0p23

cache we can count out. radio in particular is odd, because it got 12mb larger. Digging into that and the other changes now.

Edit: A second person's dumps would definitely make this easier. Hopefully one of the other guys who agreed will come through. :)

Edit 2: radio change is 12mb of zeros tagged on the end. Weird, but I think we can likely count it out, per usual.

persist (p4) has some odd semi-repeated data which changes, which could mean encryption like with the boot0 partition on the original N7; if this is where it stores the lockstate, then that likely means we're out of luck again.

aboot (p12) has some stuff that might be like mako's command history in their misc partition, and also one change in particular (at 5241884) from 00 to 01 which could be our lockstate if we're lucky; it also matches the trend with mako+manta having 00 as locked and 01 unlocked. There are still some other changes around it but it might just be noise, also like with mako.

Edit 3: flo and deb have the same bootloader. :good:

9c744b5abde98f6d3416f90ab66c5bc9 *bootloader-deb-flo-03.14.img
9c744b5abde98f6d3416f90ab66c5bc9 *bootloader-flo-flo-03.14.img
[Samsung Galaxy Nexus] osm0sis:
My zip contained this code:

block=/dev/block/platform/msm_sdcc.1/by-name/aboot;
offset=5241884;
locked=00;
unlocked=01;

lockstate=`dd ibs=1 count=1 skip=$offset obs=1 if=$block 2> /dev/nul | /sbin/busybox od -h | /sbin/busybox head -n 1 | /sbin/busybox cut -c 15-`;
test -z $lockstate && lockstate=00;

if [ $lockstate == $locked ]; then
setstate=$unlocked;
elif [ $lockstate == $unlocked ]; then
setstate=$locked;
fi;

echo -ne "\x$setstate" | dd obs=1 count=1 seek=$offset of=$block;

So, 5241884 is out. :( That leaves us with the few other changes in aboot and the whole persist partition. Not looking good though since none of the other ones fit with our usual 00 to 01 change...
[Samsung Galaxy Nexus] segv11:
Thank you for trying to figure this device out. I have been too busy at school to even check XDA for months...

Sent from my stock 4.3 Mako. now Free
[Samsung Galaxy Nexus] segv11:
WTF? My Mako is not free. Why is tapatalk messing with my .sig?
[Samsung Galaxy Nexus] efrant:
Stop spamming the forums with you ads...

:D :D :D
[Samsung Galaxy Nexus] VivaErBetis:
I want a free mako!
[Samsung Galaxy Nexus] osm0sis:
Hey no problem! Gotta do what you gotta do! :)

Hopefully you can/did grab those dumps while they're still available so you can compare with your own when you do have a moment. :good:
[Samsung Galaxy Nexus] Mach3.2:
:sly::sly:

Beamed from my Maguro
[Samsung Galaxy Nexus] LOulOo:
Hello,

Will the Nexus 5 be supported ? (at this time it's not.)
[Samsung Galaxy Nexus] osm0sis:
Give us partition dumps of yours locked and unlocked and I'll see what I can do! :)
[Samsung Galaxy Nexus] efrant:
I'll help with this, but it won't be until Friday or Saturday. (Just got my N5 today, but have been too busy at work to even turn it on! :eek: )
[Samsung Galaxy Nexus] efrant:
There are two partitions that change when the bootloader is locked and unlocked: misc and persist.

osm0sis, I've PM'd you a link to the files.
[Samsung Galaxy Nexus] osm0sis:
Ah, nice, I'm 110% sure we're in luck. ;) I saw this jump at me from the top of the misc-diff, locked -> unlocked:

1026c1026
< 0004010: [color=blue]00[/color]00 0000 0100 0000 0000 0000 0000 0000 ................
---
> 0004010: [color=red]01[/color]00 0000 0100 0000 0000 0000 0000 0000 ................

And then thought 4010 looked familiar, and wouldn't you know, it's the exact same offset as the N4. Supported most definitely. :good::cool:

Just looking up partition info then I'll add support for hammerhead to my zip script version. If only deb/flo were this straightforward..

Edit: Wow.. almost identical to mako as well. :)

elif [ $device == "hammerhead" ]; then
ui_print "Nexus 5: $device";
block=/dev/block/platform/msm_sdcc.1/by-name/misc;
offset=16400;
locked=00;
unlocked=01;
[Samsung Galaxy Nexus] Archon810:
So is the Play Store app is already compatible by default - no update needed?

Edit: Never mind, updated required.
[Samsung Galaxy Nexus] osm0sis:
To be honest, I'm stunned that flo/deb weren't this easy, considering they're also the same platform and have a misc partition:

https://android.googlesource.com/device/asus/flo/+/kitkat-release/fstab.flo

Edit: Somehow misc got counted out last time we tried, and looking back I'm not sure how or why. Any volunteers with flo or deb willing to send me some dumps of their misc partition locked and unlocked?

Edit 2: Actually I would like all partitions (except userdata and system) again. Looks like misc was excluded because there weren't any changes. Anyway, I think we can still maybe do this thing with more volunteers.
[Samsung Galaxy Nexus] efrant:
Great! [MENTION=4551856]segv11[/MENTION] any chance of adding support?

Excellent, thanks.
[Samsung Galaxy Nexus] segv11:
I'm up to my ears with schoolwork; grad school is kicking my backside atm. :|

Anyways, it looks like this is a very small code change, if hammerhead is essentially the exact same offset at mako. If my build environment isn't broken I'll try to compile a beta with hammerhead support and post it to Google Code (with a link here) so we can test it.
[Samsung Galaxy Nexus] The Gingerbread Man:
I've managed to adb pull these files from cwm 6.0.4.3 which I think is the latest for flo

Unlocked:

Boot (IMG)

Cache.ext.4.tar (fuseZip.file)

Cache.ext4.tar.a (A file)

Data.ext4.tar (fuseZip.file)

Data.ext4.tar.a (A file)

Nandroid.md5 (md5 file)

Recovery (IMG)

Recovery (text document)

System.ext.4.tar (fuseZip. file)

System.ext4.tar.a (A file)

Hold on for locked

Locked gives the same files. I am uploading both to my drop box with system and user data removed.

https://db.tt/94Urv7BX
[Samsung Galaxy Nexus] efrant:
Actually all of those partitions are not needed. osm0sis is looking for all other partitions besides those ones.
[Samsung Galaxy Nexus] The Gingerbread Man:
I figured, that's all I was able to pull. The entire cwm backup
[Samsung Galaxy Nexus] osm0sis:
Thanks! When you do feel like trying again, here's segv11's general info post on what we want and why:

http://xdaforums.com/showpost.php?p=36681712&postcount=197

And my specific instructions for flo/deb with the adb shell commands to automatically dump all the partitions we need:

http://xdaforums.com/showpost.php?p=46004725&postcount=246

:)
[Samsung Galaxy Nexus] segv11:
I've made the code changes, they should be visible on Google Code. However my build environment is six months old and needs to be updated before it can compile and link the app. This could take a while. :( Once it's done I'll post a beta here.
[Samsung Galaxy Nexus] segv11:
Beta available here: https://code.google.com/p/boot-unlo...il?name=net.segv11.bootunlocker.1.3.2beta.apk

(It's gonna suck when Google Code stops allowing me to host the APK that way. I don't really want to host it on my own Google Drive/Dropbox/Box/AWS, but I want some way for people to get betas outside the play store...)
[Samsung Galaxy Nexus] efrant:
Tested and confirmed working as expected.
[Samsung Galaxy Nexus] canofale:
Also confirmed. Works like a dream. Thanks for your work and good luck with grad school :good:
[Samsung Galaxy Nexus] r1c4rd0:
does it works do BootUnlocke my all stock nexus 5?

thanks
[Samsung Galaxy Nexus] LOulOo:
Tried and works fine for me too ! Great thanks !

sent from my Nexus 5 with Tapatalk 4

---------- Post added at 03:26 PM ---------- Previous post was at 03:25 PM ----------

sent from my Nexus 5 with Tapatalk 4
[Samsung Galaxy Nexus] segv11:
Nexus 5 support is published.

A new version with hammerhead (Nexus 5) support has been published to the Play Store.

Thank you all for your research and beta testing.
[Samsung Galaxy Nexus] efrant:
Slightly off-topic, but this is interesting: http://xdaforums.com/showthread.php?p=47335060

It appears that there is a flag that is set when the bootloader is unlocked, and it doesn't get reset when you relock the bootloader.

In fastboot mode, type in: fastboot oem device-info

I suspect it has something to do with the persist partition, although I have no idea how we would figure exactly where, given that we can't (yet) get a partition dump before the bootloader is unlocked.

It would be useful (or at least interesting) to be able to reset the "tamper" flag.
[Samsung Galaxy Nexus] segv11:
This in reminiscent of the "triangle" on Samsung devices that lead to Chainfire's TriangleAway app.

Sent from my stock 4.3 Manta.
[Samsung Galaxy Nexus] iuss:
Diffing is a last-resort measure. Instead, lk-based bootloaders have a device_info struct on misc, used to store both lock and tamper flags.

00004000 41 4e 44 52 4f 49 44 2d 42 4f 4f 54 21 00 00 00 |ANDROID-BOOT!...|
00004010 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 |................|

The tamper flag is right next to the unlock flag.

It seems silly not to back tamper detection using qfuses, but alas, Samsung didn't either.

EDIT: Yup.

$ fastboot oem device-info
...
(bootloader)	Device tampered: false
(bootloader)	Device unlocked: true
(bootloader)	off-mode-charge: true
OKAY [ 0.004s]

;)
[Samsung Galaxy Nexus] efrant:
Thanks for that!!

Maybe [MENTION=4551856]segv11[/MENTION] can add functionality to his app and maybe [MENTION=4544860]osm0sis[/MENTION] can add it to his zip script.
[Samsung Galaxy Nexus] osm0sis:
Is that just on hammerhead and newer or do we need to go back and examine the other 3 devices again?
[Samsung Galaxy Nexus] segv11:
I'm swamped with work again. If we want to clear the tamper flag, I suppose that's easy enough to do.

Do we need to set it when we unlock? That would require testing.

Sent from my stock 4.3 Manta.
[Samsung Galaxy Nexus] efrant:
Have you tried fastboot oem device-info on your GNex? I'll give it a try it on my N4 later tonight or tomorrow.

I'm assuming that we would want to clear the flag after every "fastboot oem unlock". Unlocking via changing that one byte probably won't set the flag, but as you said, we would need to test.
[Samsung Galaxy Nexus] segv11:
So the tamper is at 0x4014? I'd be inclined to just clear it every time we lock, and leave it alone when unlocking, rather than adding a separate UI to manage it. What do people think?

We would need to test it of course, on all four devices. I wonder if the G-Nex and N10 even use it... Their bootloader uses different offsets.

Sent from my stock 4.3 Manta.
[Samsung Galaxy Nexus] segv11:
Brace yourselves, Android Police just picked us up:

http://www.androidpolice.com/2013/1...-bootloader-without-data-wipes-root-required/

Just wait until we start tampering the tamper flag...

Sent from my stock 4.3 Manta.
[Samsung Galaxy Nexus] The Gingerbread Man:
I'd say reset counter when you lock it again automaticly would make more sense and a separate ui would be helpful if someone had a fūcked USB port and sending for warrenty. If it were possible to add both it would be ideal for 100% situations.
[Samsung Galaxy Nexus] efrant:
Sounds good to me boss.
[Samsung Galaxy Nexus] efrant:
:D

I'm still waiting for someone to find a vulnerability in 4.4, and release an exploit to get root without unlocking <== your app becomes invaluable in that situation.