Re: Permission denied!

2,119 views
Skip to first unread message
Message has been deleted

Douglas Santillan A.

unread,
Jan 11, 2016, 5:27:57 PM1/11/16
to andro...@googlegroups.com

Remount first
adb remount

If still fails, grant perms
adb shell chmod 777 /path
Once done restore perms
adb shell chmid 755 /path

On Jan 11, 2016 3:42 PM, "Vel Asta" <pavel.as...@gmail.com> wrote:
Hey folks I'm trying to push a compiled VNC server binary into Android x86. I set up an ADB connection between my Android x86 from one machine to my main development machine (ubuntu). I can instal APK's no problem. But when I tried to push the binary files it said "Permission denied" ... do you folks know how to fix :(

~/Desktop/android-sdk-linux/platform-tools# adb push androidvncserver /data/local/
failed to copy 'androidvncserver' to '/data/local//androidvncserver': Permission denied

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Douglas Santillan A.

unread,
Jan 11, 2016, 5:47:34 PM1/11/16
to andro...@googlegroups.com

Try with su
adb shell "su chmod 777 /path"

On Jan 11, 2016 4:42 PM, "Pavel Astakhov" <pavel.as...@gmail.com> wrote:
Thank you so much for your advice but sadly didn't work :( (still permission denied when running $adb push androidvncserver /data/local)

ran on Ubuntu machine with ADB connection to Android x86. 

ran
$ adb remount

~/Desktop/android-sdk-linux/platform-tools# adb remount
remount failed: Permission denied

ran
$adb shell chmod 777 /path

~/Desktop/android-sdk-linux/platform-tools# adb shell chmod 777 /data/local
Unable to chmod /data/local: Operation not permitted


--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/_tlSECXF4UI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Douglas Santillan A.

unread,
Jan 11, 2016, 6:01:26 PM1/11/16
to andro...@googlegroups.com

Sorry, I think that there is something wrong with the command syntax provided try

adb shell su -C "chown 777 /path"

If fail try these steps

adb shell
On android promt
su
On super user
chmod 777 /path
exit
On android promt
exit

Upload files, then restore perms

On Jan 11, 2016 4:52 PM, "Pavel Astakhov" <pavel.as...@gmail.com> wrote:
that's so funny I just tried that right before you got back :) sadly this is what I got


Attempt#1:

:~/Desktop/android-sdk-linux/platform-tools# adb shell su chmod 777 /data/local
Unknown id: chmod

Attempt#2:

~/Desktop/android-sdk-linux/platform-tools# adb shell "su chmod 777 /data/local"
Unknown id: chmod

Attempt#3:

~/Desktop/android-sdk-linux/platform-tools# su adb shell chmod 777 /data/local
No passwd entry for user 'adb'


Really appreciate you helping me out and trying to figure this out

Message has been deleted
Message has been deleted

Douglas Santillan A.

unread,
Jan 11, 2016, 6:16:05 PM1/11/16
to andro...@googlegroups.com

Just give perns to the binary 755 should do

adb shell su -c "chmod 755 path/file"

First number is super user
Second system
Third user

4 gives read
2 write
1 exec

7= write+read+exec
5= read+exec

On Jan 11, 2016 5:06 PM, "Pavel Astakhov" <pavel.as...@gmail.com> wrote:
PERFECT!!! Your the best!

 the command

$adb shell su -C "chmod 777 /data/local"

worked cause I pushed it and it went through (below). Last quick question. When I try running it it gives me a same error that permission is denied :/ do I have to make it executable and if so how :)) 


root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb push androidvncserver /data/local
46 KB/s (237144 bytes in 4.964s)
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell /data/local/androidvncserver
/system/bin/sh: /data/local/androidvncserver: can't execute: Permission denied
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 


THANK YOU!!!! 

Message has been deleted

Douglas Santillan A.

unread,
Jan 11, 2016, 6:34:43 PM1/11/16
to andro...@googlegroups.com

I don't know why are you placing this executable in data. Bins should go in /system/bin or /system/xbin so they are accesible to the system

Thing is, you need to remount system for write, then push to /system/bin give owner (chown 0.0 or root.rooot) then perns (chmod 755). Then remount read only

On Jan 11, 2016 5:20 PM, "Pavel Astakhov" <pavel.as...@gmail.com> wrote:
Dear Douglas, for some reason after I give that command ($adb shell su -c "chmod 755 /data/local/androidvncserver")


then I try running it, it gives me the error that no such file/directory :/


root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb push androidvncserver /data/local
46 KB/s (237144 bytes in 4.973s)
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell /data/local/androidvncserver
/system/bin/sh: /data/local/androidvncserver: can't execute: Permission denied
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell su -c "chmod 755 /data/local/androidvncserver"
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell /data/local/androidvncserver
/system/bin/sh: /data/local/androidvncserver: No such file or directory
root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# 
Message has been deleted

Douglas Santillan A.

unread,
Jan 11, 2016, 6:45:23 PM1/11/16
to andro...@googlegroups.com

Data is mounted read/write
System is usually just read

I am away from my desktop. I will send you details later.

On Jan 11, 2016 5:38 PM, "Pavel Astakhov" <pavel.as...@gmail.com> wrote:
It was just the instructions for the Android vnc server (bottom of this link: https://github.com/LibVNC/libvncserver/blob/master/examples/android/README) and their main link: https://code.google.com/p/android-vnc-server/wiki/README

Also other folks put it in /data: https://code.google.com/p/android-vnc-server/wiki/README (comment: "Comment by Ryan.Bee...@gmail.comDec 4, 2009")

So you think I should put it in /system/bin?

So same procedure as before right but instead of "/data/local" I should do it in "/system/bin"

:) 
Message has been deleted

Chih-Wei Huang

unread,
Jan 11, 2016, 9:19:20 PM1/11/16
to Android-x86
2016-01-12 7:50 GMT+08:00 Pavel Astakhov <pavel.as...@gmail.com>:
> Thank you very much :) I tried re-doing the whole procedure but this time in
> /system/bin and it's the same error (no directory to be found when launching
> androidvncserver after succesfully pushing it)
>
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb push
> androidvncserver /system/bin
> failed to copy 'androidvncserver' to '/system/bin/androidvncserver':
> Permission denied
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell
> su -c "chmod 777 /system/bin"
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb push
> androidvncserver /system/bin
> 47 KB/s (237144 bytes in 4.895s)
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell
> /system/bin/androidvncserver
> /system/bin/sh: /system/bin/androidvncserver: No such file or directory
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell
> su -c "chmod 755 /system/bin/androidvncserver"
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools# adb shell
> /system/bin/androidvncserver
> /system/bin/sh: /system/bin/androidvncserver: No such file or directory
> root@ip-172-31-35-74:~/Desktop/android-sdk-linux/platform-tools#

Please confirm this is an executable for android-x86.
Issue the commands in your linux host:

file androidvncserver
ldd androidvncserver

(I suspect it's an arm executable)


--
Chih-Wei
Android-x86 project
http://www.android-x86.org
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages