- 12-11-2010, 01:48 PM #1
Need help building a working libaudio.so library
I was able to compile a working kernel using the instructions I found on this forum. However, i'm having trouble building the files in the hardware folder. In particular, i'm trying to do 'mmm -B hardware/msm7k/libaudio' to get a custom libaudio.so built. Are there any instructions out there?
12/13 UPDATE:
I was able to get it built and working. This is roughly what I did:
Part 1, Get the source
*Don't* run makeCode:mkdir ~/android-src cd android-src repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.1_r1 repo sync
Part 2, get static library libaudiointerface.a builtCode:mkdir ~/cliq-src cd ~/cliq-src Download all of the Cliq 2.1 source code. Uncompress the archives and run the unpack scripts cp -r * ~/android-src
Pull the following files from your phone
and put them inCode:/system/lib/liba2dp.so /system/lib/libbinder.so /system/lib/libhardware_legacy.so /system/lib/liblog.so /system/lib/libmedia.so
Add these near the top of ~/android-src/frameworks/base/libs/audioflinger/Android.mkCode:~/android-src/out/target/product/generic/obj/lib
Code:BOARD_HAVE_BLUETOOTH := true BOARD_USES_GENERIC_AUDIO := false
Part 3, Build libaudioCode:. build/envsetup.sh mmm -B frameworks/base/libs/audioflinger
Add these near the top of ~/android-src/hardware/msm7k/libaudio/Android.mk
Put these defines near the top of ~/android-src/hardware/msm7k/libaudio/AudioHardware.h and AudioPolicyManager.h:Code:BOARD_HAVE_BLUETOOTH := true BOARD_USES_QCOM_7x_CHIPSET := true
Code:#define DEVICE_OUT_TTY 0x2000 #define MOT_FEATURE_PLATFORM_MSM7K 1
Code:mmm -B hardware/msm7k/libaudio
Last edited by firesnatch; 12-14-2010 at 08:25 AM.
-
The Following User Says Thank You to firesnatch For This Useful Post:
adlx (12-14-2010)
- 12-13-2010, 04:41 AM #2
See audioflinger source.
Change it to create your class, for exampleCode:// frameworks/base/libs/audioflinger/AudioHardwareInterface.cpp #ifdef GENERIC_AUDIO hw = new AudioHardwareGeneric(); #else // if running in emulation - use the emulator driver if (property_get("ro.kernel.qemu", value, 0)) { LOGD("Running in emulation - using generic audio driver"); hw = new AudioHardwareGeneric(); else { LOGV("Creating Vendor Specific AudioHardware"); hw = createAudioHardware(); #endif if (hw->initCheck() != NO_ERROR) { LOGW("Using stubbed audio hardware. No sound will be produced."); delete hw; hw = new AudioHardwareStub();
Code:hw = new AudioHardware(); if (hw->initCheck() != NO_ERROR) { LOGW("Using stubbed audio hardware. No sound will be produced."); delete hw; hw = new AudioHardwareStub();
-
- 12-14-2010, 04:48 AM #3
Very interesting thanks.
How do you find out the list of libs you need to pull out of the phone and copy to ~/android-src/out/target/product/generic/system/lib?
In the particular case of libaudio.so, I could list the phone's lib dependencies (Cliq with Motoblur build 2.1.5):
libaudio.so depends on all the following libs:
liblog.so
libcutils.so
libutils.so
libmedia.so
libhardware_legacy.so
libdl.so
liba2dp.so
libc.so
libstdc++.so
libm.so
but I can see that list isn't the same as the one you needed to pull from the phone. So there may be another explaination :-)
FYI build your own aosp for backflip 2.1 also has relevant information about the subject.Last edited by adlx; 12-14-2010 at 04:48 AM. Reason: Automerged Doublepost
Download my 1-click Recovery Flasher to flash a custom or stock recovery to your phone: Cliq, CliqXT, Backflip, ...
Like my work? Support me:
& visit my adlxmod site and follow me on Twitter
Tambien me puedes encontrar en Movilzona (Esp)
- 12-14-2010, 07:13 AM #4
[MENTION=3081367]adlx[/MENTION], Before copying the libs, I ran the mmm command to build the library and it would complain about a missing .so. I would then copy over that .so and repeat. The list I posted might be incomplete. I built libaudio.so a few days ago and was going off the date stamps on my files to see which ones I might have copied. Start with my list, and if there are others needed, copy them over one at a time and let me know so I can update my post.
- 12-14-2010, 07:27 AM #5
Thanks for the answer. Before seeing the answer I actually ran the commands (without copying the libs), and I got the 1rst error:
make: *** No rule to make target `out/target/product/generic/obj/lib/liba2dp.so', needed by `out/target/product/generic/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/LINKED/libaudioflinger.so'. Stop.
So, I can see that I am actually following your same steps LOL
Just a correction, in my case at least I had to copy the liba2dp.so to out/target/product/generic/obj/lib/, (obj, not system)
Actually yesterday I saw that same error when issuing a make command, and I didn't know how to solve it. Thanks!Last edited by adlx; 12-14-2010 at 07:32 AM.
Download my 1-click Recovery Flasher to flash a custom or stock recovery to your phone: Cliq, CliqXT, Backflip, ...
Like my work? Support me:
& visit my adlxmod site and follow me on Twitter
Tambien me puedes encontrar en Movilzona (Esp)
-
The Following User Says Thank You to adlx For This Useful Post:
firesnatch (12-14-2010)
- 12-14-2010, 08:24 AM #6
- 12-14-2010, 10:21 AM #7
for reference, its always possible to find official documentation from an authority.
Audio | Android Open Source
ILLUSTRATES and documents a recommended method for importing/creating your audiolib. disregard if you already have your answer.
the url provided appears to be part of a larger audio library documentation not available on android.com but appears to be available here;
Android - Porting GuideLast edited by bestialbub; 12-14-2010 at 10:21 AM. Reason: Automerged Doublepost
-
The Following User Says Thank You to bestialbub For This Useful Post:
adlx (12-14-2010)
- 01-09-2012, 08:45 PM #8
Itty Bitty Modder
- Join Date
- Jan 2012
- Posts
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Downloads
- 0
- Uploads
- 0
Nice to know this
Sent from my Droid using Tapatalk


LinkBack URL
About LinkBacks
Reply With Quote



