├── aospinsight ├── packages │ └── apps │ │ ├── .idea │ │ ├── .name │ │ ├── .gitignore │ │ ├── compiler.xml │ │ ├── misc.xml │ │ └── gradle.xml │ │ ├── DummyApplication │ │ ├── .idea │ │ │ ├── .name │ │ │ ├── .gitignore │ │ │ ├── compiler.xml │ │ │ ├── misc.xml │ │ │ └── gradle.xml │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ ├── dimens.xml │ │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ │ └── themes.xml │ │ │ │ │ │ ├── values-land │ │ │ │ │ │ │ └── dimens.xml │ │ │ │ │ │ ├── values-w600dp │ │ │ │ │ │ │ └── dimens.xml │ │ │ │ │ │ ├── values-w1240dp │ │ │ │ │ │ │ └── dimens.xml │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ ├── pacifier.png │ │ │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ │ │ ├── xml │ │ │ │ │ │ │ ├── backup_rules.xml │ │ │ │ │ │ │ └── data_extraction_rules.xml │ │ │ │ │ │ ├── values-night │ │ │ │ │ │ │ └── themes.xml │ │ │ │ │ │ ├── layout │ │ │ │ │ │ │ └── activity_main.xml │ │ │ │ │ │ ├── navigation │ │ │ │ │ │ │ └── nav_graph.xml │ │ │ │ │ │ └── drawable-v24 │ │ │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ │ ├── Android.bp │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── aospinsight │ │ │ │ │ │ │ └── dummyaidlapp │ │ │ │ │ │ │ ├── DummyCallbackImpl.kt │ │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── test │ │ │ │ │ └── java │ │ │ │ │ │ └── com │ │ │ │ │ │ └── aospinsight │ │ │ │ │ │ └── dummyaidlapp │ │ │ │ │ │ └── ExampleUnitTest.kt │ │ │ │ └── androidTest │ │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── aospinsight │ │ │ │ │ └── dummyaidlapp │ │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ ├── .gitignore │ │ │ ├── proguard-rules.pro │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── build.gradle │ │ ├── settings.gradle │ │ ├── gradle.properties │ │ ├── gradlew.bat │ │ └── gradlew │ │ └── .gitignore ├── device │ └── devboard │ │ ├── sepolicy │ │ ├── daemon │ │ │ ├── file_contexts │ │ │ └── dummy.te │ │ ├── service │ │ │ └── service_contexts │ │ ├── app │ │ │ ├── seapp_contexts │ │ │ └── dummyapp_service.te │ │ ├── vendor │ │ │ └── vndservice.te │ │ └── hal │ │ │ └── hal_dummy.te │ │ ├── AndroidProducts.mk │ │ ├── permissions │ │ ├── Android.bp │ │ └── privapp-permissions-recop.xml │ │ ├── aospinsight_car.mk │ │ └── BoardConfig.mk └── hardware │ ├── interfaces │ └── dummy_device │ │ └── aidl │ │ ├── aidl_api │ │ └── aospinsight.hardware.dummy_device │ │ │ ├── 1 │ │ │ ├── .hash │ │ │ └── aospinsight │ │ │ │ └── hardware │ │ │ │ └── dummy_device │ │ │ │ ├── DummyPacket.aidl │ │ │ │ ├── IDummyCallback.aidl │ │ │ │ └── IDummy.aidl │ │ │ └── current │ │ │ └── aospinsight │ │ │ └── hardware │ │ │ └── dummy_device │ │ │ ├── DummyPacket.aidl │ │ │ ├── IDummyCallback.aidl │ │ │ └── IDummy.aidl │ │ ├── aospinsight │ │ └── hardware │ │ │ └── dummy_device │ │ │ ├── DummyPacket.aidl │ │ │ ├── IDummyCallback.aidl │ │ │ └── IDummy.aidl │ │ └── Android.bp │ └── dummy_service │ ├── init │ └── dummy-default.rc │ ├── manifest │ ├── dummy_device_manifest.xml │ └── dummy_framework_compatibility_matrix.xml │ ├── src │ ├── dummy_service_main.cpp │ ├── include │ │ └── DummyImpl.h │ └── DummyImpl.cpp │ └── Android.bp ├── screenshots ├── AppIsRunning.png ├── AppInEmulator.png ├── LogcatAfterRunningApp.png └── LogcatBeforeRunningApp.png ├── .vscode └── settings.json ├── class_diagram.iuml ├── github └── workflows │ └── github-actions.yml ├── sequence.iuml ├── .gitignore ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── README.md └── LICENSE /aospinsight/packages/apps/.idea/.name: -------------------------------------------------------------------------------- 1 | DummyAidlApp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/.idea/.name: -------------------------------------------------------------------------------- 1 | DummyAidlApp -------------------------------------------------------------------------------- /aospinsight/packages/apps/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /screenshots/AppIsRunning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/screenshots/AppIsRunning.png -------------------------------------------------------------------------------- /screenshots/AppInEmulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/screenshots/AppInEmulator.png -------------------------------------------------------------------------------- /screenshots/LogcatAfterRunningApp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/screenshots/LogcatAfterRunningApp.png -------------------------------------------------------------------------------- /screenshots/LogcatBeforeRunningApp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/screenshots/LogcatBeforeRunningApp.png -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/daemon/file_contexts: -------------------------------------------------------------------------------- 1 | # HAL dummy_service 2 | /vendor/bin/hw/dummy-service u:object_r:dummy_exec:s0 3 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/1/.hash: -------------------------------------------------------------------------------- 1 | 2b11ca17996cfe44aaf8c7f58c618f443d7e389b 2 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/service/service_contexts: -------------------------------------------------------------------------------- 1 | aospinsight.hardware.dummy_device.IDummy/default u:object_r:dummy_server_service:s0 2 | 3 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 48dp 3 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values-w600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 48dp 3 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values-w1240dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 200dp 3 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/app/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=_app seinfo=platform name=com.aospinsight.dummyaidlapp domain=dummyapp_service type=app_data_file levelFrom=user 2 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | COMMON_LUNCH_CHOICES += \ 2 | aospinsight_car-userdebug \ 3 | 4 | 5 | PRODUCT_MAKEFILES := \ 6 | $(LOCAL_DIR)/aospinsight_car.mk \ 7 | 8 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/permissions/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | prebuilt_etc { 3 | name: "privapp-permissions-recop", 4 | src: "privapp-permissions-recop.xml", 5 | filename_from_src: true, 6 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "mutex": "cpp", 4 | "vndservice_contexts": "cpp", 5 | "thread": "cpp" 6 | "vndservice_contexts": "cpp" 7 | } 8 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/drawable/pacifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/drawable/pacifier.png -------------------------------------------------------------------------------- /aospinsight/packages/apps/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aospinsight/hardware/dummy_device/DummyPacket.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | parcelable DummyPacket{ 5 | int id; 6 | String msg; 7 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /class_diagram.iuml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | BnDummy <|--- DummyImpl 4 | DummyImpl ---|> "main" 5 | 6 | MainActivity ---|> DummyCallbackImpl 7 | DummyCallbackImpl ---|> IDummyCallback 8 | DummyCallbackImpl ---|> IDummy 9 | 10 | @enduml 11 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heydarchi/AIDL-HAL-Service/HEAD/aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /aospinsight/hardware/dummy_service/init/dummy-default.rc: -------------------------------------------------------------------------------- 1 | service dummy-service /vendor/bin/hw/dummy-service 2 | interface aidl aospinsight.hardware.dummy_device.IDummy/default 3 | class hal 4 | user nobody 5 | group nobody 6 | shutdown critical -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/1/aospinsight/hardware/dummy_device/DummyPacket.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | parcelable DummyPacket{ 5 | int id; 6 | String msg; 7 | } -------------------------------------------------------------------------------- /aospinsight/device/devboard/permissions/privapp-permissions-recop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/vendor/vndservice.te: -------------------------------------------------------------------------------- 1 | type dummy_server_service, hal_service_type, protected_service, service_manager_type; 2 | 3 | allow dummy dummy_server_service:service_manager add; 4 | allow dummyapp_service dummy_server_service:service_manager find; 5 | 6 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/current/aospinsight/hardware/dummy_device/DummyPacket.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | parcelable DummyPacket{ 5 | int id; 6 | String msg; 7 | } -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aospinsight/hardware/dummy_device/IDummyCallback.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | interface IDummyCallback{ 5 | void onGetPacket(in aospinsight.hardware.dummy_device.DummyPacket packet); 6 | } -------------------------------------------------------------------------------- /github/workflows/github-actions.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | embed-puml-markdown: 3 | - name: Check out the repo 4 | uses: actions/checkout@v2 5 | with: 6 | fetch-depth: 0 7 | - name: Embed PlantUML inside Markdown 8 | uses: alessandro-marcantoni/puml-markdown@v0.1.1 9 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/1/aospinsight/hardware/dummy_device/IDummyCallback.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | interface IDummyCallback{ 5 | void onGetPacket(in aospinsight.hardware.dummy_device.DummyPacket packet); 6 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Nov 27 18:35:46 CET 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/current/aospinsight/hardware/dummy_device/IDummyCallback.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | interface IDummyCallback{ 5 | void onGetPacket(in aospinsight.hardware.dummy_device.DummyPacket packet); 6 | } -------------------------------------------------------------------------------- /sequence.iuml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | "dummy-service" -> "Service Manager" : Add new service 4 | 5 | "Service Manager" <- "DummyApp" : Get a binder from the service 6 | 7 | "DummyApp" -> "dummy-service" : Register the callback 8 | "dummy-service" -> "DummyApp" : Invoke a remote method from the registered callback 9 | 10 | @enduml 11 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aospinsight/hardware/dummy_device/IDummy.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | interface IDummy{ 5 | void getPacketByCallback(in aospinsight.hardware.dummy_device.IDummyCallback callback); 6 | 7 | void getPacket(out aospinsight.hardware.dummy_device.DummyPacket packet); 8 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | id 'com.android.application' version '7.3.1' apply false 4 | id 'com.android.library' version '7.3.1' apply false 5 | id 'org.jetbrains.kotlin.android' version '1.7.20' apply false 6 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /aospinsight/hardware/dummy_service/manifest/dummy_device_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | aospinsight.hardware.dummy_device 4 | 1 5 | 6 | IDummy 7 | default 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/1/aospinsight/hardware/dummy_device/IDummy.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | interface IDummy{ 5 | void getPacketByCallback(in aospinsight.hardware.dummy_device.IDummyCallback callback); 6 | 7 | void getPacket(out aospinsight.hardware.dummy_device.DummyPacket packet); 8 | } -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/aidl_api/aospinsight.hardware.dummy_device/current/aospinsight/hardware/dummy_device/IDummy.aidl: -------------------------------------------------------------------------------- 1 | package aospinsight.hardware.dummy_device; 2 | 3 | @VintfStability 4 | interface IDummy{ 5 | void getPacketByCallback(in aospinsight.hardware.dummy_device.IDummyCallback callback); 6 | 7 | void getPacket(out aospinsight.hardware.dummy_device.DummyPacket packet); 8 | } -------------------------------------------------------------------------------- /aospinsight/hardware/interfaces/dummy_device/aidl/Android.bp: -------------------------------------------------------------------------------- 1 | aidl_interface { 2 | name: "aospinsight.hardware.dummy_device", 3 | srcs: ["aospinsight/hardware/dummy_device/*.aidl"], 4 | stability: "vintf", 5 | vendor_available: true, 6 | backend: { 7 | java: { 8 | platform_apis: true, 9 | }, 10 | }, 11 | owner: "AospInsight", 12 | versions: ["1"], 13 | } 14 | -------------------------------------------------------------------------------- /aospinsight/hardware/dummy_service/manifest/dummy_framework_compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | aospinsight.hardware.dummy_device 4 | 1 5 | 6 | IDummy 7 | default 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | rootProject.name = "DummyAidlApp" 16 | include ':app' 17 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/hal/hal_dummy.te: -------------------------------------------------------------------------------- 1 | #define dummy hal 2 | type hal_dummy_hwservice, hwservice_manager_type; 3 | 4 | hal_attribute(dummy) 5 | 6 | binder_call(hal_dummy_client, hal_dummy_server) 7 | binder_call(hal_dummy_server, hal_dummy_client) 8 | 9 | add_hwservice(hal_dummy_server, hal_dummy_hwservice) 10 | allow system_app hal_dummy_hwservice:hwservice_manager find; 11 | 12 | allow priv_app hal_dummy_hwservice:hwservice_manager find; 13 | allow priv_app dummy:binder { call transfer }; 14 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/test/java/com/aospinsight/dummyaidlapp/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.aospinsight.dummyaidlapp 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/daemon/dummy.te: -------------------------------------------------------------------------------- 1 | # dummy HAL service daemon 2 | type dummy, domain; 3 | type dummy_exec, exec_type, file_type, vendor_file_type; 4 | typeattribute dummy hal_automotive_socket_exemption; 5 | 6 | init_daemon_domain(dummy) 7 | 8 | # Basic networking permissions 9 | net_domain(dummy) 10 | 11 | #dummy SOME/IP server binder interface 12 | vndbinder_use(dummy); 13 | 14 | # Find and communicate with hwservicemanager 15 | binder_call(dummy, hwservicemanager) 16 | 17 | hal_server_domain(dummy, hal_dummy) 18 | 19 | allow dummy servicemanager:binder { call transfer }; -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle files 2 | .gradle/ 3 | build/ 4 | 5 | # Local configuration file (sdk path, etc) 6 | local.properties 7 | 8 | # Log/OS Files 9 | *.log 10 | 11 | # Android Studio generated files and folders 12 | captures/ 13 | .externalNativeBuild/ 14 | .cxx/ 15 | *.apk 16 | output.json 17 | 18 | # IntelliJ 19 | *.iml 20 | .idea/ 21 | misc.xml 22 | deploymentTargetDropDown.xml 23 | render.experimental.xml 24 | 25 | # Keystore files 26 | *.jks 27 | *.keystore 28 | 29 | # Google Services (e.g. APIs or Firebase) 30 | google-services.json 31 | 32 | # Android Profiling 33 | *.hprof -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DummyAidlApp 3 | DummyMainActivity 4 | 5 | First Fragment 6 | Second Fragment 7 | Next 8 | Previous 9 | 10 | Hello first fragment 11 | Hello second fragment. Arg: %1$s 12 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/aospinsight_car.mk: -------------------------------------------------------------------------------- 1 | PRODUCT_PACKAGE_OVERLAYS := vendor/recop/device/recop_emulator/common/overlay 2 | 3 | $(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) 4 | $(call inherit-product, $(SRC_TARGET_DIR)/product/sdk_x86_64.mk) 5 | 6 | include vendor/aospinsight/device/devboard//BoardConfig.mk 7 | 8 | 9 | EMULATOR_VENDOR_NO_SOUND := true 10 | PRODUCT_NAME := aosp_car_x86_64 11 | PRODUCT_DEVICE := generic_car_x86_64 12 | PRODUCT_BRAND := AOSPInsight 13 | PRODUCT_MODEL := AOSPInsight Car on x86_64 emulator 14 | 15 | EMULATOR_VENDOR_NO_SENSORS := true 16 | 17 | PRODUCT_PACKAGES += \ 18 | dummy-service \ 19 | DummyApp \ 20 | 21 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | android_app { 3 | name: "DummyApp", 4 | certificate: "platform", 5 | // privileged: true, 6 | srcs: ["java/**/*.kt"], 7 | resource_dirs: [ 8 | "res", 9 | ], 10 | platform_apis: true, 11 | static_libs: [ 12 | "androidx.core_core-ktx", 13 | "androidx.appcompat_appcompat", 14 | "com.google.android.material_material", 15 | "androidx-constraintlayout_constraintlayout", 16 | "androidx.navigation_navigation-fragment-ktx", 17 | "androidx.navigation_navigation-ui-ktx", 18 | "aospinsight.hardware.dummy_device-V1-java", 19 | ], 20 | required: ["privapp-permissions-recop"], 21 | } 22 | -------------------------------------------------------------------------------- /aospinsight/device/devboard/BoardConfig.mk: -------------------------------------------------------------------------------- 1 | 2 | BOARD_VENDOR_SEPOLICY_DIRS += vendor/aospinsight/device/devboard/sepolicy/vendor 3 | BOARD_VENDOR_SEPOLICY_DIRS += vendor/aospinsight/device/devboard/sepolicy/hal 4 | BOARD_VENDOR_SEPOLICY_DIRS += vendor/aospinsight/device/devboard/sepolicy/service 5 | BOARD_VENDOR_SEPOLICY_DIRS += vendor/aospinsight/device/devboard/sepolicy/daemon 6 | BOARD_VENDOR_SEPOLICY_DIRS += vendor/aospinsight/device/devboard/sepolicy/app 7 | 8 | 9 | ########## Device Manifest & Framework Compatibility Matrix Manifest ########## 10 | 11 | VENDOR_PATH = vendor/aospinsight 12 | 13 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \ 14 | $(VENDOR_PATH)/hardware/dummy_service/manifest/dummy_framework_compatibility_matrix.xml \ 15 | -------------------------------------------------------------------------------- /aospinsight/hardware/dummy_service/src/dummy_service_main.cpp: -------------------------------------------------------------------------------- 1 | #include "DummyImpl.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using aidl::aospinsight::hardware::dummy_device::DummyImpl; 8 | 9 | int main() { 10 | LOG(INFO) << "Dummy daemon started!"; 11 | 12 | ABinderProcess_setThreadPoolMaxThreadCount(0); 13 | std::shared_ptr dummy = ndk::SharedRefBase::make(); 14 | 15 | const std::string instance = std::string() + DummyImpl::descriptor + "/default"; 16 | binder_status_t status = AServiceManager_addService(dummy->asBinder().get(), instance.c_str()); 17 | CHECK_EQ(status, STATUS_OK); 18 | 19 | ABinderProcess_joinThreadPool(); 20 | return EXIT_FAILURE; // should not reached 21 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/androidTest/java/com/aospinsight/dummyaidlapp/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.aospinsight.dummyaidlapp 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.aospinsight.dummyaidlapp", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /aospinsight/device/devboard/sepolicy/app/dummyapp_service.te: -------------------------------------------------------------------------------- 1 | # Rules for the aosp layer app/service dummyapp_service 2 | type dummyapp_service, domain; 3 | app_domain(dummyapp_service) 4 | 5 | allow dummyapp_service activity_service:service_manager find; 6 | allow dummyapp_service netstats_service:service_manager find; 7 | allow dummyapp_service surfaceflinger_service:service_manager find; 8 | allow dummyapp_service audio_service:service_manager find; 9 | allow dummyapp_service content_capture_service:service_manager find; 10 | allow dummyapp_service game_service:service_manager find; 11 | allow dummyapp_service gpu_service:service_manager find; 12 | allow dummyapp_service hint_service:service_manager find; 13 | 14 | # Find and communicate with HAL components 15 | hal_client_domain(dummyapp_service, hal_dummy) 16 | 17 | net_domain(dummyapp_service) 18 | 19 | allow dummyapp_service radio_service:service_manager find; 20 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /aospinsight/hardware/dummy_service/src/include/DummyImpl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace aidl { 7 | namespace aospinsight { 8 | namespace hardware { 9 | namespace dummy_device { 10 | 11 | 12 | class DummyImpl : public BnDummy { 13 | virtual ndk::ScopedAStatus getPacketByCallback(const std::shared_ptr& cb) override; 14 | virtual ndk::ScopedAStatus getPacket(DummyPacket* dummyPacket) override; 15 | 16 | protected: 17 | std::shared_ptr dummyCallback = nullptr; 18 | std::mutex dummyMutex; 19 | 20 | ::ndk::ScopedAIBinder_DeathRecipient death_recipient_; 21 | static void binderDiedCallbackAidl(void* cookie_ptr); 22 | 23 | void onPacketEvent(DummyPacket* dummyPacket); 24 | }; 25 | 26 | } // namespace dummy_device 27 | } // namespace hardware 28 | } // namespace aospinsight 29 | } // namespace aidl 30 | -------------------------------------------------------------------------------- /aospinsight/hardware/dummy_service/Android.bp: -------------------------------------------------------------------------------- 1 | cc_defaults{ 2 | name: "aospinsight.hardware.dummy-defaults", 3 | shared_libs: [ 4 | "aospinsight.hardware.dummy_device-V1-ndk", 5 | "libbase", 6 | "libbinder_ndk", 7 | ], 8 | vendor: true, 9 | } 10 | 11 | cc_library_static { 12 | name: "aospinsight.hardware.dummy-lib", 13 | defaults: ["aospinsight.hardware.dummy-defaults"], 14 | srcs: [ 15 | "src/*", 16 | ], 17 | export_include_dirs: [ 18 | "src/include", 19 | ], 20 | } 21 | 22 | cc_binary { 23 | name: "dummy-service", 24 | defaults: ["aospinsight.hardware.dummy-defaults"], 25 | relative_install_path: "hw", 26 | init_rc: ["init/dummy-default.rc"], 27 | vintf_fragments: ["manifest/dummy_device_manifest.xml"], 28 | vendor: true, 29 | srcs: [ 30 | "src/dummy_service_main.cpp", 31 | ], 32 | static_libs: ["aospinsight.hardware.dummy-lib"] 33 | } -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/java/com/aospinsight/dummyaidlapp/DummyCallbackImpl.kt: -------------------------------------------------------------------------------- 1 | package com.aospinsight.dummyaidlapp 2 | 3 | import aospinsight.hardware.dummy_device.IDummyCallback 4 | import aospinsight.hardware.dummy_device.DummyPacket 5 | import android.util.Log 6 | 7 | class DummyCallbackImpl : IDummyCallback.Stub() { 8 | 9 | override fun onGetPacket(dummyPacket : DummyPacket){ 10 | Log.d(LOG, "A new DummyPacket received in onGetPacket !!!") 11 | Log.d(LOG, " id:" + dummyPacket.id) 12 | Log.d(LOG, " msg:" + dummyPacket.msg) 13 | 14 | } 15 | 16 | override fun getInterfaceVersion(): Int { 17 | return VESION 18 | } 19 | 20 | override fun getInterfaceHash(): String { 21 | return HASH 22 | } 23 | 24 | 25 | companion object{ 26 | val LOG = "DummyCallbackImpl" 27 | val HASH = "2b11ca17996cfe44aaf8c7f58c618f443d7e389b" 28 | val VESION = 1 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/navigation/nav_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 17 | 18 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /aospinsight/packages/apps/DummyApplication/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 21 | 22 |