how to compile libfuse on android? - Android Software/Hacking General [Developers Only]

I want to use FUSE in android. It's easy to compile the kernel part by enabling FUSE in .config, but how to compile libfuse.a/.so?
I tried to put it in <platform>/external/ and create an Android.mk according to fuse's Makefile.am. However, lots of header files are missed, such as <sys/statvfs.h>. After copying lost headers to bionic, there are so many conflicts and complicated dependencies.
anyone has tried it?

Related

[Q] Adding pre-compiled files to AOSP build?

I am compiling AOSP Froyo for the Desire and would like to add some pre-compiled files to be added the the build output. Where would I go about placing these?
For example, I have a wifi module and kernel image that are compiled elsewhere, the kernel image goes into the output folder for bravo, but if I put the wifi module in the out/target/product/bravo/system/lib/modules it does not get added to the zip file when I "make otapackage"
Maybe someone could point me in the direction of some reliable reading resources on this? I'v not been able to find much of use.

Question on kernel development - HOWTO?

I'm still wet behind the ears, kernel wise. I have built my own vanilla Android kernels, so I have all the tools I need (I think).
For GTab kernels, does anyone have a HOWTO I can leech off of? Ie. I know that we need the tegra git, then the patch that CS supplied. But does anyone have a template .config I can work off of?
Btw, what I'm looking for is CIFS support (already being worked on here) and EXT3 support for flash drive. The latter would make me a very happen person.
Thanks in advance.
roebeet said:
I'm still wet behind the ears, kernel wise. I have built my own vanilla Android kernels, so I have all the tools I need (I think).
For GTab kernels, does anyone have a HOWTO I can leech off of? Ie. I know that we need the tegra git, then the patch that CS supplied. But does anyone have a template .config I can work off of?
Btw, what I'm looking for is CIFS support (already being worked on here) and EXT3 support for flash drive. The latter would make me a very happen person.
Thanks in advance.
Click to expand...
Click to collapse
Attached is a tegra .config file with EXT3, EXT4, and CIFS included in the kernel (not as a module file). Just rename to .config and build.
To configure other options as needed, just do a make menuconfig, go to the file systems menu to configure the EXT3/4 options. For CIFS and other network file systems go to the file systems menu, select "Network File Systems", then configure CIFS, NFS, etc. as needed.
Thanks! I will play around with this.
roebeet said:
Thanks! I will play around with this.
Click to expand...
Click to collapse
Here is an updated version that I made starting from extracting the .config from the kernel in the boot.img in your tnt_lite_v3.00 update file. This just has EXT4 and CIFS added, so this may be a better starting point. Good luck and thanks for all of your work.
Be careful with enabling extra params which the supplied wifi module (from tapntap) is dependant on, as if things mismatch (headers; they will), the module wont load.
I am working towards breaking out this dependancy so we can be completly free.
Like vpn, I found out the hard way
If you look in arch/arm/configs you will see some files called tegra-harmony-defconfig or something like that. Its part of the patch file. if you run make tegra-harmony-defconfig, it will put all the "default" values into a .config for you. Then you can run make menuconfig (or whatever make config you like)

[Q] how to compile libaudio.so module? [CM7]

Original post: forum.cyanogenmod.com/topic/41583-hello-hello-bug-cant-hear-caller/
It seems like I'm suffering from this bug
code.google.com/p/cyanogenmod/issues/detail?id=4681
although I found the commit
github.com/CyanogenMod/android_device_samsung_crespo/commit/49cb776c1a5d056c345d90465f8006ef23d947b0#libaudio/AudioHardware.cpp
which (hopefully) fixed this bug but the commit only merged into ics branch not gb branch (CM7).
I got cygwin and NDK set up, but I have no idea how exactly to compile libaudio.so module.
After selecting your target, enter:
Code:
make audio.primary.herring
from cygwin?
the target is the libaudio folder, right?
does it involve NDK?
I also need library file (libhardware_legacy.so, libcutils.so, libmedia.so, etc) isn't it? I have the files, where do I put those files?
gleenfield97 said:
from cygwin?
the target is the libaudio folder, right?
does it involve NDK?
I also need library file (libhardware_legacy.so, libcutils.so, libmedia.so, etc) isn't it? I have the files, where do I put those files?
Click to expand...
Click to collapse
Your target should be listed in the set of options before you begin building. In this case, it's crespo or crespo4g for the Nexus S or Nexus S 4G, respectively. If you need to build other modules, locate the Android.mk file for the module you want to build and locate the value under LOCAL_MODULE. The destination for the file(s) in question will be printed after the build is completed. What happens from there depends on what you intend to do with it.
Getting familiar with the build system will make things much more easier and faster for you in the long run.
Thanks for your guide.
Unfortunately, I still can't fully understand so I end up using the script provided by nicandris
forum.xda-developers.com/showthread.php?t=969266
instead of building the module, I build the whole rom.

building a JAR with internal JAR dependencies

Hope you guys can give me some much sought advice.
I've been attempting to build a JAR file that packages it's own JARs as internal class dependencies, but without exposing those inner JAR dependencies to the outside world. I'm guessing this needs to happen, otherwise the link process for building an Eclipse Android project would fail if not.
So my problem is such:
If I have an internal dependency on say dom4j-1.6.1.jar, I don't want to prevent someone from being able to add my JAR to an Eclipse Android project and including their own dom4j package dependency (possibly a different version). If the internal JAR dependency is exposed they will experience a duplicate resource conflict when attempting to build their project.
e.g. java.lang.IllegalArgumentException: already added: Lcom/google/gson/DefaultTypeAdapters$ByteTypeAdapter;
Here is what I tried to date:
So I have a regular Android project in Eclipse which adds in my packaged JAR as an dependency.
I refered to the Oracle docs, however there is a footnote about the inclusion of JAR files within JARs.
Note: The Class-Path header points to classes or JAR files on the local network, not JAR files within the JAR file or classes accessible over internet protocols. To load classes in JAR files within a JAR file into the class path, you must write custom code to load those classes. For example, if MyJar.jar contains another JAR file called MyUtils.jar, you cannot use the Class-Path header in MyJar.jar's manifest to load classes in MyUtils.jar into the class path.
So I decided to try the Fat Jar Eclipse Plug-In from SourceForge.
It's an Eclipse Plug-In for deploying a project into one "fat" executable jar file containing all referenced libraries. References are taken from the project settings, so no manual configuration is necessary.
I did manage to execute my build using this method, however did have to manually hack the packaged JAR file to remove the reference to the annotations package which was causing a conflict with my Android test project by being referenced twice.
So now I am left with a project that builds and executes, but exposes those inner JAR dependency packages to my Android project.
I would appreciate any advice you guys can provide. I hope my explanation is clear enough.

How to compile one Java library only from /external directory in AOSP

I am doing some modifications to okhttp library in AOSP. The library exists in this location in in AOSP: /external/okhttp
I know that the library will become a jar file okhttp.jar after I compile the AOSP. but compiling the whole AOSP take a long time. So I am wondering if there is an easy way to compile the okhttp library alone and get the jar file.

Categories

Resources