Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Due to a configuration error I made combined with an OTA update (Android 4.1.2), I had to re-unlock my bootloader to regain root on my GSM Galaxy Nexus. This process wipes the entire phone, including /sdcard. When I restored from backup, I discovered that only some of my files had been included in my most recent backup and subsequently restored.

I have a slightly-older complete backup consisting of the individual files copied onto my computer. However, I can't restore them.

I first tried adb push (note that I'm using Linux and do not have access to a Windows box at this time):

$ adb push . /system/sdcard0
push: ./.estrongs/cache/visit_history-journal -> /system/sdcard0/.estrongs/cache/visit_history-journal
failed to copy './.estrongs/cache/visit_history-journal' to '/system/sdcard0/.estrongs/cache/visit_history-journal': No such file or directory

If I delete the file mentioned, I get the same error for the next file. Note that this is a nonsensical error, as the only possible way for the file to even be attempted is for it to exist. It's annoying when error messages are themselves incorrect.

Next, I fired up DropBear SSH on my phone, started up the server and connected via SSH. So far, so good. But when I tried to use scp to copy the files across...

$ scp -r sdcard0/ root@192.168.2.11:/storage/sdcard0
Welcome to DropBear SSH Server!
root@192.168.2.11's password: 
sh: scp: No such file or directory
lost connection

Grr.

I tried to use a GUI method and use a file manager to copy the files. If I use the USB computer connection settings, I have two options: MTP or PTP. When I use MTP my file manager (Nautilus) can't even list a directory on my phone. The backend just times out. When I use PTP, I can only see camera-related folders. I can copy individual files, but when I try to copy everything, I get an error stating that there's not enough space and that 5 GB more is required. Obviously there's enough space, because what came off the "sdcard" must be able to fit back on.

What gives? Why is it so difficult to move files from my computer to my phone?

Update

After reading some related questions, I was reminded of FTP. I installed an FTP server on my phone and the files are curently being transferred. Of coures, I never thought of FTP earlier since it's obsolete technology and I haven't had a use for it until now for years.

So, my question changes to this: Why did the other methods, which are superior to FTP, fail?

share|improve this question
    
Isn't the target named /sdcard or /storage/sdcard and not /system/sdcard? –  ott-- Oct 28 '12 at 17:06
    
@ott--: D'oh! Of course you're right, and /system is presumably read-only. I'd guess that'd solve it, though I don't want to interrupt the current FTP transfer to find out. –  Scott Severance Oct 28 '12 at 21:17
    
@ott--: If you convert your comment into an answer, I'll accept it. –  Scott Severance Oct 29 '12 at 22:25

1 Answer 1

up vote 3 down vote accepted

Originally posted by @ott-- in the comments, this answer did the trick. I'm posting it as an answer since ott-- hasn't.

Isn't the target named /sdcard or /storage/sdcard and not /system/sdcard?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.