Hey all. I'm trying to copy my full "sdcard" folder from my phone to my PC in adb (I can explain why if needed but it's a pretty long story). In adb, I type "adb pull /sdcard/" but it comes back with
adb: error: failed to stat remote object '/sdcard/': No such file or directory
I've also tried a few other combinations, with/without the slash, etc but no dice. Am I doing it wrong?
/sdcard is a sym-link, you need to use /storage/emulated/0 as that is the actual path.
Thanks!!
Related
hello folks.
i'm trying to push bootanimation via adb and when i enter the first command i'm getting an error.
C:\>adb shell mount /system
- exec '/system/bin/sh' faild: no such file or directory (2) -
i'm using modaco root r4 and 3.1 rom. if its matter :x
btw why cant i flash the bootanimation via recovery?
you cant use adb from the root of your hard drive you need to use the command prompt to navigate to the tools dirctory inside the android sdk, for example on my computer the correct path would be c:\android sdk\tools obviously it depends weather u have renamed the folder you extracted when you downloaded the sdk
AndroHero said:
you cant use adb from the root of your hard drive you need to use the command prompt to navigate to the tools dirctory inside the android sdk, for example on my computer the correct path would be c:\android sdk\tools obviously it depends weather u have renamed the folder you extracted when you downloaded the sdk
Click to expand...
Click to collapse
now i'm getting this error :\
C:\dsdk\android-sdk-windows\tools>adb shell mount /system
adb server is out of date. killing...
* daemon started successfully *
- exec '/system/bin/sh' failed: No such file or directory (2) -
i don't understand what i'm missing?
im trying to push a keyboard from my sdcard to my system/app dir
the file is at sdcard>download>Bgreen.apk
im trying to adb push it to system/app
Code:
C:\>cd android-sdk-windows/tools
C:\android-sdk-windows\tools>adb push /sdcard/download/Bgreen.apk /system/app/Bg
reen.apk
cannot stat '/sdcard/download/Bgreen.apk': No such file or directory
C:\android-sdk-windows\tools>
What am i doing wrong ?
kenfly said:
im trying to push a keyboard from my sdcard to my system/app dir
the file is at sdcard>download>Bgreen.apk
im trying to adb push it to system/app
Code:
C:\>cd android-sdk-windows/tools
C:\android-sdk-windows\tools>adb push /sdcard/download/Bgreen.apk /system/app/Bg
reen.apk
cannot stat '/sdcard/download/Bgreen.apk': No such file or directory
C:\android-sdk-windows\tools>
What am i doing wrong ?
Click to expand...
Click to collapse
You're not mounting the device.
Before doing all of that, once you're in the tools directory, try this:
HTML:
adb shell mount /dev/block/mtdblock4 /system
i get an error. "device or resource busy"
kenfly said:
i get an error. "device or resource busy"
Click to expand...
Click to collapse
Exit the cmd, open taks manager, go to processes, and close all instances of adb.exe it shows. From there, try it again.
Have you tried also putting the ap in the tools folder itself so that you can just put in
Code:
adb push Bgreen.apk /system/app/
?
i put it in the tools folder and remounted and it worked. thank you for your help
kenfly said:
i put it in the tools folder and remounted and it worked. thank you for your help
Click to expand...
Click to collapse
Np man. Glad I could help.
Hey,
I'm following the tutorial over at G2 Hacks:
g2hacks.co m/g2-hacks/how-to-root-g2-phone
(omit the space between 'co' and 'm/')
I came across a problem at the beginning of the cmd portion.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
EDIT: Go to 3rd post.
kpaekn said:
Hey,
I'm following the tutorial over at G2 Hacks:
g2hacks.co m/g2-hacks/how-to-root-g2-phone
(omit the space between 'co' and 'm/')
I came across a problem at the beginning of the cmd portion.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
If you're wanting to root, go straight to the source; the guide in the Wiki here is based on the work the devs who actually found the means to root the device.
http://forum.xda-developers.com/wik...sion#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
Sent from my T-Mobile G2 using XDA App
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
kpaekn said:
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
Is USB debugging turned on and is the SDcard not mounted?
Sent from my T-Mobile G2 using XDA App
Sounds like the SD card is mounted on your PC and not the phone ? It needs to be mounted on the phone or this won't work.
Sent from my HTC Desire Z
All that command does is copy that file from your computer to the sdcard. You could accomplish the same thing by dragging and dropping that file to the sdcard.
The 'push' command just means "copy from location A to location B"
Sent from my HTC Vision using XDA App
You could always just mount the SDcard... but anyway, to solve this type in "adb remount" and enter the command before pushing the file
Sent from my HTC Vision using XDA App
USB debugging is on and SD is not mounted to my computer.
I tried directly copying the files onto the sdcard, but when I need to push rage, busybox, etc. I cannot access the data folder graphically from the computer.
So I'll still need to use cmd.
I tried the remount, but this is what I get:
Code:
C:\AndroidSDK\tools>adb remount
remount failed: Operation not permitted
kpaekn said:
USB debugging is on and SD is not mounted to my computer.
I tried directly copying the files onto the sdcard, but when I need to push rage, busybox, etc. I cannot access the data folder graphically from the computer.
So I'll still need to use cmd.
I tried the remount, but this is what I get:
Code:
C:\AndroidSDK\tools>adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
The adb remount error is expected (the command requires your ro.secure prop to be set to 0, which you can't do until you have rooted).
So you were able to copy files to the SD card? Just to verify again, you should try mounting the SD card to you computer (so it shows up as a device on your computer's file explorer), copy over a file, unmount the card from your computer (and remember to also hit the button on phone to do so), and then try the ADB push commands again.
Ok, with the phone on plug it into your computer and mount USB storage. Drag and drop 'su' and superuser.apk into the sdcard then unmount USB storage. Make sure USB debugging is on at this point (you'll see it in the notification task bar). Do these commands:
Code:
adb push rage /data/local/tmp/rage
adb push busybox /data/local/tmp/busybox
adb push root /data/local/tmp/root
adb shell chmod 0755 /data/local/tmp/*
Then in the terminal app type:
Code:
/data/local/tmp/rage
You'll see some message pop up saying something about 'forked #### childs' and that's temp root. Then follow the instructions on running gfree to gain full root. Btw, you can just copy and paste all those commands if you think you'll make a mistake.
You may also be able to run the '/data/local/tmp/rage' command with the 'adb shell' command, never tried it myself though.
kpaekn said:
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
Oh come on !!!
the path separator in linux (and the phone is a linux computer) is / and not \ !!!
So the command is:
Code:
C:\AndroidSDK\tools>adb push su /sdcard/su
Just to tell you something about the unix shell:
The \ char is a so called escape character that you use to tell the shell that it should not ignore the next character even if it is a white space (i.e. space)
You would use it if you have to specify a path that contains spaces:
i.e.:
Code:
mkdir dir\ with\ 3\ spaces
will create a directory with the name "dir with 3 spaces". This would not work without the \ characters.
have fun - Guhl
Haha... it's funny how simple the answer was.
Thanks for your guys' help.
Tried these steps
Connect to your Fire TV using ADB
(If you don’t know how, follow up to Step 4 Part 2 in our Windows or Mac guide)
Run the command: adb shell
Run the command: su
(If this is the first time you’ve ever run su, a pop-up will appear on the Fire TV, select Grant)
Run the command: chmod 777 /cache
Run the command: chmod 777 /cache/recovery
Run the command: cd /cache/recovery
Run the command: echo “--update_package=/cache/update.zip” > command
Run the command: exit
Run the command (yes, again): exit
Run the command: adb push update.zip /cache
(This assumes the update.zip file you renamed in step 2 is in the same directory as adb, otherwise enter the full path to the file like adb push C:\full\path\to\update.zip /cache)
Once the update.zip file has finished transferring to the Fire TV, run the command: adb reboot recovery
The update.zip file is on the same folder where the adb platform-tools is located, but when I enter the full path it says no such file or directory.
Mine looks like this C:\Users\XXX\platform-tools>adb push update.zip /cache
What am I doing wrong, please help
CD to the directory first . then enter adb push update.zip /cache
mastafunk said:
CD to the directory first . then enter adb push update.zip /cache
Click to expand...
Click to collapse
I did everything in the same folder.
Do you suggests I go back to root of c folder then go back to the folder again
Copy and paste what you entered and the error..
[url]https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png[/URL]
https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png
Stevie G said:
[url]https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png[/URL]
https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png
Click to expand...
Click to collapse
when you push a file with adb, the file must be in the same folder/path you're running the adb command from. From your example, you need update.zip on your PC at C:\users\Stevie G\platform-tools\
The error is saying the file isn't at that path.
Luxferro said:
when you push a file with adb, the file must be in the same folder/path you're running the adb command from. From your example, you need update.zip on your PC at C:\users\Stevie G\platform-tools\
The error is saying the file isn't at that path.
Click to expand...
Click to collapse
might have issues with the space in Stevie G, try a folder without spaces.
I had to do a factory reset of my phone to get it to boot up. I want to try to recovery data (photos in particular), but am not having any luck with PC software.
My newest idea is to create a full disk image of the phone and then run that through PC recovery software. I've tried using 'adb pull' commands to no avail.
What is the correct command? The storage folder shows up as 'This PC\Pixel 3 XL\Internal shared storage'
tried: adb pull
result: adb.exe: pull requires an argument
tried: adb shell (to view list of directories)
result: chcrosshatch:/ $
tried: adb pull /dev/block/mmcblk0 mmcblk0.img
result: adb: error: failed to stat remote object '/dev/block/mmcblk0': Permission denied
tried: adb pull \Pixel 3 XL\Internal shared storage
result: adb: error: failed to access 'storage': No such file or directory
My phone is rooted and I have adb and platform-tools all set up.
Use dd command or adb pull userdata partition, but you wiped it so whatever you want is gone.