greyltc / android_external_sshfs

Fuse based ssh file system client for android devices
GNU General Public License v2.0
70 stars 12 forks source link

Error: No private recovery resources for TARGET_DEVICE #6

Open Blum opened 9 years ago

Blum commented 9 years ago

Hello, I'm trying to find a working sshfs solution, and I found this lib.

I'm trying to compile it for CM 12, (not sure if it is supposed to work). I think I got the requirements, CyanogenMod dev environment.

I get this error:

No private recovery resources for TARGET_DEVICE
make: *** No rule to make target '/home/blum/android/system/out/target/product/falcon/obj/SHARED_LIBRARIES/libglib-2.0_intermediates/export_includes', needed by '/home/blum/android/system/out/target/product/falcon/obj/EXECUTABLES/sshfs_intermediates/import_includes'.  Stop.
make: Leaving directory '/home/blum/android/system'

The build environment is 64bit Arch Linux. Have no idea how to proceed.. Can you help me with some advice what should I try?

Drakonas commented 9 years ago

You have to build glib first. The link is in the readme on github, but the author forgot to say you're supposed to build it first. BTW, use 'mmp' instead of 'mmp -B' if you want to pick up where you left off on the build. Also, you might come across an error regarding 'Error: syscall.hYou have to build glib first. The link is in the readme on github, but the author forgot to say you're supposed to build it first. BTW, use 'mmp' instead of 'mmp -B' if you want to pick up where you left off on the build. Also, you might come across an error regarding 'Error: syscall.h: not found': not found'. It occurs became CM12 changed where the syscall is located. Open the 'external/glib/glib/gbitlock.c' file and change the line (past first include section):

include

To:

include <sys/syscall.h>

Then run 'mmp' again. Make sure your phone is plugged in the computer. And run 'adb root' and 'adb remount' first. Normally, 'mm' is used to build, but we need the built libraries sent to the phone, thus we use 'mmp' instead. After the build, you should see the files sent to your phone.

Then, finish building sshfs with 'mmp'. That should finish with no problems.

Now, bear in mind, if you had searched the issues, you'd find that this is broken on CM12.1 for me, however I am not sire if it is a rom conflict. If the mounted filesystem breaks immediately after you open a file, you'll have to wait for the author to fix it.

In any case, you will need to uncheck 'Mount Namespace Separation' in SuperSu on your Android and reboot so you can see the mounted filesystem outside of Terminal Emulator. (Normally Fuse mounts are separated per-app as a security precaution)

l3iggs commented 9 years ago

Hi Drakonas, I'll happily accept PRs to fix the build process instructions in the README.md if it's out of date.

I believe that back when I wrote the instructions mmp -B built both glib and sshfs maybe that's somehow changed, it's been a while.

Blum commented 9 years ago

Thank you! I managed to compile it and push it to my CM12 Moto G.

I had to change #include <syscall.h> to #include <sys/syscall.h> in /external/glib/glib/gbitlock.c (Changed path in CM12).

Also had some problems pushing both glib and sshfs files to the device, but finally used adb push. Thank you once again.

Blum commented 9 years ago

But sadly, when I try to access a file in the mounted filesystem, it just breaks. The file listing works, but when I try to copy a file in the local filesystem, it quits with Bad address. After that ls gives just Transport endpoint is not connected :/ Is there any cure for this?

Thanks again folks, your work really matters. I'm using sshfs every day to broadcast music from my local home server to some other machines (on Linux). If I can do it on my phone, it would be just awesome. I wonder why it is not that popular on Android.

Drakonas commented 9 years ago

@l3iggs I can help with that, except I'd rather wait until we find a working solution. By the ways, you never merged glib's cm-10.2 branch to the master. Cloning that branch (git clone {insert glib url} -b cm-10.2) fixes all build errors. However, even when rebuilding with the fixed branch, the result is the same: sshfs crashes when accessing a file. Folders are fine, just as before, though. My current command I use: sshfs drakonas@192.168.1.10:/ /system/sshfs -o ro -o allow_other -o follow_symlinks -o StrictHostKeyChecking=no -o reconnect -o TCPKeepAlive=no -o umask=0222 I've also tried mounting it in tons of other places, including /mnt/shell/emulated/0/sshfs/, to no success.

l3iggs commented 9 years ago

I've just created a master branch which has a PR that hopefully solves people's problems.

Could anyone report on if master wirjs for you all?