This article was reproduced from: http://blog.csdn.net/tangdexi112/article/details/17579021
When we are doing audio debugging, we need to use Tinymix, Tinyplay, Tinycap and other commands to debug codec, then in Android, these commands do not exist, then we need to use these commands, we only have to transplant. How to transplant it??? 1) Start, we directly follow the Linux steps to transplant, write makefile use ARM-LINUX-GCC compiled source code, after the completion of the compilation, through the ADB push these files to/system/bin, run Tinymix, Found unable to execute, Baidu found that the traditional Linux execution Program library is glibc, and in the Android system is bionic, library is not the same, so can not run.  2) What should we do then?? We look at the source code, found in the external/tinyalsa/folder already exists Tinyalsa source, view android.mk:local_path:= $ (call My-dir) include $ (clear_ VARS) local_c_includes:= external/tinyalsa/includelocal_src_files:= mixer.c pcm.clocal_module: = libtinyalsaLOCAL_ shared_libraries:= libcutils Libutilslocal_module_tags: = optionallocal_prelink_module: = False include $ (BUILD_ Shared_library) include $ (clear_vars) local_c_includes:= external/tinyalsa/includelocal_src_files:= Tinyplay.clocal_module: = tinyplaylocal_shared_libraries:= libcutils libutils LibtinyalsaLOCAL_MODULE_TAGS: = Optional include $ (build_executable) include $ (clear_vars) local_c_includes:= external/tinyalsa/ includelocal_src_files:=Tinycap.clocal_module: = tinycaplocal_shared_libraries:= libcutils libutils LibtinyalsaLOCAL_MODULE_TAGS: = Optional include $ (build_executable) include $ (clear_vars) local_c_includes:= external/tinyalsa/ includelocal_src_files:= tinymix.clocal_module: = tinymixlocal_shared_libraries:= libcutils libutils Libtinyalsalocal_module_tags: = Optional include $ (build_executable) All we need is a modular compilation of these commands, The libtinyalsa.so dynamic library is generated by the MIXER.C PCM.C, regardless of the three command files.  3) Modular Compilation: First execute:source build/envsetup.sh in the source code----> This step will configure the relevant environment variables into external/tinyalsa/, In the terminal input command mm can be compiled. Note: If you are prompted to find a Java environment, add the Java environment variable to the system, export to the ~/.BASHRC file, and then source ~/.BASHRC. Other files, dynamic libraries, commands can be compiled or migrated this way.
Use the Tinyalsa command to "Go" in Android system debugging