I've installed Debian+python on an android table with GNURoot. Now I'm trying to install tensorflow python API, so that I can "import tensorflow" in my python code. My tablet CPU is arm 32 bits, so I can not install with pip because tensorflow only supports 64 bits.
I thus try to compile tensorflow from source. Tensorflow build system is Bazel, and I've not found any Bazel executable for linux arm 32 bits.
So I try to compile Bazel from source. But "./compile.sh" fails with error
"Protobuf compiler not found in third_party/protobuf/protoc-linux-arm32.exe"
I'm a bit reluctant to try and compile protobuf from source, because I've read somewhere that protobuf master may not be work with bazel.
Is there an alternative way to install tensorflow on arm32 ?
Unfortunately building TensorFlow Python requires Bazel (for just C++ inference you can use the instructions at tensorflow/contrib/makefile), and this is quite an involved and buggy process. The best place to start is this post on setting things up on the Jetson board:
http://cudamusing.blogspot.com/2015/11/building-tensorflow-for-jetson-tk1.html
If you want to play with Keras it is possible on gnuroot. Instead of Tensorflow you can use Theano backend. I made it.
In this moment my Telefunken Outdoor WT4 phone is running it.
It is very slow but it is working.
Related
Im create simple game, remake my old ZX-Spectrum game "m2k"
Love2D is simple engine using LUA.
What i need:
Compile Love2D -> exe files, linux binary, android apk.
Goal is pack Win32, Linux64 bit and android apk WITHOUT possiblity of just unpacking .love file and WITHOUT manual installing love2d engine.
https://pp.userapi.com/c637425/v637425257/4a8a8/QCv9Q5dz_b4.jpg
I cannot found anything useful about it. I found LoveExporter 0.2 by shake but this utilite fails compiling normal binary. It fails with error.
All manuals tell me just create .love file and send it to all. No way.
It's no good for me.
Maybe i can run this utilite. I fails with 0.2 version maybe 0.1 works
http://snake174.github.io/html/programs/love_exporter.html
Partially it works, but it requires Microsoft Windows, and android support is broken. Developer not create new versions about a year +.
I don't want to pay for windows, reboot to windows or another using unsafe OS, and requires Native full work analog.
etc
Compile Love2D -> exe files, linux binary, android apk.
The wiki already has a guide for creating executables for Windows, Linux, Mac and Android. Unless I'm misunderstanding your request, you need this.
I'm trying to compile and run the OpenCV face detection example but it won't let me. I'm using Linux Mint 17, Eclipse with ADT and NDK installed. I have the gcc, g++, build-essentials packages installed. I'm getting the following errors:
Thanks in advance!
You should compile that stuff for ARM architecture (depending on your device). In principle gcc can do that but it is a little bit of work because your need android ndk, android sdk and android built-tools.
I advice you to start very simple. Having a running empty app that calls a native c++ function. And once this is settled your should proceed to opencv.
Have a look at this. I made it https://github.com/skanti/Android-Manual-Build-Command-Line
is it (theoretically) possible to run any Unix binary from the Android NDK? I have the following binaries available:
.rpm, Redhat / CentOS 5.8 i386 RPM
.rpm, Redhat / CentOS 5.8 x86_64 RPM
.tar.gz, Solaris Sparc 2.10
.tar.gz, Cygwin
.tar.gz, MinGW
There is also a .tar.gz available that can be installed from Unix Source. The application has command line tools available that I hope to exploit with the NDK. For example:
convert image.jpg image.png
While I am just starting to run through NDK examples and tutorials, I wanted to see if what I am trying to achieve is possible.
I'm not sure if the above information is enough to tell but, please let me know if there is any more information that I can provide.
Android is its very own architecture, so the files targeted for architectures like i386, x86_64, Solaris, etc. won't work there. It should be possible to use the NDK to convert a Unix Source bundle into binaries which will work on Android devices. But how easy or difficult that would be depends on what other libraries or possibly OS features the source itself depends on.
I am interested in building an open source project and it requires the GNU libraries GLIBC and GLIBM. If I were to cross-compile this under Linux (I am using Ubuntu 11.10 as the host) for a shared (.so), or even a static (.a) object, with the ARMv7-a neon architecture, using API-9, as a library to call with Java's JNI, to ultimately compile as an APK for distribution, what steps would one undertake to achieve this outcome?
Given I have tried the Google NDK toolchain (setting $PATH and $CC the hard and easy way according to the documentation), a variety of custom toolchains, the Code Sourcery toolchain and a toolchain suggested on the XDA forum using crosstool-ng, is it possible to achieve a shared object file that can be called from JNI and has access to the full GLIBC library on a non-rooted Android device?
I have searched for an answer to this and the closest I have come is to build GLIBC and GLIBM locally and copy the relevant object (.o) files and link manually using the NDK's arm-linux-androideabi-ld. The libc.so.6 file from Crosstool-ng and CodeSourcery will not work as the relocations fail (giving error unknown reloc type 19) when calling the library using Java's System.LoadLibarary(). My knowledge of relocations is not the best but from what I have read this would require changes to the /linux/elf.h header file, but I am not sure exactly where to go from there.
I believe from what I have read that it may be possible to make a static executable that has all dependencies resolved when linked but then it would not be possible to package this as an APK file as far as I'm aware.
Surely I can't be the first to want to compile C code against something other than Bionic for the Android platform? There are so many C projects that could be ported to Android and apparently GLIBC has been available on iPhone for quite a while.
Any low level C library has very tight ties with the OS itself. While Linux and Android may mostly be the same thing, they are not. Building against another C library will require said C library to be ported first.
I'm a beginner in Android. My friend heard "Neon". So I did Google and found this
Referring it, Neon is related to multimedia for Android OS or all mobile OS, is it? Please share me more.
Neon is an ARM co-processor, meant for vector processing. Neon is used for multimedia data processing. It is an optional co-processor, the Android Linux kernel may or may not have support for this. (Eclair days)
However if Google provides any Android Application APIs to access Neon, then you can safely use it in your application.
NEON is extremely powerful and easy to program. It doesn't solve performance issues, but simply eliminates them in most cases.
NEON intrinsics suck performance-wise, I suggest writing native codes for NEON.
Java : pistol
C/C++ : assault rifle
Assembly : machine gun
NEON : vulcan cannon, or A-10 tank killer
Honestly, I'm not exaggerating in any way. NEON is THAT powerful.
There is an official usage example in the NDK source reproduced at: https://github.com/android/platform_development/tree/android-6.0.1_r16/ndk/samples/hello-neon
It is used from NDK, so the interesting files are the .c files under jni/.
You can build and install it with:
ndk-build
android update project -p . -t android-22
ant clean
ant debug
ant installd