Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Adb Transfer Protocol Error

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?

like image 900
REAL O G Avatar asked Dec 07 '14 16:12

REAL O G


People also ask

How to Enable adb in Android Studio?

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.

Where to find adb in Android Studio?

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.

How to disable adb?

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.


2 Answers

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.

like image 62
REAL O G Avatar answered Oct 02 '22 10:10

REAL O G


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

like image 42
Skye Avatar answered Oct 02 '22 09:10

Skye