https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-10.0.0_r25/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
setImmediate(function() { //prevent timeout Java.perform(function(){ var TelephonyPermissions = Java.use("com.android.internal.telephony.TelephonyPermissions"); console.log("TelephonyPermissions Found."); TelephonyPermissions.reportAccessDeniedToReadIdentifiers.implementation = function(context, subId, pid, uid, callingPackage, message) { console.log("reportAccessDeniedToReadIdentifiers : " + callingPackage + " -> " + message); return this.reportAccessDeniedToReadIdentifiers(context, subId, pid, uid, callingPackage, message); } console.log("...Hook OK..."); }); });
代码运行在 “com.android.phone” 进程中