First, download the I2c-tools tool:
Recently in the Transplant I2c-tools tool,: Https://i2c.wiki.kernel.org/index.php/I2C_Tools; Baidu to the git address in the wiki;
1 git clone git://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git-b i2c-tools-3.1
Download git to the external directory, write the ANDROID.MK, and package it system.img:
ANDROID.MK content is as follows:
1Local_path:= $ (Call my-dir)2 3 include $ (clear_vars)4 5Local_module_tags: =Optional6Local_c_includes + = $ (local_path) $ (Local_path)/$ (kernel_dir)/include7Local_src_files: = TOOLS/I2CBUSSES.C tools/util.c8Local_module: = i2c-Tools9 include $ (build_static_library)Ten One include $ (clear_vars) A -Local_module_tags: =Optional -local_src_files:=tools/i2cdetect.c thelocal_module:=I2cdetect -Local_cppflags + =-dandroid -local_shared_libraries:=libc -Local_static_libraries: = i2c-Tools +Local_c_includes + = $ (local_path) $ (Local_path)/$ (kernel_dir)/include - include $ (build_executable) + A include $ (clear_vars) at -Local_module_tags: =Optional -local_src_files:=tools/i2cget.c -local_module:=I2cget -Local_cppflags + =-dandroid -local_shared_libraries:=libc inLocal_static_libraries: = i2c-Tools -Local_c_includes + = $ (local_path) $ (Local_path)/$ (kernel_dir)/include to include $ (build_executable) + - include $ (clear_vars) the *Local_module_tags: =Optional $local_src_files:=tools/i2cset.cPanax Notoginsenglocal_module:=I2cset -Local_cppflags + =-dandroid thelocal_shared_libraries:=libc +Local_static_libraries: = i2c-Tools ALocal_c_includes + = $ (local_path) $ (Local_path)/$ (kernel_dir)/include the include $ (build_executable) + - include $ (clear_vars) $ $Local_module_tags: =Optional -local_src_files:=tools/i2cdump.c -local_module:=I2cdump theLocal_cppflags + =-dandroid -local_shared_libraries:=libcWuyiLocal_static_libraries: = i2c-Tools theLocal_c_includes + = $ (local_path) $ (Local_path)/$ (kernel_dir)/include -Include $ (build_executable)
The MM command then compiles the current directory, which is generated to:
Make Snod compiled into the System/bin directory on the board;
Android under the I2c-tools use as shown in the link, do not mention;
http://blog.csdn.net/hui872370036/article/details/50379036
Android I2c-tools porting