I am trying to create a super.img using an Android 11 vendor image and a 
pure Android 13 system image. I am using the merge_target_files tool in the 
system build area followed by build_super_image tool.

However the host_init_verifier errors out, it appears that the init rc 
files from the vendor refer to hidl interfaces that the host_init_verifier 
doesn't know anything about.

Based on some digging it appears that during the system build a tool 
generates a c++ file from hidl_inheritance_hierarchy.json which contains 
and embedded list of known hidl interfaces and is statically compiled into 
the host_init_verifier itself. Since I am using a pure Android 13 system 
build I am not sure how it would ever know about custom vendor interfaces 
reference in the vendor init file.

If I hack the host_init_verifier file interface_utils.cpp to not perform 
the hidl interface check then the merge proceeds but that doesn't seem like 
the correct solution. Maybe I need to get hidl_inheritance_hierarchy.json 
to contain all the custom vendor interfaces? I am not sure if that is the 
correct approach or how to do that.

-- Jacob

Here is the relevant part of the error:

2023-04-28 22:49:47 - common.py - INFO    :   Running: 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/host_init_verifier
 
--out_system /tmp/merge_target_files_50lso94e/output/SYSTEM 
--property-contexts=/tmp/merge_target_files_50lso94e/output/SYSTEM/etc/selinux/plat_property_contexts
 
-p /tmp/merge_target_files_50lso94e/output/SYSTEM/etc/passwd --out_vendor 
/tmp/merge_target_files_50lso94e/output/VENDOR 
--property-contexts=/tmp/merge_target_files_50lso94e/output/VENDOR/etc/selinux/vendor_property_contexts
 
-p /tmp/merge_target_files_50lso94e/output/VENDOR/etc/passwd --out_product 
/tmp/merge_target_files_50lso94e/output/PRODUCT -p 
/tmp/merge_target_files_50lso94e/output/PRODUCT/etc/passwd --out_system_ext 
/tmp/merge_target_files_50lso94e/output/SYSTEM_EXT -p 
/tmp/merge_target_files_50lso94e/output/SYSTEM_EXT/etc/passwd --out_odm 
/tmp/merge_target_files_50lso94e/output/VENDOR/odm -p 
/tmp/merge_target_files_50lso94e/output/VENDOR/odm/etc/passwd"
2023-04-28 22:49:47 - common.py - INFO    :   Running: 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/secilc -m 
-M true -G -N -c 30 -o 
/tmp/merge_target_files_50lso94e/output/META/combined_sepolicy -f /dev/null 
/tmp/merge_target_files_50lso94e/output/SYSTEM/etc/selinux/plat_sepolicy.cil 
/tmp/merge_target_files_50lso94e/output/SYSTEM/etc/selinux/mapping/30.0.cil 
/tmp/merge_target_files_50lso94e/output/VENDOR/etc/selinux/vendor_sepolicy.cil 
/tmp/merge_target_files_50lso94e/output/VENDOR/etc/selinux/plat_pub_versioned.cil
 
/tmp/merge_target_files_50lso94e/output/SYSTEM/etc/selinux/mapping/30.0.compat.cil"
2023-04-28 22:49:48 - merge_target_files.py - ERROR   : Failed to run 
command '['host_init_verifier', '--out_system', 
'/tmp/merge_target_files_50lso94e/output/SYSTEM', 
'--property-contexts=/tmp/merge_target_files_50lso94e/output/SYSTEM/etc/selinux/plat_property_contexts',
 
'-p', '/tmp/merge_target_files_50lso94e/output/SYSTEM/etc/passwd', 
'--out_vendor', '/tmp/merge_target_files_50lso94e/output/VENDOR', 
'--property-contexts=/tmp/merge_target_files_50lso94e/output/VENDOR/etc/selinux/vendor_property_contexts',
 
'-p', '/tmp/merge_target_files_50lso94e/output/VENDOR/etc/passwd', 
'--out_product', '/tmp/merge_target_files_50lso94e/output/PRODUCT', '-p', 
'/tmp/merge_target_files_50lso94e/output/PRODUCT/etc/passwd', 
'--out_system_ext', '/tmp/merge_target_files_50lso94e/output/SYSTEM_EXT', 
'-p', '/tmp/merge_target_files_50lso94e/output/SYSTEM_EXT/etc/passwd', 
'--out_odm', '/tmp/merge_target_files_50lso94e/output/VENDOR/odm', '-p', 
'/tmp/merge_target_files_50lso94e/output/VENDOR/odm/etc/passwd']' (exit 
code 1):
host_init_verifier: 
/tmp/merge_target_files_50lso94e/output/VENDOR/etc/init/android.hardware.camera.provider@2.4-service_64.rc:
 
18: 
Interface is not in the known set of hidl_interfaces: 
'vendor.qti.hardware.camera.postproc@1.0::IPostProcService'. Please ensure 
the interface is spelled correctly and built by a hidl_interface target.
host_init_verifier: 
/tmp/merge_target_files_50lso94e/output/VENDOR/etc/init/android.hardware.wifi.supplicant-service.rc:
 
3: 
Interface is not in the known set of hidl_interfaces: 
'vendor.qti.hardware.wifi.supplicant@2.0::ISupplicantVendor'. Please ensure 
the interface is spelled correctly and built by a hidl_interface target.
Interface is not in the known set of hidl_interfaces: 
'vendor.qti.hardware.wifi.supplicant@2.1::ISupplicantVendor'. Please ensure 
the interface is spelled correctly and built by a hidl_interface target.
Interface is not in the known set of hidl_interfaces: 
'vendor.qti.hardware.wifi.supplicant@2.2::ISupplicantVendor'. Please ensure 
the interface is spelled correctly and built by a hidl_interface target.
... more errors ...
host_init_verifier: Failed to parse init scripts with 13 error(s).

Traceback (most recent call last):
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/internal/stdlib/runpy.py",
 
line 196, in _run_module_as_main
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/internal/stdlib/runpy.py",
 
line 86, in _run_code
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/__main__.py",
 
line 12, in <module>
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/internal/stdlib/runpy.py",
 
line 196, in _run_module_as_main
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/internal/stdlib/runpy.py",
 
line 86, in _run_code
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/merge_target_files.py",
 
line 611, in <module>
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/merge_target_files.py",
 
line 602, in main
  File 
"/home/jacob/work/platforms/qcmdevice/aosp/out/host/linux-x86/bin/merge_target_files/merge_target_files.py",
 
line 416, in merge_target_files
common.ExternalError: Found incompatibilities in the merged target files 
package.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@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-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/85ee044b-26a3-4876-8d24-c4ab7fd5d721n%40googlegroups.com.

Reply via email to