[GUIDE] How to fix IMEI / DRK issues

Search This thread

CuBz90

Senior Member
Sep 27, 2010
2,222
1,034
This Guide works on both the S7 and S7 Edge.
This also works on other Samsung device including Snapdragon variants as long as you have the correct files for your device.
FIll out my form if you require assistance



S8 users go HERE
This guide is for those of you with EFS issues. This can cause your IMEI and/or Baseband to show Unknown or a bunch of zeros. The guide can also be used to fix DRK errors, but if your Device Root Key (DRK) is corrupt or missing, this guide will fix your IMEI/Baseband but will not fix your DRK error.
The guide gives instructions on how to flash the combination firmware. This installs the factory binary which allows your phone to read your IMEI and DRK. This should then restore your IMEI and DRK and then when you flash stock, the phone will be working as normal. If the Device Root Key (DRK) is corrupt or missing, this guide will only fix the IMEI, the DRK errors will still remain.



I take no responsibility for any issues that arise from following this guide. Do so at your own risk. The smallest mistake can cause a much bigger issue so make sure you know what you are doing and follow every step word for word!

Please note that this will not work for everyone
Some people will still face getting stuck at boot when flashing the combination firmware.
This means you have at some point flashed firmware that is later than the latest combination firmware and unfortunately, it is not possible to fix this by downgrading the firmware to an earlier version.


Before you proceed, you're going to need the following:

  • A copy of your phones stock firmware saved to your computer. If you do not already have these available on your computer, you can go HERE or you can use this tool to download the latest firmware for your device. Alternatively, you can find your firmware on SamMobile but this can take forever to download with a free account.

  • [IMPORTANT!] Switch off Factory Reset Protection (FRP) by going into Developer options and turning on 'OEM Unlock'. If you do not see 'Developer Options' under settings, then go to Settings > About Device > Software Info and keep tapping 'Build Number' until it confirms "You are now a developer" then go back to the main Settings screen and you will see Developer options.
    if you skip this step, you only have yourself to blame if something goes wrong.
  • Odin. If you do not have it, download it from here

  • The Combination Firmware (Factory Binary). Download the combination firmware relevant to your phone (links below) and extract the .rar archive somewhere you will remember.

    Files for other models available on request via my form

Now you have all the files you need, follow the guide below to repair your S7.

There are 2 methods.
  • The first method (Method 1) is quick and can solve most issues. Especially DRK errors.
  • The second method (Method 2) is to use if Method 1 does not work. This guide requires more work and therefore takes a little longer.


Method 1

  1. Boot into recovery and wipe data.
  2. Put your phone straight into Download Mode (do not reboot or boot up the system between wiping data and booting to download mode). To do this, you can use recovery to reboot to Download mode. Alternatively, switch off your phone and hold 'Power' + 'Volume Down' + 'Home' until it boots to download mode. Then connect the phone to your computer with your USB cable.
  3. Open Odin, press the 'AP' button and select the Combination tar/md5 file you downloaded/extracted earlier. Then press the 'Start' button. (If you have any errors while flashing, first make sure you are using the correct firmware for your phone. If it is still throwing errors, remove the ".md5" from the end of the file name and try again).
  4. When Odin has completed flashing the combination file, it should boot into the Factory Binary. You may get a message asking you to reboot. Click reboot (If you do not get prompted to reboot, do a reboot manually).
  5. When it has booted back up. Press the 'IME' button at the bottom of the screen and type *#06#. You should now see your IMEI has restored.
  6. Now restore the stock firmware using the firmware you downloaded earlier. (If you're not sure how, follow this guide)
  7. You should now have a restored IMEI. If not, this means your efs is damaged. Therefore, you will need to follow Method 2 below.


Method 2

  1. You will need to start on a rooted device. If you are not rooted, follow this guide to root your phone or flash CF Auto Root in Odin.
  2. Before you continue, it is extremely important that you backup your EFS partition, even if it is corrupt. You can backup the EFS partition using THIS APP. If you skip this step, you only have yourself to blame if something goes wrong and you have no backup to restore.
  3. Download Root Explorer (Paid) or Root Browser (Free). Open 'Root Explorer' or 'Root Browser' (whichever you installed) and browse to the /efs folder located in the root of the device.
  4. Inside the /efs folder, delete everything EXCEPT the 'FactoryApp' and 'prov_data' folders.
  5. Reboot. Make sure it does a full reboot. When the phone boots back up, you may some errors or unusual settings, this is normal and nothing to worry about.
  6. Boot into recovery and wipe data.
  7. Put your phone straight into Download Mode (do not reboot or boot up the system between wiping data and booting to download mode). To do this, you can use recovery to reboot to Download mode. Alternatively, switch off your phone and hold 'Power' + 'Volume Down' + 'Home' until it boots to download mode. Then connect the phone to your computer with your USB cable.
  8. Open Odin, press the 'AP' button and select the Combination tar/md5 file you downloaded/extracted earlier. Then press the 'Start' button. (If you have any errors while flashing, first make sure you are using the correct firmware for your phone. If it is still throwing errors, remove the ".md5" from the end of the file name and try again).
  9. When Odin has completed flashing the combination file, it should boot into the Factory Binary. You may get a message asking you to reboot. Click reboot (If you do not get prompted to reboot, do a reboot manually).
  10. When it has booted back up. Press the 'IME' button at the bottom of the screen and type *#06#. You should now see your IMEI has restored.
  11. Now restore the stock firmware using the firmware you downloaded earlier. (If you're not sure how, follow this guide)
  12. You should now have a restored IMEI.


Still Getting a DRK error?

If you are still getting a DRK error then you probably have a corrupt or missing Device Root Key (DRK). Unfortunately, this cannot be fixed without a JTag box (which aren't cheap). However, you can continue to use the phone as normal by flashing the no-verity zip in TWRP. You can then go ahead and use your phone as normal. Unfortunately, you will no longer be able to receive OTA updates. All updates will need to be made through ODIN and the no verity zip will need to be flashed every time a new firmware is flashed. However, you can still use custom roms as normal. Other than OTA updates, the DRK issue will have no effect on the use of the phone. You can still update via Smart Switch but will need to install TWRP and flash the no verity zip after every update.



If you would like any assistance in fixing your issue such as Method 1 & 2 do not work for you or if you have a different model than what is listed in this guide, please complete THIS FORM and I will try to get back to you ASAP (unfortunately I cannot always respond)



Many thanks to everyone that has donated!!
If you would like to donate, you can do so by clicking here
As you can imagine, finding fixes and assisting people takes a lot of my time so it's always great to receive a donation. Thank you.

 
Last edited:

onurd

Senior Member
Oct 31, 2004
254
28
What else can this factory binary do? Can it restore the original CSC? I had an AFG CSC phone and after playing around with different roms, when I go back to the original firmware (although it is a multi CSC), it chooses XSG rather than AFG no matter what I do.
 

CuBz90

Senior Member
Sep 27, 2010
2,222
1,034
What else can this factory binary do? Can it restore the original CSC? I had an AFG CSC phone and after playing around with different roms, when I go back to the original firmware (although it is a multi CSC), it chooses XSG rather than AFG no matter what I do.
No it doesn't. Where are you seeing the CSC?

Sent from my SM-G935F using Tapatalk
 

CuBz90

Senior Member
Sep 27, 2010
2,222
1,034
I haven't seen CSC. anywhere. I was just wondering what this firmware had up its sleeves to "fix" things.
What I meant is that when you say you now have a different CSC, how did you know this.

This firmware basically just feels the phone where to read the imei, baseband, and other info. This does not include the CSC.

PM me for my email address and then if you email me a backup of your EFS, I will have a look and restore your CSC for you.

Sent from my SM-G935F using Tapatalk
 
Last edited:

onurd

Senior Member
Oct 31, 2004
254
28
The original firmware of the phone was AFG for csc. Now even after using odin to get the same firmware, it defaults to xsg. Not a big deal but I don't know where the csc information is stored.

Sent from my SM-G935F using XDA Premium 4 mobile app
 

onurd

Senior Member
Oct 31, 2004
254
28
That's what I mean by the original csc having disappeared.
 

Attachments

  • 1463691804546.jpg
    1463691804546.jpg
    75.6 KB · Views: 15,119

onurd

Senior Member
Oct 31, 2004
254
28
Read this

Code:
http://forum.xda-developers.com/showpost.php?p=49425630&postcount=3

I see. Phone info won't show the original csc without root.

But how do you explain that despite using the appropriate firmware with odin, it always defaults to xsg rather than the original afg from the multi csc firmware?
 
  • Like
Reactions: dr3am3r5

Brogief

Member
Oct 25, 2013
10
0
Hey so I tried flashing the G935_Factory_Binary.tar file on a galaxy s7 edge, and the thing is stuck on splash screen. any idea why?
 

hiepgia

Senior Member
May 13, 2010
811
1,824
Ho Chi Minh City
I see. Phone info won't show the original csc without root.

But how do you explain that despite using the appropriate firmware with odin, it always defaults to xsg rather than the original afg from the multi csc firmware?

Because you flashed another region firmware, wipe data -> All original csc will get remove. You flash back and will only get default csc. If you rooted, you can change to afg csc
 

P1226R

Member
May 20, 2016
24
2
Thank you CuBz90 for your great work.
I flashed the superman rom but selected the wrong CSC.
I always backup my EFS in internal storage, but today I accidently wiped my entire internal storage. LOL
I have tried your method but unfortunately my imei is still missing, I'm totally frustrating. I will follow your thread. hope some expert can figure this out.
 

CuBz90

Senior Member
Sep 27, 2010
2,222
1,034
To everyone that has PM'd me, please bare with me. I have received a hell of a lot of PM's and I am trying to get through them all. Don't worry, I will definately reply and help you as best as I can.

Please make sure you are on your original stock firmware before trying this method. I notice a lot of people have PM'ed about CSC, I will PM you with info on how to revert this but please follow my steps exactly how I write them, a lot of people have PM'ed me to say "it's not working" but I have later found they are not following my steps exactly how I say and instead are taking shortcuts. If you take shortcuts then it's not going to work. I want to help you but you need to follow my exact instructions.
 

mr.lion87

Member
Mar 19, 2015
22
0
7c9bfc88e8b567c7f0dde5a2ea0e23d8.jpg


Help me?
Who can tell me efs file? Thank

Gửi từ SM-G930F của tôi bằng cách sử dụng Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 112
    This Guide works on both the S7 and S7 Edge.
    This also works on other Samsung device including Snapdragon variants as long as you have the correct files for your device.
    FIll out my form if you require assistance



    S8 users go HERE
    This guide is for those of you with EFS issues. This can cause your IMEI and/or Baseband to show Unknown or a bunch of zeros. The guide can also be used to fix DRK errors, but if your Device Root Key (DRK) is corrupt or missing, this guide will fix your IMEI/Baseband but will not fix your DRK error.
    The guide gives instructions on how to flash the combination firmware. This installs the factory binary which allows your phone to read your IMEI and DRK. This should then restore your IMEI and DRK and then when you flash stock, the phone will be working as normal. If the Device Root Key (DRK) is corrupt or missing, this guide will only fix the IMEI, the DRK errors will still remain.



    I take no responsibility for any issues that arise from following this guide. Do so at your own risk. The smallest mistake can cause a much bigger issue so make sure you know what you are doing and follow every step word for word!

    Please note that this will not work for everyone
    Some people will still face getting stuck at boot when flashing the combination firmware.
    This means you have at some point flashed firmware that is later than the latest combination firmware and unfortunately, it is not possible to fix this by downgrading the firmware to an earlier version.


    Before you proceed, you're going to need the following:

    • A copy of your phones stock firmware saved to your computer. If you do not already have these available on your computer, you can go HERE or you can use this tool to download the latest firmware for your device. Alternatively, you can find your firmware on SamMobile but this can take forever to download with a free account.

    • [IMPORTANT!] Switch off Factory Reset Protection (FRP) by going into Developer options and turning on 'OEM Unlock'. If you do not see 'Developer Options' under settings, then go to Settings > About Device > Software Info and keep tapping 'Build Number' until it confirms "You are now a developer" then go back to the main Settings screen and you will see Developer options.
      if you skip this step, you only have yourself to blame if something goes wrong.
    • Odin. If you do not have it, download it from here

    • The Combination Firmware (Factory Binary). Download the combination firmware relevant to your phone (links below) and extract the .rar archive somewhere you will remember.

      Files for other models available on request via my form

    Now you have all the files you need, follow the guide below to repair your S7.

    There are 2 methods.
    • The first method (Method 1) is quick and can solve most issues. Especially DRK errors.
    • The second method (Method 2) is to use if Method 1 does not work. This guide requires more work and therefore takes a little longer.


    Method 1

    1. Boot into recovery and wipe data.
    2. Put your phone straight into Download Mode (do not reboot or boot up the system between wiping data and booting to download mode). To do this, you can use recovery to reboot to Download mode. Alternatively, switch off your phone and hold 'Power' + 'Volume Down' + 'Home' until it boots to download mode. Then connect the phone to your computer with your USB cable.
    3. Open Odin, press the 'AP' button and select the Combination tar/md5 file you downloaded/extracted earlier. Then press the 'Start' button. (If you have any errors while flashing, first make sure you are using the correct firmware for your phone. If it is still throwing errors, remove the ".md5" from the end of the file name and try again).
    4. When Odin has completed flashing the combination file, it should boot into the Factory Binary. You may get a message asking you to reboot. Click reboot (If you do not get prompted to reboot, do a reboot manually).
    5. When it has booted back up. Press the 'IME' button at the bottom of the screen and type *#06#. You should now see your IMEI has restored.
    6. Now restore the stock firmware using the firmware you downloaded earlier. (If you're not sure how, follow this guide)
    7. You should now have a restored IMEI. If not, this means your efs is damaged. Therefore, you will need to follow Method 2 below.


    Method 2

    1. You will need to start on a rooted device. If you are not rooted, follow this guide to root your phone or flash CF Auto Root in Odin.
    2. Before you continue, it is extremely important that you backup your EFS partition, even if it is corrupt. You can backup the EFS partition using THIS APP. If you skip this step, you only have yourself to blame if something goes wrong and you have no backup to restore.
    3. Download Root Explorer (Paid) or Root Browser (Free). Open 'Root Explorer' or 'Root Browser' (whichever you installed) and browse to the /efs folder located in the root of the device.
    4. Inside the /efs folder, delete everything EXCEPT the 'FactoryApp' and 'prov_data' folders.
    5. Reboot. Make sure it does a full reboot. When the phone boots back up, you may some errors or unusual settings, this is normal and nothing to worry about.
    6. Boot into recovery and wipe data.
    7. Put your phone straight into Download Mode (do not reboot or boot up the system between wiping data and booting to download mode). To do this, you can use recovery to reboot to Download mode. Alternatively, switch off your phone and hold 'Power' + 'Volume Down' + 'Home' until it boots to download mode. Then connect the phone to your computer with your USB cable.
    8. Open Odin, press the 'AP' button and select the Combination tar/md5 file you downloaded/extracted earlier. Then press the 'Start' button. (If you have any errors while flashing, first make sure you are using the correct firmware for your phone. If it is still throwing errors, remove the ".md5" from the end of the file name and try again).
    9. When Odin has completed flashing the combination file, it should boot into the Factory Binary. You may get a message asking you to reboot. Click reboot (If you do not get prompted to reboot, do a reboot manually).
    10. When it has booted back up. Press the 'IME' button at the bottom of the screen and type *#06#. You should now see your IMEI has restored.
    11. Now restore the stock firmware using the firmware you downloaded earlier. (If you're not sure how, follow this guide)
    12. You should now have a restored IMEI.


    Still Getting a DRK error?

    If you are still getting a DRK error then you probably have a corrupt or missing Device Root Key (DRK). Unfortunately, this cannot be fixed without a JTag box (which aren't cheap). However, you can continue to use the phone as normal by flashing the no-verity zip in TWRP. You can then go ahead and use your phone as normal. Unfortunately, you will no longer be able to receive OTA updates. All updates will need to be made through ODIN and the no verity zip will need to be flashed every time a new firmware is flashed. However, you can still use custom roms as normal. Other than OTA updates, the DRK issue will have no effect on the use of the phone. You can still update via Smart Switch but will need to install TWRP and flash the no verity zip after every update.



    If you would like any assistance in fixing your issue such as Method 1 & 2 do not work for you or if you have a different model than what is listed in this guide, please complete THIS FORM and I will try to get back to you ASAP (unfortunately I cannot always respond)



    Many thanks to everyone that has donated!!
    If you would like to donate, you can do so by clicking here
    As you can imagine, finding fixes and assisting people takes a lot of my time so it's always great to receive a donation. Thank you.

    8
    To everyone that has PM'd me, please bare with me. I have received a hell of a lot of PM's and I am trying to get through them all. Don't worry, I will definately reply and help you as best as I can.

    Please make sure you are on your original stock firmware before trying this method. I notice a lot of people have PM'ed about CSC, I will PM you with info on how to revert this but please follow my steps exactly how I write them, a lot of people have PM'ed me to say "it's not working" but I have later found they are not following my steps exactly how I say and instead are taking shortcuts. If you take shortcuts then it's not going to work. I want to help you but you need to follow my exact instructions.
    5
    Anyone that needs help please fill out the form in this link...

    http://goo.gl/qSp9rn

    I can't keep track of my PM's so this will be easier to keep track of.
    If you do not complete this form, you may never get a response.
    4
    I currently have around 30 people that I am assisting fix their issues so please bear with me.

    I helped to fix 4 devices just yesterday.

    For those who get stuck on a splash screen of the factory binary firmware, please bare with me, I am still trying to find out the cause.
    3
    Very good guide. Cubz helped me get my IMEI back so he knows his stuff. Thanks again.

    Sent from my SM-G935F using XDA-Developers mobile app