[TOOL][I9505-I9505G/I9515-I9515L] Full IMEI backup/restore tool [EOL]

Search This thread

AntaresOne

Recognized Developer
Sep 30, 2013
2,161
17,509
30
Chieti, Italy
www.antaresone.eu
28v37t5.png


Full IMEI backup/restore tool for Samsung Galaxy S4 GT-I9505/GT-I9515
Brought to you by AntaresOne



1z3xnpy.png
1z2lmqe.png

5wxjrc.png
j6tyly.png

NOTE: This is only for Galaxy S4 with Qualcomm Snapdragon 600, Galaxy S4 Active version is here, Exynos 5410 (GT-I9500) version is here.
To devs: modifications & redistribution are not allowed. Contact me before including my work or any part of it in your stuff.



Explanation
What is IMEI?
Wikipedia

Why should I backup it?
When you start to mod your phone, sometimes may happen that you lose it (a bad flash, a wrong mod...) and without your phone is like this. Shortly, you lose mobile network forever.

The Qualcomm variant of Galaxy S4 doesn't have IMEI stored in EFS as most people think, it's stored in another place. Partitions to backup/restore are 8, each is required by the system to have IMEI. These are: EFS (there is IMEI's country code), modemst1, modemst2, m9kefs1, m9kefs2, m9kefs3, backup and fsg. It doesn't do miracles, so if you lose IMEI and don't have a backup, you're lost.


Features
  • Complete IMEI backup
  • Autozipping of saved partitions


Installation
  1. Download tool from the link below
  2. Put the zip file in your sdcard
  3. Reboot in recovery
  4. Install zip from sdcard
  5. Choose downloaded zip file
  6. Reboot system


Usage
When installed, the "imeibkp" executable goes in /system/bin. Obviously root is a must. This is not an app, so to run it you must use Terminal Emulator. It's very user-friendly and n00b-approved (joking :laugh:), normally you shouldn't run into issues while using it.

  1. Open Terminal Emulator
  2. Write su and press enter (this is to obtain root access)
  3. Invoke this tool by writing imeibkp and pressing enter
  4. To restore just invoke again imeibkp

In case you want to export your backup, it is in /sdcard/IMEIBackup and called IMEIBackup.zip (Internal Memory on PC through USB connection)
If you change ROM you'll lose this tool (you'll not lose a backup already made), in this case just follow again Installation steps


Download
IMEI Backup tool is hosted on my AndroidFileHost


XDA:DevDB Information
IMEI backup/restore tool for Galaxy S4 GT-I9505-I9505G/GT-I9515/GT-I9515L, Tool/Utility for the Samsung Galaxy S4

Contributors
AntaresOne

Version Information
Status: No Longer Updated
Stable Release Date: 2014-12-16

Created 2014-12-16
Last Updated 2017-05-19
 
Last edited:

AntaresOne

Recognized Developer
Sep 30, 2013
2,161
17,509
30
Chieti, Italy
www.antaresone.eu
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
Code:
su [b](to acquire root access)[/b]
cat /proc/cmdline > /sdcard/cmdline.txt

For partition table
Code:
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.
 
Last edited:

Jsilver73

Senior Member
Nov 5, 2013
3,116
2,315
51
Christchurch UK
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
 

Disrespective

Senior Member
Apr 10, 2010
52
6
Wellington
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)?
 

baudbox

Senior Member
Nov 16, 2014
197
125
Paris
apps.baudbox.fr
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

Backing up EFS ....
/system/bin/imeibkp[171]: /system/bin/busybox: not found
...

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

C:\Baud\platform-tools>adb shell
shell@android:/ $ su
su
root@android:/ # mount -o remount,rw /system
mount -o remount,rw /system
root@android:/ # ln -s /system/xbin/busybox /system/bin/busybox
ln -s /system/xbin/busybox /system/bin/busybox
root@android:/ # imeibkp
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

Backing up EFS...
27904+0 records in
27904+0 records out
14286848 bytes (13.6MB) copied, 2.645813 seconds, 5.1MB/s
Backing up modemst1...
6144+0 records in
6144+0 records out
3145728 bytes (3.0MB) copied, 0.563782 seconds, 5.3MB/s
Backing up modemst2...
6144+0 records in
6144+0 records out
3145728 bytes (3.0MB) copied, 0.568542 seconds, 5.3MB/s
Backing up m9kefs1...
1560+0 records in
1560+0 records out
798720 bytes (780.0KB) copied, 0.143830 seconds, 5.3MB/s
Backing up m9kefs2...
1560+0 records in
1560+0 records out
798720 bytes (780.0KB) copied, 0.142853 seconds, 5.3MB/s
Backing up m9kefs3...
1560+0 records in
1560+0 records out
798720 bytes (780.0KB) copied, 0.149078 seconds, 5.1MB/s
Backing up backup...
12288+0 records in
12288+0 records out
6291456 bytes (6.0MB) copied, 2.140778 seconds, 2.8MB/s
Backing up fsg...
6144+0 records in
6144+0 records out
3145728 bytes (3.0MB) copied, 0.574982 seconds, 5.2MB/s
Writing log...

Operation successfully completed!

Thanks for using this tool!
Remember to leave a feedback on XDA thread
AntaresOne@XDA-Developers
root@android:/ #

Hope it helps
 

sn0wman1

Account currently disabled
Sep 18, 2011
353
41
GB
meettomy.site
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)?
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!!
 

Disrespective

Senior Member
Apr 10, 2010
52
6
Wellington
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).
 

Disrespective

Senior Member
Apr 10, 2010
52
6
Wellington
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.
 
Last edited:

AntaresOne

Recognized Developer
Sep 30, 2013
2,161
17,509
30
Chieti, Italy
www.antaresone.eu
This is suit for SGH-i337M , right?

Yes it is

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

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
 
  • Like
Reactions: peppe130 and Chibbo

Conito11

Senior Member
Feb 22, 2013
1,066
221
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...
 

sn0wman1

Account currently disabled
Sep 18, 2011
353
41
GB
meettomy.site
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...
Same process only when you have backup it gives you option to restore
 

KenHua

Senior Member
Sep 30, 2011
639
337
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.
 

AntaresOne

Recognized Developer
Sep 30, 2013
2,161
17,509
30
Chieti, Italy
www.antaresone.eu
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.

Use this terminal

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

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

KenHua

Senior Member
Sep 30, 2011
639
337
Use this terminal

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

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

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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 83
    28v37t5.png


    Full IMEI backup/restore tool for Samsung Galaxy S4 GT-I9505/GT-I9515
    Brought to you by AntaresOne



    1z3xnpy.png
    1z2lmqe.png

    5wxjrc.png
    j6tyly.png

    NOTE: This is only for Galaxy S4 with Qualcomm Snapdragon 600, Galaxy S4 Active version is here, Exynos 5410 (GT-I9500) version is here.
    To devs: modifications & redistribution are not allowed. Contact me before including my work or any part of it in your stuff.



    Explanation
    What is IMEI?
    Wikipedia

    Why should I backup it?
    When you start to mod your phone, sometimes may happen that you lose it (a bad flash, a wrong mod...) and without your phone is like this. Shortly, you lose mobile network forever.

    The Qualcomm variant of Galaxy S4 doesn't have IMEI stored in EFS as most people think, it's stored in another place. Partitions to backup/restore are 8, each is required by the system to have IMEI. These are: EFS (there is IMEI's country code), modemst1, modemst2, m9kefs1, m9kefs2, m9kefs3, backup and fsg. It doesn't do miracles, so if you lose IMEI and don't have a backup, you're lost.


    Features
    • Complete IMEI backup
    • Autozipping of saved partitions


    Installation
    1. Download tool from the link below
    2. Put the zip file in your sdcard
    3. Reboot in recovery
    4. Install zip from sdcard
    5. Choose downloaded zip file
    6. Reboot system


    Usage
    When installed, the "imeibkp" executable goes in /system/bin. Obviously root is a must. This is not an app, so to run it you must use Terminal Emulator. It's very user-friendly and n00b-approved (joking :laugh:), normally you shouldn't run into issues while using it.

    1. Open Terminal Emulator
    2. Write su and press enter (this is to obtain root access)
    3. Invoke this tool by writing imeibkp and pressing enter
    4. To restore just invoke again imeibkp

    In case you want to export your backup, it is in /sdcard/IMEIBackup and called IMEIBackup.zip (Internal Memory on PC through USB connection)
    If you change ROM you'll lose this tool (you'll not lose a backup already made), in this case just follow again Installation steps


    Download
    IMEI Backup tool is hosted on my AndroidFileHost


    XDA:DevDB Information
    IMEI backup/restore tool for Galaxy S4 GT-I9505-I9505G/GT-I9515/GT-I9515L, Tool/Utility for the Samsung Galaxy S4

    Contributors
    AntaresOne

    Version Information
    Status: No Longer Updated
    Stable Release Date: 2014-12-16

    Created 2014-12-16
    Last Updated 2017-05-19
    10
    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
    Code:
    su [b](to acquire root access)[/b]
    cat /proc/cmdline > /sdcard/cmdline.txt

    For partition table
    Code:
    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.
    5
    I'll give you an update tomorrow with the full zip binary (no more missing symbols)

    Inviato dal mio GT-I9505
    4
    Thank you so much for replying.
    So as I understand, there is no way to "unlock" my phone right? Or maybe I just bring it to Samsung help center. Samsung able to fix it?
    Flash STOCK SAMSUNG,
    STAY away from any DeOdexed custom /AOSP /cm or any other ported rom until you get confident enough to identify trustworthy work. And be sceptical to shady, badly written unlock guides.

    Kindly looked up a stock lollipop version for your i9505 to flash and later factory reset.
    http://xdaforums.com/showthread.php?p=58819092
    ... or find a newer one (LRX22C.I9505XXUHOE4) on your own
    That usually mend IMEI trouble.

    Since you didn't share what action you did to loose IMEI, a proper guide to flash any S4 using Odin is here
    http://xdaforums.com/showthread.php?p=41072377
    ... to eliminate bad flash procedure from the equation

    ThumbsUp button under every post is free to use in case you're in the mood to show appreciation.