I'm trying to learn to write Hardware Abstraction Layer (HAL). Here's the path I've taken so far, please correct me if I'm off in any step.
- Downloaded AOSP and built it successfully (86%)
- Located Vehicle Hal Support Library
- Located android.hardware.automotive.vehicle C++ code.
Things I've attempted after that the steps below without succeeding to get those above classes recognized.
- Import android.hardware.automotive.vehicle classes in Android Studio for a typical Android App that targets 29 Api Level.
- Adding meta tag of android.car app
- Copy/Pasting all source code under AOSP /packages/services/Car/
- Partially contemplated adding android.hardware.automotive.vehicle@2.0.so Library and trying to access it through JNI (Not so sure about this one).
Please orient me, I see some repositories on github not doing anything special and somehow they're able to import the package in a java class like this.
import android.hardware.automotive.vehicle.V2_0.VehicleHwKeyInputAction;
import android.hardware.automotive.vehicle.V2_0.VehiclePropValue;
import android.hardware.automotive.vehicle.V2_0.VehicleProperty;
import android.hardware.automotive.vehicle.V2_0.VehiclePropertyAccess;
how on earth do they get access to those classes?
Thanks