Shubham Sinha
Shubham Sinha

Reputation: 33

How to enable installation of apk over usb debugging if denied permission earlier?

I want to use Redmi Note 7 Pro for debugging my react native applications over ADB. But I accidentally denied installing apps over USB and chose don't ask again. Now I'm not able to allow it.

I've tried:

  1. Disabling & enabling Install via USB in Developer Options.
  2. Turn off developer options & enable it again.

But it has not worked out so far. And I'm not able to find anything related to this in google searches. I'm also not getting any popup asking when I try to install over USB.

I get this error:

java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS

Upvotes: 1

Views: 2623

Answers (3)

SHIFANA biby
SHIFANA biby

Reputation: 1

I had this problem.... once you click the deny button that particular app or program you are trying to install will be listed as denied program or whatever in install via USB section... Make sure PTP or the file transfer is on and try to install the program.... you will get the same error message on your pc but at the same time look at your device, it will show a flashing notification(will not last than 2 seconds) which says blocked installation via USB... just click on it...now you will see your program name on that list with an enabled button....you just have to disable it and you are good to go.. additionally you can on and off the developer option and debugging...revoke the Authorization also....

Hope you got your answer....☺️

Upvotes: 0

Lokesh Deshmukh
Lokesh Deshmukh

Reputation: 748

Did you tried revoking permission and connecting mobile again ?

"Revoke USB debugging authorisations" enter image description here

Upvotes: 0

FelipeCruzV10
FelipeCruzV10

Reputation: 486

Try the following:

  1. Open the terminal of your computer.
  2. Navigate to the Android SDK folder.
  3. run cd platform-tools
  4. run sudo ./adb kill-server
  5. run sudo ./adb devices

All this with your phone connected via USB, the message should pop up again.

Upvotes: 0

Related Questions