Android : Adb permission denied - android

I am using ubuntu 13.04 I have just set up eclipse and android sdk. But whenever i try to run program or even if I am switching DDMS perspective it shows me permission denied error.
How to tackle this issue.

#Manoj,
Try running following
cd /home/manoj/....../platform-tools
adb version
If you get a Permission denied error then
chmod 770 adb
adb version
you should get a response like "Android Debug Bridge Version x.x.xx"
If so the source of your problem was file permission and set the file permission appropriately
Also check if the $PATH includes the path to /home/manoj/....../platform-tools.
Disclaimer: I use Ubuntu 12.04 and adb at command prompt for my work. I hardly use eclipse for my current work.
Let us know your results
Good luck

Another issue might be adb's file permissions themselves, make sure the user you are using to run eclipse is the same as who owns the adb files. Also make sure that adb is actually executable. (These are both unlikely issues, but worth checking if the other solutions given don't fix it)
From the home directory, try 'adb' in terminal:
If 'adb' doesn't find the adb tool, then your path needs adjusted. (edit .bashrc with bash commands to append to the path the /tools directory of the android sdk, is probably the easiest way, then log out and back in to apply the settings)
If 'adb' says it needs root permission, then try 'sudo adb' and see if that works. (this shouldn't happen, but worth testing)
I'm not actually sure what it says for 'non executable' in 13.04, but it should be self explanatory.

I have solved this problem through following steps:
1. copy & unzip eclipse to /opt/android/android-sdk-linux/
2. x86= sudo apt-get install libgl1-mesa-dev
x64(Ubuntu 13.04 and earlier)= sudo apt-get install ia32-libs
x64(Ubuntu 13.10 and above)= sudo apt-get install libgl1-mesa-dev:i386
I use ubuntu 14 and on this version listed packages have multiple dependencies, so if you could not install this package use apt-get -f install (without package) . this statement install dependencies.
3. sudo gedit /etc/environment
:/opt/android/android-sdk-linux/tools
:/opt/android/android-sdk-linux/platform-tools

the same happened for me when i used adb version it showed adb server not installed ,and it showed how to fix it ,and now works fine ,install the adb server using the following code .
The program 'adb' is currently not installed. You can install it by typing:
sudo apt-get install android-tools-adb

Related

Android Studio does not have write access

I am using android studio 3.4.2. When I try to update
the android studio it says
"Studio does not have write access to /app/extra. Please Run it by a privileged user to update"
How to solve it?
I would suggest to set your current user as owner of /usr/bin/android-studio
This will resolve the issue in long term:
sudo chown -R $USER:$USER /usr/bin/android-studio
Navigate to your Android studio folder via terminal then run android studio with administrator privileges, using sudo or su. If you provide more information, like which OS you are using, maybe I'll be able to tell you the exactly command line you should use.
Edit:
Open terminal application, then type de following :
cd ~/android-studio/bin *
Now we must run Android Studio script file studio.sh as administrator:
sudo ./studio.sh
If doesn't work try : sudo sh studio.sh
(Optional) To prevent this problem every time you want update android studio, see https://stackoverflow.com/a/37704528/8513494
And is it.
I'm assuming that your android studio is located on your user folder, if there's a problem with this step, you should check /opt/ directory and look out for android studio installation folder or see https://superuser.com/a/1080329
I would suggest setting up your current user as the owner of Android Studio
Linux
sudo chown -R $USER:$USER /usr/bin/android-studio
Mac
sudo chown -R $USER /Applications/Android\ Studio.app
or if you using android studio portable then you can use custom path like this.
sudo chown -R $USER: pathDirOfYourAndroidStudio/Android\ Studio\ Preview.app
For linux mint 20:
sudo chown -R $USER:$USER /opt/android-studio-4.2/android-studio/
Happens on Mac when you do not have Android studio in /Application directory. Move it there, if it is not resolved, try this answer.
Set access to Read and Write (default is Read only)
I'd suggest changing the owner of the android-studio directory, doing so depends on the path of your android studio. Here is mine
sudo chown -R $USER:$USER /opt/android-studio
But you might have the following path
sudo chown -R $USER:$USER /usr/bin/android-studio
Check well and enjoy
If you are a MAC user and running portable AS then the simple solution is to move the application within Application folder. Check this video. It solves my issue after wasting 3 hrs within the terminal but nothing is wasting of time. I am running MACOS 13(Ventura) & AS Electric Ele.

E:The repository 'http://apt.postgresql.org/pub/repos/apt tessa-pgdg Release' does not have a Release file

I have installed android studio on my linux mint 19.1 and after installation of it I restarted my PC. After restarting I couldn't see wi-fi sign in my machine.
Enable wifi option is not showing. I opened driver manager and I got the above error. I have already tried sudo apt-get update and sudo apt-get upgrade. I also restarted my machine several times.
I think this error appeared since the PostgreSQL repo doesn't have a release for "tessa".
Two solutions:
Edit the "/etc/apt/sources.list.d/pgdg.list" file (or another list file contains "http://apt.postgresql.org/pub/repos/apt tessa-pgdg Release") and change "tessa" to one of the version name supported by PostgreSQL (here is the list: https://apt.postgresql.org/pub/repos/apt/dists/).
Simply delete "/etc/apt/sources.list.d/pgdg.list" or remove the line "http://apt.postgresql.org/pub/repos/apt tessa-pgdg Release" in other file if you are not using PostgreSQL.
Here $(lsb_release -cs) returns terra and this doesn't work in many distributions. Use bionic instead, it should work
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
And then finally install pgadmin:
sudo apt install pgadmin4
Enjoy!
make
/etc/apt
make
sources.list.d
make
rm pgdg.list
make
sudo apt-get update && apt-get upgrade

installing android studio on ubuntu

everybody, I am the android developer, I am using ubuntu 14.04 LTS.
Because of some hardware problem, I have to format my PC. before that android studio , SDK and Java were working perfectly.
After formatting my PC. I installed jdk1.8.0_71. after i extract android studio deb file with command sudo dpkg -i android-studio_4.13.0-ubuntu0_all.deb
and 'android-studio' folder extracted at /opt directory.
after that, i try to run /opt/android-studio/bin/studio.sh with command.
sh ./studio.sh and it gives me error like this
I have also tried by ./studio.sh to execute but same error. please help to solve.
To install Oracle Java on Ubuntu, do this:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
I do this every time I install an Android Studio and it works flawlessly. And your Java 8 will be kept up to date, too. The environment variables are automatically properly set by that procedure.
its all about ELF execution (when you get bushes in output)
when your 64 bit os tries to start the Android SDK which in turns tries to run some 32 bit binaries and thus is the issue of compatibility.
check you have proper libs installed for studio
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
64-bit architecture your you need
sudo apt-get install libncurses5:amd64 libstdc++6:amd64 zlib1g:amd64
and 32 bit:
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
for details see:
https://developer.android.com/studio/install.html
ps if apt could not find such libs try to search for similar - the name can vary for different distro
also use proper java hotspot (jdk) 32/64bit for your system
Setting up Android Studio takes just a few clicks.
While the Android Studio download completes, verify which version of the JDK you have: open a command line and type javac -version. If the JDK is not available or the version is lower than 1.8, download the Java SE Development Kit 8.
To install Android Studio on Linux, proceed as follows:
Unpack the .zip file you downloaded to an appropriate location for your applications, such as within /usr/local/ for your user profile, or /opt/ for shared users.
To launch Android Studio, open a terminal, navigate to the android-studio/bin/ directory, and execute studio.sh.
Tip: Add android-studio/bin/ to your PATH environment variable so you can start Android Studio from any directory.
Select whether you want to import previous Android Studio settings or not, then click OK.
The Android Studio Setup Wizard guides you though the rest of the setup, which includes downloading Android SDK components that are required for development.
Note: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
If you are running 64-bit Fedora, the command is:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
For your details:
https://storage.googleapis.com/androiddevelopers/videos/studio-install-linux.mp4
I had similar problems with finding java by starting android-studio on ubuntu.
I solved the problems by editing the studio.sh file.
In the file the JAVA_HOME variable should be set, but it wasn't.
So I set the JAVA_HOME variable in the script manually and I could start android-studio.
Finally i solved my problem bu reinstalling java properly. i thought i installed wrong java/jdk. now Android Studio,Java is working.
I found this link useful to install java step by step. Link to install java step by step
Install Android Studio in ubuntu :
At first install JDK
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
Download the android studio from here
https://developer.android.com/studio
Unzip android studio tar file using :
sudo unzip android-studio-ide-141.2178183-linux.zip -d /opt
or Simply unzip the download file using Archive Manager
Goto to android-studio/bin folder and open terminal or in terminal type
/opt/android-studio/bin
Then type :
./studio.sh
Android studio lunch your computer.
It takes about 30 min to one hour to finish gradle.
There recommend some updates and you should provide those updates.
For installing app using your phone, open developer mode. If you cannot see developer options go to about phone and tap build version 8 times.
In developer options turn on usb debugging.
Connect the phone into the computer using a USB cable.
Give a commands : sudo apt install adb
On the phone there is a dialog for debugging permission. Provide the permission.
Then install the app.
For saw the program in desktop goto tools->Create Desktop Entry-> Ok
Please, try to install java 7 or openjdk. It must solve problem.

android aapt doesn't work on arch linux

when ever I run the cordova/build, I get following ERROR:
Execute failed: java.io.IOException: Cannot run program "../android-studio/sdk/build-tools/android-4.4W/aapt"
what should I do?
I moved my Android Developer Tools (ADT) folder from Ubuntu's partition to Linux Mint's partition, but accidentally put in inside my web server's root folder and the permission of ADT's folders were set to 755, the files were set to 644 by my shell script to rebuild the permissions for my new web server.
After I moved ADT to my home folder and started using Android Studio, I got this problem.
sudo chown $USER:$USER -R /home/myusername/my-adt-folder
doesn't help.
GNU C Library was already installed by default. Not sure why it is related to this problem.
I decided to set 777 permission to ADT and it worked.
sudo chmod 777 -R /home/myusername/my-adt-folder
That's it.
It seems another system user in the system needs to access to android-4.4W/aapt file.
I solved it by installing lib32-glibc.
https://www.archlinux.org/packages/multilib/x86_64/lib32-glibc/
If you just want aapt on Arch without the overhead/hassle of setting up ADT then you can try the solution that I presented on the Android Enthusiasts site here.

Unable to set Android SDK Path in Android Studio

I am unable to set the Android SDK Path on a fresh install of Android Studio for Ubuntu 14.04. Clicking 'Apply' and 'OK' do not do anything, even though the supplied path is valid.
This error does appear to be linked to file permissions. Another option rather than granting read write and execute rights to everyone is to change the owner/group of the files like so:
sudo chown -R UserNameHere:UserGroupHere android-studio
My Android SDK directory did not have the necessary permissions.
I blindly updated them with
$ sudo chmod -R 777 /urs/bin/android-studio/
and it now works.
I reported a bug for this: https://code.google.com/p/android/issues/detail?id=73155

Categories

Resources