To support XL APKs, increase INCFS_MAX_HASH_AREA_SIZE from 1280 MB (1.25 GB) to 1792 MB (1.75 GB). A 1792 MB hash area supports APKs up to about 238 GB (~222 GiB), while keeping total block calculations below the 32-bit signed integer overflow boundary (2.0 GB).
Test:
Without increasing the limit:
adb install -t --incremental large_app_200gb.apk
Performing Incremental Install
Serving...
Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE: Failed to add file to IncFS: large_app_200gb.apk, reason: : makeFile() failed with errno 7]
Install failed.
With the increased limit:
adb install -t --incremental large_app_200gb.apk
Performing Incremental Install
Serving...
Success
Bug: 522943057
Change-Id: I860604030438074048689c4675ea02740f0d5aa8
Signed-off-by: Sneh Saraff <snehsaraff@google.com>