service_manager: workaround known long names

Trusted hals all have the same long prefix. This change introduces a
convention to shorten their names to fit within the trusty limit of 64
characters until we can increase this limit in the trusty kernel.

We also include a public function so that apps can derive port names to
publish for their AIDL services in line with the logic in
wait_for_interface.

Bug: 393346719
Test: trusty/vendor/google/aosp/scripts/build.py \
	qemu-generic-arm64-test-debug \
        --test="boot-test:com.android.trusty.rust.service_manager_tests.test
Change-Id: Ief4c03b27799a147755fc55d64b3564829e5951b
4 files changed