tiny210 hal 4 Android系统中编写JNI方法在应用程序框架层提供Java接口访问硬件

时间:2023-02-05 04:40:29
refer to  在Android系统中编写JNI方法在应用程序框架层提供Java接口访问硬件

在framework中添加jni接口:
frameworks/base/services/jni/com_android_server_HelloService.cpp
输出
out/target/product/smdkv210/system/lib/libandroid_servers.so

com_android_server_HelloService.cpp负责对java层提供一个调用接口,在调用接口里面其实是调用了hal层so的各个函数

在tiny210的/system/lib/下已经存在很多jni so
/ # ls system/lib/
libwebcore.so
hw
libril.so
libhdmiservice.so
libskiagl.so
libsystem_server.so
libstlport.so
libwnndict.so
libttspico.so
libfimc.so
libsoundpool.so
libusb.so
libcamera_client.so
libOMX.SEC.WMV.Decoder.so
libstagefrighthw.so
libsensorservice.so
liblog.so
libctest.so
libwifi.so
libnativehelper.so
libWnnJpnDic.so
libOMX.SEC.M4V.Decoder.so
libmedia.so
libcutils.so
libterm.so
libemoji.so
libcec.so
libstagefright_omx.so
libFFTEm.so
libexif.so
libsonivox.so
libaudiopolicy.so
libdrm1.so
libicuuc.so
libcamera.so
libmedia_jni.so
libsqlite.so
libstagefright_amrnb_common.so
soundfx
libdvm.so
libnetlink.so
libstagefright_foundation.so
libhdmiservice_jni.so
libacc.so
libsurfaceflinger.so
libbluetoothd.so
libSR_AudioIn.so
libui.so
libandroid.so
libandroid_runtime.so
libbinder.so
libbluetooth.so
libjnigraphics.so
libedid.so
libmediaplayerservice.so
libSEC_OMX_Core.so
libs3cjpeg.so
libsurfaceflinger_client.so
libeffects.so
libcamera-mini210.so
libnfc_ndef.so
libext4_utils.so
libdbus.so
libcrypto.so
libc_malloc_debug_leak.so
libETC1.so
libcameraservice.so
libskia.so
libexpat.so
libssl.so
libstagefright_avc_common.so
libutils.so
libdiskconfig.so
libGLESv2.so
libm.so
libpagemap.so
libfriendlyarm-hardware.so
invoke_mock_media_player.so
libhardware.so
egl
libWnnEngDic.so
libaudioflinger.so
librs_jni.so
libGLESv1_CM.so
libbluedroid.so
libc.so
libthread_db.so
libcamera-usb.so
libOMX.SEC.M4V.Encoder.so
libjni_latinime.so
libRS.so
libusb3gmodem-ril.so
libttssynthproxy.so
libjpeg.so
libreference-cdma-sms.so
libstagefright.so
librtp_jni.so
libaudio.so
libOMX.SEC.AVC.Encoder.so
liba2dp.so
libpixelflinger.so
libicui18n.so
libOMX.SEC.AVC.Decoder.so
libsrec_jni.so
libstagefright_enc_common.so
libandroid_servers.so
libaudioeffect_jni.so
libhardware_legacy.so
libddc.so
libOpenSLES.so
libhdmi.so
libstdc++.so
libsqlite_jni.so
libz.so
libc_malloc_debug_qemu.so
libSEC_Resourcemanager.so
libgui.so
libEGL.so
libstagefright_color_conversion.so
bluez-plugin
libdl.so
libvorbisidec.so
libdrm1_jni.so
modules
libnetutils.so
libwpa_client.so
libjni_pinyinime.so
libreference-ril.so
libiprouteutil.so
libsysutils.so
libmock_ril.so
/ # ls system/lib/hw/sensors.mini210.sogralloc.default.sogps.goldfish.sooverlay.s5pc110.solights.s5pc110.socopybit.s5pc110.solights.mini210.sosensors.goldfish.sogps.mini210.so