Publish mac version of veridex, update README
Changed update.py to also include veridex.sdk from sdk_mac builds.
Only the zip from sdk_arm64 is extracted.
README updated with instructions for mac and windows (using WSL).
Test: appcompat/update.py
Change-Id: Icbd23032ed8363bb3c15bc9bf4dac89a4a19eb22
diff --git a/appcompat/README.txt b/appcompat/README.txt
index 73fd14d..6ab6717 100644
--- a/appcompat/README.txt
+++ b/appcompat/README.txt
@@ -1,5 +1,4 @@
-appcompat.sh
-============
+# appcompat.sh
Given an APK, finds API uses that fall into the blacklist/greylists APIs.
@@ -7,8 +6,27 @@
API uses that do not execute at runtime, and reflection uses
that do not exist. It can also miss on reflection uses.
-Currently only works on Linux x64.
+## Instructions
-To run it:
-> unzip veridex.zip
-> appcompat.sh --dex-file=test.apk
+Note that only 64-bit binaries are provided. 32-bit systems are not supported.
+
+### Linux x64
+
+Download veridex-linux.zip, unzip the file and run with:
+> ./appcompat.sh --dex-file=test.apk
+
+### macOS
+
+Download veridex-mac.zip, unzip the file and run with:
+> ./appcompat.sh --dex-file=test.apk
+
+### Windows 10
+
+Native Windows binaries are not provided, but the Linux binaries can be executed
+with Windows Subsystem for Linux (WSL).
+
+Follow the instructions at [this
+link](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and install
+Ubuntu distribution when given the choice. Once installed, launch an Ubuntu
+terminal and follow instructions for Linux.
+
diff --git a/appcompat/update.py b/appcompat/update.py
index 2e8a7f1..9a2c619 100644
--- a/appcompat/update.py
+++ b/appcompat/update.py
@@ -27,25 +27,27 @@
class InstallEntry(object):
- def __init__(self, target, name, install_path, need_strip=False):
+ def __init__(self, target, name, install_path, need_strip=False, need_unzip=False):
self.target = target
self.name = name
self.install_path = install_path
self.need_strip = need_strip
+ self.need_unzip = need_unzip
install_list = [
- InstallEntry('sdk_arm64-sdk', 'veridex.zip', 'veridex.zip', False),
+ InstallEntry('sdk_arm64-sdk', 'veridex.zip', 'veridex-linux.zip', need_unzip=True),
+ InstallEntry('sdk_mac', 'veridex.zip', 'veridex-mac.zip'),
]
extracted_list = [
- InstallEntry('sdk_arm64-sdk', 'veridex', 'veridex', True),
- InstallEntry('sdk_arm64-sdk', 'appcompat.sh', 'appcompat.sh', False),
- InstallEntry('sdk_arm64-sdk', 'hiddenapi-light-greylist.txt', 'hiddenapi-light-greylist.txt', False),
- InstallEntry('sdk_arm64-sdk', 'hiddenapi-dark-greylist.txt', 'hiddenapi-dark-greylist.txt', False),
- InstallEntry('sdk_arm64-sdk', 'hiddenapi-blacklist.txt', 'hiddenapi-blacklist.txt', False),
- InstallEntry('sdk_arm64-sdk', 'system-stubs.zip', 'system-stubs.zip', False),
- InstallEntry('sdk_arm64-sdk', 'org.apache.http.legacy-stubs.zip', 'org.apache.http.legacy-stubs.zip', False),
+ InstallEntry('sdk_arm64-sdk', 'veridex', 'veridex', need_strip=True),
+ InstallEntry('sdk_arm64-sdk', 'appcompat.sh', 'appcompat.sh'),
+ InstallEntry('sdk_arm64-sdk', 'hiddenapi-light-greylist.txt', 'hiddenapi-light-greylist.txt'),
+ InstallEntry('sdk_arm64-sdk', 'hiddenapi-dark-greylist.txt', 'hiddenapi-dark-greylist.txt'),
+ InstallEntry('sdk_arm64-sdk', 'hiddenapi-blacklist.txt', 'hiddenapi-blacklist.txt'),
+ InstallEntry('sdk_arm64-sdk', 'system-stubs.zip', 'system-stubs.zip'),
+ InstallEntry('sdk_arm64-sdk', 'org.apache.http.legacy-stubs.zip', 'org.apache.http.legacy-stubs.zip'),
]
def logger():
@@ -130,6 +132,7 @@
name = entry.name
install_path = entry.install_path
need_strip = entry.need_strip
+ need_unzip = entry.need_unzip
fetch_artifact(branch, build, target, name)
if need_strip:
@@ -139,7 +142,7 @@
os.makedirs(dir)
shutil.move(name, install_path)
- if install_path.endswith('.zip'):
+ if need_unzip:
unzip(install_path)