Search code examples
androideclipseadbandroid-4.4-kitkat

Android Kitkat 4.4.2 - How to set PACKAGE_VERIFIER_ENABLE hidden API attribute?


I'm looking to set the Verify Apps attribute under Settings >> Security on my Android device either through a custom APK or via the ADB terminal.

I found a process for enabling hidden/internal API settings here, however Eclipse will not allow me to compile my APK.

The call that I am making in my MainActivity is:

Settings.Secure.putInt(MainActivity.this.getContentResolver(), Settings.Secure.PACKAGE_VERIFIER_ENABLE, 0);

I saw in this comment that a broadcast receiver may be used via the adb shell. Is it possible to set hidden/internal API settings using this method?

Either method would work on my end for accomplishing this task, but it would be nice to know both methods, if they exist.


Solution

  • To disable

    settings put global package_verifier_enable 0 
    

    To Enable

    settings put global package_verifier_enable 1