I've just started using Android Studio. I've got an HTC one (m7) running rooted Lollipop. I'm trying to run the test app I've created on this physical device. When I go to run it I get "Adb Transfer Protocol Error: Permission Denied". The device shows up in android studio when I go to run the app, and I have verified root access. Any help is appreciated.
EDIT: I just tried to install a .apk file using the command adb install and I'm getting permission denied. This is a rooted phone. However, I've always had root access on this phone, and before upgrading to android 5.0 Lollipop I could run this command and instantly install a .apk without having to do adb shell. If this is the problem, how do I tell android studio to run adb shell before trying to install and run the app?
Enable adb debugging on your device To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom. On some devices, the Developer options screen might be located or named differently. You can now connect your device with USB.
To resolve this, firstly you need to check if the adb is even present in the SDK folder. For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools, check if adb.exe is present. Case 1: If adb is not present: If the adb is not present, installing the platform-tools resolves the problem.
Go to Settings and scroll to the System section (on Android 8 and above, go to Settings > System) Tap Developer Options. Tap the button to toggle developer options Off. USB Debugging is included in the Developer Options.
Well, I solved it. The folder \data\local\tmp did not have full read write execute permissions. Once I did a quick chmod 777 on it Android Studio allowed the installation and run of the app. You can also do this procedure through a file explorer that has root capabilities.
You can also do this in Terminal Emulator. Download the app from this link: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=pl Of course you need to have root.
Open it and enter:
su
cd /data/local
chmod 777 tmp
And try run app now
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With