Where are hal_vehicle_client and hal_vehicle_server in hal_vehicle.te defined?

149 views
Skip to first unread message

icould icould

unread,
Jun 10, 2020, 11:26:35 AM6/10/20
to Android Building
I'm trying to understand how HAL is implemented and took hal_vehicle as an example.
in https://cs.android.com/android/platform/superproject/+/master:system/sepolicy/public/hal_vehicle.te;l=1?q=hal_vehicle.te&sq=

hal_vehicle_server and hal_vehicle_client are mentioned in the binder call. but where and who does introduce/define them, at what place and time?
I did a whole fulltext search but could not find a place where they are set.

I hope you can give me some advice.

thx

Wesolowski, Krzysztof

unread,
Jun 10, 2020, 12:10:43 PM6/10/20
to android-...@googlegroups.com
Those names are "macro concatenated" in AOSP code *.te files. You can start with te_macros and hal_attribute.


BR, K.

From: android-...@googlegroups.com <android-...@googlegroups.com> on behalf of icould icould <icou...@gmail.com>
Sent: Wednesday, June 10, 2020 14:35
To: Android Building <android-...@googlegroups.com>
Subject: [android-building] Where are hal_vehicle_client and hal_vehicle_server in hal_vehicle.te defined?
 
--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/72bc0fdf-373c-41cc-92b2-df5c40245ecfo%40googlegroups.com.

icould icould

unread,
Jun 11, 2020, 11:06:26 AM6/11/20
to Android Building
thank you for your answer. i'm very new into these sepolicy/selinux topics, so sry for following possibly dumb questions.

the background of my question is: following these tutorial https://devarea.com/android-hidl-and-project-treble/#.Xs49WRaxU5n I introduced an own hal interface. let's assume it is called xyz.
following the pattern of all other hal interfaces, every hal interface do have a .te file. like hal_vehicle.te, hal_power.te, ..

now i assume to get my xyz hal service running and recognized, i do have to add its own .te file.
i tried to copy paste the hal_vehicle.te content into hal_xyz.te (with: hal_xyz_server, hal_xyz_client), for hoping that would do it.
but while compile aosp, i get an error telling me it doesnt know hal_xyz_client and hal_xyz_server.

so, where do I start to let him know/introduce my own hal_xyz_client (label) and hal_xyz_server.

again, sry if my assumptions are dumb. I don't have any direction yet, to understand it.

thx


On Wednesday, June 10, 2020 at 6:10:43 PM UTC+2, Wesolowski, Krzysztof wrote:
Those names are "macro concatenated" in AOSP code *.te files. You can start with te_macros and hal_attribute.


BR, K.

From: android-...@googlegroups.com <android-...@googlegroups.com> on behalf of icould icould <icou...@gmail.com>
Sent: Wednesday, June 10, 2020 14:35
To: Android Building <android-...@googlegroups.com>
Subject: [android-building] Where are hal_vehicle_client and hal_vehicle_server in hal_vehicle.te defined?
 
I'm trying to understand how HAL is implemented and took hal_vehicle as an example.
in https://cs.android.com/android/platform/superproject/+/master:system/sepolicy/public/hal_vehicle.te;l=1?q=hal_vehicle.te&sq=

hal_vehicle_server and hal_vehicle_client are mentioned in the binder call. but where and who does introduce/define them, at what place and time?
I did a whole fulltext search but could not find a place where they are set.

I hope you can give me some advice.

thx

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages