yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] Petrovski80:
Good read, very interesting stuff. Too bad the thread ends 'open' without a conclusive answer. I hope someone can and will resolve this mystery.
[Samsung Galaxy Nexus] efrant:
I agree. This was probably one of the best threads I've seen in a long time. The collaboration among the posters seen here is, in my opinion, an excellent example of how working together can achieve something that would have taken one individual significantly longer to accomplish.
[Samsung Galaxy Nexus] Petrovski80:
Yes, exactly. Good efforts from several posters.
[Samsung Galaxy Nexus] segv11:
Although this thread did not achieve its goal, it did have the side-effect of discovering the param-tweaking used in BootUnlocker. :) Big thanks to everyone for that.

Sent from my Jelly Beaned "toro" Galaxy Nexus.
[Samsung Galaxy Nexus] samomamo:
I unlocked my GN boot loader and it didn't wipe anything. Now I have Slim installed and loving it.
[Samsung Galaxy Nexus] My Gnexi:
I've read this thread multiple times, indeed very interesting.

Did anyone try flashing the efs (/factory) partition from a Play Store device on a non Play Store device?

If you do this and check if it changes the wipe-on-unlock behaviour, we'll know if we are looking at the right place.

I would try this but I'm afraid of bricking the device. Is it safe?
[Samsung Galaxy Nexus] efrant:
Since the efs partitions holds information unique to the specific device, it is not really suggested to flash it to a different device. I don't believe it will brick anything, but be if you do decide to do it, make sure you have a backup of your current efs, otherwise, that unique information will be gone for good...
[Samsung Galaxy Nexus] My Gnexi:
I have a backup of efs, and I DON'T want to try it, but maybe you or someone who's still interested in this issue can do it.

If we found a "wipe on unlock" flag in there, and we can change it (it's not encrypted or something), then maybe we can make an app to change it, or add it to the existing app that locks/unlocks.
[Samsung Galaxy Nexus] My Gnexi:
Ummmmmmm......

Just thinking... maybe we where wrong dismissing AdamOutler's suggestion without testing.

Since we now know of several bugs in eMMC chips in Galaxy phones, and we know erase command on a partition works on some phones and not others, and we couldn't find any difference in any partition, it's a natural suspect...

Chainfire's Got Brickbug ? v1.2 or Vinagre's eMMC Brickbug Check can be used to check your eMMC chip's firmware revision.

Please anyone reading this with phone from Play store, please run one of the above (they don't require root or any permission) and answer:

1) Is your phone from Play Store?

2) eMMC type:

3) eMMC Firmware Revision:

4) Does it wipe when unlocking bootloader?

I'll start:

1) Not from Play Store

2) VYL00M

3) 0x25

4) Yes
[Samsung Galaxy Nexus] bmg1001:
1) From Play Store

2) VYL00M

3) 0x25

4) NO
[Samsung Galaxy Nexus] mfsr98:
At the beggining, my yakjuxw GNex which wasn't from the play store didn't wipe but then I installed the stock Google 4.2.1 image and updated to 4.2.2, and when I was unlocking it wiped.
[Samsung Galaxy Nexus] j8048188:
I bought my phone used from someone. Is there a way to tell if it's from the play store?
[Samsung Galaxy Nexus] dax702:
Well I'm not so sure, I was just following some instructions in another thread to get access to my Nexus 4 after the screen cracked and became unresponsive. I unlocked the bootloader with the android toolkit and I do believe (although not certain) my device was wiped clean.. So much for trying to save the data off of it.
[Samsung Galaxy Nexus] Exnor:
Same here... unlocked about a year ago (was on stock 4.1.2 since it's the last Euro version available via OTA) and the device did not erase/format the eMMC .
[Samsung Galaxy Nexus] zOrO2kX:
Sorry for bringing up old threads, but I'm having issues with my GNex and I think it is related to this.

Samsung Galaxy Nexus GT-I9250:

D:\>fastboot getvar all

(bootloader) product: tuna

(bootloader) variant: maguro

(bootloader) serialno: -----------

(bootloader) version-hardware: 9

(bootloader) version-baseband: I9250XXLH1

(bootloader) version-bootloader: PRIMEKK15

(bootloader) secure: no

(bootloader) unlocked: yes

(bootloader) off-mode-charge: 1

(bootloader) signing: production

all:

finished. total time: 0.019s

My phone is bricked (stuck at Google startup screen). Tried Fastboot, ODIN, Unified Android Toolkit, Galaxy Nexus Toolkit and several ROM versions from 4.0.1 to 4.4.4. (from 4.1 and up I get an error: FAILED (remote: Exceed Buffer Size (0x16400000))

It seems that my device is write protected because I'm unable to write nor delete anything from it, all the tools says "Passed" "Completed" "Done" but the thing stays Unlocked, same ROM, bootloader, recovery, etc.

I just want to format the partitions and write 4.0.1 ROM on it, but I'm losing all hope. PLEASE HELP!
[Samsung Galaxy Nexus] nonick:
Samsung Galaxy Nexus I9250 Hard Reset - Factory Reset

How to hard reset on your Samsung Galaxy Nexus I9250? If you need to wipe your phone's data for any reason, you can perform a hard reset in recovery mode.

www.factoryreset.net

this worked for me. My case is slightly different, phone was in 'deep sleep'. It's weird to see what was on my phone 8 years ago!

I'm trying to install postmarketOS but I still don't know what I'm doing wrong. But the page linked should at least get you to fastboot
[Samsung Galaxy Nexus] ragnarokx:
I saw someone else also post about the bootloader saying "relocked." Never hearing of this before, I unlocked and relocked a unit I was sending back to google for a defective screen and the status went back to "locked."

More inconsistencies between units?

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] bobsbbq:
Yes I did everything with the Nexus Toolkit. No wipe. Maybe others can tell how they unlocked to see if there is a pattern.
[Samsung Galaxy Nexus] NCguy:
I think what's interesting is that a reliable source reported that he loaded a stock takju rom onto an international (non play store) GN and it continued to wipe after unlock.

So what triggers the wipe?
[Samsung Galaxy Nexus] bobsbbq:
The guy who made the Nexus toolkit said he found differences in the bootloader, although isn't the bootloader part of the stock image? I think it might be wise to ask in his thread Mskip I think is his name.
[Samsung Galaxy Nexus] ragnarokx:
Has anyone else locked their bootloader and gotten a status of "locked" and not "relocked"?

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] DOHCtor:
Yes, bootloader is part of the stock image.

---------- Post added at 07:01 PM ---------- Previous post was at 06:59 PM ----------

All 3 Play Store Gnex and a 2 international Gnex I bought from expansys and negri (I know, I'm a galaxy nexus hoarder, but I give them away to family members) says locked when I "oem lock" them, and not relocked.
[Samsung Galaxy Nexus] NCguy:
Aren't the yakju and takju stock bootloaders the same? I thought the only difference was wallet?
[Samsung Galaxy Nexus] DOHCtor:
Exactly. Even JBQ confirmed it. Takju just has wallet added.

edit: Just md5sum both of them and they are the same. 5195f55cbb63c06a97639d1e56893336 *bootloader-maguro-primela03.img
[Samsung Galaxy Nexus] NCguy:
So why does only the play store phones (devices?) not wipe. Is the bootloader possibly looking at the IMEI?
[Samsung Galaxy Nexus] mskip:
The MD5 hash from the yakju and takju bootloader is exactly the same so there is no difference in the flashable image. I very much doubt that the bootloader supplied with the phone is any different from the stock image so I think a modified bootloader can be ruled out.

Questions regarding the google play model:

1. When you unlock the bootloader what exact message do you get on the screen? Does it say that the phone will be wiped and then not wipe or do you still get the wipe message?

2. If the phone doesnt get wiped then are no partitions wiped at all (phone doesnt boot into setup wizard and no installed apps lost) or just /data/media (virtual sd card) that isnt wiped?

3. Has anyone whose phone doesnt get wiped after unlocking the bootloader tried flashing the stock takju image (or even flashing a yakju image too as it would work on a google play phone) to check that an unlock with the stock bootloader image doesnt wipe either?

If these questions can be answered by someone with a google play phone that doesnt wipe on unlock then we would be a bit closer to determining why the phone doesnt wipe. I would tend to think its the phone and not the bootloader which means it cant be transfered to another non google play phone. It might have even been unintentional on googles part especially if you still get the message saying your phone will be wiped when unlocking.

I also think its best to move this conversation to a seperate thread so I will move all relevant posts to a new thread or an existing one if there is one.

Mark.
[Samsung Galaxy Nexus] DOHCtor:
1. I get the warning it will be wiped messaged.

2. Data partition, USB storage (virtual sdcard), and maybe cache gets wiped.

3. Does not apply to me
[Samsung Galaxy Nexus] NCguy:
Wow. So its possible that google changed the hardware for the play store?

That would be extra cost, special manufacturing, and the creation of an inconsistent world device. I can't imagine what their motive might be if they in fact did this. This is really intriguing. I also wonder if google would respond to a request for an explanation?
[Samsung Galaxy Nexus] harveydent:
1. Yes, it says the phone will be wipe but it does not wipe it

2. Nothing gets wiped. First thing I saw after rebooting was the pattern unlock screen. Bootscreen had the Google logo with the unlocked padlock symbol below it

3. Won't be flashing anything yet until I spend my $10 on Google Wallet :D
[Samsung Galaxy Nexus] BlindWolf8:
Hmmm...just to give you some food for thought, according to some people the SE Error is actually software-related and not hardware related: https://code.google.com/p/android/issues/detail?id=23749 (from this thread: http://xdaforums.com/showthread.php?t=1365360)
[Samsung Galaxy Nexus] NCguy:
I believe the op from the other thread has tried this a couple of times and in each instance it did wipe.
[Samsung Galaxy Nexus] mskip:
Threads merged and cleaned up.

Mark.
[Samsung Galaxy Nexus] BlindWolf8:
Nope. See new merged thread OP. :)
[Samsung Galaxy Nexus] NCguy:
Mark can you confirm that you didn't activate wallet when you loaded takju?
[Samsung Galaxy Nexus] XBIRDIE98:
I'd like to pose this question to anyone who had the oem unlock not wipe their Play Nexus, like the OP or harveydent, or anyone where it did wipe, like DOHCtor:

A. Did you activate Wallet before preforming the "fastboot oem unlock" that did not wipe your phone?

[Reference 1]

B. If you have a situation like DOHCtor, Did you activate Wallet before preforming the "fastboot oem unlock" that did wipe your phone?

[Reference 2]

I'm looking to try to correlate Wallet and this no-wipe behavior, primarily because it's been shown by various people that takju is yakju + Wallet, so Wallet is the only significant software factor, as mskip has ruled out the bootloader. [3][4] If there's no correlation, we can rule out Wallet, in which case I really wouldn't be sure what to suspect.

(I happen to like the idea that if we can systematically eliminate causes we might just be able to figure out what causes this.)

As a side note, has anyone asked Google about this? If so, did they give you some sort of response?

References: (I'm obsessive about research! :) )

[1][NOTE: This post especially made me wonder about Wallet as the cause.]

[2]

[3]

[4]
[Samsung Galaxy Nexus] ragnarokx:
I've never used Wallet on my Galaxy Nexus, and unlock did not wipe for me (stock Play Store GN).

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] XBIRDIE98:
Thanks! This is great! This means that the bootloader is the same, and Wallet is not the trigger.

I suspect, however, per my first post, that Wallet is the reason that Google has prevented the wipe, as it's the only difference, and that the Wallet app and data have to be in sync or else a secure element error occurs. I have a feeling that the wipe would sever the connection between the app and the SE applet. This indicates that it may be something different about the devices from the Play Store themselves.

This article has a good summary of what happens in a typical SE error: PocketNow's "Google Wallet: Good News and Bad News"

Specifically from the article:

"Google Wallet stores your credit card information in the phone’s “secure element“. When you set up Google Wallet, the app essentially “pairs” with the secure element and gets some type of authentication key which it uses to access to the data in the “secure element”. If you don’t go through the right process when uninstalling the app, or before flashing a new ROM, your app won’t have that key, and your secure element will stop responding. It happened to me, but I couldn’t get any support because my GSM Galaxy Nexus was on T-Mobile, which wasn’t supported until just recently."

"If you get the dreaded “Secure Element not responding” error, for the time being, your only recourse is to replace your phone. The app isn’t bound to one secure element, but the secure element is apparently tied to one specific installation of the app. Once that’s severed, so is the ability to use Google Wallet with that phone."
[Samsung Galaxy Nexus] efrant:
Theory

One thing we've all overlooked is the partitions that are not flashed.

A GNex has the following partitions:

boot

recovery

system

userdata

cache

radio

sbl

xloader

param

misc

metadata

efs

dgs

The first 4 are flashed when you flash a stock ROM.

The cache is, well, the cache.

The radio partition is flashed when you flash a radio.

The sbl and xloader partitions are flashed when you flash a bootloader.

That leaves the last 5 partitions. Do we know what all of them contain? There may be something that is different between those partitions found on a GNex sold through Google Play Store vs. a GNex sold elsewhere.

If someone who has a Play Store GNex dumps them, I'd be happy to verify that they are the same.

To dump, do the following (root and busybox required):

Open a command prompt in the directory where your adb.exe file is, and type the following:

adb shell

su

dd if=dev/block/platform/omap/omap_hsmmc.0/by-name/param of=/sdcard/param.img

dd if=dev/block/platform/omap/omap_hsmmc.0/by-name/misc of=/sdcard/misc.img

dd if=dev/block/platform/omap/omap_hsmmc.0/by-name/metadata of=/sdcard/metadata.img

dd if=dev/block/platform/omap/omap_hsmmc.0/by-name/efs of=/sdcard/efs.img

dd if=dev/block/platform/omap/omap_hsmmc.0/by-name/dgs of=/sdcard/dgs.img

Upload the files, and I will compare them over the weekend with my non-Google Play Store files.

Or better yet, someone upload the files from a non-Google Play Store device as well, so that if I don't get to it right away, someone else can!
[Samsung Galaxy Nexus] jblack41510:
I'm lost. So if I flash yakjuzs to takju relock my bootloader, save some stuff, unlock bootloder data won't wipe? Or is this just for play store takju?

And thank for all of u taking time to try and figure this wallet/ build stuff out
[Samsung Galaxy Nexus] NCguy:
I've suggested this before but never got an answer. Maybe because it makes no sense? But what if the play store imei's are ranged together and the bootloader is basing the wipe decision on the play store imei range? That would accomplish this behavior only on certain phones without different hardware or software. If its possible to spoof an imei I suppose it could be tested?
[Samsung Galaxy Nexus] XBIRDIE98:
It's probably not checking for the IMEI number itself, more likely something on one of these partitions - I was pondering another idea, per my original post: "Or is it some sort of hardware option set by Samsung/Google at manufacture/software flash time?"

I thank efrant greatly for proposing a theory about it being something flashed at the factory like your IMEI. I agree that this is a better theory than the detection of Wallet.

(The partition change would be a 'hardware' difference from the international version - these partitions usually dont change.

In fact, if my memory serves me well, the EFS partition contains your IMEI and it's a good thing to back up. (There are various ways to pull the partitions - Check in the forums. :) ) I'm not sure what the others do, but it's probably in one of them.

I'll do a bit more searching on what they might be and report back.

Speculation: One of the remaining partitions probably contains your serial number as well. Based on the names, I think we should check param, misc, and metadata first. (End speculation)

To efrant specifically: Do you want actual img files, or just an MD5 checksum of them? I'm somewhat concerned about disseminating my IMEI at the least. (I'd be willing to give checksums from my shipped-yakju International GN. :) )
[Samsung Galaxy Nexus] efrant:
Md5 hash is fine
[Samsung Galaxy Nexus] XBIRDIE98:
Thanks, efrant. Here they are: (My efs at the very least should be different - due to a different IMEI. :) )

dgs.img = b5cfa9d6c8febd618f91ac2843d50a1c

metadata.img = fcd6bcb56c1689fcef28b57c22475bad

misc.img = b5cfa9d6c8febd618f91ac2843d50a1c

param.img = 4f95db221d90a1b9e70d4c22035b68c5
[Samsung Galaxy Nexus] efrant:
Here are mine (from a non-Google Play Store device):

dgs: B5CFA9D6C8FEBD618F91AC2843D50A1C

metadata: FCD6BCB56C1689FCEF28B57C22475BAD

misc: B5CFA9D6C8FEBD618F91AC2843D50A1C

param: 1C89EC3D50DF3091D4A54BDBAE951B1E

Looks like dgs, metadata, and misc are the same, but param is different. Not sure what is stored in param, but this may be our key...
[Samsung Galaxy Nexus] mskip:
The /EFS partition contains phone specific information such as IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. NOT A GOOD IDEA AT ALL TO FLASH THIS TO A DIFFERENT DEVICE AS IT COULD RENDER YOUR PHONE TOTALLY USELESS.

The /MISC partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings. Now there may be something in there that could stop a wipe on unlock but I wouldnt to try out my theory.

Im not quite certain about the /METADATA partition but I assume that it holds the configuration data about certain sets of data in the system. I dont think this is worth persuing.

The /PARAM partition is used as a temporary buffer to forward commands (like boot into recovery) from running OS to the bootloader. Nothing in there..

I really have no ideas on what the /DGS partition contains.

Mark.
[Samsung Galaxy Nexus] mskip:
My pulls:

dgs: b5cfa9d6c8febd618f91ac2843d50a1c (SAME)

metadata: fcd6bcb56c1689fcef28b57c22475bad (SAME)

misc: b5cfa9d6c8febd618f91ac2843d50a1c (SAME)

param: 4f95db221d90a1b9e70d4c22035b68c5 (DIFFERENT BUT I WOULD EXPECT THIS)

efs: 0e5d97ed497a24c2a2c575be8657f683 (CANT COMPARE BUT WOULDNT BE THE SAME).

Nothing has really been gained from this :(

At this stage im out of fresh ideas apart something to do with the IMEI but im not sure what it would be. Probably worth mailing google about it and see how they respond.

Mark.
[Samsung Galaxy Nexus] efrant:
Are we sure about these? This is my first Samsung device, but on HTC devices, the initial boot screen and the "unlock prompt" screen are stored in these files as well. I seem to recall that I read somewhere that the param partition stored the initial boot screen among other things on some Samsung devices.
[Samsung Galaxy Nexus] mskip:
It may do as the terms can be very ambiguous. I took these images from AOKP build 34 so I will flash stock IMM76i later tonight and take another dump (of the image lol) and compare md5 again.

Im sure about the /efs and pretty sure the /misc term is right.

Mark.
[Samsung Galaxy Nexus] efrant:
This is the link I had read a while ago. I would assume that the "unlock prompt" screen would be there as well, among other things... it's a fairly large file.

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

LOL!!!!

---------- Post added at 07:33 PM ---------- Previous post was at 07:26 PM ----------

As a little aside, on the Nexus One, the misc partition held a parameter called "main version", which limited which shipped ROMs could be flashed to the device - I think the bootloader called up that parameter and checked it against the shipped ROM you were trying to flash.

---------- Post added at 07:36 PM ---------- Previous post was at 07:33 PM ----------

Could someone with a Play Store GNex boot into fastboot mode and type the following:

fastboot getvar all

This is my output from a non-Play Store device:

(bootloader) product: tuna

(bootloader) variant: maguro 16GB

(bootloader) serialno: <redacted>

(bootloader) version-hardware: 9

(bootloader) version-baseband: I9250XXLA2

(bootloader) version-bootloader: PRIMELA03

(bootloader) secure: no

(bootloader) unlocked: yes

(bootloader) off-mode-charge: 1

(bootloader) signing: production

all:

finished. total time: 0.010s

---------- Post added at 07:39 PM ---------- Previous post was at 07:36 PM ----------

mskip,

Your param is the same as XBIRDIE98's param, but different than mine...
[Samsung Galaxy Nexus] XBIRDIE98:
If it helps at all, I'm running rooted Stock 4.0.4 IMM76I (Bootloader Unlocked) with the Radio, Kernel, Bootloader, etc. from the IMM76I update. (International yakju GN)

Thanks for the explanation of everything - it's interesting to see how the devices work and how they differ from each other. The partitions are especially interesting in their function.

How do you think we should go about contacting Google? If this is a security issue, should we publicize it?

Here's my "fastboot getvar all" output: (Looks the same to me...)

(bootloader) product: tuna

(bootloader) variant: maguro 16GB

(bootloader) serialno: <Removed for Security Reasons>

(bootloader) version-hardware: 9

(bootloader) version-baseband: I9250XXLA2

(bootloader) version-bootloader: PRIMELA03

(bootloader) secure: no

(bootloader) unlocked: yes

(bootloader) off-mode-charge: 1

(bootloader) signing: production
[Samsung Galaxy Nexus] NCguy:
First, do we really want it changed?

If yes, I'll bet Google wouldn't do anything based on a user report. IMO you would need to get media to first report it and I'll bet they might since it involves a vulnerability. I would start with Android Central if I really wanted it covered.
[Samsung Galaxy Nexus] XBIRDIE98:
I would guess if this is happening, it's probably intentional - My guess at why still relates to the Wallet thing. I know I'd rather have a less secure device than bricking my Secure Element. :) I don't see much reason to publicize this besides announcing that it's expected behavior so that people new to this process don't get confused. :)
[Samsung Galaxy Nexus] NCguy:
Ok, so I have a stock yakjuzs and I'm in the USA. From what we know at this point am I better off:

With takju or

Yakju and installing the wallet from play store?
[Samsung Galaxy Nexus] efrant:
Makes absolutely zero difference.
[Samsung Galaxy Nexus] jblack41510:
ok i have the hongkong yakjuzs. i flashed to takju. locked bootloader took pics downloaded apps etc. unlocked the boot loader and everything wiped execpt my wallpaper...hmmm.

my wallet has been screwed sisce the apk. came out. once flashed to takju i found a way to get into wallet by going to settings apps, all apps, clearing the data. then go to google services framework and clear data. open wallet it says something about the country. then do the about phone system updated and check. it will have a weird date from 1969. once it check now u can get into wallet. once in i think you can do everything but add google pre paid card. but once u restart phone ur locked out again. this does not work with yakju.
[Samsung Galaxy Nexus] XBIRDIE98:
NCguy, This no-wipe behavior shouldn't affect you if your Nexus shipped with yakjuzs. If it did, that would be somewhat concerning.

Edit: Off-topic stuff removed. My apologies.