[Q] unkown imei. extracting efs from qcn. - Galaxy S 5 Q&A, Help & Troubleshooting

hi I was trying to unlock my g900w8 galaxy s5, I guess I ended up erasing my efs.
I ended up with imei=unknown, the baseband and everything else reads correct. but I keep getting the 'mobile network not available' or the "not registered to network" error'
and no my imei is not blacklisted I just need to get it back on my phone.
I did make a back up of the nv with nv writer and a back up of qcn with qpst. but I did not make a copy of my efs folder.
my problem is I cannot restore my nv nor can I restore my qcn. its getting blocked from some kind of permission. for example when I try to restore in nv writer I get these errors:
Writing NV-items from a file:
Unsuccessfully written NV-items:
00001 (0x0001) - Read only item
00002 (0x0002) - Read only item
00003 (0x0003) - Read only item
00550 (0x0226) - Access denied
00855 (0x0357) - SPC (6 digits) is required
01943 (0x0797) - Read only item
05597 (0x15DD) - Read only item
05598 (0x15DE) - Read only item
10155 (0x27AB) - Access denied
Done.
and similar issues with qcn back up.
is this because of the s5 firmware?
how do I force a successful write?
or if possible how can I extract my efs info from my two back ups?
when I open the qcn file as an archive with 7.zip I do see several folders like EFS_Backup, NV_Items, NV_NUMBERED_ITEMS, Provisioning_Item_Files. but I don't know what to do with them or how to convert them into something I can put back in my phone.
thanks any help would be appreciated.

We're sorry to hear that your phone got messed up. Just goes to show that the very first thing anyone ought to be doing is making backups just in case you need them. That should be common sense but we're all guilty of taking risks sometimes.
However, we can tell that you didn't do much of a search or read more than about two posts in the forum before posting. If you had you would have found countless posts asking this question and the inevitable response i.e. discussing how to change /repair /modify, etc IMEI numbers is not permitted on this forum. It's too easy to abuse or facilitate the trade in stolen phones.
And no, I doubt that the staff will make an exception just for you. You'll have to rely upon Google or possibly your carrier will replace your phone under warranty regardless of cause. Often if you don't volunteer information, they don't really look too closely at why a phone fails. Samsung will have no problem ultimately repairing the original phone when it goes their refurbishment process.
.

fffft said:
We're sorry to hear that your phone got messed up. Just goes to show that the very first thing anyone ought to be doing is making backups just in case you need them. That should be common sense but we're all guilty of taking risks sometimes.
However, we can tell that you didn't do much of a search or read more than about two posts in the forum before posting. If you had you would have found countless posts asking this question and the inevitable response i.e. discussing how to change /repair /modify, etc IMEI numbers is not permitted on this forum. It's too easy to abuse or facilitate the trade in stolen phones.
And no, I doubt that the staff will make an exception just for you. You'll have to rely upon Google or possibly your carrier will replace your phone under warranty regardless of cause. Often if you don't volunteer information, they don't really look too closely at why a phone fails. Samsung will have no problem ultimately repairing the original phone when it goes their refurbishment process.
.
Click to expand...
Click to collapse
thank you for you reply, I have searched, I've searched all over the net even, I do know that talking about changing the imei is not permitted on this forum but in my searches I have come upon many threads regarding imei problems and recovery, coming from this board as well. I have tried many different things and programs, wiped my phone a few times reinstalling the firmware, rooting, unrooting etc. but I still do not have a solution to my problems
I am not trying to change my imei, I lost it while trying to unlock my phone. I am just trying to recover my imei through my back ups or any means to get my phone back up and running.... even if it was just help to get my back ups to actually back up to my phone I would be really greatfull because at the moment it is just a really expensive paperweight.
thank you.

sakohunter said:
I am not trying to change my imei
Click to expand...
Click to collapse
You are trying to change your IMEI. From it's current value to the original one. And posting how to change an IMEI can be expected to be abused by thieves and the like. You can't say, I know the rules say don't explain how to pick locks. but it's okay because i will only use it to get into my own house. Umm, no. Once posted, miscreants will have access to the information as well. No doubt the reason why XDA staff don't allow the type of discussion you want to engage in.
Since you know that this isn't permitted you should have simply dropped it rather than try to justify an exception. If you felt strongly about the subject you could try to persuade staff to change the rules, rather than skirt them. The latter suggests that you are ignoring them mostly because it would be an expedient way to fix your phone.
.

ok, im not here to argue with you, I was only seeking help and being honest about it.
I could have left imei out of my whole post and just asked for help in restoring my nv and qcn backups.
or rather why my phone is not writing the backups. which is my whole intention.
ive seen many posts regarding them nv, efs and qcn but you seem to be fixated on the term imei so lets just let the post die or have it closed.
I understand what you are saying in regards to imei but that is just a part of nv efs and qcn backups. it is a risk that everyone takes when modding or customizing their phones, so backing them up and restoring as needed is always recommended.

If you have a backup of your EFS, simply restore it. That is straightforward, easily done and not controversial.
I thought you said you hadn't made a backup which is unfortunate. And I do have sympathy for the situation. But as you just said that is an expected risk of modding our phones. Having a broken phone isn't cause to ignore a set of rules that say this topic is forbidden due to abuse.
.

Hey mate,
I had almost the same problem. After a few days i finally got my phone working by doing what is in this post:
http://forum.xda-developers.com/showpost.php?p=55953093&postcount=29
Good luck and let me know if you need any help or if what i did isn't clear and i can give you some proper instructions. Make sure you backup everything before you do this just in case something even worse happens.

Mod Edit
Changing imei is illegal.
No such discussions are allowed on XDA.
Thread closed
malybru
Forum Moderator

Related

Imei nulled [problem workout]

Hi there!
Recently, there were a plenty of cases with imei changed to zero. In this sub-forum, there were already three cases ([1][2][3]), and in our local ex-USSR community there were a lot more of them. The problem comes up in an absolutely random way. In my case, it started when I tried 'format sd-card' function, built into the MIUI rom. But if you look through, you'll find that other cases have nothing in common. So, the conclusion is that there is a bug in Huawei internal firmware, that leads to nulling the IMEI. Further comes the problem workout:
in our community (4pda.ru) we've found an app (it's attached), that is able to back-up and restore IMEI. we've revealed, that the code for IMEI back-up is
dd if=/dev/block/mmcblk0p5 of=/sdcard/imeibackup/5.img
dd if=/dev/block/mmcblk0p10 of=/sdcard/imeibackup/10.img
dd if=/dev/block/mmcblk0p11 of=/sdcard/imeibackup/11.img
It reads all data from mmcblk0pXX partitions and writes it into XX.img files (images) in the imeibackup folder, stored on the sd-card. The main idea of how to restore our broken IMEI's is:
1. create the backup of IMEI using this app;
2. replace our current IMEI with our actual IMEI in theese *.img files (images);
3. restore IMEI using this app;
The idea is perfect and is easy-to-guess, but non of theese images contain IMEI in raw. Probably, they are crypted, and with no key to encrypt them, we would not be able to replace current IMEI with actual IMEI.
I will be happy to be wrong and if anyone of you could help to find the IMEI string in theese images (all info is in attach).
But there is also another way. Android SDK contains android.telephony.TelephonyManager.getDeviceId() function that returns an IMEI of the current phone. The idea is to find the body of the function (Android OS source is free-to-download, isn't it?) (it might be decrypting those partitions for further IMEI fetching) and using it, understand how to turn our IMEI into factory condition.
There might be a problem if this function only makes a RemoteProcedureCall to the phone firmware and the phone firmware actually decrypts those partitions and fetches an IMEI. In this case, we'll need some reverce-ingeneering: we'll need to write a core module, that will set hooks on the open/read_file/partition functions of our mmcblk0pXX partitions, open the stack, make a backtrace and a dump of the functions that called for them.
actually, my programming skills are too poor both for the first easy way (find the getDeviceId() function body) and surely, for reverce-ingeneering. Thar's why, there is a request for the xda-developers community:
If you are a Java programmer, could you please help us to find the android.telephony.TelephonyManager.getDeviceId() function body? If yes, could you please explain us its algorithm in a common language? We will be glad for any help.
for moderators: yes, i've already read all the cautions about the responsibility of IMEI change (in any purpose), thank you.
Sounds cool. Sadly im not a developer so i can't help. If you get this working, it could save so many devices. Mine lost imei and bricked, but this would have solveed the imei problem. Good luck, hopefully you'll get it working!
Since this require dev attention, maybe u should PM stockwell/dzo/genokolar.. Or just post this in the dev section.. Its great to have one thing less to worry about when flashing phone..
I don't think it would be as easy as just hexediting the IMEI into the relevant location in the image (or at least, I hope it isn't). Remember that the IMEI is used to uniquely identify phones on the cell network so that it can be blocked if the phone is reported as stolen. For this reason it's not supposed to be easy to change, and it's illegal in some places to do it.
I know that this would be intended to be used to restore the IMEI, but it could just as easily be used to change the IMEI for stolen phones.
Forcing the response from the Java call won't do anything - it would only be used to show the number in android, and not by the hardware.
Send your phone back under warranty.
stockwell said:
I don't think it would be as easy as just hexediting the IMEI into the relevant location in the image (or at least, I hope it isn't). Remember that the IMEI is used to uniquely identify phones on the cell network so that it can be blocked if the phone is reported as stolen. For this reason it's not supposed to be easy to change, and it's illegal in some places to do it.
I know that this would be intended to be used to restore the IMEI, but it could just as easily be used to change the IMEI for stolen phones.
Forcing the response from the Java call won't do anything - it would only be used to show the number in android, and not by the hardware.
Send your phone back under warranty.
Click to expand...
Click to collapse
But in my case I want to restore it not change it.. so its my right. And because some may miss use it I will not reveal how.
Sent from my u8800 using xda premium
stockwell said:
Send your phone back under warranty.
Click to expand...
Click to collapse
We do not mind to send the warranty, but it will not take as imei = 0
stockwell said:
Send your phone back under warranty.
Click to expand...
Click to collapse
Of course, it would be the simpliest way to solve the problem, but in any warranty there is a clause that warranty becomes invalid if IMEI has been changed We would not mind the problem and would just send our phones to warranty, but... it has become invalid, so now we need to have our IMEIs restored...
stockwell said:
Forcing the response from the Java call won't do anything
Click to expand...
Click to collapse
You've missunderstood me. The idea is to reveal an IMEI decryption algorythm by looking through the getDeviceId() functions body. I expect to see there something like this (func names are not real):
Code:
function getDeviceId()
{
$imei = fread(0x12345678); //some code to reveal where IMEI is stored
$imei_num = decrypt_sha1($imei, $key_to_decrypt); //some code to reveal the decryption key and method
return $imei_num;
}
Something like this may help us to write some other code to restore our broken IMEIs and warrantys, for example:
Code:
function restoreDeviceId($imei_to_restore)
{
$imei_encrypted = encrypt_sha1($imei_to_restore, $key_to_decrypt); //here we use an encryption key we discovered in prev. step
if(fwrite(0x12345678, $imei_encrypted)) return true; //here we use the mem adress we discovered in prev. step
return false;
}
Of course, I don't expect this to be that easy as in examples above, but I'm ready to digg
PS: i've just sent an email to the Huawei support with problem description. hope, they can help...
Kindly let me know if they reply positive ,need to restore mine too.....
Hello ppl...
I have the same problem, IMEI = 0.
I'm pretty sure that the IMEI was not in any way changed, since I can register on my network.... and supposedely that is not possible with an IMEI nulled.
By the way, I was with CM7 and also formated the SD Card within android system, guessing that could be the reason for that.
Related or not, I started having troubles with non working wifi and SD Card with 2.3 based roms... with original roms or FLB (2.2.2) system works fine.
It would be very helpfull to some of us if one of the Devs could take a look at this problem.
Thank you all!
stockwell, genokolar, dzo...
Can you help us ?!?!?! PLEEEEEAAAASSSSEEEEEEEEEEEEEEE
I miss my 2.3 roms
My X5 also had nulled IMEI.
Also it had WI-FI MAC address changed to new value and SD-card problems (unknown hardware on my PC and recognized as CD-drive).
Service center guy said that it all hardware issues and main-board to be replaced. So it's covered by warranty (despite the fact that I admitted that I had rooted the phone and had installed custom ROM).
Today a was notified that the phone was fixed. I'll get it back tomorrow.
I'm from ex-USSR too (Moscow).
Garry,
If problema was hardware ir wouldnt work also with 2.2.2 roms... And in fact they work perfect.
Problem is 2.3 related... Lwts see when huawei gives official update. They refer the delay is related with... Guess? WIFI!
Sent from my U8800 using XDA App
Does it going on here?
My IMEI = 0, too
In Germany (homenetwork vodafone) I have no problems to login to the network, having phone calls etc.
Now I'm in Sweden and I can't login to any network here. Or, I am logged in not correctly 'cause I see the signal is changing, but I can only do emergency calls. In the status the network provider is unknown.
Today I was in Kopenhagen, Denmark and there I was able to login to TDC A/S and had a phone call - I received SMS...as usual
So what is that? -.-
nrdl said:
Garry,
If problema was hardware ir wouldnt work also with 2.2.2 roms... And in fact they work perfect.
Problem is 2.3 related... Lwts see when huawei gives official update. They refer the delay is related with... Guess? WIFI!
Click to expand...
Click to collapse
Yes stock ROM (2.2) was almost working (some issues with USB access from PC). Custom ROMs (2.3) and most other of Huawei ROMs (2.2) all had broken WIFI and PC USB access. It's not just 2.3 issue it looks for me like different appearances of one bug. I think it happened because of some hardware issue.
Does ToolBox5iromV1.0.4.2.apk work?
ufukyayla said:
Does ToolBox5iromV1.0.4.2.apk work?
Click to expand...
Click to collapse
I've read about it but google translate is giving me a headache.. But i think the Chinese community have tool to backup IMEI n restoring them..
izzoe said:
I've read about it but google translate is giving me a headache.. But i think the Chinese community have tool to backup IMEI n restoring them..
Click to expand...
Click to collapse
The question about this is that you had to have made backup before... wich doesn't happend... most users don't even noticed their IMEI is now 0.
me too,IMEI is 0
So will this problem be a problem without any solution forever???
in theory, if we could edit backup img to our original imei... solution would be simple...
Justa need the help of some devs or programmers to be able to edit that file. ;-)
Sent from my U8800 using XDA App

How to recover your IMEI in ONE step

If you messed up your phone there is one simple procedure to recover your imei.
It os working if you previously used an market account.
Go to https://www.google.com/dashboard/ , look for android devices, locate your phone and click More data stored about this device. You will find your IMEI over there.
vcosmin said:
If you messed up your phone there is one simple procedure to recover your imei.
It os working if you previously used an market account.
Go to https://www.google.com/dashboard/ , look for android devices, locate your phone and click More data stored about this device. You will find your IMEI over there.
Click to expand...
Click to collapse
Ok, and then do what with the IMEI?? People who have IMEI issues cannot reinject it in their ROMs with just the number??
Here's a two way of "recovering" your IMEI:
Remove backpanel of phone
BATTERY PULL!
Ta-DA!
off-course they can't...
The first rule in reflashing is : BACK UP YOUR S*IT. Including system files it you are to clumsy...
The second rule in reflashing is: back up your back up. On a removable media, meaning REMOVE IT AFTER YOU ARE DONE COPYING YOUR BACK Up.
And
The third rule of reflashing is: Don't do it if you are a moron and you can't keep up with a step by step wizard.
vcosmin said:
off-course they can't...
The first rule in reflashing is : BACK UP YOUR S*IT. Including system files it you are to clumsy...
The second rule in reflashing is: back up your back up. On a removable media, meaning REMOVE IT AFTER YOU ARE DONE COPYING YOUR BACK Up.
And
The third rule of reflashing is: Don't do it if you are a moron and you can't keep up with a step by step wizard.
Click to expand...
Click to collapse
Well then why post this? Noone needs to see their IMEI unless they lost their efs partition. And if they lost their efs partition, seeing their IMEI won't HELP!
Its also on the box and under the battery >. but i would not describe the OP has how to recover .
jje
The simplest way to check the IMEI is to look under the battery or on the box the phone came with. My phone also has it's number on the warranty but knowing the number won't help you at all so rename the topic from "How to recover your IMEI in ONE step" to "How to check your IMEI if you want to complicate your life further" and be done with it.
This thread is a waste of bandwidth.
Or maybe you just forgot to write how to recompile /EFS folder?
Ok, so three people gave a better solution: LOOK UNDER BATTERY
He just wanted to post a smartass response to the recover your IMEI thread.
Your pointless thread is wasting my interwebz space.

Backup the IME on Nexus4

Does anyone backup the IME on Nexus4 not, how to do his guidance?
Dont think its necessary. From what i have read, only samsung phones have efs partition vulnerable.
boyboyxmen said:
Does anyone backup the IME on Nexus4 not, how to do his guidance?
Click to expand...
Click to collapse
No need in case of Nexus 4. For more details, refer
http://www.xda-developers.com/android/guide-to-imei-numbers-and-preserving-them-on-android/
Are you curious about what IMEI stands for? Do you want to learn how to interpret the parts of IMEI numbers to learn more about a device? XDA Senior Member xsenman has written a guide to IMEI numbers that aims to explain all this, along with details on how to preserve them on your phone during ROM flashes.
IMEI stands for “International Mobile Equipment Identity,” and is a 15 digit number that uniquely identifies each mobile phone. Because they are unique, they can be used to track a stolen phone, or block carrier access to any device. It is illegal to change it in most regions, so preserving your IMEI number is extremely important.
While the area that the IMEI number is stored on is protected on most phones, many Samsung devices have it saved on the EFS partition, which is easily accessible with a rooted phone. That’s why there are chances that while flashing a ROM to your device, you might end up messing up the EFS partition and thus losing your IMEI number.
For more information on IMEI numbers, a complete description of what their digits stand for, and details on how to preserve them on your phone, head over to the forum thread. The thread also links to validators for checking if an IMEI number is valid or blacklisted, and a couple of other useful threads that guide you with fixes to EFS-related problems that can effect your IMEI number.

[Q] IMEI change problem

Hi there.
I hope I've posted this in the right place, I never was good with this
Anyway - my GF found an almost new Galaxy S4 i9505, that some Chinese guy lost (given it was all in chinese). Before you start with the "right things to do" - We couldnt unlock it as it is protected with PIN so we couldn't call anyone, and there was no SIM card in it, so we didn't know where to go with it and just kept it. Like you wouldn't Right or wrong - where I'm from - taking it to the police would result as a new gift for some officers' son...
The problem is - I know the phone can be traced via IMEI by the police and/or mobile provider, so I was planning to change it.
I already wiped it, flased a stock 4.4.2 ROM from Samsfirmware with UK & IRE CSC (BTU), and then a custom ROM over it (cuz I like it). IMEI is still the same as for the 15 digits, but the last part, after the "/" char, is changed. (<IMEI> / <some 2 digit number>).
Is that enough, or does the whole IMEI have to change?
I've tried everything I found on the web, including the QPSTConfig program, but it just doesn't let me enter the "nvm" folder in the file explorer, as shown in a tutorial video...
The other problem is - the "secret codes" don't work on this phone, only some of them (show IMEI, 0808, and a few more, for example - the ##DATA# doesn't work...).
Any ideas - suggestions?
Again, I apologize if this is the wrong place to ask this, and thank you for your help in advance. :good:
Mod Edit
Changing imei is illegal.
Please do not discuss these things on XDA
Thread closed
malybru
Forum Moderator

TWRP Nandroid Backup results in createTarFork() process ended with ERROR=255

So I'm trying to make a TWRP Nandroid Backup, but it results in "createTarFork() process ended with ERROR=255"
In another thread someone wrote:
finally i got it working!
flashed latest twrp (cheeseburger or blue spark), then advanced, filemanager
delete every "999" folder:
sdcard
/data/user/999
/data/user_ce/999
/data/user_de/999
/data/misc_ce/999
/data/misc_de/999
/data/system_ce/999
/data/system_de/999
after try to backup again. it's working for me
Click to expand...
Click to collapse
Will deleting those "999-files" mess up something for my current phone state?
I've spent days configuring apps and stuff and I don't want to loose all my fine tuning.
white-k said:
So I'm trying to make a TWRP Nandroid Backup, but it results in "createTarFork() process ended with ERROR=255"
In another thread someone wrote:
Will deleting those "999-files" mess up something for my current phone state?
I've spent days configuring apps and stuff and I don't want to loose all my fine tuning.
Click to expand...
Click to collapse
There are several solutions on this thread covering your whole question https://forum.xda-developers.com/oneplus-5/help/createtarfork-process-error255-t3727673/page2
It's useful to keep discussion within one thread and not to create multiple ones with the same topic
strongst said:
There are several solutions on this thread covering your whole question https://forum.xda-developers.com/oneplus-5/help/createtarfork-process-error255-t3727673/page2
It's useful to keep discussion within one thread and not to create multiple ones with the same topic
Click to expand...
Click to collapse
I started a new thread since I figure few people will read a thread marked as [SOLVED], and also; I've already read through that whole thread, including all the threads it links to, and nowhere does anyone clearly state whether removing the 999-folders will mess something up regarding a phones current state or not. So my question still remains.
white-k said:
I started a new thread since I figure few people will read a thread marked as [SOLVED], and also; I've already read through that whole thread, including all the threads it links to, and nowhere does anyone clearly state whether removing the 999-folders will mess something up regarding a phones current state or not. So my question still remains.
Click to expand...
Click to collapse
My linked thread isn't solved.
There are several solutions, did you tried them besides the one you wrote?
strongst said:
My linked thread isn't solved.
There are several solutions, did you tried them besides the one you wrote?
Click to expand...
Click to collapse
Hmm, true, it isn't marked solved. It must've been one of the other threads.
Anyway, I tried the suggestions to turn things of in the settings withing the OS, but they were either already turned off, or not available within the menus.
I don't dare to try the more complicated stuff before I know that it won't screw things up my current OS state for me.
Will deleting the 999-folders change anything other than removing an extra user?
white-k said:
Hmm, true, it isn't marked solved. It must've been one of the other threads.
Anyway, I tried the suggestions to turn things of in the settings withing the OS, but they were either already turned off, or not available within the menus.
I don't dare to try the more complicated stuff before I know that it won't screw things up my current OS state for me.
Will deleting the 999-folders change anything other than removing an extra user?
Click to expand...
Click to collapse
Did you also tried to remove the user with the terminal commands?
As long as you take backups, nothing will be lost.
strongst said:
Did you also tried to remove the user with the terminal commands?
As long as you take backups, nothing will be lost.
Click to expand...
Click to collapse
I didn't dare to use the terminal commands before knowing if something will be screwed up.
I can't make backups because TWRP gives me the ERROR=255 problem this thread is about. :-/
white-k said:
I didn't dare to use the terminal commands before knowing if something will be screwed up.
I can't make backups because TWRP gives me the ERROR=255 problem this thread is about. :-/
Click to expand...
Click to collapse
So to try the solutions out is your only option

Categories

Resources