diff --git a/vndk/Android.bp b/vndk/Android.bp
deleted file mode 100644
index 7f849503a..000000000
--- a/vndk/Android.bp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-subdirs = [
- "tools",
-]
diff --git a/vndk/OWNERS b/vndk/OWNERS
deleted file mode 100644
index 402c92833..000000000
--- a/vndk/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-andrewhsieh@google.com
-loganchien@google.com
diff --git a/vndk/tools/Android.bp b/vndk/tools/Android.bp
deleted file mode 100644
index 28c6574ac..000000000
--- a/vndk/tools/Android.bp
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-subdirs = [
- "header-checker",
- "vtable-dumper",
-]
diff --git a/vndk/tools/definition-tool/.pylintrc b/vndk/tools/definition-tool/.pylintrc
deleted file mode 100644
index 528ac1cd6..000000000
--- a/vndk/tools/definition-tool/.pylintrc
+++ /dev/null
@@ -1,8 +0,0 @@
-[MESSAGES CONTROL]
-
-disable=
- fixme,
- invalid-name,
- missing-docstring,
- ungrouped-imports,
- useless-object-inheritance,
diff --git a/vndk/tools/definition-tool/OWNERS b/vndk/tools/definition-tool/OWNERS
deleted file mode 100644
index 759c8dadf..000000000
--- a/vndk/tools/definition-tool/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-andrewhsieh@google.com
-hsinyichen@google.com
-loganchien@google.com
-tyanh@google.com
diff --git a/vndk/tools/definition-tool/README.md b/vndk/tools/definition-tool/README.md
deleted file mode 100644
index 40417a263..000000000
--- a/vndk/tools/definition-tool/README.md
+++ /dev/null
@@ -1,124 +0,0 @@
-VNDK Definition Tool
-====================
-
-VNDK definition tool was designed to classify all shared libraries in the
-system partition and give suggestions to copy necessary libraries to the vendor
-partition.
-
-## Usage
-
-To run VNDK definition tool, you will need three inputs:
-
-1. The system and vendor image for your target
-2. Android Treble reference image
-3. Eligible VNDK list from Google (e.g. eligible-list-v3.0.csv)
-
-The high-level overview of the command line usage is:
-
- $ python3 ./vndk_definition_tool.py vndk \
- --system "/path/to/your/product_out/system" \
- --vendor "/path/to/your/product_out/vendor" \
- --aosp-system "/path/to/aosp/generic/system" \
- --tag-file "eligible-list-v3.0.csv"
-
-This command will print several lines such as:
-
- vndk-sp: libexample1.so
- vndk-sp-ext: libexample2.so
- extra-vendor-libs: libexample3.so
-
-The output implies:
-
-1. `libexample1.so` should be copied to `/system/lib[64]/vndk-sp`.
-2. `libexample2.so` should be copied to `/vendor/lib[64]/vndk-sp`.
-3. `libexample3.so` should be copied to `/vendor/lib[64]`.
-
-
-# Makefile Boilerplates
-
-There are some boilerplates in `templates` directory that can automate the
-process to copy shared libraries. Please copy a boilerplate, rename it as
-`Android.mk`, and replace the placeholders with corresponding values:
-
-* `##_VNDK_SP_##` should be replaced by library names tagged with `vndk_sp`.
-
-* `##_VNDK_SP_EXT_##` should be replaced by library names tagged with
- `vndk_sp_ext`.
-
-* `##_EXTRA_VENDOR_LIBS_##` should be replaced by library names tagged with
- `extra_vendor_libs`.
-
-* `$(YOUR_DEVICE_NAME)` has to be replaced by your own device product name.
-
-VNDK definition tool can fill in the library names and generate an `Android.mk`
-when the `--output-format=make` is specified:
-
- $ python3 ./vndk_definition_tool.py vndk \
- --system "/path/to/your/product_out/system" \
- --vendor "/path/to/your/product_out/vendor" \
- --aosp-system "/path/to/aosp/generic/system" \
- --tag-file "eligible-list-v3.0.csv" \
- --output-format=make
-
-These boilerplates only define the modules to copy shared libraries.
-Developers have to add the phony package name to `PRODUCT_PACKAGES` variable in
-the `device.mk` for their devices.
-
- PRODUCT_PACKAGES += $(YOUR_DEVICE_NAME)-vndk
-
-
-## Ignore Subdirectories
-
-Some devices keep their vendor modules in `/system/vendor`. To run VNDK
-definition tool for those devices, we have to skip `/system/vendor` and specify
-it with `--vendor` option. For example:
-
- python3 vndk_definition_tool.py vndk \
- --system ${ANDROID_PRODUCT_OUT}/system \
- --system-dir-ignored vendor \
- --vendor ${ANDROID_PRODUCT_OUT}/system/vendor \
- # ...
-
-
-## Implicit Dependencies
-
-If there are implicit dependencies, such as `dlopen()`, we can specify them in
-a dependency file and load the dependency file with `--load-extra-deps`. The
-dependency file format is simple: (a) each line stands for a dependency, and
-(b) the file before the colon depends on the file after the colon. For
-example, `libart.so` depends on `libart-compiler.so`:
-
- /system/lib64/libart.so: /system/lib64/libart-compiler.so
-
-And then, run VNDK definition tool with:
-
- $ python3 vndk_definition_tool.py vndk \
- --system ${ANDROID_PRODUCT_OUT}/system \
- --vendor ${ANDROID_PRODUCT_OUT}/vendor \
- --aosp-system ${ANDROID_PRODUCT_OUT}/../generic_arm64_a \
- --tag-file eligible-list-v3.0.csv \
- --load-extra-deps dlopen.dep
-
-
-## Remarks
-
-To run VNDK definition tool against an image (`.img`), run the following
-command to mount the images and run `vndk_definition_tool.py` with `sudo`:
-
- $ simg2img system.img system.raw.img
-
- $ simg2img vendor.img vendor.raw.img
-
- $ mkdir system
-
- $ mkdir vendor
-
- $ sudo mount -o loop,ro system.raw.img system
-
- $ sudo mount -o loop,ro vendor.raw.img vendor
-
- $ sudo python3 vndk_definition_tool.py vndk \
- --system system \
- --vendor vendor \
- --aosp-system /path/to/aosp/generic/system \
- --tag-file eligible-list-v3.0.csv
diff --git a/vndk/tools/definition-tool/assets/insight/index.html b/vndk/tools/definition-tool/assets/insight/index.html
deleted file mode 100644
index bd935cc91..000000000
--- a/vndk/tools/definition-tool/assets/insight/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
- VNDK Dependency Insight
-
-
-
-
-
-
-
diff --git a/vndk/tools/definition-tool/assets/insight/insight-data.js b/vndk/tools/definition-tool/assets/insight/insight-data.js
deleted file mode 100644
index 65bec05bf..000000000
--- a/vndk/tools/definition-tool/assets/insight/insight-data.js
+++ /dev/null
@@ -1,24 +0,0 @@
-(function () {
- var strs = [
- '/system/lib/libc.so',
- '/system/lib/libm.so',
- '/system/lib/libdl.so',
- '/system/lib64/libc.so',
- '/system/lib64/libm.so',
- '/system/lib64/libdl.so',
- 'll-ndk',
- 'hl-ndk',
- 'bionic/libc',
- 'bionic/libm',
- 'bionic/libdl',
- ];
- var mods = [
- [0, 32, [6], [[1, 2]], [], [8]],
- [1, 32, [6], [], [0], [9]],
- [2, 32, [6], [], [0], [10]],
- [3, 64, [6], [[5], [4]], [], [8]],
- [4, 64, [7], [[5]], [3], [9]],
- [5, 64, [7], [], [3, 4], [9, 10]],
- ];
- insight.init(document, strs, mods);
-})();
diff --git a/vndk/tools/definition-tool/assets/insight/insight.css b/vndk/tools/definition-tool/assets/insight/insight.css
deleted file mode 100644
index 538a49fb1..000000000
--- a/vndk/tools/definition-tool/assets/insight/insight.css
+++ /dev/null
@@ -1,116 +0,0 @@
-p, li, td, th, h1, h2, h3 {
- line-height: 1.6;
-}
-
-#control {
- background-color: #eefaff;
- border: 1px solid #3399ff;
- border-collapse: collapse;
- margin: 0px 0px 20px 0px;
- width: 100%;
-}
-
-#control td {
- padding: 3px;
-}
-
-#control_menu:link {
- display: block;
- width: 5em;
- height: 20pt;
- text-align: center;
- line-height: 20pt;
- color: #ffffff;
- background-color: #3399ff;
- position: fixed;
- top: 0px;
- right: 0px;
-}
-
-#control_menu:visited {
- color: #ffffff;
-}
-
-#control_menu:hover {
- color: #ffffff;
- background-color: #0000ff;
-}
-
-.menu {
- list-style-type: none;
- margin: 0px;
- padding: 0px;
-}
-
-.menu li {
- display: inline;
- padding: 0px 1em 0px 0px;
-}
-
-a:link {
- color: #2244ff;
- text-decoration: none;
- font-family: monospace;
-}
-
-a:visited {
- color: #2244ff;
- text-decoration: none;
-}
-
-a:hover {
- color: #ff3322;
- text-decoration: underline;
-}
-
-a:active {
- color: #ff3322;
- text-decoration: underline;
-}
-
-#module_table {
- border-collapse: collapse;
- width: 100%;
-}
-
-#module_tbody td,
-#module_tbody th {
- border: 1px solid #dddddd;
- padding: 3px 20px;
- vertical-align: top;
-}
-
-#module_tbody th {
- background-color: #eeeeee;
-}
-
-#module_tbody h1,
-#module_tbody h2,
-#module_tbody p {
- font-size: 100%;
- margin: 0px;
- padding: 0px;
-}
-
-#module_tbody ol,
-#module_tbody ul {
- margin: .3em 0px;
- padding: 0px 0px 0px 2em;
-}
-
-#module_tbody tr:target {
- background-color: #fffff0;
- transition: background-color 800ms ease;
-}
-
-#module_tbody p.module_src_dir {
- font-family: monospace;
- font-size: 80%;
- color: #aaaaaa;
-}
-
-#no_module_placeholder {
- font-style: italic;
- font-family: sans-serif;
- text-align: center;
-}
diff --git a/vndk/tools/definition-tool/assets/insight/insight.js b/vndk/tools/definition-tool/assets/insight/insight.js
deleted file mode 100644
index 1027d979e..000000000
--- a/vndk/tools/definition-tool/assets/insight/insight.js
+++ /dev/null
@@ -1,509 +0,0 @@
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define([], factory);
- } else if (typeof module === 'object' && module.exports) {
- module.exports = factory();
- } else {
- root.insight = factory();
- }
-} (this, function () {
- 'use strict';
-
- let document;
- let strsData, mods, tagIds;
- let domPathInput, domFuzzyMatch;
- let domTBody;
- let domPlaceholder = null;
- let placeholderVisible = false;
-
- //--------------------------------------------------------------------------
- // DOM Helper Functions
- //--------------------------------------------------------------------------
- function domNewText(text) {
- return document.createTextNode(text);
- }
-
- function domNewElem(type) {
- let dom = document.createElement(type);
- for (let i = 1; i < arguments.length; ++i) {
- let arg = arguments[i];
- if (typeof(arg) == 'string' || typeof(arg) == 'number') {
- arg = domNewText(arg)
- }
- dom.appendChild(arg);
- }
- return dom;
- }
-
- function domNewLink(text, onClick) {
- let dom = domNewElem('a', text);
- dom.setAttribute('href', '#');
- dom.addEventListener('click', onClick);
- return dom;
- }
-
- //--------------------------------------------------------------------------
- // Module Row
- //--------------------------------------------------------------------------
- function countDeps(deps) {
- let direct = 0;
- let indirect = 0;
- if (deps.length > 0) {
- direct = deps[0].length;
- for (let i = 1; i < deps.length; ++i) {
- indirect += deps[i].length;
- }
- }
- return [direct, indirect];
- }
-
- function Module(id, modData) {
- this.id = id;
- this.path = strsData[modData[0]];
- this.cls = modData[1];
- this.tagIds = new Set(modData[2]);
- this.deps = modData[3];
- this.users = modData[4];
- this.srcDirs = modData[5].map(function (x) { return strsData[x]; });
-
- [this.numDirectDeps, this.numIndirectDeps] = countDeps(this.deps);
- this.numUsers = this.users.length;
-
- this.dom = null;
- this.visible = false;
-
- this.linkDoms = Object.create(null);
- }
-
- Module.prototype.isTagged = function (tagId) {
- return this.tagIds.has(tagId);
- }
-
- Module.prototype.createModuleLinkDom = function (mod) {
- let dom = domNewElem('a', mod.path);
- dom.setAttribute('href', '#mod_' + mod.id);
- dom.setAttribute('data-mod-id', mod.id);
- dom.setAttribute('data-owner-id', this.id);
- dom.addEventListener('click', onModuleLinkClicked);
- dom.addEventListener('mouseover', onModuleLinkMouseOver);
- dom.addEventListener('mouseout', onModuleLinkMouseOut);
-
- this.linkDoms[mod.id] = dom;
-
- return dom;
- }
-
- Module.prototype.createModuleRelationsDom = function (parent, label,
- modIds) {
- parent.appendChild(domNewElem('h2', label));
-
- let domOl = domNewElem('ol');
- parent.appendChild(domOl);
- for (let modId of modIds) {
- domOl.appendChild(
- domNewElem('li', this.createModuleLinkDom(mods[modId])));
- }
- }
-
- Module.prototype.createModulePathTdDom = function (parent) {
- let domTd = domNewElem('td');
- domTd.appendChild(domNewElem('p', this.createModuleLinkDom(this)));
- for (let dir of this.srcDirs) {
- let domP = domNewElem('p', 'source: ' + dir);
- domP.setAttribute('class', 'module_src_dir');
- domTd.appendChild(domP);
- }
- parent.appendChild(domTd);
- }
-
- Module.prototype.createTagsTdDom = function (parent) {
- let domTd = domNewElem('td');
- for (let tag of this.tagIds) {
- domTd.appendChild(domNewElem('p', strsData[tag]));
- }
- parent.appendChild(domTd);
- }
-
- Module.prototype.createDepsTdDom = function (parent) {
- let domTd = domNewElem(
- 'td', this.numDirectDeps + ' + ' + this.numIndirectDeps);
-
- let deps = this.deps;
- if (deps.length > 0) {
- this.createModuleRelationsDom(domTd, 'Direct', deps[0]);
-
- for (let i = 1; i < deps.length; ++i) {
- this.createModuleRelationsDom(domTd, 'Indirect #' + i, deps[i]);
- }
- }
-
- parent.appendChild(domTd);
- }
-
- Module.prototype.createUsersTdDom = function (parent) {
- let domTd = domNewElem('td', this.numUsers);
-
- let users = this.users;
- if (users.length > 0) {
- this.createModuleRelationsDom(domTd, 'Direct', users);
- }
-
- parent.appendChild(domTd);
- }
-
- Module.prototype.createDom = function () {
- let dom = this.dom = domNewElem('tr');
- dom.setAttribute('id', 'mod_' + this.id);
-
- this.createModulePathTdDom(dom);
- this.createTagsTdDom(dom);
- this.createDepsTdDom(dom);
- this.createUsersTdDom(dom)
- }
-
- Module.prototype.showDom = function () {
- hidePlaceholder();
- if (this.visible) {
- return;
- }
- if (this.dom === null) {
- this.createDom();
- }
- domTBody.appendChild(this.dom);
- this.visible = true;
- }
-
- Module.prototype.hideDom = function () {
- if (!this.visible) {
- return;
- }
- this.dom.parentNode.removeChild(this.dom);
- this.visible = false;
- }
-
- function createModulesFromData(stringsData, modulesData) {
- return modulesData.map(function (modData, id) {
- return new Module(id, modData);
- });
- }
-
- function createTagIdsFromData(stringsData, mods) {
- let tagIds = new Set();
- for (let mod of mods) {
- for (let tag of mod.tagIds) {
- tagIds.add(tag);
- }
- }
-
- tagIds = Array.from(tagIds);
- tagIds.sort(function (a, b) {
- return strsData[a].localeCompare(strsData[b]);
- });
-
- return tagIds;
- }
-
- //--------------------------------------------------------------------------
- // Data
- //--------------------------------------------------------------------------
- function init(doc, stringsData, modulesData) {
- document = doc;
- strsData = stringsData;
-
- mods = createModulesFromData(stringsData, modulesData);
- tagIds = createTagIdsFromData(stringsData, mods);
-
- document.addEventListener('DOMContentLoaded', function (evt) {
- createControlDom(document.body);
- createTableDom(document.body);
- });
- }
-
- //--------------------------------------------------------------------------
- // Control
- //--------------------------------------------------------------------------
- function createControlDom(parent) {
- let domTBody = domNewElem('tbody');
-
- createSelectionTrDom(domTBody);
- createAddByTagsTrDom(domTBody);
- createAddByPathTrDom(domTBody);
-
- let domTable = domNewElem('table', domTBody);
- domTable.id = 'control';
-
- let domFixedLink = domNewElem('a', 'Menu');
- domFixedLink.href = '#control';
- domFixedLink.id = 'control_menu';
-
- parent.appendChild(domFixedLink);
- parent.appendChild(domTable);
- }
-
- function createControlMenuTr(parent, label, items) {
- let domUl = domNewElem('ul');
- domUl.className = 'menu';
- for (let [txt, callback] of items) {
- domUl.appendChild(domNewElem('li', domNewLink(txt, callback)));
- }
-
- let domTr = domNewElem('tr',
- createControlLabelTdDom(label),
- domNewElem('td', domUl));
-
- parent.appendChild(domTr);
- }
-
- function createSelectionTrDom(parent) {
- const items = [
- ['All', onAddAll],
- ['32-bit', onAddAll32],
- ['64-bit', onAddAll64],
- ['Clear', onClear],
- ];
-
- createControlMenuTr(parent, 'Selection:', items);
- }
-
- function createAddByTagsTrDom(parent) {
- if (tagIds.length == 0) {
- return;
- }
-
- const items = tagIds.map(function (tagId) {
- return [strsData[tagId], function (evt) {
- evt.preventDefault(true);
- showModulesByTagId(tagId);
- }];
- });
-
- createControlMenuTr(parent, 'Add by Tags:', items);
- }
-
- function createAddByPathTrDom(parent) {
- let domForm = domNewElem('form');
- domForm.addEventListener('submit', onAddModuleByPath);
-
- domPathInput = domNewElem('input');
- domPathInput.type = 'text';
- domForm.appendChild(domPathInput);
-
- let domBtn = domNewElem('input');
- domBtn.type = 'submit';
- domBtn.value = 'Add';
- domForm.appendChild(domBtn);
-
- domFuzzyMatch = domNewElem('input');
- domFuzzyMatch.setAttribute('id', 'fuzzy_match');
- domFuzzyMatch.setAttribute('type', 'checkbox');
- domFuzzyMatch.setAttribute('checked', 'checked');
- domForm.appendChild(domFuzzyMatch);
-
- let domFuzzyMatchLabel = domNewElem('label', 'Fuzzy Match');
- domFuzzyMatchLabel.setAttribute('for', 'fuzzy_match');
- domForm.appendChild(domFuzzyMatchLabel);
-
- let domTr = domNewElem('tr',
- createControlLabelTdDom('Add by Path:'),
- domNewElem('td', domForm));
-
- parent.appendChild(domTr);
- }
-
- function createControlLabelTdDom(text) {
- return domNewElem('td', domNewElem('strong', text));
- }
-
-
- //--------------------------------------------------------------------------
- // Table
- //--------------------------------------------------------------------------
- function createTableDom(parent) {
- domTBody = domNewElem('tbody');
- domTBody.id = 'module_tbody';
-
- createTableHeaderDom(domTBody);
-
- showPlaceholder();
-
- let domTable = domNewElem('table', domTBody);
- domTable.id = 'module_table';
-
- parent.appendChild(domTable);
- }
-
- function createTableHeaderDom(parent) {
- const labels = [
- 'Name',
- 'Tags',
- 'Dependencies (Direct + Indirect)',
- 'Users',
- ];
-
- let domTr = domNewElem('tr');
- for (let label of labels) {
- domTr.appendChild(domNewElem('th', label));
- }
-
- parent.appendChild(domTr);
- }
-
- function createPlaceholder() {
- let domTd = domNewElem('td');
- domTd.setAttribute('colspan', 4);
- domTd.setAttribute('id', 'no_module_placeholder');
- domTd.appendChild(domNewText(
- 'No modules are selected. Click the menu to select modules by ' +
- 'names or categories.'));
- domPlaceholder = domNewElem('tr', domTd);
- }
-
- function showPlaceholder() {
- if (placeholderVisible) {
- return;
- }
- placeholderVisible = true;
- if (domPlaceholder === null) {
- createPlaceholder();
- }
- domTBody.appendChild(domPlaceholder);
- }
-
- function hidePlaceholder() {
- if (placeholderVisible) {
- domTBody.removeChild(domPlaceholder);
- placeholderVisible = false;
- }
- }
-
- function hideAllModules() {
- for (let mod of mods) {
- mod.hideDom();
- }
- showPlaceholder();
- }
-
- function showAllModules() {
- for (let mod of mods) {
- mod.showDom();
- }
- }
-
- function showModulesByFilter(pred) {
- let numMatched = 0;
- for (let mod of mods) {
- if (pred(mod)) {
- mod.showDom();
- ++numMatched;
- }
- }
- return numMatched;
- }
-
- function showModulesByTagId(tagId) {
- showModulesByFilter(function (mod) {
- return mod.isTagged(tagId);
- });
- }
-
-
- //--------------------------------------------------------------------------
- // Events
- //--------------------------------------------------------------------------
-
- function onAddModuleByPath(evt) {
- evt.preventDefault();
-
- let path = domPathInput.value;
- domPathInput.value = '';
-
- function escapeRegExp(pattern) {
- return pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1');
- }
-
- function createFuzzyMatcher() {
- let parts = path.split(/\/+/g);
- let pattern = '';
- for (let part of parts) {
- pattern += escapeRegExp(part) + '(?:/[^\/]*)*';
- }
- pattern = RegExp(pattern);
-
- return function (mod) {
- return pattern.test(mod.path);
- };
- }
-
- function exactMatcher(mod) {
- return mod.path == path;
- }
-
- let numMatched = showModulesByFilter(
- domFuzzyMatch.checked ? createFuzzyMatcher() : exactMatcher);
-
- if (numMatched == 0) {
- alert('No matching modules: ' + path);
- }
- }
-
- function onAddAll(evt) {
- evt.preventDefault(true);
- hideAllModules();
- showAllModules();
- }
-
- function onAddAllClass(evt, cls) {
- evt.preventDefault(true);
- hideAllModules();
- showModulesByFilter(function (mod) {
- return mod.cls == cls;
- });
- }
-
- function onAddAll32(evt) {
- onAddAllClass(evt, 32);
- }
-
- function onAddAll64(evt) {
- onAddAllClass(evt, 64);
- }
-
- function onClear(evt) {
- evt.preventDefault(true);
- hideAllModules();
- }
-
- function onModuleLinkClicked(evt) {
- let modId = parseInt(evt.target.getAttribute('data-mod-id'), 10);
- mods[modId].showDom();
- }
-
- function setDirectDepBackgroundColor(modId, ownerId, color) {
- let mod = mods[modId];
- let owner = mods[ownerId];
- let ownerLinkDoms = owner.linkDoms;
- if (mod.deps.length > 0) {
- for (let depId of mod.deps[0]) {
- if (depId in ownerLinkDoms) {
- ownerLinkDoms[depId].style.backgroundColor = color;
- }
- }
- }
- }
-
- function onModuleLinkMouseOver(evt) {
- let modId = parseInt(evt.target.getAttribute('data-mod-id'), 10);
- let ownerId = parseInt(evt.target.getAttribute('data-owner-id'), 10);
- setDirectDepBackgroundColor(modId, ownerId, '#ffff00');
- }
-
- function onModuleLinkMouseOut(evt) {
- let modId = parseInt(evt.target.getAttribute('data-mod-id'), 10);
- let ownerId = parseInt(evt.target.getAttribute('data-owner-id'), 10);
- setDirectDepBackgroundColor(modId, ownerId, 'transparent');
- }
-
- return {
- 'init': init,
- };
-}));
diff --git a/vndk/tools/definition-tool/assets/visual/dep-data.js b/vndk/tools/definition-tool/assets/visual/dep-data.js
deleted file mode 100644
index 1d038dc8c..000000000
--- a/vndk/tools/definition-tool/assets/visual/dep-data.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var violatedLibs = {"system.private.bin": [
- ["/system/bin/systembin", 2],
- ["/system/bin/otherbin", 1]],
- "system.private.fwk-only": [
- ["/system/lib/test.so", 1]],
- "vendor.private.bin": [
- ["/vendor/lib/libvendor.so", 2],
- ["/vendor/lib/vendor_2_lib.so", 1]]};
-var depData = [
- {"name": "/system/lib/oklib.so",
- "violate_count": 0,
- "violates": [],
- "depends": [],
- "tag": "system.public.vndk"},
- {"name": "/system/lib/oklib2.so",
- "violate_count": 0,
- "violates": [],
- "depends": ["/system/lib/oklib.so"],
- "tag": "system.private.fwk_only"},
- {"name": "/system/bin/systembin",
- "violate_count": 2,
- "violates": ["/vendor/lib/libvendor.so", "/vendor/lib/vendor_2_lib.so"],
- "depends": ["/system/lib/oklib.so"],
- "tag": "system.private.bin"},
- {"name": "/system/bin/otherbin",
- "violate_count": 1,
- "violates": ["/vendor/lib/libvendor.so"],
- "depends": ["/system/lib/oklib2.so"],
- "tag": "system.private.bin"},
- {"name": "/system/lib/test.so",
- "violate_count": 1,
- "violates": ["/vendor/lib/libvendor.so"],
- "depends": ["/system/lib/oklib.so"],
- "tag": "system.private.fwk-only"},
- {"name": "/vendor/lib/libvendor.so",
- "violate_count": 2,
- "violates": ["/system/lib/test.so", "/system/lib/oklib2.so"],
- "depends": [],
- "tag": "vendor.private.bin"},
- {"name": "/vendor/lib/vendor_2_lib.so",
- "violate_count": 1,
- "violates": ["/system/lib/test.so"],
- "depends": [],
- "tag": "vendor.private.bin"}
-];
\ No newline at end of file
diff --git a/vndk/tools/definition-tool/assets/visual/dep-graph.css b/vndk/tools/definition-tool/assets/visual/dep-graph.css
deleted file mode 100644
index 697580c76..000000000
--- a/vndk/tools/definition-tool/assets/visual/dep-graph.css
+++ /dev/null
@@ -1,150 +0,0 @@
-.node {
- font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
- fill: #bbb;
- fill-opacity: 0.2;
-}
-
-.node--sys-pri {
- font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
- fill: #ffaaaa;
- fill-opacity: 0.2;
-}
-
-.node--sys-pub {
- font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
- fill: #aaffaa;
- fill-opacity: 0.2;
-}
-
-.node--source {
- fill: #2ca02c;
- fill-opacity: 1;
-}
-
-.node--target {
- fill: #d62728;
- fill-opacity: 1;
-}
-
-.node--selected {
- fill: #ff7000;
- fill-opacity: 1;
- font-weight: 700;
-}
-
-.node:hover,
-.node--sys-pri:hover,
-.node--sys-pub:hover {
- fill: #000;
- fill-opacity: 1;
-}
-
-.node:hover,
-.node--sys-pri:hover,
-.node--sys-pub:hover,
-.node--source,
-.node--target {
- font-weight: 700;
-}
-
-.link {
- stroke: steelblue;
- stroke-opacity: 0.01;
- fill: none;
- pointer-events: none;
-}
-
-.link--violate {
- stroke: crimson;
- stroke-opacity: 0.1;
- stroke-width: 1.0px;
- fill: none;
- pointer-events: none;
-}
-
-.link--source,
-.link--target {
- stroke-opacity: 1;
- stroke-width: 2.5px;
-}
-
-.link--source {
- stroke: orange;
-}
-
-.link--target {
- stroke: #2ca02c;
-}
-
-button.violate {
- background-color: white;
- color: #333;
- cursor: pointer;
- padding: 5px;
- width: 100%;
- border: none;
- text-align: left;
- outline: none;
- font-size: 15px;
- transition: 0.4s;
-}
-
-button.violate.active,
-button.violate:hover {
- background-color: #bb0000;
-}
-button.violate-list {
- background-color: #ffdddd;
- color: #333;
- cursor: pointer;
- padding: 5px;
- width: 100%;
- border: none;
- text-align: left;
- outline: none;
- font-size: 15px;
- transition: 0.4s;
-}
-
-button.violate-list.active,
-button.violate-list:hover {
- background-color: #ff6666;
-}
-.violate-list-sym {
- background-color: #ffaaaa;
- padding: 3px;
- width: 100%;
- border: none;
- text-align: left;
- font-size: 14px;
-}
-
-span.cplusplus-sym {
- background-color: #ffffff;
- top: 10px;
- left: 20px;
- width: auto;
- height: auto;
- border: solid 1px blue;
- font-size: 18px;
- position: absolute;
-}
-
-#violate_list_column {
- width: 20%;
- height: 99vh;
- float: left;
- overflow: scroll;
-}
-
-#dep_graph_column {
- width: 80%;
- height: 99vh;
- float: right;
- overflow: scroll;
-}
-
-#reset_btn {
- position: absolute;
- margin: 20px;
-}
diff --git a/vndk/tools/definition-tool/assets/visual/dep-graph.js b/vndk/tools/definition-tool/assets/visual/dep-graph.js
deleted file mode 100644
index d1ff9e33c..000000000
--- a/vndk/tools/definition-tool/assets/visual/dep-graph.js
+++ /dev/null
@@ -1,340 +0,0 @@
-(function() {
- 'use strict';
-
- let diameter = 1280;
- let radius = diameter / 2;
- let innerRadius = radius - 240;
-
- let cluster = d3.cluster();
- cluster.size([ 360, innerRadius ]);
-
- let line = d3.radialLine();
- line.curve(d3.curveBundle.beta(0.85));
- line.radius(function(d) { return d.y; });
- line.angle(function(d) { return d.x / 180 * Math.PI; });
-
- let link;
- let node;
- let selectedNode;
- let selectedSubNode;
-
- function init() {
- let domListCol = document.createElement("div");
- domListCol.id = "violate_list_column";
- let domGraphCol = document.createElement("div");
- domGraphCol.id = "dep_graph_column";
- let domResetBtn = document.createElement("button");
- domResetBtn.id = "reset_btn";
- domResetBtn.innerHTML = "Reset";
- domGraphCol.appendChild(domResetBtn);
-
- document.body.appendChild(domListCol);
- document.body.appendChild(domGraphCol);
-
- let canvas = d3.select("#dep_graph_column").append("svg");
- canvas.attr("width", diameter + 200);
- canvas.attr("height", diameter);
-
- let svg = canvas.append("g");
- svg.attr("transform", "translate(" + (radius + 100) + "," + radius + ")");
-
- link = svg.append("g").selectAll(".link");
- node = svg.append("g").selectAll(".node");
-
- showResult(depData, violatedLibs);
- }
-
- function showList(depMap, violatedLibs) {
- function makeTitle(tagName) {
- let domTitle = document.createElement("div");
- let domText = document.createElement("h3");
- domText.innerHTML = tagName;
- domTitle.appendChild(domText);
- return domTitle;
- }
- function makeButton(libName, count) {
- let domButton = document.createElement("button");
- domButton.className = "violate";
- domButton.innerHTML = libName + " (" + count + ")";
- domButton.onclick = function() {
- this.classList.toggle("active");
- let currentList = this.nextElementSibling;
- if (currentList.style.display === "block") {
- currentList.style.display = "none";
- selectedNode = undefined;
- if (selectedSubNode) {
- selectedSubNode.classList.toggle("active");
- selectedSubNode.nextElementSibling.style.display = "none";
- selectedSubNode = undefined;
- }
- resetclicked();
- } else {
- currentList.style.display = "block";
- for (let i = 1; i < currentList.childElementCount; i += 2) {
- currentList.childNodes[i].style.display = "none";
- }
- if (selectedNode) {
- selectedNode.classList.toggle("active");
- selectedNode.nextElementSibling.style.display = "none";
- if (selectedSubNode) {
- selectedSubNode.classList.toggle("active");
- selectedSubNode.nextElementSibling.style.display = "none";
- selectedSubNode = undefined;
- }
- }
- selectedNode = domButton;
- mouseclicked(depMap[libName]);
- }
- };
- return domButton;
- }
- function makeSubButton(libName, count) {
- let domButton = document.createElement("button");
- domButton.className = "violate-list";
- domButton.innerHTML = libName + " (" + count + ")";
- domButton.onclick = function() {
- this.classList.toggle("active");
- let currentSubList = this.nextElementSibling;
- if (currentSubList.style.display === "block") {
- currentSubList.style.display = "none";
- selectedSubNode = undefined;
- } else {
- currentSubList.style.display = "block";
- for (let i = 0; i < currentSubList.childElementCount; i++) {
- if (currentSubList.childNodes[i].childElementCount > 0) {
- currentSubList.childNodes[i].childNodes[1].style.display = "none";
- }
- }
- if (selectedSubNode) {
- selectedSubNode.classList.toggle("active");
- selectedSubNode.nextElementSibling.style.display = "none";
- }
- selectedSubNode = domButton;
- }
- };
- return domButton;
- }
- function changeFormat(symbol) {
- let res = "";
- let i;
- for (i = 0; i < symbol.length; i++) {
- if (symbol.charAt(i) >= '0' && symbol.charAt(i) <= '9') {
- break;
- }
- }
- while (i < symbol.length) {
- if (symbol.charAt(i) < '0' || symbol.charAt(i) > '9') {
- break;
- }
- let len = parseInt(symbol.substr(i, symbol.length));
- let count = 1;
- if (len < 10) {
- count = 0;
- }
- res = res + "::" + symbol.substr(i + 1 + count, len);
- i = i + 1 + count + len;
- }
- return res.substr(2, res.length);
- }
- function makeList(domList, list)
- {
- for (let i = 0; i < list.length; i++) {
- domList.appendChild(makeButton(list[i][0], list[i][1]));
- let domDepList = document.createElement("div");
- let depItem = depMap[list[i][0]];
- let violates = depItem.data.violates;
- for (let j = 0; j < violates.length; j++) {
- let domDepLib = document.createElement("div");
- let tag = depMap[violates[j][0]].data.tag;
- let symbols = violates[j][1];
- let domDepButton = makeSubButton(violates[j][0] + " ["
- + tag.substring(tag.lastIndexOf(".") + 1) + "]", symbols.length);
- for (let k = 0; k < symbols.length; k++) {
- let domDepSym = document.createElement("div");
- domDepSym.className = "violate-list-sym";
- domDepSym.innerHTML = symbols[k];
- if (symbols[k].indexOf("_Z") === 0) {
- let cplusplusSym = document.createElement("span");
- cplusplusSym.className = "cplusplus-sym";
- cplusplusSym.innerHTML =
- changeFormat(symbols[k].substr(2, symbols[k].length));
- domDepSym.appendChild(cplusplusSym);
- domDepSym.onmouseover = function(e) {
- e.currentTarget.style.position = "relative";
- e.currentTarget.childNodes[1].style.display = "block";
- };
- domDepSym.onmouseout = function(e) {
- e.currentTarget.style.position = "static";
- e.currentTarget.childNodes[1].style.display = "none";
- };
- }
- domDepLib.appendChild(domDepSym);
- }
- domDepList.appendChild(domDepButton);
- domDepList.appendChild(domDepLib);
- }
- domList.appendChild(domDepList);
- domDepList.style.display = "none";
- }
- }
-
- let domViolatedList = document.getElementById("violate_list_column");
- if ("vendor.private.bin" in violatedLibs) {
- let list = violatedLibs["vendor.private.bin"];
- domViolatedList.appendChild(makeTitle("VENDOR (" + list.length + ")"));
- makeList(domViolatedList, list);
- }
- for (let tag in violatedLibs) {
- if (tag === "vendor.private.bin")
- continue;
- let list = violatedLibs[tag];
- if (tag === "system.private.bin")
- tag = "SYSTEM";
- else
- tag = tag.substring(tag.lastIndexOf(".") + 1).toUpperCase();
- domViolatedList.appendChild(makeTitle(tag + " (" + list.length + ")"));
- makeList(domViolatedList, list);
- }
- }
-
- function showResult(depDumps, violatedLibs) {
- let root = tagHierarchy(depDumps).sum(function(d) { return 1; });
- cluster(root);
-
- let libsDepData = libsDepends(root.leaves());
- showList(libsDepData[1], violatedLibs);
- link = link.data(libsDepData[0])
- .enter()
- .append("path")
- .each(function(d) { d.source = d[0], d.target = d[d.length - 1]; })
- .attr("class", function(d) { return d.allow ? "link" : "link--violate" })
- .attr("d", line);
-
- node = node.data(root.leaves())
- .enter()
- .append("text")
- .attr("class",
- function(d) {
- return d.data.parent.parent.parent.key == "system" ?
- (d.data.parent.parent.key == "system.public" ?
- "node--sys-pub" :
- "node--sys-pri") :
- "node";
- })
- .attr("dy", "0.31em")
- .attr("transform",
- function(d) {
- return "rotate(" + (d.x - 90) + ")translate(" + (d.y + 8) + ",0)" +
- (d.x < 180 ? "" : "rotate(180)");
- })
- .attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; })
- .text(function(d) { return d.data.key; })
- .on("click", mouseclicked);
- document.getElementById("reset_btn").onclick = resetclicked;
- }
-
- function resetclicked() {
- if (selectedNode) {
- selectedNode.classList.toggle("active");
- selectedNode.nextElementSibling.style.display = "none";
- if (selectedSubNode) {
- selectedSubNode.classList.toggle("active");
- selectedSubNode.nextElementSibling.style.display = "none";
- selectedSubNode = undefined;
- }
- selectedNode = undefined;
- }
- link.classed("link--target", false)
- .classed("link--source", false);
- node.classed("node--target", false)
- .classed("node--source", false)
- .classed("node--selected", false);
- }
-
- function mouseclicked(d) {
- node.each(function(n) { n.target = n.source = false; });
-
- link.classed("link--target",
- function(l) {
- if (l.target === d) {
- l.source.source = true;
- return true;
- } else {
- return false;
- }
- })
- .classed("link--source",
- function(l) {
- if (l.source === d) {
- l.target.target = true;
- return true;
- } else {
- return false;
- }
- })
- .filter(function(l) { return l.target === d || l.source === d; })
- .raise();
-
- node.classed("node--target",
- function(n) {
- return n.target;
- })
- .classed("node--source",
- function(n) { return n.source; })
- .classed("node--selected",
- function(n) {
- return n === d;
- });
- }
-
- function tagHierarchy(depDumps) {
- let map = {};
-
- function find(name, tag, data) {
- let node = map[name], i;
- if (!node) {
- node = map[name] = data || { name : name, children : [] };
- if (name.length) {
- node.parent = find(tag, tag.substring(0, tag.lastIndexOf(".")));
- node.parent.children.push(node);
- node.key = name;
- }
- }
- return node;
- }
-
- depDumps.forEach(function(d) { find(d.name, d.tag, d); });
-
- return d3.hierarchy(map[""]);
- }
-
- function libsDepends(nodes) {
- let map = {}, depends = [];
-
- // Compute a map from name to node.
- nodes.forEach(function(d) { map[d.data.name] = d; });
-
- // For each dep, construct a link from the source to target node.
- nodes.forEach(function(d) {
- if (d.data.depends)
- d.data.depends.forEach(function(i) {
- let l = map[d.data.name].path(map[i]);
- l.allow = true;
- depends.push(l);
- });
- if (d.data.violates.length) {
- map[d.data.name].not_allow = true;
- d.data.violates.forEach(function(i) {
- map[i[0]].not_allow = true;
- let l = map[d.data.name].path(map[i[0]]);
- l.allow = false;
- depends.push(l);
- });
- }
- });
-
- return [ depends, map ];
- }
-
- window.onload = init;
-})();
diff --git a/vndk/tools/definition-tool/assets/visual/index.html b/vndk/tools/definition-tool/assets/visual/index.html
deleted file mode 100644
index 9a5547ff7..000000000
--- a/vndk/tools/definition-tool/assets/visual/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- VNDK Dependency Graph
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vndk/tools/definition-tool/datasets/eligible-list-26.csv b/vndk/tools/definition-tool/datasets/eligible-list-26.csv
deleted file mode 100644
index b1099b2e4..000000000
--- a/vndk/tools/definition-tool/datasets/eligible-list-26.csv
+++ /dev/null
@@ -1,518 +0,0 @@
-Path,Tag,Comments
-/system/${LIB}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.allocator@2.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/android.hidl.base@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/drm/libfwdlockengine.so,FWK-ONLY,
-/system/${LIB}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/hw/audio.a2dp.default.so,FWK-ONLY,
-/system/${LIB}/hw/bluetooth.default.so,FWK-ONLY,
-/system/${LIB}/hw/keystore.default.so,FWK-ONLY,
-/system/${LIB}/ld-android.so,LL-NDK-Indirect,
-/system/${LIB}/libEGL.so,LL-NDK,
-/system/${LIB}/libETC1.so,FWK-ONLY,
-/system/${LIB}/libFFTEm.so,FWK-ONLY,
-/system/${LIB}/libGLESv1_CM.so,LL-NDK,
-/system/${LIB}/libGLESv2.so,LL-NDK,
-/system/${LIB}/libGLESv3.so,LL-NDK,
-/system/${LIB}/libLLVM.so,FWK-ONLY,
-/system/${LIB}/libOpenMAXAL.so,FWK-ONLY,
-/system/${LIB}/libOpenSLES.so,FWK-ONLY,
-/system/${LIB}/libRS.so,FWK-ONLY,
-/system/${LIB}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/libRScpp.so,FWK-ONLY,
-/system/${LIB}/libWnnEngDic.so,FWK-ONLY,
-/system/${LIB}/libWnnJpnDic.so,FWK-ONLY,
-/system/${LIB}/libaaudio.so,FWK-ONLY,
-/system/${LIB}/libandroid.so,FWK-ONLY,
-/system/${LIB}/libandroid_net.so,LL-NDK,
-/system/${LIB}/libandroid_runtime.so,FWK-ONLY,
-/system/${LIB}/libandroid_servers.so,FWK-ONLY,
-/system/${LIB}/libandroidfw.so,FWK-ONLY,
-/system/${LIB}/libappfuse.so,FWK-ONLY,
-/system/${LIB}/libart-compiler.so,FWK-ONLY,
-/system/${LIB}/libart-dexlayout.so,FWK-ONLY,
-/system/${LIB}/libart-disassembler.so,FWK-ONLY,
-/system/${LIB}/libart.so,FWK-ONLY,
-/system/${LIB}/libaudioclient.so,FWK-ONLY,
-/system/${LIB}/libaudioeffect_jni.so,FWK-ONLY,
-/system/${LIB}/libaudioflinger.so,FWK-ONLY,
-/system/${LIB}/libaudiohal.so,FWK-ONLY,
-/system/${LIB}/libaudiomanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyenginedefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanagerdefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyservice.so,FWK-ONLY,
-/system/${LIB}/libaudioprocessing.so,FWK-ONLY,
-/system/${LIB}/libaudioroute.so,VNDK,
-/system/${LIB}/libaudiospdif.so,FWK-ONLY,
-/system/${LIB}/libaudioutils.so,VNDK,
-/system/${LIB}/libavservices_minijail.so,VNDK,"Will be FWK-ONLY in the future. Vendor module should link libavservices_minijail_vendor.so"
-/system/${LIB}/libbacktrace.so,VNDK-SP-Indirect,
-/system/${LIB}/libbase.so,VNDK-SP,
-/system/${LIB}/libbatteryservice.so,FWK-ONLY,
-/system/${LIB}/libbcc.so,FWK-ONLY,
-/system/${LIB}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/libbinder.so,VNDK,
-/system/${LIB}/libbinderwrapper.so,FWK-ONLY,
-/system/${LIB}/libblas.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/libbluetooth_jni.so,FWK-ONLY,
-/system/${LIB}/libbrillo-binder.so,FWK-ONLY,
-/system/${LIB}/libbrillo-stream.so,FWK-ONLY,
-/system/${LIB}/libbrillo.so,FWK-ONLY,
-/system/${LIB}/libc++.so,VNDK-SP,
-/system/${LIB}/libc.so,LL-NDK,
-/system/${LIB}/libc_malloc_debug.so,LL-NDK-Indirect,
-/system/${LIB}/libcamera2ndk.so,FWK-ONLY,
-/system/${LIB}/libcamera_client.so,FWK-ONLY,
-/system/${LIB}/libcamera_metadata.so,VNDK,
-/system/${LIB}/libcameraservice.so,FWK-ONLY,
-/system/${LIB}/libcap.so,VNDK,
-/system/${LIB}/libchrome.so,FWK-ONLY,
-/system/${LIB}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-mips-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-mips64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/libcompiler_rt.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/libcrypto.so,VNDK,
-/system/${LIB}/libcrypto_utils.so,VNDK,
-/system/${LIB}/libcups.so,FWK-ONLY,
-/system/${LIB}/libcurl.so,VNDK,
-/system/${LIB}/libcutils.so,VNDK-SP,
-/system/${LIB}/libdebuggerd_client.so,FWK-ONLY,
-/system/${LIB}/libdefcontainer_jni.so,FWK-ONLY,
-/system/${LIB}/libdiskconfig.so,VNDK,
-/system/${LIB}/libdl.so,LL-NDK,
-/system/${LIB}/libdng_sdk.so,FWK-ONLY,
-/system/${LIB}/libdrmframework.so,FWK-ONLY,
-/system/${LIB}/libdrmframework_jni.so,FWK-ONLY,
-/system/${LIB}/libdumpstateaidl.so,FWK-ONLY,
-/system/${LIB}/libdumpstateutil.so,VNDK,
-/system/${LIB}/libevent.so,VNDK,
-/system/${LIB}/libexif.so,VNDK,
-/system/${LIB}/libexpat.so,VNDK,
-/system/${LIB}/libext2_blkid.so,FWK-ONLY,
-/system/${LIB}/libext2_com_err.so,FWK-ONLY,
-/system/${LIB}/libext2_e2p.so,FWK-ONLY,
-/system/${LIB}/libext2_quota.so,FWK-ONLY,
-/system/${LIB}/libext2_uuid.so,FWK-ONLY,
-/system/${LIB}/libext2fs.so,FWK-ONLY,
-/system/${LIB}/libext4_utils.so,FWK-ONLY,
-/system/${LIB}/libf2fs_sparseblock.so,FWK-ONLY,
-/system/${LIB}/libfilterfw.so,FWK-ONLY,
-/system/${LIB}/libfilterpack_imageproc.so,FWK-ONLY,
-/system/${LIB}/libfmq.so,VNDK,
-/system/${LIB}/libframesequence.so,FWK-ONLY,
-/system/${LIB}/libft2.so,FWK-ONLY-RS,
-/system/${LIB}/libgatekeeper.so,VNDK,
-/system/${LIB}/libgiftranscode.so,FWK-ONLY,
-/system/${LIB}/libgui.so,VNDK,
-/system/${LIB}/libhardware.so,VNDK-SP,
-/system/${LIB}/libhardware_legacy.so,VNDK,
-/system/${LIB}/libharfbuzz_ng.so,FWK-ONLY,
-/system/${LIB}/libhidcommand_jni.so,FWK-ONLY,
-/system/${LIB}/libhidl-gen-utils.so,FWK-ONLY,
-/system/${LIB}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/libhwui.so,FWK-ONLY,
-/system/${LIB}/libicui18n.so,VNDK,Will be FWK-ONLY in the future
-/system/${LIB}/libicuuc.so,VNDK,Will be FWK-ONLY in the future
-/system/${LIB}/libimg_utils.so,FWK-ONLY,
-/system/${LIB}/libincident.so,FWK-ONLY,
-/system/${LIB}/libinput.so,FWK-ONLY,
-/system/${LIB}/libinputflinger.so,FWK-ONLY,
-/system/${LIB}/libinputservice.so,FWK-ONLY,
-/system/${LIB}/libion.so,VNDK-SP,
-/system/${LIB}/libiprouteutil.so,FWK-ONLY,
-/system/${LIB}/libjavacore.so,FWK-ONLY,
-/system/${LIB}/libjavacrypto.so,FWK-ONLY,
-/system/${LIB}/libjni_eglfence.so,FWK-ONLY,
-/system/${LIB}/libjni_filtershow_filters.so,FWK-ONLY,
-/system/${LIB}/libjni_jpegstream.so,FWK-ONLY,
-/system/${LIB}/libjni_jpegutil.so,FWK-ONLY,
-/system/${LIB}/libjni_latinime.so,FWK-ONLY,
-/system/${LIB}/libjni_pacprocessor.so,FWK-ONLY,
-/system/${LIB}/libjni_tinyplanet.so,FWK-ONLY,
-/system/${LIB}/libjnigraphics.so,FWK-ONLY,
-/system/${LIB}/libjpeg.so,VNDK,
-/system/${LIB}/libkeymaster1.so,VNDK,
-/system/${LIB}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/libkeystore-engine.so,FWK-ONLY,
-/system/${LIB}/libkeystore_binder.so,FWK-ONLY,
-/system/${LIB}/libldacBT_abr.so,VNDK,
-/system/${LIB}/libldacBT_enc.so,VNDK,
-/system/${LIB}/liblog.so,LL-NDK,
-/system/${LIB}/liblogcat.so,FWK-ONLY,
-/system/${LIB}/liblogwrap.so,FWK-ONLY,
-/system/${LIB}/liblz4.so,VNDK,
-/system/${LIB}/liblzma.so,VNDK-SP-Indirect,
-/system/${LIB}/libm.so,LL-NDK,
-/system/${LIB}/libmdnssd.so,FWK-ONLY,
-/system/${LIB}/libmedia.so,FWK-ONLY,
-/system/${LIB}/libmedia_helper.so,VNDK,
-/system/${LIB}/libmedia_jni.so,FWK-ONLY,
-/system/${LIB}/libmedia_omx.so,VNDK,
-/system/${LIB}/libmediadrm.so,FWK-ONLY,
-/system/${LIB}/libmediaextractorservice.so,FWK-ONLY,
-/system/${LIB}/libmedialogservice.so,FWK-ONLY,
-/system/${LIB}/libmediametrics.so,FWK-ONLY,
-/system/${LIB}/libmediandk.so,FWK-ONLY-RS,
-/system/${LIB}/libmediautils.so,FWK-ONLY,
-/system/${LIB}/libmemtrack.so,VNDK,
-/system/${LIB}/libmemunreachable.so,FWK-ONLY,
-/system/${LIB}/libmetricslogger.so,FWK-ONLY,
-/system/${LIB}/libmidi.so,FWK-ONLY,
-/system/${LIB}/libminijail.so,VNDK,"Will be FWK-ONLY in the future. Vendor module should link libminijail_vendor.so"
-/system/${LIB}/libminikin.so,FWK-ONLY,
-/system/${LIB}/libmtp.so,FWK-ONLY,
-/system/${LIB}/libnativebridge.so,FWK-ONLY,
-/system/${LIB}/libnativehelper.so,FWK-ONLY,
-/system/${LIB}/libnativeloader.so,FWK-ONLY,
-/system/${LIB}/libnativewindow.so,LL-NDK,
-/system/${LIB}/libnbaio.so,VNDK,"Vendor modules should use libnbaio_mono.so (with less APIs) in the future"
-/system/${LIB}/libnetd_client.so,LL-NDK-Indirect,
-/system/${LIB}/libnetdaidl.so,FWK-ONLY,
-/system/${LIB}/libnetlink.so,FWK-ONLY,
-/system/${LIB}/libnetutils.so,VNDK,
-/system/${LIB}/libnl.so,VNDK,
-/system/${LIB}/libopenjdk.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvm.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmti.so,FWK-ONLY,
-/system/${LIB}/libopus.so,FWK-ONLY,
-/system/${LIB}/libpac.so,FWK-ONLY,
-/system/${LIB}/libpackagelistparser.so,FWK-ONLY,
-/system/${LIB}/libpagemap.so,VNDK,
-/system/${LIB}/libpcap.so,FWK-ONLY,
-/system/${LIB}/libpcre2.so,VNDK,
-/system/${LIB}/libpcrecpp.so,FWK-ONLY,
-/system/${LIB}/libpdfium.so,FWK-ONLY,
-/system/${LIB}/libpiex.so,VNDK,
-/system/${LIB}/libpixelflinger.so,FWK-ONLY,
-/system/${LIB}/libpng.so,VNDK,
-/system/${LIB}/libpower.so,VNDK,
-/system/${LIB}/libpowermanager.so,FWK-ONLY,
-/system/${LIB}/libprintspooler_jni.so,FWK-ONLY,
-/system/${LIB}/libprocessgroup.so,FWK-ONLY,
-/system/${LIB}/libprocinfo.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/libradio.so,FWK-ONLY,
-/system/${LIB}/libradio_metadata.so,VNDK,
-/system/${LIB}/libradioservice.so,FWK-ONLY,
-/system/${LIB}/librs_jni.so,FWK-ONLY,
-/system/${LIB}/librtp_jni.so,FWK-ONLY,
-/system/${LIB}/libschedulerservicehidl.so,FWK-ONLY,
-/system/${LIB}/libselinux.so,FWK-ONLY,"libselinux will be VNDK in the future but not in O"
-/system/${LIB}/libsensor.so,FWK-ONLY,
-/system/${LIB}/libsensorservice.so,FWK-ONLY,
-/system/${LIB}/libsensorservicehidl.so,FWK-ONLY,
-/system/${LIB}/libservices.so,FWK-ONLY,
-/system/${LIB}/libserviceutility.so,FWK-ONLY,
-/system/${LIB}/libsigchain.so,FWK-ONLY,
-/system/${LIB}/libskia.so,FWK-ONLY,
-/system/${LIB}/libsoftkeymaster.so,FWK-ONLY,
-/system/${LIB}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/libsonic.so,FWK-ONLY,
-/system/${LIB}/libsonivox.so,FWK-ONLY,
-/system/${LIB}/libsoundpool.so,FWK-ONLY,
-/system/${LIB}/libsoundtrigger.so,FWK-ONLY,
-/system/${LIB}/libsoundtriggerservice.so,FWK-ONLY,
-/system/${LIB}/libsparse.so,FWK-ONLY,
-/system/${LIB}/libspeexresampler.so,VNDK,
-/system/${LIB}/libsqlite.so,VNDK,
-/system/${LIB}/libssl.so,VNDK,
-/system/${LIB}/libstagefright.so,FWK-ONLY,
-/system/${LIB}/libstagefright_amrnb_common.so,FWK-ONLY,
-/system/${LIB}/libstagefright_enc_common.so,FWK-ONLY,
-/system/${LIB}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/libstagefright_http_support.so,FWK-ONLY,
-/system/${LIB}/libstagefright_omx.so,VNDK,
-/system/${LIB}/libstagefright_soft_aacdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_aacenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_amrdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_amrnbenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_amrwbenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_avcdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_avcenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_flacenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_g711dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_gsmdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_hevcdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mp3dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mpeg2dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mpeg4dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mpeg4enc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_opusdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_rawdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_vorbisdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_vpxdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_vpxenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_xmlparser@1.0.so,FWK-ONLY,
-/system/${LIB}/libstdc++.so,LL-NDK,
-/system/${LIB}/libsurfaceflinger.so,FWK-ONLY,
-/system/${LIB}/libsurfaceflinger_ddmconnection.so,FWK-ONLY,
-/system/${LIB}/libsuspend.so,VNDK,
-/system/${LIB}/libsync.so,LL-NDK,
-/system/${LIB}/libsysutils.so,VNDK,
-/system/${LIB}/libtextclassifier.so,FWK-ONLY,
-/system/${LIB}/libtinyalsa.so,VNDK,
-/system/${LIB}/libtinyxml2.so,VNDK,
-/system/${LIB}/libui.so,VNDK,
-/system/${LIB}/libunwind.so,VNDK-SP-Indirect,
-/system/${LIB}/libunwindstack.so,VNDK-SP-Indirect,
-/system/${LIB}/libusbhost.so,VNDK,
-/system/${LIB}/libutils.so,VNDK-SP,
-/system/${LIB}/libvintf.so,FWK-ONLY,
-/system/${LIB}/libvixl-arm.so,VNDK,
-/system/${LIB}/libvixl-arm64.so,VNDK,
-/system/${LIB}/libvndksupport.so,LL-NDK,
-/system/${LIB}/libvorbisidec.so,FWK-ONLY,
-/system/${LIB}/libvulkan.so,LL-NDK,
-/system/${LIB}/libwebrtc_audio_preprocessing.so,VND-ONLY,This will be moved to vendor partition
-/system/${LIB}/libwebviewchromium_loader.so,FWK-ONLY,
-/system/${LIB}/libwebviewchromium_plat_support.so,FWK-ONLY,
-/system/${LIB}/libwfds.so,FWK-ONLY,
-/system/${LIB}/libwifi-service.so,FWK-ONLY,
-/system/${LIB}/libwifi-system.so,FWK-ONLY,
-/system/${LIB}/libwifikeystorehal.so,FWK-ONLY,
-/system/${LIB}/libwilhelm.so,FWK-ONLY,
-/system/${LIB}/libwnndict.so,FWK-ONLY,
-/system/${LIB}/libxml2.so,VNDK,
-/system/${LIB}/libyuv.so,VNDK,
-/system/${LIB}/libz.so,LL-NDK,
-/system/${LIB}/libziparchive.so,VNDK,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.allocator@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.base@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbacktrace.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libblas.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libc++.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcompiler_rt.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhardware.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libion.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/liblzma.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwind.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwindstack.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libz.so,VNDK-SP,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioroute.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libavservices_minijail.so,VNDK,"Will be FWK-ONLY in the future. Vendor module should link libavservices_minijail_vendor.so"
-/system/${LIB}/vndk${VNDK_VER}/libbinder.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcamera_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-mips-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-mips64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcurl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdiskconfig.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdumpstateutil.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libevent.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexif.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexpat.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libfmq.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgatekeeper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgui.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libhardware_legacy.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libicui18n.so,VNDK,Will be FWK-ONLY in the future
-/system/${LIB}/vndk${VNDK_VER}/libicuuc.so,VNDK,Will be FWK-ONLY in the future
-/system/${LIB}/vndk${VNDK_VER}/libjpeg.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_abr.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_enc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/liblz4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_helper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmemtrack.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libminijail.so,VNDK,"Will be FWK-ONLY in the future. Vendor module should link libminijail_vendor.so"
-/system/${LIB}/vndk${VNDK_VER}/libnbaio.so,VNDK,"Vendor modules should use libnbaio_mono.so (with less APIs) in the future"
-/system/${LIB}/vndk${VNDK_VER}/libnetutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpagemap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpcre2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpiex.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpng.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpower.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprocinfo.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libradio_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libspeexresampler.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsqlite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libssl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsuspend.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsysutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyalsa.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libui.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libusbhost.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm64.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libyuv.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libziparchive.so,VNDK,
-/vendor/${LIB}/libavservices_minijail_vendor.so,VND-ONLY,Framework module should link libavservices_minijail.so
-/vendor/${LIB}/libcld80211.so,VND-ONLY,
-/vendor/${LIB}/libhwc2on1adapter.so,VND-ONLY,
-/vendor/${LIB}/libminijail_vendor.so,VND-ONLY,Framework module should link libminijail.so
-/vendor/${LIB}/libreference-ril.so,VND-ONLY,
-/vendor/${LIB}/libril.so,VND-ONLY,
-/vendor/${LIB}/librilutils.so,VND-ONLY,
-/vendor/${LIB}/libtinycompress.so,VND-ONLY,
-/vendor/${LIB}/libwebrtc_audio_preprocessing.so,VND-ONLY,
-[regex]^.*/android\.hardware\.graphics\.mapper@\d+\.\d+-impl\.so$,SP-HAL,
-[regex]^.*/android\.hardware\.renderscript@1\.0-impl\.so$,SP-HAL,
-[regex]^.*/gralloc\..*\.so$,SP-HAL,
-[regex]^/vendor/.*/libEGL_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLES_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv1_CM_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv2_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv3_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libPVRRS\.so$,SP-HAL,
-[regex]^/vendor/.*/libRSDriver.*\.so$,SP-HAL,
-[regex]^/vendor/.*/vulkan.*\.so$,SP-HAL,
diff --git a/vndk/tools/definition-tool/datasets/eligible-list-27.csv b/vndk/tools/definition-tool/datasets/eligible-list-27.csv
deleted file mode 100644
index 93c3ede0f..000000000
--- a/vndk/tools/definition-tool/datasets/eligible-list-27.csv
+++ /dev/null
@@ -1,585 +0,0 @@
-Path,Tag,Comments
-/system/${LIB}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.3.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/android.hardware.cas.native@1.0.so,VNDK,
-/system/${LIB}/android.hardware.cas@1.0.so,VNDK,
-/system/${LIB}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.allocator@2.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/android.hardware.neuralnetworks@1.0.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/android.hardware.oemlock@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.1.so,VNDK,
-/system/${LIB}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.1.so,VNDK,
-/system/${LIB}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.1.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.1.so,VNDK,
-/system/${LIB}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/android.hardware.weaver@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.offload@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.1.so,VNDK,
-/system/${LIB}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/android.system.net.netd@1.0.so,VNDK,
-/system/${LIB}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/drm/libfwdlockengine.so,FWK-ONLY,
-/system/${LIB}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/hw/audio.a2dp.default.so,FWK-ONLY,
-/system/${LIB}/hw/bluetooth.default.so,FWK-ONLY,
-/system/${LIB}/hw/keystore.default.so,FWK-ONLY,
-/system/${LIB}/ld-android.so,LL-NDK-Indirect,
-/system/${LIB}/libEGL.so,LL-NDK,
-/system/${LIB}/libETC1.so,FWK-ONLY,
-/system/${LIB}/libFFTEm.so,FWK-ONLY,
-/system/${LIB}/libGLESv1_CM.so,LL-NDK,
-/system/${LIB}/libGLESv2.so,LL-NDK,
-/system/${LIB}/libGLESv3.so,LL-NDK,
-/system/${LIB}/libLLVM.so,FWK-ONLY,
-/system/${LIB}/libOpenMAXAL.so,FWK-ONLY,
-/system/${LIB}/libOpenSLES.so,FWK-ONLY,
-/system/${LIB}/libRS.so,LL-NDK,
-/system/${LIB}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/libRScpp.so,FWK-ONLY,
-/system/${LIB}/libWnnEngDic.so,FWK-ONLY,
-/system/${LIB}/libWnnJpnDic.so,FWK-ONLY,
-/system/${LIB}/libaaudio.so,FWK-ONLY,
-/system/${LIB}/libadf.so,VNDK,
-/system/${LIB}/libandroid.so,FWK-ONLY,
-/system/${LIB}/libandroid_net.so,LL-NDK,
-/system/${LIB}/libandroid_runtime.so,FWK-ONLY,
-/system/${LIB}/libandroid_servers.so,FWK-ONLY,
-/system/${LIB}/libandroidfw.so,FWK-ONLY,
-/system/${LIB}/libappfuse.so,FWK-ONLY,
-/system/${LIB}/libart-compiler.so,FWK-ONLY,
-/system/${LIB}/libart-dexlayout.so,FWK-ONLY,
-/system/${LIB}/libart-disassembler.so,FWK-ONLY,
-/system/${LIB}/libart.so,FWK-ONLY,
-/system/${LIB}/libaudioclient.so,FWK-ONLY,
-/system/${LIB}/libaudioeffect_jni.so,FWK-ONLY,
-/system/${LIB}/libaudioflinger.so,FWK-ONLY,
-/system/${LIB}/libaudiohal.so,FWK-ONLY,
-/system/${LIB}/libaudiomanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyenginedefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanagerdefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyservice.so,FWK-ONLY,
-/system/${LIB}/libaudioprocessing.so,FWK-ONLY,
-/system/${LIB}/libaudioroute.so,VNDK,
-/system/${LIB}/libaudiospdif.so,FWK-ONLY,
-/system/${LIB}/libaudioutils.so,VNDK,
-/system/${LIB}/libavservices_minijail.so,FWK-ONLY,"Vendor module should link libavservices_minijail_vendor.so"
-/system/${LIB}/libbacktrace.so,VNDK-SP-Indirect,
-/system/${LIB}/libbase.so,VNDK-SP,
-/system/${LIB}/libbatteryservice.so,FWK-ONLY,
-/system/${LIB}/libbcc.so,FWK-ONLY,
-/system/${LIB}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/libbinder.so,VNDK,
-/system/${LIB}/libbinderwrapper.so,FWK-ONLY,
-/system/${LIB}/libblas.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/libbluetooth_jni.so,FWK-ONLY,
-/system/${LIB}/libbrillo-binder.so,FWK-ONLY,
-/system/${LIB}/libbrillo-stream.so,FWK-ONLY,
-/system/${LIB}/libbrillo.so,FWK-ONLY,
-/system/${LIB}/libc++.so,VNDK-SP,
-/system/${LIB}/libc.so,LL-NDK,
-/system/${LIB}/libc_malloc_debug.so,LL-NDK-Indirect,
-/system/${LIB}/libcamera2ndk.so,FWK-ONLY,
-/system/${LIB}/libcamera_client.so,FWK-ONLY,
-/system/${LIB}/libcamera_metadata.so,VNDK,
-/system/${LIB}/libcameraservice.so,FWK-ONLY,
-/system/${LIB}/libcap.so,VNDK,
-/system/${LIB}/libchrome.so,FWK-ONLY,
-/system/${LIB}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-mips-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-mips64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/libcompiler_rt.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/libcrypto.so,VNDK,
-/system/${LIB}/libcrypto_utils.so,VNDK,
-/system/${LIB}/libcups.so,FWK-ONLY,
-/system/${LIB}/libcurl.so,VNDK,
-/system/${LIB}/libcutils.so,VNDK-SP,
-/system/${LIB}/libdebuggerd_client.so,FWK-ONLY,
-/system/${LIB}/libdefcontainer_jni.so,FWK-ONLY,
-/system/${LIB}/libdiskconfig.so,VNDK,
-/system/${LIB}/libdl.so,LL-NDK,
-/system/${LIB}/libdng_sdk.so,FWK-ONLY,
-/system/${LIB}/libdrmframework.so,FWK-ONLY,
-/system/${LIB}/libdrmframework_jni.so,FWK-ONLY,
-/system/${LIB}/libdumpstateaidl.so,FWK-ONLY,
-/system/${LIB}/libdumpstateutil.so,VNDK,
-/system/${LIB}/libevent.so,VNDK,
-/system/${LIB}/libexif.so,VNDK,
-/system/${LIB}/libexpat.so,VNDK,
-/system/${LIB}/libext2_blkid.so,FWK-ONLY,
-/system/${LIB}/libext2_com_err.so,FWK-ONLY,
-/system/${LIB}/libext2_e2p.so,FWK-ONLY,
-/system/${LIB}/libext2_quota.so,FWK-ONLY,
-/system/${LIB}/libext2_uuid.so,FWK-ONLY,
-/system/${LIB}/libext2fs.so,FWK-ONLY,
-/system/${LIB}/libext4_utils.so,FWK-ONLY,
-/system/${LIB}/libf2fs_sparseblock.so,FWK-ONLY,
-/system/${LIB}/libfilterfw.so,FWK-ONLY,
-/system/${LIB}/libfilterpack_imageproc.so,FWK-ONLY,
-/system/${LIB}/libfmq.so,VNDK,
-/system/${LIB}/libframesequence.so,FWK-ONLY,
-/system/${LIB}/libft2.so,FWK-ONLY-RS,
-/system/${LIB}/libgatekeeper.so,VNDK,
-/system/${LIB}/libgiftranscode.so,FWK-ONLY,
-/system/${LIB}/libgui.so,VNDK,
-/system/${LIB}/libhardware.so,VNDK-SP,
-/system/${LIB}/libhardware_legacy.so,VNDK,
-/system/${LIB}/libharfbuzz_ng.so,FWK-ONLY,
-/system/${LIB}/libhidcommand_jni.so,FWK-ONLY,
-/system/${LIB}/libhidl-gen-utils.so,FWK-ONLY,
-/system/${LIB}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/libhwui.so,FWK-ONLY,
-/system/${LIB}/libicui18n.so,FWK-ONLY,
-/system/${LIB}/libicuuc.so,FWK-ONLY,
-/system/${LIB}/libimg_utils.so,FWK-ONLY,
-/system/${LIB}/libincident.so,FWK-ONLY,
-/system/${LIB}/libinput.so,FWK-ONLY,
-/system/${LIB}/libinputflinger.so,FWK-ONLY,
-/system/${LIB}/libinputservice.so,FWK-ONLY,
-/system/${LIB}/libion.so,VNDK-SP,
-/system/${LIB}/libiperf.so,FWK-ONLY,
-/system/${LIB}/libiprouteutil.so,FWK-ONLY,
-/system/${LIB}/libjavacore.so,FWK-ONLY,
-/system/${LIB}/libjavacrypto.so,FWK-ONLY,
-/system/${LIB}/libjni_eglfence.so,FWK-ONLY,
-/system/${LIB}/libjni_filtershow_filters.so,FWK-ONLY,
-/system/${LIB}/libjni_jpegstream.so,FWK-ONLY,
-/system/${LIB}/libjni_jpegutil.so,FWK-ONLY,
-/system/${LIB}/libjni_latinime.so,FWK-ONLY,
-/system/${LIB}/libjni_pacprocessor.so,FWK-ONLY,
-/system/${LIB}/libjni_tinyplanet.so,FWK-ONLY,
-/system/${LIB}/libjnigraphics.so,FWK-ONLY,
-/system/${LIB}/libjpeg.so,VNDK,
-/system/${LIB}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/libkeymaster_portable.so,VNDK,
-/system/${LIB}/libkeymaster_staging.so,VNDK,
-/system/${LIB}/libkeystore-engine.so,FWK-ONLY,
-/system/${LIB}/libkeystore_binder.so,FWK-ONLY,
-/system/${LIB}/libldacBT_abr.so,VNDK,
-/system/${LIB}/libldacBT_enc.so,VNDK,
-/system/${LIB}/liblog.so,LL-NDK,
-/system/${LIB}/liblogcat.so,FWK-ONLY,
-/system/${LIB}/liblogwrap.so,FWK-ONLY,
-/system/${LIB}/liblz4.so,VNDK,
-/system/${LIB}/liblzma.so,VNDK-SP-Indirect,
-/system/${LIB}/libm.so,LL-NDK,
-/system/${LIB}/libmdnssd.so,FWK-ONLY,
-/system/${LIB}/libmedia.so,FWK-ONLY,
-/system/${LIB}/libmedia_helper.so,VNDK,
-/system/${LIB}/libmedia_jni.so,FWK-ONLY,
-/system/${LIB}/libmedia_omx.so,VNDK,
-/system/${LIB}/libmediadrm.so,FWK-ONLY,
-/system/${LIB}/libmediaextractorservice.so,FWK-ONLY,
-/system/${LIB}/libmedialogservice.so,FWK-ONLY,
-/system/${LIB}/libmediametrics.so,FWK-ONLY,
-/system/${LIB}/libmediandk.so,FWK-ONLY-RS,
-/system/${LIB}/libmediautils.so,FWK-ONLY,
-/system/${LIB}/libmemtrack.so,VNDK,
-/system/${LIB}/libmemunreachable.so,FWK-ONLY,
-/system/${LIB}/libmetricslogger.so,FWK-ONLY,
-/system/${LIB}/libmidi.so,FWK-ONLY,
-/system/${LIB}/libminijail.so,FWK-ONLY,"Vendor module should link libminijail_vendor.so"
-/system/${LIB}/libminikin.so,FWK-ONLY,
-/system/${LIB}/libmtp.so,FWK-ONLY,
-/system/${LIB}/libnativebridge.so,FWK-ONLY,
-/system/${LIB}/libnativehelper.so,FWK-ONLY,
-/system/${LIB}/libnativeloader.so,FWK-ONLY,
-/system/${LIB}/libnativewindow.so,LL-NDK,
-/system/${LIB}/libnbaio.so,FWK-ONLY,"Vendor module should link libnbaio_mono.so"
-/system/${LIB}/libnetd_client.so,LL-NDK-Indirect,
-/system/${LIB}/libnetdaidl.so,FWK-ONLY,
-/system/${LIB}/libnetlink.so,FWK-ONLY,
-/system/${LIB}/libnetutils.so,VNDK,
-/system/${LIB}/libnl.so,VNDK,
-/system/${LIB}/libopenjdk.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvm.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmti.so,FWK-ONLY,
-/system/${LIB}/libopus.so,VNDK,
-/system/${LIB}/libpac.so,FWK-ONLY,
-/system/${LIB}/libpackagelistparser.so,FWK-ONLY,
-/system/${LIB}/libpagemap.so,VNDK,
-/system/${LIB}/libpcap.so,FWK-ONLY,
-/system/${LIB}/libpcre2.so,VNDK,
-/system/${LIB}/libpcrecpp.so,FWK-ONLY,
-/system/${LIB}/libpdfium.so,FWK-ONLY,
-/system/${LIB}/libpiex.so,VNDK,
-/system/${LIB}/libpixelflinger.so,FWK-ONLY,
-/system/${LIB}/libpng.so,VNDK,
-/system/${LIB}/libpower.so,VNDK,
-/system/${LIB}/libpowermanager.so,FWK-ONLY,
-/system/${LIB}/libprintspooler_jni.so,FWK-ONLY,
-/system/${LIB}/libprocessgroup.so,FWK-ONLY,
-/system/${LIB}/libprocinfo.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/libradio_metadata.so,VNDK,
-/system/${LIB}/librs_jni.so,FWK-ONLY,
-/system/${LIB}/librtp_jni.so,FWK-ONLY,
-/system/${LIB}/libschedulerservicehidl.so,FWK-ONLY,
-/system/${LIB}/libselinux.so,FWK-ONLY,"libselinux will be VNDK in the future but not in O-MR1"
-/system/${LIB}/libsensor.so,FWK-ONLY,
-/system/${LIB}/libsensorservice.so,FWK-ONLY,
-/system/${LIB}/libsensorservicehidl.so,FWK-ONLY,
-/system/${LIB}/libservices.so,FWK-ONLY,
-/system/${LIB}/libserviceutility.so,FWK-ONLY,
-/system/${LIB}/libsigchain.so,FWK-ONLY,
-/system/${LIB}/libskia.so,FWK-ONLY,
-/system/${LIB}/libsoftkeymaster.so,FWK-ONLY,
-/system/${LIB}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/libsonic.so,FWK-ONLY,
-/system/${LIB}/libsonivox.so,FWK-ONLY,
-/system/${LIB}/libsoundpool.so,FWK-ONLY,
-/system/${LIB}/libsoundtrigger.so,FWK-ONLY,
-/system/${LIB}/libsoundtriggerservice.so,FWK-ONLY,
-/system/${LIB}/libsparse.so,FWK-ONLY,
-/system/${LIB}/libspeexresampler.so,VNDK,
-/system/${LIB}/libsqlite.so,VNDK,
-/system/${LIB}/libssl.so,VNDK,
-/system/${LIB}/libstagefright.so,FWK-ONLY,
-/system/${LIB}/libstagefright_amrnb_common.so,VNDK,
-/system/${LIB}/libstagefright_enc_common.so,VNDK,
-/system/${LIB}/libstagefright_flacdec.so,VNDK,
-/system/${LIB}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/libstagefright_http_support.so,FWK-ONLY,
-/system/${LIB}/libstagefright_omx.so,VNDK,
-/system/${LIB}/libstagefright_omx_utils.so,VNDK,
-/system/${LIB}/libstagefright_soft_aacdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_aacenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_amrdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_amrnbenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_amrwbenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_avcdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_avcenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_flacdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_flacenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_g711dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_gsmdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_hevcdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mp3dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mpeg2dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mpeg4dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mpeg4enc.so,VNDK,
-/system/${LIB}/libstagefright_soft_opusdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_rawdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_vorbisdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_vpxdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_vpxenc.so,VNDK,
-/system/${LIB}/libstagefright_xmlparser.so,VNDK,
-/system/${LIB}/libstdc++.so,FWK-ONLY,
-/system/${LIB}/libsurfaceflinger.so,FWK-ONLY,
-/system/${LIB}/libsurfaceflinger_ddmconnection.so,FWK-ONLY,
-/system/${LIB}/libsuspend.so,VNDK,
-/system/${LIB}/libsync.so,LL-NDK,
-/system/${LIB}/libsysutils.so,VNDK,
-/system/${LIB}/libtextclassifier.so,FWK-ONLY,
-/system/${LIB}/libtinyalsa.so,VNDK,
-/system/${LIB}/libtinyxml2.so,VNDK,
-/system/${LIB}/libui.so,VNDK,
-/system/${LIB}/libunwind.so,VNDK-SP-Indirect,
-/system/${LIB}/libunwindstack.so,VNDK-SP-Indirect,
-/system/${LIB}/libusbhost.so,VNDK,
-/system/${LIB}/libutils.so,VNDK-SP,
-/system/${LIB}/libvintf.so,FWK-ONLY,
-/system/${LIB}/libvixl-arm.so,VNDK,
-/system/${LIB}/libvixl-arm64.so,VNDK,
-/system/${LIB}/libvndksupport.so,LL-NDK,
-/system/${LIB}/libvorbisidec.so,VNDK,
-/system/${LIB}/libvulkan.so,LL-NDK,
-/system/${LIB}/libwebviewchromium_loader.so,FWK-ONLY,
-/system/${LIB}/libwebviewchromium_plat_support.so,FWK-ONLY,
-/system/${LIB}/libwfds.so,FWK-ONLY,
-/system/${LIB}/libwifi-service.so,FWK-ONLY,
-/system/${LIB}/libwifi-system-iface.so,VNDK,
-/system/${LIB}/libwifi-system.so,FWK-ONLY,
-/system/${LIB}/libwifikeystorehal.so,FWK-ONLY,
-/system/${LIB}/libwilhelm.so,FWK-ONLY,
-/system/${LIB}/libwnndict.so,FWK-ONLY,
-/system/${LIB}/libxml2.so,VNDK,
-/system/${LIB}/libyuv.so,VNDK,
-/system/${LIB}/libz.so,VNDK-SP,
-/system/${LIB}/libziparchive.so,VNDK,
-/system/${LIB}/tests.vendor@1.0.so,VNDK,
-/system/${LIB}/tests.vendor@1.1.so,VNDK,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.allocator@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbacktrace.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libblas.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libc++.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcompiler_rt.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhardware.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libion.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/liblzma.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwind.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwindstack.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp${VNDK_VER}/libutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libz.so,VNDK-SP,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas.native@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.neuralnetworks@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.oemlock@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.weaver@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.offload@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.net.netd@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libadf.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioroute.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libbinder.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcamera_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-mips-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-mips64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcurl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdiskconfig.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdumpstateutil.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libevent.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexif.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexpat.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libfmq.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgatekeeper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgui.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libhardware_legacy.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libjpeg.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_portable.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_staging.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_abr.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_enc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/liblz4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_helper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmemtrack.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnetutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libopus.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpagemap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpcre2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpiex.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpng.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpower.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprocinfo.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libradio_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libspeexresampler.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsqlite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libssl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_amrnb_common.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_enc_common.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_flacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_aacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_aacenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_amrdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_amrnbenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_amrwbenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_avcdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_avcenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_flacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_flacenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_g711dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_gsmdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_hevcdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mp3dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mpeg2dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mpeg4dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mpeg4enc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_opusdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_rawdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_vorbisdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_vpxdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_vpxenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_xmlparser.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsuspend.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsysutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyalsa.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libui.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libusbhost.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm64.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvorbisidec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libwifi-system-iface.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libyuv.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libziparchive.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/tests.vendor@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/tests.vendor@1.1.so,VNDK,
-/vendor/${LIB}/libavservices_minijail_vendor.so,VND-ONLY,Framework module should link libavservices_minijail.so
-/vendor/${LIB}/libcld80211.so,VND-ONLY,
-/vendor/${LIB}/libeffects.so,VND-ONLY,
-/vendor/${LIB}/libhwc2on1adapter.so,VND-ONLY,
-/vendor/${LIB}/libminijail_vendor.so,VND-ONLY,Framework module should link libminijail.so
-/vendor/${LIB}/libnbaio_mono.so,VND-ONLY,
-/vendor/${LIB}/libreference-ril.so,VND-ONLY,
-/vendor/${LIB}/libril.so,VND-ONLY,
-/vendor/${LIB}/librilutils.so,VND-ONLY,
-/vendor/${LIB}/libtinycompress.so,VND-ONLY,
-/vendor/${LIB}/libwebrtc_audio_preprocessing.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libaudiopreprocessing.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libbundlewrapper.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libdownmix.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libeffectproxy.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libldnhncr.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libreverbwrapper.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libvisualizer.so,VND-ONLY,
-[regex]^.*/android\.hardware\.graphics\.mapper@\d+\.\d+-impl\.so$,SP-HAL,
-[regex]^.*/android\.hardware\.renderscript@1\.0-impl\.so$,SP-HAL,
-[regex]^.*/gralloc\..*\.so$,SP-HAL,
-[regex]^/vendor/.*/libEGL_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLES_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv1_CM_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv2_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv3_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libPVRRS\.so$,SP-HAL,
-[regex]^/vendor/.*/libRSDriver.*\.so$,SP-HAL,
-[regex]^/vendor/.*/vulkan.*\.so$,SP-HAL,
diff --git a/vndk/tools/definition-tool/datasets/eligible-list-28-properties.csv b/vndk/tools/definition-tool/datasets/eligible-list-28-properties.csv
deleted file mode 100644
index 799452248..000000000
--- a/vndk/tools/definition-tool/datasets/eligible-list-28-properties.csv
+++ /dev/null
@@ -1,435 +0,0 @@
-name,vndk,vndk_sp,vendor_available,rule
-android.frameworks.displayservice@1.0,True,False,True,hidl_interface
-android.frameworks.displayservice@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.schedulerservice@1.0,True,False,True,hidl_interface
-android.frameworks.schedulerservice@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.sensorservice@1.0,True,False,True,hidl_interface
-android.frameworks.sensorservice@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.vr.composer@1.0,True,False,True,hidl_interface
-android.frameworks.vr.composer@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common-util,True,False,True,cc_library_shared
-android.hardware.audio.common@2.0,True,False,True,hidl_interface
-android.hardware.audio.common@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common@2.0-util,True,False,True,cc_library_shared
-android.hardware.audio.common@4.0,True,False,True,hidl_interface
-android.hardware.audio.common@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common@4.0-util,True,False,True,cc_library_shared
-android.hardware.audio.effect@2.0,True,False,True,hidl_interface
-android.hardware.audio.effect@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.effect@4.0,True,False,True,hidl_interface
-android.hardware.audio.effect@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio@2.0,True,False,True,hidl_interface
-android.hardware.audio@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio@4.0,True,False,True,hidl_interface
-android.hardware.audio@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.authsecret@1.0,True,False,True,hidl_interface
-android.hardware.authsecret@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.automotive.audiocontrol@1.0,True,False,True,hidl_interface
-android.hardware.automotive.audiocontrol@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.automotive.evs@1.0,True,False,True,hidl_interface
-android.hardware.automotive.evs@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.automotive.vehicle@2.0,True,False,True,hidl_interface
-android.hardware.automotive.vehicle@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.biometrics.fingerprint@2.1,True,False,True,hidl_interface
-android.hardware.biometrics.fingerprint@2.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.bluetooth.a2dp@1.0,True,False,True,hidl_interface
-android.hardware.bluetooth.a2dp@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.bluetooth@1.0,True,False,True,hidl_interface
-android.hardware.bluetooth@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.boot@1.0,True,False,True,hidl_interface
-android.hardware.boot@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.0,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.1,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.broadcastradio@2.0,True,False,True,hidl_interface
-android.hardware.broadcastradio@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.common@1.0,True,False,True,hidl_interface
-android.hardware.camera.common@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@1.0,True,False,True,hidl_interface
-android.hardware.camera.device@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.2,True,False,True,hidl_interface
-android.hardware.camera.device@3.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.3,True,False,True,hidl_interface
-android.hardware.camera.device@3.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.4,True,False,True,hidl_interface
-android.hardware.camera.device@3.4-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.2,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.3,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.provider@2.4,True,False,True,hidl_interface
-android.hardware.camera.provider@2.4-adapter-helper,True,False,True,hidl_interface
-android.hardware.cas.native@1.0,True,False,True,hidl_interface
-android.hardware.cas.native@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.cas@1.0,True,False,True,hidl_interface
-android.hardware.cas@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.configstore-utils,True,False,True,cc_library_shared
-android.hardware.configstore@1.0,True,False,True,hidl_interface
-android.hardware.configstore@1.1,True,False,True,hidl_interface
-android.hardware.configstore@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.confirmationui-support-lib,True,False,True,cc_library
-android.hardware.confirmationui@1.0,True,False,True,hidl_interface
-android.hardware.confirmationui@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.contexthub@1.0,True,False,True,hidl_interface
-android.hardware.contexthub@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.drm@1.0,True,False,True,hidl_interface
-android.hardware.drm@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.drm@1.1,True,False,True,hidl_interface
-android.hardware.drm@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.dumpstate@1.0,True,False,True,hidl_interface
-android.hardware.dumpstate@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gatekeeper@1.0,True,False,True,hidl_interface
-android.hardware.gatekeeper@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss@1.0,True,False,True,hidl_interface
-android.hardware.gnss@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss@1.1,True,False,True,hidl_interface
-android.hardware.gnss@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.allocator@2.0,True,False,True,hidl_interface
-android.hardware.graphics.allocator@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.bufferqueue@1.0,True,False,True,hidl_interface
-android.hardware.graphics.bufferqueue@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.common@1.0,True,True,True,hidl_interface
-android.hardware.graphics.common@1.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.common@1.1,True,True,True,hidl_interface
-android.hardware.graphics.common@1.1-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.composer@2.1,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.2,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.mapper@2.0,True,True,True,hidl_interface
-android.hardware.graphics.mapper@2.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.mapper@2.1,True,True,True,hidl_interface
-android.hardware.graphics.mapper@2.1-adapter-helper,True,True,True,hidl_interface
-android.hardware.health@1.0,True,False,True,hidl_interface
-android.hardware.health@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.health@2.0,True,False,True,hidl_interface
-android.hardware.health@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.ir@1.0,True,False,True,hidl_interface
-android.hardware.ir@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.keymaster@3.0,True,False,True,hidl_interface
-android.hardware.keymaster@3.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.keymaster@4.0,True,False,True,hidl_interface
-android.hardware.keymaster@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.light@2.0,True,False,True,hidl_interface
-android.hardware.light@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media.bufferpool@1.0,True,False,True,hidl_interface
-android.hardware.media.bufferpool@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media.omx@1.0,True,False,True,hidl_interface
-android.hardware.media.omx@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media@1.0,True,False,True,hidl_interface
-android.hardware.media@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.memtrack@1.0,True,False,True,hidl_interface
-android.hardware.memtrack@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.0,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.1,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.nfc@1.0,True,False,True,hidl_interface
-android.hardware.nfc@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.nfc@1.1,True,False,True,hidl_interface
-android.hardware.nfc@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.oemlock@1.0,True,False,True,hidl_interface
-android.hardware.oemlock@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.0,True,False,True,hidl_interface
-android.hardware.power@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.1,True,False,True,hidl_interface
-android.hardware.power@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.2,True,False,True,hidl_interface
-android.hardware.power@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio.config@1.0,True,False,True,hidl_interface
-android.hardware.radio.config@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio.deprecated@1.0,True,False,True,hidl_interface
-android.hardware.radio.deprecated@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.0,True,False,True,hidl_interface
-android.hardware.radio@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.1,True,False,True,hidl_interface
-android.hardware.radio@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.2,True,False,True,hidl_interface
-android.hardware.radio@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.renderscript@1.0,True,True,True,hidl_interface
-android.hardware.renderscript@1.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.secure_element@1.0,True,False,True,hidl_interface
-android.hardware.secure_element@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.sensors@1.0,True,False,True,hidl_interface
-android.hardware.sensors@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.0,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.0-core,True,False,True,cc_library_shared
-android.hardware.soundtrigger@2.1,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.tests.bar@1.0,False,False,True,hidl_interface
-android.hardware.tests.bar@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.baz@1.0,False,False,True,hidl_interface
-android.hardware.tests.baz@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.expression@1.0,False,False,True,hidl_interface
-android.hardware.tests.expression@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.extension.light@2.0,False,False,True,hidl_interface
-android.hardware.tests.extension.light@2.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.foo@1.0,False,False,True,hidl_interface
-android.hardware.tests.foo@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.hash@1.0,False,False,True,hidl_interface
-android.hardware.tests.hash@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.inheritance@1.0,False,False,True,hidl_interface
-android.hardware.tests.inheritance@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.libhwbinder@1.0,False,False,True,hidl_interface
-android.hardware.tests.libhwbinder@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.memory@1.0,False,False,True,hidl_interface
-android.hardware.tests.memory@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.msgq@1.0,False,False,True,hidl_interface
-android.hardware.tests.msgq@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.multithread@1.0,False,False,True,hidl_interface
-android.hardware.tests.multithread@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.pointer@1.0,False,False,True,hidl_interface
-android.hardware.tests.pointer@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.trie@1.0,False,False,True,hidl_interface
-android.hardware.tests.trie@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tetheroffload.config@1.0,True,False,True,hidl_interface
-android.hardware.tetheroffload.config@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.tetheroffload.control@1.0,True,False,True,hidl_interface
-android.hardware.tetheroffload.control@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.thermal@1.0,True,False,True,hidl_interface
-android.hardware.thermal@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.thermal@1.1,True,False,True,hidl_interface
-android.hardware.thermal@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.tv.cec@1.0,True,False,True,hidl_interface
-android.hardware.tv.cec@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.tv.input@1.0,True,False,True,hidl_interface
-android.hardware.tv.input@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb.gadget@1.0,True,False,True,hidl_interface
-android.hardware.usb.gadget@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb@1.0,True,False,True,hidl_interface
-android.hardware.usb@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb@1.1,True,False,True,hidl_interface
-android.hardware.usb@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.0,True,False,True,hidl_interface
-android.hardware.vibrator@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.1,True,False,True,hidl_interface
-android.hardware.vibrator@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.2,True,False,True,hidl_interface
-android.hardware.vibrator@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.vr@1.0,True,False,True,hidl_interface
-android.hardware.vr@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.weaver@1.0,True,False,True,hidl_interface
-android.hardware.weaver@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.hostapd@1.0,True,False,True,hidl_interface
-android.hardware.wifi.hostapd@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.offload@1.0,True,False,True,hidl_interface
-android.hardware.wifi.offload@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.0,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.1,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.0,True,False,True,hidl_interface
-android.hardware.wifi@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.1,True,False,True,hidl_interface
-android.hardware.wifi@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.2,True,False,True,hidl_interface
-android.hardware.wifi@1.2-adapter-helper,True,False,True,hidl_interface
-android.hidl.allocator@1.0,True,False,True,hidl_interface
-android.hidl.allocator@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.base@1.0,True,False,True,hidl_interface
-android.hidl.base@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.manager@1.0,True,False,True,hidl_interface
-android.hidl.manager@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.manager@1.1,True,False,True,hidl_interface
-android.hidl.manager@1.1-adapter-helper,True,False,True,hidl_interface
-android.hidl.memory.block@1.0,True,False,True,hidl_interface
-android.hidl.memory.block@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.memory.token@1.0,True,True,True,hidl_interface
-android.hidl.memory.token@1.0-adapter-helper,True,True,True,hidl_interface
-android.hidl.memory@1.0,True,True,True,hidl_interface
-android.hidl.memory@1.0-adapter-helper,True,True,True,hidl_interface
-android.hidl.memory@1.0-impl,True,True,True,cc_library_shared
-android.hidl.token@1.0,True,False,True,hidl_interface
-android.hidl.token@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.token@1.0-utils,True,False,True,cc_library
-android.system.net.netd@1.0,True,False,True,hidl_interface
-android.system.net.netd@1.0-adapter-helper,True,False,True,hidl_interface
-android.system.net.netd@1.1,True,False,True,hidl_interface
-android.system.net.netd@1.1-adapter-helper,True,False,True,hidl_interface
-android.system.wifi.keystore@1.0,True,False,True,hidl_interface
-android.system.wifi.keystore@1.0-adapter-helper,True,False,True,hidl_interface
-hardware.google.media.c2@1.0,False,False,True,hidl_interface
-hardware.google.media.c2@1.0-adapter-helper,False,False,True,hidl_interface
-hardware.google.pixelstats@1.0,False,False,True,hidl_interface
-hardware.google.pixelstats@1.0-adapter-helper,False,False,True,hidl_interface
-hidl.tests.vendor@1.0,False,False,True,hidl_interface
-hidl.tests.vendor@1.0-adapter-helper,False,False,True,hidl_interface
-hidl.tests.vendor@1.1,False,False,True,hidl_interface
-hidl.tests.vendor@1.1-adapter-helper,False,False,True,hidl_interface
-libRSCpuRef,True,True,True,cc_library_shared
-libRSDriver,True,True,True,cc_library_shared
-libRS_internal,True,True,True,cc_library_shared
-libadf,True,False,True,cc_library
-libasyncio,False,False,True,cc_library
-libaudioroute,True,False,True,cc_library_shared
-libaudioutils,True,False,True,cc_library
-libbacktrace,True,True,False,cc_library
-libbase,True,True,True,cc_library
-libbcinfo,True,True,True,cc_library_shared
-libbinder,True,False,True,cc_library
-libblas,True,True,False,cc_library_shared
-libc++,True,True,True,cc_library_shared
-libcamera_metadata,True,False,True,cc_library_shared
-libcap,True,False,True,cc_library
-libchrome,False,False,True,cc_library
-libclang_rt.ubsan_standalone-aarch64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-arm-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-i686-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-mips-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-mips64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-x86_64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libcn-cbor,True,False,True,cc_library
-libcodec2_hidl_utils@1.0,False,False,True,cc_library
-libcompiler_rt,True,True,False,cc_library
-libcrypto,True,False,True,cc_library
-libcrypto_utils,True,False,True,cc_library
-libcurl,True,False,True,cc_library
-libcutils,True,True,True,cc_library
-libdemangle,False,False,True,cc_library
-libdiskconfig,True,False,True,cc_library
-libdng_sdk,False,False,True,cc_library
-libdrm,False,False,True,cc_library
-libdumpstateutil,True,False,True,cc_library_shared
-libeffectsconfig,False,False,True,cc_library
-libevent,True,False,True,cc_library
-libexif,True,False,True,cc_library_shared
-libexpat,True,False,True,cc_library
-libfmq,True,False,True,cc_library_shared
-libgatekeeper,True,False,True,cc_library_shared
-libgtest_prod,False,False,True,cc_library
-libgui,True,False,False,cc_library_shared
-libhardware,True,True,True,cc_library_shared
-libhardware_legacy,True,False,True,cc_library_shared
-libhidladapter,False,False,True,cc_library
-libhidlallocatorutils,True,False,True,cc_library
-libhidlbase,True,True,True,cc_library
-libhidlcache,True,False,True,cc_library
-libhidlmemory,True,True,True,cc_library
-libhidltransport,True,True,True,cc_library
-libhwbinder,True,True,True,cc_library
-libhwbinder_noltopgo,True,True,True,cc_library
-libion,True,True,True,cc_library
-libjpeg,True,False,True,cc_library
-libkeymaster4,False,False,True,cc_library_shared
-libkeymaster4support,False,False,True,cc_library
-libkeymaster_messages,True,False,True,cc_library_shared
-libkeymaster_portable,True,False,True,cc_library
-liblayers_proto,False,False,True,cc_library_shared
-libldacBT_abr,True,False,True,cc_library_shared
-libldacBT_enc,True,False,True,cc_library_shared
-liblz4,True,False,True,cc_library
-liblzma,True,True,True,cc_library
-libmedia_helper,True,False,True,cc_library
-libmedia_omx,True,False,True,cc_library_shared
-libmemtrack,True,False,True,cc_library_shared
-libminijail,True,False,True,cc_library
-libmkbootimg_abi_check,True,False,True,cc_library
-libnetutils,True,False,True,cc_library_shared
-libnl,True,False,True,cc_library
-libopus,True,False,True,cc_library_shared
-libpagemap,True,False,True,cc_library
-libpcap,False,False,True,cc_library
-libpcre2,True,False,True,cc_library
-libperfmgr,False,False,True,cc_library
-libpiex,True,False,True,cc_library_shared
-libpng,True,False,True,cc_library
-libpower,True,False,True,cc_library
-libprocinfo,True,False,True,cc_library
-libprotobuf-cpp-full,True,False,True,cc_library_shared
-libprotobuf-cpp-full-rtti,False,False,True,cc_library_shared
-libprotobuf-cpp-lite,True,False,True,cc_library
-libprotobuf-cpp-lite-rtti,False,False,True,cc_library_shared
-libpuresoftkeymasterdevice,True,False,True,cc_library
-libradio_metadata,True,False,True,cc_library_shared
-libselinux,True,False,True,cc_library
-libsoftkeymasterdevice,True,False,True,cc_library
-libspeexresampler,True,False,True,cc_library_shared
-libsqlite,True,False,True,cc_library
-libssl,True,False,True,cc_library
-libstagefright_amrnb_common,True,False,True,cc_library_shared
-libstagefright_bufferpool@1.0,False,False,True,cc_library
-libstagefright_bufferqueue_helper,True,False,True,cc_library_shared
-libstagefright_codec2,False,False,True,cc_library_shared
-libstagefright_codec2_vndk,False,False,True,cc_library_shared
-libstagefright_enc_common,True,False,True,cc_library
-libstagefright_flacdec,True,False,True,cc_library
-libstagefright_foundation,True,False,True,cc_library
-libstagefright_omx,True,False,True,cc_library_shared
-libstagefright_omx_utils,True,False,True,cc_library_shared
-libstagefright_simple_c2component,False,False,True,cc_library_shared
-libstagefright_soft_aacdec,True,False,True,cc_library_shared
-libstagefright_soft_aacenc,True,False,True,cc_library_shared
-libstagefright_soft_amrdec,True,False,True,cc_library_shared
-libstagefright_soft_amrnbenc,True,False,True,cc_library_shared
-libstagefright_soft_amrwbenc,True,False,True,cc_library_shared
-libstagefright_soft_avcdec,True,False,True,cc_library_shared
-libstagefright_soft_avcenc,True,False,True,cc_library_shared
-libstagefright_soft_c2aacdec,False,False,True,cc_library_shared
-libstagefright_soft_c2aacenc,False,False,True,cc_library_shared
-libstagefright_soft_c2amrnbdec,False,False,True,cc_library_shared
-libstagefright_soft_c2amrnbenc,False,False,True,cc_library_shared
-libstagefright_soft_c2amrwbdec,False,False,True,cc_library_shared
-libstagefright_soft_c2amrwbenc,False,False,True,cc_library_shared
-libstagefright_soft_c2avcdec,False,False,True,cc_library_shared
-libstagefright_soft_c2avcenc,False,False,True,cc_library_shared
-libstagefright_soft_c2flacdec,False,False,True,cc_library_shared
-libstagefright_soft_c2flacenc,False,False,True,cc_library_shared
-libstagefright_soft_c2g711alawdec,False,False,True,cc_library_shared
-libstagefright_soft_c2g711mlawdec,False,False,True,cc_library_shared
-libstagefright_soft_c2gsmdec,False,False,True,cc_library_shared
-libstagefright_soft_c2h263dec,False,False,True,cc_library_shared
-libstagefright_soft_c2h263enc,False,False,True,cc_library_shared
-libstagefright_soft_c2hevcdec,False,False,True,cc_library_shared
-libstagefright_soft_c2mp3dec,False,False,True,cc_library_shared
-libstagefright_soft_c2mpeg2dec,False,False,True,cc_library_shared
-libstagefright_soft_c2mpeg4dec,False,False,True,cc_library_shared
-libstagefright_soft_c2mpeg4enc,False,False,True,cc_library_shared
-libstagefright_soft_c2opusdec,False,False,True,cc_library_shared
-libstagefright_soft_c2rawdec,False,False,True,cc_library_shared
-libstagefright_soft_c2vorbisdec,False,False,True,cc_library_shared
-libstagefright_soft_c2vp8dec,False,False,True,cc_library_shared
-libstagefright_soft_c2vp8enc,False,False,True,cc_library_shared
-libstagefright_soft_c2vp9dec,False,False,True,cc_library_shared
-libstagefright_soft_c2vp9enc,False,False,True,cc_library_shared
-libstagefright_soft_flacdec,True,False,True,cc_library_shared
-libstagefright_soft_flacenc,True,False,True,cc_library_shared
-libstagefright_soft_g711dec,True,False,True,cc_library_shared
-libstagefright_soft_gsmdec,True,False,True,cc_library_shared
-libstagefright_soft_hevcdec,True,False,True,cc_library_shared
-libstagefright_soft_mp3dec,True,False,True,cc_library_shared
-libstagefright_soft_mpeg2dec,True,False,True,cc_library_shared
-libstagefright_soft_mpeg4dec,True,False,True,cc_library_shared
-libstagefright_soft_mpeg4enc,True,False,True,cc_library_shared
-libstagefright_soft_opusdec,True,False,True,cc_library_shared
-libstagefright_soft_rawdec,True,False,True,cc_library_shared
-libstagefright_soft_vorbisdec,True,False,True,cc_library_shared
-libstagefright_soft_vpxdec,True,False,True,cc_library_shared
-libstagefright_soft_vpxenc,True,False,True,cc_library_shared
-libstagefright_xmlparser,True,False,True,cc_library_shared
-libsuspend,True,False,True,cc_library
-libsysutils,True,False,True,cc_library_shared
-libtextclassifier_hash,False,False,True,cc_library_shared
-libtinyalsa,True,False,True,cc_library
-libtinyxml2,True,False,True,cc_library
-libui,True,False,True,cc_library_shared
-libunwind,True,True,False,cc_library
-libunwindstack,True,True,True,cc_library
-libusb,False,False,True,cc_library
-libusbhost,True,False,True,cc_library
-libutils,True,True,True,cc_library
-libutilscallstack,True,True,True,cc_library
-libv4l2_c2componentstore,False,False,True,cc_library_shared
-libvixl-arm,True,False,True,cc_library
-libvixl-arm64,True,False,True,cc_library
-libvorbisidec,True,False,True,cc_library
-libwifi-system-iface,True,False,True,cc_library
-libxml2,True,False,True,cc_library
-libyuv,True,False,True,cc_library
-libz,True,True,True,cc_library
-libziparchive,True,False,True,cc_library
-vendor.nxp.nxpese@1.0,False,False,True,hidl_interface
-vendor.nxp.nxpese@1.0-adapter-helper,False,False,True,hidl_interface
-vendor.nxp.nxpnfc@1.0,False,False,True,hidl_interface
-vendor.nxp.nxpnfc@1.0-adapter-helper,False,False,True,hidl_interface
diff --git a/vndk/tools/definition-tool/datasets/eligible-list-28.csv b/vndk/tools/definition-tool/datasets/eligible-list-28.csv
deleted file mode 100644
index 76f50aa9e..000000000
--- a/vndk/tools/definition-tool/datasets/eligible-list-28.csv
+++ /dev/null
@@ -1,750 +0,0 @@
-Path,Tag,Comments
-/apex/com.android.runtime/${LIB}/bionic/libc.so,LL-NDK,
-/apex/com.android.runtime/${LIB}/bionic/libdl.so,LL-NDK,
-/apex/com.android.runtime/${LIB}/bionic/libm.so,LL-NDK,
-/system/${LIB}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common-util.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@4.0-util.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@4.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@4.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@4.0.so,VNDK,
-/system/${LIB}/android.hardware.authsecret@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.audiocontrol@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth.a2dp@1.0.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.3.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.4.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.3.so,VNDK,
-/system/${LIB}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/android.hardware.cas.native@1.0.so,VNDK,
-/system/${LIB}/android.hardware.cas@1.0.so,VNDK,
-/system/${LIB}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/android.hardware.configstore@1.1.so,VNDK,
-/system/${LIB}/android.hardware.confirmationui-support-lib.so,VNDK,
-/system/${LIB}/android.hardware.confirmationui@1.0.so,VNDK,
-/system/${LIB}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.1.so,VNDK,
-/system/${LIB}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss@1.1.so,VNDK,
-/system/${LIB}/android.hardware.graphics.allocator@2.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.common@1.1.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/android.hardware.graphics.composer@2.2.so,VNDK,
-/system/${LIB}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.mapper@2.1.so,VNDK-SP,
-/system/${LIB}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/android.hardware.health@2.0.so,VNDK,
-/system/${LIB}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/android.hardware.keymaster@4.0.so,VNDK,
-/system/${LIB}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/android.hardware.media.bufferpool@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/android.hardware.neuralnetworks@1.0.so,VNDK,
-/system/${LIB}/android.hardware.neuralnetworks@1.1.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.1.so,VNDK,
-/system/${LIB}/android.hardware.oemlock@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.1.so,VNDK,
-/system/${LIB}/android.hardware.power@1.2.so,VNDK,
-/system/${LIB}/android.hardware.radio.config@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.2.so,VNDK,
-/system/${LIB}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.secure_element@1.0.so,VNDK,
-/system/${LIB}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.0-core.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.1.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.1.so,VNDK,
-/system/${LIB}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb.gadget@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.1.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.1.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.2.so,VNDK,
-/system/${LIB}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/android.hardware.weaver@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.hostapd@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.offload@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.1.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.1.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.2.so,VNDK,
-/system/${LIB}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/android.hidl.memory.block@1.0.so,VNDK,
-/system/${LIB}/android.hidl.memory.token@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/android.system.net.netd@1.0.so,VNDK,
-/system/${LIB}/android.system.net.netd@1.1.so,VNDK,
-/system/${LIB}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/drm/libfwdlockengine.so,FWK-ONLY,
-/system/${LIB}/extractors/libaacextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libamrextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libflacextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmidiextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmkvextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmp3extractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmp4extractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmpeg2extractor.so,FWK-ONLY,
-/system/${LIB}/extractors/liboggextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libwavextractor.so,FWK-ONLY,
-/system/${LIB}/hidl.tests.vendor@1.0.so,FWK-ONLY,
-/system/${LIB}/hidl.tests.vendor@1.1.so,FWK-ONLY,
-/system/${LIB}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP,
-/system/${LIB}/hw/audio.a2dp.default.so,FWK-ONLY,
-/system/${LIB}/ld-android.so,LL-NDK-Private,
-/system/${LIB}/libEGL.so,LL-NDK,
-/system/${LIB}/libETC1.so,FWK-ONLY,
-/system/${LIB}/libFFTEm.so,FWK-ONLY,
-/system/${LIB}/libGLESv1_CM.so,LL-NDK,
-/system/${LIB}/libGLESv2.so,LL-NDK,
-/system/${LIB}/libGLESv3.so,LL-NDK,
-/system/${LIB}/libLLVM_android.so,FWK-ONLY,
-/system/${LIB}/libOpenMAXAL.so,FWK-ONLY,
-/system/${LIB}/libOpenSLES.so,FWK-ONLY,
-/system/${LIB}/libRS.so,LL-NDK,
-/system/${LIB}/libRSCacheDir.so,FWK-ONLY,
-/system/${LIB}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/libRScpp.so,FWK-ONLY,
-/system/${LIB}/libWnnEngDic.so,FWK-ONLY,
-/system/${LIB}/libWnnJpnDic.so,FWK-ONLY,
-/system/${LIB}/libaaudio.so,FWK-ONLY,
-/system/${LIB}/libaaudioservice.so,FWK-ONLY,
-/system/${LIB}/libadbconnection.so,FWK-ONLY,
-/system/${LIB}/libadbconnectiond.so,FWK-ONLY,
-/system/${LIB}/libadf.so,VNDK,
-/system/${LIB}/libandroid.so,FWK-ONLY,
-/system/${LIB}/libandroid_net.so,LL-NDK,
-/system/${LIB}/libandroid_runtime.so,FWK-ONLY,
-/system/${LIB}/libandroid_servers.so,FWK-ONLY,
-/system/${LIB}/libandroidfw.so,FWK-ONLY,
-/system/${LIB}/libappfuse.so,FWK-ONLY,
-/system/${LIB}/libart-compiler.so,FWK-ONLY,
-/system/${LIB}/libart-dexlayout.so,FWK-ONLY,
-/system/${LIB}/libart-disassembler.so,FWK-ONLY,
-/system/${LIB}/libart.so,FWK-ONLY,
-/system/${LIB}/libartd-compiler.so,FWK-ONLY,
-/system/${LIB}/libartd-dexlayout.so,FWK-ONLY,
-/system/${LIB}/libartd.so,FWK-ONLY,
-/system/${LIB}/libasyncio.so,FWK-ONLY,
-/system/${LIB}/libaudioclient.so,FWK-ONLY,
-/system/${LIB}/libaudioeffect_jni.so,FWK-ONLY,
-/system/${LIB}/libaudioflinger.so,FWK-ONLY,
-/system/${LIB}/libaudiohal.so,FWK-ONLY,
-/system/${LIB}/libaudiohal@2.0.so,FWK-ONLY,
-/system/${LIB}/libaudiohal_deathhandler.so,FWK-ONLY,
-/system/${LIB}/libaudiomanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyenginedefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanagerdefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyservice.so,FWK-ONLY,
-/system/${LIB}/libaudioprocessing.so,FWK-ONLY,
-/system/${LIB}/libaudioroute.so,VNDK,
-/system/${LIB}/libaudiospdif.so,FWK-ONLY,
-/system/${LIB}/libaudioutils.so,VNDK,
-/system/${LIB}/libavservices_minijail.so,FWK-ONLY,Vendor module should link libavservices_minijail_vendor.so
-/system/${LIB}/libbacktrace.so,VNDK-SP-Private,
-/system/${LIB}/libbase.so,VNDK-SP,
-/system/${LIB}/libbcc.so,FWK-ONLY,
-/system/${LIB}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/libbinder.so,VNDK,
-/system/${LIB}/libbinderwrapper.so,FWK-ONLY,
-/system/${LIB}/libblas.so,VNDK-SP-Private,
-/system/${LIB}/libbluetooth-binder.so,FWK-ONLY,
-/system/${LIB}/libbluetooth.so,FWK-ONLY,
-/system/${LIB}/libbluetooth_jni.so,FWK-ONLY,
-/system/${LIB}/libbootanimation.so,FWK-ONLY,
-/system/${LIB}/libbpf.so,FWK-ONLY,
-/system/${LIB}/libbrillo-binder.so,FWK-ONLY,
-/system/${LIB}/libbrillo-stream.so,FWK-ONLY,
-/system/${LIB}/libbrillo.so,FWK-ONLY,
-/system/${LIB}/libbrotli.so,FWK-ONLY,
-/system/${LIB}/libbufferhub.so,FWK-ONLY,
-/system/${LIB}/libbufferhubqueue.so,FWK-ONLY,
-/system/${LIB}/libbz.so,FWK-ONLY,
-/system/${LIB}/libc++.so,VNDK-SP,
-/system/${LIB}/libc.so,LL-NDK,
-/system/${LIB}/libc_malloc_debug.so,LL-NDK-Private,
-/system/${LIB}/libcamera2ndk.so,FWK-ONLY,
-/system/${LIB}/libcamera_client.so,FWK-ONLY,
-/system/${LIB}/libcamera_metadata.so,VNDK,
-/system/${LIB}/libcameraservice.so,FWK-ONLY,
-/system/${LIB}/libcap.so,VNDK,
-/system/${LIB}/libchrome.so,FWK-ONLY,
-/system/${LIB}/libclang_rt.asan-aarch64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-arm-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-i686-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-mips-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-mips64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-x86_64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-mips-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-mips64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/libcn-cbor.so,VNDK,
-/system/${LIB}/libcompiler_rt.so,VNDK-SP-Private,
-/system/${LIB}/libcrypto.so,VNDK,
-/system/${LIB}/libcrypto_utils.so,VNDK,
-/system/${LIB}/libcups.so,FWK-ONLY,
-/system/${LIB}/libcurl.so,VNDK,
-/system/${LIB}/libcutils.so,VNDK-SP,
-/system/${LIB}/libdebuggerd_client.so,FWK-ONLY,
-/system/${LIB}/libdefcontainer_jni.so,FWK-ONLY,
-/system/${LIB}/libdexfile.so,VNDK-SP-Private,Workaround for degenerated VDNK
-/system/${LIB}/libdiskconfig.so,VNDK,
-/system/${LIB}/libdisplayservicehidl.so,FWK-ONLY,
-/system/${LIB}/libdl.so,LL-NDK,
-/system/${LIB}/libdng_sdk.so,FWK-ONLY,
-/system/${LIB}/libdrmframework.so,FWK-ONLY,
-/system/${LIB}/libdrmframework_jni.so,FWK-ONLY,
-/system/${LIB}/libdt_fd_forward.so,FWK-ONLY,
-/system/${LIB}/libdt_socket.so,FWK-ONLY,
-/system/${LIB}/libdumpstateaidl.so,FWK-ONLY,
-/system/${LIB}/libdumpstateutil.so,VNDK,
-/system/${LIB}/libeffectsconfig.so,FWK-ONLY,
-/system/${LIB}/libevent.so,VNDK,
-/system/${LIB}/libexif.so,VNDK,
-/system/${LIB}/libexpat.so,VNDK,
-/system/${LIB}/libext2_blkid.so,FWK-ONLY,
-/system/${LIB}/libext2_com_err.so,FWK-ONLY,
-/system/${LIB}/libext2_e2p.so,FWK-ONLY,
-/system/${LIB}/libext2_misc.so,FWK-ONLY,
-/system/${LIB}/libext2_quota.so,FWK-ONLY,
-/system/${LIB}/libext2_uuid.so,FWK-ONLY,
-/system/${LIB}/libext2fs.so,FWK-ONLY,
-/system/${LIB}/libext4_utils.so,FWK-ONLY,
-/system/${LIB}/libf2fs_sparseblock.so,FWK-ONLY,
-/system/${LIB}/libfilterfw.so,FWK-ONLY,
-/system/${LIB}/libfilterpack_imageproc.so,FWK-ONLY,
-/system/${LIB}/libfmq.so,VNDK,
-/system/${LIB}/libframesequence.so,FWK-ONLY,
-/system/${LIB}/libft2.so,FWK-ONLY-RS,
-/system/${LIB}/libgatekeeper.so,VNDK,
-/system/${LIB}/libgiftranscode.so,FWK-ONLY,
-/system/${LIB}/libgraphicsenv.so,FWK-ONLY,
-/system/${LIB}/libgtest_prod.so,FWK-ONLY,
-/system/${LIB}/libgui.so,VNDK-Private,
-/system/${LIB}/libhardware.so,VNDK-SP,
-/system/${LIB}/libhardware_legacy.so,VNDK,
-/system/${LIB}/libharfbuzz_ng.so,FWK-ONLY,
-/system/${LIB}/libheif.so,FWK-ONLY,
-/system/${LIB}/libhidcommand_jni.so,FWK-ONLY,
-/system/${LIB}/libhidl-gen-hash.so,FWK-ONLY,
-/system/${LIB}/libhidl-gen-utils.so,FWK-ONLY,
-/system/${LIB}/libhidlallocatorutils.so,VNDK,
-/system/${LIB}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/libhidlcache.so,VNDK,
-/system/${LIB}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/libhwbinder_noltopgo.so,VNDK-SP,
-/system/${LIB}/libhwui.so,FWK-ONLY,
-/system/${LIB}/libicui18n.so,FWK-ONLY,
-/system/${LIB}/libicuuc.so,FWK-ONLY,
-/system/${LIB}/libimg_utils.so,FWK-ONLY,
-/system/${LIB}/libincident.so,FWK-ONLY,
-/system/${LIB}/libinput.so,FWK-ONLY,
-/system/${LIB}/libinputflinger.so,FWK-ONLY,
-/system/${LIB}/libinputservice.so,FWK-ONLY,
-/system/${LIB}/libion.so,VNDK-SP,
-/system/${LIB}/libiperf.so,FWK-ONLY,
-/system/${LIB}/libiprouteutil.so,FWK-ONLY,
-/system/${LIB}/libjavacore.so,FWK-ONLY,
-/system/${LIB}/libjavacrypto.so,FWK-ONLY,
-/system/${LIB}/libjdwp.so,FWK-ONLY,
-/system/${LIB}/libjni_eglfence.so,FWK-ONLY,
-/system/${LIB}/libjni_filtershow_filters.so,FWK-ONLY,
-/system/${LIB}/libjni_jpegstream.so,FWK-ONLY,
-/system/${LIB}/libjni_jpegutil.so,FWK-ONLY,
-/system/${LIB}/libjni_latinime.so,FWK-ONLY,
-/system/${LIB}/libjni_pacprocessor.so,FWK-ONLY,
-/system/${LIB}/libjni_tinyplanet.so,FWK-ONLY,
-/system/${LIB}/libjnigraphics.so,FWK-ONLY,
-/system/${LIB}/libjpeg.so,VNDK,
-/system/${LIB}/libkeymaster4support.so,FWK-ONLY,
-/system/${LIB}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/libkeymaster_portable.so,VNDK,
-/system/${LIB}/libkeystore-engine.so,FWK-ONLY,
-/system/${LIB}/libkeystore_aidl.so,FWK-ONLY,
-/system/${LIB}/libkeystore_binder.so,FWK-ONLY,
-/system/${LIB}/libkeystore_parcelables.so,FWK-ONLY,
-/system/${LIB}/libkeyutils.so,FWK-ONLY,
-/system/${LIB}/liblayers_proto.so,FWK-ONLY,
-/system/${LIB}/libldacBT_abr.so,VNDK,
-/system/${LIB}/libldacBT_enc.so,VNDK,
-/system/${LIB}/liblog.so,LL-NDK,
-/system/${LIB}/liblogcat.so,FWK-ONLY,
-/system/${LIB}/liblogwrap.so,FWK-ONLY,
-/system/${LIB}/liblshal.so,FWK-ONLY,
-/system/${LIB}/liblz4.so,VNDK,
-/system/${LIB}/liblzma.so,VNDK-SP,
-/system/${LIB}/libm.so,LL-NDK,
-/system/${LIB}/libmdnssd.so,FWK-ONLY,
-/system/${LIB}/libmedia.so,FWK-ONLY,
-/system/${LIB}/libmedia_helper.so,VNDK,
-/system/${LIB}/libmedia_jni.so,FWK-ONLY,
-/system/${LIB}/libmedia_omx.so,VNDK,
-/system/${LIB}/libmediadrm.so,FWK-ONLY,
-/system/${LIB}/libmediaextractor.so,FWK-ONLY,
-/system/${LIB}/libmediaextractorservice.so,FWK-ONLY,
-/system/${LIB}/libmedialogservice.so,FWK-ONLY,
-/system/${LIB}/libmediametrics.so,FWK-ONLY,
-/system/${LIB}/libmediandk.so,FWK-ONLY-RS,
-/system/${LIB}/libmediaplayerservice.so,FWK-ONLY,
-/system/${LIB}/libmediautils.so,FWK-ONLY,
-/system/${LIB}/libmemtrack.so,VNDK,
-/system/${LIB}/libmemunreachable.so,FWK-ONLY,
-/system/${LIB}/libmetricslogger.so,FWK-ONLY,
-/system/${LIB}/libmidi.so,FWK-ONLY,
-/system/${LIB}/libminijail.so,VNDK,
-/system/${LIB}/libminikin.so,FWK-ONLY,
-/system/${LIB}/libmkbootimg_abi_check.so,VNDK,
-/system/${LIB}/libmtp.so,FWK-ONLY,
-/system/${LIB}/libnativebridge.so,FWK-ONLY,
-/system/${LIB}/libnativehelper.so,FWK-ONLY,
-/system/${LIB}/libnativeloader.so,FWK-ONLY,
-/system/${LIB}/libnativewindow.so,LL-NDK,
-/system/${LIB}/libnbaio.so,FWK-ONLY,Vendor module should link libnbaio_mono.so
-/system/${LIB}/libnblog.so,FWK-ONLY,
-/system/${LIB}/libnetd_client.so,LL-NDK-Private,
-/system/${LIB}/libnetdaidl.so,FWK-ONLY,
-/system/${LIB}/libnetdutils.so,FWK-ONLY,
-/system/${LIB}/libnetlink.so,FWK-ONLY,
-/system/${LIB}/libnetutils.so,VNDK,
-/system/${LIB}/libneuralnetworks.so,LL-NDK,
-/system/${LIB}/libnfc-nci.so,FWK-ONLY,
-/system/${LIB}/libnfc_nci_jni.so,FWK-ONLY,
-/system/${LIB}/libnl.so,VNDK,
-/system/${LIB}/libnpt.so,FWK-ONLY,
-/system/${LIB}/libopenjdk.so,FWK-ONLY,
-/system/${LIB}/libopenjdkd.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvm.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmd.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmti.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmtid.so,FWK-ONLY,
-/system/${LIB}/libopus.so,VNDK,
-/system/${LIB}/libpac.so,FWK-ONLY,
-/system/${LIB}/libpackagelistparser.so,FWK-ONLY,
-/system/${LIB}/libpagemap.so,VNDK,
-/system/${LIB}/libpcap.so,FWK-ONLY,
-/system/${LIB}/libpcre2.so,VNDK,
-/system/${LIB}/libpcrecpp.so,FWK-ONLY,
-/system/${LIB}/libpdfium.so,FWK-ONLY,
-/system/${LIB}/libpdx_default_transport.so,FWK-ONLY,
-/system/${LIB}/libpiex.so,VNDK,
-/system/${LIB}/libpixelflinger.so,FWK-ONLY,
-/system/${LIB}/libpng.so,VNDK,
-/system/${LIB}/libpower.so,VNDK,
-/system/${LIB}/libpowermanager.so,FWK-ONLY,
-/system/${LIB}/libprintspooler_jni.so,FWK-ONLY,
-/system/${LIB}/libprocessgroup.so,FWK-ONLY,
-/system/${LIB}/libprocinfo.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/libprotoutil.so,FWK-ONLY,
-/system/${LIB}/libpuresoftkeymasterdevice.so,VNDK,
-/system/${LIB}/libqtaguid.so,FWK-ONLY,
-/system/${LIB}/libradio_metadata.so,VNDK,
-/system/${LIB}/libresourcemanagerservice.so,FWK-ONLY,
-/system/${LIB}/librs_jni.so,FWK-ONLY,
-/system/${LIB}/librtp_jni.so,FWK-ONLY,
-/system/${LIB}/libschedulerservicehidl.so,FWK-ONLY,
-/system/${LIB}/libselinux.so,VNDK,
-/system/${LIB}/libsensor.so,FWK-ONLY,
-/system/${LIB}/libsensorservice.so,FWK-ONLY,
-/system/${LIB}/libsensorservicehidl.so,FWK-ONLY,
-/system/${LIB}/libsepol.so,FWK-ONLY,
-/system/${LIB}/libservices.so,FWK-ONLY,
-/system/${LIB}/libserviceutility.so,FWK-ONLY,
-/system/${LIB}/libsigchain.so,FWK-ONLY,
-/system/${LIB}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/libsonic.so,FWK-ONLY,
-/system/${LIB}/libsonivox.so,FWK-ONLY,
-/system/${LIB}/libsoundpool.so,FWK-ONLY,
-/system/${LIB}/libsoundtrigger.so,FWK-ONLY,
-/system/${LIB}/libsoundtriggerservice.so,FWK-ONLY,
-/system/${LIB}/libsparse.so,FWK-ONLY,
-/system/${LIB}/libspeexresampler.so,VNDK,
-/system/${LIB}/libsqlite.so,VNDK,
-/system/${LIB}/libssl.so,VNDK,
-/system/${LIB}/libstagefright.so,FWK-ONLY,
-/system/${LIB}/libstagefright_amrnb_common.so,VNDK,
-/system/${LIB}/libstagefright_bufferqueue_helper.so,VNDK,
-/system/${LIB}/libstagefright_enc_common.so,VNDK,
-/system/${LIB}/libstagefright_flacdec.so,VNDK,
-/system/${LIB}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/libstagefright_http_support.so,FWK-ONLY,
-/system/${LIB}/libstagefright_httplive.so,FWK-ONLY,
-/system/${LIB}/libstagefright_omx.so,VNDK,
-/system/${LIB}/libstagefright_omx_utils.so,VNDK,
-/system/${LIB}/libstagefright_soft_aacdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_aacenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_amrdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_amrnbenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_amrwbenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_avcdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_avcenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_flacdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_flacenc.so,VNDK,
-/system/${LIB}/libstagefright_soft_g711dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_gsmdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_hevcdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mp3dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mpeg2dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mpeg4dec.so,VNDK,
-/system/${LIB}/libstagefright_soft_mpeg4enc.so,VNDK,
-/system/${LIB}/libstagefright_soft_opusdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_rawdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_vorbisdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_vpxdec.so,VNDK,
-/system/${LIB}/libstagefright_soft_vpxenc.so,VNDK,
-/system/${LIB}/libstagefright_xmlparser.so,VNDK,
-/system/${LIB}/libstatslog.so,FWK-ONLY,
-/system/${LIB}/libstdc++.so,FWK-ONLY,
-/system/${LIB}/libsurfaceflinger.so,FWK-ONLY,
-/system/${LIB}/libsurfaceflinger_ddmconnection.so,FWK-ONLY,
-/system/${LIB}/libsuspend.so,VNDK,
-/system/${LIB}/libsync.so,LL-NDK,
-/system/${LIB}/libsysutils.so,VNDK,
-/system/${LIB}/libtextclassifier.so,FWK-ONLY,
-/system/${LIB}/libtextclassifier_hash.so,LL-NDK-Private,
-/system/${LIB}/libthermalcallback.so,FWK-ONLY,
-/system/${LIB}/libthermalservice.so,FWK-ONLY,
-/system/${LIB}/libtinyalsa.so,VNDK,
-/system/${LIB}/libtinyxml2.so,VNDK,
-/system/${LIB}/libtombstoned_client.so,FWK-ONLY,
-/system/${LIB}/libui.so,VNDK,
-/system/${LIB}/libunwind.so,VNDK-SP-Private,
-/system/${LIB}/libunwindstack.so,VNDK-SP,
-/system/${LIB}/libusbhost.so,VNDK,
-/system/${LIB}/libutils.so,VNDK-SP,
-/system/${LIB}/libutilscallstack.so,VNDK-SP,
-/system/${LIB}/libvintf.so,FWK-ONLY,
-/system/${LIB}/libvixl-arm.so,VNDK,
-/system/${LIB}/libvixl-arm64.so,VNDK,
-/system/${LIB}/libvixld-arm.so,FWK-ONLY,
-/system/${LIB}/libvixld-arm64.so,FWK-ONLY,
-/system/${LIB}/libvndksupport.so,LL-NDK,
-/system/${LIB}/libvorbisidec.so,VNDK,
-/system/${LIB}/libvulkan.so,LL-NDK,
-/system/${LIB}/libwebviewchromium_loader.so,FWK-ONLY,
-/system/${LIB}/libwebviewchromium_plat_support.so,FWK-ONLY,
-/system/${LIB}/libwfds.so,FWK-ONLY,
-/system/${LIB}/libwifi-service.so,FWK-ONLY,
-/system/${LIB}/libwifi-system-iface.so,VNDK,
-/system/${LIB}/libwifi-system.so,FWK-ONLY,
-/system/${LIB}/libwifikeystorehal.so,FWK-ONLY,
-/system/${LIB}/libwilhelm.so,FWK-ONLY,
-/system/${LIB}/libwnndict.so,FWK-ONLY,
-/system/${LIB}/libxml2.so,VNDK,
-/system/${LIB}/libyuv.so,VNDK,
-/system/${LIB}/libz.so,VNDK-SP,
-/system/${LIB}/libziparchive.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@4.0-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.authsecret@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.audiocontrol@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth.a2dp@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas.native@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.confirmationui-support-lib.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.confirmationui@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.allocator@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.keymaster@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.bufferpool@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.neuralnetworks@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.neuralnetworks@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.oemlock@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.config@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.secure_element@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.0-core.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb.gadget@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.weaver@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.hostapd@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.offload@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.memory.block@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.net.netd@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.net.netd@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libadf.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioroute.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libbinder.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcamera_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-mips-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-mips64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcn-cbor.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcurl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdiskconfig.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdumpstateutil.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libevent.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexif.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexpat.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libfmq.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgatekeeper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgui.so,VNDK-Private,
-/system/${LIB}/vndk${VNDK_VER}/libhardware_legacy.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libhidlallocatorutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libhidlcache.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libjpeg.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_portable.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_abr.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_enc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/liblz4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_helper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmemtrack.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libminijail.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmkbootimg_abi_check.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnetutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libopus.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpagemap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpcre2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpiex.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpng.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpower.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprocinfo.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpuresoftkeymasterdevice.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libradio_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libselinux.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libspeexresampler.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsqlite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libssl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_amrnb_common.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_bufferqueue_helper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_enc_common.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_flacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_aacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_aacenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_amrdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_amrnbenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_amrwbenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_avcdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_avcenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_flacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_flacenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_g711dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_gsmdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_hevcdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mp3dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mpeg2dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mpeg4dec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_mpeg4enc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_opusdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_rawdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_vorbisdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_vpxdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_soft_vpxenc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_xmlparser.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsuspend.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsysutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyalsa.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libui.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libusbhost.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm64.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvorbisidec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libwifi-system-iface.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libyuv.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libziparchive.so,VNDK,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.1.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@2.1.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.memory.token@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbacktrace.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libblas.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libc++.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcompiler_rt.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libdexfile.so,VNDK-SP-Private,Workaround for degenerated VDNK
-/system/${LIB}/vndk-sp${VNDK_VER}/libhardware.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhwbinder_noltopgo.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libion.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/liblzma.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwind.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwindstack.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libutilscallstack.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libz.so,VNDK-SP,
-/vendor/${LIB}/hidl.tests.vendor@1.0.so,VND-ONLY,
-/vendor/${LIB}/hidl.tests.vendor@1.1.so,VND-ONLY,
-/vendor/${LIB}/libavservices_minijail_vendor.so,VND-ONLY,Framework module should link libavservices_minijail.so
-/vendor/${LIB}/libcld80211.so,VND-ONLY,
-/vendor/${LIB}/libeffects.so,VND-ONLY,
-/vendor/${LIB}/libhwc2on1adapter.so,VND-ONLY,
-/vendor/${LIB}/libnbaio_mono.so,VND-ONLY,
-/vendor/${LIB}/libreference-ril.so,VND-ONLY,
-/vendor/${LIB}/libril.so,VND-ONLY,
-/vendor/${LIB}/librilutils.so,VND-ONLY,
-/vendor/${LIB}/libtinycompress.so,VND-ONLY,
-/vendor/${LIB}/libwebrtc_audio_preprocessing.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libaudiopreprocessing.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libbundlewrapper.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libdownmix.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libeffectproxy.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libldnhncr.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libreverbwrapper.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libvisualizer.so,VND-ONLY,
-[regex]^.*/android\.hardware\.graphics\.mapper@\d+\.\d+-impl\.so$,SP-HAL,
-[regex]^.*/android\.hardware\.renderscript@1\.0-impl\.so$,SP-HAL,
-[regex]^.*/gralloc\..*\.so$,SP-HAL,
-[regex]^/vendor/.*/libEGL_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLES_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv1_CM_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv2_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv3_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libPVRRS\.so$,SP-HAL,
-[regex]^/vendor/.*/libRSDriver.*\.so$,SP-HAL,
-[regex]^/vendor/.*/vulkan.*\.so$,SP-HAL,
diff --git a/vndk/tools/definition-tool/datasets/eligible-list-29-properties.csv b/vndk/tools/definition-tool/datasets/eligible-list-29-properties.csv
deleted file mode 100644
index b27fe76b9..000000000
--- a/vndk/tools/definition-tool/datasets/eligible-list-29-properties.csv
+++ /dev/null
@@ -1,609 +0,0 @@
-name,vndk,vndk_sp,vendor_available,rule
-android.frameworks.bufferhub@1.0,False,False,True,hidl_interface
-android.frameworks.bufferhub@1.0-adapter-helper,False,False,True,hidl_interface
-android.frameworks.cameraservice.common@2.0,True,False,True,hidl_interface
-android.frameworks.cameraservice.common@2.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.cameraservice.device@2.0,True,False,True,hidl_interface
-android.frameworks.cameraservice.device@2.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.cameraservice.service@2.0,True,False,True,hidl_interface
-android.frameworks.cameraservice.service@2.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.displayservice@1.0,True,False,True,hidl_interface
-android.frameworks.displayservice@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.schedulerservice@1.0,True,False,True,hidl_interface
-android.frameworks.schedulerservice@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.sensorservice@1.0,True,False,True,hidl_interface
-android.frameworks.sensorservice@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.stats@1.0,True,False,True,hidl_interface
-android.frameworks.stats@1.0-adapter-helper,True,False,True,hidl_interface
-android.frameworks.vr.composer@1.0,True,False,True,hidl_interface
-android.frameworks.vr.composer@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.atrace@1.0,True,False,True,hidl_interface
-android.hardware.atrace@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common-util,False,False,True,cc_library_shared
-android.hardware.audio.common@2.0,True,False,True,hidl_interface
-android.hardware.audio.common@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common@2.0-util,False,False,True,cc_library_shared
-android.hardware.audio.common@4.0,True,False,True,hidl_interface
-android.hardware.audio.common@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common@4.0-util,False,False,True,cc_library_shared
-android.hardware.audio.common@5.0,True,False,True,hidl_interface
-android.hardware.audio.common@5.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.common@5.0-util,False,False,True,cc_library_shared
-android.hardware.audio.effect@2.0,True,False,True,hidl_interface
-android.hardware.audio.effect@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.effect@4.0,True,False,True,hidl_interface
-android.hardware.audio.effect@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio.effect@5.0,True,False,True,hidl_interface
-android.hardware.audio.effect@5.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio@2.0,True,False,True,hidl_interface
-android.hardware.audio@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio@4.0,True,False,True,hidl_interface
-android.hardware.audio@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.audio@5.0,True,False,True,hidl_interface
-android.hardware.audio@5.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.authsecret@1.0,True,False,True,hidl_interface
-android.hardware.authsecret@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.automotive.audiocontrol@1.0,True,False,True,hidl_interface
-android.hardware.automotive.audiocontrol@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.automotive.evs@1.0,True,False,True,hidl_interface
-android.hardware.automotive.evs@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.automotive.vehicle@2.0,True,False,True,hidl_interface
-android.hardware.automotive.vehicle@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.biometrics.face@1.0,True,False,True,hidl_interface
-android.hardware.biometrics.face@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.biometrics.fingerprint@2.1,True,False,True,hidl_interface
-android.hardware.biometrics.fingerprint@2.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.bluetooth.a2dp@1.0,True,False,True,hidl_interface
-android.hardware.bluetooth.a2dp@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.bluetooth.audio@2.0,True,False,True,hidl_interface
-android.hardware.bluetooth.audio@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.bluetooth@1.0,True,False,True,hidl_interface
-android.hardware.bluetooth@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.boot@1.0,True,False,True,hidl_interface
-android.hardware.boot@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.0,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.1,True,False,True,hidl_interface
-android.hardware.broadcastradio@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.broadcastradio@2.0,True,False,True,hidl_interface
-android.hardware.broadcastradio@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.common@1.0,True,False,True,hidl_interface
-android.hardware.camera.common@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@1.0,True,False,True,hidl_interface
-android.hardware.camera.device@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.2,True,False,True,hidl_interface
-android.hardware.camera.device@3.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.3,True,False,True,hidl_interface
-android.hardware.camera.device@3.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.4,True,False,True,hidl_interface
-android.hardware.camera.device@3.4-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.device@3.5,True,False,True,hidl_interface
-android.hardware.camera.device@3.5-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.2,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.3,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.4,True,False,True,hidl_interface
-android.hardware.camera.metadata@3.4-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.provider@2.4,True,False,True,hidl_interface
-android.hardware.camera.provider@2.4-adapter-helper,True,False,True,hidl_interface
-android.hardware.camera.provider@2.5,True,False,True,hidl_interface
-android.hardware.camera.provider@2.5-adapter-helper,True,False,True,hidl_interface
-android.hardware.cas.native@1.0,True,False,True,hidl_interface
-android.hardware.cas.native@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.cas@1.0,True,False,True,hidl_interface
-android.hardware.cas@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.cas@1.1,True,False,True,hidl_interface
-android.hardware.cas@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.configstore-utils,True,False,True,cc_library_shared
-android.hardware.configstore@1.0,True,False,True,hidl_interface
-android.hardware.configstore@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.configstore@1.1,True,False,True,hidl_interface
-android.hardware.configstore@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.confirmationui-support-lib,True,False,True,cc_library
-android.hardware.confirmationui@1.0,True,False,True,hidl_interface
-android.hardware.confirmationui@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.contexthub@1.0,True,False,True,hidl_interface
-android.hardware.contexthub@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.drm@1.0,True,False,True,hidl_interface
-android.hardware.drm@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.drm@1.1,True,False,True,hidl_interface
-android.hardware.drm@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.drm@1.2,True,False,True,hidl_interface
-android.hardware.drm@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.dumpstate@1.0,True,False,True,hidl_interface
-android.hardware.dumpstate@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.fastboot@1.0,True,False,True,hidl_interface
-android.hardware.fastboot@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gatekeeper@1.0,True,False,True,hidl_interface
-android.hardware.gatekeeper@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss.measurement_corrections@1.0,True,False,True,hidl_interface
-android.hardware.gnss.measurement_corrections@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss.visibility_control@1.0,True,False,True,hidl_interface
-android.hardware.gnss.visibility_control@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss@1.0,True,False,True,hidl_interface
-android.hardware.gnss@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss@1.1,True,False,True,hidl_interface
-android.hardware.gnss@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.gnss@2.0,True,False,True,hidl_interface
-android.hardware.gnss@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.allocator@2.0,True,False,True,hidl_interface
-android.hardware.graphics.allocator@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.allocator@3.0,True,False,True,hidl_interface
-android.hardware.graphics.allocator@3.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.bufferqueue@1.0,True,False,True,hidl_interface
-android.hardware.graphics.bufferqueue@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.bufferqueue@2.0,True,False,True,hidl_interface
-android.hardware.graphics.bufferqueue@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.common@1.0,True,True,True,hidl_interface
-android.hardware.graphics.common@1.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.common@1.1,True,True,True,hidl_interface
-android.hardware.graphics.common@1.1-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.common@1.2,True,True,True,hidl_interface
-android.hardware.graphics.common@1.2-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.composer@2.1,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.2,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.3,True,False,True,hidl_interface
-android.hardware.graphics.composer@2.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.graphics.mapper@2.0,True,True,True,hidl_interface
-android.hardware.graphics.mapper@2.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.mapper@2.1,True,True,True,hidl_interface
-android.hardware.graphics.mapper@2.1-adapter-helper,True,True,True,hidl_interface
-android.hardware.graphics.mapper@3.0,True,True,True,hidl_interface
-android.hardware.graphics.mapper@3.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.health.storage@1.0,True,False,True,hidl_interface
-android.hardware.health.storage@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.health@1.0,True,False,True,hidl_interface
-android.hardware.health@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.health@2.0,True,False,True,hidl_interface
-android.hardware.health@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.input.classifier@1.0,True,False,True,hidl_interface
-android.hardware.input.classifier@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.input.common@1.0,True,False,True,hidl_interface
-android.hardware.input.common@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.ir@1.0,True,False,True,hidl_interface
-android.hardware.ir@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.keymaster@3.0,True,False,True,hidl_interface
-android.hardware.keymaster@3.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.keymaster@4.0,True,False,True,hidl_interface
-android.hardware.keymaster@4.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.light@2.0,True,False,True,hidl_interface
-android.hardware.light@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media.bufferpool@1.0,True,False,True,hidl_interface
-android.hardware.media.bufferpool@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media.bufferpool@2.0,True,False,True,hidl_interface
-android.hardware.media.bufferpool@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media.c2@1.0,True,False,True,hidl_interface
-android.hardware.media.c2@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media.omx@1.0,True,False,True,hidl_interface
-android.hardware.media.omx@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.media@1.0,True,False,True,hidl_interface
-android.hardware.media@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.memtrack@1.0,True,False,True,hidl_interface
-android.hardware.memtrack@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.0,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.1,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.2,True,False,True,hidl_interface
-android.hardware.neuralnetworks@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.nfc@1.0,True,False,True,hidl_interface
-android.hardware.nfc@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.nfc@1.1,True,False,True,hidl_interface
-android.hardware.nfc@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.nfc@1.2,True,False,True,hidl_interface
-android.hardware.nfc@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.oemlock@1.0,True,False,True,hidl_interface
-android.hardware.oemlock@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.power.stats@1.0,True,False,True,hidl_interface
-android.hardware.power.stats@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.0,True,False,True,hidl_interface
-android.hardware.power@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.1,True,False,True,hidl_interface
-android.hardware.power@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.2,True,False,True,hidl_interface
-android.hardware.power@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.power@1.3,True,False,True,hidl_interface
-android.hardware.power@1.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio.config@1.0,True,False,True,hidl_interface
-android.hardware.radio.config@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio.config@1.1,True,False,True,hidl_interface
-android.hardware.radio.config@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio.config@1.2,True,False,True,hidl_interface
-android.hardware.radio.config@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio.deprecated@1.0,True,False,True,hidl_interface
-android.hardware.radio.deprecated@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.0,True,False,True,hidl_interface
-android.hardware.radio@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.1,True,False,True,hidl_interface
-android.hardware.radio@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.2,True,False,True,hidl_interface
-android.hardware.radio@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.3,True,False,True,hidl_interface
-android.hardware.radio@1.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.radio@1.4,True,False,True,hidl_interface
-android.hardware.radio@1.4-adapter-helper,True,False,True,hidl_interface
-android.hardware.renderscript@1.0,True,True,True,hidl_interface
-android.hardware.renderscript@1.0-adapter-helper,True,True,True,hidl_interface
-android.hardware.secure_element@1.0,True,False,True,hidl_interface
-android.hardware.secure_element@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.secure_element@1.1,True,False,True,hidl_interface
-android.hardware.secure_element@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.sensors@1.0,True,False,True,hidl_interface
-android.hardware.sensors@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.sensors@2.0,True,False,True,hidl_interface
-android.hardware.sensors@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.0,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.0-core,True,False,True,cc_library_shared
-android.hardware.soundtrigger@2.1,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.2,True,False,True,hidl_interface
-android.hardware.soundtrigger@2.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.tests.bar@1.0,False,False,True,hidl_interface
-android.hardware.tests.bar@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.baz@1.0,False,False,True,hidl_interface
-android.hardware.tests.baz@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.expression@1.0,False,False,True,hidl_interface
-android.hardware.tests.expression@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.extension.light@2.0,False,False,True,hidl_interface
-android.hardware.tests.extension.light@2.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.foo@1.0,False,False,True,hidl_interface
-android.hardware.tests.foo@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.hash@1.0,False,False,True,hidl_interface
-android.hardware.tests.hash@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.inheritance@1.0,False,False,True,hidl_interface
-android.hardware.tests.inheritance@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.libhwbinder@1.0,False,False,True,hidl_interface
-android.hardware.tests.libhwbinder@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.memory@1.0,False,False,True,hidl_interface
-android.hardware.tests.memory@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.msgq@1.0,False,False,True,hidl_interface
-android.hardware.tests.msgq@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.multithread@1.0,False,False,True,hidl_interface
-android.hardware.tests.multithread@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.pointer@1.0,False,False,True,hidl_interface
-android.hardware.tests.pointer@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.safeunion.cpp@1.0,False,False,True,hidl_interface
-android.hardware.tests.safeunion.cpp@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.safeunion@1.0,False,False,True,hidl_interface
-android.hardware.tests.safeunion@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tests.trie@1.0,False,False,True,hidl_interface
-android.hardware.tests.trie@1.0-adapter-helper,False,False,True,hidl_interface
-android.hardware.tetheroffload.config@1.0,True,False,True,hidl_interface
-android.hardware.tetheroffload.config@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.tetheroffload.control@1.0,True,False,True,hidl_interface
-android.hardware.tetheroffload.control@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.thermal@1.0,True,False,True,hidl_interface
-android.hardware.thermal@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.thermal@1.1,True,False,True,hidl_interface
-android.hardware.thermal@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.thermal@2.0,True,False,True,hidl_interface
-android.hardware.thermal@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.tv.cec@1.0,True,False,True,hidl_interface
-android.hardware.tv.cec@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.tv.cec@2.0,True,False,True,hidl_interface
-android.hardware.tv.cec@2.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.tv.input@1.0,True,False,True,hidl_interface
-android.hardware.tv.input@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb.gadget@1.0,True,False,True,hidl_interface
-android.hardware.usb.gadget@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb@1.0,True,False,True,hidl_interface
-android.hardware.usb@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb@1.1,True,False,True,hidl_interface
-android.hardware.usb@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.usb@1.2,True,False,True,hidl_interface
-android.hardware.usb@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.0,True,False,True,hidl_interface
-android.hardware.vibrator@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.1,True,False,True,hidl_interface
-android.hardware.vibrator@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.2,True,False,True,hidl_interface
-android.hardware.vibrator@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.vibrator@1.3,True,False,True,hidl_interface
-android.hardware.vibrator@1.3-adapter-helper,True,False,True,hidl_interface
-android.hardware.vr@1.0,True,False,True,hidl_interface
-android.hardware.vr@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.weaver@1.0,True,False,True,hidl_interface
-android.hardware.weaver@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.hostapd@1.0,True,False,True,hidl_interface
-android.hardware.wifi.hostapd@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.hostapd@1.1,True,False,True,hidl_interface
-android.hardware.wifi.hostapd@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.offload@1.0,True,False,True,hidl_interface
-android.hardware.wifi.offload@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.0,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.1,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.2,True,False,True,hidl_interface
-android.hardware.wifi.supplicant@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.0,True,False,True,hidl_interface
-android.hardware.wifi@1.0-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.1,True,False,True,hidl_interface
-android.hardware.wifi@1.1-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.2,True,False,True,hidl_interface
-android.hardware.wifi@1.2-adapter-helper,True,False,True,hidl_interface
-android.hardware.wifi@1.3,True,False,True,hidl_interface
-android.hardware.wifi@1.3-adapter-helper,True,False,True,hidl_interface
-android.hidl.allocator@1.0,True,False,True,hidl_interface
-android.hidl.allocator@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.base@1.0,True,False,True,hidl_interface
-android.hidl.base@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.manager@1.0,True,False,True,hidl_interface
-android.hidl.manager@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.manager@1.1,True,False,True,hidl_interface
-android.hidl.manager@1.1-adapter-helper,True,False,True,hidl_interface
-android.hidl.manager@1.2,True,False,True,hidl_interface
-android.hidl.manager@1.2-adapter-helper,True,False,True,hidl_interface
-android.hidl.memory.block@1.0,True,False,True,hidl_interface
-android.hidl.memory.block@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.memory.token@1.0,True,True,True,hidl_interface
-android.hidl.memory.token@1.0-adapter-helper,True,True,True,hidl_interface
-android.hidl.memory@1.0,True,True,True,hidl_interface
-android.hidl.memory@1.0-adapter-helper,True,True,True,hidl_interface
-android.hidl.memory@1.0-impl,True,True,True,cc_library_shared
-android.hidl.safe_union@1.0,True,True,True,hidl_interface
-android.hidl.safe_union@1.0-adapter-helper,True,True,True,hidl_interface
-android.hidl.token@1.0,True,False,True,hidl_interface
-android.hidl.token@1.0-adapter-helper,True,False,True,hidl_interface
-android.hidl.token@1.0-utils,True,False,True,cc_library
-android.system.net.netd@1.0,True,False,True,hidl_interface
-android.system.net.netd@1.0-adapter-helper,True,False,True,hidl_interface
-android.system.net.netd@1.1,True,False,True,hidl_interface
-android.system.net.netd@1.1-adapter-helper,True,False,True,hidl_interface
-android.system.suspend@1.0,True,False,True,hidl_interface
-android.system.suspend@1.0-adapter-helper,True,False,True,hidl_interface
-android.system.wifi.keystore@1.0,True,False,True,hidl_interface
-android.system.wifi.keystore@1.0-adapter-helper,True,False,True,hidl_interface
-hardware.google.light@1.0,False,False,True,hidl_interface
-hardware.google.light@1.0-adapter-helper,False,False,True,hidl_interface
-hardware.google.media.c2@1.0,False,False,True,hidl_interface
-hardware.google.media.c2@1.0-adapter-helper,False,False,True,hidl_interface
-hidl.tests.vendor@1.0,False,False,True,hidl_interface
-hidl.tests.vendor@1.0-adapter-helper,False,False,True,hidl_interface
-hidl.tests.vendor@1.1,False,False,True,hidl_interface
-hidl.tests.vendor@1.1-adapter-helper,False,False,True,hidl_interface
-libRSCpuRef,True,True,True,cc_library_shared
-libRSDriver,True,True,True,cc_library_shared
-libRS_internal,True,True,True,cc_library_shared
-libadf,True,False,True,cc_library
-libandroid_runtime_lazy,False,False,True,cc_library
-libasyncio,False,False,True,cc_library
-libaudioroute,True,False,True,cc_library_shared
-libaudioutils,True,False,True,cc_library
-libbacktrace,True,True,False,cc_library
-libbase,True,True,True,cc_library
-libbcinfo,True,True,True,cc_library_shared
-libbinder,True,False,True,cc_library_shared
-libbinder_ndk,False,False,True,cc_library
-libbinderthreadstate,True,True,False,cc_library
-libbinderwrapper,False,False,True,cc_library_shared
-libblas,True,True,False,cc_library_shared
-libc++,True,True,True,cc_library_shared
-libc2_component_wrapper,False,False,True,cc_library_shared
-libc_scudo,False,False,True,cc_library_shared
-libcamera2ndk_vendor,False,False,True,cc_library_shared
-libcamera_metadata,True,False,True,cc_library_shared
-libcap,True,False,True,cc_library
-libchrome,False,False,True,cc_library
-libchrome-crypto,False,False,True,cc_library_shared
-libclang_rt.scudo-aarch64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo-arm-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo-i686-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo-x86_64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo_minimal-aarch64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo_minimal-arm-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo_minimal-i686-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.scudo_minimal-x86_64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-aarch64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-arm-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-i686-android,True,False,True,libclang_rt_prebuilt_library_shared
-libclang_rt.ubsan_standalone-x86_64-android,True,False,True,libclang_rt_prebuilt_library_shared
-libcn-cbor,True,False,True,cc_library
-libcodec2,True,False,True,cc_library_shared
-libcodec2_component_wrapper,False,False,True,cc_library_shared
-libcodec2_hidl@1.0,True,False,True,cc_library
-libcodec2_hidl_utils@1.0,False,False,True,cc_library
-libcodec2_serviceregistrant,False,False,True,cc_library_shared
-libcodec2_simple_component,False,False,True,cc_library_shared
-libcodec2_soft_aacdec,False,False,True,cc_library_shared
-libcodec2_soft_aacenc,False,False,True,cc_library_shared
-libcodec2_soft_amrnbdec,False,False,True,cc_library_shared
-libcodec2_soft_amrnbenc,False,False,True,cc_library_shared
-libcodec2_soft_amrwbdec,False,False,True,cc_library_shared
-libcodec2_soft_amrwbenc,False,False,True,cc_library_shared
-libcodec2_soft_av1dec,False,False,True,cc_library_shared
-libcodec2_soft_avcdec,False,False,True,cc_library_shared
-libcodec2_soft_avcenc,False,False,True,cc_library_shared
-libcodec2_soft_common,False,False,True,cc_library_shared
-libcodec2_soft_flacdec,False,False,True,cc_library_shared
-libcodec2_soft_flacenc,False,False,True,cc_library_shared
-libcodec2_soft_g711alawdec,False,False,True,cc_library_shared
-libcodec2_soft_g711mlawdec,False,False,True,cc_library_shared
-libcodec2_soft_gsmdec,False,False,True,cc_library_shared
-libcodec2_soft_h263dec,False,False,True,cc_library_shared
-libcodec2_soft_h263enc,False,False,True,cc_library_shared
-libcodec2_soft_hevcdec,False,False,True,cc_library_shared
-libcodec2_soft_hevcenc,False,False,True,cc_library_shared
-libcodec2_soft_mp3dec,False,False,True,cc_library_shared
-libcodec2_soft_mpeg2dec,False,False,True,cc_library_shared
-libcodec2_soft_mpeg4dec,False,False,True,cc_library_shared
-libcodec2_soft_mpeg4enc,False,False,True,cc_library_shared
-libcodec2_soft_opusdec,False,False,True,cc_library_shared
-libcodec2_soft_opusenc,False,False,True,cc_library_shared
-libcodec2_soft_rawdec,False,False,True,cc_library_shared
-libcodec2_soft_vorbisdec,False,False,True,cc_library_shared
-libcodec2_soft_vp8dec,False,False,True,cc_library_shared
-libcodec2_soft_vp8enc,False,False,True,cc_library_shared
-libcodec2_soft_vp9dec,False,False,True,cc_library_shared
-libcodec2_soft_vp9enc,False,False,True,cc_library_shared
-libcodec2_soft_xaacdec,False,False,True,cc_library_shared
-libcodec2_vndk,True,False,True,cc_library_shared
-libcompiler_rt,True,True,False,cc_library
-libcrypto,True,False,True,cc_library
-libcrypto_utils,True,False,True,cc_library
-libcurl,True,False,True,cc_library
-libcutils,True,True,True,cc_library
-libdemangle,False,False,True,cc_library
-libdexfile_support,False,False,True,cc_library
-libdiskconfig,True,False,True,cc_library
-libdng_sdk,False,False,True,cc_library
-libdrm,False,False,True,cc_library
-libdumpstateutil,True,False,True,cc_library_shared
-libeffectsconfig,False,False,True,cc_library
-libelf,False,False,True,cc_library
-libevent,True,False,True,cc_library
-libexif,True,False,True,cc_library_shared
-libexpat,True,False,True,cc_library
-libfmq,True,False,True,cc_library
-libgatekeeper,True,False,True,cc_library_shared
-libgflags,False,False,True,cc_library
-libgrallocusage,False,False,True,cc_library
-libgtest_prod,False,False,True,cc_library
-libgui,True,False,False,cc_library_shared
-libhardware,True,True,True,cc_library_shared
-libhardware_legacy,True,False,True,cc_library_shared
-libhidladapter,False,False,True,cc_library
-libhidlallocatorutils,True,False,True,cc_library
-libhidlbase,True,True,True,cc_library
-libhidlcache,True,False,True,cc_library
-libhidlmemory,True,True,True,cc_library
-libhidltransport,True,True,True,cc_library
-libhwbinder,True,True,True,cc_library
-libhwbinder_noltopgo,True,True,True,cc_library
-libion,True,True,True,cc_library
-libjpeg,True,False,True,cc_library
-libjsoncpp,True,True,True,cc_library
-libkeymaster4,False,False,True,cc_library_shared
-libkeymaster4support,False,False,True,cc_library
-libkeymaster_messages,True,False,True,cc_library_shared
-libkeymaster_portable,True,False,True,cc_library
-libkmsxx,False,False,True,cc_library_shared
-libldacBT_abr,True,False,True,cc_library_shared
-libldacBT_enc,True,False,True,cc_library_shared
-liblz4,True,False,True,cc_library
-liblzma,True,True,True,cc_library
-libmedia_codecserviceregistrant,False,False,True,cc_library_shared
-libmedia_ecoservice,False,False,True,cc_library_shared
-libmedia_helper,True,False,True,cc_library
-libmedia_omx,True,False,True,cc_library_shared
-libmemtrack,True,False,True,cc_library_shared
-libminijail,True,False,True,cc_library
-libmkbootimg_abi_check,True,False,True,cc_library
-libmojo,False,False,True,cc_library_shared
-libnetutils,True,False,True,cc_library_shared
-libnl,True,False,True,cc_library
-libopus,True,False,True,cc_library_shared
-libparameter,False,False,True,cc_library_shared
-libpcap,False,False,True,cc_library
-libpcre2,True,False,True,cc_library
-libperfmgr,False,False,True,cc_library
-libpiex,True,False,True,cc_library_shared
-libplatformprotos-static,False,False,True,cc_library
-libpng,True,False,True,cc_library
-libpower,True,False,True,cc_library
-libprocessgroup,True,True,True,cc_library
-libprocinfo,True,False,True,cc_library
-libprotobuf-cpp-full,True,False,True,cc_library_shared
-libprotobuf-cpp-full-rtti,False,False,True,cc_library_shared
-libprotobuf-cpp-lite,True,False,True,cc_library
-libprotobuf-cpp-lite-rtti,False,False,True,cc_library_shared
-libpuresoftkeymasterdevice,True,False,True,cc_library
-libradio_metadata,True,False,True,cc_library_shared
-libremote-processor,False,False,True,cc_library_shared
-libscudo_wrapper,False,False,True,cc_library_shared
-libselinux,True,False,True,cc_library
-libsfplugin_ccodec_utils,False,False,True,cc_library_shared
-libsoftkeymasterdevice,True,False,True,cc_library
-libspeexresampler,True,False,True,cc_library_shared
-libsqlite,True,False,True,cc_library
-libssl,True,False,True,cc_library
-libstagefright_amrnb_common,True,False,True,cc_library_shared
-libstagefright_bufferpool@1.0,False,False,True,cc_library
-libstagefright_bufferpool@2.0,True,False,True,cc_library
-libstagefright_bufferqueue_helper,True,False,True,cc_library_shared
-libstagefright_ccodec_utils,False,False,True,cc_library_shared
-libstagefright_codec2,False,False,True,cc_library_shared
-libstagefright_codec2_vndk,False,False,True,cc_library_shared
-libstagefright_enc_common,True,False,True,cc_library
-libstagefright_flacdec,True,False,True,cc_library
-libstagefright_foundation,True,False,True,cc_library
-libstagefright_omx,True,False,True,cc_library_shared
-libstagefright_omx_utils,True,False,True,cc_library_shared
-libstagefright_simple_c2component,False,False,True,cc_library_shared
-libstagefright_soft_aacdec,False,False,True,cc_library_shared
-libstagefright_soft_aacenc,False,False,True,cc_library_shared
-libstagefright_soft_amrdec,False,False,True,cc_library_shared
-libstagefright_soft_amrnbenc,False,False,True,cc_library_shared
-libstagefright_soft_amrwbenc,False,False,True,cc_library_shared
-libstagefright_soft_avcdec,False,False,True,cc_library_shared
-libstagefright_soft_avcenc,False,False,True,cc_library_shared
-libstagefright_soft_c2aacdec,False,False,True,cc_library_shared
-libstagefright_soft_c2aacenc,False,False,True,cc_library_shared
-libstagefright_soft_c2amrnbdec,False,False,True,cc_library_shared
-libstagefright_soft_c2amrnbenc,False,False,True,cc_library_shared
-libstagefright_soft_c2amrwbdec,False,False,True,cc_library_shared
-libstagefright_soft_c2amrwbenc,False,False,True,cc_library_shared
-libstagefright_soft_c2avcdec,False,False,True,cc_library_shared
-libstagefright_soft_c2avcenc,False,False,True,cc_library_shared
-libstagefright_soft_c2common,False,False,True,cc_library_shared
-libstagefright_soft_c2flacdec,False,False,True,cc_library_shared
-libstagefright_soft_c2flacenc,False,False,True,cc_library_shared
-libstagefright_soft_c2g711alawdec,False,False,True,cc_library_shared
-libstagefright_soft_c2g711mlawdec,False,False,True,cc_library_shared
-libstagefright_soft_c2gsmdec,False,False,True,cc_library_shared
-libstagefright_soft_c2h263dec,False,False,True,cc_library_shared
-libstagefright_soft_c2h263enc,False,False,True,cc_library_shared
-libstagefright_soft_c2hevcdec,False,False,True,cc_library_shared
-libstagefright_soft_c2mp3dec,False,False,True,cc_library_shared
-libstagefright_soft_c2mpeg2dec,False,False,True,cc_library_shared
-libstagefright_soft_c2mpeg4dec,False,False,True,cc_library_shared
-libstagefright_soft_c2mpeg4enc,False,False,True,cc_library_shared
-libstagefright_soft_c2opusdec,False,False,True,cc_library_shared
-libstagefright_soft_c2rawdec,False,False,True,cc_library_shared
-libstagefright_soft_c2vorbisdec,False,False,True,cc_library_shared
-libstagefright_soft_c2vp8dec,False,False,True,cc_library_shared
-libstagefright_soft_c2vp8enc,False,False,True,cc_library_shared
-libstagefright_soft_c2vp9dec,False,False,True,cc_library_shared
-libstagefright_soft_c2vp9enc,False,False,True,cc_library_shared
-libstagefright_soft_c2xaacdec,False,False,True,cc_library_shared
-libstagefright_soft_flacdec,False,False,True,cc_library_shared
-libstagefright_soft_flacenc,False,False,True,cc_library_shared
-libstagefright_soft_g711dec,False,False,True,cc_library_shared
-libstagefright_soft_gsmdec,False,False,True,cc_library_shared
-libstagefright_soft_hevcdec,False,False,True,cc_library_shared
-libstagefright_soft_mp3dec,False,False,True,cc_library_shared
-libstagefright_soft_mpeg2dec,False,False,True,cc_library_shared
-libstagefright_soft_mpeg4dec,False,False,True,cc_library_shared
-libstagefright_soft_mpeg4enc,False,False,True,cc_library_shared
-libstagefright_soft_opusdec,False,False,True,cc_library_shared
-libstagefright_soft_rawdec,False,False,True,cc_library_shared
-libstagefright_soft_vorbisdec,False,False,True,cc_library_shared
-libstagefright_soft_vpxdec,False,False,True,cc_library_shared
-libstagefright_soft_vpxenc,False,False,True,cc_library_shared
-libstagefright_soft_xaacdec,False,False,True,cc_library_shared
-libstagefright_softomx,True,False,True,cc_library_shared
-libstagefright_xmlparser,True,False,True,cc_library_shared
-libsysutils,True,False,True,cc_library
-libtextclassifier_hash,False,False,True,cc_library_shared
-libtinyalsa,True,False,True,cc_library
-libtinyxml2,True,False,True,cc_library
-libui,True,False,True,cc_library_shared
-libunwindstack,True,True,True,cc_library
-libusb,False,False,True,cc_library
-libusbhost,True,False,True,cc_library
-libutils,True,True,True,cc_library
-libutilscallstack,True,True,True,cc_library
-libvorbisidec,True,False,True,cc_library
-libwifi-system-iface,True,False,True,cc_library
-libxml2,True,False,True,cc_library
-libyuv,True,False,True,cc_library
-libz,True,True,True,cc_library
-libziparchive,True,False,True,cc_library
-vendor.nxp.nxpese@1.0,False,False,True,hidl_interface
-vendor.nxp.nxpese@1.0-adapter-helper,False,False,True,hidl_interface
-vendor.nxp.nxpnfc@1.0,False,False,True,hidl_interface
-vendor.nxp.nxpnfc@1.0-adapter-helper,False,False,True,hidl_interface
diff --git a/vndk/tools/definition-tool/datasets/eligible-list-29.csv b/vndk/tools/definition-tool/datasets/eligible-list-29.csv
deleted file mode 100644
index 360f7d49e..000000000
--- a/vndk/tools/definition-tool/datasets/eligible-list-29.csv
+++ /dev/null
@@ -1,826 +0,0 @@
-Path,Tag,Comments
-/apex/com.android.runtime/${LIB}/bionic/libc.so,LL-NDK,
-/apex/com.android.runtime/${LIB}/bionic/libdl.so,LL-NDK,
-/apex/com.android.runtime/${LIB}/bionic/libm.so,LL-NDK,
-/system/${LIB}/android.frameworks.cameraservice.common@2.0.so,VNDK,
-/system/${LIB}/android.frameworks.cameraservice.device@2.0.so,VNDK,
-/system/${LIB}/android.frameworks.cameraservice.service@2.0.so,VNDK,
-/system/${LIB}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.stats@1.0.so,VNDK,
-/system/${LIB}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/android.hardware.atrace@1.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common-util.so,FWK-ONLY,
-/system/${LIB}/android.hardware.audio.common@2.0-util.so,FWK-ONLY,
-/system/${LIB}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@4.0-util.so,FWK-ONLY,
-/system/${LIB}/android.hardware.audio.common@4.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.common@5.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@4.0.so,VNDK,
-/system/${LIB}/android.hardware.audio.effect@5.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@4.0.so,VNDK,
-/system/${LIB}/android.hardware.audio@5.0.so,VNDK,
-/system/${LIB}/android.hardware.authsecret@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.audiocontrol@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/android.hardware.biometrics.face@1.0.so,VNDK,
-/system/${LIB}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth.a2dp@1.0.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth.audio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.broadcastradio@2.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.3.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.4.so,VNDK,
-/system/${LIB}/android.hardware.camera.device@3.5.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.3.so,VNDK,
-/system/${LIB}/android.hardware.camera.metadata@3.4.so,VNDK,
-/system/${LIB}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/android.hardware.camera.provider@2.5.so,VNDK,
-/system/${LIB}/android.hardware.cas.native@1.0.so,VNDK,
-/system/${LIB}/android.hardware.cas@1.0.so,VNDK,
-/system/${LIB}/android.hardware.cas@1.1.so,VNDK,
-/system/${LIB}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/android.hardware.configstore@1.1.so,VNDK,
-/system/${LIB}/android.hardware.confirmationui-support-lib.so,VNDK,
-/system/${LIB}/android.hardware.confirmationui@1.0.so,VNDK,
-/system/${LIB}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.1.so,VNDK,
-/system/${LIB}/android.hardware.drm@1.2.so,VNDK,
-/system/${LIB}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/android.hardware.fastboot@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss.measurement_corrections@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss.visibility_control@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/android.hardware.gnss@1.1.so,VNDK,
-/system/${LIB}/android.hardware.gnss@2.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.allocator@2.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.allocator@3.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.bufferqueue@2.0.so,VNDK,
-/system/${LIB}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.common@1.1.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.common@1.2.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/android.hardware.graphics.composer@2.2.so,VNDK,
-/system/${LIB}/android.hardware.graphics.composer@2.3.so,VNDK,
-/system/${LIB}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.mapper@2.1.so,VNDK-SP,
-/system/${LIB}/android.hardware.graphics.mapper@3.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.health.storage@1.0.so,VNDK,
-/system/${LIB}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/android.hardware.health@2.0.so,VNDK,
-/system/${LIB}/android.hardware.input.classifier@1.0.so,VNDK,
-/system/${LIB}/android.hardware.input.common@1.0.so,VNDK,
-/system/${LIB}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/android.hardware.keymaster@4.0.so,VNDK,
-/system/${LIB}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/android.hardware.media.bufferpool@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media.bufferpool@2.0.so,VNDK,
-/system/${LIB}/android.hardware.media.c2@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/android.hardware.neuralnetworks@1.0.so,VNDK,
-/system/${LIB}/android.hardware.neuralnetworks@1.1.so,VNDK,
-/system/${LIB}/android.hardware.neuralnetworks@1.2.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.1.so,VNDK,
-/system/${LIB}/android.hardware.nfc@1.2.so,VNDK,
-/system/${LIB}/android.hardware.oemlock@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power.stats@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/android.hardware.power@1.1.so,VNDK,
-/system/${LIB}/android.hardware.power@1.2.so,VNDK,
-/system/${LIB}/android.hardware.power@1.3.so,VNDK,
-/system/${LIB}/android.hardware.radio.config@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio.config@1.1.so,VNDK,
-/system/${LIB}/android.hardware.radio.config@1.2.so,VNDK,
-/system/${LIB}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.2.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.3.so,VNDK,
-/system/${LIB}/android.hardware.radio@1.4.so,VNDK,
-/system/${LIB}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/android.hardware.secure_element@1.0.so,VNDK,
-/system/${LIB}/android.hardware.secure_element@1.1.so,VNDK,
-/system/${LIB}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/android.hardware.sensors@2.0.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.0-core.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.1.so,VNDK,
-/system/${LIB}/android.hardware.soundtrigger@2.2.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/android.hardware.thermal@1.1.so,VNDK,
-/system/${LIB}/android.hardware.thermal@2.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.cec@2.0.so,VNDK,
-/system/${LIB}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb.gadget@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.1.so,VNDK,
-/system/${LIB}/android.hardware.usb@1.2.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.1.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.2.so,VNDK,
-/system/${LIB}/android.hardware.vibrator@1.3.so,VNDK,
-/system/${LIB}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/android.hardware.weaver@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.hostapd@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.hostapd@1.1.so,VNDK,
-/system/${LIB}/android.hardware.wifi.offload@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.1.so,VNDK,
-/system/${LIB}/android.hardware.wifi.supplicant@1.2.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.1.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.2.so,VNDK,
-/system/${LIB}/android.hardware.wifi@1.3.so,VNDK,
-/system/${LIB}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/android.hidl.memory.block@1.0.so,VNDK,
-/system/${LIB}/android.hidl.memory.token@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.safe_union@1.0.so,VNDK-SP,
-/system/${LIB}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/android.system.net.netd@1.0.so,VNDK,
-/system/${LIB}/android.system.net.netd@1.1.so,VNDK,
-/system/${LIB}/android.system.suspend@1.0.so,VNDK,
-/system/${LIB}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/drm/libfwdlockengine.so,FWK-ONLY,
-/system/${LIB}/extractors/libaacextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libamrextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libflacextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmidiextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmkvextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmp3extractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmp4extractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libmpeg2extractor.so,FWK-ONLY,
-/system/${LIB}/extractors/liboggextractor.so,FWK-ONLY,
-/system/${LIB}/extractors/libwavextractor.so,FWK-ONLY,
-/system/${LIB}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP,
-/system/${LIB}/hw/audio.a2dp.default.so,FWK-ONLY,
-/system/${LIB}/ld-android.so,LL-NDK-Private,
-/system/${LIB}/libEGL.so,LL-NDK,
-/system/${LIB}/libETC1.so,FWK-ONLY,
-/system/${LIB}/libFFTEm.so,FWK-ONLY,
-/system/${LIB}/libGLESv1_CM.so,LL-NDK,
-/system/${LIB}/libGLESv2.so,LL-NDK,
-/system/${LIB}/libGLESv3.so,LL-NDK,
-/system/${LIB}/libLLVM_android.so,FWK-ONLY,
-/system/${LIB}/libOpenMAXAL.so,FWK-ONLY,
-/system/${LIB}/libOpenSLES.so,FWK-ONLY,
-/system/${LIB}/libRS.so,LL-NDK,
-/system/${LIB}/libRSCacheDir.so,FWK-ONLY,
-/system/${LIB}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/libRScpp.so,FWK-ONLY,
-/system/${LIB}/libaaudio.so,FWK-ONLY,
-/system/${LIB}/libaaudioservice.so,FWK-ONLY,
-/system/${LIB}/libadbconnection.so,FWK-ONLY,
-/system/${LIB}/libadbconnectiond.so,FWK-ONLY,
-/system/${LIB}/libadf.so,VNDK,
-/system/${LIB}/libandroid.so,FWK-ONLY,
-/system/${LIB}/libandroid_net.so,LL-NDK,
-/system/${LIB}/libandroid_runtime.so,FWK-ONLY,
-/system/${LIB}/libandroid_servers.so,FWK-ONLY,
-/system/${LIB}/libandroidfw.so,FWK-ONLY,
-/system/${LIB}/libappfuse.so,FWK-ONLY,
-/system/${LIB}/libart-compiler.so,FWK-ONLY,
-/system/${LIB}/libart-dexlayout.so,FWK-ONLY,
-/system/${LIB}/libart-disassembler.so,FWK-ONLY,
-/system/${LIB}/libart.so,FWK-ONLY,
-/system/${LIB}/libartd-compiler.so,FWK-ONLY,
-/system/${LIB}/libartd-dexlayout.so,FWK-ONLY,
-/system/${LIB}/libartd.so,FWK-ONLY,
-/system/${LIB}/libasyncio.so,FWK-ONLY,
-/system/${LIB}/libaudioclient.so,FWK-ONLY,
-/system/${LIB}/libaudioeffect_jni.so,FWK-ONLY,
-/system/${LIB}/libaudioflinger.so,FWK-ONLY,
-/system/${LIB}/libaudiohal.so,FWK-ONLY,
-/system/${LIB}/libaudiohal@2.0.so,FWK-ONLY,
-/system/${LIB}/libaudiohal_deathhandler.so,FWK-ONLY,
-/system/${LIB}/libaudiomanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyenginedefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanager.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicymanagerdefault.so,FWK-ONLY,
-/system/${LIB}/libaudiopolicyservice.so,FWK-ONLY,
-/system/${LIB}/libaudioprocessing.so,FWK-ONLY,
-/system/${LIB}/libaudioroute.so,VNDK,
-/system/${LIB}/libaudiospdif.so,FWK-ONLY,
-/system/${LIB}/libaudioutils.so,VNDK,
-/system/${LIB}/libavservices_minijail.so,FWK-ONLY,Vendor module should link libavservices_minijail_vendor.so
-/system/${LIB}/libbacktrace.so,VNDK-SP-Private,
-/system/${LIB}/libbase.so,VNDK-SP,
-/system/${LIB}/libbcc.so,FWK-ONLY,
-/system/${LIB}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/libbinder.so,VNDK,
-/system/${LIB}/libbinderthreadstate.so,VNDK-SP-Private,
-/system/${LIB}/libbinderwrapper.so,FWK-ONLY,
-/system/${LIB}/libblas.so,VNDK-SP-Private,
-/system/${LIB}/libbluetooth-binder.so,FWK-ONLY,
-/system/${LIB}/libbluetooth.so,FWK-ONLY,
-/system/${LIB}/libbluetooth_jni.so,FWK-ONLY,
-/system/${LIB}/libbootanimation.so,FWK-ONLY,
-/system/${LIB}/libbrillo-binder.so,FWK-ONLY,
-/system/${LIB}/libbrillo-stream.so,FWK-ONLY,
-/system/${LIB}/libbrillo.so,FWK-ONLY,
-/system/${LIB}/libbrotli.so,FWK-ONLY,
-/system/${LIB}/libbufferhub.so,FWK-ONLY,
-/system/${LIB}/libbufferhubqueue.so,FWK-ONLY,
-/system/${LIB}/libbz.so,FWK-ONLY,
-/system/${LIB}/libc++.so,VNDK-SP,
-/system/${LIB}/libc.so,LL-NDK,
-/system/${LIB}/libc_malloc_debug.so,LL-NDK-Private,
-/system/${LIB}/libcamera2ndk.so,FWK-ONLY,
-/system/${LIB}/libcamera_client.so,FWK-ONLY,
-/system/${LIB}/libcamera_metadata.so,VNDK,
-/system/${LIB}/libcameraservice.so,FWK-ONLY,
-/system/${LIB}/libcap.so,VNDK,
-/system/${LIB}/libcgrouprc.so,LL-NDK,
-/system/${LIB}/libchrome.so,FWK-ONLY,
-/system/${LIB}/libclang_rt.asan-aarch64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-arm-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-i686-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-mips-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-mips64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.asan-x86_64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.hwasan-aarch64-android.so,LL-NDK,
-/system/${LIB}/libclang_rt.scudo-aarch64-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo-arm-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo-i686-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo-x86_64-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo_minimal-aarch64-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo_minimal-arm-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo_minimal-i686-android.so,VNDK,
-/system/${LIB}/libclang_rt.scudo_minimal-x86_64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/libcn-cbor.so,VNDK,
-/system/${LIB}/libcodec2.so,VNDK,
-/system/${LIB}/libcodec2_hidl@1.0.so,VNDK,
-/system/${LIB}/libcodec2_vndk.so,VNDK,
-/system/${LIB}/libcompiler_rt.so,VNDK-SP-Private,
-/system/${LIB}/libcrypto.so,VNDK,
-/system/${LIB}/libcrypto_utils.so,VNDK,
-/system/${LIB}/libcups.so,FWK-ONLY,
-/system/${LIB}/libcurl.so,VNDK,
-/system/${LIB}/libcutils.so,VNDK-SP,
-/system/${LIB}/libdebuggerd_client.so,FWK-ONLY,
-/system/${LIB}/libdefcontainer_jni.so,FWK-ONLY,
-/system/${LIB}/libdiskconfig.so,VNDK,
-/system/${LIB}/libdisplayservicehidl.so,FWK-ONLY,
-/system/${LIB}/libdl.so,LL-NDK,
-/system/${LIB}/libdl_android.so,LL-NDK-Private,
-/system/${LIB}/libdng_sdk.so,FWK-ONLY,
-/system/${LIB}/libdrmframework.so,FWK-ONLY,
-/system/${LIB}/libdrmframework_jni.so,FWK-ONLY,
-/system/${LIB}/libdt_fd_forward.so,FWK-ONLY,
-/system/${LIB}/libdt_socket.so,FWK-ONLY,
-/system/${LIB}/libdumpstateaidl.so,FWK-ONLY,
-/system/${LIB}/libdumpstateutil.so,VNDK,
-/system/${LIB}/libeffectsconfig.so,FWK-ONLY,
-/system/${LIB}/libevent.so,VNDK,
-/system/${LIB}/libexif.so,VNDK,
-/system/${LIB}/libexpat.so,VNDK,
-/system/${LIB}/libext2_blkid.so,FWK-ONLY,
-/system/${LIB}/libext2_com_err.so,FWK-ONLY,
-/system/${LIB}/libext2_e2p.so,FWK-ONLY,
-/system/${LIB}/libext2_misc.so,FWK-ONLY,
-/system/${LIB}/libext2_quota.so,FWK-ONLY,
-/system/${LIB}/libext2_uuid.so,FWK-ONLY,
-/system/${LIB}/libext2fs.so,FWK-ONLY,
-/system/${LIB}/libext4_utils.so,FWK-ONLY,
-/system/${LIB}/libf2fs_sparseblock.so,FWK-ONLY,
-/system/${LIB}/libfilterfw.so,FWK-ONLY,
-/system/${LIB}/libfilterpack_imageproc.so,FWK-ONLY,
-/system/${LIB}/libfmq.so,VNDK,
-/system/${LIB}/libframesequence.so,FWK-ONLY,
-/system/${LIB}/libft2.so,FWK-ONLY-RS,
-/system/${LIB}/libgatekeeper.so,VNDK,
-/system/${LIB}/libgiftranscode.so,FWK-ONLY,
-/system/${LIB}/libgraphicsenv.so,FWK-ONLY,
-/system/${LIB}/libgtest_prod.so,FWK-ONLY,
-/system/${LIB}/libgui.so,VNDK-Private,
-/system/${LIB}/libhardware.so,VNDK-SP,
-/system/${LIB}/libhardware_legacy.so,VNDK,
-/system/${LIB}/libharfbuzz_ng.so,FWK-ONLY,
-/system/${LIB}/libheif.so,FWK-ONLY,
-/system/${LIB}/libhidcommand_jni.so,FWK-ONLY,
-/system/${LIB}/libhidl-gen-hash.so,FWK-ONLY,
-/system/${LIB}/libhidl-gen-utils.so,FWK-ONLY,
-/system/${LIB}/libhidlallocatorutils.so,VNDK,
-/system/${LIB}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/libhidlcache.so,VNDK,
-/system/${LIB}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/libhwbinder_noltopgo.so,VNDK-SP,
-/system/${LIB}/libhwui.so,FWK-ONLY,
-/system/${LIB}/libicui18n.so,FWK-ONLY,
-/system/${LIB}/libicuuc.so,FWK-ONLY,
-/system/${LIB}/libimg_utils.so,FWK-ONLY,
-/system/${LIB}/libincident.so,FWK-ONLY,
-/system/${LIB}/libinput.so,FWK-ONLY,
-/system/${LIB}/libinputflinger.so,FWK-ONLY,
-/system/${LIB}/libinputservice.so,FWK-ONLY,
-/system/${LIB}/libion.so,VNDK-SP,
-/system/${LIB}/libiprouteutil.so,FWK-ONLY,
-/system/${LIB}/libjavacore.so,FWK-ONLY,
-/system/${LIB}/libjavacrypto.so,FWK-ONLY,
-/system/${LIB}/libjdwp.so,FWK-ONLY,
-/system/${LIB}/libjni_pacprocessor.so,FWK-ONLY,
-/system/${LIB}/libjnigraphics.so,FWK-ONLY,
-/system/${LIB}/libjpeg.so,VNDK,
-/system/${LIB}/libjsoncpp.so,VNDK-SP,
-/system/${LIB}/libkeymaster4support.so,FWK-ONLY,
-/system/${LIB}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/libkeymaster_portable.so,VNDK,
-/system/${LIB}/libkeystore-engine.so,FWK-ONLY,
-/system/${LIB}/libkeystore_aidl.so,FWK-ONLY,
-/system/${LIB}/libkeystore_binder.so,FWK-ONLY,
-/system/${LIB}/libkeystore_parcelables.so,FWK-ONLY,
-/system/${LIB}/libkeyutils.so,FWK-ONLY,
-/system/${LIB}/liblayers_proto.so,FWK-ONLY,
-/system/${LIB}/libldacBT_abr.so,VNDK,
-/system/${LIB}/libldacBT_enc.so,VNDK,
-/system/${LIB}/liblog.so,LL-NDK,
-/system/${LIB}/liblogwrap.so,FWK-ONLY,
-/system/${LIB}/liblshal.so,FWK-ONLY,
-/system/${LIB}/liblz4.so,VNDK,
-/system/${LIB}/liblzma.so,VNDK-SP,
-/system/${LIB}/libm.so,LL-NDK,
-/system/${LIB}/libmdnssd.so,FWK-ONLY,
-/system/${LIB}/libmedia.so,FWK-ONLY,
-/system/${LIB}/libmedia_helper.so,VNDK,
-/system/${LIB}/libmedia_jni.so,FWK-ONLY,
-/system/${LIB}/libmedia_omx.so,VNDK,
-/system/${LIB}/libmediadrm.so,FWK-ONLY,
-/system/${LIB}/libmediaextractorservice.so,FWK-ONLY,
-/system/${LIB}/libmedialogservice.so,FWK-ONLY,
-/system/${LIB}/libmediametrics.so,FWK-ONLY,
-/system/${LIB}/libmediandk.so,FWK-ONLY-RS,
-/system/${LIB}/libmediaplayerservice.so,FWK-ONLY,
-/system/${LIB}/libmediautils.so,FWK-ONLY,
-/system/${LIB}/libmemtrack.so,VNDK,
-/system/${LIB}/libmemunreachable.so,FWK-ONLY,
-/system/${LIB}/libmetricslogger.so,FWK-ONLY,
-/system/${LIB}/libminijail.so,VNDK,
-/system/${LIB}/libminikin.so,FWK-ONLY,
-/system/${LIB}/libmkbootimg_abi_check.so,VNDK,
-/system/${LIB}/libmtp.so,FWK-ONLY,
-/system/${LIB}/libnativewindow.so,LL-NDK,
-/system/${LIB}/libnbaio.so,FWK-ONLY,Vendor module should link libnbaio_mono.so
-/system/${LIB}/libnblog.so,FWK-ONLY,
-/system/${LIB}/libnetd_client.so,LL-NDK-Private,
-/system/${LIB}/libnetdutils.so,FWK-ONLY,
-/system/${LIB}/libnetlink.so,FWK-ONLY,
-/system/${LIB}/libnetutils.so,VNDK,
-/system/${LIB}/libneuralnetworks.so,LL-NDK,
-/system/${LIB}/libnfc-nci.so,FWK-ONLY,
-/system/${LIB}/libnfc_nci_jni.so,FWK-ONLY,
-/system/${LIB}/libnl.so,VNDK,
-/system/${LIB}/libnpt.so,FWK-ONLY,
-/system/${LIB}/libopenjdk.so,FWK-ONLY,
-/system/${LIB}/libopenjdkd.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvm.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmd.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmti.so,FWK-ONLY,
-/system/${LIB}/libopenjdkjvmtid.so,FWK-ONLY,
-/system/${LIB}/libopus.so,VNDK,
-/system/${LIB}/libpackagelistparser.so,FWK-ONLY,
-/system/${LIB}/libpcap.so,FWK-ONLY,
-/system/${LIB}/libpcre2.so,VNDK,
-/system/${LIB}/libpcrecpp.so,FWK-ONLY,
-/system/${LIB}/libpdfium.so,FWK-ONLY,
-/system/${LIB}/libpdx_default_transport.so,FWK-ONLY,
-/system/${LIB}/libpiex.so,VNDK,
-/system/${LIB}/libpixelflinger.so,FWK-ONLY,
-/system/${LIB}/libpng.so,VNDK,
-/system/${LIB}/libpower.so,VNDK,
-/system/${LIB}/libpowermanager.so,FWK-ONLY,
-/system/${LIB}/libprintspooler_jni.so,FWK-ONLY,
-/system/${LIB}/libprocessgroup.so,VNDK-SP,
-/system/${LIB}/libprocinfo.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/libprotoutil.so,FWK-ONLY,
-/system/${LIB}/libpuresoftkeymasterdevice.so,VNDK,
-/system/${LIB}/libqtaguid.so,FWK-ONLY,
-/system/${LIB}/libradio_metadata.so,VNDK,
-/system/${LIB}/libresourcemanagerservice.so,FWK-ONLY,
-/system/${LIB}/librs_jni.so,FWK-ONLY,
-/system/${LIB}/librtp_jni.so,FWK-ONLY,
-/system/${LIB}/libschedulerservicehidl.so,FWK-ONLY,
-/system/${LIB}/libselinux.so,VNDK,
-/system/${LIB}/libsensor.so,FWK-ONLY,
-/system/${LIB}/libsensorservice.so,FWK-ONLY,
-/system/${LIB}/libsensorservicehidl.so,FWK-ONLY,
-/system/${LIB}/libsepol.so,FWK-ONLY,
-/system/${LIB}/libservices.so,FWK-ONLY,
-/system/${LIB}/libsigchain.so,FWK-ONLY,
-/system/${LIB}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/libsonic.so,FWK-ONLY,
-/system/${LIB}/libsonivox.so,FWK-ONLY,
-/system/${LIB}/libsoundpool.so,FWK-ONLY,
-/system/${LIB}/libsoundtrigger.so,FWK-ONLY,
-/system/${LIB}/libsoundtriggerservice.so,FWK-ONLY,
-/system/${LIB}/libsparse.so,FWK-ONLY,
-/system/${LIB}/libspeexresampler.so,VNDK,
-/system/${LIB}/libsqlite.so,VNDK,
-/system/${LIB}/libssl.so,VNDK,
-/system/${LIB}/libstagefright.so,FWK-ONLY,
-/system/${LIB}/libstagefright_amrnb_common.so,VNDK,
-/system/${LIB}/libstagefright_bufferpool@2.0.so,VNDK,
-/system/${LIB}/libstagefright_bufferqueue_helper.so,VNDK,
-/system/${LIB}/libstagefright_enc_common.so,VNDK,
-/system/${LIB}/libstagefright_flacdec.so,VNDK,
-/system/${LIB}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/libstagefright_http_support.so,FWK-ONLY,
-/system/${LIB}/libstagefright_httplive.so,FWK-ONLY,
-/system/${LIB}/libstagefright_omx.so,VNDK,
-/system/${LIB}/libstagefright_omx_utils.so,VNDK,
-/system/${LIB}/libstagefright_soft_aacdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_aacenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_amrdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_amrnbenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_amrwbenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_avcdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_avcenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_flacdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_flacenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_g711dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_gsmdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_hevcdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mp3dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mpeg2dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mpeg4dec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_mpeg4enc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_opusdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_rawdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_vorbisdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_vpxdec.so,FWK-ONLY,
-/system/${LIB}/libstagefright_soft_vpxenc.so,FWK-ONLY,
-/system/${LIB}/libstagefright_softomx.so,VNDK,
-/system/${LIB}/libstagefright_xmlparser.so,VNDK,
-/system/${LIB}/libstatslog.so,FWK-ONLY,
-/system/${LIB}/libstdc++.so,FWK-ONLY,
-/system/${LIB}/libsurfaceflinger.so,FWK-ONLY,
-/system/${LIB}/libsuspend.so,FWK-ONLY,
-/system/${LIB}/libsync.so,LL-NDK,
-/system/${LIB}/libsysutils.so,VNDK,
-/system/${LIB}/libtextclassifier.so,FWK-ONLY,
-/system/${LIB}/libtextclassifier_hash.so,LL-NDK-Private,
-/system/${LIB}/libtinyalsa.so,VNDK,
-/system/${LIB}/libtinyxml2.so,VNDK,
-/system/${LIB}/libtombstoned_client.so,FWK-ONLY,
-/system/${LIB}/libui.so,VNDK,
-/system/${LIB}/libunwind.so,FWK-ONLY,
-/system/${LIB}/libunwindstack.so,VNDK-SP,
-/system/${LIB}/libusbhost.so,VNDK,
-/system/${LIB}/libutils.so,VNDK-SP,
-/system/${LIB}/libutilscallstack.so,VNDK-SP,
-/system/${LIB}/libvintf.so,FWK-ONLY,
-/system/${LIB}/libvndksupport.so,LL-NDK,
-/system/${LIB}/libvorbisidec.so,VNDK,
-/system/${LIB}/libvulkan.so,LL-NDK,
-/system/${LIB}/libwebviewchromium_loader.so,FWK-ONLY,
-/system/${LIB}/libwebviewchromium_plat_support.so,FWK-ONLY,
-/system/${LIB}/libwfds.so,FWK-ONLY,
-/system/${LIB}/libwifi-service.so,FWK-ONLY,
-/system/${LIB}/libwifi-system-iface.so,VNDK,
-/system/${LIB}/libwifi-system.so,FWK-ONLY,
-/system/${LIB}/libwifikeystorehal.so,FWK-ONLY,
-/system/${LIB}/libwilhelm.so,FWK-ONLY,
-/system/${LIB}/libxml2.so,VNDK,
-/system/${LIB}/libyuv.so,VNDK,
-/system/${LIB}/libz.so,VNDK-SP,
-/system/${LIB}/libziparchive.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.cameraservice.common@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.cameraservice.device@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.cameraservice.service@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.displayservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.schedulerservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.sensorservice@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.stats@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.frameworks.vr.composer@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.atrace@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@4.0-util.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.common@5.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio.effect@5.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.audio@5.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.authsecret@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.audiocontrol@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.evs@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.automotive.vehicle@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.biometrics.face@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.biometrics.fingerprint@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth.a2dp@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth.audio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.bluetooth@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.boot@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.broadcastradio@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.common@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.device@3.5.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.metadata@3.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.provider@2.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.camera.provider@2.5.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas.native@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.cas@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.configstore@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.confirmationui-support-lib.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.confirmationui@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.contexthub@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.drm@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.dumpstate@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.fastboot@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gatekeeper@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss.measurement_corrections@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss.visibility_control@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.gnss@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.allocator@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.allocator@3.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.bufferqueue@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.bufferqueue@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.graphics.composer@2.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health.storage@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.health@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.input.classifier@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.input.common@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.ir@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.keymaster@3.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.keymaster@4.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.light@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.bufferpool@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.bufferpool@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.c2@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media.omx@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.media@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.memtrack@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.neuralnetworks@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.neuralnetworks@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.neuralnetworks@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.nfc@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.oemlock@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power.stats@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.power@1.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.config@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.config@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.config@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio.deprecated@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.radio@1.4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.secure_element@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.secure_element@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.sensors@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.sensors@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.0-core.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.soundtrigger@2.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.config@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tetheroffload.control@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.thermal@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.cec@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.cec@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.tv.input@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb.gadget@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.usb@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vibrator@1.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.vr@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.weaver@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.hostapd@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.hostapd@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.offload@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi.supplicant@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hardware.wifi@1.3.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.allocator@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.memory.block@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0-utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.hidl.token@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.net.netd@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.net.netd@1.1.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.suspend@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/android.system.wifi.keystore@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libadf.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioroute.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libaudioutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libbinder.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcamera_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo-aarch64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo-arm-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo-i686-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo-x86_64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo_minimal-aarch64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo_minimal-arm-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo_minimal-i686-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.scudo_minimal-x86_64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-aarch64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-arm-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-i686-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libclang_rt.ubsan_standalone-x86_64-android.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcn-cbor.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcodec2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcodec2_hidl@1.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcodec2_vndk.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcrypto_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libcurl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdiskconfig.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libdumpstateutil.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libevent.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexif.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libexpat.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libfmq.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgatekeeper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libgui.so,VNDK-Private,
-/system/${LIB}/vndk${VNDK_VER}/libhardware_legacy.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libhidlallocatorutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libhidlcache.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libjpeg.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_messages.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libkeymaster_portable.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_abr.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libldacBT_enc.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/liblz4.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_helper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmedia_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmemtrack.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libminijail.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libmkbootimg_abi_check.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnetutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libnl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libopus.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpagemap.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpcre2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpiex.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpng.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpower.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprocinfo.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-full.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libprotobuf-cpp-lite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libpuresoftkeymasterdevice.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libradio_metadata.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libselinux.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsoftkeymasterdevice.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libspeexresampler.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsqlite.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libssl.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_amrnb_common.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_bufferpool@2.0.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_bufferqueue_helper.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_enc_common.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_flacdec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_foundation.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_omx_utils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_softomx.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libstagefright_xmlparser.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsuspend.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libsysutils.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyalsa.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libtinyxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libui.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libusbhost.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvixl-arm64.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libvorbisidec.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libwifi-system-iface.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libxml2.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libyuv.so,VNDK,
-/system/${LIB}/vndk${VNDK_VER}/libziparchive.so,VNDK,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.1.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.common@1.2.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@2.1.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.graphics.mapper@3.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.memory.token@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/android.hidl.safe_union@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/hw/android.hidl.memory@1.0-impl.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRSDriver.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libRS_internal.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbacktrace.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbcinfo.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libbinderthreadstate.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libblas.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libc++.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcompiler_rt.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libcutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libdexfile.so,VNDK-SP-Private,Workaround for degenerated VDNK
-/system/${LIB}/vndk-sp${VNDK_VER}/libhardware.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhidltransport.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhwbinder.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libhwbinder_noltopgo.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libion.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libjsoncpp.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/liblzma.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libprocessgroup.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwind.so,VNDK-SP-Private,
-/system/${LIB}/vndk-sp${VNDK_VER}/libunwindstack.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libutilscallstack.so,VNDK-SP,
-/system/${LIB}/vndk-sp${VNDK_VER}/libz.so,VNDK-SP,
-/vendor/${LIB}/hidl.tests.vendor@1.0.so,VND-ONLY,
-/vendor/${LIB}/hidl.tests.vendor@1.1.so,VND-ONLY,
-/vendor/${LIB}/libavservices_minijail_vendor.so,VND-ONLY,Framework module should link libavservices_minijail.so
-/vendor/${LIB}/libcld80211.so,VND-ONLY,
-/vendor/${LIB}/libeffects.so,VND-ONLY,
-/vendor/${LIB}/libhwc2on1adapter.so,VND-ONLY,
-/vendor/${LIB}/libnbaio_mono.so,VND-ONLY,
-/vendor/${LIB}/libreference-ril.so,VND-ONLY,
-/vendor/${LIB}/libril.so,VND-ONLY,
-/vendor/${LIB}/librilutils.so,VND-ONLY,
-/vendor/${LIB}/libtinycompress.so,VND-ONLY,
-/vendor/${LIB}/libwebrtc_audio_preprocessing.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libaudiopreprocessing.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libbundlewrapper.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libdownmix.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libeffectproxy.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libldnhncr.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libreverbwrapper.so,VND-ONLY,
-/vendor/${LIB}/soundfx/libvisualizer.so,VND-ONLY,
-[regex]^.*/android\.hardware\.graphics\.mapper@\d+\.\d+-impl\.so$,SP-HAL,
-[regex]^.*/android\.hardware\.renderscript@1\.0-impl\.so$,SP-HAL,
-[regex]^.*/gralloc\..*\.so$,SP-HAL,
-[regex]^/vendor/.*/libEGL_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLES_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv1_CM_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv2_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv3_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libPVRRS\.so$,SP-HAL,
-[regex]^/vendor/.*/libRSDriver.*\.so$,SP-HAL,
-[regex]^/vendor/.*/vulkan.*\.so$,SP-HAL,
diff --git a/vndk/tools/definition-tool/datasets/minimum_dlopen_deps.txt b/vndk/tools/definition-tool/datasets/minimum_dlopen_deps.txt
deleted file mode 100644
index 9453d4d08..000000000
--- a/vndk/tools/definition-tool/datasets/minimum_dlopen_deps.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/system/${LIB}/libEGL.so:[regex]/vendor/${LIB}/egl/libEGL[A-Za-z0-9_-]*\.so
-/system/${LIB}/libEGL.so:[regex]/vendor/${LIB}/egl/libGLES[A-Za-z0-9_-]*\.so
-/apex/com.android.runtime/${LIB}/bionic/libc.so:/apex/com.android.runtime/${LIB}/libc_malloc_debug.so
-/apex/com.android.runtime/${LIB}/bionic/libc.so:/apex/com.android.runtime/${LIB}/libicuuc.so
-/apex/com.android.runtime/${LIB}/bionic/libc.so:/system/${LIB}/libnetd_client.so
diff --git a/vndk/tools/definition-tool/datasets/minimum_tag_file.csv b/vndk/tools/definition-tool/datasets/minimum_tag_file.csv
deleted file mode 100644
index f6b79a8b9..000000000
--- a/vndk/tools/definition-tool/datasets/minimum_tag_file.csv
+++ /dev/null
@@ -1,59 +0,0 @@
-Path,Tag,Comments
-/apex/com.android.runtime/${LIB}/bionic/libc.so,LL-NDK,
-/apex/com.android.runtime/${LIB}/bionic/libdl.so,LL-NDK,
-/apex/com.android.runtime/${LIB}/bionic/libm.so,LL-NDK,
-/system/${LIB}/libEGL.so,LL-NDK,
-/system/${LIB}/libGLESv1_CM.so,LL-NDK,
-/system/${LIB}/libGLESv2.so,LL-NDK,
-/system/${LIB}/libGLESv3.so,LL-NDK,
-/system/${LIB}/libandroid_net.so,LL-NDK,
-/system/${LIB}/libc.so,LL-NDK,
-/system/${LIB}/libdl.so,LL-NDK,
-/system/${LIB}/libft2.so,FWK-ONLY-RS,
-/system/${LIB}/liblog.so,LL-NDK,
-/system/${LIB}/libm.so,LL-NDK,
-/system/${LIB}/libmediandk.so,FWK-ONLY-RS,
-/system/${LIB}/libnativewindow.so,LL-NDK,
-/system/${LIB}/libstdc++.so,LL-NDK,
-/system/${LIB}/libsync.so,LL-NDK,
-/system/${LIB}/libvndksupport.so,LL-NDK,
-/system/${LIB}/libvulkan.so,LL-NDK,
-/system/${LIB}/libz.so,LL-NDK,
-/system/${LIB}/vndk-sp/android.hardware.graphics.allocator@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp/android.hardware.graphics.common@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp/android.hardware.graphics.mapper@2.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp/android.hardware.renderscript@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp/android.hidl.base@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp/android.hidl.memory@1.0.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libRSCpuRef.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libRSDriver.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libRS_internal.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libbacktrace.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp/libbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libbcinfo.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libblas.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp/libc++.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libcompiler_rt.so,VNDK-SP-Indirect-Private,
-/system/${LIB}/vndk-sp/libcutils.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libft2.so,FWK-ONLY-RS,
-/system/${LIB}/vndk-sp/libhardware.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libhidlbase.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libhidlmemory.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libhidltransport.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libhwbinder.so,VNDK-SP,
-/system/${LIB}/vndk-sp/libion.so,VNDK-SP,
-/system/${LIB}/vndk-sp/liblzma.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp/libmediandk.so,FWK-ONLY-RS,
-/system/${LIB}/vndk-sp/libunwind.so,VNDK-SP-Indirect,
-/system/${LIB}/vndk-sp/libutils.so,VNDK-SP,
-[regex]^.*/android\.hardware\.graphics\.mapper@\d+\.\d+-impl\.so$,SP-HAL,
-[regex]^.*/android\.hardware\.renderscript@1\.0-impl\.so$,SP-HAL,
-[regex]^.*/gralloc\..*\.so$,SP-HAL,
-[regex]^/vendor/.*/libEGL_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLES_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv1_CM_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv2_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libGLESv3_.*\.so$,SP-HAL,
-[regex]^/vendor/.*/libPVRRS\.so$,SP-HAL,
-[regex]^/vendor/.*/libRSDriver.*\.so$,SP-HAL,
-[regex]^/vendor/.*/vulkan.*\.so$,SP-HAL,
diff --git a/vndk/tools/definition-tool/templates/vndk.txt b/vndk/tools/definition-tool/templates/vndk.txt
deleted file mode 100644
index dd4eb2847..000000000
--- a/vndk/tools/definition-tool/templates/vndk.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-ifneq ($(filter $(YOUR_DEVICE_NAME),$(TARGET_DEVICE)),)
-
-
-VNDK_SP_LIBRARIES := ##_VNDK_SP_##
-
-VNDK_SP_EXT_LIBRARIES := ##_VNDK_SP_EXT_##
-
-EXTRA_VENDOR_LIBRARIES := ##_EXTRA_VENDOR_LIBS_##
-
-# FIXME: Generate INSTALL_IN_HW_SUBDIR automatically
-INSTALL_IN_HW_SUBDIR := android.hidl.memory@1.0-impl
-
-
-#-------------------------------------------------------------------------------
-# VNDK Modules
-#-------------------------------------------------------------------------------
-
-# Start from Android P, VNDK directory will always be versioned.
-ifdef PLATFORM_VNDK_VERSION
-VNDK_SP_DIR := vndk-sp-$(PLATFORM_VNDK_VERSION)
-else
-VNDK_SP_DIR := vndk-sp
-endif
-
-LOCAL_PATH := $(call my-dir)
-
-define define-vndk-lib
-include $$(CLEAR_VARS)
-LOCAL_MODULE := $1.$2
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so
-LOCAL_STRIP_MODULE := false
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := optional
-LOCAL_INSTALLED_MODULE_STEM := $1.so
-LOCAL_MODULE_SUFFIX := .so
-LOCAL_MODULE_RELATIVE_PATH := $3$(if $(filter $1,$(INSTALL_IN_HW_SUBDIR)),/hw)
-LOCAL_VENDOR_MODULE := $4
-include $$(BUILD_PREBUILT)
-
-ifneq ($$(TARGET_2ND_ARCH),)
-ifneq ($$(TARGET_TRANSLATE_2ND_ARCH),true)
-include $$(CLEAR_VARS)
-LOCAL_MODULE := $1.$2
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_PREBUILT_MODULE_FILE := $$($$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so
-LOCAL_STRIP_MODULE := false
-LOCAL_MULTILIB := 32
-LOCAL_MODULE_TAGS := optional
-LOCAL_INSTALLED_MODULE_STEM := $1.so
-LOCAL_MODULE_SUFFIX := .so
-LOCAL_MODULE_RELATIVE_PATH := $3$(if $(filter $1,$(INSTALL_IN_HW_SUBDIR)),/hw)
-LOCAL_VENDOR_MODULE := $4
-include $$(BUILD_PREBUILT)
-endif # TARGET_TRANSLATE_2ND_ARCH is not true
-endif # TARGET_2ND_ARCH is not empty
-endef
-
-$(foreach lib,$(VNDK_SP_LIBRARIES),\
- $(eval $(call define-vndk-lib,$(lib),vndk-sp-gen,$(VNDK_SP_DIR),)))
-$(foreach lib,$(VNDK_SP_EXT_LIBRARIES),\
- $(eval $(call define-vndk-lib,$(lib),vndk-sp-ext-gen,$(VNDK_SP_DIR),true)))
-$(foreach lib,$(EXTRA_VENDOR_LIBRARIES),\
- $(eval $(call define-vndk-lib,$(lib),vndk-ext-gen,,true)))
-
-VNDK_SP_DIR :=
-
-
-#-------------------------------------------------------------------------------
-# Phony Package
-#-------------------------------------------------------------------------------
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(YOUR_DEVICE_NAME)-vndk
-LOCAL_MODULE_TAGS := optional
-LOCAL_REQUIRED_MODULES := \
- $(addsuffix .vndk-sp-gen,$(VNDK_SP_LIBRARIES)) \
- $(addsuffix .vndk-sp-ext-gen,$(VNDK_SP_EXT_LIBRARIES)) \
- $(addsuffix .vndk-ext-gen,$(EXTRA_VENDOR_LIBRARIES))
-include $(BUILD_PHONY_PACKAGE)
-
-# Unset variables
-VNDK_SP_LIBRARIES :=
-VNDK_SP_EXT_LIBRARIES :=
-EXTRA_VENDOR_LIBRARIES :=
-INSTALL_IN_HW_SUBDIR :=
-
-endif # ifneq ($(filter $(YOUR_DEVICE_NAME),$(TARGET_DEVICE)),)
diff --git a/vndk/tools/definition-tool/tests/__init__.py b/vndk/tools/definition-tool/tests/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/compat.py b/vndk/tools/definition-tool/tests/compat.py
deleted file mode 100644
index 898123721..000000000
--- a/vndk/tools/definition-tool/tests/compat.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env python3
-
-# pylint: disable=unused-import,import-error
-
-import sys
-
-
-try:
- from tempfile import TemporaryDirectory
-except ImportError:
- import shutil
- import tempfile
-
-
- class TemporaryDirectory(object):
- def __init__(self, suffix='', prefix='tmp', dir=None):
- # pylint: disable=redefined-builtin
- self.name = tempfile.mkdtemp(suffix, prefix, dir)
-
-
- def __del__(self):
- self.cleanup()
-
-
- def __enter__(self):
- return self.name
-
-
- def __exit__(self, exc, value, tb):
- self.cleanup()
-
-
- def cleanup(self):
- if self.name:
- shutil.rmtree(self.name)
- self.name = None
-
-
-if sys.version_info >= (3, 0):
- from os import makedirs
-else:
- import os
-
-
- def makedirs(path, exist_ok):
- if exist_ok and os.path.exists(path):
- return
- os.makedirs(path)
-
-
-if sys.version_info >= (3, 0):
- from io import StringIO
-else:
- from StringIO import StringIO
-
-
-try:
- from unittest.mock import patch
-except ImportError:
- import contextlib
-
-
- @contextlib.contextmanager
- def patch(target, mock):
- obj, attr = target.rsplit('.')
- obj = __import__(obj)
- original_value = getattr(obj, attr)
- setattr(obj, attr, mock)
- try:
- yield
- finally:
- setattr(obj, attr, original_value)
-
-
-if sys.version_info >= (3, 2):
- from unittest import TestCase
-else:
- import unittest
-
-
- class TestCase(unittest.TestCase):
- def assertRegex(self, text, expected_regex, msg=None):
- # pylint: disable=deprecated-method
- self.assertRegexpMatches(text, expected_regex, msg)
-
-
- def assertNotRegex(self, text, unexpected_regex, msg=None):
- # pylint: disable=deprecated-method
- self.assertNotRegexpMatches(text, unexpected_regex, msg)
diff --git a/vndk/tools/definition-tool/tests/ndk_toolchain.py b/vndk/tools/definition-tool/tests/ndk_toolchain.py
deleted file mode 100644
index e040787dd..000000000
--- a/vndk/tools/definition-tool/tests/ndk_toolchain.py
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/usr/bin/env python
-
-from __future__ import print_function
-
-import collections
-import os
-import re
-import subprocess
-import sys
-
-
-def detect_ndk_dir():
- ndk_dir = os.getenv('NDK')
- if not ndk_dir:
- error_msg = '''error: NDK toolchain is required for this test case.
-error:
-error: Steps:
-error: 1. Download NDK from https://developer.android.com/ndk/downloads/
-error: 2. Unzip the archive (android-ndk-r15c-linux-x86_64.zip)
-error: 3. Set environment variable NDK to the extracted directory
-error: (export NDK=android-ndk-r15c)
-error:'''
- print(error_msg, file=sys.stderr)
- raise ValueError('NDK toolchain not specified')
-
- if not os.path.exists(ndk_dir):
- raise ValueError('NDK toolchain not found')
-
- return ndk_dir
-
-
-def detect_api_level(ndk_dir):
- try:
- apis = []
- pattern = re.compile('android-(\\d+)')
- for name in os.listdir(os.path.join(ndk_dir, 'platforms')):
- match = pattern.match(name)
- if match:
- apis.append(int(match.group(1)))
- if not apis:
- raise ValueError('failed to find latest api')
- return 'android-{}'.format(max(apis))
- except IOError:
- raise ValueError('failed to find latest api')
-
-
-def detect_host():
- if sys.platform.startswith('linux'):
- return 'linux-x86_64'
- if sys.platform.startswith('darwin'):
- return 'darwin-x86_64'
- raise NotImplementedError('unknown host platform')
-
-
-def get_gcc_dir(ndk_dir, arch, host):
- return os.path.join(ndk_dir, 'toolchains', arch, 'prebuilt', host)
-
-
-def get_clang_dir(ndk_dir, host):
- return os.path.join(ndk_dir, 'toolchains', 'llvm', 'prebuilt', host)
-
-
-def get_platform_dir(ndk_dir, api, subdirs):
- return os.path.join(ndk_dir, 'platforms', api, *subdirs)
-
-
-class Target(object):
- def __init__(self, name, triple, cflags, ldflags, gcc_toolchain_dir,
- clang_dir, ndk_include, ndk_lib):
- self.name = name
- self.target_triple = triple
- self.target_cflags = cflags
- self.target_ldflags = ldflags
-
- self.gcc_toolchain_dir = gcc_toolchain_dir
- self.clang_dir = clang_dir
- self.ndk_include = ndk_include
- self.ndk_lib = ndk_lib
-
-
- def check_paths(self):
- def check_path(path):
- if os.path.exists(path):
- return True
- print('error: File not found:', path, file=sys.stderr)
- return False
-
- ld_exeutable = os.path.join(
- self.gcc_toolchain_dir, 'bin', self.target_triple + '-ld')
-
- success = check_path(self.gcc_toolchain_dir)
- success &= check_path(ld_exeutable)
- success &= check_path(self.clang_dir)
- success &= check_path(self.ndk_include)
- success &= check_path(self.ndk_lib)
- return success
-
-
- def compile(self, obj_file, src_file, cflags):
- clang = os.path.join(self.clang_dir, 'bin', 'clang')
-
- cmd = [clang, '-o', obj_file, '-c', src_file]
- cmd.extend(['-fPIE', '-fPIC'])
- cmd.extend(['-gcc-toolchain', self.gcc_toolchain_dir])
- cmd.extend(['-target', self.target_triple])
- cmd.extend(['-isystem', self.ndk_include])
- cmd.extend(cflags)
- cmd.extend(self.target_cflags)
- subprocess.check_call(cmd)
-
-
- def link(self, out_file, obj_files, ldflags):
- if '-shared' in ldflags:
- crtbegin = os.path.join(self.ndk_lib, 'crtbegin_so.o')
- crtend = os.path.join(self.ndk_lib, 'crtend_so.o')
- else:
- crtbegin = os.path.join(self.ndk_lib, 'crtbegin_static.o')
- crtend = os.path.join(self.ndk_lib, 'crtend_android.o')
-
- clang = os.path.join(self.clang_dir, 'bin', 'clang')
-
- cmd = [clang, '-o', out_file]
- cmd.extend(['-fPIE', '-fPIC', '-Wl,--no-undefined', '-nostdlib'])
- cmd.append('-L' + self.ndk_lib)
- cmd.extend(['-gcc-toolchain', self.gcc_toolchain_dir])
- cmd.extend(['-target', self.target_triple])
- cmd.append(crtbegin)
- cmd.extend(obj_files)
- cmd.append(crtend)
- cmd.extend(ldflags)
- cmd.extend(self.target_ldflags)
- if '-shared' not in ldflags:
- cmd.append('-Wl,-pie')
- subprocess.check_call(cmd)
-
-
-def create_targets(ndk_dir=None, api=None, host=None):
- if ndk_dir is None:
- ndk_dir = detect_ndk_dir()
- if api is None:
- api = detect_api_level(ndk_dir)
- if host is None:
- host = detect_host()
-
- targets = collections.OrderedDict()
-
- targets['arm'] = Target(
- 'arm', 'arm-linux-androideabi', [], [],
- get_gcc_dir(ndk_dir, 'arm-linux-androideabi-4.9', host),
- get_clang_dir(ndk_dir, host),
- get_platform_dir(ndk_dir, api, ['arch-arm', 'usr', 'include']),
- get_platform_dir(ndk_dir, api, ['arch-arm', 'usr', 'lib']))
-
- targets['arm64'] = Target(
- 'arm64', 'aarch64-linux-android', [], [],
- get_gcc_dir(ndk_dir, 'aarch64-linux-android-4.9', host),
- get_clang_dir(ndk_dir, host),
- get_platform_dir(ndk_dir, api, ['arch-arm64', 'usr', 'include']),
- get_platform_dir(ndk_dir, api, ['arch-arm64', 'usr', 'lib']))
-
- targets['x86'] = Target(
- 'x86', 'i686-linux-android', ['-m32'], ['-m32'],
- get_gcc_dir(ndk_dir, 'x86-4.9', host),
- get_clang_dir(ndk_dir, host),
- get_platform_dir(ndk_dir, api, ['arch-x86', 'usr', 'include']),
- get_platform_dir(ndk_dir, api, ['arch-x86', 'usr', 'lib']))
-
- targets['x86_64'] = Target(
- 'x86_64', 'x86_64-linux-android', ['-m64'], ['-m64'],
- get_gcc_dir(ndk_dir, 'x86_64-4.9', host),
- get_clang_dir(ndk_dir, host),
- get_platform_dir(ndk_dir, api, ['arch-x86_64', 'usr', 'include']),
- get_platform_dir(ndk_dir, api, ['arch-x86_64', 'usr', 'lib64']))
-
- targets['mips'] = Target(
- 'mips', 'mipsel-linux-android', [], [],
- get_gcc_dir(ndk_dir, 'mipsel-linux-android-4.9', host),
- get_clang_dir(ndk_dir, host),
- get_platform_dir(ndk_dir, api, ['arch-mips', 'usr', 'include']),
- get_platform_dir(ndk_dir, api, ['arch-mips', 'usr', 'lib']))
-
- targets['mips64'] = Target(
- 'mips64', 'mips64el-linux-android',
- ['-march=mips64el', '-mcpu=mips64r6'],
- ['-march=mips64el', '-mcpu=mips64r6'],
- get_gcc_dir(ndk_dir, 'mips64el-linux-android-4.9', host),
- get_clang_dir(ndk_dir, host),
- get_platform_dir(ndk_dir, api, ['arch-mips64', 'usr', 'include']),
- get_platform_dir(ndk_dir, api, ['arch-mips64', 'usr', 'lib64']))
-
- return targets
diff --git a/vndk/tools/definition-tool/tests/run.sh b/vndk/tools/definition-tool/tests/run.sh
deleted file mode 100755
index 3a3114567..000000000
--- a/vndk/tools/definition-tool/tests/run.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash -ex
-
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-cd "$(dirname "$0")/.."
-
-python3 -m unittest discover "$@"
-python -m unittest discover "$@"
diff --git a/vndk/tools/definition-tool/tests/test_command_deps_insight.py b/vndk/tools/definition-tool/tests/test_command_deps_insight.py
deleted file mode 100644
index 37e7b4eaa..000000000
--- a/vndk/tools/definition-tool/tests/test_command_deps_insight.py
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import unittest
-
-from vndk_definition_tool import (
- DepsInsightCommand, ModuleInfo, PT_SYSTEM, PT_VENDOR)
-
-from .compat import StringIO, patch
-from .utils import GraphBuilder
-
-
-class DepsInsightCommandTest(unittest.TestCase):
- _PATH_FIELD = 0
- _ELF_CLASS_FIELD = 1
- _TAGS_FIELD = 2
- _DEPS_FIELD = 3
- _USERS_FIELD = 4
- _SOURCE_DIRS_FIELD = 5
-
-
- @classmethod
- def _get_module(cls, strs, mods, path):
- for mod in mods:
- if strs[mod[cls._PATH_FIELD]] == path:
- return mod
- return None
-
-
- @classmethod
- def _get_module_deps(cls, strs, mods, path):
- mod = cls._get_module(strs, mods, path)
- result = set()
- for deps in mod[cls._DEPS_FIELD]:
- result.update(strs[mods[x][cls._PATH_FIELD]] for x in deps)
- return result
-
-
- @classmethod
- def _get_module_users(cls, strs, mods, path):
- mod = cls._get_module(strs, mods, path)
- users = mod[cls._USERS_FIELD]
- return set(strs[mods[x][cls._PATH_FIELD]] for x in users)
-
-
- def test_serialize_data_with_all_deps(self):
- # compute_degenerated_vndk() should not remove bad dependencies from
- # the output of deps-insight. This test checks the existance of bad
- # dependencies.
-
- gb = GraphBuilder()
-
- libsystem = gb.add_lib32(PT_SYSTEM, 'libsystem')
-
- libsystem2 = gb.add_lib32(
- PT_SYSTEM, 'libsystem2', dt_needed=['libsystem.so'])
-
- libvndk = gb.add_lib32(
- PT_SYSTEM, 'libvndk', dt_needed=['libvendor_bad.so'],
- extra_dir='vndk')
-
- libvendor = gb.add_lib32(
- PT_VENDOR, 'libvendor', dt_needed=['libvndk.so'])
-
- libvendor_bad = gb.add_lib32(
- PT_VENDOR, 'libvendor_bad', extra_dir='vndk')
-
- gb.resolve()
-
- with patch('sys.stderr', StringIO()):
- vndk_sets = gb.graph.compute_degenerated_vndk(set(), None)
-
- self.assertNotIn(libvendor_bad, libvndk.deps_good)
-
- strs, mods = DepsInsightCommand.serialize_data(
- list(gb.graph.all_libs()), vndk_sets, ModuleInfo())
-
- # libsystem
- deps = self._get_module_deps(strs, mods, libsystem.path)
- self.assertFalse(deps)
- users = self._get_module_users(strs, mods, libsystem.path)
- self.assertIn(libsystem2.path, users)
-
- # libsystem2
- deps = self._get_module_deps(strs, mods, libsystem2.path)
- self.assertIn(libsystem.path, deps)
- users = self._get_module_users(strs, mods, libsystem2.path)
- self.assertFalse(users)
-
- # libvndk
- deps = self._get_module_deps(strs, mods, libvndk.path)
- self.assertIn(libvendor_bad.path, deps)
- users = self._get_module_users(strs, mods, libvndk.path)
- self.assertIn(libvendor.path, users)
-
- # libvendor
- deps = self._get_module_deps(strs, mods, libvendor.path)
- self.assertIn(libvndk.path, deps)
- users = self._get_module_users(strs, mods, libvendor.path)
- self.assertFalse(users)
-
- # libvendor_bad
- deps = self._get_module_deps(strs, mods, libvendor_bad.path)
- self.assertFalse(deps)
- users = self._get_module_users(strs, mods, libvendor_bad.path)
- self.assertIn(libvndk.path, users)
diff --git a/vndk/tools/definition-tool/tests/test_dex_file.py b/vndk/tools/definition-tool/tests/test_dex_file.py
deleted file mode 100644
index 88b5af67c..000000000
--- a/vndk/tools/definition-tool/tests/test_dex_file.py
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import os
-import subprocess
-import unittest
-import zipfile
-
-from vndk_definition_tool import DexFileReader, UnicodeSurrogateDecodeError
-
-from .compat import TemporaryDirectory
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_dex_file')
-
-
-class ModifiedUTF8Test(unittest.TestCase):
- def test_encode(self):
- self.assertEqual(b'\xc0\x80', u'\u0000'.encode('mutf-8'))
- self.assertEqual(b'\x09', u'\u0009'.encode('mutf-8'))
- self.assertEqual(b'\x7f', u'\u007f'.encode('mutf-8'))
- self.assertEqual(b'\xc2\x80', u'\u0080'.encode('mutf-8'))
- self.assertEqual(b'\xdf\xbf', u'\u07ff'.encode('mutf-8'))
- self.assertEqual(b'\xe0\xa0\x80', u'\u0800'.encode('mutf-8'))
- self.assertEqual(b'\xe7\xbf\xbf', u'\u7fff'.encode('mutf-8'))
- self.assertEqual(b'\xed\xa0\x81\xed\xb0\x80',
- u'\U00010400'.encode('mutf-8'))
-
-
- def test_decode(self):
- self.assertEqual(u'\u0000', b'\xc0\x80'.decode('mutf-8'))
- self.assertEqual(u'\u0009', b'\x09'.decode('mutf-8'))
- self.assertEqual(u'\u007f', b'\x7f'.decode('mutf-8'))
- self.assertEqual(u'\u0080', b'\xc2\x80'.decode('mutf-8'))
- self.assertEqual(u'\u07ff', b'\xdf\xbf'.decode('mutf-8'))
- self.assertEqual(u'\u0800', b'\xe0\xa0\x80'.decode('mutf-8'))
- self.assertEqual(u'\u7fff', b'\xe7\xbf\xbf'.decode('mutf-8'))
- self.assertEqual(u'\U00010400',
- b'\xed\xa0\x81\xed\xb0\x80'.decode('mutf-8'))
-
-
- def test_decode_exception(self):
- # Low surrogate does not come after high surrogate
- with self.assertRaises(UnicodeSurrogateDecodeError):
- b'\xed\xa0\x81\x40'.decode('mutf-8')
-
- # Low surrogate without prior high surrogate
- with self.assertRaises(UnicodeSurrogateDecodeError):
- b'\xed\xb0\x80\x40'.decode('mutf-8')
-
- # Unexpected end after high surrogate
- with self.assertRaises(UnicodeSurrogateDecodeError):
- b'\xed\xa0\x81'.decode('mutf-8')
-
- # Unexpected end after low surrogate
- with self.assertRaises(UnicodeSurrogateDecodeError):
- b'\xed\xb0\x80'.decode('mutf-8')
-
- # Out-of-order surrogate
- with self.assertRaises(UnicodeSurrogateDecodeError):
- b'\xed\xb0\x80\xed\xa0\x81'.decode('mutf-8')
-
-
-class DexFileTest(unittest.TestCase):
- def _assemble_smali(self, dest, source):
- """Assemble a smali source file. Skip the test if the smali command is
- unavailable."""
- try:
- subprocess.check_call(['smali', 'a', source, '-o', dest])
- except EnvironmentError:
- self.skipTest('smali not available')
-
-
- def _create_zip_file(self, dest, paths):
- """Create a zip file from several input files."""
- with zipfile.ZipFile(dest, 'w') as zip_file:
- for path in paths:
- zip_file.write(path, os.path.basename(path))
-
-
- def test_generate_classes_dex_names(self):
- seq = DexFileReader.generate_classes_dex_names()
- self.assertEqual('classes.dex', next(seq))
- self.assertEqual('classes2.dex', next(seq))
- self.assertEqual('classes3.dex', next(seq))
-
-
- def test_enumerate_dex_strings_buf(self):
- with TemporaryDirectory() as tmp_dir:
- smali_file = os.path.join(INPUT_DIR, 'Hello.smali')
- classes_dex = os.path.join(tmp_dir, 'classes.dex')
- self._assemble_smali(classes_dex, smali_file)
-
- with open(classes_dex, 'rb') as classes_dex:
- buf = classes_dex.read()
-
- strs = set(DexFileReader.enumerate_dex_strings_buf(buf))
-
- self.assertIn(b'hello', strs)
- self.assertIn(b'world', strs)
-
-
- def test_enumerate_dex_strings_apk(self):
- with TemporaryDirectory() as tmp_dir:
- smali_file = os.path.join(INPUT_DIR, 'Hello.smali')
- classes_dex = os.path.join(tmp_dir, 'classes.dex')
- self._assemble_smali(classes_dex, smali_file)
-
- smali_file = os.path.join(INPUT_DIR, 'Example.smali')
- classes2_dex = os.path.join(tmp_dir, 'classes2.dex')
- self._assemble_smali(classes2_dex, smali_file)
-
- zip_file = os.path.join(tmp_dir, 'example.apk')
- self._create_zip_file(zip_file, [classes_dex, classes2_dex])
-
- strs = set(DexFileReader.enumerate_dex_strings_apk(zip_file))
-
- self.assertIn(b'hello', strs)
- self.assertIn(b'world', strs)
- self.assertIn(b'foo', strs)
- self.assertIn(b'bar', strs)
diff --git a/vndk/tools/definition-tool/tests/test_elf.py b/vndk/tools/definition-tool/tests/test_elf.py
deleted file mode 100644
index 035a1af54..000000000
--- a/vndk/tools/definition-tool/tests/test_elf.py
+++ /dev/null
@@ -1,222 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import tempfile
-import unittest
-
-from vndk_definition_tool import Elf_Sym, ELF
-
-from .compat import StringIO
-
-
-class ElfSymTest(unittest.TestCase):
- def setUp(self):
- self.sym_local = Elf_Sym(0, 0, 4, 0, 0, 1)
- self.sym_global = Elf_Sym(0, 0, 4, 17, 0, 1)
- self.sym_weak = Elf_Sym(0, 0, 4, 33, 0, 1)
- self.sym_undef = Elf_Sym(0, 0, 4, 16, 0, 0)
-
-
- def test_is_local(self):
- self.assertTrue(self.sym_local.is_local)
- self.assertFalse(self.sym_global.is_local)
- self.assertFalse(self.sym_weak.is_local)
-
-
- def test_is_global(self):
- self.assertFalse(self.sym_local.is_global)
- self.assertTrue(self.sym_global.is_global)
- self.assertFalse(self.sym_weak.is_global)
-
-
- def test_is_weak(self):
- self.assertFalse(self.sym_local.is_weak)
- self.assertFalse(self.sym_global.is_weak)
- self.assertTrue(self.sym_weak.is_weak)
-
-
- def test_is_undef(self):
- self.assertFalse(self.sym_global.is_undef)
- self.assertTrue(self.sym_undef.is_undef)
-
-
-class ELFTest(unittest.TestCase):
- def test_get_ei_class_from_name(self):
- self.assertEqual(ELF.ELFCLASS32, ELF.get_ei_class_from_name('32'))
- self.assertEqual(ELF.ELFCLASS64, ELF.get_ei_class_from_name('64'))
-
-
- def test_get_ei_data_from_name(self):
- self.assertEqual(ELF.ELFDATA2LSB,
- ELF.get_ei_data_from_name('Little-Endian'))
- self.assertEqual(ELF.ELFDATA2MSB,
- ELF.get_ei_data_from_name('Big-Endian'))
-
-
- def test_get_e_machine_from_name(self):
- self.assertEqual(0, ELF.get_e_machine_from_name('EM_NONE'))
- self.assertEqual(3, ELF.get_e_machine_from_name('EM_386'))
- self.assertEqual(8, ELF.get_e_machine_from_name('EM_MIPS'))
- self.assertEqual(40, ELF.get_e_machine_from_name('EM_ARM'))
- self.assertEqual(62, ELF.get_e_machine_from_name('EM_X86_64'))
- self.assertEqual(183, ELF.get_e_machine_from_name('EM_AARCH64'))
-
-
- def test_repr(self):
- elf = ELF()
- self.assertEqual(elf, eval(repr(elf)))
-
- elf = ELF(ei_class=ELF.ELFCLASS32, ei_data=ELF.ELFDATA2LSB,
- e_machine=183, dt_rpath=['a'], dt_runpath=['b'],
- dt_needed=['c', 'd'], exported_symbols={'e', 'f', 'g'})
- self.assertEqual(elf, eval(repr(elf)))
-
-
- def test_class_name(self):
- self.assertEqual('None', ELF().elf_class_name)
-
- elf = ELF(ELF.ELFCLASS32)
- self.assertEqual('32', elf.elf_class_name)
- self.assertTrue(elf.is_32bit)
- self.assertFalse(elf.is_64bit)
-
- elf = ELF(ELF.ELFCLASS64)
- self.assertEqual('64', elf.elf_class_name)
- self.assertFalse(elf.is_32bit)
- self.assertTrue(elf.is_64bit)
-
-
- def test_endianness(self):
- self.assertEqual('None', ELF().elf_data_name)
- self.assertEqual('Little-Endian',
- ELF(None, ELF.ELFDATA2LSB).elf_data_name)
- self.assertEqual('Big-Endian',
- ELF(None, ELF.ELFDATA2MSB).elf_data_name)
-
-
- def test_machine_name(self):
- self.assertEqual('EM_NONE', ELF(e_machine=0).elf_machine_name)
- self.assertEqual('EM_386', ELF(e_machine=3).elf_machine_name)
- self.assertEqual('EM_MIPS', ELF(e_machine=8).elf_machine_name)
- self.assertEqual('EM_ARM', ELF(e_machine=40).elf_machine_name)
- self.assertEqual('EM_X86_64', ELF(e_machine=62).elf_machine_name)
- self.assertEqual('EM_AARCH64', ELF(e_machine=183).elf_machine_name)
-
-
- def test_dt_rpath_runpath(self):
- elf = ELF()
- self.assertEqual([], elf.dt_rpath)
- self.assertEqual([], elf.dt_runpath)
-
- elf = ELF(None, None, 0, ['a'], ['b'])
- self.assertEqual(['a'], elf.dt_rpath)
- self.assertEqual(['b'], elf.dt_runpath)
-
-
- def test_dump(self):
- elf = ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB, 183, ['a'], ['b'],
- ['libc.so', 'libm.so'], {'hello', 'world'}, {'d', 'e'})
-
- f = StringIO()
- elf.dump(f)
- actual_output = f.getvalue()
-
- self.assertEqual('EI_CLASS\t32\n'
- 'EI_DATA\t\tLittle-Endian\n'
- 'E_MACHINE\tEM_AARCH64\n'
- 'FILE_SIZE\t0\n'
- 'RO_SEG_FILE_SIZE\t0\n'
- 'RO_SEG_MEM_SIZE\t0\n'
- 'RW_SEG_FILE_SIZE\t0\n'
- 'RW_SEG_MEM_SIZE\t0\n'
- 'DT_RPATH\ta\n'
- 'DT_RUNPATH\tb\n'
- 'DT_NEEDED\tlibc.so\n'
- 'DT_NEEDED\tlibm.so\n'
- 'EXP_SYMBOL\thello\n'
- 'EXP_SYMBOL\tworld\n'
- 'IMP_SYMBOL\td\n'
- 'IMP_SYMBOL\te\n',
- actual_output)
-
-
- def test_parse_dump_file(self):
- data = ('EI_CLASS\t64\n'
- 'EI_DATA\t\tLittle-Endian\n'
- 'E_MACHINE\tEM_AARCH64\n'
- 'FILE_SIZE\t90\n'
- 'RO_SEG_FILE_SIZE\t18\n'
- 'RO_SEG_MEM_SIZE\t24\n'
- 'RW_SEG_FILE_SIZE\t42\n'
- 'RW_SEG_MEM_SIZE\t81\n'
- 'DT_RPATH\trpath_1\n'
- 'DT_RPATH\trpath_2\n'
- 'DT_RUNPATH\trunpath_1\n'
- 'DT_RUNPATH\trunpath_2\n'
- 'DT_NEEDED\tlibc.so\n'
- 'DT_NEEDED\tlibm.so\n'
- 'EXP_SYMBOL\texported_1\n'
- 'EXP_SYMBOL\texported_2\n'
- 'IMP_SYMBOL\timported_1\n'
- 'IMP_SYMBOL\timported_2\n')
-
- def check_parse_dump_file_result(res):
- self.assertEqual(ELF.ELFCLASS64, res.ei_class)
- self.assertEqual(ELF.ELFDATA2LSB, res.ei_data)
- self.assertEqual(183, res.e_machine)
- self.assertEqual(90, res.file_size)
- self.assertEqual(18, res.ro_seg_file_size)
- self.assertEqual(24, res.ro_seg_mem_size)
- self.assertEqual(42, res.rw_seg_file_size)
- self.assertEqual(81, res.rw_seg_mem_size)
- self.assertEqual(['rpath_1', 'rpath_2'], res.dt_rpath)
- self.assertEqual(['runpath_1', 'runpath_2'], res.dt_runpath)
- self.assertEqual(['libc.so', 'libm.so'], res.dt_needed)
- self.assertSetEqual({'exported_1', 'exported_2'},
- res.exported_symbols)
- self.assertSetEqual({'imported_1', 'imported_2'},
- res.imported_symbols)
-
- # Parse ELF dump from the string buffer.
- check_parse_dump_file_result(ELF.load_dumps(data))
-
- # Parse ELF dump from the given file path.
- with tempfile.NamedTemporaryFile('w+') as f:
- f.write(data)
- f.flush()
- f.seek(0)
-
- check_parse_dump_file_result(ELF.load_dump(f.name))
-
-
-class ELFJniLibTest(unittest.TestCase):
- def test_lib_deps(self):
- elf = ELF(dt_needed=['libnativehelper.so'])
- self.assertTrue(elf.is_jni_lib())
-
- elf = ELF(dt_needed=['libandroid_runtime.so'])
- self.assertTrue(elf.is_jni_lib())
-
- elf = ELF(dt_needed=['libc.so'])
- self.assertFalse(elf.is_jni_lib())
-
-
- def test_jni_symbols(self):
- elf = ELF(imported_symbols={'JNI_CreateJavaVM'})
- self.assertTrue(elf.is_jni_lib())
-
- elf = ELF(exported_symbols={'JNI_CreateJavaVM'})
- self.assertTrue(elf.is_jni_lib())
-
- elf = ELF(imported_symbols={'Java_com_example_Example_test'})
- self.assertTrue(elf.is_jni_lib())
-
- elf = ELF(exported_symbols={'Java_com_example_Example_test'})
- self.assertTrue(elf.is_jni_lib())
-
- elf = ELF(imported_symbols={'printf'})
- self.assertFalse(elf.is_jni_lib())
-
- elf = ELF(exported_symbols={'printf'})
- self.assertFalse(elf.is_jni_lib())
diff --git a/vndk/tools/definition-tool/tests/test_elf_link_data.py b/vndk/tools/definition-tool/tests/test_elf_link_data.py
deleted file mode 100644
index 7191919aa..000000000
--- a/vndk/tools/definition-tool/tests/test_elf_link_data.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import unittest
-
-from vndk_definition_tool import ELFLinkData, PT_SYSTEM, PT_VENDOR
-
-
-class ELFLinkDataTest(unittest.TestCase):
- def setUp(self):
- self.x = ELFLinkData(PT_SYSTEM, '/system/lib/libx.so', None, 0)
- self.y = ELFLinkData(PT_SYSTEM, '/system/lib/liby.so', None, 0)
- self.z = ELFLinkData(PT_SYSTEM, '/system/lib/libz.so', None, 0)
- self.w = ELFLinkData(PT_SYSTEM, '/system/lib/libw.so', None, 0)
- self.v = ELFLinkData(PT_VENDOR, '/vendor/lib/libv.so', None, 0)
-
- self.x.add_needed_dep(self.y)
- self.x.add_dlopen_dep(self.z)
-
- self.z.add_needed_dep(self.w)
- self.z.add_dlopen_dep(self.w)
-
-
- def test_add_dep_and_accessors(self):
- self.assertIn(self.y, self.x.deps_needed_all)
- self.assertIn(self.x, self.y.users_needed_all)
- self.assertNotIn(self.y, self.x.deps_dlopen_all)
- self.assertNotIn(self.x, self.y.users_dlopen_all)
-
- self.assertIn(self.z, self.x.deps_dlopen_all)
- self.assertIn(self.x, self.z.users_dlopen_all)
- self.assertNotIn(self.z, self.x.deps_needed_all)
- self.assertNotIn(self.x, self.z.users_needed_all)
-
-
- def test_remove_dep(self):
- self.assertIn(self.y, self.x.deps_needed_all)
- self.assertIn(self.x, self.y.users_needed_all)
-
- with self.assertRaises(KeyError):
- self.x.hide_dlopen_dep(self.y)
- self.assertIn(self.y, self.x.deps_needed_all)
- self.assertIn(self.x, self.y.users_needed_all)
-
- self.x.hide_needed_dep(self.y)
- self.assertIn(self.y, self.x.deps_needed_hidden)
- self.assertIn(self.x, self.y.users_needed_hidden)
- self.assertNotIn(self.y, self.x.deps_needed)
- self.assertNotIn(self.x, self.y.users_needed)
-
-
- def test_num_deps(self):
- self.assertEqual(2, self.x.num_deps)
- self.assertEqual(0, self.y.num_deps)
- self.assertEqual(0, self.w.num_deps)
- self.assertEqual(0, self.v.num_deps)
-
- # NEEDED and DLOPEN are counted twice.
- self.assertEqual(2, self.z.num_deps)
-
-
- def test_num_users(self):
- self.assertEqual(0, self.x.num_users)
- self.assertEqual(1, self.y.num_users)
- self.assertEqual(1, self.z.num_users)
- self.assertEqual(0, self.v.num_users)
-
- # NEEDED and DLOPEN are counted twice.
- self.assertEqual(2, self.w.num_users)
-
-
- def test_has_dep(self):
- self.assertTrue(self.x.has_dep(self.y))
- self.assertTrue(self.x.has_dep(self.z))
- self.assertFalse(self.x.has_dep(self.x))
- self.assertFalse(self.x.has_dep(self.w))
-
-
- def test_has_user(self):
- self.assertTrue(self.y.has_user(self.x))
- self.assertTrue(self.z.has_user(self.x))
- self.assertFalse(self.x.has_user(self.x))
- self.assertFalse(self.w.has_user(self.x))
-
-
- def test_is_system_lib(self):
- self.assertTrue(self.x.is_system_lib())
- self.assertFalse(self.v.is_system_lib())
-
-
- def test_get_dep_linked_symbols(self):
- self.x.linked_symbols['c'] = self.y
- self.x.linked_symbols['b'] = self.y
- self.x.linked_symbols['a'] = self.y
-
- self.x.linked_symbols['w'] = self.z
- self.x.linked_symbols['z'] = self.z
- self.x.linked_symbols['y'] = self.z
- self.x.linked_symbols['x'] = self.z
-
- self.assertEqual(['a', 'b', 'c'],
- self.x.get_dep_linked_symbols(self.y))
-
- self.assertEqual(['w', 'x', 'y', 'z'],
- self.x.get_dep_linked_symbols(self.z))
diff --git a/vndk/tools/definition-tool/tests/test_elf_linker.py b/vndk/tools/definition-tool/tests/test_elf_linker.py
deleted file mode 100644
index bf2593dce..000000000
--- a/vndk/tools/definition-tool/tests/test_elf_linker.py
+++ /dev/null
@@ -1,604 +0,0 @@
-#!/usr/bin/env python3
-
-import re
-import tempfile
-
-from vndk_definition_tool import (
- ELF, ELFLinker, GenericRefs, PT_SYSTEM, PT_VENDOR, VNDKLibDir)
-
-from .compat import StringIO, TestCase, patch
-from .utils import GraphBuilder
-
-
-class ELFLinkerTest(TestCase):
- def _create_normal_graph(self):
- gb = GraphBuilder()
-
- gb.add_multilib(PT_SYSTEM, 'libdl',
- exported_symbols={'dlclose', 'dlopen', 'dlsym'})
-
- gb.add_multilib(PT_SYSTEM, 'libm', exported_symbols={'cos', 'sin'})
-
- gb.add_multilib(PT_SYSTEM, 'libc', dt_needed=['libdl.so', 'libm.so'],
- exported_symbols={'fclose', 'fopen', 'fread'},
- imported_symbols={'dlclose', 'dlopen', 'cos', 'sin'})
-
- gb.add_multilib(PT_SYSTEM, 'libRS', dt_needed=['libdl.so'],
- exported_symbols={'rsContextCreate'},
- imported_symbols={'dlclose', 'dlopen', 'dlsym'})
-
- gb.add_multilib(PT_SYSTEM, 'libcutils',
- dt_needed=['libc.so', 'libdl.so'],
- imported_symbols={'dlclose', 'dlopen', 'fclose',
- 'fopen'})
-
- gb.add_multilib(PT_VENDOR, 'libEGL',
- dt_needed=['libc.so', 'libcutils.so', 'libdl.so'],
- exported_symbols={'eglGetDisplay'},
- imported_symbols={'fclose', 'fopen'})
-
- gb.resolve()
- return gb
-
-
- def _get_paths_from_nodes(self, nodes):
- return sorted([node.path for node in nodes])
-
-
- def test_get_lib(self):
- gb = self._create_normal_graph()
- graph = gb.graph
-
- node = graph.get_lib('/system/lib/libc.so')
- self.assertEqual(gb.libc_32, node)
- self.assertEqual('/system/lib/libc.so', node.path)
-
- node = graph.get_lib('/system/lib64/libdl.so')
- self.assertEqual(gb.libdl_64, node)
- self.assertEqual('/system/lib64/libdl.so', node.path)
-
- node = graph.get_lib('/vendor/lib64/libEGL.so')
- self.assertEqual(gb.libEGL_64, node)
- self.assertEqual('/vendor/lib64/libEGL.so', node.path)
-
- self.assertEqual(None, graph.get_lib('/no/such/path.so'))
-
-
- def test_map_paths_to_libs(self):
- gb = self._create_normal_graph()
- graph = gb.graph
-
- bad = []
- paths = ['/system/lib/libc.so', '/system/lib/libdl.so']
- nodes = graph.get_libs(paths, bad.append)
-
- self.assertEqual([], bad)
- self.assertEqual(2, len(nodes))
- self.assertEqual(paths, self._get_paths_from_nodes(nodes))
-
- bad = []
- paths = ['/no/such/path.so', '/system/lib64/libdl.so']
- nodes = graph.get_libs(paths, bad.append)
- self.assertEqual(['/no/such/path.so'], bad)
- self.assertEqual(['/system/lib64/libdl.so'],
- self._get_paths_from_nodes(nodes))
-
-
- def test_elf_class_and_partitions(self):
- gb = self._create_normal_graph()
- graph = gb.graph
- self.assertEqual(5, len(graph.lib_pt[PT_SYSTEM].lib32))
- self.assertEqual(5, len(graph.lib_pt[PT_SYSTEM].lib64))
- self.assertEqual(1, len(graph.lib_pt[PT_VENDOR].lib32))
- self.assertEqual(1, len(graph.lib_pt[PT_VENDOR].lib64))
-
-
- def test_deps(self):
- gb = self._create_normal_graph()
-
- # Check the dependencies of libc.so.
- node = gb.graph.get_lib('/system/lib/libc.so')
- self.assertEqual(['/system/lib/libdl.so', '/system/lib/libm.so'],
- self._get_paths_from_nodes(node.deps_all))
-
- # Check the dependencies of libRS.so.
- node = gb.graph.get_lib('/system/lib64/libRS.so')
- self.assertEqual(['/system/lib64/libdl.so'],
- self._get_paths_from_nodes(node.deps_all))
-
- # Check the dependencies of libEGL.so.
- node = gb.graph.get_lib('/vendor/lib64/libEGL.so')
- self.assertEqual(['/system/lib64/libc.so', '/system/lib64/libcutils.so',
- '/system/lib64/libdl.so'],
- self._get_paths_from_nodes(node.deps_all))
-
-
- def test_linked_symbols(self):
- gb = self._create_normal_graph()
- graph = gb.graph
-
- # Check the unresolved symbols.
- for lib_set in graph.lib_pt:
- for lib in lib_set.values():
- self.assertEqual(set(), lib.unresolved_symbols)
-
- # Check the linked symbols.
- for lib in ('lib', 'lib64'):
- libdl = graph.get_lib('/system/' + lib + '/libdl.so')
- libm = graph.get_lib('/system/' + lib + '/libm.so')
- libc = graph.get_lib('/system/' + lib + '/libc.so')
- libRS = graph.get_lib('/system/' + lib + '/libRS.so')
- libcutils = \
- graph.get_lib('/system/' + lib + '/libcutils.so')
- libEGL = graph.get_lib('/vendor/' + lib + '/libEGL.so')
-
- # Check the linked symbols for libc.so.
- self.assertIs(libdl, libc.linked_symbols['dlclose'])
- self.assertIs(libdl, libc.linked_symbols['dlopen'])
- self.assertIs(libm, libc.linked_symbols['cos'])
- self.assertIs(libm, libc.linked_symbols['sin'])
-
- # Check the linked symbols for libRS.so.
- self.assertIs(libdl, libRS.linked_symbols['dlclose'])
- self.assertIs(libdl, libRS.linked_symbols['dlopen'])
- self.assertIs(libdl, libRS.linked_symbols['dlsym'])
-
- # Check the linked symbols for libcutils.so.
- self.assertIs(libdl, libcutils.linked_symbols['dlclose'])
- self.assertIs(libdl, libcutils.linked_symbols['dlopen'])
- self.assertIs(libc, libcutils.linked_symbols['fclose'])
- self.assertIs(libc, libcutils.linked_symbols['fopen'])
-
- # Check the linked symbols for libEGL.so.
- self.assertIs(libc, libEGL.linked_symbols['fclose'])
- self.assertIs(libc, libEGL.linked_symbols['fopen'])
-
-
- def test_unresolved_symbols(self):
- gb = GraphBuilder()
- gb.add_lib(PT_SYSTEM, ELF.ELFCLASS64, 'libfoo', dt_needed=[],
- exported_symbols={'foo', 'bar'},
- imported_symbols={'__does_not_exist'})
- gb.resolve()
-
- lib = gb.graph.get_lib('/system/lib64/libfoo.so')
- self.assertEqual({'__does_not_exist'}, lib.unresolved_symbols)
-
-
- def test_users(self):
- gb = self._create_normal_graph()
- graph = gb.graph
-
- # Check the users of libc.so.
- node = graph.get_lib('/system/lib/libc.so')
- self.assertEqual(['/system/lib/libcutils.so', '/vendor/lib/libEGL.so'],
- self._get_paths_from_nodes(node.users_all))
-
- # Check the users of libdl.so.
- node = graph.get_lib('/system/lib/libdl.so')
- self.assertEqual(['/system/lib/libRS.so', '/system/lib/libc.so',
- '/system/lib/libcutils.so', '/vendor/lib/libEGL.so'],
- self._get_paths_from_nodes(node.users_all))
-
- # Check the users of libRS.so.
- node = graph.get_lib('/system/lib64/libRS.so')
- self.assertEqual([], self._get_paths_from_nodes(node.users_all))
-
- # Check the users of libEGL.so.
- node = graph.get_lib('/vendor/lib64/libEGL.so')
- self.assertEqual([], self._get_paths_from_nodes(node.users_all))
-
-
- def test_compute_predefined_sp_hal(self):
- gb = GraphBuilder()
-
- # HIDL SP-HAL implementation.
- gb.add_multilib(PT_SYSTEM, 'gralloc.default', extra_dir='hw')
- gb.add_multilib(PT_SYSTEM, 'gralloc.chipset', extra_dir='hw')
- gb.add_multilib(PT_SYSTEM, 'android.hardware.graphics.mapper@2.0-impl',
- extra_dir='hw')
-
- # NDK loader libraries should not be considered as SP-HALs.
- gb.add_multilib(PT_SYSTEM, 'libvulkan')
- gb.add_multilib(PT_SYSTEM, 'libEGL')
- gb.add_multilib(PT_SYSTEM, 'libGLESv1_CM')
- gb.add_multilib(PT_SYSTEM, 'libGLESv2')
- gb.add_multilib(PT_SYSTEM, 'libGLESv3')
-
- # OpenGL implementation.
- gb.add_multilib(PT_VENDOR, 'libEGL_chipset', extra_dir='egl')
- gb.add_multilib(PT_VENDOR, 'libGLES_chipset', extra_dir='egl')
- gb.add_multilib(PT_VENDOR, 'libGLESv1_CM_chipset', extra_dir='egl')
- gb.add_multilib(PT_VENDOR, 'libGLESv2_chipset', extra_dir='egl')
- gb.add_multilib(PT_VENDOR, 'libGLESv3_chipset', extra_dir='egl')
-
- # Renderscript implementation.
- gb.add_multilib(PT_VENDOR, 'libRSDriver_chipset')
- gb.add_multilib(PT_VENDOR, 'libPVRRS')
-
- # Vulkan implementation.
- gb.add_multilib(PT_VENDOR, 'vulkan.chipset', extra_dir='hw')
-
- # Some un-related libraries.
- gb.add_multilib(PT_SYSTEM, 'libfoo')
- gb.add_multilib(PT_VENDOR, 'libfoo')
-
- gb.resolve()
-
- # Compute SP-HAL.
- sp_hals = set(lib.path for lib in gb.graph.compute_predefined_sp_hal())
-
- for lib in ('lib', 'lib64'):
- # Check HIDL SP-HAL implementation.
- self.assertIn('/system/' + lib + '/hw/gralloc.default.so', sp_hals)
- self.assertIn('/system/' + lib + '/hw/gralloc.chipset.so', sp_hals)
- self.assertIn('/system/' + lib + '/hw/'
- 'android.hardware.graphics.mapper@2.0-impl.so',
- sp_hals)
-
-
- # Check that NDK loaders are not SP-HALs.
- self.assertNotIn('/system/' + lib + '/libvulkan.so', sp_hals)
- self.assertNotIn('/system/' + lib + '/libEGL.so', sp_hals)
- self.assertNotIn('/system/' + lib + '/libGLESv1_CM.so', sp_hals)
- self.assertNotIn('/system/' + lib + '/libGLESv2.so', sp_hals)
- self.assertNotIn('/system/' + lib + '/libGLESv3.so', sp_hals)
-
- # Check that OpenGL implementations are SP-HALs.
- self.assertIn('/vendor/' + lib + '/egl/libEGL_chipset.so', sp_hals)
- self.assertIn('/vendor/' + lib + '/egl/libGLES_chipset.so',
- sp_hals)
- self.assertIn('/vendor/' + lib + '/egl/libGLESv1_CM_chipset.so',
- sp_hals)
- self.assertIn('/vendor/' + lib + '/egl/libGLESv2_chipset.so',
- sp_hals)
- self.assertIn('/vendor/' + lib + '/egl/libGLESv3_chipset.so',
- sp_hals)
-
- # Check that Renderscript implementations are SP-HALs.
- self.assertIn('/vendor/' + lib + '/libRSDriver_chipset.so', sp_hals)
- self.assertIn('/vendor/' + lib + '/libPVRRS.so', sp_hals)
-
- # Check that vulkan implementation are SP-HALs.
- self.assertIn('/vendor/' + lib + '/libPVRRS.so', sp_hals)
-
- # Check that un-related libraries are not SP-HALs.
- self.assertNotIn('/system/' + lib + '/libfoo.so', sp_hals)
- self.assertNotIn('/vendor/' + lib + '/libfoo.so', sp_hals)
-
-
- def test_compute_sp_lib(self):
- # Create graph.
- gb = GraphBuilder()
-
- # LL-NDK (should be excluded from result)
- gb.add_multilib(PT_SYSTEM, 'libc')
-
- libEGL_32, libEGL_64 = \
- gb.add_multilib(PT_SYSTEM, 'libEGL',
- dt_needed=['libc.so', 'libutils.so'])
-
- # LL-NDK dependencies
- gb.add_multilib(PT_SYSTEM, 'libutils',
- dt_needed=['libc.so', 'libcutils.so'])
-
- # VNDK-SP used by both LL-NDK and SP-HAL
- gb.add_multilib(PT_SYSTEM, 'libsp_both_vs')
-
- # VNDK-SP used by LL-NDK
- gb.add_multilib(PT_SYSTEM, 'libcutils_dep', dt_needed=['libc.so'])
- gb.add_multilib(PT_SYSTEM, 'libcutils',
- dt_needed=['libc.so', 'libcutils_dep.so',
- 'libsp_both_vs.so'])
-
- # VNDK-SP used by SP-HAL
- gb.add_multilib(PT_SYSTEM, 'libhidlbase')
- gb.add_multilib(PT_SYSTEM, 'libhidlmemory',
- dt_needed=['libhidlbase.so', 'libsp_both_vs.so'])
-
- # SP-HAL dependencies
- gb.add_multilib(PT_VENDOR, 'libllvm_vendor_dep')
- gb.add_multilib(PT_VENDOR, 'libllvm_vendor',
- dt_needed=['libc.so', 'libllvm_vendor_dep.so'])
-
- # SP-HAL
- libEGL_chipset_32, libEGL_chipset_64 = \
- gb.add_multilib(PT_VENDOR, 'libEGL_chipset', extra_dir='egl',
- dt_needed=['libc.so', 'libllvm_vendor.so',
- 'libhidlmemory.so'])
-
- gb.resolve()
-
- # Add dlopen() dependencies from libEGL to libEGL_chipset.
- libEGL_32.add_dlopen_dep(libEGL_chipset_32)
- libEGL_64.add_dlopen_dep(libEGL_chipset_64)
-
- # Create generic reference.
- class MockGenericRefs(object):
- # pylint: disable=too-few-public-methods
- def classify_lib(self, lib):
- if 'libllvm_vendor' in lib.path:
- return GenericRefs.NEW_LIB
- return GenericRefs.EXPORT_EQUAL
-
- sp_lib = gb.graph.compute_sp_lib(MockGenericRefs())
-
- self.assertEqual(2 * 1, len(sp_lib.sp_hal))
- self.assertEqual(2 * 2, len(sp_lib.sp_hal_dep))
- self.assertEqual(2 * 2, len(sp_lib.vndk_sp_hal))
- self.assertEqual(2 * 2, len(sp_lib.ll_ndk))
- self.assertEqual(2 * 3, len(sp_lib.ll_ndk_private))
- self.assertEqual(2 * 1, len(sp_lib.vndk_sp_both))
-
- sp_hal = self._get_paths_from_nodes(sp_lib.sp_hal)
- sp_hal_dep = self._get_paths_from_nodes(sp_lib.sp_hal_dep)
- vndk_sp_hal = self._get_paths_from_nodes(sp_lib.vndk_sp_hal)
-
- ll_ndk = self._get_paths_from_nodes(sp_lib.ll_ndk)
- ll_ndk_private = self._get_paths_from_nodes(sp_lib.ll_ndk_private)
-
- vndk_sp_both = self._get_paths_from_nodes(sp_lib.vndk_sp_both)
-
- for lib_dir in ('lib', 'lib64'):
- # VNDK-SP used by both LL-NDK and SP-HAL
- self.assertIn('/system/{}/libsp_both_vs.so'.format(lib_dir),
- vndk_sp_both)
-
- # VNDK-SP used by LL-NDK
- self.assertIn('/system/{}/libcutils.so'.format(lib_dir),
- ll_ndk_private)
- self.assertIn('/system/{}/libcutils_dep.so'.format(lib_dir),
- ll_ndk_private)
- self.assertIn('/system/{}/libutils.so'.format(lib_dir),
- ll_ndk_private)
-
- # VNDK-SP used by SP-HAL
- self.assertIn('/system/{}/libhidlbase.so'.format(lib_dir),
- vndk_sp_hal)
- self.assertIn('/system/{}/libhidlmemory.so'.format(lib_dir),
- vndk_sp_hal)
-
- # SP-HAL dependencies
- self.assertIn('/vendor/{}/libllvm_vendor.so'.format(lib_dir),
- sp_hal_dep)
- self.assertIn('/vendor/{}/libllvm_vendor_dep.so'.format(lib_dir),
- sp_hal_dep)
-
- # SP-HAL
- self.assertIn('/vendor/{}/egl/libEGL_chipset.so'.format(lib_dir),
- sp_hal)
-
- # LL-NDK
- self.assertIn('/system/{}/libEGL.so'.format(lib_dir), ll_ndk)
- self.assertIn('/system/{}/libc.so'.format(lib_dir), ll_ndk)
-
- # LL-NDK must not in sp_hal, sp_hal_dep, and vndk_sp_hal.
- libc_path = '/system/{}/libc.so'.format(lib_dir)
- self.assertNotIn(libc_path, sp_hal)
- self.assertNotIn(libc_path, sp_hal_dep)
- self.assertNotIn(libc_path, vndk_sp_hal)
- self.assertNotIn(libc_path, ll_ndk_private)
-
-
- def test_link_vndk_ver_dirs(self):
- gb = GraphBuilder()
-
- libc_32, libc_64 = gb.add_multilib(PT_SYSTEM, 'libc')
-
- libvndk_a_32, libvndk_a_64 = gb.add_multilib(
- PT_SYSTEM, 'libvndk_a', extra_dir='vndk-28',
- dt_needed=['libc.so', 'libvndk_b.so', 'libvndk_sp_b.so'])
-
- libvndk_b_32, libvndk_b_64 = gb.add_multilib(
- PT_SYSTEM, 'libvndk_b', extra_dir='vndk-28',
- dt_needed=['libc.so', 'libvndk_sp_b.so'])
-
- libvndk_c_32, libvndk_c_64 = gb.add_multilib(
- PT_VENDOR, 'libvndk_c', extra_dir='vndk-28',
- dt_needed=['libc.so', 'libvndk_d.so', 'libvndk_sp_d.so'])
-
- libvndk_d_32, libvndk_d_64 = gb.add_multilib(
- PT_VENDOR, 'libvndk_d', extra_dir='vndk-28',
- dt_needed=['libc.so', 'libvndk_sp_d.so'])
-
- libvndk_sp_a_32, libvndk_sp_a_64 = gb.add_multilib(
- PT_SYSTEM, 'libvndk_sp_a', extra_dir='vndk-sp-28',
- dt_needed=['libc.so', 'libvndk_sp_b.so'])
-
- libvndk_sp_b_32, libvndk_sp_b_64 = gb.add_multilib(
- PT_SYSTEM, 'libvndk_sp_b', extra_dir='vndk-sp-28',
- dt_needed=['libc.so'])
-
- libvndk_sp_c_32, libvndk_sp_c_64 = gb.add_multilib(
- PT_VENDOR, 'libvndk_sp_c', extra_dir='vndk-sp-28',
- dt_needed=['libc.so', 'libvndk_sp_d.so'])
-
- libvndk_sp_d_32, libvndk_sp_d_64 = gb.add_multilib(
- PT_VENDOR, 'libvndk_sp_d', extra_dir='vndk-sp-28',
- dt_needed=['libc.so'])
-
- gb.resolve(VNDKLibDir.create_from_version('28'), '28')
-
- # 32-bit shared libraries
- self.assertIn(libc_32, libvndk_a_32.deps_all)
- self.assertIn(libc_32, libvndk_b_32.deps_all)
- self.assertIn(libc_32, libvndk_c_32.deps_all)
- self.assertIn(libc_32, libvndk_d_32.deps_all)
- self.assertIn(libc_32, libvndk_sp_a_32.deps_all)
- self.assertIn(libc_32, libvndk_sp_b_32.deps_all)
- self.assertIn(libc_32, libvndk_sp_c_32.deps_all)
- self.assertIn(libc_32, libvndk_sp_d_32.deps_all)
-
- self.assertIn(libvndk_b_32, libvndk_a_32.deps_all)
- self.assertIn(libvndk_sp_b_32, libvndk_a_32.deps_all)
- self.assertIn(libvndk_sp_b_32, libvndk_b_32.deps_all)
- self.assertIn(libvndk_sp_b_32, libvndk_sp_a_32.deps_all)
-
- self.assertIn(libvndk_d_32, libvndk_c_32.deps_all)
- self.assertIn(libvndk_sp_d_32, libvndk_c_32.deps_all)
- self.assertIn(libvndk_sp_d_32, libvndk_d_32.deps_all)
- self.assertIn(libvndk_sp_d_32, libvndk_sp_c_32.deps_all)
-
- # 64-bit shared libraries
- self.assertIn(libc_64, libvndk_a_64.deps_all)
- self.assertIn(libc_64, libvndk_b_64.deps_all)
- self.assertIn(libc_64, libvndk_c_64.deps_all)
- self.assertIn(libc_64, libvndk_d_64.deps_all)
- self.assertIn(libc_64, libvndk_sp_a_64.deps_all)
- self.assertIn(libc_64, libvndk_sp_b_64.deps_all)
- self.assertIn(libc_64, libvndk_sp_c_64.deps_all)
- self.assertIn(libc_64, libvndk_sp_d_64.deps_all)
-
- self.assertIn(libvndk_b_64, libvndk_a_64.deps_all)
- self.assertIn(libvndk_sp_b_64, libvndk_a_64.deps_all)
- self.assertIn(libvndk_sp_b_64, libvndk_b_64.deps_all)
- self.assertIn(libvndk_sp_b_64, libvndk_sp_a_64.deps_all)
-
- self.assertIn(libvndk_d_64, libvndk_c_64.deps_all)
- self.assertIn(libvndk_sp_d_64, libvndk_c_64.deps_all)
- self.assertIn(libvndk_sp_d_64, libvndk_d_64.deps_all)
- self.assertIn(libvndk_sp_d_64, libvndk_sp_c_64.deps_all)
-
-
- def test_rewrite_apex_modules(self):
- graph = ELFLinker()
-
- libfoo = graph.add_lib(PT_SYSTEM, '/system/apex/foo/lib/libfoo.so',
- ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB))
- libbar = graph.add_lib(PT_SYSTEM, '/system/apex/bar/lib/libbar.so',
- ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB))
-
- graph.rewrite_apex_modules()
-
- self.assertEqual(libfoo.path, '/apex/foo/lib/libfoo.so')
- self.assertEqual(libbar.path, '/apex/bar/lib/libbar.so')
-
-
- def test_link_apex_modules(self):
- graph = ELFLinker()
-
- libfoo = graph.add_lib(PT_SYSTEM, '/system/apex/foo/lib/libfoo.so',
- ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB))
- libbar = graph.add_lib(PT_SYSTEM, '/system/lib/libbar.so',
- ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB,
- dt_needed=['libfoo.so']))
-
- graph.rewrite_apex_modules()
- graph.resolve_deps()
-
- self.assertIn(libfoo, libbar.deps_all)
-
-
- def test_link_apex_bionic(self):
- graph = ELFLinker()
-
- libc = graph.add_lib(
- PT_SYSTEM, '/system/apex/com.android.runtime/lib/bionic/libc.so',
- ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB))
- libbar = graph.add_lib(
- PT_SYSTEM, '/system/lib/libbar.so',
- ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB, dt_needed=['libc.so']))
-
- graph.rewrite_apex_modules()
- graph.resolve_deps()
-
- self.assertIn(libc, libbar.deps_all)
-
-
-class ELFLinkerDlopenDepsTest(TestCase):
- def test_add_dlopen_deps(self):
- gb = GraphBuilder()
- liba = gb.add_lib32(PT_SYSTEM, 'liba')
- libb = gb.add_lib32(PT_SYSTEM, 'libb')
- gb.resolve()
-
- with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
- tmp_file.write('/system/lib/liba.so: /system/lib/libb.so')
- tmp_file.seek(0)
- gb.graph.add_dlopen_deps(tmp_file.name)
-
- self.assertIn(libb, liba.deps_dlopen)
- self.assertIn(liba, libb.users_dlopen)
-
- self.assertNotIn(libb, liba.deps_needed)
- self.assertNotIn(liba, libb.users_needed)
-
-
- def test_add_dlopen_deps_lib_subst(self):
- gb = GraphBuilder()
- liba_32, liba_64 = gb.add_multilib(PT_SYSTEM, 'liba')
- libb_32, libb_64 = gb.add_multilib(PT_SYSTEM, 'libb')
- gb.resolve()
-
- with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
- tmp_file.write('/system/${LIB}/liba.so: /system/${LIB}/libb.so')
- tmp_file.seek(0)
- gb.graph.add_dlopen_deps(tmp_file.name)
-
- self.assertIn(libb_32, liba_32.deps_dlopen)
- self.assertIn(liba_32, libb_32.users_dlopen)
-
- self.assertIn(libb_64, liba_64.deps_dlopen)
- self.assertIn(liba_64, libb_64.users_dlopen)
-
-
- def test_add_dlopen_deps_lib_subset_single_bitness(self):
- gb = GraphBuilder()
- liba_32, liba_64 = gb.add_multilib(PT_SYSTEM, 'liba')
- libb_32 = gb.add_lib32(PT_SYSTEM, 'libb')
- gb.resolve()
-
- with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
- tmp_file.write('/system/${LIB}/libb.so: /system/${LIB}/liba.so')
- tmp_file.seek(0)
-
- stderr = StringIO()
- with patch('sys.stderr', stderr):
- gb.graph.add_dlopen_deps(tmp_file.name)
-
- self.assertEqual('', stderr.getvalue())
-
- self.assertIn(liba_32, libb_32.deps_dlopen)
- self.assertIn(libb_32, liba_32.users_dlopen)
-
- self.assertEqual(0, len(liba_64.users_dlopen))
-
-
- def test_add_dlopen_deps_regex(self):
- gb = GraphBuilder()
- liba = gb.add_lib32(PT_SYSTEM, 'liba')
- libb = gb.add_lib32(PT_SYSTEM, 'libb')
- gb.resolve()
-
- with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
- tmp_file.write('[regex].*libb\\.so: [regex].*/${LIB}/liba\\.so')
- tmp_file.seek(0)
-
- stderr = StringIO()
- with patch('sys.stderr', stderr):
- gb.graph.add_dlopen_deps(tmp_file.name)
-
- self.assertEqual('', stderr.getvalue())
-
- self.assertIn(liba, libb.deps_dlopen)
- self.assertIn(libb, liba.users_dlopen)
-
-
- def test_add_dlopen_deps_error(self):
- gb = GraphBuilder()
- gb.add_lib32(PT_SYSTEM, 'liba')
- gb.add_lib32(PT_SYSTEM, 'libb')
- gb.resolve()
-
- with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
- tmp_file.write('/system/lib/libc.so: /system/lib/libd.so')
- tmp_file.seek(0)
-
- stderr = StringIO()
- with patch('sys.stderr', stderr):
- gb.graph.add_dlopen_deps(tmp_file.name)
-
- self.assertRegex(
- stderr.getvalue(),
- 'error:' + re.escape(tmp_file.name) + ':1: ' +
- 'Failed to add dlopen dependency from .* to .*\\.\n')
diff --git a/vndk/tools/definition-tool/tests/test_elf_resolver.py b/vndk/tools/definition-tool/tests/test_elf_resolver.py
deleted file mode 100644
index f6257f5fb..000000000
--- a/vndk/tools/definition-tool/tests/test_elf_resolver.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import unittest
-
-from vndk_definition_tool import ELFResolver
-
-
-class ELFResolverTest(unittest.TestCase):
- def setUp(self):
- lib_set = {
- '/system/lib/liba.so': 'a',
- '/system/lib/libb.so': 'b',
- '/vendor/lib/liba.so': 'a2',
- '/vendor/lib/libc.so': 'c',
- '/vendor/lib/libd.so': 'd',
- '/system/lib/hw/libe.so': 'e',
- '/vendor/lib/hw/libf.so': 'f',
- }
-
- self.resolver = ELFResolver(lib_set, ['/system/lib', '/vendor/lib'])
-
-
- def test_get_candidates(self):
- r = self.resolver
-
- self.assertEqual(
- ['/system/lib/libx.so', '/vendor/lib/libx.so'],
- list(r.get_candidates('/system/lib/libreq.so', 'libx.so')))
-
- self.assertEqual(
- ['/C/libx.so', '/system/lib/libx.so', '/vendor/lib/libx.so'],
- list(r.get_candidates('/system/lib/libreq.so', 'libx.so', ['/C'])))
-
- self.assertEqual(
- ['/C/libx.so', '/D/libx.so', '/system/lib/libx.so',
- '/vendor/lib/libx.so'],
- list(r.get_candidates('/system/lib/libreq.so', 'libx.so',
- ['/C', '/D'])))
-
- self.assertEqual(
- ['/E/libx.so', '/system/lib/libx.so', '/vendor/lib/libx.so'],
- list(r.get_candidates('/system/lib/libreq.so', 'libx.so', None,
- ['/E'])))
-
- self.assertEqual(
- ['/E/libx.so', '/F/libx.so', '/system/lib/libx.so',
- '/vendor/lib/libx.so'],
- list(r.get_candidates('/system/lib/libreq.so', 'libx.so', None,
- ['/E', '/F'])))
-
- self.assertEqual(
- ['/C/libx.so', '/D/libx.so', '/E/libx.so', '/F/libx.so',
- '/system/lib/libx.so', '/vendor/lib/libx.so'],
- list(r.get_candidates('/system/lib/libreq.so', 'libx.so',
- ['/C', '/D'], ['/E', '/F'])))
-
- # Test app-specific search paths.
- self.assertEqual(
- ['/system/app/example/lib/armeabi-v7a/libx.so',
- '/C/libx.so', '/D/libx.so', '/E/libx.so', '/F/libx.so',
- '/system/lib/libx.so', '/vendor/lib/libx.so'],
- list(r.get_candidates(
- '/system/app/example/lib/armeabi-v7a/libreq.so',
- 'libx.so',
- ['/C', '/D'], ['/E', '/F'])))
-
-
- def test_resolve(self):
- r = self.resolver
- self.assertEqual('a', r.resolve('/system/lib/libreq.so', 'liba.so'))
- self.assertEqual('c', r.resolve('/system/lib/libreq.so', 'libc.so'))
-
- self.assertEqual(None, r.resolve('/system/lib/libreq.so', 'libe.so'))
- self.assertEqual(
- 'e',
- r.resolve('/system/lib/libreq.so', 'libe.so',
- dt_rpath=['/system/lib/hw']))
- self.assertEqual(
- 'e',
- r.resolve('/system/lib/libreq.so', 'libe.so',
- dt_runpath=['/system/lib/hw']))
-
- self.assertEqual(
- 'a2',
- r.resolve('/system/lib/libreq.so', 'liba.so',
- dt_rpath=['/vendor/lib']))
- self.assertEqual(
- 'a2',
- r.resolve('/system/lib/libreq.so', 'liba.so',
- dt_runpath=['/vendor/lib']))
diff --git a/vndk/tools/definition-tool/tests/test_elfdump.py b/vndk/tools/definition-tool/tests/test_elfdump.py
deleted file mode 100644
index 18db2fd96..000000000
--- a/vndk/tools/definition-tool/tests/test_elfdump.py
+++ /dev/null
@@ -1,166 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import os
-import re
-import subprocess
-import sys
-import unittest
-
-from .compat import TemporaryDirectory, makedirs
-from .ndk_toolchain import create_targets
-
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-VNDK_DEF_TOOL = os.path.join(SCRIPT_DIR, '..', 'vndk_definition_tool.py')
-
-INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'input')
-EXPECTED_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'expected')
-test_dir_base = None
-
-
-def run_elf_dump(path):
- cmd = [sys.executable, VNDK_DEF_TOOL, 'elfdump', path]
- return subprocess.check_output(cmd, universal_newlines=True)
-
-
-class ELFDumpTest(unittest.TestCase):
- @classmethod
- def setUpClass(cls):
- cls.targets = create_targets()
-
- if test_dir_base:
- cls.test_dir_base = test_dir_base
- else:
- cls.tmp_dir = TemporaryDirectory()
- cls.test_dir_base = cls.tmp_dir.name
-
- cls._build_fixtures(cls.target_name)
-
-
- @classmethod
- def tearDownClass(cls):
- if not test_dir_base:
- cls.tmp_dir.cleanup()
-
-
- @classmethod
- def _build_fixtures(cls, target_name):
- target = cls.targets[target_name]
-
- cls.expected_dir = os.path.join(EXPECTED_DIR, target_name)
- cls.test_dir = os.path.join(cls.test_dir_base, target_name)
-
- makedirs(cls.test_dir, exist_ok=True)
-
- # Compile main.o.
- src_file = os.path.join(INPUT_DIR, 'main.c')
- obj_file = os.path.join(cls.test_dir, 'main.o')
- target.compile(obj_file, src_file, [])
-
- # Link main.out.
- out_file = os.path.join(cls.test_dir, 'main.out')
- target.link(out_file, [obj_file], ['-ldl', '-lc', '-lstdc++'])
-
- # Compile test.o.
- src_file = os.path.join(INPUT_DIR, 'test.c')
- obj_file = os.path.join(cls.test_dir, 'test.o')
- target.compile(obj_file, src_file, [])
-
- # Link libtest.so.
- out_file = os.path.join(cls.test_dir, 'libtest.so')
- target.link(out_file, [obj_file], ['-shared', '-lc'])
-
- # Link libtest-rpath.so.
- out_file = os.path.join(cls.test_dir, 'libtest-rpath.so')
- target.link(out_file, [obj_file],
- ['-shared', '-lc', '-Wl,-rpath,$ORIGIN/../lib',
- '-Wl,--disable-new-dtags'])
-
- # Link libtest-rpath-multi.so.
- out_file = os.path.join(cls.test_dir, 'libtest-rpath-multi.so')
- target.link(out_file, [obj_file],
- ['-shared', '-lc', '-Wl,-rpath,/system/lib:/vendor/lib',
- '-Wl,--disable-new-dtags'])
-
- # Link libtest-runpath.so.
- out_file = os.path.join(cls.test_dir, 'libtest-runpath.so')
- target.link(out_file, [obj_file],
- ['-shared', '-lc', '-Wl,-rpath,$ORIGIN/../lib',
- '-Wl,--enable-new-dtags'])
-
- # Link libtest-runpath-multi.so.
- out_file = os.path.join(cls.test_dir, 'libtest-runpath-multi.so')
- target.link(out_file, [obj_file],
- ['-shared', '-lc', '-Wl,-rpath,/system/lib:/vendor/lib',
- '-Wl,--enable-new-dtags'])
-
-
- def _remove_size_lines(self, lines):
- """Remove file size information because they may vary."""
- prefixes = (
- 'FILE_SIZE\t',
- 'RO_SEG_FILE_SIZE\t',
- 'RO_SEG_MEM_SIZE\t',
- 'RW_SEG_FILE_SIZE\t',
- 'RW_SEG_MEM_SIZE\t',
- )
- patt = re.compile('|'.join('(?:' + re.escape(x) +')' for x in prefixes))
- return [line for line in lines if not patt.match(line)]
-
-
- def _assert_equal_to_file(self, expected_file_name, actual):
- actual = actual.splitlines(True)
- expected_file_path = os.path.join(self.expected_dir, expected_file_name)
- with open(expected_file_path, 'r') as f:
- expected = f.readlines()
- self.assertEqual(self._remove_size_lines(expected),
- self._remove_size_lines(actual))
-
-
- def _test_main_out(self):
- out_file = os.path.join(self.test_dir, 'main.out')
- self._assert_equal_to_file('main.out.txt', run_elf_dump(out_file))
-
-
- def _test_libtest(self, expected_file_name, lib_name):
- lib_file = os.path.join(self.test_dir, lib_name)
- self._assert_equal_to_file(expected_file_name, run_elf_dump(lib_file))
-
-
-def create_target_test(target_name):
- def test_main(self):
- self._test_main_out()
-
- def test_libtest(self):
- self._test_libtest('libtest.so.txt', 'libtest.so')
-
- def test_libtest_rpath(self):
- self._test_libtest('libtest-rpath.so.txt', 'libtest-rpath.so')
-
- def test_libtest_rpath_multi(self):
- self._test_libtest('libtest-rpath-multi.so.txt',
- 'libtest-rpath-multi.so')
-
- def test_libtest_runpath(self):
- self._test_libtest('libtest-runpath.so.txt', 'libtest-runpath.so')
-
- def test_libtest_runpath_multi(self):
- self._test_libtest('libtest-runpath-multi.so.txt',
- 'libtest-runpath-multi.so')
-
- class_name = 'ELFDumpTest_' + target_name
- globals()[class_name] = type(
- class_name, (ELFDumpTest,),
- dict(test_main=test_main,
- test_libtest=test_libtest,
- test_libtest_rpath=test_libtest_rpath,
- test_libtest_rpath_multi=test_libtest_rpath_multi,
- test_libtest_runpath=test_libtest_runpath,
- test_libtest_runpath_multi=test_libtest_runpath_multi,
- target_name=target_name))
-
-
-for target in ('arm', 'arm64', 'mips', 'mips64', 'x86', 'x86_64'):
- create_target_test(target)
diff --git a/vndk/tools/definition-tool/tests/test_generic_refs.py b/vndk/tools/definition-tool/tests/test_generic_refs.py
deleted file mode 100644
index 24481698a..000000000
--- a/vndk/tools/definition-tool/tests/test_generic_refs.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import os
-import unittest
-
-from vndk_definition_tool import GenericRefs
-
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-
-
-class MockELF(object):
- # pylint: disable=too-few-public-methods
- def __init__(self, exported_symbols):
- self.exported_symbols = exported_symbols
-
-
-class MockLib(object):
- # pylint: disable=too-few-public-methods
- def __init__(self, path, exported_symbols):
- self.path = path
- self.elf = MockELF(exported_symbols)
-
-
-class GenericRefsTest(unittest.TestCase):
- def setUp(self):
- self.ref = GenericRefs()
- self.ref.add('/system/lib/libc.so',
- MockELF({'fclose', 'fopen', 'fread', 'fwrite'}))
- self.ref.add('/system/lib/libm.so',
- MockELF({'cos', 'sin', 'tan'}))
- self.ref.add('/system/lib64/libc.so',
- MockELF({'fclose', 'fopen', 'fread', 'fwrite'}))
- self.ref.add('/system/lib64/libm.so',
- MockELF({'cos', 'sin', 'tan'}))
-
-
- def test_create_from_sym_dir(self):
- input_dir = os.path.join(SCRIPT_DIR, 'testdata', 'test_generic_refs')
-
- g = GenericRefs.create_from_sym_dir(input_dir)
- self.assertEqual(4, len(g.refs))
-
- self.assertIn('/system/lib/libc.so', g.refs)
- self.assertIn('/system/lib/libm.so', g.refs)
- self.assertIn('/system/lib64/libc.so', g.refs)
- self.assertIn('/system/lib64/libm.so', g.refs)
-
- self.assertEqual({'fclose', 'fopen', 'fread', 'fwrite'},
- g.refs['/system/lib/libc.so'].exported_symbols)
- self.assertEqual({'fclose', 'fopen', 'fread', 'fwrite'},
- g.refs['/system/lib64/libc.so'].exported_symbols)
-
- self.assertEqual({'cos', 'sin', 'tan'},
- g.refs['/system/lib/libm.so'].exported_symbols)
- self.assertEqual({'cos', 'sin', 'tan'},
- g.refs['/system/lib64/libm.so'].exported_symbols)
-
-
- def test_classify_lib(self):
- libc_sub = MockLib('/system/lib/libc.so', {'fclose', 'fopen', 'fread'})
- libc_sup = MockLib('/system/lib/libc.so',
- {'fclose', 'fopen', 'fread', 'fwrite', 'open'})
- libc_eq = MockLib('/system/lib/libc.so',
- {'fclose', 'fopen', 'fread', 'fwrite'})
- libfoo = MockLib('/system/lib/libfoo.so', {})
-
- self.assertEqual(GenericRefs.MODIFIED, self.ref.classify_lib(libc_sub))
- self.assertEqual(GenericRefs.EXPORT_SUPER_SET,
- self.ref.classify_lib(libc_sup))
- self.assertEqual(GenericRefs.EXPORT_EQUAL,
- self.ref.classify_lib(libc_eq))
- self.assertEqual(GenericRefs.NEW_LIB, self.ref.classify_lib(libfoo))
-
-
- def test_is_equivalent_lib(self):
- libc_sub = MockLib('/system/lib/libc.so', {'fclose', 'fopen', 'fread'})
- libc_sup = MockLib('/system/lib/libc.so',
- {'fclose', 'fopen', 'fread', 'fwrite', 'open'})
- libc_eq = MockLib('/system/lib/libc.so',
- {'fclose', 'fopen', 'fread', 'fwrite'})
-
- self.assertFalse(self.ref.is_equivalent_lib(libc_sub))
- self.assertFalse(self.ref.is_equivalent_lib(libc_sup))
-
- self.assertTrue(self.ref.is_equivalent_lib(libc_eq))
-
-
- def test_has_same_name_lib(self):
- self.assertTrue(self.ref.has_same_name_lib(
- MockLib('/vendor/lib/libc.so', {})))
- self.assertFalse(self.ref.has_same_name_lib(
- MockLib('/vendor/lib/lib_does_not_exist.so', {})))
diff --git a/vndk/tools/definition-tool/tests/test_module_info.py b/vndk/tools/definition-tool/tests/test_module_info.py
deleted file mode 100644
index b9a7cdddd..000000000
--- a/vndk/tools/definition-tool/tests/test_module_info.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import os
-import unittest
-
-from vndk_definition_tool import ModuleInfo
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-
-
-class ModuleInfoTest(unittest.TestCase):
- def test_default(self):
- m = ModuleInfo.load_from_path_or_default(None)
- self.assertEqual([], m.get_module_path('/system/lib64/libA.so'))
-
-
- def test_get_module_path(self):
- json_path = os.path.join(SCRIPT_DIR, 'testdata', 'test_module_info',
- 'module-info.json')
- m = ModuleInfo.load_from_path_or_default(json_path)
-
- self.assertEqual(['system/core/libA'],
- m.get_module_path('/system/lib64/libA.so'))
- self.assertEqual(['frameworks/base/libB'],
- m.get_module_path('/system/lib64/libB.so'))
- self.assertEqual(['frameworks/base/libC'],
- m.get_module_path('/system/lib64/libC.so'))
- self.assertEqual(['frameworks/base/libC'],
- m.get_module_path('/system/lib64/hw/libC.so'))
-
- self.assertEqual(
- [], m.get_module_path('/system/lib64/libdoes_not_exist.so'))
diff --git a/vndk/tools/definition-tool/tests/test_scandir.py b/vndk/tools/definition-tool/tests/test_scandir.py
deleted file mode 100644
index cc402c041..000000000
--- a/vndk/tools/definition-tool/tests/test_scandir.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import unittest
-
-from vndk_definition_tool import scandir
-
-
-class ScanDirTest(unittest.TestCase):
- def test_scandir(self):
- testdata_dir = os.path.join(
- os.path.dirname(__file__), 'testdata', 'test_scandir')
-
- num_entries = 0
- for ent in scandir(testdata_dir):
- num_entries += 1
-
- self.assertEqual(ent.path, os.path.join(testdata_dir, ent.name))
-
- if ent.name == 'test_file':
- self.assertTrue(ent.is_file())
- self.assertFalse(ent.is_dir())
- self.assertFalse(ent.is_symlink())
- elif ent.name == 'test_dir':
- self.assertFalse(ent.is_file())
- self.assertTrue(ent.is_dir())
- self.assertFalse(ent.is_symlink())
- elif ent.name == 'link_test_file':
- self.assertTrue(ent.is_file())
- self.assertFalse(ent.is_file(follow_symlinks=False))
- self.assertFalse(ent.is_dir())
- self.assertFalse(ent.is_dir(follow_symlinks=False))
- self.assertTrue(ent.is_symlink())
- elif ent.name == 'link_test_dir':
- self.assertFalse(ent.is_file())
- self.assertFalse(ent.is_file(follow_symlinks=False))
- self.assertTrue(ent.is_dir())
- self.assertFalse(ent.is_dir(follow_symlinks=False))
- self.assertTrue(ent.is_symlink())
- elif ent.name == 'link_does_not_exist':
- self.assertFalse(ent.is_file())
- self.assertFalse(ent.is_file(follow_symlinks=False))
- self.assertFalse(ent.is_dir())
- self.assertFalse(ent.is_dir(follow_symlinks=False))
- self.assertTrue(ent.is_symlink())
- else:
- self.fail('unexpected filename: ' + ent.name)
-
- self.assertEqual(num_entries, 5)
diff --git a/vndk/tools/definition-tool/tests/test_tagged_dict.py b/vndk/tools/definition-tool/tests/test_tagged_dict.py
deleted file mode 100644
index f38e2babe..000000000
--- a/vndk/tools/definition-tool/tests/test_tagged_dict.py
+++ /dev/null
@@ -1,497 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import tempfile
-import unittest
-
-from vndk_definition_tool import TaggedDict, TaggedPathDict, TaggedLibDict, \
- NUM_PARTITIONS, PT_SYSTEM, PT_VENDOR
-
-from .compat import StringIO
-
-
-_TEST_DATA = '''Path,Tag
-/system/lib/lib_ll_ndk.so,ll-ndk
-/system/lib/lib_ll_ndk_private.so,ll-ndk-private
-/system/lib/lib_vndk_sp.so,vndk-sp
-/system/lib/lib_vndk_sp_private.so,vndk-sp-private
-/system/lib/lib_vndk.so,vndk
-/system/lib/lib_system_only.so,system-only
-/system/lib/lib_system_only_rs.so,system-only-rs
-/vendor/lib/lib_sp_hal.so,sp-hal
-/vendor/lib/lib_sp_hal_dep.so,sp-hal-dep
-/vendor/lib/lib_vendor_only.so,vendor-only
-/product/lib/lib_product_only.so,product-only
-/system_ext/lib/lib_system_ext_only.so,system_ext-only
-/system/lib/lib_remove.so,remove
-/system/lib/lib_hl_ndk.so,hl-ndk
-/system/lib/lib_vndk_private.so,vndk-private
-/system/lib/lib_vndk_sp_both.so,vndk-sp-both
-/system/lib/lib_vndk_sp_hal.so,vndk-sp-hal
-/system/lib/lib_vndk_indirect.so,vndk-private
-/system/lib/lib_vndk_sp_indirect.so,vndk-sp
-/system/lib/lib_vndk_sp_indirect_private.so,vndk-sp-private
-/system/lib/lib_fwk_only.so,system-only
-/system/lib/lib_fwk_only_rs.so,system-only-rs
-/vendor/lib/lib_vnd_only.so,vendor-only
-'''
-
-_TEST_DATA_ALIAS_PATHS = {
- '/system/lib/lib_hl_ndk.so',
- '/system/lib/lib_vndk_indirect.so',
- '/system/lib/lib_vndk_sp_both.so',
- '/system/lib/lib_vndk_sp_hal.so',
- '/system/lib/lib_vndk_sp_indirect.so',
- '/system/lib/lib_vndk_sp_indirect_private.so',
- '/system/lib/lib_fwk_only.so',
- '/system/lib/lib_fwk_only_rs.so',
- '/vendor/lib/lib_vnd_only.so',
-}
-
-
-class TaggedDictTest(unittest.TestCase):
- def test_normalize_tag(self):
- self.assertEqual('ll_ndk', TaggedDict._normalize_tag('ll-ndk'))
- self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL-NDK'))
- self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL_NDK'))
- with self.assertRaises(ValueError):
- TaggedDict._normalize_tag('unknown-lib-tag')
-
-
- def _check_tag_visibility(self, d, from_tag, visible_tags):
- for to_tag in visible_tags:
- self.assertTrue(d.is_tag_visible(from_tag, to_tag))
- for to_tag in TaggedDict.TAGS:
- self.assertEqual(d.is_tag_visible(from_tag, to_tag),
- to_tag in visible_tags)
-
-
- def test_is_tag_visible(self):
- d = TaggedDict()
-
- # LL-NDK
- visible_tags = {'ll_ndk', 'll_ndk_private'}
- self._check_tag_visibility(d, 'll_ndk', visible_tags)
- self._check_tag_visibility(d, 'll_ndk_private', visible_tags)
-
- # VNDK-SP
- visible_tags = {
- 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'system_only_rs',
- }
- self._check_tag_visibility(d, 'vndk_sp', visible_tags)
- self._check_tag_visibility(d, 'vndk_sp_private', visible_tags)
-
- # VNDK
- visible_tags = {
- 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'vndk', 'vndk_private',
- }
- self._check_tag_visibility(d, 'vndk', visible_tags)
-
- # SYSTEM-ONLY and SYSTEM_EXT-ONLY
- visible_tags = {
- 'll_ndk', 'll_ndk_private',
- 'vndk_sp', 'vndk_sp_private',
- 'vndk', 'vndk_private',
- 'system_only', 'system_only_rs',
- 'system_ext_only',
- 'sp_hal'
- }
- self._check_tag_visibility(d, 'system_only', visible_tags)
- self._check_tag_visibility(d, 'system_only_rs', visible_tags)
- self._check_tag_visibility(d, 'system_ext_only', visible_tags)
-
- # SP-HAL
- visible_tags = {'ll_ndk', 'vndk_sp', 'sp_hal', 'sp_hal_dep'}
- self._check_tag_visibility(d, 'sp_hal', visible_tags)
- self._check_tag_visibility(d, 'sp_hal_dep', visible_tags)
-
- # VENDOR-ONLY
- visible_tags = {
- 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal', 'sp_hal_dep', 'vendor_only',
- }
- self._check_tag_visibility(d, 'vendor_only', visible_tags)
-
- # PRODUCT-ONLY
- visible_tags = {
- 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal',
- # Remove the following after VNDK-ext can be checked separately.
- 'sp_hal_dep', 'vendor_only',
- }
- self._check_tag_visibility(d, 'vendor_only', visible_tags)
-
- # Remove
- self._check_tag_visibility(d, 'remove', set())
-
-
-class TaggedPathDictTest(unittest.TestCase):
- def test_enumerate_paths(self):
- tagged_paths = TaggedPathDict()
-
- self.assertEqual(
- ['/system/lib/libc.so'],
- list(tagged_paths._enumerate_paths('/system/lib/libc.so')))
-
- self.assertEqual(
- ['/system/lib/libc.so', '/system/lib64/libc.so'],
- list(tagged_paths._enumerate_paths('/system/${LIB}/libc.so')))
-
- self.assertEqual(
- ['/system/lib/vndk/libutils.so',
- '/system/lib64/vndk/libutils.so'],
- list(tagged_paths._enumerate_paths(
- '/system/${LIB}/vndk${VNDK_VER}/libutils.so')))
-
- tagged_paths = TaggedPathDict(['current', '27', '28'])
-
- self.assertEqual(
- ['/system/lib/vndk/libutils.so',
- '/system/lib64/vndk/libutils.so',
- '/system/lib/vndk-27/libutils.so',
- '/system/lib64/vndk-27/libutils.so',
- '/system/lib/vndk-28/libutils.so',
- '/system/lib64/vndk-28/libutils.so'],
- list(tagged_paths._enumerate_paths(
- '/system/${LIB}/vndk${VNDK_VER}/libutils.so')))
-
- self.assertEqual(
- ['/system/lib/vndk/libutils.so',
- '/system/lib/vndk-27/libutils.so',
- '/system/lib/vndk-28/libutils.so'],
- list(tagged_paths._enumerate_paths(
- '/system/lib/vndk${VNDK_VER}/libutils.so')))
-
-
- def test_load_from_csv_empty(self):
- try:
- TaggedPathDict().load_from_csv(StringIO(''))
- except StopIteration:
- self.fail('empty file should be considered as a valid input')
-
-
- def test_load_from_csv_with_header(self):
- fp = StringIO('Path,Tag\nliba.so,system-only\n')
- d = TaggedPathDict()
- d.load_from_csv(fp)
- self.assertIn('liba.so', d.system_only)
-
- fp = StringIO('Tag,Path\nsystem-only,liba.so\n')
- d = TaggedPathDict()
- d.load_from_csv(fp)
- self.assertIn('liba.so', d.system_only)
-
-
- def test_load_from_csv_without_header(self):
- fp = StringIO('liba.so,system-only\n')
- d = TaggedPathDict()
- d.load_from_csv(fp)
- self.assertIn('liba.so', d.system_only)
-
-
- def _check_test_data_loaded(self, d):
- # Paths
- self.assertIn('/system/lib/lib_ll_ndk.so', d.ll_ndk)
- self.assertIn('/system/lib/lib_ll_ndk_private.so', d.ll_ndk_private)
- self.assertIn('/system/lib/lib_vndk_sp.so', d.vndk_sp)
- self.assertIn('/system/lib/lib_vndk_sp_private.so', d.vndk_sp_private)
- self.assertIn('/system/lib/lib_vndk.so', d.vndk)
- self.assertIn('/system/lib/lib_vndk_private.so', d.vndk_private)
- self.assertIn('/system/lib/lib_system_only.so', d.system_only)
- self.assertIn('/system/lib/lib_system_only_rs.so', d.system_only_rs)
- self.assertIn('/vendor/lib/lib_sp_hal.so', d.sp_hal)
- self.assertIn('/vendor/lib/lib_sp_hal_dep.so', d.sp_hal_dep)
- self.assertIn('/vendor/lib/lib_vendor_only.so', d.vendor_only)
- self.assertIn('/system_ext/lib/lib_system_ext_only.so',
- d.system_ext_only)
- self.assertIn('/product/lib/lib_product_only.so', d.product_only)
- self.assertIn('/system/lib/lib_remove.so', d.remove)
-
- # Aliases
- self.assertIn('/system/lib/lib_hl_ndk.so', d.system_only)
- self.assertIn('/system/lib/lib_vndk_sp_both.so', d.vndk_sp)
- self.assertIn('/system/lib/lib_vndk_sp_hal.so', d.vndk_sp)
-
-
- def test_load_from_csv_tags(self):
- fp = StringIO(_TEST_DATA)
- d = TaggedPathDict()
- d.load_from_csv(fp)
- self._check_test_data_loaded(d)
-
-
- def test_create_from_csv(self):
- d = TaggedPathDict.create_from_csv(StringIO(_TEST_DATA))
- self._check_test_data_loaded(d)
-
-
- def test_create_from_csv_path(self):
- with tempfile.NamedTemporaryFile('w+') as f:
- f.write(_TEST_DATA)
- f.flush()
-
- d = TaggedPathDict.create_from_csv_path(f.name)
- self._check_test_data_loaded(d)
-
-
- def test_get_path_tag(self):
- fp = StringIO(_TEST_DATA)
- d = TaggedPathDict()
- d.load_from_csv(fp)
-
- self.assertEqual('ll_ndk', d.get_path_tag('/system/lib/lib_ll_ndk.so'))
- self.assertEqual('ll_ndk_private',
- d.get_path_tag('/system/lib/lib_ll_ndk_private.so'))
- self.assertEqual('vndk_sp',
- d.get_path_tag('/system/lib/lib_vndk_sp.so'))
- self.assertEqual('vndk_sp_private',
- d.get_path_tag('/system/lib/lib_vndk_sp_private.so'))
- self.assertEqual('vndk', d.get_path_tag('/system/lib/lib_vndk.so'))
- self.assertEqual('vndk_private',
- d.get_path_tag('/system/lib/lib_vndk_private.so'))
- self.assertEqual('system_only',
- d.get_path_tag('/system/lib/lib_system_only.so'))
- self.assertEqual('system_only_rs',
- d.get_path_tag('/system/lib/lib_system_only_rs.so'))
- self.assertEqual('sp_hal',
- d.get_path_tag('/vendor/lib/lib_sp_hal.so'))
- self.assertEqual('sp_hal_dep',
- d.get_path_tag('/vendor/lib/lib_sp_hal_dep.so'))
- self.assertEqual('vendor_only',
- d.get_path_tag('/vendor/lib/lib_vendor_only.so'))
- self.assertEqual('remove',
- d.get_path_tag('/system/lib/lib_remove.so'))
-
- # Aliases
- self.assertEqual('system_only',
- d.get_path_tag('/system/lib/lib_hl_ndk.so'))
- self.assertEqual('vndk_sp',
- d.get_path_tag('/system/lib/lib_vndk_sp_hal.so'))
- self.assertEqual('vndk_sp',
- d.get_path_tag('/system/lib/lib_vndk_sp_both.so'))
- self.assertEqual('vndk_private',
- d.get_path_tag('/system/lib/lib_vndk_indirect.so'))
- self.assertEqual('vndk_sp',
- d.get_path_tag('/system/lib/lib_vndk_sp_indirect.so'))
- self.assertEqual('vndk_sp_private',
- d.get_path_tag('/system/lib/' +
- 'lib_vndk_sp_indirect_private.so'))
- self.assertEqual('system_only',
- d.get_path_tag('/system/lib/lib_fwk_only.so'))
- self.assertEqual('system_only_rs',
- d.get_path_tag('/system/lib/lib_fwk_only_rs.so'))
- self.assertEqual('vendor_only',
- d.get_path_tag('/vendor/lib/lib_vendor_only.so'))
-
- # Unmatched paths
- self.assertEqual('system_only',
- d.get_path_tag('/system/lib/unknown.so'))
- self.assertEqual('system_only',
- d.get_path_tag('/data/lib/unknown.so'))
- self.assertEqual('vendor_only',
- d.get_path_tag('/vendor/lib/unknown.so'))
-
-
- def _check_path_visibility(self, d, all_paths, from_paths, visible_paths):
- for from_path in from_paths:
- for to_path in all_paths:
- self.assertEqual(d.is_path_visible(from_path, to_path),
- to_path in visible_paths)
-
-
- def test_is_path_visible(self):
- fp = StringIO(_TEST_DATA)
- d = TaggedPathDict()
- d.load_from_csv(fp)
-
- # Collect path universe set.
- all_paths = set()
- for tag in TaggedPathDict.TAGS:
- all_paths |= getattr(d, tag)
- all_paths -= _TEST_DATA_ALIAS_PATHS
-
- # LL-NDK
- from_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_ll_ndk_private.so',
- }
- visible_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_ll_ndk_private.so',
- }
- self._check_path_visibility(d, all_paths, from_paths, visible_paths)
-
- # VNDK-SP
- from_paths = {
- '/system/lib/lib_vndk_sp.so',
- '/system/lib/lib_vndk_sp_private.so',
- }
- visible_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_vndk_sp.so',
- '/system/lib/lib_vndk_sp_private.so',
- '/system/lib/lib_system_only_rs.so',
- }
- self._check_path_visibility(d, all_paths, from_paths, visible_paths)
-
- # VNDK
- from_paths = {
- '/system/lib/lib_vndk.so',
- }
- visible_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_vndk_sp.so',
- '/system/lib/lib_vndk_sp_private.so',
- '/system/lib/lib_vndk.so',
- '/system/lib/lib_vndk_private.so',
- }
- self._check_path_visibility(d, all_paths, from_paths, visible_paths)
-
- # SYSTEM-ONLY
- from_paths = {
- '/system/lib/lib_system_only.so',
- '/system/lib/lib_system_only_rs.so',
- }
- visible_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_ll_ndk_private.so',
- '/system/lib/lib_vndk_sp.so',
- '/system/lib/lib_vndk_sp_private.so',
- '/system/lib/lib_vndk.so',
- '/system/lib/lib_vndk_private.so',
- '/system/lib/lib_system_only.so',
- '/system/lib/lib_system_only_rs.so',
- '/vendor/lib/lib_sp_hal.so',
- '/system_ext/lib/lib_system_ext_only.so',
- }
- self._check_path_visibility(d, all_paths, from_paths, visible_paths)
-
- # SP-HAL
- from_paths = {
- '/vendor/lib/lib_sp_hal.so',
- '/vendor/lib/lib_sp_hal_dep.so',
- }
- visible_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_vndk_sp.so',
- '/vendor/lib/lib_sp_hal.so',
- '/vendor/lib/lib_sp_hal_dep.so',
- }
- self._check_path_visibility(d, all_paths, from_paths, visible_paths)
-
- # VENDOR-ONLY
- from_paths = {
- '/vendor/lib/lib_vendor_only.so',
- }
- visible_paths = {
- '/system/lib/lib_ll_ndk.so',
- '/system/lib/lib_vndk_sp.so',
- '/system/lib/lib_vndk.so',
- '/vendor/lib/lib_sp_hal.so',
- '/vendor/lib/lib_sp_hal_dep.so',
- '/vendor/lib/lib_vendor_only.so',
- }
- self._check_path_visibility(d, all_paths, from_paths, visible_paths)
-
-
-class MockSPLibResult(object):
- def __init__(self, sp_hal, sp_hal_dep):
- self.sp_hal = sp_hal
- self.sp_hal_dep = sp_hal_dep
-
-
-class MockELFLinkData(object):
- def __init__(self, path):
- self.path = path
-
-
-class MockELFGraph(object):
- def __init__(self):
- self.lib_pt = [dict() for i in range(NUM_PARTITIONS)]
-
-
- def add(self, path):
- partition = PT_VENDOR if path.startswith('/vendor') else PT_SYSTEM
- lib = MockELFLinkData(path)
- self.lib_pt[partition][path] = lib
- return lib
-
-
- def compute_sp_lib(self, generic_refs=None):
- vendor_libs = self.lib_pt[PT_VENDOR].values()
- return MockSPLibResult(
- set(v for v in vendor_libs if 'lib_sp_hal.so' in v.path),
- set(v for v in vendor_libs if 'lib_sp_hal_dep.so' in v.path))
-
-
-class TaggedLibDictTest(unittest.TestCase):
- def setUp(self):
- self.tagged_paths = TaggedPathDict.create_from_csv(StringIO(_TEST_DATA))
-
- self.graph = MockELFGraph()
-
- self.lib_ll_ndk = self.graph.add('/system/lib/lib_ll_ndk.so')
- self.lib_ll_ndk_private = \
- self.graph.add('/system/lib/lib_ll_ndk_private.so')
-
- self.lib_vndk_sp = self.graph.add('/system/lib/lib_vndk_sp.so')
- self.lib_vndk_sp_private = \
- self.graph.add('/system/lib/lib_vndk_sp_private.so')
-
- self.lib_vndk = self.graph.add('/system/lib/lib_vndk.so')
-
- self.lib_system_only = \
- self.graph.add('/system/lib/lib_system_only.so')
- self.lib_system_only_rs = \
- self.graph.add('/system/lib/lib_system_only_rs.so')
-
- self.lib_sp_hal = self.graph.add('/vendor/lib/lib_sp_hal.so')
- self.lib_sp_hal_dep = self.graph.add('/vendor/lib/lib_sp_hal_dep.so')
-
- self.lib_vendor_only = self.graph.add('/vendor/lib/lib_vendor_only.so')
-
- self.tagged_libs = TaggedLibDict.create_from_graph(
- self.graph, self.tagged_paths)
-
-
- def test_create_from_graph(self):
- self.assertIn(self.lib_ll_ndk, self.tagged_libs.ll_ndk)
- self.assertIn(self.lib_ll_ndk_private,
- self.tagged_libs.ll_ndk_private)
- self.assertIn(self.lib_vndk_sp, self.tagged_libs.vndk_sp)
- self.assertIn(self.lib_vndk_sp_private,
- self.tagged_libs.vndk_sp_private)
-
- self.assertIn(self.lib_vndk, self.tagged_libs.vndk)
-
- self.assertIn(self.lib_system_only, self.tagged_libs.system_only)
- self.assertIn(self.lib_system_only_rs, self.tagged_libs.system_only_rs)
-
- self.assertIn(self.lib_sp_hal, self.tagged_libs.sp_hal)
- self.assertIn(self.lib_sp_hal_dep, self.tagged_libs.sp_hal_dep)
- self.assertIn(self.lib_vendor_only, self.tagged_libs.vendor_only)
-
-
- def test_get_path_tag(self):
- d = self.tagged_libs
-
- self.assertEqual('ll_ndk', d.get_path_tag(self.lib_ll_ndk))
- self.assertEqual('ll_ndk_private',
- d.get_path_tag(self.lib_ll_ndk_private))
- self.assertEqual('vndk_sp', d.get_path_tag(self.lib_vndk_sp))
- self.assertEqual('vndk_sp_private',
- d.get_path_tag(self.lib_vndk_sp_private))
- self.assertEqual('vndk', d.get_path_tag(self.lib_vndk))
- self.assertEqual('system_only', d.get_path_tag(self.lib_system_only))
- self.assertEqual('system_only_rs',
- d.get_path_tag(self.lib_system_only_rs))
- self.assertEqual('sp_hal', d.get_path_tag(self.lib_sp_hal))
- self.assertEqual('sp_hal_dep', d.get_path_tag(self.lib_sp_hal_dep))
- self.assertEqual('vendor_only', d.get_path_tag(self.lib_vendor_only))
-
- # Unmatched paths
- tag = d.get_path_tag(MockELFLinkData('/system/lib/unknown.so'))
- self.assertEqual('system_only', tag)
- tag = d.get_path_tag(MockELFLinkData('/data/lib/unknown.so'))
- self.assertEqual('system_only', tag)
- tag = d.get_path_tag(MockELFLinkData('/vendor/lib/unknown.so'))
- self.assertEqual('vendor_only', tag)
diff --git a/vndk/tools/definition-tool/tests/test_vndk.py b/vndk/tools/definition-tool/tests/test_vndk.py
deleted file mode 100644
index e21e9f719..000000000
--- a/vndk/tools/definition-tool/tests/test_vndk.py
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-from vndk_definition_tool import (PT_SYSTEM, PT_VENDOR)
-
-from .compat import StringIO, TestCase, patch
-from .utils import GraphBuilder
-
-
-class ELFLinkerVNDKTest(TestCase):
- def test_normalize_partition_tags_bad_vendor_deps(self):
- """Check whether normalize_partition_tags() hides the dependencies from
- the system partition to the vendor partition if the dependencies are
- not SP-HAL libraries."""
-
- gb = GraphBuilder()
- libfwk = gb.add_lib32(PT_SYSTEM, 'libfwk', dt_needed=['libvnd.so'])
- libvnd = gb.add_lib32(PT_VENDOR, 'libvnd')
- gb.resolve()
-
- self.assertIn(libvnd, libfwk.deps_needed)
- self.assertIn(libfwk, libvnd.users_needed)
-
- stderr = StringIO()
- with patch('sys.stderr', stderr):
- gb.graph.normalize_partition_tags(set(), None)
-
- self.assertRegex(
- stderr.getvalue(),
- 'error: .*: system exe/lib must not depend on vendor lib .*. '
- 'Assume such dependency does not exist.')
-
- self.assertNotIn(libvnd, libfwk.deps_needed)
- self.assertNotIn(libfwk, libvnd.users_needed)
-
- self.assertIn(libvnd, libfwk.deps_needed_hidden)
- self.assertIn(libfwk, libvnd.users_needed_hidden)
-
- self.assertIn(libvnd, libfwk.deps_all)
- self.assertIn(libvnd, libfwk.deps_needed_all)
- self.assertNotIn(libvnd, libfwk.deps_good)
-
- self.assertIn(libfwk, libvnd.users_all)
- self.assertIn(libfwk, libvnd.users_needed_all)
- self.assertNotIn(libfwk, libvnd.users_good)
-
-
- def test_normalize_partition_tags_sp_hal(self):
- """Check whether normalize_partition_tags() keep dependencies to SP-HAL
- libraries as-is."""
-
- gb = GraphBuilder()
- libfwk = gb.add_lib32(PT_SYSTEM, 'libfwk', dt_needed=['libsphal.so'])
- libsphal = gb.add_lib32(PT_VENDOR, 'libsphal')
- gb.resolve()
-
- self.assertIn(libsphal, libfwk.deps_needed)
- self.assertIn(libfwk, libsphal.users_needed)
-
- gb.graph.normalize_partition_tags({libsphal}, None)
-
- # SP-HALs should be kept as-is.
- self.assertIn(libsphal, libfwk.deps_needed)
- self.assertIn(libfwk, libsphal.users_needed)
-
-
- def test_vndk(self):
- """Check the computation of vndk without generic references."""
-
- gb = GraphBuilder()
- gb.add_lib32(PT_SYSTEM, 'libfwk')
- libvndk = gb.add_lib32(PT_SYSTEM, 'libvndk', extra_dir='vndk')
- libvndk_sp = gb.add_lib32(PT_SYSTEM, 'libutils', extra_dir='vndk-sp')
- libvnd = gb.add_lib32(PT_VENDOR, 'libvnd',
- dt_needed=['libvndk.so', 'libutils.so'])
- gb.resolve()
-
- self.assertIn(libvndk, libvnd.deps_all)
- self.assertIn(libvndk_sp, libvnd.deps_all)
-
- vndk_sets = gb.graph.compute_degenerated_vndk(None)
-
- self.assertIn(libvndk, vndk_sets.vndk)
- self.assertIn(libvndk_sp, vndk_sets.vndk_sp)
-
-
- def test_vndk_bad_vendor_deps(self):
- """Check the computation of vndk without generic references."""
-
- gb = GraphBuilder()
-
- libvndk = gb.add_lib32(
- PT_SYSTEM, 'libvndk', dt_needed=['libvnd_bad.so'],
- extra_dir='vndk')
-
- libvndk_sp = gb.add_lib32(
- PT_SYSTEM, 'libutils', dt_needed=['libvnd_bad.so'],
- extra_dir='vndk-sp')
-
- libvnd_bad = gb.add_lib32(PT_VENDOR, 'libvnd_bad', extra_dir='vndk-sp')
-
- gb.resolve()
-
- self.assertIn(libvnd_bad, libvndk.deps_all)
- self.assertIn(libvnd_bad, libvndk_sp.deps_all)
-
- with patch('sys.stderr', StringIO()):
- vndk_sets = gb.graph.compute_degenerated_vndk(None)
-
- self.assertNotIn(libvnd_bad, vndk_sets.vndk)
- self.assertNotIn(libvnd_bad, vndk_sets.vndk_sp)
-
-
- def test_ll_ndk_private_without_sp_hal(self):
- """Check the computation of ll_ndk_private excludes sp_hal."""
-
- gb = GraphBuilder()
- libEGL = gb.add_lib32(PT_SYSTEM, 'libEGL',
- dt_needed=['libEGL_dep.so'])
- libEGL_dep = gb.add_lib32(PT_SYSTEM, 'libEGL_dep')
- libEGL_chipset = gb.add_lib32(PT_VENDOR, 'libEGL_chipset',
- extra_dir='egl',
- dt_needed=['libEGL.so'])
- gb.resolve()
-
- libEGL.add_dlopen_dep(libEGL_chipset)
-
- vndk_sets = gb.graph.compute_degenerated_vndk(None)
-
- self.assertIn(libEGL, vndk_sets.ll_ndk)
- self.assertIn(libEGL_dep, vndk_sets.ll_ndk_private)
- self.assertIn(libEGL_chipset, vndk_sets.sp_hal)
-
- self.assertNotIn(libEGL_chipset, vndk_sets.ll_ndk_private)
diff --git a/vndk/tools/definition-tool/tests/test_vndk_lib_dir.py b/vndk/tools/definition-tool/tests/test_vndk_lib_dir.py
deleted file mode 100644
index 1d73eccbc..000000000
--- a/vndk/tools/definition-tool/tests/test_vndk_lib_dir.py
+++ /dev/null
@@ -1,219 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import posixpath
-import unittest
-
-from vndk_definition_tool import VNDKLibDir
-
-from .compat import StringIO
-
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-
-
-class VNDKLibDirTest(unittest.TestCase):
- def test_create_vndk_dir_suffix(self):
- self.assertEqual('', VNDKLibDir.create_vndk_dir_suffix('current'))
- self.assertEqual('-28', VNDKLibDir.create_vndk_dir_suffix('28'))
-
-
- def test_create_vndk_sp_dir_name(self):
- self.assertEqual(
- 'vndk-sp', VNDKLibDir.create_vndk_sp_dir_name('current'))
- self.assertEqual(
- 'vndk-sp-28', VNDKLibDir.create_vndk_sp_dir_name('28'))
-
-
- def test_create_vndk_dir_name(self):
- self.assertEqual(
- 'vndk', VNDKLibDir.create_vndk_dir_name('current'))
- self.assertEqual(
- 'vndk-28', VNDKLibDir.create_vndk_dir_name('28'))
-
-
- def test_extract_vndk_version_from_name(self):
- self.assertEqual(
- 'current', VNDKLibDir.extract_version_from_name('vndk'))
- self.assertEqual(
- 'current', VNDKLibDir.extract_version_from_name('vndk-sp'))
- self.assertEqual(
- '28', VNDKLibDir.extract_version_from_name('vndk-28'))
- self.assertEqual(
- '28', VNDKLibDir.extract_version_from_name('vndk-sp-28'))
- self.assertEqual(
- 'p', VNDKLibDir.extract_version_from_name('vndk-p'))
- self.assertEqual(
- 'p', VNDKLibDir.extract_version_from_name('vndk-sp-p'))
-
-
- def test_extract_vndk_version_from_path(self):
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk/libexample.so')
- self.assertEqual('current', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk-sp/libexample.so')
- self.assertEqual('current', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk-28/libexample.so')
- self.assertEqual('28', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk-sp-28/libexample.so')
- self.assertEqual('28', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk-p/libexample.so')
- self.assertEqual('p', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk-sp-p/libexample.so')
- self.assertEqual('p', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/vndk-sp-p/hw/libexample.so')
- self.assertEqual('p', ans)
-
- ans = VNDKLibDir.extract_version_from_path(
- '/system/lib64/libexample.so')
- self.assertEqual(None, ans)
-
-
- def test_is_in_vndk_sp_dir(self):
- self.assertFalse(VNDKLibDir.is_in_vndk_sp_dir('/system/lib/liba.so'))
- self.assertFalse(
- VNDKLibDir.is_in_vndk_sp_dir('/system/lib/vndk/liba.so'))
- self.assertFalse(
- VNDKLibDir.is_in_vndk_sp_dir('/system/lib/vndk-28/liba.so'))
- self.assertFalse(
- VNDKLibDir.is_in_vndk_sp_dir('/system/lib/vndk-spec/liba.so'))
- self.assertTrue(
- VNDKLibDir.is_in_vndk_sp_dir('/system/lib/vndk-sp/liba.so'))
- self.assertTrue(
- VNDKLibDir.is_in_vndk_sp_dir('/system/lib/vndk-sp-28/liba.so'))
-
-
- def test_is_in_vndk_dir(self):
- self.assertFalse(VNDKLibDir.is_in_vndk_dir('/system/lib/liba.so'))
- self.assertTrue(VNDKLibDir.is_in_vndk_dir('/system/lib/vndk/liba.so'))
- self.assertTrue(
- VNDKLibDir.is_in_vndk_dir('/system/lib/vndk-28/liba.so'))
- self.assertTrue(
- VNDKLibDir.is_in_vndk_dir('/system/lib/vndk-spec/liba.so'))
- self.assertFalse(
- VNDKLibDir.is_in_vndk_dir('/system/lib/vndk-sp/liba.so'))
- self.assertFalse(
- VNDKLibDir.is_in_vndk_dir('/system/lib/vndk-sp-28/liba.so'))
-
-
- def test_get_vndk_lib_dirs(self):
- for version in ('current', '28'):
- for lib_dir in ('lib', 'lib64'):
- vndk_sp_name = VNDKLibDir.create_vndk_sp_dir_name(version)
- vndk_name = VNDKLibDir.create_vndk_dir_name(version)
-
- expected_vndk_sp = [
- posixpath.join('/vendor', lib_dir, vndk_sp_name),
- posixpath.join('/system', lib_dir, vndk_sp_name),
- ]
- expected_vndk = [
- posixpath.join('/vendor', lib_dir, vndk_name),
- posixpath.join('/system', lib_dir, vndk_name),
- ]
-
- vndk_sp_dirs, vndk_dirs = \
- VNDKLibDir.get_vndk_lib_dirs(lib_dir, version)
- self.assertEqual(expected_vndk_sp, vndk_sp_dirs)
- self.assertEqual(expected_vndk, vndk_dirs)
-
-
- def test_add_version_current(self):
- vndk_lib_dirs = VNDKLibDir()
- vndk_lib_dirs.append('current')
- self.assertIn('current', vndk_lib_dirs)
-
-
- def test_create_from_dirs_unversioned(self):
- input_dir = os.path.join(
- SCRIPT_DIR, 'testdata', 'test_vndk_lib_dir', 'vndk_unversioned')
-
- vndk_lib_dirs = VNDKLibDir.create_from_dirs(
- [os.path.join(input_dir, 'system')],
- [os.path.join(input_dir, 'vendor')])
-
- self.assertIn('current', vndk_lib_dirs)
-
-
- def test_create_from_dirs_versioned(self):
- input_dir = os.path.join(
- SCRIPT_DIR, 'testdata', 'test_vndk_lib_dir', 'vndk_versioned')
-
- vndk_lib_dirs = VNDKLibDir.create_from_dirs(
- [os.path.join(input_dir, 'system')],
- [os.path.join(input_dir, 'vendor')])
-
- self.assertIn('28', vndk_lib_dirs)
-
-
- def test_create_from_dirs_versioned_multiple(self):
- input_dir = os.path.join(
- SCRIPT_DIR, 'testdata', 'test_vndk_lib_dir',
- 'vndk_versioned_multiple')
-
- vndk_lib_dirs = VNDKLibDir.create_from_dirs(
- [os.path.join(input_dir, 'system')],
- [os.path.join(input_dir, 'vendor')])
-
- self.assertIn('28', vndk_lib_dirs)
- self.assertIn('29', vndk_lib_dirs)
-
-
- def test_create_from_dirs_versioned_32bit_only(self):
- input_dir = os.path.join(
- SCRIPT_DIR, 'testdata', 'test_vndk_lib_dir', 'vndk_32')
-
- vndk_lib_dirs = VNDKLibDir.create_from_dirs(
- [os.path.join(input_dir, 'system')],
- [os.path.join(input_dir, 'vendor')])
-
- self.assertIn('28', vndk_lib_dirs)
-
-
- def test_get_property(self):
- property_file = StringIO('ro.vndk.version=example\n')
- ans = VNDKLibDir._get_property(property_file, 'ro.vndk.version')
- self.assertEqual('example', ans)
-
- property_file = StringIO('# comments\n')
- ans = VNDKLibDir._get_property(property_file, 'ro.vndk.version')
- self.assertEqual(None, ans)
-
-
- def test_get_ro_vndk_version(self):
- input_dir = os.path.join(
- SCRIPT_DIR, 'testdata', 'test_vndk_lib_dir',
- 'vndk_versioned_multiple')
-
- vendor_dirs = [os.path.join(input_dir, 'vendor')]
-
- self.assertEqual('29', VNDKLibDir.get_ro_vndk_version(vendor_dirs))
-
-
- def test_sorted_versions(self):
- self.assertEqual(
- ['20', '10', '2', '1'],
- VNDKLibDir.sorted_version(['1', '2', '10', '20']))
-
- self.assertEqual(
- ['b', 'a', '20', '10', '2', '1'],
- VNDKLibDir.sorted_version(['1', '2', '10', '20', 'a', 'b']))
-
- self.assertEqual(
- ['a', '10b', '10', '2', '1'],
- VNDKLibDir.sorted_version(['1', '2', '10', 'a', '10b']))
-
- self.assertEqual(
- ['current', 'd', 'a', '10', '1'],
- VNDKLibDir.sorted_version(['1', '10', 'a', 'd', 'current']))
diff --git a/vndk/tools/definition-tool/tests/testdata/test_dex_file/Example.smali b/vndk/tools/definition-tool/tests/testdata/test_dex_file/Example.smali
deleted file mode 100644
index 4a6f844db..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_dex_file/Example.smali
+++ /dev/null
@@ -1,13 +0,0 @@
-.class public LExample;
-
-.super Ljava/lang/object;
-
-.method public static ()V
- .locals 1
-
- const-string v0, "foo"
- invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
-
- const-string v0, "bar"
- invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
-.end method
diff --git a/vndk/tools/definition-tool/tests/testdata/test_dex_file/Hello.smali b/vndk/tools/definition-tool/tests/testdata/test_dex_file/Hello.smali
deleted file mode 100644
index 63b03e686..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_dex_file/Hello.smali
+++ /dev/null
@@ -1,13 +0,0 @@
-.class public LHello;
-
-.super Ljava/lang/object;
-
-.method public static ()V
- .locals 1
-
- const-string v0, "hello"
- invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
-
- const-string v0, "world"
- invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
-.end method
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-rpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-rpath-multi.so.txt
deleted file mode 100644
index e2a2e3a08..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-rpath-multi.so.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-FILE_SIZE 6220
-RO_SEG_FILE_SIZE 880
-RO_SEG_MEM_SIZE 880
-RW_SEG_FILE_SIZE 280
-RW_SEG_MEM_SIZE 280
-DT_RPATH /system/lib
-DT_RPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-rpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-rpath.so.txt
deleted file mode 100644
index 91e2664d2..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-rpath.so.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-FILE_SIZE 6220
-RO_SEG_FILE_SIZE 864
-RO_SEG_MEM_SIZE 864
-RW_SEG_FILE_SIZE 280
-RW_SEG_MEM_SIZE 280
-DT_RPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-runpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-runpath-multi.so.txt
deleted file mode 100644
index 17b8905d8..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-runpath-multi.so.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-FILE_SIZE 6220
-RO_SEG_FILE_SIZE 880
-RO_SEG_MEM_SIZE 880
-RW_SEG_FILE_SIZE 280
-RW_SEG_MEM_SIZE 280
-DT_RUNPATH /system/lib
-DT_RUNPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-runpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-runpath.so.txt
deleted file mode 100644
index 9063ffe11..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest-runpath.so.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-FILE_SIZE 6220
-RO_SEG_FILE_SIZE 864
-RO_SEG_MEM_SIZE 864
-RW_SEG_FILE_SIZE 280
-RW_SEG_MEM_SIZE 280
-DT_RUNPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest.so.txt
deleted file mode 100644
index 474a117f8..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/libtest.so.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-FILE_SIZE 6220
-RO_SEG_FILE_SIZE 844
-RO_SEG_MEM_SIZE 844
-RW_SEG_FILE_SIZE 272
-RW_SEG_MEM_SIZE 272
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/main.out.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/main.out.txt
deleted file mode 100644
index c00f6927f..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm/main.out.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-FILE_SIZE 6776
-RO_SEG_FILE_SIZE 1646
-RO_SEG_MEM_SIZE 1646
-RW_SEG_FILE_SIZE 344
-RW_SEG_MEM_SIZE 348
-DT_NEEDED libdl.so
-DT_NEEDED libc.so
-DT_NEEDED libstdc++.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __libc_init
-IMP_SYMBOL dlclose
-IMP_SYMBOL dlopen
-IMP_SYMBOL dlsym
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-rpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-rpath-multi.so.txt
deleted file mode 100644
index ba3832f5d..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-rpath-multi.so.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-FILE_SIZE 7296
-RO_SEG_FILE_SIZE 1248
-RO_SEG_MEM_SIZE 1248
-RW_SEG_FILE_SIZE 520
-RW_SEG_MEM_SIZE 520
-DT_RPATH /system/lib
-DT_RPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __bss_start__
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-rpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-rpath.so.txt
deleted file mode 100644
index 07265eb24..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-rpath.so.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-FILE_SIZE 7296
-RO_SEG_FILE_SIZE 1248
-RO_SEG_MEM_SIZE 1248
-RW_SEG_FILE_SIZE 520
-RW_SEG_MEM_SIZE 520
-DT_RPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __bss_start__
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-runpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-runpath-multi.so.txt
deleted file mode 100644
index 090280b0d..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-runpath-multi.so.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-FILE_SIZE 7296
-RO_SEG_FILE_SIZE 1248
-RO_SEG_MEM_SIZE 1248
-RW_SEG_FILE_SIZE 520
-RW_SEG_MEM_SIZE 520
-DT_RUNPATH /system/lib
-DT_RUNPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __bss_start__
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-runpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-runpath.so.txt
deleted file mode 100644
index ba19600c8..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest-runpath.so.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-FILE_SIZE 7296
-RO_SEG_FILE_SIZE 1248
-RO_SEG_MEM_SIZE 1248
-RW_SEG_FILE_SIZE 520
-RW_SEG_MEM_SIZE 520
-DT_RUNPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __bss_start__
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest.so.txt
deleted file mode 100644
index 080aa0996..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/libtest.so.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-FILE_SIZE 7296
-RO_SEG_FILE_SIZE 1232
-RO_SEG_MEM_SIZE 1232
-RW_SEG_FILE_SIZE 504
-RW_SEG_MEM_SIZE 504
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __bss_start__
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/main.out.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/main.out.txt
deleted file mode 100644
index 7cd39f87f..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/arm64/main.out.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-FILE_SIZE 8256
-RO_SEG_FILE_SIZE 2410
-RO_SEG_MEM_SIZE 2410
-RW_SEG_FILE_SIZE 664
-RW_SEG_MEM_SIZE 664
-DT_NEEDED libdl.so
-DT_NEEDED libc.so
-DT_NEEDED libstdc++.so
-EXP_SYMBOL __FINI_ARRAY__
-EXP_SYMBOL __INIT_ARRAY__
-EXP_SYMBOL __PREINIT_ARRAY__
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __bss_start__
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL main
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __libc_init
-IMP_SYMBOL dlclose
-IMP_SYMBOL dlopen
-IMP_SYMBOL dlsym
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-rpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-rpath-multi.so.txt
deleted file mode 100644
index 3a5ab9ab3..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-rpath-multi.so.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 6660
-RO_SEG_FILE_SIZE 1180
-RO_SEG_MEM_SIZE 1180
-RW_SEG_FILE_SIZE 308
-RW_SEG_MEM_SIZE 308
-DT_RPATH /system/lib
-DT_RPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL _gp_disp
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-rpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-rpath.so.txt
deleted file mode 100644
index 7e16d5f95..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-rpath.so.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 6660
-RO_SEG_FILE_SIZE 1164
-RO_SEG_MEM_SIZE 1164
-RW_SEG_FILE_SIZE 308
-RW_SEG_MEM_SIZE 308
-DT_RPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL _gp_disp
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-runpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-runpath-multi.so.txt
deleted file mode 100644
index a3afbde86..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-runpath-multi.so.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 6660
-RO_SEG_FILE_SIZE 1180
-RO_SEG_MEM_SIZE 1180
-RW_SEG_FILE_SIZE 308
-RW_SEG_MEM_SIZE 308
-DT_RUNPATH /system/lib
-DT_RUNPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL _gp_disp
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-runpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-runpath.so.txt
deleted file mode 100644
index 9bfb8357a..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest-runpath.so.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 6660
-RO_SEG_FILE_SIZE 1164
-RO_SEG_MEM_SIZE 1164
-RW_SEG_FILE_SIZE 308
-RW_SEG_MEM_SIZE 308
-DT_RUNPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL _gp_disp
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest.so.txt
deleted file mode 100644
index 32664885b..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/libtest.so.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 6660
-RO_SEG_FILE_SIZE 1164
-RO_SEG_MEM_SIZE 1164
-RW_SEG_FILE_SIZE 300
-RW_SEG_MEM_SIZE 300
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL _gp_disp
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/main.out.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/main.out.txt
deleted file mode 100644
index 716a8ebc0..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips/main.out.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 7936
-RO_SEG_FILE_SIZE 2384
-RO_SEG_MEM_SIZE 2384
-RW_SEG_FILE_SIZE 396
-RW_SEG_MEM_SIZE 416
-DT_NEEDED libdl.so
-DT_NEEDED libc.so
-DT_NEEDED libstdc++.so
-EXP_SYMBOL _DYNAMIC_LINKING
-EXP_SYMBOL __CTOR_LIST__
-EXP_SYMBOL __DTOR_LIST__
-EXP_SYMBOL __FINI_ARRAY__
-EXP_SYMBOL __INIT_ARRAY__
-EXP_SYMBOL __PREINIT_ARRAY__
-EXP_SYMBOL __RLD_MAP
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL main
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __libc_init
-IMP_SYMBOL dlclose
-IMP_SYMBOL dlopen
-IMP_SYMBOL dlsym
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-rpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-rpath-multi.so.txt
deleted file mode 100644
index b29f77f35..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-rpath-multi.so.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 7640
-RO_SEG_FILE_SIZE 2092
-RO_SEG_MEM_SIZE 2092
-RW_SEG_FILE_SIZE 104
-RW_SEG_MEM_SIZE 104
-DT_RPATH /system/lib
-DT_RPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-rpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-rpath.so.txt
deleted file mode 100644
index c4d1cc62c..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-rpath.so.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 7640
-RO_SEG_FILE_SIZE 2092
-RO_SEG_MEM_SIZE 2092
-RW_SEG_FILE_SIZE 104
-RW_SEG_MEM_SIZE 104
-DT_RPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-runpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-runpath-multi.so.txt
deleted file mode 100644
index 60342ccaf..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-runpath-multi.so.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 7640
-RO_SEG_FILE_SIZE 2092
-RO_SEG_MEM_SIZE 2092
-RW_SEG_FILE_SIZE 104
-RW_SEG_MEM_SIZE 104
-DT_RUNPATH /system/lib
-DT_RUNPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-runpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-runpath.so.txt
deleted file mode 100644
index b11506845..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest-runpath.so.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 7640
-RO_SEG_FILE_SIZE 2092
-RO_SEG_MEM_SIZE 2092
-RW_SEG_FILE_SIZE 104
-RW_SEG_MEM_SIZE 104
-DT_RUNPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest.so.txt
deleted file mode 100644
index 4f72c60cc..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/libtest.so.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 7640
-RO_SEG_FILE_SIZE 2060
-RO_SEG_MEM_SIZE 2060
-RW_SEG_FILE_SIZE 104
-RW_SEG_MEM_SIZE 104
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/main.out.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/main.out.txt
deleted file mode 100644
index 47cc08bd9..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/mips64/main.out.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_MIPS
-FILE_SIZE 9568
-RO_SEG_FILE_SIZE 3448
-RO_SEG_MEM_SIZE 3448
-RW_SEG_FILE_SIZE 216
-RW_SEG_MEM_SIZE 240
-DT_NEEDED libdl.so
-DT_NEEDED libc.so
-DT_NEEDED libstdc++.so
-EXP_SYMBOL _DYNAMIC_LINKING
-EXP_SYMBOL __FINI_ARRAY__
-EXP_SYMBOL __INIT_ARRAY__
-EXP_SYMBOL __PREINIT_ARRAY__
-EXP_SYMBOL __RLD_MAP
-EXP_SYMBOL __bss_end__
-EXP_SYMBOL __bss_start
-EXP_SYMBOL __end__
-EXP_SYMBOL _bss_end__
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL _fbss
-EXP_SYMBOL _fdata
-EXP_SYMBOL _ftext
-EXP_SYMBOL main
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __libc_init
-IMP_SYMBOL dlclose
-IMP_SYMBOL dlopen
-IMP_SYMBOL dlsym
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-rpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-rpath-multi.so.txt
deleted file mode 100644
index 540a228e3..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-rpath-multi.so.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_386
-FILE_SIZE 6212
-RO_SEG_FILE_SIZE 1364
-RO_SEG_MEM_SIZE 1364
-RW_SEG_FILE_SIZE 284
-RW_SEG_MEM_SIZE 284
-DT_RPATH /system/lib
-DT_RPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL __stack_chk_fail
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-rpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-rpath.so.txt
deleted file mode 100644
index 06b6bb6b6..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-rpath.so.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_386
-FILE_SIZE 6212
-RO_SEG_FILE_SIZE 1348
-RO_SEG_MEM_SIZE 1348
-RW_SEG_FILE_SIZE 284
-RW_SEG_MEM_SIZE 284
-DT_RPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL __stack_chk_fail
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-runpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-runpath-multi.so.txt
deleted file mode 100644
index c28510058..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-runpath-multi.so.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_386
-FILE_SIZE 6212
-RO_SEG_FILE_SIZE 1364
-RO_SEG_MEM_SIZE 1364
-RW_SEG_FILE_SIZE 284
-RW_SEG_MEM_SIZE 284
-DT_RUNPATH /system/lib
-DT_RUNPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL __stack_chk_fail
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-runpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-runpath.so.txt
deleted file mode 100644
index 560e82376..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest-runpath.so.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_386
-FILE_SIZE 6212
-RO_SEG_FILE_SIZE 1348
-RO_SEG_MEM_SIZE 1348
-RW_SEG_FILE_SIZE 284
-RW_SEG_MEM_SIZE 284
-DT_RUNPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL __stack_chk_fail
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest.so.txt
deleted file mode 100644
index 7df95ed84..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/libtest.so.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_386
-FILE_SIZE 6212
-RO_SEG_FILE_SIZE 1316
-RO_SEG_MEM_SIZE 1316
-RW_SEG_FILE_SIZE 276
-RW_SEG_MEM_SIZE 276
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL __stack_chk_fail
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/main.out.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/main.out.txt
deleted file mode 100644
index 4801fdd86..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86/main.out.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_386
-FILE_SIZE 6680
-RO_SEG_FILE_SIZE 1992
-RO_SEG_MEM_SIZE 1992
-RW_SEG_FILE_SIZE 288
-RW_SEG_MEM_SIZE 292
-DT_NEEDED libdl.so
-DT_NEEDED libc.so
-DT_NEEDED libstdc++.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __libc_init
-IMP_SYMBOL __stack_chk_fail
-IMP_SYMBOL dlclose
-IMP_SYMBOL dlopen
-IMP_SYMBOL dlsym
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-rpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-rpath-multi.so.txt
deleted file mode 100644
index da530fff3..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-rpath-multi.so.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_X86_64
-FILE_SIZE 6888
-RO_SEG_FILE_SIZE 1456
-RO_SEG_MEM_SIZE 1456
-RW_SEG_FILE_SIZE 560
-RW_SEG_MEM_SIZE 560
-DT_RPATH /system/lib
-DT_RPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-rpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-rpath.so.txt
deleted file mode 100644
index 34d986573..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-rpath.so.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_X86_64
-FILE_SIZE 6888
-RO_SEG_FILE_SIZE 1440
-RO_SEG_MEM_SIZE 1440
-RW_SEG_FILE_SIZE 560
-RW_SEG_MEM_SIZE 560
-DT_RPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-runpath-multi.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-runpath-multi.so.txt
deleted file mode 100644
index 8f1207808..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-runpath-multi.so.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_X86_64
-FILE_SIZE 6888
-RO_SEG_FILE_SIZE 1456
-RO_SEG_MEM_SIZE 1456
-RW_SEG_FILE_SIZE 560
-RW_SEG_MEM_SIZE 560
-DT_RUNPATH /system/lib
-DT_RUNPATH /vendor/lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-runpath.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-runpath.so.txt
deleted file mode 100644
index 47bc2fff8..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest-runpath.so.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_X86_64
-FILE_SIZE 6888
-RO_SEG_FILE_SIZE 1440
-RO_SEG_MEM_SIZE 1440
-RW_SEG_FILE_SIZE 560
-RW_SEG_MEM_SIZE 560
-DT_RUNPATH $ORIGIN/../lib
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest.so.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest.so.txt
deleted file mode 100644
index e7a2aaac6..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/libtest.so.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_X86_64
-FILE_SIZE 6888
-RO_SEG_FILE_SIZE 1424
-RO_SEG_MEM_SIZE 1424
-RW_SEG_FILE_SIZE 544
-RW_SEG_MEM_SIZE 544
-DT_NEEDED libc.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-EXP_SYMBOL test
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __cxa_finalize
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/main.out.txt b/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/main.out.txt
deleted file mode 100644
index a1c9466f2..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/expected/x86_64/main.out.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_X86_64
-FILE_SIZE 7584
-RO_SEG_FILE_SIZE 2248
-RO_SEG_MEM_SIZE 2248
-RW_SEG_FILE_SIZE 664
-RW_SEG_MEM_SIZE 672
-DT_NEEDED libdl.so
-DT_NEEDED libc.so
-DT_NEEDED libstdc++.so
-EXP_SYMBOL __bss_start
-EXP_SYMBOL _edata
-EXP_SYMBOL _end
-IMP_SYMBOL __cxa_atexit
-IMP_SYMBOL __libc_init
-IMP_SYMBOL dlclose
-IMP_SYMBOL dlopen
-IMP_SYMBOL dlsym
-IMP_SYMBOL puts
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/input/main.c b/vndk/tools/definition-tool/tests/testdata/test_elfdump/input/main.c
deleted file mode 100644
index ec98faa94..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/input/main.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include
-#include
-
-int main(int argc, char **argv) {
- if (argc < 2) {
- puts("usage: main.out libtest.so");
- return 1;
- }
-
- void *handle = dlopen(argv[1], RTLD_NOW);
- if (!handle) {
- puts("failed to open lib");
- return 1;
- }
-
- void (*test)(void) = dlsym(handle, "test");
- if (!test) {
- puts("failed to find test() function");
- } else {
- test();
- }
-
- dlclose(handle);
- return 0;
-}
diff --git a/vndk/tools/definition-tool/tests/testdata/test_elfdump/input/test.c b/vndk/tools/definition-tool/tests/testdata/test_elfdump/input/test.c
deleted file mode 100644
index 2a9b2702e..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_elfdump/input/test.c
+++ /dev/null
@@ -1,7 +0,0 @@
-extern void test();
-
-extern int puts(const char *);
-
-void test() {
- puts("hello world");
-}
diff --git a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib/libc.so.sym b/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib/libc.so.sym
deleted file mode 100644
index c53e302e2..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib/libc.so.sym
+++ /dev/null
@@ -1,7 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-EXP_SYMBOL fclose
-EXP_SYMBOL fopen
-EXP_SYMBOL fread
-EXP_SYMBOL fwrite
diff --git a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib/libm.so.sym b/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib/libm.so.sym
deleted file mode 100644
index 8133dfc4c..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib/libm.so.sym
+++ /dev/null
@@ -1,6 +0,0 @@
-EI_CLASS 32
-EI_DATA Little-Endian
-E_MACHINE EM_ARM
-EXP_SYMBOL cos
-EXP_SYMBOL sin
-EXP_SYMBOL tan
diff --git a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib64/libc.so.sym b/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib64/libc.so.sym
deleted file mode 100644
index 2b75d7bfc..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib64/libc.so.sym
+++ /dev/null
@@ -1,7 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-EXP_SYMBOL fclose
-EXP_SYMBOL fopen
-EXP_SYMBOL fread
-EXP_SYMBOL fwrite
diff --git a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib64/libm.so.sym b/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib64/libm.so.sym
deleted file mode 100644
index f9f3bcd9e..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_generic_refs/system/lib64/libm.so.sym
+++ /dev/null
@@ -1,6 +0,0 @@
-EI_CLASS 64
-EI_DATA Little-Endian
-E_MACHINE EM_AARCH64
-EXP_SYMBOL cos
-EXP_SYMBOL sin
-EXP_SYMBOL tan
diff --git a/vndk/tools/definition-tool/tests/testdata/test_module_info/module-info.json b/vndk/tools/definition-tool/tests/testdata/test_module_info/module-info.json
deleted file mode 100644
index 81db1d97b..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_module_info/module-info.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "libA": { "path": ["system/core/libA"], "installed": ["out/target/product/generic_arm64/system/lib64/libA.so"] },
- "libB": { "path": ["frameworks/base/libB"], "installed": ["out/target/product/generic_arm64/system/lib64/libB.so"] },
- "libC": { "path": ["frameworks/base/libC"], "installed": ["out/target/product/generic_arm64/system/lib64/libC.so", "out/target/product/generic_arm64/system/lib64/hw/libC.so"] }
-}
diff --git a/vndk/tools/definition-tool/tests/testdata/test_scandir/link_does_not_exist b/vndk/tools/definition-tool/tests/testdata/test_scandir/link_does_not_exist
deleted file mode 120000
index ee1f6cb7f..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_scandir/link_does_not_exist
+++ /dev/null
@@ -1 +0,0 @@
-does_not_exist
\ No newline at end of file
diff --git a/vndk/tools/definition-tool/tests/testdata/test_scandir/link_test_dir b/vndk/tools/definition-tool/tests/testdata/test_scandir/link_test_dir
deleted file mode 120000
index 431786635..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_scandir/link_test_dir
+++ /dev/null
@@ -1 +0,0 @@
-test_dir
\ No newline at end of file
diff --git a/vndk/tools/definition-tool/tests/testdata/test_scandir/link_test_file b/vndk/tools/definition-tool/tests/testdata/test_scandir/link_test_file
deleted file mode 120000
index e9b09f33e..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_scandir/link_test_file
+++ /dev/null
@@ -1 +0,0 @@
-test_file
\ No newline at end of file
diff --git a/vndk/tools/definition-tool/tests/testdata/test_scandir/test_dir/test_file b/vndk/tools/definition-tool/tests/testdata/test_scandir/test_dir/test_file
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_scandir/test_file b/vndk/tools/definition-tool/tests/testdata/test_scandir/test_file
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/system/lib/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/system/lib/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/system/lib/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/system/lib/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/vendor/lib/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/vendor/lib/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/vendor/lib/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_32/vendor/lib/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib/vndk-sp/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib/vndk-sp/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib/vndk/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib/vndk/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib64/vndk-sp/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib64/vndk-sp/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib64/vndk/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/system/lib64/vndk/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib/vndk-sp/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib/vndk-sp/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib/vndk/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib/vndk/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib64/vndk-sp/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib64/vndk-sp/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib64/vndk/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_unversioned/vendor/lib64/vndk/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib64/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib64/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib64/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/system/lib64/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib64/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib64/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib64/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned/vendor/lib64/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-29/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-29/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-sp-29/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib/vndk-sp-29/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-29/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-29/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-sp-29/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/system/lib64/vndk-sp-29/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/default.prop b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/default.prop
deleted file mode 100644
index abed6a832..000000000
--- a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/default.prop
+++ /dev/null
@@ -1 +0,0 @@
-ro.vndk.version=29
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-29/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-29/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-sp-29/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib/vndk-sp-29/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-28/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-28/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-29/libvndk.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-29/libvndk.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-sp-28/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-sp-28/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-sp-29/libvndk_sp.so b/vndk/tools/definition-tool/tests/testdata/test_vndk_lib_dir/vndk_versioned_multiple/vendor/lib64/vndk-sp-29/libvndk_sp.so
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vndk/tools/definition-tool/tests/utils.py b/vndk/tools/definition-tool/tests/utils.py
deleted file mode 100644
index 27812333a..000000000
--- a/vndk/tools/definition-tool/tests/utils.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-
-from vndk_definition_tool import (ELF, ELFLinker, PT_SYSTEM, PT_VENDOR)
-
-
-class GraphBuilder(object):
- _PARTITION_NAMES = {
- PT_SYSTEM: 'system',
- PT_VENDOR: 'vendor',
- }
-
-
- _LIB_DIRS = {
- ELF.ELFCLASS32: 'lib',
- ELF.ELFCLASS64: 'lib64',
- }
-
-
- def __init__(self):
- self.graph = ELFLinker()
-
-
- def add_lib(self, partition, klass, name, dt_needed=tuple(),
- exported_symbols=tuple(), imported_symbols=tuple(),
- extra_dir=None):
- """Create and add a shared library to ELFLinker."""
-
- lib_dir = os.path.join('/', self._PARTITION_NAMES[partition],
- self._LIB_DIRS[klass])
- if extra_dir:
- lib_dir = os.path.join(lib_dir, extra_dir)
-
- path = os.path.join(lib_dir, name + '.so')
-
- elf = ELF(klass, ELF.ELFDATA2LSB, dt_needed=dt_needed,
- exported_symbols=set(exported_symbols),
- imported_symbols=set(imported_symbols))
-
- lib = self.graph.add_lib(partition, path, elf)
- setattr(self, name + '_' + elf.elf_class_name, lib)
- return lib
-
-
- def add_lib32(self, partition, name, dt_needed=tuple(),
- exported_symbols=tuple(), imported_symbols=tuple(),
- extra_dir=None):
- return self.add_lib(partition, ELF.ELFCLASS32, name, dt_needed,
- exported_symbols, imported_symbols, extra_dir)
-
-
- def add_lib64(self, partition, name, dt_needed=tuple(),
- exported_symbols=tuple(), imported_symbols=tuple(),
- extra_dir=None):
- return self.add_lib(partition, ELF.ELFCLASS64, name, dt_needed,
- exported_symbols, imported_symbols, extra_dir)
-
-
- def add_multilib(self, partition, name, dt_needed=tuple(),
- exported_symbols=tuple(), imported_symbols=tuple(),
- extra_dir=None):
- """Add 32-bit / 64-bit shared libraries to ELFLinker."""
- return (
- self.add_lib(partition, ELF.ELFCLASS32, name, dt_needed,
- exported_symbols, imported_symbols, extra_dir),
- self.add_lib(partition, ELF.ELFCLASS64, name, dt_needed,
- exported_symbols, imported_symbols, extra_dir)
- )
-
-
- def resolve(self, vndk_lib_dirs=None, ro_vndk_version=None):
- if vndk_lib_dirs is not None:
- self.graph.vndk_lib_dirs = vndk_lib_dirs
- if ro_vndk_version is not None:
- self.graph.ro_vndk_version = ro_vndk_version
- self.graph.resolve_deps()
diff --git a/vndk/tools/definition-tool/tools/remove_dt_needed.py b/vndk/tools/definition-tool/tools/remove_dt_needed.py
deleted file mode 100755
index 4340ff2ea..000000000
--- a/vndk/tools/definition-tool/tools/remove_dt_needed.py
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import argparse
-import collections
-import struct
-import sys
-
-
-Elf_Hdr = collections.namedtuple(
- 'Elf_Hdr',
- 'ei_class ei_data ei_version ei_osabi e_type e_machine e_version '
- 'e_entry e_phoff e_shoff e_flags e_ehsize e_phentsize e_phnum '
- 'e_shentsize e_shnum e_shstridx')
-
-
-Elf_Shdr = collections.namedtuple(
- 'Elf_Shdr',
- 'sh_name sh_type sh_flags sh_addr sh_offset sh_size sh_link sh_info '
- 'sh_addralign sh_entsize')
-
-
-Elf_Dyn = collections.namedtuple('Elf_Dyn', 'd_tag d_val')
-
-
-class Elf_Sym(collections.namedtuple(
- 'ELF_Sym', 'st_name st_value st_size st_info st_other st_shndx')):
-
- STB_LOCAL = 0
- STB_GLOBAL = 1
- STB_WEAK = 2
-
- SHN_UNDEF = 0
-
- @property
- def st_bind(self):
- return (self.st_info >> 4)
-
- @property
- def is_local(self):
- return self.st_bind == Elf_Sym.STB_LOCAL
-
- @property
- def is_global(self):
- return self.st_bind == Elf_Sym.STB_GLOBAL
-
- @property
- def is_weak(self):
- return self.st_bind == Elf_Sym.STB_WEAK
-
- @property
- def is_undef(self):
- return self.st_shndx == Elf_Sym.SHN_UNDEF
-
-
-class ELFError(ValueError):
- pass
-
-
-# ELF file format constants.
-ELF_MAGIC = b'\x7fELF'
-
-EI_CLASS = 4
-EI_DATA = 5
-
-ELFCLASS32 = 1
-ELFCLASS64 = 2
-ELFDATA2LSB = 1
-ELFDATA2MSB = 2
-
-DT_NULL = 0
-DT_NEEDED = 1
-
-
-if sys.version_info >= (3, 0):
- def _extract_buf_byte(buf, offset):
- return buf[offset]
-else:
- def _extract_buf_byte(buf, offset):
- return ord(buf[offset])
-
-
-def _extract_zero_terminated_buf_slice(buf, offset):
- """Extract a zero-terminated buffer slice from the given offset"""
- end = offset
- try:
- while _extract_buf_byte(buf, end) != 0:
- end += 1
- except IndexError:
- pass
- return buf[offset:end]
-
-
-if sys.version_info >= (3, 0):
- def _extract_zero_terminated_str(buf, offset):
- buf_slice = _extract_zero_terminated_buf_slice(buf, offset)
- return buf_slice.decode('utf-8')
-else:
- def _extract_zero_terminated_str(buf, offset):
- return _extract_zero_terminated_buf_slice(buf, offset)
-
-
-def _replace_dt_needed_buf_internal(buf, dt_needed_name):
- # Check ELF ident.
- if len(buf) < 8:
- raise ELFError('bad ident')
-
- if buf[0:4] != ELF_MAGIC:
- raise ELFError('bad magic')
-
- ei_class = _extract_buf_byte(buf, EI_CLASS)
- if ei_class not in (ELFCLASS32, ELFCLASS64):
- raise ELFError('unknown word size')
- is_32bit = ei_class == ELFCLASS32
-
- ei_data = _extract_buf_byte(buf, EI_DATA)
- if ei_data not in (ELFDATA2LSB, ELFDATA2MSB):
- raise ELFError('unknown endianness')
-
- # ELF structure definitions.
- endian_fmt = '<' if ei_data == ELFDATA2LSB else '>'
-
- if is_32bit:
- elf_hdr_fmt = endian_fmt + '4x4B8xHHLLLLLHHHHHH'
- elf_shdr_fmt = endian_fmt + 'LLLLLLLLLL'
- elf_dyn_fmt = endian_fmt + 'lL'
- elf_sym_fmt = endian_fmt + 'LLLBBH'
- else:
- elf_hdr_fmt = endian_fmt + '4x4B8xHHLQQQLHHHHHH'
- elf_shdr_fmt = endian_fmt + 'LLQQQQLLQQ'
- elf_dyn_fmt = endian_fmt + 'QQ'
- elf_sym_fmt = endian_fmt + 'LBBHQQ'
-
- def parse_struct(cls, fmt, offset, error_msg):
- try:
- return cls._make(struct.unpack_from(fmt, buf, offset))
- except struct.error:
- raise ELFError(error_msg)
-
- def parse_elf_hdr(offset):
- return parse_struct(Elf_Hdr, elf_hdr_fmt, offset, 'bad elf header')
-
- def parse_elf_shdr(offset):
- return parse_struct(Elf_Shdr, elf_shdr_fmt, offset,
- 'bad section header')
-
- def parse_elf_dyn(offset):
- return parse_struct(Elf_Dyn, elf_dyn_fmt, offset, 'bad .dynamic entry')
-
- def extract_str(offset):
- return _extract_zero_terminated_str(buf, offset)
-
- # Parse ELF header.
- header = parse_elf_hdr(0)
-
- # Check section header size.
- if header.e_shentsize == 0:
- raise ELFError('no section header')
-
- # Find .shstrtab section.
- shstrtab_shdr_off = \
- header.e_shoff + header.e_shstridx * header.e_shentsize
- shstrtab_shdr = parse_elf_shdr(shstrtab_shdr_off)
- shstrtab_off = shstrtab_shdr.sh_offset
-
- # Parse ELF section header.
- sections = dict()
- header_end = header.e_shoff + header.e_shnum * header.e_shentsize
- for shdr_off in range(header.e_shoff, header_end, header.e_shentsize):
- shdr = parse_elf_shdr(shdr_off)
- name = extract_str(shstrtab_off + shdr.sh_name)
- sections[name] = shdr
-
- # Find .dynamic and .dynstr section header.
- dynamic_shdr = sections.get('.dynamic')
- if not dynamic_shdr:
- raise ELFError('no .dynamic section')
-
- dynstr_shdr = sections.get('.dynstr')
- if not dynstr_shdr:
- raise ELFError('no .dynstr section')
-
- dynamic_off = dynamic_shdr.sh_offset
- dynstr_off = dynstr_shdr.sh_offset
-
- # Find DT_NULL entry.
- ent_size = dynamic_shdr.sh_entsize
- assert struct.calcsize(elf_dyn_fmt) == ent_size
-
- if dynamic_shdr.sh_size < ent_size:
- raise ELFError('.dynamic section is empty')
-
- dynamic_end = dynamic_off + dynamic_shdr.sh_size
- dt_null_off = dynamic_end - ent_size
- if parse_elf_dyn(dt_null_off).d_tag != DT_NULL:
- raise ELFError('.dynamic section is not ended with DT_NULL')
- dt_null_ent = buf[dt_null_off:dt_null_off + ent_size]
-
- # Build result buffer which replaces matching DT_NEEDED entries.
- res = buf[0:dynamic_off]
- for ent_off in range(dynamic_off, dynamic_end, ent_size):
- ent = parse_elf_dyn(ent_off)
- if ent.d_tag != DT_NEEDED or \
- extract_str(dynstr_off + ent.d_val) != dt_needed_name:
- res += buf[ent_off:ent_off + ent_size]
- for ent_off in range(len(res), dynamic_end, ent_size):
- res += dt_null_ent
- res += buf[dynamic_end:]
- return res
-
-
-def replace_dt_needed_buf(buf, dt_needed_name):
- try:
- return _replace_dt_needed_buf_internal(buf, dt_needed_name)
- except IndexError:
- raise ELFError('bad offset')
-
-
-def replace_dt_needed(input_path, output_path, dt_needed_name):
- with open(input_path, 'rb') as f:
- buf = f.read()
-
- buf = replace_dt_needed_buf(buf, dt_needed_name)
-
- with open(output_path, 'wb') as f:
- f.write(buf)
-
-
-def main():
- parser = argparse.ArgumentParser(description='Remove DT_NEEDED entries')
- parser.add_argument('input', help='input ELF file')
- parser.add_argument('--output', '-o', required=True, help='output ELF file')
- parser.add_argument('--name', required=True, help='name')
- args = parser.parse_args()
-
- try:
- replace_dt_needed(args.input, args.output, args.name)
- return 0
- except (OSError, ELFError) as e:
- print('error:', e, file=sys.stderr)
-
- return 1
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/vndk/tools/definition-tool/tools/update_dataset.py b/vndk/tools/definition-tool/tools/update_dataset.py
deleted file mode 100755
index 98192c1ef..000000000
--- a/vndk/tools/definition-tool/tools/update_dataset.py
+++ /dev/null
@@ -1,244 +0,0 @@
-#!/usr/bin/env python3
-
-# This tool updates extracts the information from Android.bp and updates the
-# datasets for eligible VNDK libraries.
-
-import argparse
-import collections
-import csv
-import json
-import os.path
-import posixpath
-import re
-import sys
-
-def load_make_vars(path):
- result = collections.OrderedDict([
- ('SOONG_LLNDK_LIBRARIES', set()),
- ('SOONG_VNDK_SAMEPROCESS_LIBRARIES', set()),
- ('SOONG_VNDK_CORE_LIBRARIES', set()),
- ('SOONG_VNDK_PRIVATE_LIBRARIES', set()),
- ])
-
- assign_len = len(' := ')
-
- with open(path, 'r') as fp:
- for line in fp:
- for key, value in result.items():
- if line.startswith(key):
- mod_names = line[len(key) + assign_len:].strip().split(' ')
- value.update(mod_names)
-
- return result.values()
-
-def load_install_paths(module_info_path):
- with open(module_info_path, 'r') as fp:
- data = json.load(fp)
-
- result = set()
- name_path_dict = {}
- patt = re.compile(
- '.*[\\\\/]target[\\\\/]product[\\\\/][^\\\\/]+([\\\\/].*)$')
- for name, module in data.items():
- for path in module['installed']:
- match = patt.match(path)
- if not match:
- continue
- path = match.group(1)
- path = path.replace(os.path.sep, '/')
- path = path.replace('/lib/', '/${LIB}/')
- path = path.replace('/lib64/', '/${LIB}/')
- path = re.sub('/vndk-sp(?:-[^/$]*)/', '/vndk-sp${VNDK_VER}/', path)
- path = re.sub('/vndk(?:-[^/$]*)/', '/vndk${VNDK_VER}/', path)
- result.add(path)
-
- if name.endswith('_32'):
- name = name[0:-3]
-
- name_path_dict[name] = path
-
- return (result, name_path_dict)
-
-def _is_stale_module(path, installed_paths):
- if path in installed_paths:
- return False
- # libclang_rt.asan-${arch}-android and
- # libclang_rt.ubsan_standalone-${arch}-android may vary between different
- # architectures.
- if posixpath.basename(path).startswith('libclang_rt'):
- return False
- return True
-
-def remove_stale_modules(data, installed_paths):
- result = {}
- for path, row in data.items():
- if not _is_stale_module(path, installed_paths):
- result[path] = row
- return result
-
-def _parse_args():
- parser = argparse.ArgumentParser()
- parser.add_argument('tag_file')
- parser.add_argument('-o', '--output', required=True)
- parser.add_argument('--make-vars', required=True,
- help='out/soong/make_vars-$(TARGET).mk')
- parser.add_argument('--module-info', required=True,
- help='out/target/product/$(TARGET)/module-info.json')
- return parser.parse_args()
-
-def main():
- args = _parse_args()
-
- # Load libraries from `out/soong/make_vars-$(TARGET).mk`.
- llndk, vndk_sp, vndk, vndk_private = load_make_vars(args.make_vars)
-
- # Load eligible list csv file.
- with open(args.tag_file, 'r') as fp:
- reader = csv.reader(fp)
- header = next(reader)
- data = dict()
- regex_patterns = []
- for path, tag, comments in reader:
- if path.startswith('[regex]'):
- regex_patterns.append([path, tag, comments])
- else:
- data[path] = [path, tag, comments]
-
- # Delete non-existing libraries.
- installed_paths, name_path_dict = load_install_paths(args.module_info)
- data = remove_stale_modules(data, installed_paths)
-
- # Reset all /system/${LIB} libraries to FWK-ONLY.
- for path, row in data.items():
- if posixpath.dirname(path) == '/system/${LIB}':
- row[1] = 'FWK-ONLY'
-
- # Helper function to update the tag and the comments of an entry
- def update_tag(path, tag, comments=None):
- try:
- data[path][1] = tag
- if comments is not None:
- data[path][2] = comments
- except KeyError:
- data[path] = [path, tag, comments if comments is not None else '']
-
- # Helper function to find the subdir and the module name
- def get_subdir_and_name(name, name_path_dict, prefix_core, prefix_vendor):
- try:
- path = name_path_dict[name + '.vendor']
- assert path.startswith(prefix_vendor)
- name_vendor = path[len(prefix_vendor):]
- except KeyError:
- name_vendor = name + '.so'
-
- try:
- path = name_path_dict[name]
- assert path.startswith(prefix_core)
- name_core = path[len(prefix_core):]
- except KeyError:
- name_core = name + '.so'
-
- assert name_core == name_vendor
- return name_core
-
- # Update LL-NDK tags
- prefix_core = '/system/${LIB}/'
- for name in llndk:
- try:
- path = name_path_dict[name]
- assert path.startswith(prefix_core)
- name = path[len(prefix_core):]
- except KeyError:
- name = name + '.so'
- update_tag('/system/${LIB}/' + name, 'LL-NDK')
-
- # Update VNDK-SP and VNDK-SP-Private tags
- prefix_core = '/system/${LIB}/'
- prefix_vendor = '/system/${LIB}/vndk-sp${VNDK_VER}/'
-
- for name in (vndk_sp - vndk_private):
- name = get_subdir_and_name(name, name_path_dict, prefix_core,
- prefix_vendor)
- update_tag(prefix_core + name, 'VNDK-SP')
- update_tag(prefix_vendor + name, 'VNDK-SP')
-
- for name in (vndk_sp & vndk_private):
- name = get_subdir_and_name(name, name_path_dict, prefix_core,
- prefix_vendor)
- update_tag(prefix_core + name, 'VNDK-SP-Private')
- update_tag(prefix_vendor + name, 'VNDK-SP-Private')
-
- # Update VNDK and VNDK-Private tags
- prefix_core = '/system/${LIB}/'
- prefix_vendor = '/system/${LIB}/vndk${VNDK_VER}/'
-
- for name in (vndk - vndk_private):
- name = get_subdir_and_name(name, name_path_dict, prefix_core,
- prefix_vendor)
- update_tag(prefix_core + name, 'VNDK')
- update_tag(prefix_vendor + name, 'VNDK')
-
- for name in (vndk & vndk_private):
- name = get_subdir_and_name(name, name_path_dict, prefix_core,
- prefix_vendor)
- update_tag(prefix_core + name, 'VNDK-Private')
- update_tag(prefix_vendor + name, 'VNDK-Private')
-
- # Workaround for FWK-ONLY-RS
- libs = [
- 'libft2',
- 'libmediandk',
- ]
- for name in libs:
- update_tag('/system/${LIB}/' + name + '.so', 'FWK-ONLY-RS')
-
- # Workaround for LL-NDK APEX bionic
- libs = [
- 'libc',
- 'libdl',
- 'libm',
- ]
- for name in libs:
- update_tag('/apex/com.android.runtime/${LIB}/bionic/' + name + '.so',
- 'LL-NDK')
-
- # Workaround for LL-NDK-Private
- libs = [
- 'ld-android',
- 'libc_malloc_debug',
- 'libdl_android',
- 'libnetd_client',
- 'libtextclassifier_hash',
- ]
- for name in libs:
- update_tag('/system/${LIB}/' + name + '.so', 'LL-NDK-Private')
-
- # Workaround for libclang_rt.*.so
- lib_sets = {
- 'LL-NDK': llndk,
- 'VNDK': vndk,
- }
- prefixes = {
- 'libclang_rt.asan': 'LL-NDK',
- 'libclang_rt.hwasan': 'LL-NDK',
- 'libclang_rt.scudo': 'VNDK',
- 'libclang_rt.ubsan_standalone': 'VNDK',
- }
- for prefix, tag in prefixes.items():
- if any(name.startswith(prefix) for name in lib_sets[tag]):
- for path in list(data.keys()):
- if os.path.basename(path).startswith(prefix):
- update_tag(path, tag)
-
- # Merge regular expression patterns into final dataset
- for regex in regex_patterns:
- data[regex[0]] = regex
-
- # Write updated eligible list file
- with open(args.output, 'w') as fp:
- writer = csv.writer(fp, lineterminator='\n')
- writer.writerow(header)
- writer.writerows(sorted(data.values()))
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/vndk/tools/definition-tool/tools/update_dataset_auto.py b/vndk/tools/definition-tool/tools/update_dataset_auto.py
deleted file mode 100755
index 39504a7fb..000000000
--- a/vndk/tools/definition-tool/tools/update_dataset_auto.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env python3
-
-# This tool generates `eligible-list-${ver}.csv` and
-# `eligible-list-${ver}-properties.csv`.
-
-import argparse
-import os
-import subprocess
-import sys
-import tempfile
-
-UPDATE_DATASET = os.path.abspath(os.path.join(
- __file__, '..', 'update_dataset.py'))
-
-LIST_VNDK_MODULE = os.path.abspath(os.path.join(
- __file__, '..', '..', '..', 'sourcedr', 'blueprint', 'list_vndk_module.py'))
-
-
-def update_eligible_list(path, make_vars, module_info):
- dirname, basename = os.path.split(path)
- tmp_fd, tmp_path = tempfile.mkstemp(prefix=basename + '-', dir=dirname)
- os.close(tmp_fd)
-
- cmd = [sys.executable, UPDATE_DATASET]
- cmd.extend(['--make-vars', make_vars])
- cmd.extend(['--module-info', module_info])
- cmd.extend(['-o', tmp_path])
- cmd.append(path)
-
- print('command:', ' '.join(cmd))
-
- subprocess.check_call(cmd)
- os.rename(tmp_path, path)
-
-
-def update_eligible_list_properties(path, build_top):
- dirname, basename = os.path.split(path)
- tmp_fd, tmp_path = tempfile.mkstemp(prefix=basename + '-', dir=dirname)
- os.close(tmp_fd)
-
- cmd = [sys.executable, LIST_VNDK_MODULE]
- cmd.extend(['--exclude', '(?:device/)|(?:vendor/)'])
- cmd.extend(['--namespace', 'hardware/google/av'])
- cmd.extend(['--namespace', 'hardware/google/interfaces'])
- cmd.extend(['-o', tmp_path])
- cmd.append(os.path.join(build_top, 'Android.bp'))
-
- print('command:', ' '.join(cmd))
-
- subprocess.check_call(cmd)
- os.rename(tmp_path, path)
-
-
-def _get_eligible_list_properties_path(eligible_list_path):
- root, ext = os.path.splitext(eligible_list_path)
- return root + '-properties' + ext
-
-
-def _parse_args():
- parser = argparse.ArgumentParser()
- parser.add_argument('eligible_list',
- help='Path to eligible list to be updated')
- return parser.parse_args()
-
-
-def main():
- args = _parse_args()
-
- # Read Android product environment variables.
- try:
- build_top = os.environ['ANDROID_BUILD_TOP']
- product = os.environ['TARGET_PRODUCT']
- product_out = os.environ['ANDROID_PRODUCT_OUT']
- except KeyError as e:
- print('error: Failed to read the environment variable', e.args[0],
- file=sys.stderr)
- print('error: Did you lunch an Android target?', file=sys.stderr)
- sys.exit(1)
-
- print('----------------------------------------')
- print('build_top:', build_top)
- print('product:', product)
- print('product_out:', product_out)
-
- out_dir = os.path.normpath(os.path.join(product_out, '..', '..', '..'))
- make_vars = os.path.join(out_dir, 'soong', 'make_vars-' + product + '.mk')
- module_info = os.path.join(product_out, 'module-info.json')
-
- print('----------------------------------------')
- print('make_vars:', make_vars)
- print('module_info:', module_info)
- print('----------------------------------------')
-
- # Run the commands to update the files.
- update_eligible_list(args.eligible_list, make_vars, module_info)
- update_eligible_list_properties(
- _get_eligible_list_properties_path(args.eligible_list), build_top)
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/vndk/tools/definition-tool/vndk_definition_tool.py b/vndk/tools/definition-tool/vndk_definition_tool.py
deleted file mode 100755
index c0be45c07..000000000
--- a/vndk/tools/definition-tool/vndk_definition_tool.py
+++ /dev/null
@@ -1,4473 +0,0 @@
-#!/usr/bin/env python3
-
-from __future__ import print_function
-
-import argparse
-import codecs
-import collections
-import copy
-import csv
-import io
-import itertools
-import json
-import os
-import posixpath
-import re
-import shutil
-import stat
-import struct
-import subprocess
-import sys
-import zipfile
-
-
-#------------------------------------------------------------------------------
-# Python 2 and 3 Compatibility Layer
-#------------------------------------------------------------------------------
-
-if sys.version_info >= (3, 0):
- from os import makedirs
- from mmap import ACCESS_READ, mmap
-
- def get_py3_bytes(buf):
- return buf
-
- create_chr = chr
- enumerate_bytes = enumerate
-else:
- from mmap import ACCESS_READ, mmap
-
- def makedirs(path, exist_ok):
- if exist_ok and os.path.isdir(path):
- return
- os.makedirs(path)
-
- class mmap(mmap):
- def __enter__(self):
- return self
-
- def __exit__(self, exc, value, tb):
- self.close()
-
- def __getitem__(self, key):
- res = super(mmap, self).__getitem__(key)
- if isinstance(key, int):
- return ord(res)
- return res
-
- class Py3Bytes(bytes):
- def __getitem__(self, key):
- res = super(Py3Bytes, self).__getitem__(key)
- if isinstance(key, int):
- return ord(res)
- return Py3Bytes(res)
-
- def get_py3_bytes(buf):
- return Py3Bytes(buf)
-
- create_chr = unichr
-
- def enumerate_bytes(iterable):
- for i, byte in enumerate(iterable):
- yield (i, ord(byte))
-
- FileNotFoundError = EnvironmentError
-
-try:
- from sys import intern
-except ImportError:
- pass
-
-try:
- from tempfile import TemporaryDirectory
-except ImportError:
- import shutil
- import tempfile
-
- class TemporaryDirectory(object):
- def __init__(self, suffix='', prefix='tmp', dir=None):
- # pylint: disable=redefined-builtin
- self.name = tempfile.mkdtemp(suffix, prefix, dir)
-
- def __del__(self):
- self.cleanup()
-
- def __enter__(self):
- return self.name
-
- def __exit__(self, exc, value, tb):
- self.cleanup()
-
- def cleanup(self):
- if self.name:
- shutil.rmtree(self.name)
- self.name = None
-
-try:
- from os import scandir
-except ImportError:
- import stat
- import os
-
- class DirEntry(object):
- def __init__(self, name, path):
- self.name = name
- self.path = path
- self._stat = None
- self._lstat = None
-
- @staticmethod
- def _stat_impl(path, follow_symlinks):
- return os.stat(path) if follow_symlinks else os.lstat(path)
-
- def stat(self, follow_symlinks=True):
- attr = '_stat' if follow_symlinks else '_lstat'
- stat_res = getattr(self, attr)
- if stat_res is None:
- stat_res = self._stat_impl(self.path, follow_symlinks)
- setattr(self, attr, stat_res)
- return stat_res
-
- def is_dir(self, follow_symlinks=True):
- try:
- return stat.S_ISDIR(self.stat(follow_symlinks).st_mode)
- except EnvironmentError:
- return False
-
- def is_file(self, follow_symlinks=True):
- try:
- return stat.S_ISREG(self.stat(follow_symlinks).st_mode)
- except EnvironmentError:
- return False
-
- def is_symlink(self):
- return stat.S_ISLNK(self.stat(follow_symlinks=False).st_mode)
-
- def scandir(path):
- for name in os.listdir(path):
- yield DirEntry(name, os.path.join(path, name))
-
-
-#------------------------------------------------------------------------------
-# Print Function
-#------------------------------------------------------------------------------
-
-def print_sb(*args, **kwargs):
- """A print function that supports both str and bytes."""
- sep = kwargs.get('sep', ' ')
- end = kwargs.get('end', '\n')
- out_file = kwargs.get('file', sys.stdout)
- for i, arg in enumerate(args):
- if i > 0:
- out_file.write(sep)
- if isinstance(arg, str):
- out_file.write(arg)
- elif isinstance(arg, bytes):
- out_file.flush()
- out_file.buffer.write(arg)
- out_file.flush()
- else:
- out_file.write(str(arg))
- out_file.write(end)
-
-
-#------------------------------------------------------------------------------
-# Modified UTF-8 Encoder and Decoder
-#------------------------------------------------------------------------------
-
-class UnicodeSurrogateDecodeError(UnicodeDecodeError):
- pass
-
-
-def encode_mutf8(input, errors='strict'):
- i = 0
- res = io.BytesIO()
-
- for i, char in enumerate(input):
- code = ord(char)
- if code == 0x00:
- res.write(b'\xc0\x80')
- elif code < 0x80:
- res.write(bytearray((code,)))
- elif code < 0x800:
- res.write(bytearray((0xc0 | (code >> 6), 0x80 | (code & 0x3f))))
- elif code < 0x10000:
- res.write(bytearray((0xe0 | (code >> 12),
- 0x80 | ((code >> 6) & 0x3f),
- 0x80 | (code & 0x3f))))
- elif code < 0x110000:
- code -= 0x10000
- code_hi = 0xd800 + (code >> 10)
- code_lo = 0xdc00 + (code & 0x3ff)
- res.write(bytearray((0xe0 | (code_hi >> 12),
- 0x80 | ((code_hi >> 6) & 0x3f),
- 0x80 | (code_hi & 0x3f),
- 0xe0 | (code_lo >> 12),
- 0x80 | ((code_lo >> 6) & 0x3f),
- 0x80 | (code_lo & 0x3f))))
- else:
- raise UnicodeEncodeError('mutf-8', input, i, i + 1,
- 'illegal code point')
-
- return (res.getvalue(), i)
-
-
-def decode_mutf8(input, errors='strict'):
- res = io.StringIO()
-
- num_next = 0
-
- i = 0
- code = 0
- start = 0
-
- code_surrogate = None
- start_surrogate = None
-
- def raise_error(start, reason):
- raise UnicodeDecodeError('mutf-8', input, start, i + 1, reason)
-
- def raise_surrogate_error(start, reason):
- raise UnicodeSurrogateDecodeError(
- 'mutf-8', input, start, i + 1, reason)
-
- for i, byte in enumerate_bytes(input):
- if (byte & 0x80) == 0x00:
- if num_next > 0:
- raise_error(start, 'invalid continuation byte')
- num_next = 0
- code = byte
- start = i
- elif (byte & 0xc0) == 0x80:
- if num_next < 1:
- raise_error(start, 'invalid start byte')
- num_next -= 1
- code = (code << 6) | (byte & 0x3f)
- elif (byte & 0xe0) == 0xc0:
- if num_next > 0:
- raise_error(start, 'invalid continuation byte')
- num_next = 1
- code = byte & 0x1f
- start = i
- elif (byte & 0xf0) == 0xe0:
- if num_next > 0:
- raise_error(start, 'invalid continuation byte')
- num_next = 2
- code = byte & 0x0f
- start = i
- else:
- raise_error(i, 'invalid start byte')
-
- if num_next == 0:
- if 0xd800 <= code <= 0xdbff: # High surrogate
- if code_surrogate is not None:
- raise_surrogate_error(
- start_surrogate, 'invalid high surrogate')
- code_surrogate = code
- start_surrogate = start
- continue
-
- if 0xdc00 <= code <= 0xdfff: # Low surrogate
- if code_surrogate is None:
- raise_surrogate_error(start, 'invalid low surrogate')
- code = (((code_surrogate & 0x3f) << 10) |
- (code & 0x3f) + 0x10000)
- code_surrogate = None
- start_surrogate = None
- elif code_surrogate is not None:
- if errors == 'ignore':
- res.write(create_chr(code_surrogate))
- code_surrogate = None
- start_surrogate = None
- else:
- raise_surrogate_error(start_surrogate, 'illegal surrogate')
-
- res.write(create_chr(code))
-
- # Check the unexpected end of input
- if num_next > 0:
- raise_error(start, 'unexpected end')
- if code_surrogate is not None:
- raise_surrogate_error(start_surrogate, 'unexpected end')
-
- return (res.getvalue(), i)
-
-
-def probe_mutf8(name):
- if name == 'mutf-8':
- return codecs.CodecInfo(encode_mutf8, decode_mutf8)
- return None
-
-codecs.register(probe_mutf8)
-
-
-#------------------------------------------------------------------------------
-# Collections
-#------------------------------------------------------------------------------
-
-def defaultnamedtuple(typename, field_names, default):
- """Create a namedtuple type with default values.
-
- This function creates a namedtuple type which will fill in default value
- when actual arguments to the constructor were omitted.
-
- >>> Point = defaultnamedtuple('Point', ['x', 'y'], 0)
- >>> Point()
- Point(x=0, y=0)
- >>> Point(1)
- Point(x=1, y=0)
- >>> Point(1, 2)
- Point(x=1, y=2)
- >>> Point(x=1, y=2)
- Point(x=1, y=2)
- >>> Point(y=2, x=1)
- Point(x=1, y=2)
-
- >>> PermSet = defaultnamedtuple('PermSet', 'allowed disallowed', set())
- >>> s = PermSet()
- >>> s
- PermSet(allowed=set(), disallowed=set())
- >>> s.allowed is not s.disallowed
- True
- >>> PermSet({1})
- PermSet(allowed={1}, disallowed=set())
- >>> PermSet({1}, {2})
- PermSet(allowed={1}, disallowed={2})
- """
-
- if isinstance(field_names, str):
- field_names = field_names.replace(',', ' ').split()
- field_names = list(map(str, field_names))
- num_fields = len(field_names)
-
- base_cls = collections.namedtuple(typename, field_names)
- def __new__(cls, *args, **kwargs):
- args = list(args)
- for i in range(len(args), num_fields):
- arg = kwargs.get(field_names[i])
- if arg:
- args.append(arg)
- else:
- args.append(copy.copy(default))
- return base_cls.__new__(cls, *args)
- return type(typename, (base_cls,), {'__new__': __new__})
-
-
-def create_struct(name, fields):
- """Create a namedtuple with unpack_from() function.
- >>> Point = create_struct('Point', [('x', 'I'), ('y', 'I')])
- >>> pt = Point.unpack_from(b'\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00', 0)
- >>> pt.x
- 0
- >>> pt.y
- 1
- """
- field_names = [name for name, ty in fields]
- cls = collections.namedtuple(name, field_names)
- cls.struct_fmt = ''.join(ty for name, ty in fields)
- cls.struct_size = struct.calcsize(cls.struct_fmt)
- def unpack_from(cls, buf, offset=0):
- unpacked = struct.unpack_from(cls.struct_fmt, buf, offset)
- return cls.__new__(cls, *unpacked)
- cls.unpack_from = classmethod(unpack_from)
- return cls
-
-
-#------------------------------------------------------------------------------
-# ELF Parser
-#------------------------------------------------------------------------------
-
-Elf_Hdr = collections.namedtuple(
- 'Elf_Hdr',
- 'ei_class ei_data ei_version ei_osabi e_type e_machine e_version '
- 'e_entry e_phoff e_shoff e_flags e_ehsize e_phentsize e_phnum '
- 'e_shentsize e_shnum e_shstridx')
-
-
-Elf_Shdr = collections.namedtuple(
- 'Elf_Shdr',
- 'sh_name sh_type sh_flags sh_addr sh_offset sh_size sh_link sh_info '
- 'sh_addralign sh_entsize')
-
-
-Elf_Phdr = collections.namedtuple(
- 'Elf_Phdr',
- 'p_type p_offset p_vaddr p_paddr p_filesz p_memsz p_flags p_align')
-
-
-Elf_Dyn = collections.namedtuple('Elf_Dyn', 'd_tag d_val')
-
-
-class Elf_Sym(collections.namedtuple(
- 'ELF_Sym', 'st_name st_value st_size st_info st_other st_shndx')):
-
- STB_LOCAL = 0
- STB_GLOBAL = 1
- STB_WEAK = 2
-
- SHN_UNDEF = 0
-
-
- @property
- def st_bind(self):
- return self.st_info >> 4
-
-
- @property
- def is_local(self):
- return self.st_bind == Elf_Sym.STB_LOCAL
-
-
- @property
- def is_global(self):
- return self.st_bind == Elf_Sym.STB_GLOBAL
-
-
- @property
- def is_weak(self):
- return self.st_bind == Elf_Sym.STB_WEAK
-
-
- @property
- def is_undef(self):
- return self.st_shndx == Elf_Sym.SHN_UNDEF
-
-
-class ELFError(ValueError):
- pass
-
-
-class ELF(object):
- # ELF file format constants.
- ELF_MAGIC = b'\x7fELF'
-
- EI_CLASS = 4
- EI_DATA = 5
-
- ELFCLASSNONE = 0
- ELFCLASS32 = 1
- ELFCLASS64 = 2
-
- ELFDATANONE = 0
- ELFDATA2LSB = 1
- ELFDATA2MSB = 2
-
- PT_LOAD = 1
-
- PF_X = 1
- PF_W = 2
- PF_R = 4
-
- DT_NEEDED = 1
- DT_RPATH = 15
- DT_RUNPATH = 29
-
- _ELF_CLASS_NAMES = {
- ELFCLASS32: '32',
- ELFCLASS64: '64',
- }
-
- _ELF_DATA_NAMES = {
- ELFDATA2LSB: 'Little-Endian',
- ELFDATA2MSB: 'Big-Endian',
- }
-
- EM_NONE = 0
- EM_386 = 3
- EM_MIPS = 8
- EM_ARM = 40
- EM_X86_64 = 62
- EM_AARCH64 = 183
-
-
- def _create_elf_machines(d):
- elf_machine_ids = {}
- for key, value in d.items():
- if key.startswith('EM_'):
- elf_machine_ids[value] = key
- return elf_machine_ids
-
- ELF_MACHINES = _create_elf_machines(locals())
-
- del _create_elf_machines
-
-
- @staticmethod
- def _dict_find_key_by_value(d, dst):
- for key, value in d.items():
- if value == dst:
- return key
- raise KeyError(dst)
-
-
- @staticmethod
- def get_ei_class_from_name(name):
- return ELF._dict_find_key_by_value(ELF._ELF_CLASS_NAMES, name)
-
-
- @staticmethod
- def get_ei_data_from_name(name):
- return ELF._dict_find_key_by_value(ELF._ELF_DATA_NAMES, name)
-
-
- @staticmethod
- def get_e_machine_from_name(name):
- return ELF._dict_find_key_by_value(ELF.ELF_MACHINES, name)
-
-
- __slots__ = ('ei_class', 'ei_data', 'e_machine', 'dt_rpath', 'dt_runpath',
- 'dt_needed', 'exported_symbols', 'imported_symbols',
- 'file_size', 'ro_seg_file_size', 'ro_seg_mem_size',
- 'rw_seg_file_size', 'rw_seg_mem_size',)
-
-
- def __init__(self, ei_class=ELFCLASSNONE, ei_data=ELFDATANONE, e_machine=0,
- dt_rpath=None, dt_runpath=None, dt_needed=None,
- exported_symbols=None, imported_symbols=None,
- file_size=0, ro_seg_file_size=0, ro_seg_mem_size=0,
- rw_seg_file_size=0, rw_seg_mem_size=0):
- self.ei_class = ei_class
- self.ei_data = ei_data
- self.e_machine = e_machine
- self.dt_rpath = dt_rpath if dt_rpath is not None else []
- self.dt_runpath = dt_runpath if dt_runpath is not None else []
- self.dt_needed = dt_needed if dt_needed is not None else []
- self.exported_symbols = \
- exported_symbols if exported_symbols is not None else set()
- self.imported_symbols = \
- imported_symbols if imported_symbols is not None else set()
- self.file_size = file_size
- self.ro_seg_file_size = ro_seg_file_size
- self.ro_seg_mem_size = ro_seg_mem_size
- self.rw_seg_file_size = rw_seg_file_size
- self.rw_seg_mem_size = rw_seg_mem_size
-
-
- def __repr__(self):
- args = (a + '=' + repr(getattr(self, a)) for a in self.__slots__)
- return 'ELF(' + ', '.join(args) + ')'
-
-
- def __eq__(self, rhs):
- return all(getattr(self, a) == getattr(rhs, a) for a in self.__slots__)
-
-
- @property
- def elf_class_name(self):
- return self._ELF_CLASS_NAMES.get(self.ei_class, 'None')
-
-
- @property
- def elf_data_name(self):
- return self._ELF_DATA_NAMES.get(self.ei_data, 'None')
-
-
- @property
- def elf_machine_name(self):
- return self.ELF_MACHINES.get(self.e_machine, str(self.e_machine))
-
-
- @property
- def is_32bit(self):
- return self.ei_class == ELF.ELFCLASS32
-
-
- @property
- def is_64bit(self):
- return self.ei_class == ELF.ELFCLASS64
-
-
- @property
- def sorted_exported_symbols(self):
- return sorted(list(self.exported_symbols))
-
-
- @property
- def sorted_imported_symbols(self):
- return sorted(list(self.imported_symbols))
-
-
- def dump(self, file=None):
- """Print parsed ELF information to the file"""
- file = file if file is not None else sys.stdout
-
- print('EI_CLASS\t' + self.elf_class_name, file=file)
- print('EI_DATA\t\t' + self.elf_data_name, file=file)
- print('E_MACHINE\t' + self.elf_machine_name, file=file)
- print('FILE_SIZE\t' + str(self.file_size), file=file)
- print('RO_SEG_FILE_SIZE\t' + str(self.ro_seg_file_size), file=file)
- print('RO_SEG_MEM_SIZE\t' + str(self.ro_seg_mem_size), file=file)
- print('RW_SEG_FILE_SIZE\t' + str(self.rw_seg_file_size), file=file)
- print('RW_SEG_MEM_SIZE\t' + str(self.rw_seg_mem_size), file=file)
- for dt_rpath in self.dt_rpath:
- print('DT_RPATH\t' + dt_rpath, file=file)
- for dt_runpath in self.dt_runpath:
- print('DT_RUNPATH\t' + dt_runpath, file=file)
- for dt_needed in self.dt_needed:
- print('DT_NEEDED\t' + dt_needed, file=file)
- for symbol in self.sorted_exported_symbols:
- print('EXP_SYMBOL\t' + symbol, file=file)
- for symbol in self.sorted_imported_symbols:
- print('IMP_SYMBOL\t' + symbol, file=file)
-
-
- # Extract zero-terminated buffer slice.
- def _extract_zero_terminated_buf_slice(self, buf, offset):
- """Extract a zero-terminated buffer slice from the given offset"""
- end = buf.find(b'\0', offset)
- if end == -1:
- return buf[offset:]
- return buf[offset:end]
-
-
- # Extract c-style interned string from the buffer.
- if sys.version_info >= (3, 0):
- def _extract_zero_terminated_str(self, buf, offset):
- """Extract a c-style string from the given buffer and offset"""
- buf_slice = self._extract_zero_terminated_buf_slice(buf, offset)
- return intern(buf_slice.decode('utf-8'))
- else:
- def _extract_zero_terminated_str(self, buf, offset):
- """Extract a c-style string from the given buffer and offset"""
- return intern(self._extract_zero_terminated_buf_slice(buf, offset))
-
-
- def _parse_from_buf_internal(self, buf):
- """Parse ELF image resides in the buffer"""
-
- # Check ELF ident.
- if len(buf) < 8:
- raise ELFError('bad ident')
-
- if buf[0:4] != ELF.ELF_MAGIC:
- raise ELFError('bad magic')
-
- self.ei_class = buf[ELF.EI_CLASS]
- if self.ei_class not in (ELF.ELFCLASS32, ELF.ELFCLASS64):
- raise ELFError('unknown word size')
-
- self.ei_data = buf[ELF.EI_DATA]
- if self.ei_data not in (ELF.ELFDATA2LSB, ELF.ELFDATA2MSB):
- raise ELFError('unknown endianness')
-
- self.file_size = len(buf)
-
- # ELF structure definitions.
- endian_fmt = '<' if self.ei_data == ELF.ELFDATA2LSB else '>'
-
- if self.is_32bit:
- elf_hdr_fmt = endian_fmt + '4x4B8xHHLLLLLHHHHHH'
- elf_shdr_fmt = endian_fmt + 'LLLLLLLLLL'
- elf_phdr_fmt = endian_fmt + 'LLLLLLLL'
- elf_dyn_fmt = endian_fmt + 'lL'
- elf_sym_fmt = endian_fmt + 'LLLBBH'
- else:
- elf_hdr_fmt = endian_fmt + '4x4B8xHHLQQQLHHHHHH'
- elf_shdr_fmt = endian_fmt + 'LLQQQQLLQQ'
- elf_phdr_fmt = endian_fmt + 'LLQQQQQQ'
- elf_dyn_fmt = endian_fmt + 'QQ'
- elf_sym_fmt = endian_fmt + 'LBBHQQ'
-
- def parse_struct(cls, fmt, offset, error_msg):
- try:
- return cls._make(struct.unpack_from(fmt, buf, offset))
- except struct.error:
- raise ELFError(error_msg)
-
- def parse_elf_hdr(offset):
- return parse_struct(Elf_Hdr, elf_hdr_fmt, offset, 'bad elf header')
-
- def parse_elf_shdr(offset):
- return parse_struct(Elf_Shdr, elf_shdr_fmt, offset,
- 'bad section header')
-
- if self.is_32bit:
- def parse_elf_phdr(offset):
- return parse_struct(Elf_Phdr, elf_phdr_fmt, offset,
- 'bad program header')
- else:
- def parse_elf_phdr(offset):
- try:
- p = struct.unpack_from(elf_phdr_fmt, buf, offset)
- return Elf_Phdr(p[0], p[2], p[3], p[4], p[5], p[6], p[1],
- p[7])
- except struct.error:
- raise ELFError('bad program header')
-
- def parse_elf_dyn(offset):
- return parse_struct(Elf_Dyn, elf_dyn_fmt, offset,
- 'bad .dynamic entry')
-
- if self.is_32bit:
- def parse_elf_sym(offset):
- return parse_struct(
- Elf_Sym, elf_sym_fmt, offset, 'bad elf sym')
- else:
- def parse_elf_sym(offset):
- try:
- p = struct.unpack_from(elf_sym_fmt, buf, offset)
- return Elf_Sym(p[0], p[4], p[5], p[1], p[2], p[3])
- except struct.error:
- raise ELFError('bad elf sym')
-
- def extract_str(offset):
- return self._extract_zero_terminated_str(buf, offset)
-
- # Parse ELF header.
- header = parse_elf_hdr(0)
- self.e_machine = header.e_machine
-
- # Parse ELF program header and calculate segment size.
- if header.e_phentsize == 0:
- raise ELFError('no program header')
-
- ro_seg_file_size = 0
- ro_seg_mem_size = 0
- rw_seg_file_size = 0
- rw_seg_mem_size = 0
-
- assert struct.calcsize(elf_phdr_fmt) == header.e_phentsize
- seg_end = header.e_phoff + header.e_phnum * header.e_phentsize
- for phdr_off in range(header.e_phoff, seg_end, header.e_phentsize):
- phdr = parse_elf_phdr(phdr_off)
- if phdr.p_type != ELF.PT_LOAD:
- continue
- if phdr.p_flags & ELF.PF_W:
- rw_seg_file_size += phdr.p_filesz
- rw_seg_mem_size += phdr.p_memsz
- else:
- ro_seg_file_size += phdr.p_filesz
- ro_seg_mem_size += phdr.p_memsz
-
- self.ro_seg_file_size = ro_seg_file_size
- self.ro_seg_mem_size = ro_seg_mem_size
- self.rw_seg_file_size = rw_seg_file_size
- self.rw_seg_mem_size = rw_seg_mem_size
-
- # Check section header size.
- if header.e_shentsize == 0:
- raise ELFError('no section header')
-
- # Find .shstrtab section.
- shstrtab_shdr_off = \
- header.e_shoff + header.e_shstridx * header.e_shentsize
- shstrtab_shdr = parse_elf_shdr(shstrtab_shdr_off)
- shstrtab_off = shstrtab_shdr.sh_offset
-
- # Parse ELF section header.
- sections = dict()
- header_end = header.e_shoff + header.e_shnum * header.e_shentsize
- for shdr_off in range(header.e_shoff, header_end, header.e_shentsize):
- shdr = parse_elf_shdr(shdr_off)
- name = extract_str(shstrtab_off + shdr.sh_name)
- sections[name] = shdr
-
- # Find .dynamic and .dynstr section header.
- dynamic_shdr = sections.get('.dynamic')
- if not dynamic_shdr:
- raise ELFError('no .dynamic section')
-
- dynstr_shdr = sections.get('.dynstr')
- if not dynstr_shdr:
- raise ELFError('no .dynstr section')
-
- dynamic_off = dynamic_shdr.sh_offset
- dynstr_off = dynstr_shdr.sh_offset
-
- # Parse entries in .dynamic section.
- assert struct.calcsize(elf_dyn_fmt) == dynamic_shdr.sh_entsize
- dynamic_end = dynamic_off + dynamic_shdr.sh_size
- for ent_off in range(
- dynamic_off, dynamic_end, dynamic_shdr.sh_entsize):
- ent = parse_elf_dyn(ent_off)
- if ent.d_tag == ELF.DT_NEEDED:
- self.dt_needed.append(extract_str(dynstr_off + ent.d_val))
- elif ent.d_tag == ELF.DT_RPATH:
- self.dt_rpath.extend(
- extract_str(dynstr_off + ent.d_val).split(':'))
- elif ent.d_tag == ELF.DT_RUNPATH:
- self.dt_runpath.extend(
- extract_str(dynstr_off + ent.d_val).split(':'))
-
- # Parse exported symbols in .dynsym section.
- dynsym_shdr = sections.get('.dynsym')
- if dynsym_shdr:
- exp_symbols = self.exported_symbols
- imp_symbols = self.imported_symbols
-
- dynsym_off = dynsym_shdr.sh_offset
- dynsym_end = dynsym_off + dynsym_shdr.sh_size
- dynsym_entsize = dynsym_shdr.sh_entsize
-
- # Skip first symbol entry (null symbol).
- dynsym_off += dynsym_entsize
-
- for ent_off in range(dynsym_off, dynsym_end, dynsym_entsize):
- ent = parse_elf_sym(ent_off)
- symbol_name = extract_str(dynstr_off + ent.st_name)
- if ent.is_undef:
- imp_symbols.add(symbol_name)
- elif not ent.is_local:
- exp_symbols.add(symbol_name)
-
-
- def _parse_from_buf(self, buf):
- """Parse ELF image resides in the buffer"""
- try:
- self._parse_from_buf_internal(buf)
- except IndexError:
- raise ELFError('bad offset')
-
-
- def _parse_from_file(self, path):
- """Parse ELF image from the file path"""
- with open(path, 'rb') as f:
- st = os.fstat(f.fileno())
- if not st.st_size:
- raise ELFError('empty file')
- with mmap(f.fileno(), st.st_size, access=ACCESS_READ) as image:
- self._parse_from_buf(image)
-
-
- def _parse_from_dump_lines(self, path, lines):
- patt = re.compile('^([A-Za-z_]+)\t+(.*)$')
- for line_no, line in enumerate(lines):
- match = patt.match(line)
- if not match:
- print('error: {}: {}: Failed to parse'
- .format(path, line_no + 1), file=sys.stderr)
- continue
- key = match.group(1)
- value = match.group(2)
-
- if key == 'EI_CLASS':
- self.ei_class = ELF.get_ei_class_from_name(value)
- elif key == 'EI_DATA':
- self.ei_data = ELF.get_ei_data_from_name(value)
- elif key == 'E_MACHINE':
- self.e_machine = ELF.get_e_machine_from_name(value)
- elif key == 'FILE_SIZE':
- self.file_size = int(value)
- elif key == 'RO_SEG_FILE_SIZE':
- self.ro_seg_file_size = int(value)
- elif key == 'RO_SEG_MEM_SIZE':
- self.ro_seg_mem_size = int(value)
- elif key == 'RW_SEG_FILE_SIZE':
- self.rw_seg_file_size = int(value)
- elif key == 'RW_SEG_MEM_SIZE':
- self.rw_seg_mem_size = int(value)
- elif key == 'DT_RPATH':
- self.dt_rpath.append(intern(value))
- elif key == 'DT_RUNPATH':
- self.dt_runpath.append(intern(value))
- elif key == 'DT_NEEDED':
- self.dt_needed.append(intern(value))
- elif key == 'EXP_SYMBOL':
- self.exported_symbols.add(intern(value))
- elif key == 'IMP_SYMBOL':
- self.imported_symbols.add(intern(value))
- else:
- print('error: {}: {}: unknown tag name: {}'
- .format(path, line_no + 1, key), file=sys.stderr)
-
-
- def _parse_from_dump_file(self, path):
- """Load information from ELF dump file."""
- with open(path, 'r') as f:
- self._parse_from_dump_lines(path, f)
-
-
- def _parse_from_dump_buf(self, buf):
- """Load information from ELF dump buffer."""
- self._parse_from_dump_lines(''.format(id(buf)),
- buf.splitlines())
-
-
- @staticmethod
- def load(path):
- """Create an ELF instance from the file path"""
- elf = ELF()
- elf._parse_from_file(path)
- return elf
-
-
- @staticmethod
- def loads(buf):
- """Create an ELF instance from the buffer"""
- elf = ELF()
- elf._parse_from_buf(buf)
- return elf
-
-
- @staticmethod
- def load_dump(path):
- """Create an ELF instance from a dump file path"""
- elf = ELF()
- elf._parse_from_dump_file(path)
- return elf
-
-
- @staticmethod
- def load_dumps(buf):
- """Create an ELF instance from a dump file buffer"""
- elf = ELF()
- elf._parse_from_dump_buf(buf)
- return elf
-
-
- def is_jni_lib(self):
- """Test whether the ELF file looks like a JNI library."""
- for name in ['libnativehelper.so', 'libandroid_runtime.so']:
- if name in self.dt_needed:
- return True
- for symbol in itertools.chain(self.imported_symbols,
- self.exported_symbols):
- if symbol.startswith('JNI_') or symbol.startswith('Java_') or \
- symbol == 'jniRegisterNativeMethods':
- return True
- return False
-
-
-#------------------------------------------------------------------------------
-# APK / Dex File Reader
-#------------------------------------------------------------------------------
-
-class DexFileReader(object):
- @classmethod
- def extract_dex_string(cls, buf, offset=0):
- end = buf.find(b'\0', offset)
- return buf[offset:] if end == -1 else buf[offset:end]
-
-
- @classmethod
- def extract_uleb128(cls, buf, offset=0):
- num_bytes = 0
- result = 0
- shift = 0
- while True:
- byte = buf[offset + num_bytes]
- result |= (byte & 0x7f) << shift
- num_bytes += 1
- if (byte & 0x80) == 0:
- break
- shift += 7
- return (result, num_bytes)
-
-
- Header = create_struct('Header', (
- ('magic', '4s'),
- ('version', '4s'),
- ('checksum', 'I'),
- ('signature', '20s'),
- ('file_size', 'I'),
- ('header_size', 'I'),
- ('endian_tag', 'I'),
- ('link_size', 'I'),
- ('link_off', 'I'),
- ('map_off', 'I'),
- ('string_ids_size', 'I'),
- ('string_ids_off', 'I'),
- ('type_ids_size', 'I'),
- ('type_ids_off', 'I'),
- ('proto_ids_size', 'I'),
- ('proto_ids_off', 'I'),
- ('field_ids_size', 'I'),
- ('field_ids_off', 'I'),
- ('method_ids_size', 'I'),
- ('method_ids_off', 'I'),
- ('class_defs_size', 'I'),
- ('class_defs_off', 'I'),
- ('data_size', 'I'),
- ('data_off', 'I'),
- ))
-
-
- StringId = create_struct('StringId', (
- ('string_data_off', 'I'),
- ))
-
-
- @staticmethod
- def generate_classes_dex_names():
- yield 'classes.dex'
- for i in itertools.count(start=2):
- yield 'classes{}.dex'.format(i)
-
-
- @classmethod
- def enumerate_dex_strings_buf(cls, buf, offset=0, data_offset=None):
- buf = get_py3_bytes(buf)
- header = cls.Header.unpack_from(buf, offset=offset)
-
- if data_offset is None:
- if header.magic == b'dex\n':
- # In the standard dex file, the data_offset is the offset of
- # the dex header.
- data_offset = offset
- else:
- # In the compact dex file, the data_offset is sum of the offset
- # of the dex header and header.data_off.
- data_offset = offset + header.data_off
-
- StringId = cls.StringId
- struct_size = StringId.struct_size
-
- offset_start = offset + header.string_ids_off
- offset_end = offset_start + header.string_ids_size * struct_size
-
- for offset in range(offset_start, offset_end, struct_size):
- offset = StringId.unpack_from(buf, offset).string_data_off
- offset += data_offset
-
- # Skip the ULEB128 integer for UTF-16 string length
- offset += cls.extract_uleb128(buf, offset)[1]
-
- # Extract the string
- yield cls.extract_dex_string(buf, offset)
-
-
- @classmethod
- def enumerate_dex_strings_apk(cls, apk_file_path):
- with zipfile.ZipFile(apk_file_path, 'r') as zip_file:
- for name in cls.generate_classes_dex_names():
- try:
- with zip_file.open(name) as dex_file:
- dex_file_content = dex_file.read()
- for s in cls.enumerate_dex_strings_buf(dex_file_content):
- yield s
- except KeyError:
- break
-
-
- @classmethod
- def is_vdex_file(cls, vdex_file_path):
- return vdex_file_path.endswith('.vdex')
-
-
- # VdexHeader 0
- VdexHeader0 = create_struct('VdexHeader0', (
- ('magic', '4s'),
- ('vdex_version', '4s'),
- ))
-
-
- # VdexHeader 1 - 15
- VdexHeader1 = create_struct('VdexHeader1', (
- ('magic', '4s'),
- ('vdex_version', '4s'),
- ('number_of_dex_files', 'I'),
- ('dex_size', 'I'),
- ('verifier_deps_size', 'I'),
- ('quickening_info_size', 'I'),
- # checksums
- ))
-
-
- # VdexHeader 16 - 18
- VdexHeader16 = create_struct('VdexHeader16', (
- ('magic', '4s'),
- ('vdex_version', '4s'),
- ('number_of_dex_files', 'I'),
- ('dex_size', 'I'),
- ('dex_shared_data_size', 'I'),
- ('verifier_deps_size', 'I'),
- ('quickening_info_size', 'I'),
- # checksums
- ))
-
-
- # VdexHeader 19
- VdexHeader19 = create_struct('VdexHeader19', (
- ('magic', '4s'),
- ('vdex_version', '4s'),
- ('dex_section_version', '4s'),
- ('number_of_dex_files', 'I'),
- ('verifier_deps_size', 'I'),
- # checksums
- ))
-
-
- # VdexHeader 21
- VdexHeader21 = create_struct('VdexHeader21', (
- ('magic', '4s'),
- ('vdex_version', '4s'),
- ('dex_section_version', '4s'),
- ('number_of_dex_files', 'I'),
- ('verifier_deps_size', 'I'),
- ('bootclasspath_checksums_size', 'I'),
- ('class_loader_context_size', 'I'),
- # checksums
- ))
-
-
- DexSectionHeader = create_struct('DexSectionHeader', (
- ('dex_size', 'I'),
- ('dex_shared_data_size', 'I'),
- ('quickening_info_size', 'I'),
- ))
-
-
- @classmethod
- def enumerate_dex_strings_vdex_buf(cls, buf):
- buf = get_py3_bytes(buf)
-
- magic, version = struct.unpack_from('4s4s', buf)
-
- # Check the vdex file magic word
- if magic != b'vdex':
- raise ValueError('bad vdex magic word')
-
- # Parse vdex file header (w.r.t. version)
- if version == b'000\x00':
- VdexHeader = cls.VdexHeader0
- elif b'001\x00' <= version < b'016\x00':
- VdexHeader = cls.VdexHeader1
- elif b'016\x00' <= version < b'019\x00':
- VdexHeader = cls.VdexHeader16
- elif b'019\x00' <= version < b'021\x00':
- VdexHeader = cls.VdexHeader19
- elif version == b'021\x00':
- VdexHeader = cls.VdexHeader21
- else:
- raise ValueError('unknown vdex version ' + repr(version))
-
- vdex_header = VdexHeader.unpack_from(buf, offset=0)
-
- # Skip this vdex file if there is no dex file section
- if vdex_header.vdex_version < b'019\x00':
- if vdex_header.dex_size == 0:
- return
- else:
- if vdex_header.dex_section_version == b'000\x00':
- return
-
- # Skip vdex file header struct
- offset = VdexHeader.struct_size
-
- # Skip dex file checksums struct
- offset += 4 * vdex_header.number_of_dex_files
-
- # Skip dex section header struct
- if vdex_header.vdex_version >= b'019\x00':
- offset += cls.DexSectionHeader.struct_size
-
- # Calculate the quickening table offset
- if vdex_header.vdex_version >= b'012\x00':
- quickening_table_off_size = 4
- else:
- quickening_table_off_size = 0
-
- for _ in range(vdex_header.number_of_dex_files):
- # Skip quickening_table_off size
- offset += quickening_table_off_size
-
- # Check the dex file magic
- dex_magic = buf[offset:offset + 4]
- if dex_magic not in (b'dex\n', b'cdex'):
- raise ValueError('bad dex file offset {}'.format(offset))
-
- dex_header = cls.Header.unpack_from(buf, offset)
- dex_file_end = offset + dex_header.file_size
- for s in cls.enumerate_dex_strings_buf(buf, offset):
- yield s
-
- # Align to the end of the dex file
- offset = (dex_file_end + 3) // 4 * 4
-
-
- @classmethod
- def enumerate_dex_strings_vdex(cls, vdex_file_path):
- with open(vdex_file_path, 'rb') as vdex_file:
- return cls.enumerate_dex_strings_vdex_buf(vdex_file.read())
-
-
- @classmethod
- def enumerate_dex_strings(cls, path):
- if is_zipfile(path):
- return DexFileReader.enumerate_dex_strings_apk(path)
- if cls.is_vdex_file(path):
- return DexFileReader.enumerate_dex_strings_vdex(path)
- return None
-
-
-#------------------------------------------------------------------------------
-# Path Functions
-#------------------------------------------------------------------------------
-
-def _is_under_dir(dir_path, path):
- dir_path = os.path.abspath(dir_path)
- path = os.path.abspath(path)
- return path == dir_path or path.startswith(dir_path + os.path.sep)
-
-
-#------------------------------------------------------------------------------
-# TaggedDict
-#------------------------------------------------------------------------------
-
-class TaggedDict(object):
- def _define_tag_constants(local_ns):
- tag_list = [
- 'll_ndk', 'll_ndk_private',
- 'vndk_sp', 'vndk_sp_private',
- 'vndk', 'vndk_private',
- 'system_only', 'system_only_rs',
- 'sp_hal', 'sp_hal_dep',
- 'vendor_only',
- 'system_ext_only',
- 'product_only',
- 'remove',
- ]
- assert len(tag_list) < 32
-
- tags = {}
- for i, tag in enumerate(tag_list):
- local_ns[tag.upper()] = 1 << i
- tags[tag] = 1 << i
-
- local_ns['TAGS'] = tags
-
- _define_tag_constants(locals())
- del _define_tag_constants
-
-
- _TAG_ALIASES = {
- 'fwk_only': 'system_only',
- 'fwk_only_rs': 'system_only_rs',
- 'vnd_only': 'vendor_only',
- 'hl_ndk': 'system_only', # Treat HL-NDK as SYSTEM-ONLY.
- 'sp_ndk': 'll_ndk',
- 'sp_ndk_indirect': 'll_ndk_private',
- 'll_ndk_indirect': 'll_ndk_private',
- 'vndk_sp_indirect': 'vndk_sp',
- 'vndk_sp_indirect_private': 'vndk_sp_private',
- 'vndk_indirect': 'vndk_private',
- 'vndk_sp_hal': 'vndk_sp', # Legacy
- 'vndk_sp_both': 'vndk_sp', # Legacy
- }
-
-
- @classmethod
- def _normalize_tag(cls, tag):
- tag = tag.lower().replace('-', '_')
- tag = cls._TAG_ALIASES.get(tag, tag)
- if tag not in cls.TAGS:
- raise ValueError('unknown lib tag ' + tag)
- return tag
-
-
- _LL_NDK_VIS = {
- 'll_ndk', 'll_ndk_private',
- }
-
- _VNDK_SP_VIS = {
- 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'system_only_rs',
- }
-
- _VNDK_VIS = {
- 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'vndk', 'vndk_private',
- }
-
- _SYSTEM_ONLY_VIS = {
- 'll_ndk', 'll_ndk_private',
- 'vndk_sp', 'vndk_sp_private',
- 'vndk', 'vndk_private',
- 'system_only', 'system_only_rs',
- 'system_ext_only',
- 'sp_hal',
- }
-
- _PRODUCT_ONLY_VIS = {
- 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal',
-
- # Remove the following after VNDK-ext can be checked separately.
- 'sp_hal_dep', 'vendor_only',
- }
-
- _VENDOR_ONLY_VIS = {
- 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal', 'sp_hal_dep',
- 'vendor_only',
- }
-
- _SP_HAL_VIS = {'ll_ndk', 'vndk_sp', 'sp_hal', 'sp_hal_dep'}
-
- _TAG_VISIBILITY = {
- 'll_ndk': _LL_NDK_VIS,
- 'll_ndk_private': _LL_NDK_VIS,
-
- 'vndk_sp': _VNDK_SP_VIS,
- 'vndk_sp_private': _VNDK_SP_VIS,
-
- 'vndk': _VNDK_VIS,
- 'vndk_private': _VNDK_VIS,
-
- 'system_only': _SYSTEM_ONLY_VIS,
- 'system_only_rs': _SYSTEM_ONLY_VIS,
- 'system_ext_only': _SYSTEM_ONLY_VIS,
-
- 'sp_hal': _SP_HAL_VIS,
- 'sp_hal_dep': _SP_HAL_VIS,
-
- 'vendor_only': _VENDOR_ONLY_VIS,
- 'product_only': _PRODUCT_ONLY_VIS,
-
- 'remove': set(),
- }
-
- del _LL_NDK_VIS, _VNDK_SP_VIS, _VNDK_VIS, _SYSTEM_ONLY_VIS, \
- _PRODUCT_ONLY_VIS, _VENDOR_ONLY_VIS, _SP_HAL_VIS
-
-
- @classmethod
- def is_tag_visible(cls, from_tag, to_tag):
- return to_tag in cls._TAG_VISIBILITY[from_tag]
-
-
- def __init__(self, vndk_lib_dirs=None):
- self._path_tag = dict()
- for tag in self.TAGS:
- setattr(self, tag, set())
- self._regex_patterns = []
-
- if vndk_lib_dirs is None:
- self._vndk_suffixes = ['']
- else:
- self._vndk_suffixes = [VNDKLibDir.create_vndk_dir_suffix(version)
- for version in vndk_lib_dirs]
-
-
- def add(self, tag, lib):
- lib_set = getattr(self, tag)
- lib_set.add(lib)
- self._path_tag[lib] = tag
-
-
- def add_regex(self, tag, pattern):
- self._regex_patterns.append((re.compile(pattern), tag))
-
-
- def get_path_tag(self, lib):
- try:
- return self._path_tag[lib]
- except KeyError:
- pass
-
- for pattern, tag in self._regex_patterns:
- if pattern.match(lib):
- return tag
-
- return self.get_path_tag_default(lib)
-
-
- def get_path_tag_default(self, lib):
- raise NotImplementedError()
-
-
- def get_path_tag_bit(self, lib):
- return self.TAGS[self.get_path_tag(lib)]
-
-
- def is_path_visible(self, from_lib, to_lib):
- return self.is_tag_visible(self.get_path_tag(from_lib),
- self.get_path_tag(to_lib))
-
-
- @staticmethod
- def is_ll_ndk(tag_bit):
- return bool(tag_bit & TaggedDict.LL_NDK)
-
-
- @staticmethod
- def is_vndk_sp(tag_bit):
- return bool(tag_bit & TaggedDict.VNDK_SP)
-
-
- @staticmethod
- def is_vndk_sp_private(tag_bit):
- return bool(tag_bit & TaggedDict.VNDK_SP_PRIVATE)
-
-
- @staticmethod
- def is_system_only_rs(tag_bit):
- return bool(tag_bit & TaggedDict.SYSTEM_ONLY_RS)
-
-
- @staticmethod
- def is_sp_hal(tag_bit):
- return bool(tag_bit & TaggedDict.SP_HAL)
-
-
-class TaggedPathDict(TaggedDict):
- def load_from_csv(self, fp):
- reader = csv.reader(fp)
-
- # Read first row and check the existence of the header.
- try:
- row = next(reader)
- except StopIteration:
- return
-
- try:
- path_col = row.index('Path')
- tag_col = row.index('Tag')
- except ValueError:
- path_col = 0
- tag_col = 1
- self.add(self._normalize_tag(row[tag_col]), row[path_col])
-
- # Read the rest of rows.
- for row in reader:
- self.add(self._normalize_tag(row[tag_col]), row[path_col])
-
-
- @staticmethod
- def create_from_csv(fp, vndk_lib_dirs=None):
- d = TaggedPathDict(vndk_lib_dirs)
- d.load_from_csv(fp)
- return d
-
-
- @staticmethod
- def create_from_csv_path(path, vndk_lib_dirs=None):
- with open(path, 'r') as fp:
- return TaggedPathDict.create_from_csv(fp, vndk_lib_dirs)
-
-
- def _enumerate_paths_with_lib(self, pattern):
- if '${LIB}' in pattern:
- yield pattern.replace('${LIB}', 'lib')
- yield pattern.replace('${LIB}', 'lib64')
- else:
- yield pattern
-
-
- def _enumerate_paths(self, pattern):
- if '${VNDK_VER}' not in pattern:
- for path in self._enumerate_paths_with_lib(pattern):
- yield path
- return
- for suffix in self._vndk_suffixes:
- pattern_with_suffix = pattern.replace('${VNDK_VER}', suffix)
- for path in self._enumerate_paths_with_lib(pattern_with_suffix):
- yield path
-
-
- def add(self, tag, path):
- if path.startswith('[regex]'):
- super(TaggedPathDict, self).add_regex(tag, path[7:])
- return
- for path in self._enumerate_paths(path):
- super(TaggedPathDict, self).add(tag, path)
-
-
- @staticmethod
- def get_path_tag_default(path):
- if _is_under_dir('/vendor', path):
- return 'vendor_only'
- if _is_under_dir('/product', path):
- return 'product_only'
- if _is_under_dir('/system_ext', path):
- return 'system_ext_only'
- return 'system_only'
-
-
-class TaggedLibDict(object):
- def __init__(self):
- self._path_tag = dict()
- for tag in TaggedDict.TAGS:
- setattr(self, tag, set())
-
-
- def add(self, tag, lib):
- lib_set = getattr(self, tag)
- lib_set.add(lib)
- self._path_tag[lib] = tag
-
-
- @staticmethod
- def create_from_graph(graph, tagged_paths, generic_refs=None):
- d = TaggedLibDict()
-
- for lib in graph.lib_pt[PT_SYSTEM].values():
- d.add(tagged_paths.get_path_tag(lib.path), lib)
-
- sp_lib = graph.compute_sp_lib(generic_refs)
- for lib in graph.lib_pt[PT_VENDOR].values():
- if lib in sp_lib.sp_hal:
- d.add('sp_hal', lib)
- elif lib in sp_lib.sp_hal_dep:
- d.add('sp_hal_dep', lib)
- else:
- d.add('vendor_only', lib)
-
- for lib in graph.lib_pt[PT_PRODUCT].values():
- d.add('vendor_only', lib)
-
- for lib in graph.lib_pt[PT_SYSTEM_EXT].values():
- d.add('vendor_only', lib)
-
- return d
-
-
- def get_path_tag(self, lib):
- try:
- return self._path_tag[lib]
- except KeyError:
- return self.get_path_tag_default(lib)
-
-
- @staticmethod
- def get_path_tag_default(lib):
- return TaggedPathDict.get_path_tag_default(lib.path)
-
-
-class LibProperties(object):
- Properties = collections.namedtuple(
- 'Properties', 'vndk vndk_sp vendor_available rule')
-
-
- def __init__(self, csv_file=None):
- self.modules = {}
-
- if csv_file:
- reader = csv.reader(csv_file)
-
- header = next(reader)
- assert header == ['name', 'vndk', 'vndk_sp', 'vendor_available',
- 'rule'], repr(header)
-
- for name, vndk, vndk_sp, vendor_available, rule in reader:
- self.modules[name] = self.Properties(
- vndk == 'True', vndk_sp == 'True',
- vendor_available == 'True', rule)
-
-
- @classmethod
- def load_from_path_or_default(cls, path):
- if not path:
- return LibProperties()
-
- try:
- with open(path, 'r') as csv_file:
- return LibProperties(csv_file)
- except FileNotFoundError:
- return LibProperties()
-
-
- def get(self, name):
- try:
- return self.modules[name]
- except KeyError:
- return self.Properties(False, False, False, None)
-
-
- @staticmethod
- def get_lib_properties_file_path(tag_file_path):
- root, ext = os.path.splitext(tag_file_path)
- return root + '-properties' + ext
-
-
-#------------------------------------------------------------------------------
-# Public Libraries
-#------------------------------------------------------------------------------
-
-class PublicLibSet(object):
- def __init__(self):
- self._lib_names = set()
-
-
- def load_from_public_libraries_txt(self, config_path):
- with open(config_path, 'r') as config_file:
- for line in config_file:
- line = line.strip()
- if line and not line.startswith('#'):
- self._lib_names.add(line)
-
-
- def is_public_lib(self, path):
- lib_name = os.path.basename(path)
- return lib_name in self._lib_names
-
-
-#------------------------------------------------------------------------------
-# ELF Linker
-#------------------------------------------------------------------------------
-
-def is_zipfile(path):
- # zipfile.is_zipfile() tries to find the zip header in the file. But we
- # only want to scan the zip file that starts with the magic word. Thus,
- # we read the magic word by ourselves.
- try:
- with open(path, 'rb') as fp:
- if fp.read(2) != b'PK':
- return False
- except IOError:
- return False
-
- # Check whether this is a valid zip file.
- return zipfile.is_zipfile(path)
-
-
-def scan_zip_file(zip_file_path):
- """Scan all ELF files in a zip archive."""
- with zipfile.ZipFile(zip_file_path, 'r') as zip_file:
- for name in zip_file.namelist():
- yield (os.path.join(zip_file_path, name),
- zip_file.open(name, 'r').read())
-
-
-def dump_ext4_img(img_file_path, out_dir):
- if ' ' in out_dir:
- raise ValueError('out_dir must not have space character')
-
- cmd = ['debugfs', img_file_path, '-R', 'rdump / ' + out_dir]
-
- # Run the debugfs command.
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = proc.communicate()
- if proc.returncode != 0:
- raise subprocess.CalledProcessError(proc.returncode, cmd, stderr)
-
- # Print error messages if they are not the ones that should be ignored.
- for line in stderr.splitlines():
- if line.startswith(b'debugfs '):
- continue
- if b'Operation not permitted while changing ownership of' in line:
- continue
- print_sb('error: debugfs:', line, file=sys.stderr)
-
-
-def is_accessible(path):
- try:
- mode = os.stat(path).st_mode
- return (mode & (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)) != 0
- except FileNotFoundError:
- return False
-
-
-def scan_ext4_image(img_file_path, mount_point, unzip_files):
- """Scan all ELF files in the ext4 image."""
- with TemporaryDirectory() as tmp_dir:
- dump_ext4_img(img_file_path, tmp_dir)
- for path, elf in scan_elf_files(tmp_dir, mount_point, unzip_files):
- yield path, elf
-
-
-def scan_apex_dir(apex_collection_root, apex_dir, unzip_files):
- # Read the manifest file.
- manifest_file_path = os.path.join(apex_dir, 'apex_manifest.json')
- try:
- with open(manifest_file_path, 'r') as manifest_file:
- manifest = json.load(manifest_file)
- except FileNotFoundError:
- print('error: Failed to find apex manifest: {}'
- .format(manifest_file_path), file=sys.stderr)
- return
-
- # Read the module name.
- try:
- apex_name = manifest['name']
- except KeyError:
- print('error: Failed to read apex name from manifest: {}'
- .format(manifest_file_path), file=sys.stderr)
- return
-
- # Scan the payload (or the flatten payload).
- mount_point = os.path.join(apex_collection_root, apex_name)
- img_file_path = os.path.join(apex_dir, 'apex_payload.img')
- if os.path.exists(img_file_path):
- for path, elf in scan_ext4_image(img_file_path, mount_point,
- unzip_files):
- yield path, elf
- else:
- for path, elf in scan_elf_files(apex_dir, mount_point, unzip_files):
- yield path, elf
-
-
-def scan_apex_file(apex_collection_root, apex_zip_file, unzip_files):
- with TemporaryDirectory() as tmp_dir:
- with zipfile.ZipFile(apex_zip_file) as zip_file:
- zip_file.extractall(tmp_dir)
- for path, elf in scan_apex_dir(apex_collection_root, tmp_dir,
- unzip_files):
- yield path, elf
-
-
-def scan_apex_files(apex_collection_root, unzip_files):
- for ent in scandir(apex_collection_root):
- if ent.is_dir():
- for path, elf in scan_apex_dir(apex_collection_root, ent.path,
- unzip_files):
- yield path, elf
- elif ent.is_file() and ent.name.endswith('.apex'):
- for path, elf in scan_apex_file(apex_collection_root, ent.path,
- unzip_files):
- yield path, elf
-
-
-def scan_elf_files(root, mount_point=None, unzip_files=True):
- """Scan all ELF files under a directory."""
-
- if mount_point:
- root_prefix_len = len(root) + 1
- def norm_path(path):
- return os.path.join(mount_point, path[root_prefix_len:])
- else:
- def norm_path(path):
- return path
-
- for base, dirnames, filenames in os.walk(root):
- if base == root and 'apex' in dirnames:
- dirnames.remove('apex')
- for path, elf in scan_apex_files(os.path.join(root, 'apex'),
- unzip_files):
- yield (path, elf)
-
- for filename in filenames:
- path = os.path.join(base, filename)
- if not is_accessible(path):
- continue
-
-
- # If this is a zip file and unzip_file is true, scan the ELF files
- # in the zip file.
- if unzip_files and is_zipfile(path):
- for path, content in scan_zip_file(path):
- try:
- yield (norm_path(path), ELF.loads(content))
- except ELFError:
- pass
- continue
-
- # Load ELF from the path.
- try:
- yield (norm_path(path), ELF.load(path))
- except ELFError:
- pass
-
-
-PT_SYSTEM = 0
-PT_VENDOR = 1
-PT_PRODUCT = 2
-PT_SYSTEM_EXT = 3
-NUM_PARTITIONS = 4
-
-
-SPLibResult = collections.namedtuple(
- 'SPLibResult',
- 'sp_hal sp_hal_dep vndk_sp_hal ll_ndk ll_ndk_private vndk_sp_both')
-
-
-VNDKLibTuple = defaultnamedtuple('VNDKLibTuple', 'vndk_sp vndk', [])
-
-
-class VNDKLibDir(list):
- """VNDKLibDir is a dict which maps version to VNDK-SP and VNDK directory
- paths."""
-
-
- @classmethod
- def create_vndk_dir_suffix(cls, version):
- """Create VNDK version suffix."""
- return '' if version == 'current' else '-' + version
-
-
- @classmethod
- def create_vndk_sp_dir_name(cls, version):
- """Create VNDK-SP directory name from a given version."""
- return 'vndk-sp' + cls.create_vndk_dir_suffix(version)
-
-
- @classmethod
- def create_vndk_dir_name(cls, version):
- """Create VNDK directory name from a given version."""
- return 'vndk' + cls.create_vndk_dir_suffix(version)
-
-
- @classmethod
- def extract_version_from_name(cls, name):
- """Extract VNDK version from a name."""
- if name in {'vndk', 'vndk-sp'}:
- return 'current'
- if name.startswith('vndk-sp-'):
- return name[len('vndk-sp-'):]
- if name.startswith('vndk-'):
- return name[len('vndk-'):]
- return None
-
-
- @classmethod
- def extract_path_component(cls, path, index):
- """Extract n-th path component from a posix path."""
- start = 0
- for _ in range(index):
- pos = path.find('/', start)
- if pos == -1:
- return None
- start = pos + 1
- end = path.find('/', start)
- if end == -1:
- return None
- return path[start:end]
-
-
- @classmethod
- def extract_version_from_path(cls, path):
- """Extract VNDK version from the third path component."""
- component = cls.extract_path_component(path, 3)
- if not component:
- return None
- return cls.extract_version_from_name(component)
-
-
- @classmethod
- def is_in_vndk_dir(cls, path):
- """Determine whether a path is under a VNDK directory."""
- component = cls.extract_path_component(path, 3)
- if not component:
- return False
- return (component == 'vndk' or
- (component.startswith('vndk-') and
- not component == 'vndk-sp' and
- not component.startswith('vndk-sp-')))
-
-
- @classmethod
- def is_in_vndk_sp_dir(cls, path):
- """Determine whether a path is under a VNDK-SP directory."""
- component = cls.extract_path_component(path, 3)
- if not component:
- return False
- return component == 'vndk-sp' or component.startswith('vndk-sp-')
-
-
- @classmethod
- def get_vndk_lib_dirs(cls, lib_dir, version):
- """Create VNDK/VNDK-SP search paths from lib_dir and version."""
- vndk_sp_name = cls.create_vndk_sp_dir_name(version)
- vndk_name = cls.create_vndk_dir_name(version)
- return VNDKLibTuple(
- [posixpath.join('/vendor', lib_dir, vndk_sp_name),
- posixpath.join('/system', lib_dir, vndk_sp_name)],
- [posixpath.join('/vendor', lib_dir, vndk_name),
- posixpath.join('/system', lib_dir, vndk_name)])
-
-
- @classmethod
- def create_default(cls):
- """Create default VNDK-SP and VNDK paths without versions."""
- vndk_lib_dirs = VNDKLibDir()
- vndk_lib_dirs.append('current')
- return vndk_lib_dirs
-
-
- @classmethod
- def create_from_version(cls, version):
- """Create default VNDK-SP and VNDK paths with the specified version."""
- vndk_lib_dirs = VNDKLibDir()
- vndk_lib_dirs.append(version)
- return vndk_lib_dirs
-
-
- @classmethod
- def create_from_dirs(cls, system_dirs, vendor_dirs):
- """Scan system_dirs and vendor_dirs and collect all VNDK-SP and VNDK
- directory paths."""
-
- def collect_versions(base_dirs):
- versions = set()
- for base_dir in base_dirs:
- for lib_dir in ('lib', 'lib64'):
- lib_dir_path = os.path.join(base_dir, lib_dir)
- try:
- for name in os.listdir(lib_dir_path):
- version = cls.extract_version_from_name(name)
- if version:
- versions.add(version)
- except FileNotFoundError:
- pass
- return versions
-
- versions = set()
- if system_dirs:
- versions.update(collect_versions(system_dirs))
- if vendor_dirs:
- versions.update(collect_versions(vendor_dirs))
-
- # Validate: Versions must not be 'sp' or start with 'sp-'.
- bad_versions = [version for version in versions
- if version == 'sp' or version.startswith('sp-')]
- if bad_versions:
- raise ValueError('bad vndk version: ' + repr(bad_versions))
-
- return VNDKLibDir(cls.sorted_version(versions))
-
-
- def classify_vndk_libs(self, libs):
- """Classify VNDK/VNDK-SP shared libraries."""
- vndk_sp_libs = collections.defaultdict(set)
- vndk_libs = collections.defaultdict(set)
- other_libs = set()
-
- for lib in libs:
- component = self.extract_path_component(lib.path, 3)
- if component is None:
- other_libs.add(lib)
- continue
-
- version = self.extract_version_from_name(component)
- if version is None:
- other_libs.add(lib)
- continue
-
- if component.startswith('vndk-sp'):
- vndk_sp_libs[version].add(lib)
- else:
- vndk_libs[version].add(lib)
-
- return (vndk_sp_libs, vndk_libs, other_libs)
-
-
- @classmethod
- def _get_property(cls, property_file, name):
- """Read a property from a property file."""
- for line in property_file:
- if line.startswith(name + '='):
- return line[len(name) + 1:].strip()
- return None
-
-
- @classmethod
- def get_ro_vndk_version(cls, vendor_dirs):
- """Read ro.vendor.version property from vendor partitions."""
- for vendor_dir in vendor_dirs:
- path = os.path.join(vendor_dir, 'default.prop')
- try:
- with open(path, 'r') as property_file:
- result = cls._get_property(
- property_file, 'ro.vndk.version')
- if result is not None:
- return result
- except FileNotFoundError:
- pass
- return None
-
-
- @classmethod
- def sorted_version(cls, versions):
- """Sort versions in the following rule:
-
- 1. 'current' is the first.
-
- 2. The versions that cannot be converted to int are sorted
- lexicographically in descendant order.
-
- 3. The versions that can be converted to int are sorted as integers in
- descendant order.
- """
-
- current = []
- alpha = []
- numeric = []
-
- for version in versions:
- if version == 'current':
- current.append(version)
- continue
- try:
- numeric.append(int(version))
- except ValueError:
- alpha.append(version)
-
- alpha.sort(reverse=True)
- numeric.sort(reverse=True)
-
- return current + alpha + [str(x) for x in numeric]
-
-
- def find_vendor_vndk_version(self, vendor_dirs):
- """Find the best-fitting VNDK version."""
-
- ro_vndk_version = self.get_ro_vndk_version(vendor_dirs)
- if ro_vndk_version is not None:
- return ro_vndk_version
-
- if not self:
- return 'current'
-
- return self.sorted_version(self)[0]
-
-
-# File path patterns for Android apps
-_APP_DIR_PATTERNS = re.compile('^(?:/[^/]+){1,2}/(?:priv-)?app/')
-
-
-class ELFResolver(object):
- def __init__(self, lib_set, default_search_path):
- self.lib_set = lib_set
- self.default_search_path = default_search_path
-
-
- def get_candidates(self, requester, name, dt_rpath=None, dt_runpath=None):
- # Search app-specific search paths.
- if _APP_DIR_PATTERNS.match(requester):
- yield os.path.join(os.path.dirname(requester), name)
-
- # Search default search paths.
- if dt_rpath:
- for d in dt_rpath:
- yield os.path.join(d, name)
- if dt_runpath:
- for d in dt_runpath:
- yield os.path.join(d, name)
- for d in self.default_search_path:
- yield os.path.join(d, name)
-
-
- def resolve(self, requester, name, dt_rpath=None, dt_runpath=None):
- for path in self.get_candidates(requester, name, dt_rpath, dt_runpath):
- try:
- return self.lib_set[path]
- except KeyError:
- continue
- return None
-
-
-class ELFLinkData(object):
- def __init__(self, partition, path, elf, tag_bit):
- self.partition = partition
- self.path = path
- self.elf = elf
- self.deps_needed = set()
- self.deps_needed_hidden = set()
- self.deps_dlopen = set()
- self.deps_dlopen_hidden = set()
- self.users_needed = set()
- self.users_needed_hidden = set()
- self.users_dlopen = set()
- self.users_dlopen_hidden = set()
- self.imported_ext_symbols = collections.defaultdict(set)
- self._tag_bit = tag_bit
- self.unresolved_symbols = set()
- self.unresolved_dt_needed = []
- self.linked_symbols = dict()
-
-
- @property
- def is_ll_ndk(self):
- return TaggedDict.is_ll_ndk(self._tag_bit)
-
-
- @property
- def is_vndk_sp(self):
- return TaggedDict.is_vndk_sp(self._tag_bit)
-
-
- @property
- def is_vndk_sp_private(self):
- return TaggedDict.is_vndk_sp_private(self._tag_bit)
-
-
- @property
- def is_system_only_rs(self):
- return TaggedDict.is_system_only_rs(self._tag_bit)
-
-
- @property
- def is_sp_hal(self):
- return TaggedDict.is_sp_hal(self._tag_bit)
-
-
- def add_needed_dep(self, dst):
- assert dst not in self.deps_needed_hidden
- assert self not in dst.users_needed_hidden
- self.deps_needed.add(dst)
- dst.users_needed.add(self)
-
-
- def add_dlopen_dep(self, dst):
- assert dst not in self.deps_dlopen_hidden
- assert self not in dst.users_dlopen_hidden
- self.deps_dlopen.add(dst)
- dst.users_dlopen.add(self)
-
-
- def hide_needed_dep(self, dst):
- self.deps_needed.remove(dst)
- dst.users_needed.remove(self)
- self.deps_needed_hidden.add(dst)
- dst.users_needed_hidden.add(self)
-
-
- def hide_dlopen_dep(self, dst):
- self.deps_dlopen.remove(dst)
- dst.users_dlopen.remove(self)
- self.deps_dlopen_hidden.add(dst)
- dst.users_dlopen_hidden.add(self)
-
-
- @property
- def num_deps(self):
- """Get the number of dependencies. If a library is linked by both
- NEEDED and DLOPEN relationship, then it will be counted twice."""
- return (len(self.deps_needed) + len(self.deps_needed_hidden) +
- len(self.deps_dlopen) + len(self.deps_dlopen_hidden))
-
-
- @property
- def deps_all(self):
- return itertools.chain(self.deps_needed, self.deps_needed_hidden,
- self.deps_dlopen, self.deps_dlopen_hidden)
-
-
- @property
- def deps_good(self):
- return itertools.chain(self.deps_needed, self.deps_dlopen)
-
-
- @property
- def deps_needed_all(self):
- return itertools.chain(self.deps_needed, self.deps_needed_hidden)
-
-
- @property
- def deps_dlopen_all(self):
- return itertools.chain(self.deps_dlopen, self.deps_dlopen_hidden)
-
-
- @property
- def num_users(self):
- """Get the number of users. If a library is linked by both NEEDED and
- DLOPEN relationship, then it will be counted twice."""
- return (len(self.users_needed) + len(self.users_needed_hidden) +
- len(self.users_dlopen) + len(self.users_dlopen_hidden))
-
-
- @property
- def users_all(self):
- return itertools.chain(self.users_needed, self.users_needed_hidden,
- self.users_dlopen, self.users_dlopen_hidden)
-
-
- @property
- def users_good(self):
- return itertools.chain(self.users_needed, self.users_dlopen)
-
-
- @property
- def users_needed_all(self):
- return itertools.chain(self.users_needed, self.users_needed_hidden)
-
-
- @property
- def users_dlopen_all(self):
- return itertools.chain(self.users_dlopen, self.users_dlopen_hidden)
-
-
- def has_dep(self, dst):
- return (dst in self.deps_needed or dst in self.deps_needed_hidden or
- dst in self.deps_dlopen or dst in self.deps_dlopen_hidden)
-
-
- def has_user(self, dst):
- return (dst in self.users_needed or dst in self.users_needed_hidden or
- dst in self.users_dlopen or dst in self.users_dlopen_hidden)
-
-
- def is_system_lib(self):
- return self.partition == PT_SYSTEM
-
-
- def get_dep_linked_symbols(self, dep):
- symbols = set()
- for symbol, exp_lib in self.linked_symbols.items():
- if exp_lib == dep:
- symbols.add(symbol)
- return sorted(symbols)
-
-
- def __lt__(self, rhs):
- return self.path < rhs.path
-
-
-def sorted_lib_path_list(libs):
- libs = [lib.path for lib in libs]
- libs.sort()
- return libs
-
-
-_VNDK_RESULT_FIELD_NAMES = (
- 'll_ndk', 'll_ndk_private',
- 'vndk_sp', 'vndk_sp_unused',
- 'vndk_sp_private', 'vndk_sp_private_unused',
- 'vndk', 'vndk_private',
- 'system_only', 'system_only_rs',
- 'sp_hal', 'sp_hal_dep',
- 'vendor_only',
- 'vndk_ext',
- 'vndk_sp_ext', 'vndk_sp_private_ext',
- 'extra_vendor_libs')
-
-
-VNDKResult = defaultnamedtuple('VNDKResult', _VNDK_RESULT_FIELD_NAMES, set())
-
-
-_SIMPLE_VNDK_RESULT_FIELD_NAMES = (
- 'vndk_sp', 'vndk_sp_ext', 'extra_vendor_libs')
-
-
-SimpleVNDKResult = defaultnamedtuple(
- 'SimpleVNDKResult', _SIMPLE_VNDK_RESULT_FIELD_NAMES, set())
-
-
-class ELFLibDict(defaultnamedtuple('ELFLibDict', ('lib32', 'lib64'), {})):
- def get_lib_dict(self, elf_class):
- return self[elf_class - 1]
-
-
- def add(self, path, lib):
- self.get_lib_dict(lib.elf.ei_class)[path] = lib
-
-
- def remove(self, lib):
- del self.get_lib_dict(lib.elf.ei_class)[lib.path]
-
-
- def get(self, path, default=None):
- for lib_set in self:
- res = lib_set.get(path, None)
- if res:
- return res
- return default
-
-
- def keys(self):
- return itertools.chain(self.lib32.keys(), self.lib64.keys())
-
-
- def values(self):
- return itertools.chain(self.lib32.values(), self.lib64.values())
-
-
- def items(self):
- return itertools.chain(self.lib32.items(), self.lib64.items())
-
-
-class ELFLinker(object):
- def __init__(self, tagged_paths=None, vndk_lib_dirs=None,
- ro_vndk_version='current'):
- self.lib_pt = [ELFLibDict() for i in range(NUM_PARTITIONS)]
-
- if vndk_lib_dirs is None:
- vndk_lib_dirs = VNDKLibDir.create_default()
-
- self.vndk_lib_dirs = vndk_lib_dirs
-
- if tagged_paths is None:
- script_dir = os.path.dirname(os.path.abspath(__file__))
- dataset_path = os.path.join(
- script_dir, 'datasets', 'minimum_tag_file.csv')
- self.tagged_paths = TaggedPathDict.create_from_csv_path(
- dataset_path, vndk_lib_dirs)
- else:
- self.tagged_paths = tagged_paths
-
- self.ro_vndk_version = ro_vndk_version
-
- self.apex_module_names = set()
-
-
- def _add_lib_to_lookup_dict(self, lib):
- self.lib_pt[lib.partition].add(lib.path, lib)
-
-
- def _remove_lib_from_lookup_dict(self, lib):
- self.lib_pt[lib.partition].remove(lib)
-
-
- def _rename_lib(self, lib, new_path):
- self._remove_lib_from_lookup_dict(lib)
- lib.path = new_path
- lib._tag_bit = self.tagged_paths.get_path_tag_bit(new_path)
- self._add_lib_to_lookup_dict(lib)
-
-
- def add_lib(self, partition, path, elf):
- lib = ELFLinkData(partition, path, elf,
- self.tagged_paths.get_path_tag_bit(path))
- self._add_lib_to_lookup_dict(lib)
- return lib
-
-
- def add_dlopen_dep(self, src_path, dst_path):
- num_matches = 0
- for elf_class in (ELF.ELFCLASS32, ELF.ELFCLASS64):
- srcs = self._get_libs_in_elf_class(elf_class, src_path)
- dsts = self._get_libs_in_elf_class(elf_class, dst_path)
- for src, dst in itertools.product(srcs, dsts):
- src.add_dlopen_dep(dst)
- num_matches += 1
- if num_matches == 0:
- raise ValueError('Failed to add dlopen dependency from {} to {}'
- .format(src_path, dst_path))
-
-
- def _get_libs_in_elf_class(self, elf_class, path):
- result = set()
- if '${LIB}' in path:
- lib_dir = 'lib' if elf_class == ELF.ELFCLASS32 else 'lib64'
- path = path.replace('${LIB}', lib_dir)
- if path.startswith('[regex]'):
- patt = re.compile(path[7:])
- for partition in range(NUM_PARTITIONS):
- lib_set = self.lib_pt[partition].get_lib_dict(elf_class)
- for path, lib in lib_set.items():
- if patt.match(path):
- result.add(lib)
- else:
- for partition in range(NUM_PARTITIONS):
- lib_set = self.lib_pt[partition].get_lib_dict(elf_class)
- lib = lib_set.get(path)
- if lib:
- result.add(lib)
- return result
-
-
- def get_lib(self, path):
- for lib_set in self.lib_pt:
- lib = lib_set.get(path)
- if lib:
- return lib
- return None
-
-
- def get_libs(self, paths, report_error=None):
- result = set()
- for path in paths:
- lib = self.get_lib(path)
- if not lib:
- if report_error is None:
- raise ValueError('path not found ' + path)
- report_error(path)
- continue
- result.add(lib)
- return result
-
-
- def all_libs(self):
- for lib_set in self.lib_pt:
- for lib in lib_set.values():
- yield lib
-
-
- def _compute_lib_dict(self, elf_class):
- res = dict()
- for lib_pt in self.lib_pt:
- res.update(lib_pt.get_lib_dict(elf_class))
- return res
-
-
- @staticmethod
- def _compile_path_matcher(root, subdirs):
- dirs = [os.path.normpath(os.path.join(root, i)) for i in subdirs]
- patts = ['(?:' + re.escape(i) + os.sep + ')' for i in dirs]
- return re.compile('|'.join(patts))
-
-
- def add_executables_in_dir(self, partition_name, partition, root,
- alter_partition, alter_subdirs, ignored_subdirs,
- unzip_files):
- root = os.path.abspath(root)
- prefix_len = len(root) + 1
-
- if alter_subdirs:
- alter_patt = ELFLinker._compile_path_matcher(root, alter_subdirs)
- if ignored_subdirs:
- ignored_patt = ELFLinker._compile_path_matcher(
- root, ignored_subdirs)
-
- for path, elf in scan_elf_files(root, unzip_files=unzip_files):
- # Ignore ELF files with unknown machine ID (eg. DSP).
- if elf.e_machine not in ELF.ELF_MACHINES:
- continue
-
- # Ignore ELF files with matched path.
- if ignored_subdirs and ignored_patt.match(path):
- continue
-
- short_path = os.path.join('/', partition_name, path[prefix_len:])
-
- if alter_subdirs and alter_patt.match(path):
- self.add_lib(alter_partition, short_path, elf)
- else:
- self.add_lib(partition, short_path, elf)
-
-
- def add_dlopen_deps(self, path):
- patt = re.compile('([^:]*):\\s*(.*)')
- with open(path, 'r') as dlopen_dep_file:
- for line_no, line in enumerate(dlopen_dep_file, start=1):
- match = patt.match(line)
- if not match:
- continue
- try:
- self.add_dlopen_dep(match.group(1), match.group(2))
- except ValueError as e:
- print('error:{}:{}: {}.'.format(path, line_no, e),
- file=sys.stderr)
-
-
- def _find_exported_symbol(self, symbol, libs):
- """Find the shared library with the exported symbol."""
- for lib in libs:
- if symbol in lib.elf.exported_symbols:
- return lib
- return None
-
-
- def _resolve_lib_imported_symbols(self, lib, imported_libs, generic_refs):
- """Resolve the imported symbols in a library."""
- for symbol in lib.elf.imported_symbols:
- imported_lib = self._find_exported_symbol(symbol, imported_libs)
- if not imported_lib:
- lib.unresolved_symbols.add(symbol)
- else:
- lib.linked_symbols[symbol] = imported_lib
- if generic_refs:
- ref_lib = generic_refs.refs.get(imported_lib.path)
- if not ref_lib or not symbol in ref_lib.exported_symbols:
- lib.imported_ext_symbols[imported_lib].add(symbol)
-
-
- def _resolve_lib_dt_needed(self, lib, resolver):
- imported_libs = []
- for dt_needed in lib.elf.dt_needed:
- dep = resolver.resolve(lib.path, dt_needed, lib.elf.dt_rpath,
- lib.elf.dt_runpath)
- if not dep:
- candidates = list(resolver.get_candidates(
- lib.path, dt_needed, lib.elf.dt_rpath, lib.elf.dt_runpath))
- print('warning: {}: Missing needed library: {} Tried: {}'
- .format(lib.path, dt_needed, candidates),
- file=sys.stderr)
- lib.unresolved_dt_needed.append(dt_needed)
- continue
- lib.add_needed_dep(dep)
- imported_libs.append(dep)
- return imported_libs
-
-
- def _resolve_lib_deps(self, lib, resolver, generic_refs):
- # Resolve DT_NEEDED entries.
- imported_libs = self._resolve_lib_dt_needed(lib, resolver)
-
- if generic_refs:
- for imported_lib in imported_libs:
- if imported_lib.path not in generic_refs.refs:
- # Add imported_lib to imported_ext_symbols to make sure
- # non-AOSP libraries are in the imported_ext_symbols key
- # set.
- lib.imported_ext_symbols[imported_lib].update()
-
- # Resolve imported symbols.
- self._resolve_lib_imported_symbols(lib, imported_libs, generic_refs)
-
-
- def _resolve_lib_set_deps(self, lib_set, resolver, generic_refs):
- for lib in lib_set:
- self._resolve_lib_deps(lib, resolver, generic_refs)
-
-
- def _get_apex_bionic_lib_dirs(self, lib_dir):
- return ['/apex/com.android.runtime/' + lib_dir + '/bionic']
-
-
- def _get_apex_lib_dirs(self, lib_dir):
- return ['/apex/' + name + '/' + lib_dir
- for name in sorted(self.apex_module_names)]
-
-
- def _get_system_lib_dirs(self, lib_dir):
- return ['/system/' + lib_dir]
-
-
- def _get_system_ext_lib_dirs(self, lib_dir):
- return [
- '/system_ext/' + lib_dir,
- '/system/system_ext/' + lib_dir,
- ]
-
-
- def _get_vendor_lib_dirs(self, lib_dir):
- return [
- '/vendor/' + lib_dir + '/hw',
- '/vendor/' + lib_dir + '/egl',
- '/vendor/' + lib_dir,
- ]
-
-
- def _get_product_lib_dirs(self, lib_dir):
- return [
- '/product/' + lib_dir,
- '/system/product/' + lib_dir,
- ]
-
-
- def _get_system_search_paths(self, lib_dir):
- return (
- self._get_apex_bionic_lib_dirs(lib_dir) +
- self._get_apex_lib_dirs(lib_dir) +
- self._get_system_ext_lib_dirs(lib_dir) +
- self._get_system_lib_dirs(lib_dir) +
-
- # Search '/vendor/${LIB}' and '/product/${LIB}' to detect
- # violations.
- self._get_product_lib_dirs(lib_dir) +
- self._get_vendor_lib_dirs(lib_dir)
- )
-
-
- def _get_vendor_search_paths(self, lib_dir, vndk_sp_dirs, vndk_dirs):
- return (
- self._get_vendor_lib_dirs(lib_dir) +
- vndk_sp_dirs +
- vndk_dirs +
-
- # Search '/apex/*/${LIB}' and '/system/${LIB}' for degenerated VNDK
- # and LL-NDK or to detect violations.
- self._get_apex_bionic_lib_dirs(lib_dir) +
- self._get_apex_lib_dirs(lib_dir) +
- self._get_system_lib_dirs(lib_dir)
- )
-
-
- def _get_product_search_paths(self, lib_dir, vndk_sp_dirs, vndk_dirs):
- return (
- self._get_product_lib_dirs(lib_dir) +
- vndk_sp_dirs +
- vndk_dirs +
-
- # Search '/vendor/${LIB}', '/system/${LIB}', and '/apex/*/${LIB}'
- # for degenerated VNDK and LL-NDK or to detect violations.
- self._get_vendor_lib_dirs(lib_dir) +
- self._get_apex_bionic_lib_dirs(lib_dir) +
- self._get_apex_lib_dirs(lib_dir) +
- self._get_system_lib_dirs(lib_dir)
- )
-
-
- def _get_system_ext_search_paths(self, lib_dir):
- # Delegate to _get_system_search_paths() because there is no ABI
- # boundary between system and system_ext partition.
- return self._get_system_search_paths(lib_dir)
-
-
- def _get_vndk_sp_search_paths(self, lib_dir, vndk_sp_dirs):
- # To find missing dependencies or LL-NDK.
- fallback_lib_dirs = [
- '/vendor/' + lib_dir,
- '/system/' + lib_dir,
- ]
- fallback_lib_dirs += self._get_apex_bionic_lib_dirs(lib_dir)
- fallback_lib_dirs += self._get_apex_lib_dirs(lib_dir)
-
- return vndk_sp_dirs + fallback_lib_dirs
-
-
- def _get_vndk_search_paths(self, lib_dir, vndk_sp_dirs, vndk_dirs):
- # To find missing dependencies or LL-NDK.
- fallback_lib_dirs = [
- '/vendor/' + lib_dir,
- '/system/' + lib_dir,
- ]
- fallback_lib_dirs += self._get_apex_bionic_lib_dirs(lib_dir)
- fallback_lib_dirs += self._get_apex_lib_dirs(lib_dir)
-
- return vndk_sp_dirs + vndk_dirs + fallback_lib_dirs
-
-
- def _resolve_elf_class_deps(self, lib_dir, elf_class, generic_refs):
- # Classify libs.
- vndk_lib_dirs = self.vndk_lib_dirs
- lib_dict = self._compute_lib_dict(elf_class)
-
- system_lib_dict = self.lib_pt[PT_SYSTEM].get_lib_dict(elf_class)
- system_vndk_sp_libs, system_vndk_libs, system_libs = \
- vndk_lib_dirs.classify_vndk_libs(system_lib_dict.values())
-
- vendor_lib_dict = self.lib_pt[PT_VENDOR].get_lib_dict(elf_class)
- vendor_vndk_sp_libs, vendor_vndk_libs, vendor_libs = \
- vndk_lib_dirs.classify_vndk_libs(vendor_lib_dict.values())
-
- # Resolve system libs.
- search_paths = self._get_system_search_paths(lib_dir)
- resolver = ELFResolver(lib_dict, search_paths)
- self._resolve_lib_set_deps(system_libs, resolver, generic_refs)
-
- # Resolve vndk-sp libs
- for version in vndk_lib_dirs:
- vndk_sp_dirs, vndk_dirs = \
- vndk_lib_dirs.get_vndk_lib_dirs(lib_dir, version)
- vndk_sp_libs = \
- system_vndk_sp_libs[version] | vendor_vndk_sp_libs[version]
- search_paths = self._get_vndk_sp_search_paths(
- lib_dir, vndk_sp_dirs)
- resolver = ELFResolver(lib_dict, search_paths)
- self._resolve_lib_set_deps(vndk_sp_libs, resolver, generic_refs)
-
- # Resolve vndk libs
- for version in vndk_lib_dirs:
- vndk_sp_dirs, vndk_dirs = \
- vndk_lib_dirs.get_vndk_lib_dirs(lib_dir, version)
- vndk_libs = system_vndk_libs[version] | vendor_vndk_libs[version]
- search_paths = self._get_vndk_search_paths(
- lib_dir, vndk_sp_dirs, vndk_dirs)
- resolver = ELFResolver(lib_dict, search_paths)
- self._resolve_lib_set_deps(vndk_libs, resolver, generic_refs)
-
- # Resolve vendor libs.
- vndk_sp_dirs, vndk_dirs = vndk_lib_dirs.get_vndk_lib_dirs(
- lib_dir, self.ro_vndk_version)
- search_paths = self._get_vendor_search_paths(
- lib_dir, vndk_sp_dirs, vndk_dirs)
- resolver = ELFResolver(lib_dict, search_paths)
- self._resolve_lib_set_deps(vendor_libs, resolver, generic_refs)
-
- # Resolve product libs
- product_lib_dict = self.lib_pt[PT_PRODUCT].get_lib_dict(elf_class)
- product_libs = set(product_lib_dict.values())
- search_paths = self._get_product_search_paths(
- lib_dir, vndk_sp_dirs, vndk_dirs)
- resolver = ELFResolver(lib_dict, search_paths)
- self._resolve_lib_set_deps(product_libs, resolver, generic_refs)
-
- # Resolve system_ext libs
- system_ext_lib_dict = \
- self.lib_pt[PT_SYSTEM_EXT].get_lib_dict(elf_class)
- system_ext_libs = set(system_ext_lib_dict.values())
- search_paths = self._get_system_ext_search_paths(lib_dir)
- resolver = ELFResolver(lib_dict, search_paths)
- self._resolve_lib_set_deps(system_ext_libs, resolver, generic_refs)
-
-
- def resolve_deps(self, generic_refs=None):
- self._resolve_elf_class_deps('lib', ELF.ELFCLASS32, generic_refs)
- self._resolve_elf_class_deps('lib64', ELF.ELFCLASS64, generic_refs)
-
-
- def compute_predefined_sp_hal(self):
- """Find all same-process HALs."""
- return set(lib for lib in self.all_libs() if lib.is_sp_hal)
-
-
- def compute_sp_lib(self, generic_refs, ignore_hidden_deps=False):
- def is_ll_ndk_or_sp_hal(lib):
- return lib.is_ll_ndk or lib.is_sp_hal
-
- ll_ndk = set(lib for lib in self.all_libs() if lib.is_ll_ndk)
- ll_ndk_closure = self.compute_deps_closure(
- ll_ndk, is_ll_ndk_or_sp_hal, ignore_hidden_deps)
- ll_ndk_private = ll_ndk_closure - ll_ndk
-
- def is_ll_ndk(lib):
- return lib.is_ll_ndk
-
- sp_hal = self.compute_predefined_sp_hal()
- sp_hal_closure = self.compute_deps_closure(
- sp_hal, is_ll_ndk, ignore_hidden_deps)
-
- def is_aosp_lib(lib):
- return (not generic_refs or
- generic_refs.classify_lib(lib) != GenericRefs.NEW_LIB)
-
- vndk_sp_hal = set()
- sp_hal_dep = set()
- for lib in sp_hal_closure - sp_hal:
- if is_aosp_lib(lib):
- vndk_sp_hal.add(lib)
- else:
- sp_hal_dep.add(lib)
-
- vndk_sp_both = ll_ndk_private & vndk_sp_hal
- ll_ndk_private -= vndk_sp_both
- vndk_sp_hal -= vndk_sp_both
-
- return SPLibResult(sp_hal, sp_hal_dep, vndk_sp_hal, ll_ndk,
- ll_ndk_private, vndk_sp_both)
-
-
- def normalize_partition_tags(self, sp_hals, generic_refs):
- def is_system_lib_or_sp_hal(lib):
- return lib.is_system_lib() or lib in sp_hals
-
- for lib in self.lib_pt[PT_SYSTEM].values():
- if all(is_system_lib_or_sp_hal(dep) for dep in lib.deps_all):
- continue
- # If a system module is depending on a vendor shared library and
- # such shared library is not a SP-HAL library, then emit an error
- # and hide the dependency.
- for dep in list(lib.deps_needed_all):
- if not is_system_lib_or_sp_hal(dep):
- print('error: {}: system exe/lib must not depend on '
- 'vendor lib {}. Assume such dependency does '
- 'not exist.'.format(lib.path, dep.path),
- file=sys.stderr)
- lib.hide_needed_dep(dep)
- for dep in list(lib.deps_dlopen_all):
- if not is_system_lib_or_sp_hal(dep):
- print('error: {}: system exe/lib must not dlopen() '
- 'vendor lib {}. Assume such dependency does '
- 'not exist.'.format(lib.path, dep.path),
- file=sys.stderr)
- lib.hide_dlopen_dep(dep)
-
-
- def rewrite_apex_modules(self):
- """Rename ELF files under `/system/apex/${name}.apex` to
- `/apex/${name}/...` and collect apex module names."""
- APEX_PREFIX = '/system/apex/'
- APEX_PREFIX_LEN = len(APEX_PREFIX)
- for lib in list(self.all_libs()):
- if not lib.path.startswith(APEX_PREFIX):
- continue
-
- apex_name_end = lib.path.find('/', APEX_PREFIX_LEN)
- apex_name = lib.path[APEX_PREFIX_LEN:apex_name_end]
- self.apex_module_names.add(apex_name)
-
- self._rename_lib(lib, '/apex/' + lib.path[APEX_PREFIX_LEN:])
-
-
- @staticmethod
- def _parse_action_on_ineligible_lib(arg):
- follow = False
- warn = False
- for flag in arg.split(','):
- if flag == 'follow':
- follow = True
- elif flag == 'warn':
- warn = True
- elif flag == 'ignore':
- continue
- else:
- raise ValueError('unknown action \"{}\"'.format(flag))
- return (follow, warn)
-
-
- def compute_degenerated_vndk(self, generic_refs, tagged_paths=None,
- action_ineligible_vndk_sp='warn',
- action_ineligible_vndk='warn'):
- # Find LL-NDK libs.
- ll_ndk = set(lib for lib in self.all_libs() if lib.is_ll_ndk)
-
- # Find pre-defined libs.
- system_only_rs = set(
- lib for lib in self.all_libs() if lib.is_system_only_rs)
- predefined_vndk_sp = set(
- lib for lib in self.all_libs() if lib.is_vndk_sp)
- predefined_vndk_sp_private = set(
- lib for lib in self.all_libs() if lib.is_vndk_sp_private)
-
- # Find SP-HAL libs.
- sp_hal = self.compute_predefined_sp_hal()
-
- # Normalize partition tags. We expect many violations from the
- # pre-Treble world. Guess a resolution for the incorrect partition
- # tag.
- self.normalize_partition_tags(sp_hal, generic_refs)
-
- # Find SP-HAL-Dep libs.
- def is_aosp_lib(lib):
- if not generic_refs:
- # If generic reference is not available, then assume all system
- # libs are AOSP libs.
- return lib.partition == PT_SYSTEM
- return generic_refs.has_same_name_lib(lib)
-
- def is_not_sp_hal_dep(lib):
- if lib.is_ll_ndk or lib in sp_hal:
- return True
- return is_aosp_lib(lib)
-
- sp_hal_dep = self.compute_deps_closure(sp_hal, is_not_sp_hal_dep, True)
- sp_hal_dep -= sp_hal
-
- # Find VNDK-SP libs.
- def is_not_vndk_sp(lib):
- return lib.is_ll_ndk or lib in sp_hal or lib in sp_hal_dep
-
- follow_ineligible_vndk_sp, warn_ineligible_vndk_sp = \
- self._parse_action_on_ineligible_lib(action_ineligible_vndk_sp)
- vndk_sp = set()
- for lib in itertools.chain(sp_hal, sp_hal_dep):
- for dep in lib.deps_all:
- if is_not_vndk_sp(dep):
- continue
- if dep in predefined_vndk_sp:
- vndk_sp.add(dep)
- continue
- if warn_ineligible_vndk_sp:
- print('error: SP-HAL {} depends on non vndk-sp '
- 'library {}.'.format(lib.path, dep.path),
- file=sys.stderr)
- if follow_ineligible_vndk_sp:
- vndk_sp.add(dep)
-
- # Find VNDK-SP-Indirect libs.
- def is_not_vndk_sp_private(lib):
- return lib.is_ll_ndk or lib in vndk_sp or lib in system_only_rs
-
- vndk_sp_private = self.compute_deps_closure(
- vndk_sp, is_not_vndk_sp_private, True)
- vndk_sp_private -= vndk_sp
-
- # Find unused predefined VNDK-SP libs.
- vndk_sp_unused = set(lib for lib in predefined_vndk_sp
- if VNDKLibDir.is_in_vndk_sp_dir(lib.path))
- vndk_sp_unused -= vndk_sp
- vndk_sp_unused -= vndk_sp_private
-
- # Find dependencies of unused predefined VNDK-SP libs.
- def is_not_vndk_sp_private_unused(lib):
- return is_not_vndk_sp_private(lib) or lib in vndk_sp_private
- vndk_sp_unused_deps = self.compute_deps_closure(
- vndk_sp_unused, is_not_vndk_sp_private_unused, True)
- vndk_sp_unused_deps -= vndk_sp_unused
-
- vndk_sp_private_unused = set(
- lib for lib in predefined_vndk_sp_private
- if VNDKLibDir.is_in_vndk_sp_dir(lib.path))
- vndk_sp_private_unused -= vndk_sp_private
- vndk_sp_private_unused -= vndk_sp_unused
- vndk_sp_private_unused |= vndk_sp_unused_deps
-
- assert not vndk_sp & vndk_sp_private
- assert not vndk_sp_unused & vndk_sp_private_unused
-
- # Define helper functions for vndk_sp sets.
- def is_vndk_sp_public(lib):
- return lib in vndk_sp or lib in vndk_sp_unused or \
- lib in vndk_sp_private or \
- lib in vndk_sp_private_unused
-
- def is_vndk_sp(lib):
- return is_vndk_sp_public(lib) or lib in vndk_sp_private
-
- def is_vndk_sp_unused(lib):
- return lib in vndk_sp_unused or lib in vndk_sp_private_unused
-
- def relabel_vndk_sp_as_used(lib):
- assert is_vndk_sp_unused(lib)
-
- if lib in vndk_sp_unused:
- vndk_sp_unused.remove(lib)
- vndk_sp.add(lib)
- else:
- vndk_sp_private_unused.remove(lib)
- vndk_sp_private.add(lib)
-
- # Add the dependencies to vndk_sp_private if they are not vndk_sp.
- closure = self.compute_deps_closure(
- {lib}, lambda lib: lib not in vndk_sp_private_unused, True)
- closure.remove(lib)
- vndk_sp_private_unused.difference_update(closure)
- vndk_sp_private.update(closure)
-
- # Find VNDK-SP-Ext libs.
- vndk_sp_ext = set()
- def collect_vndk_ext(libs):
- result = set()
- for lib in libs:
- for dep in lib.imported_ext_symbols:
- if dep in vndk_sp and dep not in vndk_sp_ext:
- result.add(dep)
- return result
-
- candidates = collect_vndk_ext(self.lib_pt[PT_VENDOR].values())
- while candidates:
- vndk_sp_ext |= candidates
- candidates = collect_vndk_ext(candidates)
-
- # Find VNDK-SP-Indirect-Ext libs.
- vndk_sp_private_ext = set()
- def collect_vndk_sp_private_ext(libs):
- result = set()
- for lib in libs:
- exts = set(lib.imported_ext_symbols.keys())
- for dep in lib.deps_all:
- if not is_vndk_sp_public(dep):
- continue
- if dep in vndk_sp_ext or dep in vndk_sp_private_ext:
- continue
- # If lib is using extended definition from deps, then we
- # have to make a copy of dep.
- if dep in exts:
- result.add(dep)
- continue
- # If lib is using non-predefined VNDK-SP-Indirect, then we
- # have to make a copy of dep.
- if dep not in predefined_vndk_sp and \
- dep not in predefined_vndk_sp_private:
- result.add(dep)
- continue
- return result
-
- def is_not_vndk_sp_private(lib):
- return lib.is_ll_ndk or lib in vndk_sp or lib in system_only_rs
-
- candidates = collect_vndk_sp_private_ext(vndk_sp_ext)
- while candidates:
- vndk_sp_private_ext |= candidates
- candidates = collect_vndk_sp_private_ext(candidates)
-
- # Find VNDK libs (a.k.a. system shared libs directly used by vendor
- # partition.)
- def is_not_vndk(lib):
- if lib.is_ll_ndk or is_vndk_sp_public(lib) or lib in system_only_rs:
- return True
- return lib.partition != PT_SYSTEM
-
- def is_eligible_lib_access(lib, dep):
- return not tagged_paths or \
- tagged_paths.is_path_visible(lib.path, dep.path)
-
- follow_ineligible_vndk, warn_ineligible_vndk = \
- self._parse_action_on_ineligible_lib(action_ineligible_vndk)
- vndk = set()
- extra_vendor_libs = set()
- def collect_vndk(vendor_libs):
- next_vendor_libs = set()
- for lib in vendor_libs:
- for dep in lib.deps_all:
- if is_vndk_sp_unused(dep):
- relabel_vndk_sp_as_used(dep)
- continue
- if is_not_vndk(dep):
- continue
- if not is_aosp_lib(dep):
- # The dependency should be copied into vendor partition
- # as an extra vendor lib.
- if dep not in extra_vendor_libs:
- next_vendor_libs.add(dep)
- extra_vendor_libs.add(dep)
- continue
- if is_eligible_lib_access(lib, dep):
- vndk.add(dep)
- continue
- if warn_ineligible_vndk:
- print('warning: vendor lib/exe {} depends on '
- 'ineligible framework shared lib {}.'
- .format(lib.path, dep.path), file=sys.stderr)
- if follow_ineligible_vndk:
- vndk.add(dep)
- return next_vendor_libs
-
- candidates = collect_vndk(self.lib_pt[PT_VENDOR].values())
- while candidates:
- candidates = collect_vndk(candidates)
-
- vndk_private = self.compute_deps_closure(vndk, is_not_vndk, True)
- vndk_private -= vndk
-
- def is_vndk(lib):
- return lib in vndk or lib in vndk_private
-
- # Find VNDK-EXT libs (VNDK libs with extended definitions and the
- # extended definitions are used by the vendor modules (including
- # extra_vendor_libs).
-
- # FIXME: DAUX libraries won't be found by the following algorithm.
- vndk_ext = set()
-
- def collect_vndk_ext(libs):
- result = set()
- for lib in libs:
- for dep in lib.imported_ext_symbols:
- if dep in vndk and dep not in vndk_ext:
- result.add(dep)
- return result
-
- candidates = collect_vndk_ext(self.lib_pt[PT_VENDOR].values())
- candidates |= collect_vndk_ext(extra_vendor_libs)
-
- while candidates:
- vndk_ext |= candidates
- candidates = collect_vndk_ext(candidates)
-
- # Compute LL-NDK-Indirect.
- def is_not_ll_ndk_private(lib):
- return lib.is_ll_ndk or lib.is_sp_hal or is_vndk_sp(lib) or \
- is_vndk_sp(lib) or is_vndk(lib)
-
- ll_ndk_private = self.compute_deps_closure(
- ll_ndk, is_not_ll_ndk_private, True)
- ll_ndk_private -= ll_ndk
-
- # Return the VNDK classifications.
- return VNDKResult(
- ll_ndk=ll_ndk,
- ll_ndk_private=ll_ndk_private,
- vndk_sp=vndk_sp,
- vndk_sp_unused=vndk_sp_unused,
- vndk_sp_private=vndk_sp_private,
- vndk_sp_private_unused=vndk_sp_private_unused,
- vndk=vndk,
- vndk_private=vndk_private,
- # system_only=system_only,
- system_only_rs=system_only_rs,
- sp_hal=sp_hal,
- sp_hal_dep=sp_hal_dep,
- # vendor_only=vendor_only,
- vndk_ext=vndk_ext,
- vndk_sp_ext=vndk_sp_ext,
- vndk_sp_private_ext=vndk_sp_private_ext,
- extra_vendor_libs=extra_vendor_libs)
-
-
- @staticmethod
- def _compute_closure(root_set, is_excluded, get_successors):
- closure = set(root_set)
- stack = list(root_set)
- while stack:
- lib = stack.pop()
- for succ in get_successors(lib):
- if is_excluded(succ):
- continue
- if succ not in closure:
- closure.add(succ)
- stack.append(succ)
- return closure
-
-
- @classmethod
- def compute_deps_closure(cls, root_set, is_excluded,
- ignore_hidden_deps=False):
- get_successors = (lambda x: x.deps_good) if ignore_hidden_deps else \
- (lambda x: x.deps_all)
- return cls._compute_closure(root_set, is_excluded, get_successors)
-
-
- @classmethod
- def compute_users_closure(cls, root_set, is_excluded,
- ignore_hidden_users=False):
- get_successors = (lambda x: x.users_good) if ignore_hidden_users else \
- (lambda x: x.users_all)
- return cls._compute_closure(root_set, is_excluded, get_successors)
-
-
- @staticmethod
- def create(system_dirs=None, system_dirs_as_vendor=None,
- system_dirs_ignored=None, vendor_dirs=None,
- vendor_dirs_as_system=None, vendor_dirs_ignored=None,
- product_dirs=None, system_ext_dirs=None, extra_deps=None,
- generic_refs=None, tagged_paths=None, vndk_lib_dirs=None,
- unzip_files=True):
- if vndk_lib_dirs is None:
- vndk_lib_dirs = VNDKLibDir.create_from_dirs(
- system_dirs, vendor_dirs)
- ro_vndk_version = vndk_lib_dirs.find_vendor_vndk_version(vendor_dirs)
- graph = ELFLinker(tagged_paths, vndk_lib_dirs, ro_vndk_version)
-
- if system_dirs:
- for path in system_dirs:
- graph.add_executables_in_dir(
- 'system', PT_SYSTEM, path, PT_VENDOR,
- system_dirs_as_vendor, system_dirs_ignored,
- unzip_files)
-
- if vendor_dirs:
- for path in vendor_dirs:
- graph.add_executables_in_dir(
- 'vendor', PT_VENDOR, path, PT_SYSTEM,
- vendor_dirs_as_system, vendor_dirs_ignored,
- unzip_files)
-
- if product_dirs:
- for path in product_dirs:
- graph.add_executables_in_dir(
- 'product', PT_PRODUCT, path, None, None, None,
- unzip_files)
-
- if system_ext_dirs:
- for path in system_ext_dirs:
- graph.add_executables_in_dir(
- 'system_ext', PT_SYSTEM_EXT, path, None, None, None,
- unzip_files)
-
- if extra_deps:
- for path in extra_deps:
- graph.add_dlopen_deps(path)
-
- graph.rewrite_apex_modules()
- graph.resolve_deps(generic_refs)
-
- return graph
-
-
-#------------------------------------------------------------------------------
-# Generic Reference
-#------------------------------------------------------------------------------
-
-class GenericRefs(object):
- NEW_LIB = 0
- EXPORT_EQUAL = 1
- EXPORT_SUPER_SET = 2
- MODIFIED = 3
-
-
- def __init__(self):
- self.refs = dict()
- self._lib_names = set()
-
-
- def add(self, path, elf):
- self.refs[path] = elf
- self._lib_names.add(os.path.basename(path))
-
-
- def _load_from_sym_dir(self, root):
- root = os.path.abspath(root)
- prefix_len = len(root) + 1
- for base, _, filenames in os.walk(root):
- for filename in filenames:
- if not filename.endswith('.sym'):
- continue
- path = os.path.join(base, filename)
- lib_path = '/' + path[prefix_len:-4]
- self.add(lib_path, ELF.load_dump(path))
-
-
- @staticmethod
- def create_from_sym_dir(root):
- result = GenericRefs()
- result._load_from_sym_dir(root)
- return result
-
-
- def _load_from_image_dir(self, root, prefix):
- root = os.path.abspath(root)
- root_len = len(root) + 1
- for path, elf in scan_elf_files(root):
- self.add(os.path.join(prefix, path[root_len:]), elf)
-
-
- @staticmethod
- def create_from_image_dir(root, prefix):
- result = GenericRefs()
- result._load_from_image_dir(root, prefix)
- return result
-
-
- def classify_lib(self, lib):
- ref_lib = self.refs.get(lib.path)
- if not ref_lib:
- return GenericRefs.NEW_LIB
- exported_symbols = lib.elf.exported_symbols
- if exported_symbols == ref_lib.exported_symbols:
- return GenericRefs.EXPORT_EQUAL
- if exported_symbols > ref_lib.exported_symbols:
- return GenericRefs.EXPORT_SUPER_SET
- return GenericRefs.MODIFIED
-
-
- def is_equivalent_lib(self, lib):
- return self.classify_lib(lib) == GenericRefs.EXPORT_EQUAL
-
-
- def has_same_name_lib(self, lib):
- return os.path.basename(lib.path) in self._lib_names
-
-
-#------------------------------------------------------------------------------
-# APK Dep
-#------------------------------------------------------------------------------
-def _build_lib_names_dict(graph, min_name_len=6, lib_ext='.so'):
- names = collections.defaultdict(set)
- for lib in graph.all_libs():
- name = os.path.basename(lib.path)
- root, ext = os.path.splitext(name)
-
- if ext != lib_ext:
- continue
-
- if not lib.elf.is_jni_lib():
- continue
-
- names[name].add(lib)
- names[root].add(lib)
-
- if root.startswith('lib') and len(root) > min_name_len:
- # FIXME: libandroid.so is a JNI lib. However, many apps have
- # "android" as a constant string literal, thus "android" is
- # skipped here to reduce the false positives.
- #
- # Note: It is fine to exclude libandroid.so because it is only
- # a user of JNI and it does not define any JNI methods.
- if root != 'libandroid':
- names[root[3:]].add(lib)
- return names
-
-
-def _enumerate_partition_paths(partition, root):
- prefix_len = len(root) + 1
- for base, _, files in os.walk(root):
- for filename in files:
- path = os.path.join(base, filename)
- if not is_accessible(path):
- continue
- android_path = posixpath.join('/', partition, path[prefix_len:])
- yield (android_path, path)
-
-
-def _enumerate_paths(system_dirs, vendor_dirs, product_dirs, system_ext_dirs):
- for root in system_dirs:
- for ap, path in _enumerate_partition_paths('system', root):
- yield (ap, path)
- for root in vendor_dirs:
- for ap, path in _enumerate_partition_paths('vendor', root):
- yield (ap, path)
- for root in product_dirs:
- for ap, path in _enumerate_partition_paths('product', root):
- yield (ap, path)
- for root in system_ext_dirs:
- for ap, path in _enumerate_partition_paths('system_ext', root):
- yield (ap, path)
-
-
-def scan_apk_dep(graph, system_dirs, vendor_dirs, product_dirs,
- system_ext_dirs):
- libnames = _build_lib_names_dict(graph)
- results = []
-
- if str is bytes:
- def decode(string): # PY2
- return string.decode('mutf-8').encode('utf-8')
- else:
- def decode(string): # PY3
- return string.decode('mutf-8')
-
- for ap, path in _enumerate_paths(system_dirs, vendor_dirs, product_dirs,
- system_ext_dirs):
- # Read the dex file from various file formats
- try:
- dex_string_iter = DexFileReader.enumerate_dex_strings(path)
- if dex_string_iter is None:
- continue
-
- strings = set()
- for string in dex_string_iter:
- try:
- strings.add(decode(string))
- except UnicodeSurrogateDecodeError:
- pass
- except FileNotFoundError:
- continue
- except:
- print('error: Failed to parse', path, file=sys.stderr)
- raise
-
- # Skip the file that does not call System.loadLibrary()
- if 'loadLibrary' not in strings:
- continue
-
- # Collect libraries from string tables
- libs = set()
- for string in strings:
- try:
- for dep_file in libnames[string]:
- match = _APP_DIR_PATTERNS.match(dep_file.path)
-
- # List the lib if it is not embedded in the app.
- if not match:
- libs.add(dep_file)
- continue
-
- # Only list the embedded lib if it is in the same app.
- common = os.path.commonprefix([ap, dep_file.path])
- if len(common) > len(match.group(0)):
- libs.add(dep_file)
- continue
- except KeyError:
- pass
-
- if libs:
- results.append((ap, sorted_lib_path_list(libs)))
-
- results.sort()
- return results
-
-
-#------------------------------------------------------------------------------
-# Module Info
-#------------------------------------------------------------------------------
-
-class ModuleInfo(object):
- def __init__(self, json=None):
- if not json:
- self._mods = dict()
- return
-
- mods = collections.defaultdict(set)
- installed_path_patt = re.compile(
- '.*[\\\\/]target[\\\\/]product[\\\\/][^\\\\/]+([\\\\/].*)$')
- for module in json.values():
- for path in module['installed']:
- match = installed_path_patt.match(path)
- if match:
- for path in module['path']:
- mods[match.group(1)].add(path)
- self._mods = {installed_path: sorted(src_dirs)
- for installed_path, src_dirs in mods.items()}
-
-
- def get_module_path(self, installed_path):
- return self._mods.get(installed_path, [])
-
-
- @staticmethod
- def load(f):
- return ModuleInfo(json.load(f))
-
-
- @staticmethod
- def load_from_path_or_default(path):
- if not path:
- return ModuleInfo()
- with open(path, 'r') as f:
- return ModuleInfo.load(f)
-
-
-#------------------------------------------------------------------------------
-# Commands
-#------------------------------------------------------------------------------
-
-class Command(object):
- def __init__(self, name, help):
- self.name = name
- self.help = help
-
- def add_argparser_options(self, parser):
- pass
-
- def main(self, args):
- return 0
-
-
-class ELFDumpCommand(Command):
- def __init__(self):
- super(ELFDumpCommand, self).__init__(
- 'elfdump', help='Dump ELF .dynamic section')
-
-
- def add_argparser_options(self, parser):
- parser.add_argument('path', help='path to an ELF file')
-
-
- def main(self, args):
- try:
- ELF.load(args.path).dump()
- except ELFError as e:
- print('error: {}: Bad ELF file ({})'.format(args.path, e),
- file=sys.stderr)
- sys.exit(1)
- return 0
-
-
-class CreateGenericRefCommand(Command):
- def __init__(self):
- super(CreateGenericRefCommand, self).__init__(
- 'create-generic-ref', help='Create generic references')
-
-
- def add_argparser_options(self, parser):
- parser.add_argument('dir')
-
- parser.add_argument('-o', '--output', required=True,
- help='output directory')
-
-
- def main(self, args):
- root = os.path.abspath(args.dir)
- print(root)
- prefix_len = len(root) + 1
- for path, elf in scan_elf_files(root):
- name = path[prefix_len:]
- print('Processing:', name, file=sys.stderr)
- out = os.path.join(args.output, name) + '.sym'
- makedirs(os.path.dirname(out), exist_ok=True)
- with open(out, 'w') as f:
- elf.dump(f)
- return 0
-
-
-class ELFGraphCommand(Command):
- def add_argparser_options(self, parser, is_tag_file_required=None):
- parser.add_argument(
- '--load-extra-deps', action='append',
- help='load extra module dependencies')
-
- parser.add_argument(
- '--system', action='append', default=[],
- help='path to system partition contents')
-
- parser.add_argument(
- '--vendor', action='append', default=[],
- help='path to vendor partition contents')
-
- parser.add_argument(
- '--product', action='append', default=[],
- help='path to product partition contents')
-
- parser.add_argument(
- '--system_ext', action='append', default=[],
- help='path to system_ext partition contents')
-
- # XXX: BEGIN: Remove these options
- parser.add_argument(
- '--system-dir-as-vendor', action='append',
- help='sub directory of system partition that has vendor files')
-
- parser.add_argument(
- '--system-dir-ignored', action='append',
- help='sub directory of system partition that must be ignored')
-
- parser.add_argument(
- '--vendor-dir-as-system', action='append',
- help='sub directory of vendor partition that has system files')
-
- parser.add_argument(
- '--vendor-dir-ignored', action='append',
- help='sub directory of vendor partition that must be ignored')
- # XXX: END: Remove these options
-
- parser.add_argument(
- '--load-generic-refs',
- help='compare with generic reference symbols')
-
- parser.add_argument(
- '--aosp-system',
- help='compare with AOSP generic system image directory')
-
- parser.add_argument(
- '--unzip-files', action='store_true', default=True,
- help='scan ELF files in zip files')
-
- parser.add_argument(
- '--no-unzip-files', action='store_false', dest='unzip_files',
- help='do not scan ELF files in zip files')
-
- parser.add_argument(
- '--tag-file', required=is_tag_file_required,
- help='lib tag file')
-
-
- def get_generic_refs_from_args(self, args):
- if args.load_generic_refs:
- return GenericRefs.create_from_sym_dir(args.load_generic_refs)
- if args.aosp_system:
- return GenericRefs.create_from_image_dir(
- args.aosp_system, '/system')
- return None
-
-
- def _check_arg_dir_exists(self, arg_name, dirs):
- for path in dirs:
- if not os.path.exists(path):
- print('error: Failed to find the directory "{}" specified in '
- '"{}"'.format(path, arg_name), file=sys.stderr)
- sys.exit(1)
- if not os.path.isdir(path):
- print('error: Path "{}" specified in {} is not a directory'
- .format(path, arg_name), file=sys.stderr)
- sys.exit(1)
-
-
- def check_dirs_from_args(self, args):
- self._check_arg_dir_exists('--system', args.system)
- self._check_arg_dir_exists('--vendor', args.vendor)
- self._check_arg_dir_exists('--product', args.product)
- self._check_arg_dir_exists('--system_ext', args.system_ext)
-
-
- def create_from_args(self, args):
- self.check_dirs_from_args(args)
-
- generic_refs = self.get_generic_refs_from_args(args)
-
- vndk_lib_dirs = VNDKLibDir.create_from_dirs(args.system, args.vendor)
-
- if args.tag_file:
- tagged_paths = TaggedPathDict.create_from_csv_path(
- args.tag_file, vndk_lib_dirs)
- else:
- tagged_paths = None
-
- graph = ELFLinker.create(args.system, args.system_dir_as_vendor,
- args.system_dir_ignored,
- args.vendor, args.vendor_dir_as_system,
- args.vendor_dir_ignored,
- args.product,
- args.system_ext,
- args.load_extra_deps,
- generic_refs=generic_refs,
- tagged_paths=tagged_paths,
- unzip_files=args.unzip_files)
-
- return (generic_refs, graph, tagged_paths, vndk_lib_dirs)
-
-
-class VNDKCommandBase(ELFGraphCommand):
- def add_argparser_options(self, parser):
- super(VNDKCommandBase, self).add_argparser_options(parser)
-
- parser.add_argument(
- '--no-default-dlopen-deps', action='store_true',
- help='do not add default dlopen dependencies')
-
- parser.add_argument(
- '--action-ineligible-vndk-sp', default='warn',
- help='action when a sp-hal uses non-vndk-sp libs '
- '(option: follow,warn,ignore)')
-
- parser.add_argument(
- '--action-ineligible-vndk', default='warn',
- help='action when a vendor lib/exe uses fwk-only libs '
- '(option: follow,warn,ignore)')
-
-
- def create_from_args(self, args):
- """Create all essential data structures for VNDK computation."""
-
- generic_refs, graph, tagged_paths, vndk_lib_dirs = \
- super(VNDKCommandBase, self).create_from_args(args)
-
- if not args.no_default_dlopen_deps:
- script_dir = os.path.dirname(os.path.abspath(__file__))
- minimum_dlopen_deps = os.path.join(
- script_dir, 'datasets', 'minimum_dlopen_deps.txt')
- graph.add_dlopen_deps(minimum_dlopen_deps)
-
- return (generic_refs, graph, tagged_paths, vndk_lib_dirs)
-
-
-class VNDKCommand(VNDKCommandBase):
- def __init__(self):
- super(VNDKCommand, self).__init__(
- 'vndk', help='Compute VNDK libraries set')
-
-
- def add_argparser_options(self, parser):
- super(VNDKCommand, self).add_argparser_options(parser)
-
- parser.add_argument(
- '--warn-incorrect-partition', action='store_true',
- help='warn about libraries only have cross partition linkages')
-
- parser.add_argument(
- '--full', action='store_true',
- help='print all classification')
-
- parser.add_argument(
- '--output-format', default='tag',
- help='output format for vndk classification')
-
- parser.add_argument(
- '--file-size-output',
- help='output file for calculated file sizes')
-
-
- def _warn_incorrect_partition_lib_set(self, lib_set, partition, error_msg):
- for lib in lib_set.values():
- if not lib.num_users:
- continue
- if all((user.partition != partition for user in lib.users_all)):
- print(error_msg.format(lib.path), file=sys.stderr)
-
-
- def _warn_incorrect_partition(self, graph):
- self._warn_incorrect_partition_lib_set(
- graph.lib_pt[PT_VENDOR], PT_VENDOR,
- 'warning: {}: This is a vendor library with framework-only '
- 'usages.')
-
- self._warn_incorrect_partition_lib_set(
- graph.lib_pt[PT_SYSTEM], PT_SYSTEM,
- 'warning: {}: This is a framework library with vendor-only '
- 'usages.')
-
-
- @staticmethod
- def _extract_simple_vndk_result(vndk_result):
- field_name_tags = [
- ('vndk_sp', 'vndk_sp'),
- ('vndk_sp_unused', 'vndk_sp'),
- ('vndk_sp_private', 'vndk_sp'),
- ('vndk_sp_private_unused', 'vndk_sp'),
-
- ('vndk_sp_ext', 'vndk_sp_ext'),
- ('vndk_sp_private_ext', 'vndk_sp_ext'),
-
- ('vndk_ext', 'extra_vendor_libs'),
- ('extra_vendor_libs', 'extra_vendor_libs'),
- ]
- results = SimpleVNDKResult()
- for field_name, tag in field_name_tags:
- getattr(results, tag).update(getattr(vndk_result, field_name))
- return results
-
-
- def _print_tags(self, vndk_lib, full, file=sys.stdout):
- if full:
- result_tags = _VNDK_RESULT_FIELD_NAMES
- results = vndk_lib
- else:
- # Simplified VNDK output with only three sets.
- result_tags = _SIMPLE_VNDK_RESULT_FIELD_NAMES
- results = self._extract_simple_vndk_result(vndk_lib)
-
- for tag in result_tags:
- libs = getattr(results, tag)
- tag += ':'
- for lib in sorted_lib_path_list(libs):
- print(tag, lib, file=file)
-
-
- def _print_make(self, vndk_lib, file=sys.stdout):
- def get_module_name(path):
- return os.path.splitext(os.path.basename(path))[0]
-
- def get_module_names(lib_set):
- return sorted({get_module_name(lib.path) for lib in lib_set})
-
- results = self._extract_simple_vndk_result(vndk_lib)
- vndk_sp = get_module_names(results.vndk_sp)
- vndk_sp_ext = get_module_names(results.vndk_sp_ext)
- extra_vendor_libs = get_module_names(results.extra_vendor_libs)
-
- def format_module_names(module_names):
- return '\\\n ' + ' \\\n '.join(module_names)
-
- script_dir = os.path.dirname(os.path.abspath(__file__))
- template_path = os.path.join(script_dir, 'templates', 'vndk.txt')
- with open(template_path, 'r') as f:
- template = f.read()
-
- template = template.replace('##_VNDK_SP_##',
- format_module_names(vndk_sp))
- template = template.replace('##_VNDK_SP_EXT_##',
- format_module_names(vndk_sp_ext))
- template = template.replace('##_EXTRA_VENDOR_LIBS_##',
- format_module_names(extra_vendor_libs))
-
- file.write(template)
-
-
- def _print_file_size_output(self, graph, vndk_lib, file=sys.stderr):
- def collect_tags(lib):
- tags = []
- for field_name in _VNDK_RESULT_FIELD_NAMES:
- if lib in getattr(vndk_lib, field_name):
- tags.append(field_name)
- return ' '.join(tags)
-
- writer = csv.writer(file, lineterminator='\n')
- writer.writerow(('Path', 'Tag', 'File size', 'RO segment file size',
- 'RO segment mem size', 'RW segment file size',
- 'RW segment mem size'))
-
- # Print the file size of all ELF files.
- for lib in sorted(graph.all_libs()):
- writer.writerow((
- lib.path, collect_tags(lib), lib.elf.file_size,
- lib.elf.ro_seg_file_size, lib.elf.ro_seg_mem_size,
- lib.elf.rw_seg_file_size, lib.elf.rw_seg_mem_size))
-
- # Calculate the summation of each sets.
- def calc_total_size(lib_set):
- total_file_size = 0
- total_ro_seg_file_size = 0
- total_ro_seg_mem_size = 0
- total_rw_seg_file_size = 0
- total_rw_seg_mem_size = 0
-
- for lib in lib_set:
- total_file_size += lib.elf.file_size
- total_ro_seg_file_size += lib.elf.ro_seg_file_size
- total_ro_seg_mem_size += lib.elf.ro_seg_mem_size
- total_rw_seg_file_size += lib.elf.rw_seg_file_size
- total_rw_seg_mem_size += lib.elf.rw_seg_mem_size
-
- return [total_file_size, total_ro_seg_file_size,
- total_ro_seg_mem_size, total_rw_seg_file_size,
- total_rw_seg_mem_size]
-
- SEPARATOR = ('----------', None, None, None, None, None, None)
-
- writer.writerow(SEPARATOR)
- for tag in _VNDK_RESULT_FIELD_NAMES:
- lib_set = getattr(vndk_lib, tag)
- lib_set = [lib for lib in lib_set if lib.elf.is_32bit]
- total = calc_total_size(lib_set)
- writer.writerow(['Subtotal ' + tag + ' (32-bit)', None] + total)
-
- writer.writerow(SEPARATOR)
- for tag in _VNDK_RESULT_FIELD_NAMES:
- lib_set = getattr(vndk_lib, tag)
- lib_set = [lib for lib in lib_set if not lib.elf.is_32bit]
- total = calc_total_size(lib_set)
- writer.writerow(['Subtotal ' + tag + ' (64-bit)', None] + total)
-
- writer.writerow(SEPARATOR)
- for tag in _VNDK_RESULT_FIELD_NAMES:
- total = calc_total_size(getattr(vndk_lib, tag))
- writer.writerow(['Subtotal ' + tag + ' (both)', None] + total)
-
- # Calculate the summation of all ELF files.
- writer.writerow(SEPARATOR)
- writer.writerow(['Total', None] + calc_total_size(graph.all_libs()))
-
-
- def main(self, args):
- generic_refs, graph, tagged_paths, _ = self.create_from_args(args)
-
- if args.warn_incorrect_partition:
- self._warn_incorrect_partition(graph)
-
- # Compute vndk heuristics.
- vndk_lib = graph.compute_degenerated_vndk(
- generic_refs, tagged_paths, args.action_ineligible_vndk_sp,
- args.action_ineligible_vndk)
-
- # Print results.
- if args.output_format == 'make':
- self._print_make(vndk_lib)
- else:
- self._print_tags(vndk_lib, args.full)
-
- # Calculate and print file sizes.
- if args.file_size_output:
- with open(args.file_size_output, 'w') as fp:
- self._print_file_size_output(graph, vndk_lib, file=fp)
- return 0
-
-
-class DepsInsightCommand(VNDKCommandBase):
- def __init__(self):
- super(DepsInsightCommand, self).__init__(
- 'deps-insight', help='Generate HTML to show dependencies')
-
-
- def add_argparser_options(self, parser):
- super(DepsInsightCommand, self).add_argparser_options(parser)
-
- parser.add_argument('--module-info')
-
- parser.add_argument('-o', '--output', required=True,
- help='output directory')
-
-
- @staticmethod
- def serialize_data(libs, vndk_lib, module_info):
- strs = []
- strs_dict = dict()
-
- libs.sort(key=lambda lib: lib.path)
- libs_dict = {lib: i for i, lib in enumerate(libs)}
-
- def get_str_idx(s):
- try:
- return strs_dict[s]
- except KeyError:
- idx = len(strs)
- strs_dict[s] = idx
- strs.append(s)
- return idx
-
- def collect_path_sorted_lib_idxs(libs):
- return [libs_dict[lib] for lib in sorted(libs)]
-
- def collect_deps(lib):
- queue = list(lib.deps_all)
- visited = set(queue)
- visited.add(lib)
- deps = []
-
- # Traverse dependencies with breadth-first search.
- while queue:
- # Collect dependencies for next queue.
- next_queue = []
- for lib in queue:
- for dep in lib.deps_all:
- if dep not in visited:
- next_queue.append(dep)
- visited.add(dep)
-
- # Append current queue to result.
- deps.append(collect_path_sorted_lib_idxs(queue))
-
- queue = next_queue
-
- return deps
-
- def collect_source_dir_paths(lib):
- return [get_str_idx(path)
- for path in module_info.get_module_path(lib.path)]
-
- def collect_tags(lib):
- tags = []
- for field_name in _VNDK_RESULT_FIELD_NAMES:
- if lib in getattr(vndk_lib, field_name):
- tags.append(get_str_idx(field_name))
- return tags
-
- mods = []
- for lib in libs:
- mods.append([get_str_idx(lib.path),
- 32 if lib.elf.is_32bit else 64,
- collect_tags(lib),
- collect_deps(lib),
- collect_path_sorted_lib_idxs(lib.users_all),
- collect_source_dir_paths(lib)])
-
- return (strs, mods)
-
-
- def main(self, args):
- generic_refs, graph, tagged_paths, _ = self.create_from_args(args)
-
- module_info = ModuleInfo.load_from_path_or_default(args.module_info)
-
- # Compute vndk heuristics.
- vndk_lib = graph.compute_degenerated_vndk(
- generic_refs, tagged_paths, args.action_ineligible_vndk_sp,
- args.action_ineligible_vndk)
-
- # Serialize data.
- strs, mods = self.serialize_data(
- list(graph.all_libs()), vndk_lib, module_info)
-
- # Generate output files.
- makedirs(args.output, exist_ok=True)
- script_dir = os.path.dirname(os.path.abspath(__file__))
- for name in ('index.html', 'insight.css', 'insight.js'):
- shutil.copyfile(
- os.path.join(script_dir, 'assets', 'insight', name),
- os.path.join(args.output, name))
-
- with open(os.path.join(args.output, 'insight-data.js'), 'w') as f:
- f.write('''(function () {
- var strs = ''' + json.dumps(strs) + ''';
- var mods = ''' + json.dumps(mods) + ''';
- insight.init(document, strs, mods);
-})();''')
-
- return 0
-
-
-class DepsCommand(ELFGraphCommand):
- def __init__(self):
- super(DepsCommand, self).__init__(
- 'deps', help='Print binary dependencies for debugging')
-
-
- def add_argparser_options(self, parser):
- super(DepsCommand, self).add_argparser_options(parser)
-
- parser.add_argument(
- '--revert', action='store_true',
- help='print usage dependency')
-
- parser.add_argument(
- '--leaf', action='store_true',
- help='print binaries without dependencies or usages')
-
- parser.add_argument(
- '--symbols', action='store_true',
- help='print symbols')
-
- parser.add_argument(
- '--path-filter',
- help='filter paths by a regular expression')
-
- parser.add_argument('--module-info')
-
-
- def main(self, args):
- _, graph, _, _ = self.create_from_args(args)
-
- module_info = ModuleInfo.load_from_path_or_default(args.module_info)
-
- if args.path_filter:
- path_filter = re.compile(args.path_filter)
- else:
- path_filter = None
-
- if args.symbols:
- def collect_symbols(user, definer):
- return user.get_dep_linked_symbols(definer)
- else:
- def collect_symbols(user, definer):
- return ()
-
- results = []
- for partition in range(NUM_PARTITIONS):
- for name, lib in graph.lib_pt[partition].items():
- if path_filter and not path_filter.match(name):
- continue
-
- data = []
- if args.revert:
- for assoc_lib in sorted(lib.users_all):
- data.append((assoc_lib.path,
- collect_symbols(assoc_lib, lib)))
- else:
- for assoc_lib in sorted(lib.deps_all):
- data.append((assoc_lib.path,
- collect_symbols(lib, assoc_lib)))
- results.append((name, data))
- results.sort()
-
- if args.leaf:
- for name, deps in results:
- if not deps:
- print(name)
- else:
- delimiter = ''
- for name, assoc_libs in results:
- print(delimiter, end='')
- delimiter = '\n'
-
- print(name)
- for module_path in module_info.get_module_path(name):
- print('\tMODULE_PATH:', module_path)
- for assoc_lib, symbols in assoc_libs:
- print('\t' + assoc_lib)
- for module_path in module_info.get_module_path(assoc_lib):
- print('\t\tMODULE_PATH:', module_path)
- for symbol in symbols:
- print('\t\t' + symbol)
- return 0
-
-
-class DepsClosureCommand(ELFGraphCommand):
- def __init__(self):
- super(DepsClosureCommand, self).__init__(
- 'deps-closure', help='Find transitive closure of dependencies')
-
-
- def add_argparser_options(self, parser):
- super(DepsClosureCommand, self).add_argparser_options(parser)
-
- parser.add_argument('lib', nargs='*',
- help='root set of the shared libraries')
-
- parser.add_argument('--exclude-lib', action='append', default=[],
- help='libraries to be excluded')
-
- parser.add_argument('--exclude-ndk', action='store_true',
- help='exclude ndk libraries')
-
- parser.add_argument('--revert', action='store_true',
- help='print usage dependency')
-
- parser.add_argument('--enumerate', action='store_true',
- help='print closure for each lib instead of union')
-
-
- def print_deps_closure(self, root_libs, graph, is_excluded_libs,
- is_reverted, indent):
- if is_reverted:
- closure = graph.compute_users_closure(root_libs, is_excluded_libs)
- else:
- closure = graph.compute_deps_closure(root_libs, is_excluded_libs)
-
- for lib in sorted_lib_path_list(closure):
- print(indent + lib)
-
-
- def main(self, args):
- _, graph, _, _ = self.create_from_args(args)
-
- # Find root/excluded libraries by their paths.
- def report_error(path):
- print('error: no such lib: {}'.format(path), file=sys.stderr)
- root_libs = graph.get_libs(args.lib, report_error)
- excluded_libs = graph.get_libs(args.exclude_lib, report_error)
-
- # Define the exclusion filter.
- if args.exclude_ndk:
- def is_excluded_libs(lib):
- return lib.is_ll_ndk or lib in excluded_libs
- else:
- def is_excluded_libs(lib):
- return lib in excluded_libs
-
- if not args.enumerate:
- self.print_deps_closure(root_libs, graph, is_excluded_libs,
- args.revert, '')
- else:
- if not root_libs:
- root_libs = list(graph.all_libs())
- for lib in sorted(root_libs):
- print(lib.path)
- self.print_deps_closure({lib}, graph, is_excluded_libs,
- args.revert, '\t')
- return 0
-
-
-class DepsUnresolvedCommand(ELFGraphCommand):
- def __init__(self):
- super(DepsUnresolvedCommand, self).__init__(
- 'deps-unresolved',
- help='Show unresolved dt_needed entries or symbols')
-
-
- def add_argparser_options(self, parser):
- super(DepsUnresolvedCommand, self).add_argparser_options(parser)
- parser.add_argument('--module-info')
- parser.add_argument('--path-filter')
-
-
- def _dump_unresolved(self, lib, module_info, delimiter):
- if not lib.unresolved_symbols and not lib.unresolved_dt_needed:
- return
-
- print(delimiter, end='')
- print(lib.path)
- for module_path in module_info.get_module_path(lib.path):
- print('\tMODULE_PATH:', module_path)
- for dt_needed in sorted(lib.unresolved_dt_needed):
- print('\tUNRESOLVED_DT_NEEDED:', dt_needed)
- for symbol in sorted(lib.unresolved_symbols):
- print('\tUNRESOLVED_SYMBOL:', symbol)
-
-
- def main(self, args):
- _, graph, _, _ = self.create_from_args(args)
- module_info = ModuleInfo.load_from_path_or_default(args.module_info)
-
- libs = graph.all_libs()
- if args.path_filter:
- path_filter = re.compile(args.path_filter)
- libs = [lib for lib in libs if path_filter.match(lib.path)]
-
- delimiter = ''
- for lib in sorted(libs):
- self._dump_unresolved(lib, module_info, delimiter)
- delimiter = '\n'
-
-
-class ApkDepsCommand(ELFGraphCommand):
- def __init__(self):
- super(ApkDepsCommand, self).__init__(
- 'apk-deps', help='Print APK dependencies for debugging')
-
-
- def main(self, args):
- _, graph, _, _ = self.create_from_args(args)
-
- apk_deps = scan_apk_dep(graph, args.system, args.vendor, args.product,
- args.system_ext)
-
- for apk_path, dep_paths in apk_deps:
- print(apk_path)
- for dep_path in dep_paths:
- print('\t' + dep_path)
-
- return 0
-
-
-class CheckDepCommandBase(ELFGraphCommand):
- def __init__(self, *args, **kwargs):
- super(CheckDepCommandBase, self).__init__(*args, **kwargs)
- self.delimiter = ''
-
-
- def add_argparser_options(self, parser):
- super(CheckDepCommandBase, self).add_argparser_options(parser)
- parser.add_argument('--module-info')
-
-
- def _print_delimiter(self):
- print(self.delimiter, end='')
- self.delimiter = '\n'
-
-
- def _dump_dep(self, lib, bad_deps, module_info):
- self._print_delimiter()
- print(lib.path)
- for module_path in module_info.get_module_path(lib.path):
- print('\tMODULE_PATH:', module_path)
- for dep in sorted(bad_deps):
- print('\t' + dep.path)
- for module_path in module_info.get_module_path(dep.path):
- print('\t\tMODULE_PATH:', module_path)
- for symbol in lib.get_dep_linked_symbols(dep):
- print('\t\t' + symbol)
-
-
- def _dump_apk_dep(self, apk_path, bad_deps, module_info):
- self._print_delimiter()
- print(apk_path)
- for module_path in module_info.get_module_path(apk_path):
- print('\tMODULE_PATH:', module_path)
- for dep_path in sorted(bad_deps):
- print('\t' + dep_path)
- for module_path in module_info.get_module_path(dep_path):
- print('\t\tMODULE_PATH:', module_path)
-
-
-class CheckDepCommand(CheckDepCommandBase):
- def __init__(self):
- super(CheckDepCommand, self).__init__(
- 'check-dep', help='Check the eligible dependencies')
-
-
- def add_argparser_options(self, parser):
- super(CheckDepCommand, self).add_argparser_options(parser)
-
- group = parser.add_mutually_exclusive_group()
-
- group.add_argument('--check-apk', action='store_true', default=False,
- help='Check JNI dependencies in APK files')
-
- group.add_argument('--no-check-apk', action='store_false',
- dest='check_apk',
- help='Do not check JNI dependencies in APK files')
-
- group = parser.add_mutually_exclusive_group()
-
- group.add_argument('--check-dt-needed-ordering',
- action='store_true', default=False,
- help='Check ordering of DT_NEEDED entries')
-
- group.add_argument('--no-check-dt-needed-ordering',
- action='store_false',
- dest='check_dt_needed_ordering',
- help='Do not check ordering of DT_NEEDED entries')
-
-
- def _load_public_lib_names(self, system_dirs, vendor_dirs):
- names = PublicLibSet()
- for base in itertools.chain(system_dirs, vendor_dirs):
- config_path = os.path.join(base, 'etc', 'public.libraries.txt')
- try:
- names.load_from_public_libraries_txt(config_path)
- except FileNotFoundError:
- pass
- return names
-
-
- def _check_vendor_dep(self, graph, tagged_libs, lib_properties,
- module_info, public_libs):
- """Check whether vendor libs are depending on non-eligible libs."""
- num_errors = 0
-
- vendor_libs = set(graph.lib_pt[PT_VENDOR].values())
- vendor_libs.update(graph.lib_pt[PT_PRODUCT].values())
-
- eligible_libs = (tagged_libs.ll_ndk | tagged_libs.vndk_sp |
- tagged_libs.vndk_sp_private | tagged_libs.vndk)
-
- def _is_app_lib(lib):
- app_dirs = [
- '/product/app',
- '/product/priv-app',
- '/system_ext/app',
- '/system_ext/priv-app',
- '/vendor/app',
- '/vendor/priv-app',
- ]
- return any(_is_under_dir(d, lib.path) for d in app_dirs)
-
- for lib in sorted(vendor_libs):
- bad_deps = set()
-
- # Check whether vendor modules depend on extended NDK symbols.
- for dep, symbols in lib.imported_ext_symbols.items():
- if dep.is_ll_ndk:
- num_errors += 1
- bad_deps.add(dep)
- for symbol in symbols:
- print('error: vendor lib "{}" depends on extended '
- 'NDK symbol "{}" from "{}".'
- .format(lib.path, symbol, dep.path),
- file=sys.stderr)
-
- # Check whether vendor modules depend on ineligible libs.
- for dep in lib.deps_all:
- if dep not in vendor_libs and dep not in eligible_libs:
- if _is_app_lib(lib) and public_libs.is_public_lib(dep.path):
- # It is fine for APK files to depend on public
- # libraries (including NDK or other explicitly exposed
- # libs).
- continue
-
- num_errors += 1
- bad_deps.add(dep)
-
- dep_name = os.path.splitext(os.path.basename(dep.path))[0]
- dep_properties = lib_properties.get(dep_name)
- if not dep_properties.vendor_available:
- print('error: vendor lib "{}" depends on non-eligible '
- 'lib "{}".'.format(lib.path, dep.path),
- file=sys.stderr)
- elif dep_properties.vndk_sp:
- print('error: vendor lib "{}" depends on vndk-sp "{}" '
- 'but it must be copied to '
- '/system/lib[64]/vndk-sp.'
- .format(lib.path, dep.path),
- file=sys.stderr)
- elif dep_properties.vndk:
- print('error: vendor lib "{}" depends on vndk "{}" '
- 'but it must be copied to /system/lib[64]/vndk.'
- .format(lib.path, dep.path),
- file=sys.stderr)
- else:
- print('error: vendor lib "{}" depends on '
- 'vendor_available "{}" but it must be copied to '
- '/vendor/lib[64].'.format(lib.path, dep.path),
- file=sys.stderr)
-
- if bad_deps:
- self._dump_dep(lib, bad_deps, module_info)
-
- return num_errors
-
-
- def _check_dt_needed_ordering(self, graph):
- """Check DT_NEEDED entries order of all libraries"""
-
- num_errors = 0
-
- def _is_libc_prior_to_libdl(lib):
- dt_needed = lib.elf.dt_needed
- try:
- return dt_needed.index('libc.so') < dt_needed.index('libdl.so')
- except ValueError:
- return True
-
- for lib in sorted(graph.all_libs()):
- if _is_libc_prior_to_libdl(lib):
- continue
-
- print('error: The ordering of DT_NEEDED entries in "{}" may be '
- 'problematic. libc.so must be prior to libdl.so. '
- 'But found: {}.'
- .format(lib.path, lib.elf.dt_needed), file=sys.stderr)
-
- num_errors += 1
-
- return num_errors
-
-
- def _check_apk_dep(self, graph, system_dirs, vendor_dirs, product_dirs,
- system_ext_dirs, module_info):
- num_errors = 0
-
- def is_in_system_partition(path):
- return path.startswith('/system/') or \
- path.startswith('/product/') or \
- path.startswith('/oem/')
-
- apk_deps = scan_apk_dep(graph, system_dirs, vendor_dirs, product_dirs,
- system_ext_dirs)
-
- for apk_path, dep_paths in apk_deps:
- apk_in_system = is_in_system_partition(apk_path)
- bad_deps = []
- for dep_path in dep_paths:
- dep_in_system = is_in_system_partition(dep_path)
- if apk_in_system != dep_in_system:
- bad_deps.append(dep_path)
- print('error: apk "{}" has cross-partition dependency '
- 'lib "{}".'.format(apk_path, dep_path),
- file=sys.stderr)
- num_errors += 1
- if bad_deps:
- self._dump_apk_dep(apk_path, sorted(bad_deps), module_info)
- return num_errors
-
-
- def main(self, args):
- generic_refs, graph, tagged_paths, vndk_lib_dirs = \
- self.create_from_args(args)
-
- tagged_paths = TaggedPathDict.create_from_csv_path(
- args.tag_file, vndk_lib_dirs)
- tagged_libs = TaggedLibDict.create_from_graph(
- graph, tagged_paths, generic_refs)
-
- module_info = ModuleInfo.load_from_path_or_default(args.module_info)
-
- lib_properties_path = \
- LibProperties.get_lib_properties_file_path(args.tag_file)
- lib_properties = \
- LibProperties.load_from_path_or_default(lib_properties_path)
-
- public_libs = self._load_public_lib_names(args.system, args.vendor)
-
- num_errors = self._check_vendor_dep(graph, tagged_libs, lib_properties,
- module_info, public_libs)
-
- if args.check_dt_needed_ordering:
- num_errors += self._check_dt_needed_ordering(graph)
-
- if args.check_apk:
- num_errors += self._check_apk_dep(
- graph, args.system, args.vendor, args.product, args.system_ext,
- module_info)
-
- return 0 if num_errors == 0 else 1
-
-
-class DumpDexStringCommand(Command):
- def __init__(self):
- super(DumpDexStringCommand, self).__init__(
- 'dump-dex-string',
- help='Dump string literals defined in a dex file')
-
-
- def add_argparser_options(self, parser):
- super(DumpDexStringCommand, self).add_argparser_options(parser)
-
- parser.add_argument('dex_file', help='path to an input dex file')
-
-
- def main(self, args):
- for string in DexFileReader.enumerate_dex_strings(args.dex_file):
- try:
- print(string)
- except (UnicodeEncodeError, UnicodeDecodeError):
- print(repr(string))
-
-
-class DepGraphCommand(ELFGraphCommand):
- def __init__(self):
- super(DepGraphCommand, self).__init__(
- 'dep-graph', help='Visualize violating dependencies with HTML')
-
-
- def add_argparser_options(self, parser):
- super(DepGraphCommand, self).add_argparser_options(
- parser, is_tag_file_required=True)
-
- parser.add_argument('-o', '--output', required=True,
- help='output directory')
-
-
- @staticmethod
- def _create_tag_hierarchy():
- hierarchy = dict()
- for tag in TaggedPathDict.TAGS:
- if tag in {'sp_hal', 'sp_hal_dep', 'vendor_only'}:
- hierarchy[tag] = 'vendor.private.{}'.format(tag)
- else:
- vendor_visible = TaggedPathDict.is_tag_visible(
- 'vendor_only', tag)
- pub = 'public' if vendor_visible else 'private'
- hierarchy[tag] = 'system.{}.{}'.format(pub, tag)
- return hierarchy
-
-
- @staticmethod
- def _get_lib_tag(hierarchy, tagged_paths, lib):
- return hierarchy[tagged_paths.get_path_tag(lib.path)]
-
-
- @staticmethod
- def _is_dep_allowed(user_tag, dep_tag):
- user_partition, _, _ = user_tag.split('.')
- dep_partition, dep_visibility, _ = dep_tag.split('.')
- if user_partition == 'system' and dep_partition == 'vendor':
- return False
- if user_partition == 'vendor' and dep_partition == 'system':
- if dep_visibility == 'private':
- return False
- return True
-
-
- def _get_dep_graph(self, graph, tagged_paths):
- hierarchy = self._create_tag_hierarchy()
-
- # Build data and violate_libs.
- data = []
- violate_libs = collections.defaultdict(list)
-
- for lib in graph.all_libs():
- lib_tag = self._get_lib_tag(hierarchy, tagged_paths, lib)
- lib_item = {
- 'name': lib.path,
- 'tag': lib_tag,
- 'depends': [],
- 'violates': [],
- }
- violate_count = 0
- for dep in lib.deps_all:
- dep_tag = self._get_lib_tag(hierarchy, tagged_paths, dep)
- if self._is_dep_allowed(lib_tag, dep_tag):
- lib_item['depends'].append(dep.path)
- else:
- lib_item['violates'].append([
- dep.path, lib.get_dep_linked_symbols(dep)])
- violate_count += 1
- lib_item['violate_count'] = violate_count
- if violate_count > 0:
- violate_libs[lib_tag].append((lib.path, violate_count))
- data.append(lib_item)
-
- # Sort data and violate_libs.
- data.sort(
- key=lambda lib_item: (lib_item['tag'], lib_item['violate_count']))
- for libs in violate_libs.values():
- libs.sort(key=lambda violate_item: violate_item[1], reverse=True)
-
- return data, violate_libs
-
-
- def main(self, args):
- _, graph, tagged_paths, _ = self.create_from_args(args)
-
- data, violate_libs = self._get_dep_graph(graph, tagged_paths)
-
- makedirs(args.output, exist_ok=True)
- script_dir = os.path.dirname(os.path.abspath(__file__))
- for name in ('index.html', 'dep-graph.js', 'dep-graph.css'):
- shutil.copyfile(os.path.join(script_dir, 'assets', 'visual', name),
- os.path.join(args.output, name))
- with open(os.path.join(args.output, 'dep-data.js'), 'w') as f:
- f.write('var violatedLibs = ' + json.dumps(violate_libs) + ';\n')
- f.write('var depData = ' + json.dumps(data) + ';\n')
-
- return 0
-
-
-def main():
- parser = argparse.ArgumentParser()
- subparsers = parser.add_subparsers(dest='subcmd')
- subcmds = dict()
-
- def register_subcmd(cmd):
- subcmds[cmd.name] = cmd
- cmd.add_argparser_options(
- subparsers.add_parser(cmd.name, help=cmd.help))
-
- register_subcmd(ELFDumpCommand())
- register_subcmd(CreateGenericRefCommand())
- register_subcmd(VNDKCommand())
- register_subcmd(DepsCommand())
- register_subcmd(DepsClosureCommand())
- register_subcmd(DepsInsightCommand())
- register_subcmd(DepsUnresolvedCommand())
- register_subcmd(ApkDepsCommand())
- register_subcmd(CheckDepCommand())
- register_subcmd(DepGraphCommand())
- register_subcmd(DumpDexStringCommand())
-
- args = parser.parse_args()
- if not args.subcmd:
- parser.print_help()
- sys.exit(1)
- return subcmds[args.subcmd].main(args)
-
-if __name__ == '__main__':
- sys.exit(main())