Filehost.ro - gazduire fisiere
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
LaraTaner pe Simpatie
Femeie
24 ani
Prahova
cauta Barbat
24 - 52 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Android Stuff /

Use ADB to Enable Usage Permissions for Some Apps

Pagini: 1 Moderat de TRaP, TonyTzu
#1
Mrrrr
AdMiN
Postari: 2388
For example, some battery monitoring apps might ask that you enable some permissions via ADB.

First, make sure you checked the app and it is something safe.

0. download and extract adb-tools (platform-tools)

1. connect phone to PC via USB and make sure you have developer tools enabled, and in developer tools you have usb debugging enabled

2. in Windows open Device Manager

3. check if your phone is under Portable Devices - it should be

4. open cmd as administrator (cmd not powershell)

5. in cmd navigate to the platform-tools folder

6. in cmd type the following command:

adb devices

7. your phone will ask for a confirmation, give yes / ok or whatever

8. run the command from 6 again to make sure it returns something like:

List of devices attached
abababababab    device

9. now you can use adb commands, for example for Battery Guru:

- for usage access:    

adb -d shell pm grant com.paget96.batteryguru android.permission.BATTERY_STATS

- read dump:       

adb -d shell pm grant com.paget96.batteryguru android.permission.DUMP


_______________________________________


 
   
#2
Mrrrr
AdMiN
Postari: 2388
List of permissions:
https://developer.android.com/reference ... permission


_______________________________________


 
   
#3
Mrrrr
AdMiN
Postari: 2388
See what permissions an app has:

adb shell appops get <PackageName>

example:
adb shell appops get com.arlosoft.macrodroid.helper

Then you can use:

adb shell appops set <PackageName> <permission> allow
or
adb shell appops set <PackageName> <permission> ignore

Source:
https://android.stackexchange.com/quest ... ermissions


_______________________________________


 
   
#4
Mrrrr
AdMiN
Postari: 2388
MD Helper, in order for MacroDroid to enable / disable wifi at a certain time, without user input, requires the following permissions to be enabled:

adb shell pm grant com.arlosoft.macrodroid.helper android.permission.WRITE_SECURE_SETTINGS

adb shell appops set com.arlosoft.macrodroid.helper 10001 allow

adb shell appops set com.arlosoft.macrodroid.helper 10017 allow


_______________________________________


 
   
#5
Mrrrr
AdMiN
Postari: 2388
So, whenever I restart my phone, I have to do the above since the permissions are removed.

To ease up things, here are the steps in a more orderly manner:

1. plug your phone with an USB cable and set it to file transfer

2. open CMD on the platform-tools folder.

3. enter the following command in order to connect adb to your phone: adb devices

4. MD helper given command: adb shell pm grant com.arlosoft.macrodroid.helper android.permission.WRITE_SECURE_SETTINGS

5. check other settings with: adb shell appops get com.arlosoft.macrodroid.helper

6. the following permissions should be set to "ignore" - allow them one by one:

adb shell appops set com.arlosoft.macrodroid.helper SYSTEM_ALERT_WINDOW allow

adb shell appops set com.arlosoft.macrodroid.helper 10017 allow

adb shell appops set com.arlosoft.macrodroid.helper 10001 allow

adb shell appops set com.arlosoft.macrodroid.helper 10008 allow


_______________________________________


 
   
Pagini: 1  
Mergi la