Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to grant adb shell permission without rooting devices

Tags:

android

adb

I am running following commands from command prompt while running it shows permission denied. can any one please explain how to grant permission?

C:\android\tools>adb push asl-native /data/local/asl-native
failed to copy 'asl-native' to '/data/local/asl-native': Permission denied
like image 702
raju Avatar asked Mar 01 '13 07:03

raju


1 Answers

You're not allowed to write to /data unless your phone is rooted and able to run adb shell as root.

Looking at asl's run script you might be able to change it to install it to the scard. I haven't tested it but it would look something like this:

# Install service
echo "Installing native service..."
$adb push ./asl-native /sdcard/asl-native
$adb shell /system/bin/chmod 0777 /sdcard/asl-native

# Start the service
echo "Starting service..."
$adb shell "/sdcard/asl-native /sdcard/asl-native.log" &
echo "Service started successfully."

Although I dunno if you're allowed to run chmod and make something executable. You might want to try running chmod 0777 on your local machine first.

like image 145
drt Avatar answered Oct 23 '22 04:10

drt