I'm trying an app that require to enable a cloud based file system to my device. For this I've to have FUSE support in my Android device . I'm using Android version 4.4.2 on a Asus tablet. However I searched a lot but couldn't find some satisfactory answer to ensure that whether Android support Fuse. Thus I have few question as below ,
1.According to my search result When I run cat /proc/filesystems on an app (Terminal Emulator for Android) that provides Linux terminal I found the result of cat shows "Fuse" there . Is that mean my system support Fuse interface to allow install an user space file system ?
I also found in some forum either Fuse should come as built inside kernel or it should be as fuse.ko module under /system/lib/module . But my system doesn't contain fuse.ko hence does it mean I don't have fuse ?
In short, my question is how to ensure FUSE on android device ? I'm a beginner in Android programming so any help is much appreciated . Thanks in advance.
Modern versions of Android utilize Fuse internally, for example to implement the emulated External Storage.
However, Android is locked down and so neither 3rd party applications, not in most cases the human user, are allowed to add additional filesystems.
For stock Android the only choice will be to implement file-system-like operations within application code, creating a private API that replicates basic file operations, without actually using any files. Anywhere in the code you are writing or porting and need to access one of the remote "files", you would substitute your API for the actual file one. A good example of this would be Android assets - they look a lot like files and have many similar operations, but at runtime they actually are not files but an Android-unique storage mechanism.
Anything else would require modifying Android away from stock configuration (ie, root hacks, etc).
To check what your version of Android on your device supports, download a terminal emulator, and from the command line, run the following snippet of commands minus the parentheses...
"cat /proc/filesystems"
And scroll through the results looking for fuse. This will be a list of supported filesystems weather it be compiled into the kernel or loadable module.
Related
I know an open source project coded in C, which compiles as system executable for Linux, Windows, OS X, iOS and Android.
On Linux/Windows/OSX it can be just executed with ./example_programm or C:\>exeample_program.exe and it starts serving it's API through http://127.0.0.1:port_number, example: http://127.0.0.1:7778
on Desktop platforms this API can be used by GUI application.
I need to know how this can be done on Android ?
I know on Android adb shell we can do su and then run android compiled program executable, and then probably use open the HTML GUI from android web browser and use it. But, this shouldn't be the case I guess.
The executable doesn't need ANY root or superuser privileges. a limited user account if run the executable makes this executable run and the program starts serving API on 127.0.0.1.
As and alternative I heard Android can either use Cordova wrapper to include this android compiled executable in it and when the Android App starts the App can trigger to execute this android executable in backend. But, I'm not so sure at the moment, if that way will work or not, or what challenges will there be. This probably needs to be tested.
Another alternate way I heard is to have this C code compiled as a library. I have no idea of C coding done in this project, and I don't know what changes I need to make to compile it as Android library. Anyway if with some help I could have this C code compiled for Android as a library, can someone please let me know how this library can be called by the Android App, and it will behave exactly the same ways it behaves on Desktop platform ? like executing the executable and it starts serving API on 127.0.0.1:7778 ?
Thanks for help :)
At a high level, you can use the Android NDK to run C or C++ code in an Android application: https://developer.android.com/ndk/index.html
Whether or not "it will behave exactly the same ways it behaves on Desktop platform" is unknown because I don't know any details about this library. If it's a simple web service, it's likely that it will work.
Regarding making design decisions, I'd leave that alone and just go in with the knowledge that C code can run on Android, then have someone familiar with Android and/or the NDK determine the best way to use the code.
I have an android STB and I'd like to know if there is any library with I can use the built in DVB-T tuner?
Thanks in advance!
No, there is no DVB-T library for android.
However, you can develop your own:
Firstly, is your DVB-T device supported by the kernel? To check, see if DVB related debug comes out of dmesg when you boot up the box. Also, ls /dev/dvb* to see what is already there.
If there is no DVB support in the kernel, you will need to add it. First you need access to the kernel source. Using this, modify the kernel menuconfig to add DVB related modules, and specific ones for your tuner - sometimes some Remote Control ones are required also. Then build these modules, and insmod the modules on the box. Sometimes firmware is required too. Check the initial check again.
Then you can cross-compile dvb-apps for android (specifically tzap), or the newer v4l-utils for android. This gives you c code to tune to DVB-T transponders. Then write some JNI to access the API from Java, and create an app to perform tuning.
Finally, you can send a URI to the /dev/dvb0.dvr0, to a third-party video player like VLC. This is a TS stream containing MPEG-2 for SD, and H264 for HD.
As you can see, it is a lot of work, but entirely possible.
As a part of low-level monitoring application, that needs to monitor some changes in sysfs I should use udev interface instead of inotify. It's pretty clear that most of android devices, and all devices that I really need to run this application on, are using udev for enumerating devices and apply policies. The standard way to interact with udev from C-application is to use libudev (libudev.h), but there is no libudev.so in /lib directory and no include directory at all. So I need to get ARM port of this library or do some workaround here. Please, help me with this problem, since I'm not good in cross-compiling and libudev specific questions.
Note: I have root access on all devices, that I going to run this application on.
Does anyone know where I can find the list of system call that can be used in Android Mobile phones? I guess that looking to the kernel should work, but I cannot find any *.h or *.c with the declaration of them.
Best regards
You primarily want section 2 of the linux kernel manual pages.
Very little is unique to Android, the few gotchas being in the android docs (no sys-V IPC, AF_INET sockets won't work unless you are in the network group, etc). Most of the android additions are drivers (Binder, etc) and novel usage patterns (for example of user IDs) rather than actual syscalls.
If you actually need the syscall numbers you can find them in bionic/libc/SYSCALLS.TXT within the sources
You may want to check the Bionic sources for the system call list. Since, Bionic is the C-Library, that Android works off.
Try here
It is located in SYSCALLS.TXT file inside of libc directory under certain Android version. Example above is system call on Android 11.
In my case I want to write an app which is totally symetrical (not client-server) with identical functionality at two PCs, one a 'standard' Windows or Linux box and the other an Android slate.
Can I run the same program on both or do I nneed to wrap it in an Android package for persmissioons, etc?
The two PCs will communciate by TCP/IP, sort of peer-to-peer, but I suspect that as a generic question this might be of interest to many.
Well you cannot run an independent java application on Android. Android applications are compiled to dalvik bytecode and really are just written in java but not run on the java vm (Android does not have a java vm). However you can create a jar library that can be consumed by both a desktop and android application and that should provide reuse of platform independent code.
You can run command-line Java programs on an Android device. An example of a simple "hello, world" program is described here.
As noted previously, though, you can't use the Android framework for UI, and unless you have a rooted phone you won't be able to install it in /data or access "protected" features like talking to the Internet.