FastDeploy refactor: 2+GB APK support, optimizations, tests.
- removed 2GB apk size cap,
- removed zip archive parsing on device (1.1M->236K agent size reduction),
- optimized matching entries search,
- added more robust matching entries search based on hash of CDr entry,
- reduced patch size by reusing Local File Header of matched entries,
- removed extra manifest parsing and extra agent calls,
- added device-side tests for agent,
- fix for Windows patch creation.
Test: atest adb_test fastdeploy_test FastDeployTests
Total time for 0-size patch reduction for 1.7G apk: 1m1.778s->0m36.234s.
Change-Id: I66d2cef1adf5b2be3325e355a7e72e9c99992369
diff --git a/adb/Android.bp b/adb/Android.bp
index 3dc70b5..2f9c8fc 100644
--- a/adb/Android.bp
+++ b/adb/Android.bp
@@ -27,7 +27,6 @@
"-DADB_HOST=1", // overridden by adbd_defaults
"-DALLOW_ADBD_ROOT=0", // overridden by adbd_defaults
"-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION=1",
- "-DENABLE_FASTDEPLOY=1", // enable fast deploy
],
cpp_std: "experimental",
@@ -691,6 +690,7 @@
name: "libfastdeploy_host",
defaults: ["adb_defaults"],
srcs: [
+ "fastdeploy/deploypatchgenerator/apk_archive.cpp",
"fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp",
"fastdeploy/deploypatchgenerator/patch_utils.cpp",
"fastdeploy/proto/ApkEntry.proto",
@@ -727,6 +727,7 @@
name: "fastdeploy_test",
defaults: ["adb_defaults"],
srcs: [
+ "fastdeploy/deploypatchgenerator/apk_archive_test.cpp",
"fastdeploy/deploypatchgenerator/deploy_patch_generator_test.cpp",
"fastdeploy/deploypatchgenerator/patch_utils_test.cpp",
],
@@ -754,6 +755,9 @@
},
},
data: [
+ "fastdeploy/testdata/rotating_cube-metadata-release.data",
"fastdeploy/testdata/rotating_cube-release.apk",
+ "fastdeploy/testdata/sample.apk",
+ "fastdeploy/testdata/sample.cd",
],
}