Blocking all incoming calls, sms/mms and emails in Android N and O via ADB content command

1k views Asked by At

After reading about Implementing block phone numbers, I haven't found option for blocking all incoming traffic, only by particular URI

adb shell content insert --uri content://com.android.blockednumber/blocked /
--bind original_number:s:'6501002000'

Is there a wildcard for blocking all calls, sms/mms and emails on Android N via ADB content command?

1

There are 1 answers

0
Ka1s3r S0z3 On

Haven't found any option for blocking traffic with content command, but found solution for blocking in/out SMS with

devicePolicyManager.addUserRestriction(componentName, UserManager.DISALLOW_SMS);

and outgoing calls with

devicePolicyManager.addUserRestriction(componentName, UserManager.DISALLOW_OUTGOING_CALLS);