[IMEI] IMEI Generator

Do you want the method of exiting changed?


  • Total voters
    4
  • Poll closed .
Search This thread

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
Getting the generic error with 2.0b

It doesn't work for updating a rom from a seed. (Settings used are attached).
*Also does not work using adb over wifi.
*Grabbing Phiremod now in case this error is specific to the Mirage KANG.
*Phiremod pulling serial using adb over wifi also fails

Use_serial_number is set to 1, not True.

****Randomly hitting buttons, I think I may have found the problem: "Use Previous Fix", if this is clicked it will return the generic error and it is clicked by default.
****Unclicking "Use Previous Fix" works for both adb over wifi and typing in the seed.

OK... thanks for you delving deeper... I will look into why Use Previous Fix is failing... I am assuming you don't have the imei.fix file in the folder... will have to make it not think generic if that's the case...

Should have 2.1 up sometime this evening with that fixed... but the include custom patches will probably wait for 2.2 now ;)

If you do have an imei.fix file... could check one more thing I'd appreciate it.... what does your imei.fix file have for the IMEI on line 8?
 
Last edited:

gallahad2000

Senior Member
Jul 9, 2009
542
86
If you do have an imei.fix file... could check one more thing I'd appreciate it.... what does your imei.fix file have for the IMEI on line 8?
No problem, thank you for your continued work on this project.

I don't have an imei.fix file and don't know how to generate one.

Thoughts:
I'm not sure what a lot of the buttons are for. I feel like I'm a fairly competent andro-phile but I don't know whether to use a 15 digit, 17 digit, encrypt, etc. I also wasn't sure what the build.prop edit button did until I read the IMEI.ini. It might make more sense to just have the device info and lcd buttons without another "master switch."

Also, I've noticed with this last install that the build.prop edits require more changes than they used to. I think google has noticed modders altering the build.prop and now check more locations for compatibility. I'll have to test compatibility with this app's patch tonight when I flash the rom but when I manually made the standard changes a few days ago the market was still blocking a lot of apps.
 
Last edited:

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
No problem, thank you for your continued work on this project.

I don't have an imei.fix file and don't know how to generate one.

Thoughts:
I'm not sure what a lot of the buttons are for. I feel like I'm a fairly competent andro-phile but I don't know whether to use a 15 digit, 17 digit, encrypt, etc. I also wasn't sure what the build.prop edit button did until I read the IMEI.ini. It might make more sense to just have the device info and lcd buttons without another "master switch."

Also, I've noticed with this last install that the build.prop edits require more changes than they used to. I think google has noticed modders altering the build.prop and now check more locations for compatibility. I'll have to test compatibility with this app's patch tonight when I flash the rom but when I manually made the standard changes a few days ago the market was still blocking a lot of apps.

I understand where you're coming from... perhaps a little insight to my thinking will help... and rememer... I earned the Dizzy part of the nic ;)

Use 15 or Use 17... does not matter at this point... I intend to include the calculation routine to be able to use 15 digit IMEI... the option has always been there in the ini... but is ignored as of now... it always generates 17 digit IMEI's... so either radio works the same (for now).

The encrypt IMEI check is for the conspiracy theorists who do not want 15 digits of their Serial Number or MAC address being used in its "raw" form... the program will use an internal encryption to the information to create its own unique number from the information.

The "master switch" for build.prop edits... I thought about this one a LOT... it is a quick easy way to disable build.prop edits (only one button to uncheck to disable)... may change my mind on this if enough want me to do away with it.

The new use of the devices.dat file should aid in the additional build.prop edits needed. I include ro.build.fingerprint now as well.

When I started working hot and heavy on the GUI I create a thread for input for device information and asked for input to the GUI itself... When I didn't receive opnions, I just went forward from what I had in the ini file and what device information I had available.

BTW... if you have your previous ini file... the program will read the settings in it and use them...

All of the options should also have a mouse-over pop up explaining the setting as well...

Also... the Hybrid is non-functional at this point... another down the road intent... it will work the same as the program did with both Serial Number and MAC address set to 1 in the ini file and will base the IMEI off of the Serial Number.
 
Last edited:
  • Like
Reactions: gallahad2000

otaku91

Senior Member
Dec 26, 2010
79
6
Quick Question, will choosing the Kindle Fire Option in the build.prop edits allow me to install Kindle Fire Edition apps in the Amazon App Store?
 

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
Quick Question, will choosing the Kindle Fire Option in the build.prop edits allow me to install Kindle Fire Edition apps in the Amazon App Store?

I don't know... you could give them a shot... don't know if they will work on our hardware or not... onlyl put that in because some people using Kindle Fire use the IMEI Generator.
 

vesponauta

Member
Apr 4, 2009
13
0
I have a newbee question :) When i'm trying to generate a new imei i have a result like this 00-5684-5214-698 etc.
Can i eliminate the - from the imei?
 

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
I have a newbee question :) When i'm trying to generate a new imei i have a result like this 00-5684-5214-698 etc.
Can i eliminate the - from the imei?

While there are no signs of strict enforcement of the standards when it comes to use of IMEI's, I have chosen to have the program adhere to those standards.
 

luci5r69

Member
Jun 11, 2012
16
0
Guys,

I'm sorry to be a n00b here but I'm having a slightly hard time understanding how exactly to use this application.

I have a Nook Color (1.4.2) and I've used Verygreen's CM7 on SD Card method to run CM7 on my NC. Everything's running great -- no problems. However, I simply want to make the NC appear as a "Samsung Galaxy Tab" to the market, and I believe I can do that using this app, I just don't know how.

Can anyone guide me?

Thanks!!
 

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
Guys,

I'm sorry to be a n00b here but I'm having a slightly hard time understanding how exactly to use this application.

I have a Nook Color (1.4.2) and I've used Verygreen's CM7 on SD Card method to run CM7 on my NC. Everything's running great -- no problems. However, I simply want to make the NC appear as a "Samsung Galaxy Tab" to the market, and I believe I can do that using this app, I just don't know how.

Can anyone guide me?

Thanks!!


The generator is still going to patch framework.jar with an IMEI... no problem there at all... what you need to do is run the generator...
1. Select if you want to update ROM for flashing to device or want to Update Device (in-place update)
2. If you are going to use device for IMEI (recommended) OR are going to use in-place update... check either ADB(usb) or ADB(WiFi) or both...
3. Select whether to base generated IMEI off of Serial Number or MAC Address...
4. IF you are a conspiracy theorist... check Encrypt IMEI
5. you can enter NOOK's serial number where it says IMEI_or_SEED if you want... or if you are not pulling the info from the device via ADB...
6. make sure Build Prop Edits is checked...
7. make sure Device Informatino is checked... Select either DizzyDen's Settings (Samsung GalaxyS phone) or Samsung Galaxy Tab from the drop down list of devices...
8. if you want to change the LCD Density... check it and select LCD Density you want (you can also type in a Density if you want non-standard)

That is all you NEED... but I recommend checking Cleanup when exiting and Save Changes.

Checking Use Previous Fix will assist in not having to pull information from the device on future runs of the program... since it will save the generated imei.fix file for patching framework.jar on future updates.

Hopefully this information helps you out... btw... all of the radio buttons, check boxes and entry . drop down combo boxes have mouse over infromation explaining what the option is for.
 
  • Like
Reactions: luci5r69

luci5r69

Member
Jun 11, 2012
16
0
The generator is still going to patch framework.jar with an IMEI... no problem there at all... what you need to do is run the generator...
1. Select if you want to update ROM for flashing to device or want to Update Device (in-place update)
2. If you are going to use device for IMEI (recommended) OR are going to use in-place update... check either ADB(usb) or ADB(WiFi) or both...
3. Select whether to base generated IMEI off of Serial Number or MAC Address...
4. IF you are a conspiracy theorist... check Encrypt IMEI
5. you can enter NOOK's serial number where it says IMEI_or_SEED if you want... or if you are not pulling the info from the device via ADB...
6. make sure Build Prop Edits is checked...
7. make sure Device Informatino is checked... Select either DizzyDen's Settings (Samsung GalaxyS phone) or Samsung Galaxy Tab from the drop down list of devices...
8. if you want to change the LCD Density... check it and select LCD Density you want (you can also type in a Density if you want non-standard)

That is all you NEED... but I recommend checking Cleanup when exiting and Save Changes.

Checking Use Previous Fix will assist in not having to pull information from the device on future runs of the program... since it will save the generated imei.fix file for patching framework.jar on future updates.

Hopefully this information helps you out... btw... all of the radio buttons, check boxes and entry . drop down combo boxes have mouse over infromation explaining what the option is for.

THANK YOU!! Thank you so much for such a detailed explanation. I was trying to understand everything using the explanatory mouse-hovers on each time but I was still failing and I think primarily I didn't want to just go ahead and do something and figure out later if I screwed something up or not.

LOL about the 'Conspiracy Theorist' comment. I'll leave that one unchecked; I'm one of those who does believe we landed on the moon ... LOL.

I've understood all settings well now and I'll use the Samsung Galaxy Tab option; I only have one question. The LCD Density ... I don't quite understand that one, I'm not sure what it does and more important, in my case, if I should change it and if so, to what.

Thanks!!
 

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
LCD Density is like changing the density on your computer... except it is backwards... higher number will cause icons and eveything be bigger.

NookColor stock =169.33333
CM7 CM9 = 160
Phone GUI generally = 240

Some people like larger layout and text with CM* and will select 240
 
  • Like
Reactions: luci5r69

luci5r69

Member
Jun 11, 2012
16
0
LCD Density is like changing the density on your computer... except it is backwards... higher number will cause icons and eveything be bigger.

NookColor stock =169.33333
CM7 CM9 = 160
Phone GUI generally = 240

Some people like larger layout and text with CM* and will select 240

Thanks for the explanation; I was able to look up information similar to that and proceeded with the "160" option for the LCD Density.

So I just used the Generator and everything went very well; I can see now that on the Market the phone is appearing as an "SPH-P100" instead of "B&N Nook Color" ... so your Generator definitely did the trick and works excellent. Thank you so much for such a wonderful program.

Unfortunately, I'm still back on Square One with the issue for which I started this whole shenanigan. Although my NC is now appearing as a Samsung Galaxy Tab (Thanks to your program), the Apps that were coming up as "Incompatible" before are still coming up as "Incompatible" now with the SPH-P100. I'm not sure why.

Take a look at this:

Android.PNG


Is this normal? So you really can't install some apps for an android tablet on the NC even if it appears as the Samsung Galaxy Tab? Should I be using some other option (besides Samsung Galaxy Tab) to be able to install these apps?

Thanks again; I appreciate it.
 

drmxmyt

Senior Member
Aug 29, 2011
351
93
istanbul
I have a weird issue. im using nook simple touch. tried that tool at first time via adb wireless, seemed like working, device reset etc, but imei wasnt fixed, it was changing constantly. i tried to run it again, and this time said: this device already has an imei, and will use that.. anyway, finished, rebooted but nothing happened again, my imei was changing constantly.(i was checking it with show me my imei). whatever i did, didnt worked.
then i formatted my device, and tried again, it kept saying this device already has imei, will use that(even after format? how can it be possible?).. i checked the crc of the file before and after the use of program and they are same, so program doesnt change my framework.jar at all.
i decided to use an install zip. copied my framework.jar into it, opened the program. it finished and i checked the crcs of framework.jar`s again, it was the same. somehow the program keep saying the device already has an imei, and doesnt change my framework.jar no matter what i do.
i also coppied the jars from my few months old backups and tried with that jars too. didnt worked. now show me my imei shows me a blank line..
(i did several chace and dalvik-chace cleanups, and also used imei generator with almost all settings in that proccess..)
 

DizzyDen

Senior Member
Feb 7, 2011
1,301
567
The reason the IMEI Generator tells you the device already has an IMEI is that it puts a file on /rom called imei and uses the value from that.

First thing I'd check is the version of java on your machine.

Does the IMEI generator show your serial number and MAC address?

EDIT I have no idea why the IMEI would be "changing constantly" since the method currently used patches the IMEI directly into the framework.jar in /android/telephony/TelephonyManager.smali

There will be an update soon that no longer patches the IMEI hardcoded this way... when using Serial Number and not encrypting at least... the patches when using raw serial number will be:

Code:
# /com/android/internal/telephony/gsm/GSMPhone.smali
# rename current getDeviceId() to getDeviceId2() then paste this at the end
#

.method public getDeviceId()Ljava/lang/String;
    .registers 5

    .prologue
     sget-object v1, Landroid/os/Build;->SERIAL:Ljava/lang/String;

    .local v1, str:Ljava/lang/String;
    new-instance v0, Ljava/lang/StringBuffer;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
    move-result-object v2

    invoke-direct {v0, v2}, Ljava/lang/StringBuffer;-><init>(Ljava/lang/String;)V

    .local v0, sb:Ljava/lang/StringBuffer;
    const/4 v2, 0x0
    const-string v3, "00-"

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuffer;->insert(ILjava/lang/String;)Ljava/lang/StringBuffer;

    const/16 v2, 0x9
    const-string v3, "-"

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuffer;->insert(ILjava/lang/String;)Ljava/lang/StringBuffer;

    const/16 v2, 0x10
    const-string v3, "-"

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuffer;->insert(ILjava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

This will result in anything calling GetDeviceID() to return the first 15 digits of your Serial Number formatted as a test pattern IMEI and not having to hard code the IMEI into framework.jar

Thanks a ton to HacDan on IRC for this... I finally got it working for other ROMs after you got it on CM9... I knew if it worked in there.. I could get it working on others

EDIT2: did you use PDroid or something else that generates random IMEIs?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 57
    Current version: !IMEIme 2.2.0.4

    Bug Fix
    Fixed bug in use previous patch that could result in variable used before declared error.

    Changed processing order when custom patches were to be used
    The program will now process custom patches prior to editing framework.jar and build.prop edits. With new kernel patches requiring a new build.prop users would lose build.prop edits if the kernel was included in custom patches, the program will now patch any user modifications, then process IMEI generation and build.prop edits.

    Updated to work with ROMs that do not include GSMPhone.smali
    Recently, many ROMs are not including GSM phone utilities in framework.jar. I have added testing for missing GSMPhone.smali and patching via TelephonyManager.smali if necessary.

    UPDATED FILES UPLOADED
    MANY of the support files have been updated to the newer versions (smali, baksmali, adb and components).
    I encourage you to delete all files in your existing IMEI Generator folder and use the new !IMEIMe.exe to generate the files necessary.

    The devices.dat file if you've used the previous version has several issues that prevents the device model from being correctly patched on many of the devices. This has been fixed here and in the device list thread.

    There is a known issue with the GUI when your screen settings are set at 125% in Control Panel - Appearance and Personalization - Display... I will work on fixing that in the next release.

    Bug reporting thread for !IMEIme
    Device list thread

    New features:
    Will patch GSMPhone.smali if present in framework... patches TelephonyManager.smali otherwise.
    I chose this method since more ROMs are coming out for wifi tablets that do not have GSM phone information included in framework.jar. I was playing with CM10.1 and discovered GSMPhone.smali is not present, thus I was getting unable to patch GSMPhone.smali error, and there was no patching for an IMEI. In all honesty... this should be irrelevent, since IMEI is only utilized in cellular communications on GSM phones... however... some applications MAY (xda free does) require an IMEI to work, even on wifi only devices.

    ODEX files still in the works
    odex file support... I think this solution will work on odex file systems as long as the patching is done on the ROM prior to flashing to device (anyone using odexed system please let us know) and I am working on in place patching on odexed systems... however, I am not completely comfortable since there is a lot of work done by the device itself during odexing of the modified files... I am very hesitant since any mistake could render a bricked device and I don't have a system to test with prior to release.

    Previous Important Changes
    The new version of the IMEI Generator will no longer overwrite your existing devices.dat file with the current. To use new devices.dat file, delete the old one prior to running the program, or download the new one and unzip it in the IMEI Generator directory.

    Device Communications not necessary in certain situations
    If you select to Update ROM, using Serial Number based IMEI and do not select Encrypt IMEI, the program will no longer need to communicate with the device when performing its tasks. The framework.jar patch will not hard patch the IMEI in this situation as before. This is useful for patching a ROM for distribution to multiple people, since they will all maintain unique IMEI's. This is accomplished with the following change in the framework.jar
    Code:
    /com/android/internal/telephony/gsm/GSMPhone.smali
    .method public getDeviceId()Ljava/lang/String;
    [b]changed[/b]  iget-object v0, p0, Lcom/android/internal/telephony/gsm/GSMPhone;->mImei:Ljava/lang/String; 
    [b]to[/b] sget-object v1, Landroid/os/Build;->SERIAL:Ljava/lang/String;
    prior to patching in code to prepend "0"
    
    .method public getDeviceSvn()Ljava/lang/String;
    [b]changed[/b] iget-object v0, p0, Lcom/android/internal/telephony/gsm/GSMPhone;->mImeiSv:Ljava/lang/String; 
    [b]to[/b] sget-object v1, Landroid/os/Build;->SERIAL:Ljava/lang/String;
    prior to patching in code to prepend "0"
    To try to explain the above a little...
    The above is always changed, no matter what IMEI generation method you select...
    If you select Serial Number and New Type IMEI and not Encrypt: no other patching is done for the IMEI... this can be implemented on many devices, since each will have a unique serial number.
    If you select Serial Number and do not select New Type: additional code is added to format the IMEI to the old standard ("00-" and "-"s)... this can be implemented on many devices for same reason.
    If you select MAC Address or Encrypt (or both): additional code is added that results in the IMEI being hard coded, this makes it very much device specific.
    If you select MAC Address or Encrypt (or both) and do not select New Type: additional code is added that results in the IMEI being hard coded as well as code to format the IMEI, this makes it very much device specific.

    Use Custom Patch NOTE: This is only used when patching a ROM
    This is going to take some major explanation, since I ran into so many possible scenarios...
    One thing of note... the only additional lines added to updater-script will be for files in the base directory
    The order of processing is:
    1. Original ROM updater-script and files
    2. Custom Patch zip file
    3. Custom Patch folder

    The program will utilize folders (from Patch zip file or Patch folder itself) named modboot, modsys, or system (not case sensitive in windows) as well as files in the base folder
    Any files in modboot will be moved to the root of the **ROM**-IMEI.zip file and lines added to updater-script as needed
    Any files in modsys will be moved to the system directory of the **ROM**-IMEI.zip file
    If Custom Patch is checked...
    /META-INF/com/google/android/updater-script is extracted from the ROM
    the program will ask you to select the Custom Patch Folder
    If there is a zip file present in the folder the program will ask if you want to use it
    You have 3 options, "Yes", "No" or "Cancel"
    Yes = Use the zip file
    No = Don't use it, select another
    Cancel = Don't use a zip file
    If you use a zip file, it will extract the zip file and process the updater-script in it for any additional lines needed
    After the above, any non-zip files and modboot, modsys and system directories in the Patch Folder will be processed

    I chose this order so you can have a "go to" patch zip file, and test other additions by using the file, folder options prior to including them in the zip.

    Example here:
    I have my custom patches in folder /CM7/UserMods with these contents:
    /META-INF
    /modboot
    /modsys
    patch.zip

    The program processes patch.zip first, then overwrites any files with the files in modboot and modsys
    It also processes /META-INF/com/google/android/updater-script for any lines extracting files to /boot and adds them to the original ROM updater-script if not already there.
    It then adds lines for any files originally in /modboot to updater-script to extract them to /boot

    "New IMEI Type" of IMEI which no longer has the "-"s in it, but maintain backward compatibility for those who already have IMEI's generated or prefer the old style. When the new type is selected in the GUI:
    NOTE: Per the IMEI standards... Using a single 0 prepended to the IMEI indicates a TEST IMEI for a country with 3 digit international code... while it should have no implications to us since we are not on a cell... it may provide potential country validity issues... I will monitor this and resort to 00 prefix in the new type of IMEI if necessary.
    ADDITIONAL NOTE: Per the IMEI standards... For devices without an IMEI, they are to provide a unique serial number to be used... This program modifies framework.jar to allow this.

    I am now patching framework.jar in the /com/android/internal/telephony/gsm/GSMPhone.smali file instead of /android/telephony/TelephonyManager.smali (this change is what allows the information to display in the about tablet information)

    I am renaming and patching 2 functions... getDeviceID() and getDeviceSvn()
    By patching the two functions in this file... the IMEI now shows in Settings... About Tablet... Status... no longer have to use external program or dial *#06# to verify the device is patched.
    getDeviceID() shows it in IMEI
    getDeviceSvn() shows it in IMEI SVN

    You can rename or copy !IMEIme.ini to IMEIme.ini and the program will work.... useful for *nix users and probably mac users... since they have issues with special char actors (!)... While I like to use it in windows to keep the executable and ini file at the top of the file list in windows explorer... anyway...
    The program looks for IMEIme.ini first and uses it if present... if it is not... it then looks for !IMEIme.ini (which will be there... because the program installs the generic !IMEIme.ini if it isn't ;)) This also provides a good way to keep your ini.. and see the new settings in the compiled in ini.

    GUI selection and related ini setting
    GUI: New IMEI Type
    INI Setting:
    New_Type =
    ; If 0 then the old type of "00-XXXXXX-YYYYYY-ZZZ" will be used
    ; If 1 then the new type of "00XXXXXXYYYYYYZZZ" will be used

    BUG FIX
    No known or reported bugs to work out.

    !IMEIme.ini file default settings and explanation:
    Code:
    ;The setting options are 1 (use the option) or 0 (don't use the option)
    ;WiFi IP Address can be set to your Nook's IP address here to a default to use
    ;IMEI can be set to a default here... you can also set the seed you use for generation
    ;Setting Device_Manufacturer to anything will result in an edit to build.prop setting the entered manufacturer
    ;IF Device_Manufacturer is NOT blank then:
    ;Setting Manufacturer_Device to anything will result in an edit to build.prop setting the entered device
    ;
    ;NOTE: ONLY Device_Manufacturer is necessary for this edit... there have been no software that appears to
    ;      require a device edit
    ;
    ;Setting LCD_Density will result in build.prop edit for this setting regardless of Device_Manufacturer setting
    ;
    ;Set all options in [Settings] section at the bottom
    
    [Settings_Explained]
    Use_In_Place = 1
    ;   If 0 Disable In Place patching... useful for those who always update AOSP ROM files and never patches on device framework.jar
    ;   If 1 Enables In Place patching if ADB is working
    
    Use_Previous_Patch = 0
    ;   If 0 Ignore IMEI.fix
    ;   If 1 AND IMEI.fix exists... use it for patching
    
    Use_Serial_Number = 1
    ;   If 0 then do not base IMEI off of Device Serial Number
    ;   If 1 then base IMEI off of Device Serial Number
    ;   NOTE: This takes priority over Use_MAC_Address
    
    Use_MAC_Address = 0
    ;  If 0 then do not base IMEI off of Device MAC Address
    ;  If 1 then base IMEI off of of DeOvice MAC Address (last 5 hex words) (2 bytes = 1 hex word)
    ;  0A is converted to 010, FF is converted to 255 etc.
    ;   NOTE: Use_Serial_Number takes priority
    
    Use_Manual_Input = 1
    ;   If 0 then Manual Input disabled
    ;   If 1 then Manual Input enabled
    
    Encrypt_IMEI = 1
    ;   If 0 then uses actual data for IMEI... i.e. Serial Number (last 15 digits) or MAC Address (last 5 hex words) is actual IMEI
    ;   If 1 then program encrypts data for IMEI generation... hiding actual Device data
    
    New_Type = 1
    ;   If 0 then the old type of "00-XXXXXX-YYYYYY-ZZZ" will be used
    ;   If 1 then the new type of "00XXXXXXYYYYYYZZZ" will be used
    
    Use_ADB = 1
    ;   If 0 then ADB is disabled... this will prevent In-Place updating from working all together
    ;   If 1 then ADB is enabled... In-Place will work... IF adb is working on your device
    ;   NOTE: This takes priority over Use_ADB(usb) and Use_ADB(WiFi)
    
    Use_ADB(usb) = 1
    ;   If 0 then ADB via USB connection is disabled... I use this since some ROM's have Debug Mode issues
    ;   If 1 then ADB via USB is enabled and attempted first
    ;   NOTE: Use_ADB takes priority over Use_ADB(usb) and Use_ADB(WiFi)
    
    Use_ADB(WiFi) = 1
    ;   If 0 then ADB via WiFi connection is disabled
    ;   If 1 then ADB via WiFi is enabled... I use this since some ROM's have Debug Mode issues
    ;   NOTE: Use_ADB takes priority over Use_ADB(usb) and Use_ADB(WiFi)
    
    Clean_Up = 1
    ;   If 0 then the program will leave all support files when cleaning up and exiting
    ;   If 1 then the program will delete all support files when cleaning up and exiting if none of them
    ;   existed at program start
    
    Include_Patch = 0
    ;   If 0 then custom patches is disabled
    ;   If 1 then the program will prompt for custom patches to include
    
    Device_Manufacturer = 
    ;   If blank then the program will not edit build.prop
    ;   If anything other than blank the program will edit build.prop to include manufacturer
    
    Manufacturer_Device = 
    ;   If blank then the program will not include device in build.prop edit
    ;   IF anything other than blank the program will include device in build.prop edit
    ;   NOTE: No build.prop edit will occur if Device_Manufacturer is blank
    
    Device_Model =
    ;   If blank then the program will not include model in build.prop edit
    ;   IF anything other than blank the program will include model in build.prop edit
    ;   NOTE: No build.prop edit will occur if Device_Manufacturer is blank
    
    Build_Fingerprint = 
    ;   If blank then the program will not include Build Fingerprint in build.prop edit
    ;   IF anything other than blank the program will include Build Fingerprint in build.prop edit
    ;   NOTE: This edit will occur even if Device_Manufacturer is blank
    
    LCD_Density = 
    ;   If blank then the program will not include LCD Density in build.prop edit
    ;   IF anything other than blank the program will include LCD Density in build.prop edit
    ;   NOTE: This edit will occur even if Device_Manufacturer is blank
    
    WiFi_IP_Address = 
    ;   You can enter the default Device IP address here... especially useful if you are only using this on one device...
    ;   or if you keep seperate folders for each device you use (!IMEIme.exe and !IMEIme.ini must be in each folder)...
    ;   i.e. folder for "sister" containing the program and ini file at minimum.
    ;   If blank the program will prompt you for the IP address of the device to establish ADB WiFi connection
    
    IMEI = 
    ;   Enter a base 10 (integer) and it will be used as the IMEI (duplicated until 15 digits is reached)
    ;   Enter your "seed" and the program will generate an IMEI based off of it
    ;   NOTE: If you try to generate the old GENERIC IMEI the program will not do it
    
    [Settings]
    Use_In_Place = 0
    Use_Previous_Patch = 0
    Use_Serial_Number = 1
    Use_MAC_Address = 0
    Use_Manual_Input = 1
    Encrypt_IMEI = 0
    New_Type = 1
    Use_IMEI(15) = 0
    Use_ADB = 1
    Use_ADB(usb) = 1
    Use_ADB(WiFi) = 1
    Clean_Up = 1
    Include_Patch = 1
    Device_Manufacturer = 
    Manufacturer_Device = 
    Device_Model = 
    Build_Fingerprint = 
    LCD_Density = 
    WiFi_IP_Address = 
    IMEI =

    Credits:
    mthe0ry: Credit for the original IMEI patches released for us Nookers(TM). His original thread is here...
    martian21: Took mthe0ry's work and maintained it for releases of CM7, upeating it for each nightly that needed a new one. Martian21's thread.
    HacDan on irc.freenodes.net #nookcolor for helping me figure out patching GSMphone.smali instead of TelephonyManager.smali

    Thank you's:
    paleh0rse: I believe was the first to download and test this program... I think the first bug report too... helped many users with suggestions regarding their apps.
    mr_fosi: Continues testing and reporting despite no need to. Tested a few private beta builds to help iron out a significant issue. Also providing information regarding Phone App *#06# IMEI test.
    martian21: Set the wheels turning. Provides invaluable feedback and suggestions. He is an invaluable tester and Q&A guy. Thanks for dangling that bait ;)
    mellopete: Provided the very first bug report... prompted me to include necessary files in the program itself.
    TheMainCat, 12paq and frankusb: Provided bug reports leading me to look at why some Windows versions didn't run the program initially.
    Nayla1977: Bug report regarding a mistyped EndIf in my source.
    jdexheimer: Bug report that lead me to find a problem with folders with spaces in them.
    LinuxParadigm: Bug report regarding missmatching If - EndIf's.
    BitingChaos: first public post to get me back on target.
    dillweed, garrisj and many others: for PM's indicating the importance of this solution.
    lemdaddy for reporting the bug that we tracked down to the java version and reporting back that it was the java version causing issues.
    adusumilli for reporting the bug where IMEI was generated as "00-cat: c-an't o-pen"
    topcaser for being persistent enough with the bug causing In-Place to fail in certain situations.
    HacDan on IRC for leading me in the right direction to impliment the patching of GSMphone.smali.

    We are all adults, if we break our toys... we only have ourselves to blame and we may have to buy new ones... (this will NOT break your Nook... I PROMISE you that! but it may break some of your apps... more on that later in post)

    BUG REPORTING:
    This program was initially ineteded to generate a unique IMEI based on your device S/N and update Dev's install zip files... it has become so much more, and as such there are many functions involved in this process.

    Due to the complexity the program has taken on... far beyond what I initially intended... to report bugs please try to use the following as a template:

    Function attempting: i.e. Updating ROM... In Place Upgrade... Update framwork saved on computer... etc.
    Error Messages: any error message you receive... or the last message you saw prior to the issue.
    End result: i.e. GSMphone.smali updated, ROM not... GSMphone.smali updated framework.jar not... etc....
    Environment: ROM in same folder as IMEIme.exe... ROM on same drive as IMEIme.exe... ROM on different drive... etc. (same for framework if updating framework instead)
    !IMEIme.ini settings: you can put your entire ini file if you'd like.

    If you could take notes of EXACTLY what which selection in the GUI you have selected and any buttons you click on which prompt it would be EXTREMELY helpful...

    As I said, this program has taken on functions I initially had not imagined including... the more features added, the more complex testing and tracking bugs becomes... I don't want to include a bunch of messages just for the sake of letting you know where in the code you are... would not be beneficial to you... more buttons to click for no reason, etc.

    The more detailed you can be, the quicker I can see what is happening... otherwise I have to try to duplicate what I think you are doing when you get the error.

    mr_fosi and martian21 have been very tedious in reporting bugs... I greatly appreciate their testing despite not needing to, and the manner in which they document what is going on....

    Everyone should click "Thanks" on their bug report posts... they have been instrumental in getting the program where it is so far.

    Background:
    Some developers require a unique number that is supposed to be provided by hardware manufacturers that is unique to every device. This unique number (IMEI) is extremely important in devices utilizing cellular communications.

    Since B&N has not registered IMEI numbers for the Nooks, the AOS's we are using do not acquire it as they do in other Android devices.

    The developers that require a unique IMEI have been less than receptive of our devices and past methods to provide functionality to utilize their apps.

    I decided to provide what I believe to be a viable solution to this problem.

    What this program is:
    It is a method to provide a unique IMEI (with reasonable certainty) for our Nooks.

    It IS intended to be a supplement until IMEI is addressed in dev's ROM's.
    It IS viable for Froyo... CM7... CM9... CM10...Honeycomb... MIUI.... AOKP... and others.

    I can't think of any reason it will not work with ANY ROM you choose to utilize... if you run across one... just let me know and I'll see if I can't fix that.

    What this program is not and does not do:
    This is not a perfect solution to our Nook specific issues. Let me make it PERFECTLY CLEAR there is NO PERFECT SOLUTION We are generating an IMEI from something else... I use TEST IMEI patterns based off of our device serial number, to ensure apk devs wouldn't come down on us.

    It is not targeting any specific AOS.

    It is not guaranteed to be accepted by any other developers.

    It is not intended to be the end all, beat all solution.

    It is not intended to dissuade other developers from providing what they feel is a better method.

    It will not cause any programs to show in the market. That has to be dealt with via APK developers and/or build.prop Manufacturer strings.

    Potential issues:
    There is NO legitimate solution to the IMEI issue we Nookers (TM) face... unless a group desires to register a block of them for our use... thus I am generating TEST IMEI's... ideal... no, but the only method available to us.

    While I feel, with significant certainty, there will be no negative consequences from apk devs in general, I cannot speak for them, or their logic. This can easily be disabled by them again. That is on them, not me or us. By the same token, they can decide to stop providing their service for cause, I still have no control over that.

    Above, I emphasize “with reasonable certainty” due to the fact that, in theory, you can wind up with an IMEI that 9 other Nooks that use this software has. That can only happen if the other 9 owners use this program and have a serial number within the same 10 as yours. This is even less likely with the New IMEI Type since it is using the right most 16 digits of a device serial number (and we know they all start with 2)

    If everyone who has the same beginning 15 digits utilizes this program to generate an IMEI, you will all wind up with the same IMEI. Given the number of Nooks out there compared to the number of user's hacking them.... I find it extremely difficult to believe, with a reasonable certainty, that any 2 (much less 10) devices would ever wind up with the same IMEI generated by this program. This is prevented when using the New IMEI Type

    What this program does/is capable of:
    It allows you to extract framework.jar from a developers update zip file.

    It will allow you to pull framework.jar from your Nook or use an existing framework.jar already stored on your computer.

    It will generate an IMEI based on your Nook's serial number (or MAC Address) if adb is working on your system. If you have issues running adb via USB (ADB(USB)), it provides the opportunity to utilize adb via WiFi (ADB(WiFi)) for any computer-device communications.

    It will provide you a method to manually input your serial number if you cannot connect to the device via adb. You can also input a “seed” (easy to remember word or phrase) and generate an IMEI based on the ASCII codes of the text you enter.

    It will edit /com/android/internal/telephony/gsm/GSMPhone.smali to rename any existing getDeviceId() and getDeviceSvn() function to getDeviceId2() getDeviceSvn2() and append the patch to end of that file. NOTE: When the program "smali's" the resulting GSMphone.smali... it relocates the appended function to be before the renamed function.

    It will save the patch as IMEI.fix, thus allowing you to utilize it for subsequent runs of the program. A caveat to this is... if you run it from the same folder on a friend's Nook... it will overwrite your original one if it is in the same folder or they will have the same IMEI as you do if you use Previous Run.

    It will offer to push the patched framework.jar to your Nook... IF you opted to pull framework.jar from your Nook AND adb successfully worked to do that. This facilates in place upgrading.

    It will backup the existing developers zip file appending “-IMEI” to it, distinguishing it is one this program has been used on. It will update this file, not the original developers file.

    If there are issues with file names that become duplicate in a case insensitive OS such that windows is, it will warn you of this case and not remove the updated framework.jar to facilitate manual updating of the zip file.

    Caveats:
    This program is known to work on Java version 1.6.0_23 and known NOT to work on version 1.6.0_17 or earlier. If your system seems to work fine... but the nook does not give you an IMEI number... check your java version by typing this in a DOS window (start-run and type in cmd):
    java -version
    this will tell you the version of java you are running.

    Java must be on your system. It must be in your system's path statement, or this program must be in the java/bin folder. It is possible that you must have java 32 bit version, this is being researched.

    It will very likely break your swype, or any other app that utilizes IMEI for validation and you have used previous methods to circumvent their validation process.

    It will likely break the same software if/when developers include a fix to the Nook IMEI situation in their AOS. Unless you opt to use this method again on their AOS to ensure you maintain the IMEI you used my program to generate.

    Since I have opted to utilize test formed IMEI's to prevent duplicating someone's “real device” IMEI, software developers can easily shut us down again. That is their option. I am trying to provide a solution that is acceptable to both sides of the fence.

    Closing statement:
    As I desire to make this program as beneficial as possible... PLEASE provide any feedback and/or bug reports... just don't continue to push your ideals once it has been discussed... beating dead horses gets tiresome and just wastes precious time.

    112 downloads of 2.2.0.3 with bug when pervious fix was selected
    1686 downloads of 2.2.0.2 with no bugs reported
    141 downloads of 2.2.0.1 with CM10 in place bug that would cause BBSOB and never boot
    197 downloads of 2.2.0.0 (that actually appeared to be 2.1.0.4 in the zip) with a few minor bugs... mostly in custom patching
    648 downloads of 2.1.0.3 with known GT for GameLoft issues
    1123 downloads of 2.1 with no known bugs
    182 downloads of 2.0a with a Generic IMEI bug
    1919 downloads of 1.9 with no bug reports
    3131 downloads of 1.8 with all bug reports being for non-nook devices
    80 downloads of 1.7 with no bug reports
    600 downloads of 1.6 with a couple of reports of In-Place update bug
    880 downloads of 1.5a with 0 bug reports
    148 downloads of 1.5 with a bug that could result in IMEI being generated without being properly formed.
    36 downloads of 1.4 with a bug that could result in IMEI of "cat: can't open".
    258 downloads of 1.3 with 0 bug reports... time to move on with next feature.
    1618 downloads of 1.1 and the only bug noted has been tracked to the user's Java version.

    12,758 downloads prior to the current version.

    Bug reporting thread for !IMEIme
    Device list thread
    4
    WOW.... no reported bugs in Beta 9f.... I am thinking that is a GOOD thing!!!

    Barring bug reports... I will begin implementing the rest of the features I have planned for beta 10... these are primarily:
    1. Use of optional !IMEIme.ini to control settings... initial ini will have the default settings I have the program using right now...
    2. Option to use MAC address in IMEI generation
    3. Option to NOT save IMEI.fix... so you can run it on a friends... and not overwrite your default
    4. Option to create IMEI.fix even if Java fails... so you can manually update TelephonyManager.smali and framework.jar yourself easily... beware of feature 3 listed above.

    I am working on the features... but I don't want to get too deep until I know I have our bugs in Beta 9 series ironed out... No sense in carrying them over to our next feature set.
    3
    New Beta 9e up... removed previous run check... It should have never worked... and maybe it hasn't... mr_fosi has reported this a few times... I always thought I tracked it to something else... I was WRONG... I know what it is... need time to clear up the issue.

    For now... have NC hooked up adb(usb) or adb(wifi) working... in place should work... but it will need to pull S/N each time for now.
    3
    DD, as I stated in my PM, as long as you're willing to help people fix their devices when their IMEI changes without warning in the future and all their software breaks, and you're willing to take responsibility for having Nooks blacklisted with software retailers on the Market because you couldn't wait to be a hero and listen to dalingrin nicely tell you to back off, it's all good. I'm well and truly done with this...I should have expected a gangbang of fervent users attacking me as a 'bad guy' because they are willfully ignorant of the risks they are taking (and that you conveniently forgot to tell them about).

    I *WILL NOT* reply to this thread again. Quit, continue, do whatever you like...but you'd damned well better take responsibility for the outcome in the future.

    Rodney

    Many if us know the "risks" just as well, or even better, than you... and many of us also believe that this solution mitigates those as well as any other could. AFAIK, the cm team will NEVER allow another IMEI commit for the simple fact that they plan to avoid any/all contraversy dealing with IMEI. For that reason, any possible fix must come from a third party -- like this one.

    I feel that Dizzy's method of IMEI generation provides a test number that is unique enough to avoid the wrath of any vendor. And, even if any dev still decides to take action against our set of numbers, I also feel confident that we can then find a new way around said action if/when that happens.

    You've said your piece, as you're entitled to do... but, I ask that you now let the rest of us decide whether or not the "risk" is worth it.

    Dizzy -- please know that you have no such "responsibility" in the future. As testers and fellow hackers, we know wtf we're messing with. Please continue on and ignore those who might criticise while offering no alternative solution of their own. Rodney might think he "knows better" than the rest of us, but he doesn't.

    PS: nobody from teamdouche, including Dal, has ever stated the serial number solution is a bad one. They certainly didn't recommend the original method of everyone sharing one IMEI, but they've not said word one about this one. Besides, this project has nothing to do with CM specifically... please keep it going! :)
    3
    OP updated, b9 uploaded....

    I apologize to the community for my short sighted reactions to attacks at my methods, work and efforts. I assure you that will not happen again. I have come to realize the support and appreciation is far greater than I imagined. THANK YOU!!!

    Now.... back to testing ;)

    PLEASE feel free to provide any feedback and/or bug reports... just don't continue to push your ideals once it has been discussed... beating dead horses gets tiresome and just wastes precious time.