This is based on Anton's script and modified to support
framework-permission-s.
Bug: 177884752
Test: manual
Test: prebuilts/sdk/update_prebuilts/update_prebuilts.py -f 31 7126175
Test: packages/modules/common/generate_ml_bundle.sh ../../../ ../../../ 31
Change-Id: Ie32aa820b3589d68545c1a11c098dbd3be4f92ff