Skip to content

Files

Latest commit

29139ee · Aug 23, 2020

History

History

service-related-file-collector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 23, 2020
Aug 23, 2020

Service Related File Collector

This component is used to collect C++ files related to Android native system services. Specifically, those files are related to

  • top-level and multi-level interfaces.
  • standard parcelable and (light)flattenable structures.
  • misc functions that have a parcel parameter, e.g., setSchedPolicy(data).
  • special parcelable structures that do not use readFromParcel or writeToParcel method.

For files related to top-level interfaces, multi-level interfaces, standard parcelable, and (light)flattenable structures, we can collect them directly using the following command.

python collector.py

Currently, we exclude the file generated by the AIDL tool for 32-bit programs as we are testing 64-bit mobile phones. And it won't affect the completeness of the collected interfaces and related files as the corresponding 64-bit files are also generated as far as we see.

However, we do not know the information about misc functions and special parcelable structures in the beginning. Besides, we should collect them recursively as a misc function may call another misc function. So we can collect the files related to them as follows

  1. Run python collector.py to collect related files.
  2. Use interface model extractor to extract interface model. During this process, the interface model extractor will record the misc functions and special parcelable structures. These information will be stored in misc_parcel_related_function_storage_location and special_parcelable_function_storage_location as described in the fans.cfg.
  3. If there are no new functions found, stop. Otherwise, go to step1.

Currently, this repo already contains information about misc functions and special parcelable structures in Android 9.0.0_r46.

From another perspective, it is worth noting that even AOSP is led by Google, there still are some codes that are not standard. If these codes are standard, we could run python collector.py to collect all files related to Android native system services once.