I need to read IMEI
value in opencore source code(c file).
I will use IMEI
for drm
file encoding.
Some multimedia has not permission for READ_PHONE_STATE
permission.
So I need to read IMEI
value without permission.
Can I do it?
You can't. If there was a way to do something, that requires permission, without granting that permission to application, then there would be no sense to use permission system in the first place.
Having said that, there theoretically might be some hacks, but they will be treated as security flaw and will be fixed in further releases. I would strongly recommend against using them (assuming you find one).
Its much easier to specify what security permissions your DRM library depends on then rely on some hacks.
You can use following java code to fetch IMEI number without permission.
try {
TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
Log.i("TAG", "IMEI : = " + tm.getDeviceId());
} catch (Exception e) {
e.printStackTrace();
}