yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Android Development] AntaresOne:
Changelog

25/5/2015

Added support for the following variants:

GT-I9508

GT-I9515L

SGH-M919N

SGH-M919V

SGH-I337C

SCH-R970

SCH-R970C

SCH-R970X

4/3/2015

Added support for Bell SGH-I337M (same thread as AT&T variant)

9/2/2015

Added Galaxy S4 AT&T support (its own thread is here)

Fixed Galaxy S4 Active issue

31/1/2015

Added Galaxy S4 T-Mobile support (its own thread is here)

Little code update

26/1/2015

Added full zip binary in flash package (this should fix stpcpy error)

Little code update

9/1/2015

Added zip binary in flash package (not all the ROMs have it included, fixes zipping process)

Little code update

8/1/2015

Added auto zipping of saved files during backup process

Added auto unzipping of IMEIBackup archive when restoring

Better backup identification for restore process

Various code updates

4/1/2015

Added support for GT-I9505G (S4 Google Play Edition)

21/12/2014

Fixed busybox path (some ROMs have it in different location)

16/12/2014

Initial public release

Other S4 variants

If you want this tool for any other Galaxy S4 variant device write me a PM or mail me to antaresone@antaresone.eu including a full cmdline copy & partition table.

Through Terminal Emulator or ADB, do this:

For cmdline

su [b](to acquire root access)[/b]
cat /proc/cmdline > /sdcard/cmdline.txt

For partition table

su [b](same reason as above)[/b]
ls -la /dev/block/platform/msm_sdcc.1/by-name > /sdcard/partitions.txt

You will find two files named cmdline.txt and partitions.txt in your internal storage (/sdcard)

Other Samsung devices

PM or mail me at antaresone@antaresone.eu for details.
[Galaxy S 4 i9505 Android Development] Obleon99:
Sei il migliore :)
[Galaxy S 4 i9505 Android Development] Jackyqxl:
This is suit for SGH-i337M , right?
[Galaxy S 4 i9505 Android Development] Jsilver73:
I feel nice and safe now, I always thought I was OK having efs backed up but apparently that's not enough right.

So now I have my imei nice and safe on my external SD - just in case, better safe than sorry ;)

Thank you AntaresONE :D
[Galaxy S 4 i9505 Android Development] Disrespective:
Thanks for this, looks good.

I understand this can't generate an IMEI from the phone itself, but I have a dead S4 which has a null IMEI which I know (it's on the box it came in). Is there a method for me to insert this into another S4 IMEI backup (I have another working S4 as my main phone so could use it's backup)?
[Galaxy S 4 i9505 Android Development] baudbox:
Hi great tool AntaresOne. Thanks for sharing.

Quick note

: if some those like me busybox is installed under /system/xbin/; you can have trouble to launch the imeibkp like a noob :p

I have created a symlink from the source file like this (done via adb, but can be directly done via a terminal console):

Hope it helps
[Galaxy S 4 i9505 Android Development] sn0wman1:
I can confirm this works. I bought an s4 off eBay which was blacklisted. I've had it now for about 6months now and never been able to sort it. UNTIL NOW!!. Backed up my IMEI number off my phone and restored it to blacklisted phone. Now all is good!!
[Galaxy S 4 i9505 Android Development] Disrespective:
OK, OK, so I am definitely a noob, and this wasn't hard to run, however, I can only see the files when I look at the phone with a file browser. How can I retrieve them from the phone? I can't see them from a PC when I move them to a different location (extSD).
[Galaxy S 4 i9505 Android Development] sn0wman1:
They are saved in the internal memory mate. You can just drag the folder IMEI BACKUP to a pc
[Galaxy S 4 i9505 Android Development] Disrespective:
Yeah, you'd think that, wouldn't you? I've used a number of different file browsers and they all see the folders but when trying to view the folders with a PC (or OSX) they just don't exist.

I just compressed them and emailed them to myself with ES.
[Galaxy S 4 i9505 Android Development] Chibbo:
this works on cm12?
[Galaxy S 4 i9505 Android Development] AntaresOne:
Yes it is

If busybox is installed in xbin, always has a symlink in /system/bin (automatically created at the moment of ROM installation/busybox installation)

If you open xbin and bin with a root browser or adb shell, you'll see that all the binaries in xbin are symlinked to bin, then there's no need to manually create a symlink

Yes, works on any ROM that has root and busybox installed. Works in Aroma filemanager's terminal and TWRP console too
[Galaxy S 4 i9505 Android Development] Chibbo:
doesn't work on cm12

its looking for busybox in bin folder but its in xbin. anyways it's easy to fix but just sayin it isn't working "out of the box" :)
[Galaxy S 4 i9505 Android Development] Conito11:
If i make a backup, what i have to do to restore it?

--

Believes in Christ and you and your family will be safe of the Great day of Jehovah's wrath

I9505 Powered with Phoenix Rom v9.4 - Tamirda

GoogyMax Kernel v1.1.5 - Googy_anas

Philz touch Recovery - Philz

S5's S-view Cover service - Karkasss

Jehovah's Thunder Bootanimation - Pas2001

Bootanimation sound - Me

A lot of mods and stuff - Xda community

Thanks to all of you...
[Galaxy S 4 i9505 Android Development] sn0wman1:
Same process only when you have backup it gives you option to restore
[Galaxy S 4 i9505 Android Development] KenHua:
I tried it but this is what I got:

Quote

imeibkp

***********************************

* AntaresOne's IMEI backup tool *

***********************************

Checking device...

GT-I9505 found!

Checking backup...

Backup not found. Do you want to make it now?

1 - Yes

2 - No

Type 1 or 2 and press enter:

1

1

1

1

2

2

Yes

No

Unquote

There is no response after I typed 1 and enter! Typed again and again and other options but nothing! Can someone help please ?

p.s I used 3C Toolbox Terminal. There is an (su) append to each entry.
[Galaxy S 4 i9505 Android Development] AntaresOne:
Use this terminal

Tool updated, fixed busybox path & various updates to the code

Download: https://www.androidfilehost.com/?fid=95864024717067320
[Galaxy S 4 i9505 Android Development] KenHua:
Thumbs Up :good: for your quick response. Now I get :

u0_a225@jflte:/ $ su

root@jflte:/ # imeibkp

***********************************

* AntaresOne's IMEI backup tool *

***********************************

Checking device...

GT-I9505 found!

Checking backup...

/system/bin/imeibkp[39]: busybox: not found

/system/bin/imeibkp[39]: busybox: not found

Backup not found. Do you want to make it now?

1 - Yes

2 - No

Type 1 or 2 and press enter:

1

Backing up EFS...

/system/bin/imeibkp[180]: busybox: not found

Backing up modemst1...

/system/bin/imeibkp[180]: busybox: not found

Backing up modemst2...

/system/bin/imeibkp[180]: busybox: not found

Backing up m9kefs1...

/system/bin/imeibkp[180]: busybox: not found

Backing up m9kefs2...

/system/bin/imeibkp[180]: busybox: not found

Backing up m9kefs3...

/system/bin/imeibkp[180]: busybox: not found

Backing up backup...

/system/bin/imeibkp[180]: busybox: not found

Backing up fsg...

/system/bin/imeibkp[180]: busybox: not found

Writing log...

/system/bin/imeibkp[180]: busybox: not found

Backup path: /sdcard/IMEIBackup

Operation successfully completed!

Remember to leave a feedback on XDA thread

AntaresOne@XDA-Developers

root@jflte:/ #

My Busybox is:

BusyBox

Stephen (Stericson)

- 22 November 2014

I think the commands are Installed in Xbin by default.
[Galaxy S 4 i9505 Android Development] edzamber:
Same here, come back to previous version and it works.
[Galaxy S 4 i9505 Android Development] Zeitraffer:
I get almost the same as KenHua.

I have Error 33 and "can't create sdcard\Imeibackup"

Busybox is not found, although its installed to system\bin (I checked for busybox file)
[Galaxy S 4 i9505 Android Development] AntaresOne:
Fixed again: https://www.androidfilehost.com/?fid=95864024717067768
[Galaxy S 4 i9505 Android Development] KenHua:
Thanks buddy, copied you and it worked finally! Thanks

---------- Post added at 10:19 AM ---------- Previous post was at 09:32 AM ----------

Updated to your latest and it worked great! Thanks much

For those trying this for the first time I've the following to share:

1. Don't use the 3C Tools terminal! It doesn't work with this app. Use the Terminal recommended by Antares. To close the terminal enter "exit" twice.

2. When answering the imeibkp promotes, be sure you read before you enter your answer. I tried the tools and failed a few times and assumed that "1" means backup. Got a shock of my life during my previous run because the app some how detected that I had a backup when I didn't have. I answer "1" without reading and it started restoring without any warning. I thought my phone was going to die with a null IMEI! Luckily the app did no harm. If I may, I would suggest a different number be used for restore and a second warning since restore can be most dangerous if your backup is questionable.
[Galaxy S 4 i9505 Android Development] AntaresOne:
Don't worry, I'll add md5sum and check very soon
[Galaxy S 4 i9505 Android Development] Zeitraffer:
Now it runs great!

Thank you :)
[Galaxy S 4 i9505 Android Development] O-T:
[MENTION=5464206]AntaresOne[/MENTION]

Galaxy S4 Active GT-I9295 is Qcomm Snapdragon 600

ro.product.board=MSM8960

http://m.gsmarena.com/samsung_i9295_galaxy_s4_active-5446.php

A port of your CM12 is running on some i9295 /jactivelte. Dev spegelius said the i9505 and i9295 are up to 95% same hardware.

Can the GT-I9295 be added to supported devices for imeibkp?

...assert in script
[Galaxy S 4 i9505 Android Development] Hexgore:
Thanks for making this OP, always been worried about this and I thought EFS was the only place the IMEI was stored so I backed it up in TWRP, looks like my ass wasn't as covered as I thought it was. It will be now!
[Galaxy S 4 i9505 Android Development] AntaresOne:
Sure, I just need some things, I'll PM you tomorrow

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] AntaresOne:
[MENTION=2997552]O-T[/MENTION] mate if I try to send you a PM the system tells that you disabled PM reception, for me is fine through email or Hangouts too, just tell me

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] Strephon Alkhalikoi:
[MENTION=5464206]AntaresOne[/MENTION]: Have you gotten in touch with the author of Samsung Tool to see whether he'd be willing to expand his tool to cover the added partitions? I haven't torn the Samsung Tool apart to look at the code, but I'm hoping that when I do adding the partitions will be trivial. In any event, his expanding the Samsung tool would allow the less tech savvy among the readership to back up their partitions easily, without needing to know where to place the script or how to run Terminal Emulator. Given how easily these phones can lose their IMEI, an expanded Samsung Tool would be very beneficial.
[Galaxy S 4 i9505 Android Development] RatusNatus:
Many thanks for this. Now my backup is safe in my dropbox folder.

Ty
[Galaxy S 4 i9505 Android Development] O-T:
All the 8 partitions

/dev/block/mmcblk0p10-15, ...23, ...24

in script imeibkp are present in i9295. As I see only checking device =GT-I9295 is missing.

I'll check this thread when updated.

2. Any prerequisite to restore regarding the state of device when backup is done?

* bootloader version

* LTE-modem / GSM-modem version

* kernel or OS

Just to be aware of possible hurdles when restoring after some updates.
[Galaxy S 4 i9505 Android Development] DF5JT:
Important tool!

Word needs to get out about this tool as much as possible.

If you look around the web, most information will tell you how to save and restore the EFS partitions in order to back up your IMEI.

This is false!

You will find out as soon as you have actually lost your IMEI through flashing another kernel or ROM and trying to restore the IMEI from that back up will fail. It takes a lot of fiddling around to get your IMEI back and without one of those special hardware devices it is actually impossible to recover your IMEI. You can, however, flash your actual IMEI, provided the sticker below the battery is intact. This is a lengthy process that involves flashing a stock ROM, downgrading your modem, fiddling with the service management menu, rebuilding the NV data and using EFS Pro, respectively the Qualcomm NV Tools to actually flash your IMEI.

Phew.

Took me weeks to figure that out and I am glad that this tool now once and for all eliminates the necessity for that process!

I suggest that every custom ROM maker includes this tool and runs it before actually installing a new ROM.

Thanks for your work, Antares!
[Galaxy S 4 i9505 Android Development] AntaresOne:
Install Terminal Emulator from Play Store, open it and do:

su (to acquire root permission)
cat proc/cmdline > /sdcard/cmdline.txt
ls -la /dev/block/platform/msm_sdcc.1/by-name > /sdcard/emmc.txt

You will find two files named cmdline.txt & emmc.txt in your internal storage (/sdcard), send me them

You can press this to vote this thread to be a XDA news in its portal. More people press the button=more possibility to be in news :)

Tool updated, added support for I9505G
[Galaxy S 4 i9505 Android Development] angelcalibur:
Hello Antares!

thank you for your tools, it's perfect for me and i have made a backup for my s4.

But i have a friend who wanted to use it, and he encounter an issue. he use TWRP 2.8.3.0 with f2fs support (your recovery) and when he want to flash IMEI-BackupTool-S4Qualcomm600.zip, it said :

"This operation may install incompatible sofware and render your device unusable. Folder:/sdcard File to flash : IMEI-BackupTool-S4Qualcomm600.zip

Press back to cancel adding this zip."

Any suggestion?
[Galaxy S 4 i9505 Android Development] O-T:
Have been running CM11 for some time where Terminal and SU is included.

GT-I9295 partition table att. Hope you find time to add this device to imeibkp and let us know if there is some prerequisites to be aware of if bootloader or LTE/GSM modem has been updated between backup and restore.
[Galaxy S 4 i9505 Android Development] AntaresOne:
Hello angelcalibur, just swipe to flash, don't worry! :)

Thank you :) I'll put it in s4 active forum

EDIT: here for S4 Active

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] peppe130:
Great work mate! :)
[Galaxy S 4 i9505 Android Development] chossen:
Hi sorry for asking a noob question, i backed up the imei but what is the command to restore?
[Galaxy S 4 i9505 Android Development] AntaresOne:
Run again imeibkp, will find your backup and asks if you want to restore/not restore/delete it
[Galaxy S 4 i9505 Android Development] chossen:
It wont work, after backing up 2 times it wont even see it :(
[Galaxy S 4 i9505 Android Development] AntaresOne:
Check if there's backup.log in /sdcard/IMEIBackup

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] chossen:
I dont know what should be there, but i suppose its saved...
[Galaxy S 4 i9505 Android Development] AntaresOne:
Added auto zipping of saved files during backup process

Added auto unzipping of IMEIBackup archive when restoring

Better backup identification for restore process

Various code updates

Pushed an update, https://www.androidfilehost.com/?fid=95887005526788642
[Galaxy S 4 i9505 Android Development] haupa:
Dont make zip file.

u0_a141@jflte:/ $ su

root@jflte:/ # imeibkp

***********************************

* AntaresOne's IMEI backup tool *

* Galaxy S4 LTE *

***********************************

Checking device...

GT-I9505 found!

Checking backup...

Backup not found. Do you want to make it now?

1 - Yes

2 - No

Type 1 or 2 and press enter:

1

Backing up EFS...

27904+0 records in

27904+0 records out

14286848 bytes (13.6MB) copied, 1.463287 seconds, 9.3MB/s

Backing up modemst1...

6144+0 records in

6144+0 records out

3145728 bytes (3.0MB) copied, 0.621643 seconds, 4.8MB/s

Backing up modemst2...

6144+0 records in

6144+0 records out

3145728 bytes (3.0MB) copied, 0.239899 seconds, 12.5MB/s

Backing up m9kefs1...

1560+0 records in

1560+0 records out

798720 bytes (780.0KB) copied, 0.059082 seconds, 12.9MB/s

Backing up m9kefs2...

1560+0 records in

1560+0 records out

798720 bytes (780.0KB) copied, 0.117615 seconds, 6.5MB/s

Backing up m9kefs3...

1560+0 records in

1560+0 records out

798720 bytes (780.0KB) copied, 0.226410 seconds, 3.4MB/s

Backing up backup...

12288+0 records in

12288+0 records out

6291456 bytes (6.0MB) copied, 0.632843 seconds, 9.5MB/s

Backing up fsg...

6144+0 records in

6144+0 records out

3145728 bytes (3.0MB) copied, 0.934449 seconds, 3.2MB/s

Zipping...

/system/bin/imeibkp[232]: zip: not found

Backup path: /sdcard/IMEIBackup

Backup filename: IMEIBackup.zip

Writing log...

Log: backup.log

Operation successfully completed!

Remember to leave a feedback on XDA thread

AntaresOne@XDA-Developers

root@jflte:/ #
[Galaxy S 4 i9505 Android Development] AntaresOne:
Probably your ROM doesn't have zip/unzip binary, I'll fix it asap

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] trebllaw:
+1 on this. Backup zip not created, only the log file is avail on the IMEIBackup directory.
[Galaxy S 4 i9505 Android Development] angelcalibur:
[MENTION=5464206]AntaresOne[/MENTION] :

just an another question mate : your tool can be used with a rooted touchwizz rom?

Because some friend have some issue with your tool and touchwizz rom, rooted, and with TWRP 2.8.3.0.
[Galaxy S 4 i9505 Android Development] AntaresOne:
Yes can be used, remember that busybox is a must. There's in ROM?

Update

Added zip binary in flash package (not all the ROMs have it included, fixes zipping process)

Little code update

Download: https://www.androidfilehost.com/?fid=95887005526789366
[Galaxy S 4 i9505 Android Development] haupa:
Didn't work :(

u0_a141@jflte:/ $ su

root@jflte:/ # imeibkp

***********************************

* AntaresOne's IMEI backup tool *

* Galaxy S4 LTE *

***********************************

Checking device...

GT-I9505 found!

Checking backup...

Backup not found. Do you want to make it now?

1 - Yes

2 - No

Type 1 or 2 and press enter:

1

Backing up EFS...

27904+0 records in

27904+0 records out

14286848 bytes (13.6MB) copied, 1.590241 seconds, 8.6MB/s

Backing up modemst1...

6144+0 records in

6144+0 records out

3145728 bytes (3.0MB) copied, 0.415924 seconds, 7.2MB/s

Backing up modemst2...

6144+0 records in

6144+0 records out

3145728 bytes (3.0MB) copied, 1.108612 seconds, 2.7MB/s

Backing up m9kefs1...

1560+0 records in

1560+0 records out

798720 bytes (780.0KB) copied, 0.362457 seconds, 2.1MB/s

Backing up m9kefs2...

1560+0 records in

1560+0 records out

798720 bytes (780.0KB) copied, 0.159668 seconds, 4.8MB/s

Backing up m9kefs3...

1560+0 records in

1560+0 records out

798720 bytes (780.0KB) copied, 0.145569 seconds, 5.2MB/s

Backing up backup...

12288+0 records in

12288+0 records out

6291456 bytes (6.0MB) copied, 0.905121 seconds, 6.6MB/s

Backing up fsg...

6144+0 records in

6144+0 records out

3145728 bytes (3.0MB) copied, 0.445984 seconds, 6.7MB/s

Zipping...

CANNOT LINK EXECUTABLE: cannot locate symbol "stpcpy" referenced by "zip"...

Backup path: /sdcard/IMEIBackup

Backup filename: IMEIBackup.zip

Writing log...

Log: backup.log

Operation successfully completed!

Remember to leave a feedback on XDA thread

AntaresOne@XDA-Developers

root@jflte:/ #
[Galaxy S 4 i9505 Android Development] trebllaw:
Latest update worked for me. Thanks!
[Galaxy S 4 i9505 Android Development] siarp:
Hi, it's not working for me either, getting the same error message as haupa, "cannot locate symbol "stpcpy" referenced by "zip". Only the log file is being created in the directory.

On rooted stock ROM with busybox (stericson) installed and using latest version of tool 20150109. Is there another way to do the backup? Only just received the phone and want the IMEI safe before changing ROM. Thanks for your work!
[Galaxy S 4 i9505 Android Development] Malc59:
Hi, not working for me either, getting same error message as siarp & haupa. There seems a problem in the zipping process ( CANNOT LINK EXECUTABLE : cannot locate symbol "stpcpy" referenced by "zip" ... ). only log file in directory. The rom is stock rooted - Thanks for the great work.
[Galaxy S 4 i9505 Android Development] lan78691:
Any chance of making this work for the Att Samsung galaxy s4?
[Galaxy S 4 i9505 Android Development] haupa:
easiest way - to make a backup using Philz recovery. In recovery, go to backup section/custom backup ...

latest ver of Philz - goo.im/devs/philz_touch/CWM_Advanced_Edition/jflte

Do not forget to copy the resulting file on the computer.
[Galaxy S 4 i9505 Android Development] romhetman:
If you mean making backup of the EFC partition, than its not enough to save the imei!
[Galaxy S 4 i9505 Android Development] haupa:
Can you pls compile you tool without ZIP compression?
[Galaxy S 4 i9505 Android Development] AntaresOne:
I'll give you an update tomorrow with the full zip binary (no more missing symbols)

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] karlschmit:
thank you i have the same problem
[Galaxy S 4 i9505 Android Development] datorprofessor:
Sir! me too, Error-message cannot link stpcpy symbol ...

Master AntaresOne!

cannot link executable: cannot locate symbol "stpcpy" symbol referenced by zip

as the other guys above me posted...

I use binary version: IMEIBackupTool-S4LTE-20150109-latest.zip

on Qualcom gt-i9505 cm11 4.4.4. busybox pro version 13

although I have backup with qpstool.exe

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

also check ;)

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

also down from here if not down from other places

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

I like to have more different backup. :highfive:

My phone was locked with a specific carrier but I borrowed my friends identical S4 lte,

backup'ed his and restored EFS/NVram to mine and force changed my imei numbers back with use of qualcom nv tools,

also someone on xda did an variant with nv-items_reader_writer and also a kind of imei converter... through com1 com* ports

sorry for my bad english :cool:

thank you AntaresOne! one love

ps: waiting for your update with stpcpy ds. :good:
[Galaxy S 4 i9505 Android Development] romhetman:
Yes we are all waiting for your update!!! ;)
[Galaxy S 4 i9505 Android Development] grzwolf:
That would be great.

I'd like to apply your IMEI tool prior switching to cm12.
[Galaxy S 4 i9505 Android Development] AntaresOne:
New update available

Added full zip binary (this should fix stpcpy error) and a little code update.

Download: https://www.androidfilehost.com/?fid=95916177934517571

:)
[Galaxy S 4 i9505 Android Development] haupa:
Yay! Works!
[Galaxy S 4 i9505 Android Development] mrengineer:
my s4 has this recurring issue of not being able to detect sim card, is it because of missing or corrupt imei?
[Galaxy S 4 i9505 Android Development] edzamber:
Works great now :)

No more zip issue on my i9505 runnung Pyrana v48 (GNK4 base)
[Galaxy S 4 i9505 Android Development] romhetman:
How does it detect a device model from a buildprop? Reason I ask is that im on sgh-m919 but im on Danvdh ROM so my model name changed to gt-9505g!

On previous builds I was able to backup Imei but on this new one I cant, it says unknown device!
[Galaxy S 4 i9505 Android Development] karlschmit:
thank you for this update work perfectly
[Galaxy S 4 i9505 Android Development] AntaresOne:
It is done by samsung.hardware=*MODELNUMBER* in cmdline, not build.prop

I will push m919 version tomorrow

Inviato dal mio GT-I9505
[Galaxy S 4 i9505 Android Development] r0ckarong:
I9505 not recognized

I'm using an International I-9505 purchased in Germany and the tool says "Unkown device! GT-I9505/G or GT-9515 is required". From all I could tell this IS an I-9505. I'm running TWRP 2.8.4.0 and CyanogenMod Nightly jfltexx.

How can I find out what your tool is reading that I'm unaware of?

Edit: The "Model Name" in "About Phone" shows "GT-I9505"