Search code examples
androidshelladb

adb shell pm: command grant not found


On this site AutoTools Secure Settings, I was advised to use the following command:

adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS

However, the command grant is not available. Does that maybe have to do with my Android version which is 4.0.3?

orschiro@x230 ~ $ adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
Error: unknown command 'grant'
usage: pm list packages [-f] [-d] [-e] [-s] [-e] [-u] [FILTER]

Solution

  • Try to change the command

    adb -d shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
    

    I think the parameter -d to invoke grant permission over ADB