| .. | ||
| res | ||
| src/com/android/cts/dexmetadata | ||
| Android.bp | ||
| AndroidTest.xml | ||
| OWNERS | ||
| README.md | ||
How to update APK files and DM files in the res folder
The source code of the test app is in ../app/SplitApp. After updating the
source code, you need to update the APK files and DM files in the res folder.
Updating APK files
-
Build the APK from source.
m CtsDexMetadataSplitApp -
Copy the APK to the
resfolder.cp \ $ANDROID_BUILD_TOP/out/host/linux-x86/cts/android-cts/testcases/CtsDexMetadataSplitApp/x86_64/CtsDexMetadataSplitApp.apk \ res/CtsDexMetadataSplitApp.apkNote: You may need to replace
x86_64with a different ISA, depending on the product that youlunch-ed. -
Repeat the steps above for the split APK (
CtsDexMetadataSplitAppFeatureA).
Updating DM files
The DM files contain profiles, whose headers have the dex checksums that need to match the dex files in the APKs. Therefore, after updating the APKs, you must update the DM files.
-
Create a binary profile from the text profile.
profman \ --create-profile-from=res/CtsDexMetadataSplitApp.prof.txt \ --apk=res/CtsDexMetadataSplitApp.apk \ --dex-location=base.apk \ --reference-profile-file=/tmp/primary.prof \ --output-profile-type=appNote:
--dex-locationmust be set tobase.apk, regardless of the actual APK name.Note:
--reference-profile-fileis the output. You can specify a different output location, but the filename must beprimary.prof.Tip: If
profmanis not found, runm profman. -
Delete the existing DM file and create the DM file from the binary profile.
rm res/CtsDexMetadataSplitApp.dm zip -j res/CtsDexMetadataSplitApp.dm /tmp/primary.prof -
Repeat the steps above for the split APK (
CtsDexMetadataSplitAppFeatureA).