Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android 5.0 and 6.0 can't get imei num #33

Closed
loveofyou opened this issue Oct 11, 2016 · 6 comments
Closed

android 5.0 and 6.0 can't get imei num #33

loveofyou opened this issue Oct 11, 2016 · 6 comments

Comments

@loveofyou
Copy link

loveofyou commented Oct 11, 2016

Hi:
when i try use this object export my wechat_history find some issues.

My Device : Moto X Style , Android 6.0.1 , Rooted . double Sim
1 The Script can't get the right Imei ,must be defind devices imei . (Because my devices have two imei)
2 And can't use "eu.chainfire.adbd" open "adb root" , could we don't use root to get EnMicroMsg.db , tech user use example code manual copy this file to sdcard or other space .
adb shell
su
cp -fR /data/data/com.tencent.mm/ /sdcard/somewhere

thanks

@ppwwyyxx
Copy link
Owner

Sorry I don't know how to get the right IMEI if there are two.
And I don't know why adb root won't work for you. I don't have such phones for testing.

@loveofyou
Copy link
Author

loveofyou commented Oct 11, 2016

thank you for anwser .

i think we can use this code to get two imei ,then try these imei to decode EnMicroMsg.db , while ./decrypt-db.py return success。
# get imei 1
adb shell service call iphonesubinfo 1
# get imei 2
adb shell service call iphonesubinfo 3

example :

elif [[ $1 == "imei" ]]; then
imei=$(adb shell dumpsys iphonesubinfo | $GREP 'Device ID' | $GREP -o '[0-9]+')
[[ -n $imei ]] || {
imei=$(adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed 's/[^0-9A-F]*//g' | tr -d '\n')
}
[[ -n $imei ]] || {
imei=$(adb shell service call iphonesubinfo 3 | awk -F "'" '{print $2}' | sed 's/[^0-9A-F]*//g' | tr -d '\n')
}
[[ -n $imei ]] || {
>&2 echo "Failed to get imei. You can try other methods, or report a bug."
exit 1
}
echo "Got imei: $imei"

@ppwwyyxx
Copy link
Owner

On my phone when I call *#06# there are 3 IMEI. One of them works. And it's not shown up in adb shell service call.
So I don't know any proper solution and users are expected to try this by themselves.

@YibaiMeng
Copy link

@ppwwyyxx same for my phone! I have a Redmi 5A and the working IMEI is neither of the two IMEIs of the networking interfaces. It's called MEID and it shows up when I call *#6#, but I can't find it anywhere else.

@prusswan
Copy link

The issue with multiple IMEIs might be fixable by checking CompatibleInfo.cfg (as per the suggestion in #42 to run strings CompatibleInfo.cfg, the IMEI is in one of the strings)

@oakieville
Copy link

oakieville commented Feb 3, 2019

i know im late but just to point out all devices with imei have an meid. Imei is 15 digits meid is 14 the 15th digit of imei is a lunh checksum calculated by the first 14 digits, the meid is the same as the imei but without the 15th digit (the luhn checksum)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants