adb push "No such file or directory" error - General Questions and Answers

HI Guys,
After searching the forums for a bit, and not having luck - I am opening a quick thread. All I am trying to do is push files back as I pulled them before my ROM upgrade.
Code:
adb root
adb remount
adb push blahfolder /storage/sdcard0/
Here is what I am getting as error.
Code:
E:\phone>adb push "themex" /storage/sdcard0/themex
push: themex/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png -> /storage/sdcard0/themex/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png
failed to copy 'themex/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png' to '/storage/sdcard0/themex/com.gau.go.launcherex.theme.blackthemepro/icons/unblockm
e.png': No such file or directory
E:\phone>adb push "themex" /storage/sdcard0
push: themex/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png -> /storage/sdcard0/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png
failed to copy 'themex/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png' to '/storage/sdcard0/com.gau.go.launcherex.theme.blackthemepro/icons/unblockme.png':
No such file or directory
FYI - I am not using absolute path as CMD prompt is running from the source directory already. E:\

Related

Rooting/SD Card Problem

When I try to get root on my g1 I get to the "flash_image recovery recovery.img" step and I keep getting "error opening recovery.img: No such file or directory." I have tried changing recovery.img to /sdcard/recovery.img and I have made sure that I properly unmounted it from my computer. When I cd to sdcard and ls the only thing inside is dcim, but when I mount it to my pc again the recovery.img and update.zip folders are inside and nothing else.
Not sure what's up with your sdcard issue, but you could always just write the recov directly and bypass the sdcard:
On G1:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
On PC:
adb push /path/to/recovery.img /system/recovery.img
On G1:
cd system
flash_image recovery recovery.img
When I type "adb push /home/stephen/Desktop/recovery.img /system/recovery.img" I get bash: adb: command not found. Also, I am running Ubuntu 8.10 if that would make a difference.
ShaffersMyHomie said:
When I type "adb push /home/stephen/Desktop/recovery.img /system/recovery.img" I get bash: adb: command not found. Also, I am running Ubuntu 8.10 if that would make a difference.
Click to expand...
Click to collapse
In terminal, you have to cd into the directory where adb is found. It's probably easiest to put the recovery.img in the same directory as the adb file.
Try this:
adb remount
adb push recovery.img /system/recovery.img
that should work.
adb is a part of the Android sdk. If you haven't downloaded the sdk before, you'll need to do that.
Alright now I keep getting error: device not found even though I have mounted my g1.
You have to turn on debuging by going into settings->applications->development->debug
ShaffersMyHomie said:
Alright now I keep getting error: device not found even though I have mounted my g1.
Click to expand...
Click to collapse
You need to follow the directions here:
http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware
Ok well I switched over to windows because Ubuntu was getting annoying and I installed sdk and everything and now when i enter "adb remount" I get remount failed: Operation not permitted. And if I put in "adb push recovery.img /system/recovery.img" I get failed to copy 'recovery.img' to '/system/recovery.img': Read-only file system.
Do you have rc29?
persiansown said:
Do you have rc29?
Click to expand...
Click to collapse
Yes I have rc29.

[Q] Cant access Android shell

I attempted to set the Android ash shell as default based on a thread here by:
mv /system/bin/sh /system/bin/sh0
ln -s /system/xbin/bb/ash /system/bin/sh
This did not work? Now when i attempt to open shell I see an error:
-exec '/system/bin/sh failed : No such file or directory'
I'm afraid I have screwed up. I thought about writing a small app to execute a shell command to rename the file back to "sh". Would this work? Do I have simpler options?
Any help appreciated
Thanks,
Bill F
Update
Ok, I was able to get the renamed sh file off the phone with adb pull. I renamed it to "sh" and tried to push it back using:
adb push c:\temp\sh /system/bin
but I get an error that says
failed to copy c:\temp\sh to /system/bin/sh : No such file or directory
What should I do?
Thanks,
Bill F
I, too, had a similar problem.
And were you able to fix it?
Bill F
Any answer?
I'm having the same problem. Does anyone have a solution?
bfarley59 said:
Ok, I was able to get the renamed sh file off the phone with adb pull. I renamed it to "sh" and tried to push it back using:
adb push c:\temp\sh /system/bin
but I get an error that says
failed to copy c:\temp\sh to /system/bin/sh : No such file or directory
What should I do?
Thanks,
Bill F
Click to expand...
Click to collapse

[Q] Question about RO /system/bin

Hello XDA need your support.I am trying to fix a bootloop but I cannot run the ADB SHELL - exec '/system/bin/sh' failed: No such file or directory (2) - when I try to insert the sh file with adb push it sends me Cannot Copy "Read-Only" system
I know I can unlock the /system with the shell codes but my urgent question is how I can insert this sh file because android cant find it
And the most important is then the ADB SHELL is needed for fastboot commands
Any Ideas ?

[SOLVED] Restore build.prop to default: adb shell doesn't let me write

ROM: LineageOS 18.1, Recovery: LineageOS 18.1 recovery
I messed up and put my build.prop in an invalid state. I got the default build.prop from the rom zip,rebooted the phone to recovery (lineageos 18.1 recovery), mounted the system partition on /mnt/system, and tried to write build.prop to default via adb shell and then cat >/mnt/system/system/build.prop and writing whatever stuff I want. However, even after remounting as rw, I get the following error message:
Code:
cat: xwrite: No space left on device
The same thing happens if I just edit on my PC and do adb push
Code:
$ adb push build.prop /mnt/system/system/build.prop
build.prop: 1 file pushed, 0 skipped. 89.9 MB/s (2662 bytes in 0.000s)
adb: error: failed to copy 'build.prop' to '/mnt/system/system/build.prop': remote write failed: No space left on device
Now what does this even mean?? There is 3.1M free space, as confirmed by df -h. I really searched I cannot find anything on this. Any help would be really appreciated!
---
I can confirm it is mounted as rw by checking this line in /proc/mounts
Code:
/dev/block/dm-0 /mnt/system ext4 rw,seclabel,relatime 0 0
adb remount also fails with
/system/bin/sh: remount: inaccessible or not found
I'm at my wit's end, any guidance here? I feel this should really not be this difficult! I just want to rewrite build.prop from adb/recovery!
---
It might have something to do with overlayfs, as seen here https://android.googlesource.com/platform/system/core/+/master/fs_mgr/README.overlayfs.md. However adb remount merely says /system/bin/sh: remount: inaccessible or not found! How should I get this to work?
---
Finally: maybe I could just try to flash a zip containing only the build.prop via adb sideload? Will adb sideload wipe anything (e.g. system) or just overwrite the files which are present in the zip?
---
Just ended up flashing again. It worked without deleting apps or data

Problems with ADB push and --sync+

I'm attempting to use adb's push command on Windows 10 in order to transfer files from my PC to my Oneplus 9 Pro. I installed adb by following the instructions here. When I attempt to do the file transfer, I receive a large number of error message for some of the files, that all look like this:
Code:
E:\>adb push Music /sdcard/Music
cannot lstat 'Music/??????': No such file or directory
cannot lstat 'Music/????? ??....flac': No such file or directory
cannot lstat 'Music/????? ????????? - ??????? ?????? (2011)': No such file or directory
cannot lstat 'Music/????????? ??????? ??? - 1990 - ??? ?? ??????': No such file or directory
cannot lstat 'Music/???? ? ????????.mp3': No such file or directory
cannot lstat 'Music/??? ?????? ?????.flac': No such file or directory
cannot lstat 'Music/??????? ????.mp3': No such file or directory
cannot lstat 'Music/??????': No such file or directory
cannot lstat 'Music/?????? ????.flac': No such file or directory
cannot lstat 'Music/?? ?????? ???? ??? ? ? ????? ?? ??????.mp3': No such file or directory
cannot lstat 'Music/??, ???????.mp3': No such file or directory
I have used adb with these exact same files before, when I was still running Manjaro, with no issues or error messages such as these, so I'm fairly confident the issue is not with the files themselves. Even more bizarrely, when I attempt to use the --sync command, it doesn't even recognize it as a command:
Code:
E:\>adb push --sync Music /sdcard/Music
cannot stat '--sync': No such file or directory
I've attempted to uninstall and reinstall adb, but the issues persists in spite of that. What possible solutions are there to this?
Youn have to name the fullpathname of folder Music on PC.
xXx yYy said:
Youn have to name the fullpathname of folder Music on PC.
Click to expand...
Click to collapse
I do have the full path name, Music folder is located in E:\Music and I open Command Prompt to E:\ drive. I also know it's the correct path name because some of the files do transfer, but a large number have errors as discussed above.

Categories

Resources