Change the hashtree hash algorithm to sha256
Bug: 155771970
Test: build an arbitrary APEX (e.g. com.android.runtime)
$ unzip com.android.runtime.apex
$ avbtool info_image --image apex_payload.img | grep Hash
Hashtree descriptor:
Hash Block Size: 4096 bytes
Hash Algorithm: sha256
Test: compare the APEX size before and after the change: no difference
Change-Id: I8924349287d38a72be1058424a100c1981f656d1
diff --git a/apexer/apexer.py b/apexer/apexer.py
index 7a114d4..f698c8c 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -546,6 +546,7 @@
cmd.append('add_hashtree_footer')
cmd.append('--do_not_generate_fec')
cmd.extend(['--algorithm', 'SHA256_RSA4096'])
+ cmd.extend(['--hash_algorithm', 'sha256'])
cmd.extend(['--key', args.key])
cmd.extend(['--prop', 'apex.key:' + key_name])
# Set up the salt based on manifest content which includes name