yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] markusrow:
IMEI.fix file only on first run if IMEIMe ?

Thanks DizzyDen, This may be merely a feedback post for you, however it may also be source for small improvements.

I too cannot live without Swype.

First the background.

NookColor: 1.3 ManualNoot 4.6.16a (The 'a' is a small improvement to block B&N updates)

Kernel: Dalingrin-OC-emmc-090111

I installed Swype Beta 3.25.91.31083 Did not get past the point where it asks to "Enable" I pressed the enable, with no action. Many reboots and re-installs of Swype - no change. Thinking it may have something to do with IMEI I searched and found your thread.

After running IMEIMe 1.8 via ADB Wireless - (Unfortunately I did not select the setting to save the working files, nor did I select to use the IMEI.fix which presumably would have created a .fix file on the first use.

Again removed and re-installed Swype, with no progress beyond "Enable" button which remained un-responsive. (BTW I am not suggesting you fix my problem with Swype, unless you can see an obvious issue).

Now back to IMEIMe. So I again ran IMEIMe as I wanted to see if I could this time specify the IMEI.fix parameter and save files to confirm that I have an IMEI number.

I set the appropriate parameters in the .ini file (very clear and impressive by the way) re-ran IMEIMe and came to a dialog box that reads something like "Trying to use or set a generic IMEI circumvents the purposes of this software" I guess that this sequence of use is dropping me into a part of the program that thinks I am trying to set a blank IMEI, as I had left that parameter blank.

Anyway my guess is that the program does not want to repeat the process of inserting and IMEI, and is also not set up to generate a IMEI.fix file other than on first use.

If you have any thoughts please let me know, and if this post only serves to provide further testing info for you, that is also great. :)
[Nook Color Android Development] rhester72:
FYI, Swype no longer requires an IMEI.

Rodney
[Nook Color Android Development] markusrow:
Thanks. Do you have any idea why install is stopping at "Enable" ? Could it be that I am on a non-stock kernel. (Unlikely) ?
[Nook Color Android Development] DizzyDen:
Not likely due to non-stock kernel... but I can't think of a reason either...

As for the IMEI Generator not working... if you can post your ini settings I may be able to see something.

If you didn't specify an IMEI or Seed in the ini you should get a pop up window asking for it... if you exit out of that window without giving it something, or if you try using the Generic IMEI from previous threads, it will give you the message you described.

All you have to enter is something you can remember, or enable use serial or mac address in the ini file (the default was, and is serial number, but mac address was added by request). If you see the pop up... type in something you will remember, it will convert text to a numeric format in its own special way ;)
[Nook Color Android Development] newellj79:
Dizzy, is it possible to run your program in Ubuntu using "wine"? If so can I get setup instructions? Thanks!
[Nook Color Android Development] DizzyDen:
I don't know why it wouldn't run in WINE... adb(usb) may not want to work (don't remember if ubuntu shares usb devices with WINE) but you can download adb wireless app in market.

As for setup... not much to worry about... extract the zip file... you can edit the IMEIme.ini file if you wish... well documented and pretty self explanatory.
[Nook Color Android Development] Dalmus:
This is a fantastic tool... 1.8 worked flawlessly, and got my GF's Nook fixed so she could play her Fashion Story. Now I'm a hero. Awesome!

Thanks a millions!
[Nook Color Android Development] joe2262:
IMEI 1.8

jav 1.6_024 (Win7 netbook)

ADB wireless

seems to run fine but no IMEI shows up on the NC?

Oh, I did rename !IMEI.exe to fix.exe, should I rename the .inf file?
[Nook Color Android Development] DizzyDen:
No... don't rename the .inf file...

When you run the IMEI Generator... does it pull your nook's serial number and MAC address?
[Nook Color Android Development] joe2262:
Yes, and it shows the IMEI and asks if I want to push it. After saying yes I get a successful message andn the Nook reboots. But no IMEI on the Nook?
[Nook Color Android Development] DizzyDen:
What ROM are you using?

How are you checking for an IMEI?

If you run the program again... does it tell you the device already has an IMEI and the program will use it?

If you are using CM7... use telephone app and dial *#06#... after you dial the last # does it give you an IMEI?

If using a different ROM... get an IMEI checker from market.

I know CM7 will not show an IMEI when you go into settings... but an IMEI checker will show it... don't remember if rooted stock or other ROMs had the same issue showing in settings.
[Nook Color Android Development] joe2262:
I'm using CM7, n253 and signal bars/SOD patch.

Testing with About - Status.

Phone tip results in pop up - IMEI.

Everything seems fine, thanks a bunch.
[Nook Color Android Development] newellj79:
dizzy, would this work for HP touchpad? it would sure be nice to use the xda app.
[Nook Color Android Development] DizzyDen:
Since I missed out on theTP sale... I can't test... but if the folder structure is the same there is no reason it won't work.

The only thing I can think of that might not work is writing the imei file to /ROM
[Nook Color Android Development] newellj79:
okeydokey... I'm about to boot from linux to windows to try it. Will report back.

Edit.... must have worked because I'm typing this on my touchpad via xda. I did notice that it was not able to pull Mac address or serial number. Booted back to Linux, all is right in the world again. :) thanx dizzy!
[Nook Color Android Development] DizzyDen:
That would be what I expected... since the IMEI generator looks for device serial number and MAC address in the nook's /rom/SerialNumber and /rom/MacAddress files... if someone want to provide me (edited) files for the TP I can make the generator work natively for the TP also... the other option is to simply input a "seed" or an IMEI to use for generation.
[Nook Color Android Development] Dalmus:
Just a quick update...

I'm starting to wonder if some of the developers pull ID information from somewhere besides the device ID. Or at least I wonder if the IMEI is the *only* identification they use.

The reason I ask is because after giving my GF's Nook Color a unique ID using the script (and verified by using an IMEI reader from the Market), her "Fashion Story" store was accessed by another person within a week.

Its frustrating for her, but on the other hand, apps such as Swype work fine. That's why I wonder if there's an alternate field they are pulling from the device.

BUT, all in all, this is a fantastic script!
[Nook Color Android Development] gallahad2000:
Might be worth contacting the developer. So many apps use in-app purchases now-a-days. It doesn't seem secure if you can access it using only an IMEI.
[Nook Color Android Development] nocode99:
Is it possible to do the IME portion manually? I'm trying to figure out how to get some of the Gameloft HD games to work on the Touchpad (mainly Let's Golf 3 HD) as the build.prop file wasn't enough. I could provide files from the latest CM7 build for the Touchpad if that helps.

The generator is a little above my head right now
[Nook Color Android Development] DizzyDen:
You could edit the ini file to include the IMEI you want to use.... I DON'T recommend using one IMEI for more than one device... it defeats the purpose since its supposed to be unique to each device.

If you don't have the device hooked up... or if the /rom structure is different... the program should pop up a window for you to enter an IMEI or a seed for it to use to generate one... it will still patch your framework.
[Nook Color Android Development] nocode99:
Okay, so when I run the program, it asked for the Nook IP (which I cancelled. I don't need this if it's not a Nook?) and then asks for the framework.jar location, in which I point to the CM7 zip build, correct? It will find the framework.jar file and modify it accordingly. From there, I reflash my device? I'm not in front of my machine, but I there was a 3rd prompt and I was unsure of.
[Nook Color Android Development] DizzyDen:
The first question it should ask is if you are updating a Dev's ROM... answer yes... then it will ask you to find the zip file....

At this point it will make a backup of the rom and extract framework.jar and build.prop

You can try the program while running wireless adb on your device and see if the program can pull your serial number... if not then it will prompt your for an IMEI seed (if you use numbers, it will use what you enter).

At this point it will generate an IMEI and pop up a window telling you what it found for your Serial Number, MAC address and what it generated for the IMEI.

at this point it will updated the backup copy of the zip file (the one with "-IMEI.zip") and clean up after itself.
[Nook Color Android Development] MaxRabbit:
This worked on my Kindle Fire! Thanks so much; going to make a guide on how to do it and link your work :)

By the way, I know it works because the XDA app now works (finally), but *#06# results in "00-cat: c-an't o-pen" Any idea why?

PS: Does this clear the Dalvik Cache? The first boot took forever and scared the crap out of me :P
[Nook Color Android Development] DizzyDen:
OK... the 00-cat: c-an't o-en" I thought I had resolved before... that is because the program can't open a "/rom/imei" "/rom/MacAddress" or /rom/SericalNumber" file... I'm afraid it probably generated that IMEI and that is not a good thing... I'll look into resolving that again for devices other than the Nook....

The first boot will take forever because of it changing the framework.jar file... the program itself does not do anything to clear anything off your device.
[Nook Color Android Development] MaxRabbit:
What is it that you think happened that was bad?
[Nook Color Android Development] DizzyDen:
The thing I think is bad is that the program generated an IMEI that is actually

"00-cat: c-an't o-pen" when it couldn't read files from /rom. I need to change what it does when it can't find the serial number, MAC address or imei files in /rom. I thought I had gone through that once... but I think it was happening under slightly different circumstances...

It will be fixed when I get home from work tonight... been meanin to do a few minor updates to the program anyway... now I have a reason.

If I could get information on how some other devices store their device specific information it would help tremendously... but maybe using return from adb devices may be useful in some situations.
[Nook Color Android Development] MaxRabbit:
Ooohhh! Interesting! Hey, any way I can help just let me know; may need a tad of hand-holding as to getting what you need though.
[Nook Color Android Development] racks11479:
Dizzyden. Hows everything sir. Hope all is well. Question. Would your program be able to be wrapped in a bash script somehow?
[Nook Color Android Development] DizzyDen:
Shoot me a pm... we'll try to arrange a time to get together to see if we can get the structure its using.

I'm trying to work time in to do that... and a couple of other ideas... I can provide you the autoit script I wrote this in and we can bounce ideas if you'd like... always admired your work.
[Nook Color Android Development] DizzyDen:
deleted... double post
[Nook Color Android Development] racks11479:
That would be awesome! Shoot me a PM with the script and I'll take a look at it.

Thanks again for your work! :D

-Racks
[Nook Color Android Development] DizzyDen:
Finally got around to sending it... when we can get together there are a few changes for ver 1.9 to try to help other devices out... mainly to get serial number from the device... we'll talk about some of the issues I have encountered with that.

Maybe together we can come up with on device app... what I'd like to do is patch the framework.jar to read the imei directly from a file as opposed to have to patch the imei directly into the elephoneProvider.smali.
[Nook Color Android Development] DizzyDen:
IMEI Generator 1.9 uploaded

Current version: !IMEIme 1.9

Read the entire OP everytime you download

I try to keep newest info at the top... but things do change.

Bug reporting thread for !IMEIme

New features:

For non-Nook Color devices I have added a method of detecting serial numbers by using ADB's get-serialno method... one problem with it is if you connect via USB it reports the ip address as the serial number and the program will not accept that as the serial number and you will have to manually input serial number, desired IMEI or seed via the manual input prompt. If your device serial number is non-hex or decimal in the first 4 digits you will also have to utilize manual input.

In both situations above.. the manual input box will automatically appear.

Added more "generic" type of checks... you cannot use "1234" as the beginning... also checks for "1122" as the first 4 digits since some version of recovery with adb access use 1122334455...

NEW ini setting

none in version 1.9

BUG FIX

Serial Number detection in non-Nook Color devices... with known limitations as mentioned above.
[Nook Color Android Development] Chinpokomon:
I installed this on my HP Touch pad running CM9 Alpha 0.5 last night and it worked, as evidenced by my ability to sign in and post this reply from the XDA Android app. Apparently the tool was unable to read my MAC address, but it looks like it was able to read the serial.

This project needs more exposure since it is proving itself valuable beyond the Nook Color only. OP, consider posting this under Android Hacking and Development, rather than just the Nook Color forums. I'd love to see CM and derivatives with an already modified framework.jar, so you could set the IMEI by putting a text file on the internal storage somewhere. Maybe AOSP source could be modified such that if there isn't an IMEI built into a device, it could be generated the first time an AOSP ROM is booted.

OP, if you didn't have to modify the framework.jar, could you not generate the IMEI on device, without requiring an ADB connection?
[Nook Color Android Development] DizzyDen:
Actually... on device generating and patching is one of the items I'm researching... even if it has to always patch the framework.jar file (which I am going to assume we'll always have to do)... my intent is to store the text file with the IMEI in it on device (I use Nook's ROM partition for this on that device... but will include system partition on devices that don't support ROM partitions) and have the framework.jar read the IMEI from that file. That way we won't have to hard patch the IMEI into framework.
[Nook Color Android Development] Benzoman:
I recently updated to the latest MiRaGe - KANG 02012012 from here.

http://xdaforums.com/showthread.php?t=1344873

I did everything I usually do which is to flash the latest MiRaGe update.

Then hook up to the usb and run your program (using the latest 1.9).

This has worked many times in the past, but this time I got the generic IMEI error and it shuts down when I using the ini unchanged. I changed the ini "part" to what you see below and it goes through and works fine.

Encrypt_IMEI = 0
; If 0 then uses actual data for IMEI... i.e. Serial Number (first 15 digits) or MAC Address is actual IMEI
; If 1 then program encrypts data for IMEI generation... hiding actual Device data

Is there any disadvantage or caveats by changing this setting?
[Nook Color Android Development] DizzyDen:
There is no disadvantage to leaving the IMEI unencrypted.
[Nook Color Android Development] Benzoman:
Any idea why this would happen only with the latest mirage? Just curious don't really need to know. LOL
[Nook Color Android Development] DizzyDen:
No idea right now... I guess I could load mirage up and see if I can see what's happening...

It could be the version of busybox... broken symlinks to busybox (although I believe my program should not be impacted since I explicitly issue "adb shell busybox" commands.

Hook your nook up and do adb get-serialno and adb devices.... see what it reports.

You can also issue

adb shell busybox cat /rom/devconf/DeviceID

That's the command that the generator uses to read the Serial Number from the nook...

adb shell busybox cat /rom/devconf/MACAddress

reads the MAC Address from it... also used by the generator.
[Nook Color Android Development] Benzoman:
First let me say that I am running Mirage 7.2.0 KANG 02012012 directly connected to USB. Using Windows 7 x64. With Dizzy Den's program running on my desktop.

After testing many times to duplicate the problem.

I found that if I delete the .ini file, then run the program to generate the .ini file it gives the Generic IMEI error.

Not doing "anything" except running the program again. Everything works fine. Delete the .ini and I get the error again. Run it a second time without touching the .ini file and everything works fine. Rinse and repeat if desired. :rolleyes:

How I came to believe it was the .ini setting in the first place?

I apparently had deleted the .ini file before I ran the program and right after installing the latest mirage 02011212 update.

Then I changed some settings in the .ini and it worked. (Actually only working because it was being ran for a second time without deleting the .ini again.)

Then I deleted the .ini so the program would recreate it with default settings and ran the program. It gave me the error again.

So, I wanted to determine which setting in the .ini was the reason for the error and the Encrypt_IMEI jumped out at me first so I changed it. I ran the program again and it worked. (Of course only because it was being ran for the second time without deleting the .ini. NOT because of anything I changed)

Not thinking anything about the .ini being deleted and rebuilt by the program causing the error. I assumed it had to be the Encrypt_IMEI setting I changed that fixed the Generic IMEI error.

I probably would have had the same error with any update I had flashed.

Advice:

First, don't delete your .ini file. If you update or re-flash your ROM. You probably need to run this program. If you have deleted your .ini, file run the program a second time without changing anything. It should then work without error.

In conclusion don't "assume" anything without confirming it. :o

@DizzyDen Everything with adb you suggested I try came back fine.
[Nook Color Android Development] DizzyDen:
Thanks for the information regarding the root cause... I will look into which setting is getting initialized incorrectly when the ini file is deleted... since that *should not* cause this problem.
[Nook Color Android Development] DizzyDen:
The only way I have been able to duplicate your situation is if I leave the nook not connected, do not connect via wifi and leave the IMEI seed blank when asked. This is by design, not an accident. I am making it as complicated as possible for anyone to generate what could be considered a generic IMEI.

Bottom line is if the program cannot communicate with the device... you will have to enter information.
[Nook Color Android Development] Miltani:
my nook still does not have any imei even though the program says it has pushed the framework in successfully. What could be the problem here?
[Nook Color Android Development] DizzyDen:
How are you checking for an IMEI? If using the menu... about phone... it will not show... If using CM7 you can dial *#06# and the IMEI will show when you hit the last #... if using a different ROM that does not support?*#06# then use an IMEI application from the market (now Google Play). Show Me My IMEI is a good one.
[Nook Color Android Development] Miltani:
i've tried *#06# and no imei number is shown

used that that app too and all i have is a blank line

i'm currently using mirage latest rom.

However the strange thing is when i run the imei generator the first time, it says that there is already an imei number in it.
[Nook Color Android Development] DizzyDen:
The reason it says the device already has an IMEI is because the program successfully wrote the imei file to the ROM partition... it will always check that to minimize the chance of an accidental change in IMEI.

I am assuming you are using in-place... but following the suggested bug report guidelines would seriously help... I have no idea if your install is on SD or eMMC... in-place... does updating ROM zip file and flashing work... etc.

From your symptoms it appears the framework.jar is not being pushed to /system/framework properly... but the originaly framework.jar is being copied to framework.jar.bak... that's why the program indicates success.
[Nook Color Android Development] Miltani:
sorry about not following the guidelines but here goes

Function attempting: In Place Upgrade

Error Messages: There isn't any error message

End result: program says that it is successful

Environment: ROM on same drive as IMEIme.exe, running [CM7.2-RC1] MiRaGe - KANG build of CyanogenMod Update 03/04/2012 on emmc, running wireless adb

!IMEIme.ini settings: used the default ini setting that is generated upon running

P.s i have not tried updating rom zip file and flashing it. currently only tried in-place
[Nook Color Android Development] Miltani:
it's working now when i didn't use wireless adb and went for usb adb. Thanks for your help dizzyden
[Nook Color Android Development] DizzyDen:
Glad it is working... the only thing I can think of with your symptoms would be the nook slept and wifi shut down in the process.
[Nook Color Android Development] Jiggity Janx:
PDroid Privacy

Believe me when I say I truly appreciate all the hard work devs put into streamlining devices. Thank you for this and please keep up all your support.

Having said that I would like to point out another option for IMEI on the Nook Color. PDroid privacy allows not only to restrict access to information that doesn't cause an app to force close but allows defining your own or randomizing an IMEI.

http://xdaforums.com/showthread.php?t=1357056

*I am not affiliated with PDroid, just like minimizing the "fixes" I accomplish when flashing new builds/etc.
[Nook Color Android Development] Miltani:
i believe that isn't the case as my timeout for my nook screen is 30mins. but anyway glad that it's working now :o

anyway i read a few pages back that people are putting in samsung galaxy s into the device info at the .ini file there. What does it actually do? Will my nook be identified as samasung galaxy s in the market?
[Nook Color Android Development] DizzyDen:
I certainly am not putting down PDroid here, as I have no inside knowledge of how the impliment IMEI generation and use.

The only issues I have with their method is that "randomizing" it will cause the IMEI to change every time one has to wipe data and re-run it and if they don't have check in place for someone setting some of the "default" or "generic" IMEI's used in previous methods then SEVERAL people can wind up with the same IMEI.

I used the methods for generation I did to specifically avoid this situation. By using the device serial number or MAC address... it is extremely unlikely anyone will wind up with a duplicate of someone elses... even my method of using an IMEI "seed" to generete one causes reasonable certainty of a unique IMEI. Additonally, by using a test patterened IMEI will ensure nobody winds up with someone elses legitimate IMEI.

Yes... the build.prop edit section will advertise the device as a Samsung Galaxy S device... that initially came about due to market limited visibility issues.
[Nook Color Android Development] Miltani:
you said initially does that mean there no need to edit it now?
[Nook Color Android Development] DizzyDen:
I honestly cannot tell you whether build.prop edits are necessary now or not... things are always changing in our world... and in Google's... I always use the edits.
[Nook Color Android Development] Miltani:
just wondering wouldn't it be better if we use the galaxy s2 or even galaxy note or maybe galaxy tab in place of just galaxy s only in the build.prop?