Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many build problems #14

Closed
kopchik opened this issue May 4, 2014 · 8 comments
Closed

many build problems #14

kopchik opened this issue May 4, 2014 · 8 comments

Comments

@kopchik
Copy link

kopchik commented May 4, 2014

Hi!

JFYI

I've got amd64 archlinux with gcc-4.8.2 installed. It doesn't build. It produces zillions errors instead. Just few to mention:

g++ -c -o adbfs.o adbfs.cpp -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse 
adbfs.cpp: In function ‘void clearTmpDir()’:
adbfs.cpp:202:5: error: expected ‘;’ before ‘shell’
     shell(cmd);
     ^
adbfs.cpp:203:25: error: cannot convert ‘const string {aka const std::basic_string<char>}’ to ‘const char*’ for argument ‘1’ to ‘int mkdir(const char*, __mode_t)’
     mkdir(TMP_PATH, 0755);
                         ^
adbfs.cpp: In function ‘int adb_getattr(const char*, stat*)’:
adbfs.cpp:260:36: error: invalid user-defined conversion from ‘const char’ to ‘const key_type& {aka const std::basic_string<char>&}’ [-fpermissive]
     if (true || fileData.find(*path) ==  fileData.end() ||
                                    ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/include/c++/4.8.2/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8.2/bits/ios_base.h:41,
                 from /usr/include/c++/4.8.2/ios:42,
                 from /usr/include/c++/4.8.2/istream:38,
                 from /usr/include/c++/4.8.2/fstream:38,
                 from utils.h:43,
                 from adbfs.cpp:75:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: note: candidate is: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>] <near match>
     basic_string<_CharT, _Traits, _Alloc>::
     ^
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: note:   no known conversion for argument 1 from ‘const char’ to ‘const char*’
adbfs.cpp:260:36: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
     if (true || fileData.find(*path) ==  fileData.end() ||
                                    ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/include/c++/4.8.2/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8.2/bits/ios_base.h:41,
                 from /usr/include/c++/4.8.2/ios:42,
                 from /usr/include/c++/4.8.2/istream:38,
                 from /usr/include/c++/4.8.2/fstream:38,
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: note: candidate is: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>] <near match>
     basic_string<_CharT, _Traits, _Alloc>::
     ^
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: note:   no known conversion for argument 1 from ‘const char’ to ‘const char*’
adbfs.cpp:273:23: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
         fileData[*path].timestamp  = time(NULL);
                       ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/include/c++/4.8.2/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8.2/bits/ios_base.h:41,
                 from /usr/include/c++/4.8.2/ios:42,
                 from /usr/include/c++/4.8.2/istream:38,
                 from /usr/include/c++/4.8.2/fstream:38,
                 from utils.h:43,
                 from adbfs.cpp:75:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
adbfs.cpp:275:27: error: ‘path_string’ was not declared in this scope
         output = fileData[path_string].statOutput;
                           ^
adbfs.cpp: In function ‘int adb_readdir(const char*, void*, fuse_fill_dir_t, off_t, fuse_file_info*)’:
@Lanchon
Copy link

Lanchon commented May 6, 2014

same here, linux mint 16:
https://gist.github.com/anonymous/4419f82f3410373d1451
there are even syntax errors! what are we doing wrong??

this fork works, but has bugs:
https://github.com/spion/adbfs-rootless

i suggest the GPL SSHelper app, then sftp to it from your desktop. your standard file browser probably supports sftp out of the box. the result is much more robust.

@Lanchon
Copy link

Lanchon commented May 6, 2014

this repo also builds:
https://github.com/PIlin/adbFS

@Lanchon
Copy link

Lanchon commented May 6, 2014

rootless works better, handle dir links correctly. both are equally painfully slow when used under nemo. nemo is probably looking into file contents of every file (magic, icon, etc)

@isieo
Copy link
Owner

isieo commented May 6, 2014

Should work now, it seems like one of the pulls was buggy. i personally don't use this anymore as i transfer my files via sftp or use MTP.

just curious, what are you guys using adbFS for?

@kopchik
Copy link
Author

kopchik commented May 6, 2014

I use adbfs because MTP doesn't work for me at all. I tried different versions of mtpfs and utilities, tried multiple versions of libmtp, checked all suggestions, nothing works for me.

Since nexus 4 has problems with some WIFI points (and mine as well) adbfs and sideload are the only ways to go.

@Lanchon
Copy link

Lanchon commented May 6, 2014

lol i do opposite, adb over wifi :)

mtp works out of the box with linuxt mint 16. i had to set it up myself on mint 15, dont remember how. i do know the only good solution i found was via GVFS. its the one adopted by mint's upstream later i think.

i was trying adbfs because MTP sucks. the phone has a file database instead of online access to files, which means you never know if you are seeing the true content. not to mention that the implementation filters out files and is caged inside /sdcard.

sftp is great, i use it on my phone, but needs setup. i hack all my friends phones and i want immediate access with no configuration. i end up using qtADB, but the project is unmaintained and having trouble working as android tools evolve.

what is really needed IMHO is a GVFS over ADB implementation with automounting, just like GVFS over MTP.

another possibility would be to push sshd with its config and run it with the inetd option through the adb pipes, then sftp into it, all in one go for routed phones :) very messy

btw, you can also check out:
https://github.com/chrisdiamand/adbfuse
works, but its noticeably slower than adbfs.

@Lanchon
Copy link

Lanchon commented May 6, 2014

@kopchik, i recommend you set up adb port forwarding for port 2222 to use sftp to SSHelper via the usb cable.

@kopchik
Copy link
Author

kopchik commented May 6, 2014

@Lanchon, you right, this is a working solution. I completely forgot about this.

PS I close the ticket as problem seems to be solved.

@kopchik kopchik closed this as completed May 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants