Pack ROM
https://android.googlesource.com/platform/system/extras/+/lollipop-wear-release/ext4_utils/
I just make it by the following command. (reference from Google searched)
gcc -o make_ext4fs -Icore/libsparse/include -lz extras/ext4_utils/make_ext4fs_main.c extras/ext4_utils/make_ext4fs.c extras/ext4_utils/ext4fixup.c extras/ext4_utils/ext4_utils.c extras/ext4_utils/allocate.c extras/ext4_utils/contents.c extras/ext4_utils/extent.c extras/ext4_utils/indirect.c extras/ext4_utils/uuid.c extras/ext4_utils/sha1.c extras/ext4_utils/wipe.c core/libsparse/backed_block.c core/libsparse/output_file.c core/libsparse/sparse.c core/libsparse/sparse_crc32.c core/libsparse/sparse_err.c core/libsparse/sparse_read.c
But encountered the following error.
extras/ext4_utils/make_ext4fs_main.c:33:29: fatal error:
selinux/selinux.h: No such file or directory compilation terminated.
extras/ext4_utils/make_ext4fs.c:63:29: fatal error: selinux/selinux.h:
No such file or directory
Related
On some Android devices, the executable binary /system/bin/ping seems to be removed.
I wonder if I can build a ping executable binary from the Android source code ping.c.
But when build it using ndk-build, some errors happened:
jni/ping.c:67:47: fatal error: private/android_filesystem_config.h: No such file or directory
#include <private/android_filesystem_config.h>
^
compilation terminated.
make: *** [obj/local/armeabi/objs/myping/ping.o] Error 1
ndk's include folder doesn't have file android_filesystem_config.h.
My question is how to build a ping executable to use?
I am getting this error while run configure script with Android NDK-standalone toolchain for a 3rd part C library.
configure:3463: arm-linux-androideabi-gcc -E conftest.c
conftest.c:19:17: fatal error: png.h: No such file or directory
#include <png.h>
How do I include png.h to arm-linux-androideabi-gcc compiler toolchain?
I found this article helpful: http://blog.stuff-o-matic.com/post/2013/09/07/Porting-a-C-game-to-Android,-the-case-of-Andy-s-Super-Great-Park
I'm trying to rebuild Limbo Android. I'm on Linux Mint.
All I changed was android-config.mak NDK_ROOT, exported variables NDK_ROOT. I've also exported NDK_MODULE_PATH to /home/pathtoandroidndk/sources, as per README instructions.
From terminal I do cd limbo-android/jni and then make.
Building returns this error:
jni/glib/glib/./libcharset/localcharset.c:22:20: fatal error: config.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi-v7a/objs-debug/glib-2.0/./libcharset/localcharset.o] Error 1
make: Leaving directory `/home/me/limbo-android'
I've tried modifing Android.mk following instructions from Android NDK - Additional Include Directories and Unable to find header files - Android NDK, without success.
I came to conclusion that each module inside limbo-android needs it's own config.h file, while libcharset does not have one.
How do I solve this error? Is there a generic config.h (the one from NDK maybe?)
NOTE: I can build it without any problems on Windows 8.1 using mingw.
I would like to add NFS support (both client and server) for my Android device. I have already built and inserted the required kernel modules (sunrpc.ko, lockd.ko, nfs.ko, exportfs.ko, nfsd.ko)
My Android phone now can act as an NFS client by mounting using Busybox. But to work as an NFS server, seems like some utilities (such as exportfs) and service daemons (portmap, nfsd, mountd, etc) are missing.
I figured I needed to install the nfs-utils package (http://nfs.sourceforge.net/).
I thought I should cross-compile it on my pc and then install it on my phone's Linux kernel. I'm not familiar with the whole cross-compiling thing. I'm trying to compile it on Ubuntu right now, and this is the command I'm using:
$ ./configure
--target=arm-linux-gnueabi
--host=arm-linux-gnueabi
--build=x86_64-linux
CC=/usr/bin/arm-linux-gnueabi-gcc
CPPFLAGS="-I/usr/arm-linux-gnueabi/include/"
CFLAGS="-nostdlib"
LDFLAGS="-Wl,-rpath-link=/usr/arm-linux-gnueabi/lib/ -L/usr/arm-linux-gnueabi/lib/"
LIBS="-lc"
This gives me the error msg:
checking for libwrap... configure: error: *** libwrap missing
config.log errors:
configure:3978: /usr/bin/arm-linux-gnueabi-gcc -V >&5
arm-linux-gnueabi-gcc: fatal error: no input files
configure:3978: /usr/bin/arm-linux-gnueabi-gcc -qversion >&5
arm-linux-gnueabi-gcc: fatal error: no input files
conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
conftest.c:55:28: fatal error: sys/capability.h: No such file or directory
I have the gcc-arm-linux-gnueabi package installed, but I guess there are some problems with building/linking with dependency libraries I don't really understand. Should they be cross-compiled too? How can I do that? And will I need to insert these libraries into my phone for NFS to run properly?
I'm completely new to this so any help would be greatly appreciated.
You have a dependency of tcp-wrappers which means you must first build and install tcp wrappers.
Alternatively, you can pass this option to ./configure:
--without-tcp-wrappers \
Also, you can get a complete list of options:
./configure --help
I have downloaded the CPP Unit Test framework and trying to compile for the Android. But, facing the Configure issues. I tried making Standalone tool chain and also tried configuring but its always failing
sh-4.1$ ./configure CXX=arm-linux-androideabi-g++ CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-g++ CXXCPP=arm-linux-androideabi-g++
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... arm-linux-androideabi-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
sh-4.1$ arm-linux-androideabi-g++
arm-linux-androideabi-g++.exe: fatal error: no input files
compilation terminated.
sh-4.1$
My build environment is NDKr8, Cygwin, Windows7-x64.
I tried going through the config.log and found that the error is
arm-linux-androideabi-gcc.exe: error: CreateProcess: No such file or directory
I tried for fixing the above error by cutting down the path length and so on. But still not able to resolve. Please let me know if anyone has resolved similar problem.
Just to add the information from the link http://curl.haxx.se/mail/lib-2012-08/0184.html
but facing same issue with out Cygwin as well.
D:\Test>arm-linux-androideabi-gcc Main.c
arm-linux-androideabi-gcc: error: CreateProcess: No such file or directory
D:\Test>
As you observer even in the windows prompt as well it is the same issue.
----- Edit 1 -----
I tried configuring on the Ubuntu 12.04 OS with the below line
./configure --host=arm CXX=arm-linux-androideabi-g++ CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-g++ CXXCPP=arm-linux-androideabi-g++
But getting these errors
checking how to run the C preprocessor... arm-linux-androideabi-g++
configure: error: in `/mnt/hgfs/VMShare/gperftools-2.0_Android/gperftools-2.0':
configure: error: C preprocessor "arm-linux-androideabi-g++" fails sanity check
See `config.log' for more details.
But most of the times ARM android Gcc compiler is failing.
configure:4216: arm-linux-androideabi-gcc -qversion >&5
arm-linux-androideabi-gcc: error: unrecognized option '-qversion'
arm-linux-androideabi-gcc: fatal error: no input files
Give the correct path and environment.
Example setup:
export NDK=/develop/android/android-ndk-r9b
export SYSROOT=$NDK/platforms/android-18/arch-x86
export CC="$NDK/toolchains/x86-4.7/prebuilt/linux-x86/bin/i686-linux-android-gcc --sysroot=$SYSROOT"
export CFLAGS="--sysroot=$SYSROOT "
export LDFLAGS="--sysroot=$SYSROOT "
I don't have experience with your particular setup, but when I was getting this error, I fixed it by adding gcc's bin folder to the system path and additionally, there had to be a version of each executable without a prefix (for example g++.exe, ld.exe...) in the gcc's bin directory. This solved the issue for me. I also logged off/on after changing the path, but don't know if it's necessary.
I got the idea here:
http://forums.codeblocks.org/index.php?topic=18100.0