how can fix adb push permision deny - LG Optimus L9 P760, P765, P768, P769

hi
i need to push a file with adb
but adb push give me permision deny
how can fix this?
my device is rooted but adb show me device not rooted!

Is USB Debugging on?

yes it's on

amir_n71 said:
yes it's on
Click to expand...
Click to collapse
In some rom adb permission isn't root by default. I think it's a line in default.prop that enable root in adb. Something like
ro.adb.secure = 0
if you don't want to edit that file just push file to sdcard or temporary folder then use adb shell (with root) to copy that file to proper location.

but 2 days ago adb work like acharm in this rom!

amir_n71 said:
but 2 days ago adb work like acharm in this rom!
Click to expand...
Click to collapse
That's strange. Maybe in your rom adb push works only when file doesn't exist.

no. i push framework-res.apk 5 days ago & it work! framework-res.apk is exist already
but i test this file again & permision deny!

How about su before the command? Or adb remount, to get write access?
Sent from my LG-P760 using xda app-developers app

I have the same problem too and remounting the adb doesn't solve it.
I'm still searching for a fix. I can only pull but not push.

If y'all are on a stock rom, then you can't push anything directly into the system (unless your bootloader is unlocked & you modify the boot.img). I use the following mount command
mount -o remount /system
First push the file to the sdcard
adb push blablabla /sdcard
then adb shell it to the correct location.
It's a lot of bs but it's the only way I got it to work with stock.
Here's an example of a batch script I made
Code:
adb push LGSystemUI.apk /sdcard/
adb shell su -c "mount -o remount /system"
adb shell su -c "cp /sdcard/LGSystemUI.apk /system/app/"
adb shell su -c "chmod 644 /system/app/LGSystemUI.apk"
adb shell su -c "killall com.android.systemui"
Sent from my LGMS769 using XDA Premium 4 mobile app

Related

adb mount remount problem

hello x10 buddys
srry for my noob question, but i have a problem...
when i go to run - cmd
adb shell
$ su
#
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
i am able to do this.
No i wanna install a theme with the file ****.cmd
I start the cmd file and i will get this error
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount: Operation not permitted
Why i get this error?
i am not adb shell # at this moment?
You'll only be able to remount while you've root permissions...
If you do SU before doing the .cmd then you should be fine...
(You might also have problems with file permissions, in which case you'll need to run chmod 755 on some directory after remounting. If you've this problem, let us know. Maybe post the .cmd?)
Sent from my X10i using XDA App
i thougt that was the problem ty
but how i get SU before run the cmd file?
when i do adb shell in the directory of the theme
after that i cant run the cmd files or i did something wrong.
Spend the hole night on it ^^
the cmd file will be alright, its from the New theme here
Have u tried
Adb shell su
Then allow it with superuser?
I'm not sure if it will work as I haven't tested it...
Hope it helps
in my Su on the phone
Unkonwn
/system/bin/sh als root (uid: 0)
i wanna run ***.cmd when i am in cmd with su#
wen i start the **cmd i wil not have su#
i need to do....
adb shell
$ su
#
and then put a command to run ***.cmd file of the theme
when the **.cmd file in c:\desktop\newfolder\***.cmd
which command i need to write when i in adb shell # to run the cmd file??
If I don't remember wrong, I had to do this chmod 4755 /system/bin/su to get the "#" prompt (su) as default in Better Terminal.
Perhaps it will help you too ? (allowing the scripts to run as superuser)
Have you tried doing everything with adb shell? Ie
Adb shell su
Hit enter
Adb shell mount blah blah blah
Hit enter
Adb shell run the cmd
I read somewhere u should only chmod as a last resort and if u know what you're doing. For the most part i have no idea what's going on (i feel like Gary busey) so i haven't tried the chmod.
I would have posted the actual script but its a pita to do from my phone
he said run:not found ^^
How about at the beginning before adb shell su move to the directory its in.
Eg.
cd C:\the directory the cmd is saved
hphhaze said:
he said run:not found ^^
Click to expand...
Click to collapse
Adb shell run the cmd does NOT mean you should type in Adb shell run <some command>.
It means you should type in Adb shell <some command> where <some command> can be for example su, cp, dd or something else (unix commands).
tread can closed. I dont get it...
You're giving up that quick? :-(
Come on!!!!
Solution A:
1. Go here and download X10Root1.0.8.apk.
2. Install the apk to your phone.
3. Run the app and use it to "unsecure sh".
4. Run your CMD script.
5. Run the app again to "secure sh".
6. If you skipped #5 (secure), go back and do #5.
Solution B (alternative):
1. Download the Standalone Toggle Secure Shell script.
2. Extract and run it (it's a CMD script).
3. Select "Unsecure" and follow the directions (requires some typing or copy/pasting).
4. Run your CMD script.
5. Run the toggle script again to select "Secure".
6. Don't skip #5 (secure).

[REQ] /system/bin/sh clockwork recovery

I just did a major mistake by copying sh from Windows to /system/bin/sh. Not haivng the execute bit has stopped me from using adb shell.
Could someone provide a clockworkmod recovery file that restores sh & it's permissions? I would greatly appreciate it. Thanks!
Why not just run the fix permissions script from the advanced menu in clockworkmod?
Sent from my SCH-I500 using XDA App
well, would be easier from a linux box:
chmod 755 sh
adb push sh /system/bin/sh
adb reboot
i_am_enderst said:
well, would be easier from a linux box:
chmod 755 sh
adb push sh /system/bin/sh
adb reboot
Click to expand...
Click to collapse
Thanks. I fixed it through recovery mode shell via adb.
I'm getting the following garbage when I do ls within adb shell. Is there any way to fix this?
Code:
# ls
ls
←[1;34mcache←[0m ←[1;32minit.rc←[0m ←[1;34msbin←[0m
←[1;34mconfig←[0m ←[1;32minit.smdkc110.rc←[0m ←[1;34msdcard←[0m
←[1;34mdata←[0m ←[1;32minit.smdkc110.sh←[0m ←[1;34msqlite_stmt_journals←[0m
←[1;34mdbdata←[0m ←[1;34mlib←[0m ←[1;34msys←[0m
←[1;32mdefault.prop←[0m ←[1;32mlpm.rc←[0m ←[1;34msystem←[0m
←[1;34mdev←[0m ←[1;34mmnt←[0m ←[1;32msystem.prop←[0m
←[1;34mefs←[0m ←[1;34mpreinstall←[0m ←[1;34mtmp←[0m
←[1;36metc←[0m ←[1;34mproc←[0m ←[1;34muserdata←[0m
←[1;32mfota.rc←[0m ←[1;32mrecovery.rc←[0m
←[1;36minit←[0m ←[1;34mres←[0m
Those are bash color escape codes but I don't know why adb is outputting them since I'm new to Android.
It's a windows command prompt thing..
Easiest solution, do this from your adb shell (you'll need to do it each time)
export LS_COLORS=none
alternatively you can installed cygwin and spend a little time setting it up so that the ANSI colors are displayed when using adb shell.
I assume the colors show up fine under linux, which is why this got included in some kernels/rom packages without anyone addressing it.
Thanks for the info. It shows up correctly through a cygwin terminal. I'll just use that for now on.

permission denied - trying to push apk to /system/app

I know there are a ton of these topics here, Still having problems.
I'm trying to push a apk to /system/app
First I used adb shell and used su to remount /system/app
example:
Code:
adb shell
su
mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system
I did this part successfully.
Here is my proof:
/dev/block/mmcblk0p9 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
The problem is I don't know how to push a *.apk thur a "adb shell". If I try, I get "push not found"
They only way I know how to push is using a regular linux terminal.
example:
Code:
linux_user:$ adb push /path/to/apk /system/app
however this only works on my Evo 4G (custom rom). On my Samsung Epic 4G (stock rom) I get a permission denied.
I tried adding a su like:
Code:
linux_user:$ adb [color=red]su[/color] push /path/to/apk /system/app
however, that does not seem to be a valid command.
I think I know what my problem is but I don't know how to solve it.
I think the problem is the default user is not #. For example in "adb shell" the default user is
$
and after su
it becomes
#
how do I fix this without switching to custom rom?
I hope I explained this in a way someone can understand.
Searched all over these forums and could not find a solution.
As a work around I installed an Android Terminal Emulator
then from the Android Emulator,
su
cd /sdcard
install name.apk /system/app
Click to expand...
Click to collapse
Best work around I could think of. Did I use the correct syntax? the emulator did not have adb or push.
Use Root Explorer
Try To put Your APK in system/app
change ro to rw
Then set the permission as same as other app in the system
then reboot...
I hope it will help your problem....

Batch Idea.. help :)

im trying to make a batch file which does the following,
using adb shell, i want to take a folder of apks from the pc and push them to system/app with a chmod 644
I have this for a single apk..
Code:
adb shell su -c "mount -o remount,rw /system"
adb shell su -c "cat /sdcard/external_sd/example.apk > /system/app/example.apk"
adb shell su -c "chmod 644 /system/app/example.apk"
but life would be much easier if i could just drop a bunch of .apks into a folder on the pc or sdcard and just execute said commands for each apk automatically
thanks!

4.0.3 build.proc

Does anyone has a copy of the original build.proc of version 4.0.3 tablet s? Can you share?
I might have screw up mine...and it's not loading.
After adb is successful, does anyone know the command to push the build.proc into /system?
I have a back up in system/build.prop.bak
I have an adb access and device recognised. can anyone help me and provide the steps (one by one) to get it renamed?
I tried to push one copy from my pc but it fail because it is read-only file system. How can i make it R/W?
Here is the commands 2do:
Code:
adb devices - check if u device is recognized
adb pull /system/build.prop C:\...\ - get build.prop file
edit how u want
Code:
adb shell
su
mount -o rw,remount /system
//Come back to ADB
adb push C:\...\build.prop /system/build.prop - repush build.prop file
adb shell chmod 644 /system/build.prop - fix permission
adb reboot
Hope this can be helpful
Thanks! Let me try...
ataraxist said:
Thanks! Let me try...
Click to expand...
Click to collapse
Quick edit w/ commands for push file:
(Copy before build.prop file on internal storage,
Code:
adb push C:\...\build.prop /mnt/sdcard/
)
Commands:
Code:
adb shell
su
mount -o rw,remount /system
cd mnt/sdcard
cp build.prop /system
chmod 644 /system/build.prop - fix permission
reboot

Categories

Resources