I've never had this probably with another phone before, but I can only remember doing this once or twice. I'm trying to adb pull one of my paid apps (Hotschedules for my job) from my Bionic and push it to my Eris to try to debug why it won't show up in the market on my Eris. I know the app is in /data/app-private but I can't even ls data. I get the output:
-8235:~$ adb shell ls data
opendir failed, Permission denied
do I need to do a chmod or something?
lemonoid said:
I've never had this probably with another phone before, but I can only remember doing this once or twice. I'm trying to adb pull one of my paid apps (Hotschedules for my job) from my Bionic and push it to my Eris to try to debug why it won't show up in the market on my Eris. I know the app is in /data/app-private but I can't even ls data. I get the output:
-8235:~$ adb shell ls data
opendir failed, Permission denied
do I need to do a chmod or something?
Click to expand...
Click to collapse
Try putting "su " before your pull code if you're in adb shell already (if not, get there).
but I shouldn't go into a remote shell for pushing and pulling files should I? I wouldn't even know how I just know the adb push [local] [remote] and adb pull [remote] [local] syntax ... I mean I know how to go into a shell but not pushing and pulling files in it because then I would be in the android filesystem. so should I adb shell su and then adb shell pull ?
You normally don't have to, no. But whenever there's permission issues, su usually fixes it.
Related
Hey guys, i'm having a bit of a problem here. It might be a stupid problem that i am over looking, but i just cant seem to figure it out. I dont use ADB often, but i just installed cyanogens newest rom and it no longer comes with the advanced launcher. which i absolutely love. so heres my issue, I am trying to follow these directions:
Installation
- Plug your USB cable into the phone and your computer
- Make a backup of your original launcher: "adb pull /systemapp/Launcher.apk LauncherBAK.apk"
- Remount the /system filesystem: "adb remount"
- Unzip the advanced launcher "unzip Launcher_update_x.zip"
- Push the advanced launcher "adb push Launcher.apk /system/app/Launcher.apk"
- Remove the odex file "adb rm /system/app/Launcher.odex"
- Reboot your phone.
This is whats happening:
cd C:\android-sdk-windows-1.5_r3\tools
C:\android-sdk-windows-1.5_r3\tools> adb shell
#adb pull /system/app/Launcher.apk LauncherBAK.apk
adb: not found
#
I tried moving forward without backing up. this is what i get:
adb: not found
#adb remount
adb remount
#adb: not found
#
This is where im at. can sombody please point me int he right direction of whats going on here? thank you
As I understand it, when you type adb shell, youre in the android shell, and no longer use the adb commands, but you use the commands that youd use in console. ADB has different commands, which you can list by just typing adb.
SO,
plug it in
adb remount
adb pull /system/app/Launcher.apk LauncherBAK.apk
unzip Launcher_update_x.zip
adb push Launcher.apk /system/app/Launcher.apk
adb rm /system/app/Launcher.odex
reboot
That should work. Dont use the shell. The pros can feel free to correct me.
Hummeroid said:
As I understand it, when you type adb shell, youre in the android shell, and no longer use the adb commands, but you use the commands that youd use in console. ADB has different commands, which you can list by just typing adb.
SO,
plug it in
adb remount
adb pull /system/app/Launcher.apk LauncherBAK.apk
unzip Launcher_update_x.zip
adb push Launcher.apk /system/app/Launcher.apk
adb rm /system/app/Launcher.odex
reboot
That should work. Dont use the shell. The pros can feel free to correct me.
Click to expand...
Click to collapse
As far as I know this is right. Don't try to pull when you're in adb shell.
Hummeroid said:
As I understand it, when you type adb shell, youre in the android shell, and no longer use the adb commands, but you use the commands that youd use in console. ADB has different commands, which you can list by just typing adb.
SO,
plug it in
adb remount
adb pull /system/app/Launcher.apk LauncherBAK.apk
unzip Launcher_update_x.zip
adb push Launcher.apk /system/app/Launcher.apk
adb rm /system/app/Launcher.odex
reboot
That should work. Dont use the shell. The pros can feel free to correct me.
Click to expand...
Click to collapse
Right on! thanks so much Hummeroid.
Okay so I tried to do it without the shell and this is what i'm getting. So I'm stuck...Btw, I really appreciate all the help everyone's giving me.
C:\>cd androidsdk\tools
C:\AndroidSDK\tools>adb devices
List of devices attached
HT96LLV00999 recovery
C:\AndroidSDK\tools>adb remount
remount failed: Invalid argument
C:\AndroidSDK\tools>
Why are you doing in recovery, try it with the phone on.
Trying to make a little .CMD Files to uninstall my app so I don't have to type everything in again when I do a flash rom.. here is what I have
Code:
pause
@adb kill-server
@adb shell cd /system/app/
@adb shell su*
pause
@adb shell rm /system/app/RemotePVR.apk
@adb shell rm /system/app/tn55-android-blur.apk
@adb shell rm /system/app/FaceRecognition.apk
@adb shell rm /system/app/Layar-samsung.apk
pause
The issue is at the "@adb shell su*" I get an error saying at the super not found.. now when I type the commands in my self it works great.. but in a .bat file or .cmd files it does not work.. what i'm I missing?
Every call to ADB like this is a standalone command.
That is, when you do a
Code:
adb shell cd /system/app/
what happens is that it starts the adb shell, runs the command, and then exits. So when you call su, you lose superuser access when running the next adb shell command, because that shell instance is now gone, kaput, finito.
I also tried to make a script like this, but got stuck. We need to chain commands to ADB, like you can do in *nix with a semi-colon separator between command, like thus:
Code:
command1 ; command2
("&&" in Windows/DOS)
But ADB doesn't seem to support chaining commands.
I guess you have to do a shell script, put it on the phone and run it from there. Or some kind of "adb sushell" command would be nice...
Thanks I was kinda wondering if that was what was happening.. to bad the su command would not stay active.. o well.... maybe someone will come up with something..
Im not at a pc but can u test
adb shell su command
Does tht work ?
you could make a 2nd script which pushes the 1st to the device with "adb push". this script then gets root with "su" and uninstalls/deletes the apps ... btw. you can try using "pm" (packetmanager) which can install/uninstall/reinstall apps. however i don't know if it works with system apps...
Alright here : (eg, say remove launcher)
Code:
adb shell su -c 'mount -o rw,remount /dev/block/mtdblock3 /system'
adb shell su -c 'rm /system/app/Launcher.apk'
adb shell su -c 'rm /system/app/Launcher.odex'
adb shell pm uninstall com.android.launcher
fyi : "SystemApp Remover" on market essentially does the same thing, except it eliminates the need for u to look for the package name ur self.
Hm, that works, but I get a superuser prompt on the phone for every new command (the "app name" is the command line).
Daneshm90 said:
Alright here : (eg, say remove launcher)
Code:
adb shell su -c 'mount -o rw,remount /dev/block/mtdblock3 /system'
adb shell su -c 'rm /system/app/Launcher.apk'
adb shell su -c 'rm /system/app/Launcher.odex'
adb shell pm uninstall com.android.launcher
fyi : "SystemApp Remover" on market essentially does the same thing, except it eliminates the need for u to look for the package name ur self.
Click to expand...
Click to collapse
sweet that worked. I would get the SystemApp Remover but I can't download paid apps till Google will fix my account. unless there is something like it for free.
How do I change what command is executed when I type "adb shell"? Currently, it is /system/bin/sh.
Even if I run adb shell ls, it seems like it needs to execute sh at first.
There has to be some script somewhere to edit, right? I cannot use a symlink from /system/bin/sh.
The specific program is "busybox sh" in my case. What do I do?
It may actually work to link /system/bin/sh to busybox, but I'd be hesitant to do it. Any mistake could make the system unusable.
It might be possible to pull /system/bin/sh (or get a copy from a nandroid backup), try the above, then push the file back if something goes wrong. I don't know if the adb push command requires /system/bin/sh to be already working. Certainly adb push requires the ability to successfully do adb remount first.
I have a v6 stock phone, no root, no cwm. Thought I would run through the ADB manual method of root to see what happens. I get to this point...
Code:
>adb devices (verifies you are connected)
>adb push rageagainstthecage-arm5.bin /data/local/temp/rage
(if the above command fails due to read-only, type 'adb usb' then 'adb root' to validate root status, then 'adb devices' again to verify connection)
>adb push su /data/local/temp/su
>adb shell chmod 777 /data/local/temp/rage
>adb shell ./data/local/temp/rage
When I try to do the SU because I get the $ I get Permissions denied.
I know that this method does not work but I wanted to see where it fails. It appears that they may have fixed the glitch that allowed the rage exploit to work.
I also tried cubes other way and it failed as well.
Code:
Open ADB shell
Your command prompt should be "$"
Run
kill `busybox pidof adbd`
Re-run ADB shell, your command prompt should change to "#"
Just thought I would toss this out there in case someone wanted to know...
Thanks for the heads up on this good info to know when I get my rev on Saturday
Sent from my SHIFTAO5P using XDA Premium App
Haxcid said:
I have a v6 stock phone, no root, no cwm. Thought I would run through the ADB manual method of root to see what happens. I get to this point...
Just thought I would toss this out there in case someone wanted to know...
Click to expand...
Click to collapse
Mm, I went through that last night, then downgraded to the V4 software as shown by the other post - still, none of it worked for me.
Pull your SDcard out when trying to root after the downgrade. Or format the SD card. It should work then.
Hi,
my ADB doesn't work correctly. I plug the phone into the pc with USB Debugging enabled (stock V20m 2.3.4) and run adb.
I can type su and the phone shows shell was given su rights, so the connection must be ok.
But I can't give any command. When I type in adb remount it says permission denied. The same problem with any other command like adb pull /system/app/Camera.apk
Everytime comes permission denied.
What can I do? Please help me.
You're running a kernel which doesn't enable the adb remount option (or rather default.prop in the ramdisk doesn't). To get around it:
Code:
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p1 /system
...this basically does the same thing. There may be something else wrong though, as pulling an app from /system/app should work without it.
EDIT: Make sure you're not in the adb shell when running adb commands. Pull and push commands for example must be run in the computer-shell, not the adb shell.
Thank you very much!
TrymHansen said:
EDIT: Make sure you're not in the adb shell when running adb commands. Pull and push commands for example must be run in the computer-shell, not the adb shell.
Click to expand...
Click to collapse
That was the solution for the problem with pull/push files.