update android sdk permission error - android

I have downloaded the android SDK 8 for linux and following the tutorial typed:
#tools/android update sdk
bash: tools/android: Permission denied
So I tried:
#sudo tools/android update sdk
sudo: unable to execute tools/android: Permission denied

Permission denied is because you are trying to execute something from a noexec mounted partition. Either mount with exec rights or use sh ./script. In your case:
cd tools
sh ./android sdk
To remount with exec rights:
sudo mount -o remount,exec /dev/yourpartition

it is generaly caused by the files of java, you need to change the rights of the java files in the /usr/bin/
to do that you can execute:
sudo chmod +x /usr/bin/java
sudo chmod +x /usr/bin/javac
sudo chmod +x /usr/bin/javaws
sory for my bad english

Related

TERMUX- bash: ./a.out: Permission denied

Why do I keep getting this error?
>> gcc a.out
>> ./a.out
bash: ./a.out: Permission denied
I even tried this
>> chmod +x a.out
But still I keep getting the error. I have installed clang and termux-setup-storage package. My files are in main memory (not on sd card).
Termux has only problem executing a.out file. If I make any error in C program it fails to compile the a.c file
You can't execute executable in internel storage because that's mount with noexec in android.
Move that binary somewhere in termux home directory or $PREFIX.
so if you need to run those file than you need to run
$ ls //to see your file is here or not .if not than change directory
$ mv a.out ~
$cd ~
$chmod +x a.out
$./a.out
If you just installed termux api?
$ pkg install root-repo
Revoke termux app permission in settings.
$ termux-setup-storage
And taraa!!

/dev/kvm permission denied android emulator

hi i install android stdio on Ubuntu 18.0 then i try to start android emulator i got error
/dev/kvm permission denied
i try some stackoverflow question but its not solve my problem those question links are
1.Android Studio: /dev/kvm device permission denied
2.KVM is required to run this AVD. Unknown Error! Please file a bug against Android Studio
3.Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied
t tried all this but its not solve my problem and i give chmod 777 permission also
chmod 777 -R /home/halfix/Android/Sdk/emulator/
still i have /de/kvm permission divided
Android studio can't access /dev/kvm directory. To allow access run
sudo chmod 777 -R /dev/kvm
It will ask for your password. After that restart android studio.
I followed these steps to make it work in Ubuntu 18.04
Step 1: Install qemu-kvm
sudo apt install qemu-kvm
Step 2:
Add user to kvm group using:
sudo adduser <username> kvm
Step 3:
If it still showing permission denied:
sudo chown <username> /dev/kvm
No need to give whole permission to the kvm. you can give owner access for the kvm is fine like as follow
sudo chown <username>:<username> /dev/kvm
This is a realistic error message related to permission but mine happened to be the same message when java was not installed and ran the app. Hope this will help if would be my case.
/dev/kvm permission denied android studio
[Motherboard]Set VT(Virtualization Technology) in BIOS and install Virtual Machine
https://www.asus.com/in/support/FAQ/1045141/#A
Ut worked for me:
sudo apt install qemu-kvm
Re-start terminal and execute the following command:
sudo chmod 777 -R /dev/kvm

getting Error: spawn EACCES while ionic build android in ubuntu 14.04

i developed one project in ionic2
while i am doing ionic build android i am getting this error
my ionic info is
Cordova CLI: 6.3.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.36
Ionic App Lib Version: 2.0.0-beta.19
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS
Node Version: v4.4.7
I searched in google but no solution works for me..
How can i fix this Bug?
This is Permission Error While Building App
You Need to Give Permission Gradle
sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle
Enjoy :)
hit this command
sudo chmod -R a+rwx /appfolder
It is caused by permission problem. More info on problem here.
If this does not solve your problem then its probably issue of permission in your user profile directory. Try above command on user directory. It will take some time to apply permission.
Regards.
Use the verbose when you make your cordova build:
cordova build -verbose
It will return to you the path that requires the chmod +x
I was using Cordova to run my Hybrid app on my Android device, and I got this error twice during the unsuccessful build ...
Error: spawn EACCES
#Krunel Vaghela's answer above helped me somewhat ...
This is Permission Error While Building App
You Need to Give Permission Gradle
sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle
But I kept having this error:
"chmod: -r: no such file or directory"
I was using this command:
[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle
Note that my Android app is named "Android Studio.app" (with a space in the name). Solution is to simply wrap the path in quotes like so:
[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle"
NOTE: In order to find out which folder was having the permissions problem, I had to use this command:
sudo build -verbose
Which yielded the path to the permissions problem folder like this:
ANDROID_HOME=/Users/sandi/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle" -p /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android wrapper -b /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android/wrapper.gradle
Error: spawn EACCES
So take the path after "Running command:" - put that, inside quotes, after the ...
chmod -r 777
And that's what saved my day.
Had the same problem, I got it fixed by giving 777 permissions on my Sdk folder :
chmod -R 777 /YOURINSTALLOFANDROID/Sdk
After upgrading to Android 3.2, gradle version has been changed up to 4.6.
So I had to use this following command to modify gradle file permission in my Mac Terminal.
sudo chmod 755 "/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle"
Just Remove "node_modules" folder and re-install it using
sudo npm i
Hope It get works ..Thanks..!

ionic update-notifier-cordova.json' You don't have access to this file

I am trying to run ionic on iOS, but it throws an error.
What happened?
ionic run ios
/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:53
throw err;
^
Error: EACCES, permission denied '/Users/jiahongl/.config/configstore/update-notifier-cordova.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.readFileSync (fs.js:352:15)
at Object.create.all.get (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:34:26)
at Object.Configstore (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:27:44)
at new UpdateNotifier (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:34:17)
at module.exports (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:123:23)
at checkForUpdates (/usr/local/lib/node_modules/cordova/src/cli.js:64:20)
at cli (/usr/local/lib/node_modules/cordova/src/cli.js:114:5)
at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1)
Error Message
I just changed permission of the file update-notifier-cordova.json by below command:
sudo chmod -R 777 '/Users/anand.d.gupta/.config/configstore/update-notifier-cordova.json'
And this fixed the problem.
delete the file update-notifier-cordova.json from this location problem solved, it's nothing but just a config file
Deleting the file wont be a right option, the following approach worked out for me. The root cause of this issue is because of the Cordova-cli permissions.
Step 1: Uninstallcordova and install it again.
sudo npm remove -g cordova
Step 2: Install with the following command
sudo npm install -g --unsafe-perm=true cordova
Make sure it installs the recent version, by typing $ ionic info you can see the Cordova CLI versions
Step 3: Secure the permissions for the following folders
sudo chown -R <username> /Users/<username>/.config/configstore/
sudo chown -R <username> /Users/<username>/.cordova/
ionic build ios - Should work like charm
In my project, this problem has been fixed with this lines:
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
changed permission to this folder
sudo chown -R yourusername /Users/yourusername/.config/configstore/

Permission Denied: Initializing repo for building Android source

Linux and programming noob here...
I'm following the instructions # http://source.android.com/source/downloading.html
I run into trouble when I run the following line:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
I get:
bash: /home/dev/bin/repo: Permission denied
And yes I've tried to sudo it.
Thank you! :)
==================================================================================
EDIT:
I downloaded the script manually in a browser, popped-it into the home/dev/bin/ directory, and I am still unable to progress. Here is what my terminal window is giving me:
dev#Android-Dev:~$ sudo chmod a+x ~/bin/repo
[sudo] password for dev:
dev#Android-Dev:~$ cd /home/dev/bin/
dev#Android-Dev:~/bin$ sudo mkdir wip
dev#Android-Dev:~/bin$ cd wip
dev#Android-Dev:~/bin/wip$ repo init -u **<This is where the URL goes>**
fatal: cannot make .repo directory: Permission denied
dev#Android-Dev:~/bin/wip$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
dev#Android-Dev:~/bin/wip$ cd bin
bash: cd: bin: No such file or directory
dev#Android-Dev:~/bin/wip$ cd ..
dev#Android-Dev:~/bin$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
I ran into the same problem. changing the ownership helped me. When I try to curl https..://myrepo...u...r...l../repo > ./repo into my /opt/android dir it gives me this error.
I do sudo chown -R shraddha /opt/android that works
In CYGWIN you can do below.
edit .bash_profile and uncomment these fields. (any text editor will do)
# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH="${HOME}/bin:${PATH}"
# fi
Restart CYGWIN.
Under BASH, enter:
$ export PATH=$PATH:~/bin
Or add as follows to your .bashrc file:
$ echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
If you are using CSH / TCSH, enter:
$ echo 'set PATH = ($PATH ~/bin /scripts/admin)' >> ~/.cshrc
To display path settings, enter:
$ echo $PATH
Maybe you're behind a proxy? Try to download repo tool manually (just put this link into your browser). (I guess that maybe this resource can be prohibited for you). And then put it into this folder and assign permissions to it. I do not see any wrong steps in what you've described so far.
you can try this:
wget http://git-repo.googlecode.com/files/repo-1.14
After that,
you can see the repo-1.14, and you can mv it to anywhere or change the name,such as :
sudo mv repo-1.14 ~/bin/repo
The repo file is not executable. Run chmod a+x ~/bin/repo to turn it into an executable file and this should fix your problem.

Categories

Resources