FORUMS
Remove All Ads from XDA

[Q] adb push- why am I getting permission denied?

2 posts
Thanks Meter: 0
 
By jorozco077, Junior Member on 3rd May 2012, 09:10 PM
Post Reply Email Thread
phone: LG esteem ms910
Rooted: Yes
I'm trying to adb push a .apk file into my phones /system/app folder. These are the steps I am taking in trying to do this, but I am getting a permission denied response at the "adb push" part. Oh and my phone is under the "internet connection" setting. The other two (mass storage, charge only) wont let my phone enter debugging mode.

Code:
 adb shell
su
mount -o remount,rw /dev/block/stl9 /system
exit
exit

adb push C:\Myfile.apk /system/app
Also when I enter the "mount -o remount,rw /dev/block/stl9 /system" command, It pops up twice but without the # symbol, not sure if there is an error there but it ends up looking like this:

Code:
C:\Android\android-sdk\platform-tool>adb shell
$ su
# mount -o remount,rw /dev/block/stl9 /system
mount -o remount,rw /dev/block/stl9 /system
# exit
exit
$ exit
exit 

C:\Android\android-sdk\platform-tool>
 
 
3rd May 2012, 09:59 PM |#2  
imheroldman's Avatar
Senior Member
Flag Chico
Thanks Meter: 119
 
More
I think you would want it to be on charge only, as the other options are utilizing the USB while charge only does not. That is how my setup functions... I did have the permission denied error before when I was using Ubuntu 10.04. Are you sure you have an up to date version of JDK? And the USB rules?
The Following User Says Thank You to imheroldman For This Useful Post: [ View ] Gift imheroldman Ad-Free
3rd May 2012, 11:08 PM |#3  
Member
/dev/kmem
Thanks Meter: 59
 
Donate to Me
More
your command should be

adb push C:\Myfile.apk /system/app/myfile.apk

you have also to run adb as root or enable rw for /system/app

Basically:
______________________________________________
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
chmod 777 /system/app
exit
exit

adb push C:\Myfile.apk /system/app/myfile.apk

________________________________________________

should do the job
The Following 17 Users Say Thank You to djodjoni For This Useful Post: [ View ] Gift djodjoni Ad-Free
4th May 2012, 03:41 AM |#4  
OP Junior Member
Thanks Meter: 0
 
More
@imheroldman- I tried leaving it on charge only, but the devices wasnt found when I ran the adb devices command, and yes the JDK is the latest.

@djodjoni -Hey I tried your suggestions and it worked.

Thanks to the both of you for helping.
29th November 2014, 02:19 PM |#5  
Senior Member
Thanks Meter: 315
 
Donate to Me
More
FWIW, I got permission denied errors when I tried to push busybox via adb. I just downloaded a busybox .zip and flashed it via TWRP, it seems to have worked, and the busybox app recognizes it as installed.
8th May 2015, 09:49 AM |#6  
kavinzhao's Avatar
Senior Member
Flag Shanghai
Thanks Meter: 117
 
More
I can't use adb push. It says Read Only file system when I try to push things to /sdcard. Don't know why
NOOK!E
9th May 2015, 01:36 AM |#7  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by kavinzhao

I can't use adb push. It says Read Only file system when I try to push things to /sdcard. Don't know why

Use this:

Code:
[path] > adb shell
# mount -o rw,remount rootfs /
# chmod 777 /sdcard
# exit

[path] > adb push [file path on your PC] /sdcard
9th May 2015, 03:06 PM |#8  
kavinzhao's Avatar
Senior Member
Flag Shanghai
Thanks Meter: 117
 
More
Quote:
Originally Posted by ИΘΘK¡€

Use this:

Code:
[path] > adb shell
# mount -o rw,remount rootfs /
# chmod 777 /sdcard
# exit

[path] > adb push [file path on your PC] /sdcard

Thanks. I was using the recovery to receive before this. I think that should save me some time.
17th February 2016, 05:40 AM |#9  
Senior Member
Thanks Meter: 18
 
More
hello, I am having same problem, can you please help me out?
[email protected]_himaulatt:/data/local # adb push C:\firewater /data/local/temp
adb push C:\firewater /data/local/temp
error: device not found
1|[email protected]_himaulatt:/data/local # adb push C:\firewater /data/local/
adb push C:\firewater /data/local/
error: device not found
1|[email protected]_himaulatt:/data/local # adb push C:\firewater /data/l
adb push C:\firewater /data/l
error: device not found
1|[email protected]_himaulatt:/data/local # adb push C:\firewater /data/
adb push C:\firewater /data/
error: device not found
1|[email protected]_himaulatt:/data/local # cd ..
cd ..
[email protected]_himaulatt:/data # cd ..
cd ..
[email protected]_himaulatt:/ # exit
exit
[email protected]_himaulatt:/ $ exit
exit

C:\Users\Winpc\Downloads\fastboot-win>adb push C:\firewater /data/local/temp
failed to copy 'C:\firewater' to '/data/local/temp/firewater': Permission denied

C:\Users\Winpc\Downloads\fastboot-win>adb wait-for-devices push firewater /data/local/temp
failed to copy 'firewater' to '/data/local/temp/firewater': Permission denied

C:\Users\Winpc\Downloads\fastboot-win>adb shell
[email protected]_himaulatt:/ $ su
su
[email protected]_himaulatt:/ # mount -o rw,remount rootfs/
mount -o rw,remount rootfs/
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_himaulatt:/ # mount -o rw,remount rootfs /
mount -o rw,remount rootfs /
[email protected]_himaulatt:/ # chmod 777 /sdcard
chmod 777 /sdcard
[email protected]_himaulatt:/ # exit
exit
[email protected]_himaulatt:/ $ adb push C:\firewater /data/
adb push C:\firewater /data/
error: device not found
1|[email protected]_himaulatt:/ $ exit
exit

C:\Users\Winpc\Downloads\fastboot-win>adb wait-for-devices push firewater /data/local/temp
failed to copy 'firewater' to '/data/local/temp/firewater': Permission denied

C:\Users\Winpc\Downloads\fastboot-win>
8th October 2016, 05:27 AM |#10  
XeoNoX's Avatar
Senior Member
Thanks Meter: 660
 
More
Make sure you have phone detected and correct drivers and adb installed.

Once ADB is functioning properly, then let's PUSH files!

First let's make sure adb is running and make sure adb see's the phone. Please run these commands:

Code:
adb kill-server
adb start-server
adb devices
The output after devices will be a serial number, if this looks good, move on. First you need to make
sure the apk you want to push is in the same directory as adb.exe
once you have moved the apk to the adb.exe directory, then run the following:

Code:
adb remount 
adb push myfile.apk /system/app/ 
adb shell chmod 644 /system/app/myfile.apk
adb reboot
adb remount mounts the phone as read write so you can write thru adb, it will be automatically unmounted when phone disconnected or rebooted
assuming your APK you want moved is called "myfile.apk"
adb push file_myfile.apk /system/app/ this command moves the "myfile.apk" (the apk you want moved) to the /system/app/ directory on your phone
adb shell chmod 644 /system/app/myfile.apk this command sets the correct file permissions for APKs
adb reboot this reboots the phone so that the new apk can be detected

Good luck
The Following User Says Thank You to XeoNoX For This Useful Post: [ View ] Gift XeoNoX Ad-Free
7th February 2018, 06:51 AM |#11  
Junior Member
Thanks Meter: 0
 
More
hi:
phone is rooted;
android 5.0 ;
adb start-server is OK;
adb devices is OK;
adb root is adbd is already running as root;
system and system/app are "chomd is 777 ";

I want to "adb push myfile /system/app/ "
Question: Permission denied .
- -
thx

other:
adb remount is Permission denied too.
"adb push ./build.gradle /storage/sdcard0/ " is OK.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes