0

This might seem weird, but I installed a regular Android app using ADB to my Huawei Watch 2 and the app requires notification access which when attempting in app causes it to crash as it trys to open the settings to allow it's access which doesn't exist in the settings.

I just need to grant this one permission in order to get the app to work

  • found any solution? (sorry for answer, and not comment, but I have less than 50 reputation :P ) – Mirco Dec 27 '17 at 12:44
  • @mirco no I have not – DanHolli Dec 28 '17 at 1:08
1

adb shell into your device and do

cmd appops set package.name PERMISSION_NAME {allow/ignore}

Edit: I don' think this will work with notification access. Anyway, the command for changing system settings is

adb shell settings put setting_name value

But I cannot find any setting name corresponding to notification access. You can take a look all the available settings here

Other alternative if you are rooted is to extract the settings.db where all the preferences are store, modify it there using sqlite and reboot.

  • Thanks for trying to help, but I need the permission name – DanHolli Dec 28 '17 at 2:03
0

For Android 9 or above use this:

adb shell cmd notification allow_listener com.mypackage.app/com.mypackage.app.mylistener

For any other Android version below 9 use this:

adb shell settings put secure enabled_notification_listeners %nlisteners: com.example.myapplication/com.example.myapplication.service.ServiceNotificationIntercept

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.