List of utility methods to do APK Debuggable Check
boolean | isDebuggable(Context context) is Debuggable PackageManager pm = context.getPackageManager(); try { ApplicationInfo info = pm.getApplicationInfo( context.getPackageName(), 0); return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; } catch (PackageManager.NameNotFoundException e) { return true; ... |
boolean | isDebuggable(Context ctx) is Debuggable boolean debuggable = false; X500Principal DEBUG_DN = new X500Principal( "CN=Android Debug,O=Android,C=US"); try { PackageInfo pinfo = ctx.getPackageManager().getPackageInfo( ctx.getPackageName(), PackageManager.GET_SIGNATURES); Signature signatures[] = pinfo.signatures; CertificateFactory cf = CertificateFactory.getInstance("X.509"); ... |