Use the Tinyalsa command "Go" in Android system debugging

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.