Discussion:
How to get imei in native code using C and C++ and without use of JAVA and JNI.
Dharmendra Carpenter
2018-04-24 08:32:31 UTC
Permalink
Hi,

How to get imei in native code using C and C++ and without use of
TelephoneManger API and JNI Functions. Can anyone help me on this?

Thanks
Dharmendra
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/f84108e1-4445-4044-872b-7a19cee07ccb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Glenn Kasten
2018-04-24 16:02:02 UTC
Permalink
I'm curious why you can't use JNI, as that is the standard way to access
APIs that don't have an NDK equivalent.
Post by Dharmendra Carpenter
Hi,
How to get imei in native code using C and C++ and without use of
TelephoneManger API and JNI Functions. Can anyone help me on this?
Thanks
Dharmendra
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/b43c9778-34d9-480b-a614-8bb8f295d658%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dharmendra Carpenter
2018-04-24 18:03:18 UTC
Permalink
Thanks!! Glenn Kasten,

Definitely we can use JNI but one of the security cerfication provider
company wants us to get imei using native C. They thinks that imei can be
compromised using Java and JNI. Hecker can be altered the fuction returned
value.

-Dharmendra
Post by Glenn Kasten
I'm curious why you can't use JNI, as that is the standard way to access
APIs that don't have an NDK equivalent.
Post by Dharmendra Carpenter
Hi,
How to get imei in native code using C and C++ and without use of
TelephoneManger API and JNI Functions. Can anyone help me on this?
Thanks
Dharmendra
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/b43c9778-34d9-480b-a614-8bb8f295d658%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/b43c9778-34d9-480b-a614-8bb8f295d658%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH%2B9vmZ89RZDkFuUem3ifbLrPh3WpF0B-%3DtgzF6j-6rd0ug69Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Dharmendra Carpenter
2018-04-24 18:23:06 UTC
Permalink
Thanks!! Glenn Kasten

We can use JNI but one of the security audit companies has recommended to get IMEI using native C/C++. They think that IMEI can be compromised while trying to retrieve it using Java and JNI
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c5f18abf-dea4-4289-b744-77ce761b75fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
mic _
2018-04-24 18:56:53 UTC
Permalink
If you're worried about IMEI being spoofed you may want to look into ID
attestation which is supported on some devices running Android 8.0 and
later:
https://source.android.com/security/keystore/attestation#id-attestation
Note that you'll need a server if you want to perform the validation in a
secure manner.

/Michael

On Tue, Apr 24, 2018 at 8:23 PM, Dharmendra Carpenter <
Post by Dharmendra Carpenter
Thanks!! Glenn Kasten
We can use JNI but one of the security audit companies has recommended to
get IMEI using native C/C++. They think that IMEI can be compromised while
trying to retrieve it using Java and JNI
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/
msgid/android-ndk/c5f18abf-dea4-4289-b744-77ce761b75fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAJwpw3YMskSYWJcWYCNFdPjF8z7tWDX6L%3DPZ-r9YYEaRb2%3DqtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-04-25 08:32:26 UTC
Permalink
Post by Dharmendra Carpenter
Thanks!! Glenn Kasten
We can use JNI but one of the security audit companies has recommended to
get IMEI using native C/C++. They think that IMEI can be compromised while
trying to retrieve it using Java and JNI
This security audit company wants you to use some hacks that can be more
dangerous than IMEI being compromised while trying to retrieve it using
Java. At any rate, there is no way to protect your function that reads IMEI
from changed IMEI (consciously by the user or as a result of hacker attack).

Best regards,
Alex Cohn
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/91d7cb6d-6e57-48e2-b86f-9172773b58c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...