ADB instructions

474 views
Skip to first unread message

Neil Sands

unread,
Mar 31, 2021, 3:28:25 PM3/31/21
to Tasker
Hello

I'm trying to install ADB so that I can get permission for writing secure settings for Tasker. I've found an instruction saying 'Set up ADB on your PC as described here', and following the link I see a page entitled ADB setup.

On that page, instruction 4 says 'Install ADB on your PC. Check here for a quick way to do it'. Following that link I see a page called 'Google Releases Separate ADB and Fastboot Binary Downloads', which doesn't explain explicitly a quick way to do it but does provide a link to download ADB for Windows. So I've downloaded that.

Inside the zip are about 15 files. I'm guessing the one I want is adb.exe, but it's only a guess. When I run it, nothing seems to happen, so I've no idea if anything has happened or not. So I carry on in hope.

I come to the instruction 'Connect device to PC: Connect your device to a PC and look on your phone. A prompt should show up asking you to allow your phone to be debugged by your PC'. Well, I plug it in but that prompt doesn't show. At this point I feel I've had to make too many guesses, and am stopping.

Can anyone tell me exactly what to do? People here must have gone this way before, I'm sure, hopefully with more success than me.

Thanks everyone.

Neil

jmjc...@gmail.com

unread,
Mar 31, 2021, 10:45:29 PM3/31/21
to Tasker
Steps are:

1. Unlock Developer Options on your device
2. Enable USB Debugging on your device
3. Connect your device to a PC with a USB cable
4. Run "adb devices". Should see a prompt on your device. Click allow.
5. Run the permission actions as described on the Tasker website.

Same here:

Neil Sands

unread,
Apr 3, 2021, 6:28:51 PM4/3/21
to Tasker
Thank you. I still don't know *how* to run adb devices.  As I said, I've clicked on adb.exe, which is my best guess, but nothing happens when I do that.

If someone could spell that out I'd be grateful.
Thanks.

jmjc...@gmail.com

unread,
Apr 4, 2021, 9:27:42 PM4/4/21
to Tasker
Step #6 from the above guide:

Open the command prompt from the file folder that contains the extracted downloads. To do this, press the windows key and type cmd. When the prompt opens, type cd followed by folder your downloaded ADB to.

Are you able to get this step working?

Neil Sands

unread,
Apr 5, 2021, 6:22:29 AM4/5/21
to Tasker
Thanks. Things are improving in that I now see the prompt on my phone, and I've clicked to allow.

But running the command in the command prompt gives me this error:

C:\Users\chich\Desktop\platform-tools_r31.0.1-windows\platform-tools>adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
* daemon not running; starting now at tcp:5037
* daemon started successfully
Security exception: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

I'm pretty sure I've enabled all the permissions I can. Have I found the correct instruction to type in?

Thanks for your continued help.
Neil

Jay M

unread,
Apr 5, 2021, 10:38:51 AM4/5/21
to tas...@googlegroups.com
Havent been following thead but i have had this exception before while trying to change the default launcher on Android TV. Anyways I dont know what device your using or what its running but if its MIUI theres 3 permissions that need to be granted i cant remember what they are off the top of my dome so you will need to google it but 1 of them was android.permission.BATTERY_STATS or something like that.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/e878a668-b5e7-4201-8914-c256e656a261n%40googlegroups.com.

Neil Sands

unread,
Apr 5, 2021, 5:49:15 PM4/5/21
to Tasker
Thanks. Mine's not MIUI. It's an Oppo A72 phone.
 Neil

João Dias

unread,
Apr 6, 2021, 8:51:12 AM4/6/21
to tas...@googlegroups.com
Hi. That's a known issue on some devices. Can you please enable the option "Disable permission Monitoring" or "USB Debugging (Security Settings)" under "Developer options"? Hope this helps!

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


Neil Sands

unread,
Apr 6, 2021, 10:09:25 AM4/6/21
to Tasker
Thanks for weighing in João. I'm no further forward though I'm afraid.

This is what it's looking like now, after enabling 'Disable permission monitoring'.

Thanks
Neil


C:\Users\chich\Desktop\platform-tools_r31.0.1-windows\platform-tools>adb shell pm grant net.dinglisch.android.taskerm android.permission WRITE_SECURE_SETTINGS
* daemon not running; starting now at tcp:5037
* daemon started successfully

Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown permission: android.permission
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:2235)
        at com.android.server.pm.permission.PermissionManagerService.access$1000(PermissionManagerService.java:131)
        at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.grantRuntimePermission(PermissionManagerService.java:3317)
        at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:6750)
        at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2030)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:238)
        at android.os.ShellCommand.exec(ShellCommand.java:104)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24360)
        at android.os.Binder.shellCommand(Binder.java:881)
        at android.os.Binder.onTransact(Binder.java:765)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:5393)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4907)
        at com.android.server.pm.OppoPackageManagerService.onTransact(OppoPackageManagerService.java:87)
        at android.os.Binder.execTransactInternal(Binder.java:1021)
        at android.os.Binder.execTransact(Binder.java:994)

João Dias

unread,
Apr 6, 2021, 10:23:29 AM4/6/21
to tas...@googlegroups.com
You have a space in android.permission WRITE_SECURE_SETTINGS. It should be android.permission.WRITE_SECURE_SETTINGS 😊

Neil Sands

unread,
Apr 6, 2021, 10:38:51 AM4/6/21
to Tasker
Oh so I do! Well spotted João!

Thanks to all for their help. It's now working for me.

Neil

João Dias

unread,
Apr 6, 2021, 10:56:39 AM4/6/21
to tas...@googlegroups.com
Great :)
Reply all
Reply to author
Forward
0 new messages