[XPOSED] IMEI Temporary Change [POC] - Xposed General

Hi Guys,
I am new in Xposed Modules.I read about the Xposed framework in xda and other websites.some websites have really good tutorials about it.
So what I understand is that we can modify a function and its return values using the Xposed Framework.So My Question is that
We can get the IMEI of a device using this code
Code:
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
telephonyManager.getDeviceId();
It means that the TelephonyManager class has a function called getDeviceId() which returns the IMEI No right ?
so after further checking I found a class which has the function
Code:
com.android.internal.telephony.PhoneSubInfo
and
com.android.internal.telephony.gsm.GSMPhone
So modifying that function to return a custom value is possible right ?
if it is possible then the function
Code:
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
telephonyManager.getDeviceId();
will be returning the new Values right ?
I have tried to create a sample application and it sort of worked in emulator.
Code:
findAndHookMethod("com.android.internal.telephony.PhoneSubInfo", lpparam.classLoader, "getDeviceId",new XC_MethodHook()
{
@Override
protected void afterHookedMethod(MethodHookParam param)
throws Throwable {
// TODO Auto-generated method stub
super.afterHookedMethod(param);
param.setResult("99999999999");
}
});
The Modified value is shown on the Settings -> About Phone - > Status
and also when we take dialer and type *#06#
So have anyone tried this method ?

Correct on all counts. You may want to use XC_MethodReplacement, though (and the shortcut XC_MethodReplacement.returnConstant(...) method).

GermainZ said:
Correct on all counts. You may want to use XC_MethodReplacement, though (and the shortcut XC_MethodReplacement.returnConstant(...) method).
Click to expand...
Click to collapse
My question is will it be sending the original IMEI or this modified IMEI if checked with Network Provider ?

vivekkalady said:
My question is will it be sending the original IMEI or this modified IMEI if checked with Network Provider ?
Click to expand...
Click to collapse
If you replace the method, it will be replaced. Similarly, if you set the result, the result you set will be returned. If only that method is used to get the IMEI, then only the modified IMEI will be sent to whoever requests it.

GermainZ said:
If you replace the method, it will be replaced. Similarly, if you set the result, the result you set will be returned. If only that method is used to get the IMEI, then only the modified IMEI will be sent to whoever requests it.
Click to expand...
Click to collapse
is it legal to post such an application ?
also is there any other method to get the IMEI no ?
when I searched,I only got this method to get IMEI from phone.

vivekkalady said:
is it legal to post such an application ?
Click to expand...
Click to collapse
I don't see why not, since it's not actually changing the IMEI for your phone (only what apps see as the IMEI).
vivekkalady said:
also is there any other method to get the IMEI no ?
when I searched,I only got this method to get IMEI from phone.
Click to expand...
Click to collapse
I don't know.

You can get the number from /system/bin/dumpsys, but that's not something an app would normally do.

Please kindly post!
Many will need your app, including me to test recovering lost IMEI, xD
The legality depends on your local authority.
Thank you for giving me, a noober, hope

xperia_loser said:
Many will need your app, including me to test recovering lost IMEI, xD
The legality depends on your local authority.
Thank you for giving me, a noober, hope
Click to expand...
Click to collapse
It won't help you, actually, and methods of changing your real IMEI aren't allowed on XDA for legal reasons.

Appology for missing out the regulations
GermainZ said:
It won't help you, actually, and methods of changing your real IMEI aren't allowed on XDA for legal reasons.
Click to expand...
Click to collapse
Then, it's restricted. I did not notice the regulations; however, to be honest, I only need to change the 'unknown IMEI' back to my real IMEI which was lost due to careless ROM flashing with no back-up.
It seems that changing IMEI is illegal regardless of intention as nobody can guarantee others' intentions.
Thank you for your information.

xperia_loser said:
Then, it's restricted. I did not notice the regulations; however, to be honest, I only need to change the 'unknown IMEI' back to my real IMEI which was lost due to careless ROM flashing with no back-up.
It seems that changing IMEI is illegal regardless of intention as nobody can guarantee others' intentions.
Thank you for your information.
Click to expand...
Click to collapse
I lost my imei # the same way you did and I sure would like to find a way to put my imei# back in My phone. All I want to do is get my phone working again. I don't think I will get any support from customer service. Any help would be greatly appreciated.

[quote name="xperia_loser" post=54890103]Then, it's restricted. I did not notice the regulations; however, to be honest, I only need to change the 'unknown IMEI' back to my real IMEI which was lost due to careless ROM flashing with no back-up.<br />
<br />
It seems that changing IMEI is illegal regardless of intention as nobody can guarantee others' intentions.<br />
<br />
Thank you for your information.[/QUOTE]<br />
I lost my imei # the same way you did and I sure would like to find a way to put my imei# back in My phone. All I want to do is get my phone working again. I don't think I will get any support from customer service. Any help would be greatly appreciated.<br/>

Given that there are legal uses of this, I see it falling under the area that the VCR fell under during it's rise and speculation that it would contribute to illegal activity (piracy). Just because people CAN use something for illegal purposes, does not make the tool/item itself illegal. ****, how many of us have broken the law in the past by rooting our phones in violation of certain US laws? But it went on here, totally fine.

This module is fine because it doesn't actually change your IMEI, only spoof it for apps.
Changing your IMEI is illegal (this isn't up for discussion - it just is in the US, and that's where XDA is), which makes it forbidden on XDA as per the forum rules.
You can read some more about this here: http://forum.xda-developers.com/showthread.php?t=2249666

@vivekkalady Hi , I am trying on bluestacks latest with xposed installed, but its not working there , is there any chance to make it work ? i want to change to specific imei.

Related

Samsung SGH-U700 IMEI Changer

Anyone has a tool that can change IMEI in this phone? Tnx
advice is dont mess with the imei or you will get the "man" mad
ultraprimeomega said:
advice is dont mess with the imei or you will get the "man" mad
Click to expand...
Click to collapse
hahaha
I agree, there are some tools to do that, but in long run, it's really NOT ADVISABLE, to change the IMEI.
Adieu..
why do you want to change your IMEI
besides, changing a phone's imei is harder than just flashing a phone's firmware. Its also extremely risky and not advised to be done without a proper phone technician.

[Q] Restore original IMEI?

Long story short, my imei is not the current one under the battery and i want to get it back. Before i thought my phone wasnt unlocked and that was the problem but its not. The phone is unlocked and i even have the codes, i just want to use my own IMEI. I currently can not connect to any networks with the captivate.
So far i have tried using the .bak file in /efs with no success (different imei).
I have tried several posts on xda but all seem to unlock and not give you your proper imei back.
Any advice or information would be greatly appreciated.
Buuummmppp
b0uncyfr0 said:
Long story short, my imei is not the current one under the battery and i want to get it back. Before i thought my phone wasnt unlocked and that was the problem but its not. The phone is unlocked and i even have the codes, i just want to use my own IMEI. I currently can not connect to any networks with the captivate.
So far i have tried using the .bak file in /efs with no success (different imei).
I have tried several posts on xda but all seem to unlock and not give you your proper imei back.
Any advice or information would be greatly appreciated.
Click to expand...
Click to collapse
How did u manage to mess it up, may I ask. This way atleast u could warn the rest of the community not to mess ours up.
Its quite simple really, dont back up your /efs folder and keep messing around with roms.
I don't think anyone has solved this. Everything around the nv_data.bin file relates to unlocking and it says you must have a good IMEI number to start with. There was some 3rd party software that can fix IMEI numbers - but it required a separate breakout box. I forget the name, but many downloaded the software only to discover they needed to buy the box to get it to work.
One of mine managed to wind up with the generic imei but I have yet to see any ill effects from it.
I am sorry to hear about this, and even sorrier to have to say this, but xda does not allow posting of instruction on how one can change the imei.
Sent from my SAMSUNG-SGH-I897 using XDA App
Ok if we cant talk about this thats fine. Right now i cant connect to any networks. If someone would be willing to upload their /efs for me so i can try it out. Would that work?
Im in Australia so anything apart from that should work right??
did you ever got to restore your original imei?
Check here for a how to restore your IMEI.

[Q] IMEI Number got reset :-(

Hi,
I had a bricked G1 due to wrong radio update.
Got it restored from a repair shop using JTAG. Now when i am checking the IMEI number is showing all zero - 0000000000000
Due to this I am unable to connect to any mobile network. Can this be restored as I have the number on the Box which i received with the Mobile phone.
Will it again need opening the phone or I can do it myself ?
Regards,
Chinmay
After the JTAG Recovery, I was facing this problem, so I also tried flashing the radio and the factory rom but does not solve the issue.
chinmayfun said:
Hi,
I had a bricked G1 due to wrong radio update.
Got it restored from a repair shop using JTAG. Now when i am checking the IMEI number is showing all zero - 0000000000000
Due to this I am unable to connect to any mobile network. Can this be restored as I have the number on the Box which i received with the Mobile phone.
Will it again need opening the phone or I can do it myself ?
Regards,
Chinmay
Click to expand...
Click to collapse
Does anyone have any solution ? Can JTAG solve this ?
Whoever did the work was a complete moron and wrote to parts of the flash that should NOT BE TOUCHED.
Technically, it is possible to repair.
Haven't heard of anybody with this exact problem before, so it is uncharted territory.
IMEI Number got Reset
Take it back to the guy who did the jtag unbricking.
He should be able to put your IMEI number back.
Please note a "How to change the IMEI" Faq could be used for ilegal purposes.
Hence it is against the forum rules to explain how to do this.
Hi Thanks for the solution.
I am not changing my IMEI number, just restoring the original one so this should not be illegal.
This post can be blocked if it is against the forum rules. I don`t intend to do anything illegal.
vladmaster99 said:
Take it back to the guy who did the jtag unbricking.
He should be able to put your IMEI number back.
Please note a "How to change the IMEI" Faq could be used for ilegal purposes.
Hence it is against the forum rules to explain how to do this.
Click to expand...
Click to collapse
chinmayfun said:
Hi Thanks for the solution.
I am not changing my IMEI number, just restoring the original one so this should not be illegal.
This post can be blocked if it is against the forum rules. I don`t intend to do anything illegal.
Click to expand...
Click to collapse
Like most knowledge, it can be used for good or evil. There would be no reason to close or delete this thread, since nobody here suggested doing anything evil and your question is totally reasonable. The main issue with being up the technical details about changing the IMEI would be that it could be used to ENABLE people to use it for evil purposes. That is why vlad mentioned about why there isn't and shouldn't be a set of instructions about it.
Got the IMEI number restored. Mobile Network is up now.
The guy who did the JTAGG Recovery mistakenly did IMEI repair is what he said.
Now its fine.
chinmayfun said:
Got the IMEI number restored. Mobile Network is up now.
The guy who did the JTAGG Recovery mistakenly did IMEI repair is what he said.
Now its fine.
Click to expand...
Click to collapse
where to contact for restoration of imei no.
pls help
Imei repair
sorry to bump an old thread, i do imei repair and ONLY restore to original imei number.

[HELP] IMEI repaire

Dear all,
My moto x' IMEI got invalid after having a repair process. May I flash the raw valid imei to the device ?
You know I have my own valid IMEI number
If a repair shop messed it up, they should fix it.
You can try flashing your devices exact firmware... Same Android version and see if it fixes it.
Other than that, any talk of manually manipulating your imei is mostly illegal and definitely not discussed on XDA. ?
ibigbug said:
Dear all,
My moto x' IMEI got invalid after having a repair process. May I flash the raw valid imei to the device ?
You know I have my own valid IMEI number
Click to expand...
Click to collapse
No hardware "repair" will just result in you to loose your IMEI it would have screwed up more! And if its a result of a software "repair" it is almost cuz of mismatched partitions, so flashing the whole firmware for your device should help to correct the issue!! If the repair guy has the "tools/power" to mess up your IMEI he should definitely have the ability to restore it back... Other than that changing IMEIs is ILLEGAL is almost ALL COUNTRIES and against XDA Rules!
Darth said:
If a repair shop messed it up, they should fix it.
You can try flashing your devices exact firmware... Same Android version and see if it fixes it.
Other than that, any talk of manually manipulating your imei is mostly illegal and definitely not discussed on XDA. ?
Click to expand...
Click to collapse
He just replaced my logic board I think
Gundabolu SC said:
No hardware "repair" will just result in you to loose your IMEI it would have screwed up more! And if its a result of a software "repair" it is almost cuz of mismatched partitions, so flashing the whole firmware for your device should help to correct the issue!! If the repair guy has the "tools/power" to mess up your IMEI he should definitely have the ability to restore it back... Other than that changing IMEIs is ILLEGAL is almost ALL COUNTRIES and against XDA Rules!
Click to expand...
Click to collapse
The guy replaced my mother board, in fact I don't where the new board comes from.
Any way my phone worked but IMEI lost
ibigbug said:
The guy replaced my mother board, in fact I don't where the new board comes from.
Any way my phone worked but IMEI lost
Click to expand...
Click to collapse
IMEI is generic to the Mother board it is pre programmed into it... So if you have lost the IMEI that means the repair guy gave you a faulty motherboard... You should catch hold of him... U dont have signal right?
Gundabolu SC said:
IMEI is generic to the Mother board it is pre programmed into it... So if you have lost the IMEI that means the repair guy gave you a faulty motherboard... You should catch hold of him... U dont have signal right?
Click to expand...
Click to collapse
As I know, nv550 stores the IMEI info, but it is read only now. Anyone knows how to write it again ?
ibigbug said:
As I know, nv550 stores the IMEI info, but it is read only now. Anyone knows how to write it again ?
Click to expand...
Click to collapse
Nope there is NO way... Sorry...
ibigbug said:
As I know, nv550 stores the IMEI info, but it is read only now. Anyone knows how to write it again ?
Click to expand...
Click to collapse
The xt925 was the last moto you could mod the imei on.

[CLOSED] IMEI gone after sp flash tool flash

So the recovery partition got corrupt and it would reboot my device when i tried booting into it, i used a app to forcefully boot into the recovery using root. My device bootlooped and would not boot into fastboot or turn off
I used this tool link to disable auth, then i flashed with sp flash tool. I was using firmware upgrade not format all
this video told me to uncheck preloader,cust,exaid during flash or i might loose my imei, i havent and i did loose my imei. My mom now uses the phone, she has two phones, this one she uses for paying with nfc and she uses her old one for everything else.
Im not tech savvy so i do not know if this is a important detail , it likely is not : when she puts her simcard into the phone it shows her contacts in the contacts app but she cant connect to mobile data, make and recieve calls/messages.
The bootloader is locked I do not have the box or a IMEI backup. Is there something i could do to maybe repair it? I could maybe use my imei from my other phone which is redmi note 9? its not important and doesnt really matter but would be great if i got it fixed
Guard of the snow said:
I could maybe use my imei from my other phone which is redmi note 9?
Click to expand...
Click to collapse
@Guard of the snow Thread has been closed.
Edit or change of IMEI is illegal in quite a few of countries. For this reason, XDA doesn't allow and accept discussions about or support for such an edit or change.
XDA Forum Rules (excerpt).
...
9. Don't get us into trouble.
Don't post copyrighted materials or do other things which will obviously lead to legal trouble. If you wouldn't do it on your own homepage, you probably shouldn't do it here either. This does not mean that we agree with everything that the software piracy lobby try to impose on us. It simply means that you cannot break any laws here, since we'll end up dealing with the legal hassle caused by you. Please use common sense: respect the forum, its users and those that write great code.
...
Click to expand...
Click to collapse
Regards
Oswald Boelcke
Senior Moderator

Categories

Resources