Home
last modified time | relevance | path

Searched refs:apk (Results 1 – 25 of 150) sorted by relevance

123456

/frameworks/base/packages/CtsShim/
DAndroid.bp33 apk: "apk/arm/CtsShimPriv.apk",
36 apk: "apk/arm/CtsShimPriv.apk",
39 apk: "apk/x86/CtsShimPriv.apk",
42 apk: "apk/x86/CtsShimPriv.apk",
61 apk: "apk/arm/CtsShim.apk",
64 apk: "apk/arm/CtsShim.apk",
67 apk: "apk/x86/CtsShim.apk",
70 apk: "apk/x86/CtsShim.apk",
/frameworks/base/packages/CtsShim/build/
DREADME9 For local testing, build the apk and put them in the following folders.
13 $ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \
14 cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/apk/arm
15 $ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \
16 vendor/xts/gts-tests/hostsidetests/packagemanager/app/apk/arm/GtsShimPrivUpgrade.apk
17 $ cp $OUT/system/priv-app/CtsShimPrivUpgradeWrongSHA/CtsShimPrivUpgradeWrongSHA.apk \
18 cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/apk/arm
19 $ cp $OUT/system/priv-app/CtsShimPriv/CtsShimPriv.apk \
20 frameworks/base/packages/CtsShim/apk/arm
21 $ cp $OUT/system/app/CtsShim/CtsShim.apk \
[all …]
/frameworks/base/core/java/android/util/apk/
DApkSignatureSchemeV2Verifier.java17 package android.util.apk;
19 import static android.util.apk.ApkSigningBlockUtils.CONTENT_DIGEST_VERITY_CHUNKED_SHA256;
20 import static android.util.apk.ApkSigningBlockUtils.compareSignatureAlgorithm;
21 import static android.util.apk.ApkSigningBlockUtils.getContentDigestAlgorithmJcaDigestAlgorithm;
22 import static android.util.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
23 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmContentDigestAlgorithm;
24 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaKeyAlgorithm;
25 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaSignatureAlgorithm;
26 import static android.util.apk.ApkSigningBlockUtils.isSupportedSignatureAlgorithm;
27 import static android.util.apk.ApkSigningBlockUtils.pickBestDigestForV4;
[all …]
DApkSignatureSchemeV3Verifier.java17 package android.util.apk;
19 import static android.util.apk.ApkSigningBlockUtils.CONTENT_DIGEST_VERITY_CHUNKED_SHA256;
20 import static android.util.apk.ApkSigningBlockUtils.compareSignatureAlgorithm;
21 import static android.util.apk.ApkSigningBlockUtils.getContentDigestAlgorithmJcaDigestAlgorithm;
22 import static android.util.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
23 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmContentDigestAlgorithm;
24 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaKeyAlgorithm;
25 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaSignatureAlgorithm;
26 import static android.util.apk.ApkSigningBlockUtils.isSupportedSignatureAlgorithm;
27 import static android.util.apk.ApkSigningBlockUtils.pickBestDigestForV4;
[all …]
DVerityBuilder.java17 package android.util.apk;
81 public static VerityResult generateApkVerityTree(@NonNull RandomAccessFile apk, in generateApkVerityTree() argument
84 return generateVerityTreeInternal(apk, bufferFactory, signatureInfo); in generateApkVerityTree()
88 private static VerityResult generateVerityTreeInternal(@NonNull RandomAccessFile apk, in generateVerityTreeInternal() argument
93 long dataSize = apk.length() - signingBlockSize; in generateVerityTreeInternal()
102 byte[] apkRootHash = generateVerityTreeInternal(apk, signatureInfo, DEFAULT_SALT, in generateVerityTreeInternal()
107 static void generateApkVerityFooter(@NonNull RandomAccessFile apk, in generateApkVerityFooter() argument
111 generateApkVerityHeader(footerOutput, apk.length(), DEFAULT_SALT); in generateApkVerityFooter()
123 static byte[] generateApkVerityRootHash(@NonNull RandomAccessFile apk, in generateApkVerityRootHash() argument
129 generateApkVerityFooter(apk, signatureInfo, footer); in generateApkVerityRootHash()
[all …]
DSourceStampVerifier.java17 package android.util.apk;
19 import static android.util.apk.ApkSigningBlockUtils.CONTENT_DIGEST_SHA256;
20 import static android.util.apk.ApkSigningBlockUtils.compareSignatureAlgorithm;
21 import static android.util.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
22 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmContentDigestAlgorithm;
23 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaSignatureAlgorithm;
24 import static android.util.apk.ApkSigningBlockUtils.isSupportedSignatureAlgorithm;
25 import static android.util.apk.ApkSigningBlockUtils.readLengthPrefixedByteArray;
111 try (RandomAccessFile apk = new RandomAccessFile(apkFile, "r")) { in verify() argument
124 return verify(apk, sourceStampCertificateDigest, manifestBytes); in verify()
[all …]
DApkSignatureSchemeV4Verifier.java17 package android.util.apk;
19 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaKeyAlgorithm;
20 import static android.util.apk.ApkSigningBlockUtils.getSignatureAlgorithmJcaSignatureAlgorithm;
21 import static android.util.apk.ApkSigningBlockUtils.isSupportedSignatureAlgorithm;
58 final File apk = new File(apkFile); in extractCertificates() local
60 apk.getAbsolutePath()); in extractCertificates()
82 final byte[] signedData = V4Signature.getSigningData(apk.length(), hashingInfo, in extractCertificates()
DApkSigningBlockUtils.java17 package android.util.apk;
58 static SignatureInfo findSignature(RandomAccessFile apk, int blockId) in findSignature() argument
61 Pair<ByteBuffer, Long> eocdAndOffsetInFile = getEocd(apk); in findSignature()
64 if (ZipUtils.isZip64EndOfCentralDirectoryLocatorPresent(apk, eocdOffset)) { in findSignature()
71 findApkSigningBlock(apk, centralDirOffset); in findSignature()
89 RandomAccessFile apk, in verifyIntegrity() argument
108 verifyIntegrityFor1MbChunkBasedAlgorithm(expected1MbChunkDigests, apk.getFD(), in verifyIntegrity()
118 expectedDigests.get(CONTENT_DIGEST_VERITY_CHUNKED_SHA256), apk, signatureInfo); in verifyIntegrity() local
348 RandomAccessFile apk, in verifyIntegrityForVerityBasedAlgorithm() argument
352 apk.length(), signatureInfo); in verifyIntegrityForVerityBasedAlgorithm()
[all …]
/frameworks/base/tools/aapt2/cmd/
DDump.cpp228 int DumpConfigsCommand::Dump(LoadedApk* apk) { in Dump() argument
229 ResourceTable* table = apk->GetResourceTable(); in Dump()
259 int DumpPackageNameCommand::Dump(LoadedApk* apk) { in Dump() argument
260 Maybe<std::string> package_name = GetPackageName(apk); in Dump()
269 int DumpStringsCommand::Dump(LoadedApk* apk) { in Dump() argument
270 ResourceTable* table = apk->GetResourceTable(); in Dump()
285 int DumpStyleParentCommand::Dump(LoadedApk* apk) { in Dump() argument
286 Maybe<std::string> package_name = GetPackageName(apk); in Dump()
292 const auto table = apk->GetResourceTable(); in Dump()
310 int DumpTableCommand::Dump(LoadedApk* apk) { in Dump() argument
[all …]
DDump.h46 Maybe<std::string> GetPackageName(LoadedApk* apk) { in GetPackageName() argument
47 xml::Element* manifest_el = apk->GetManifest()->root.get(); in GetPackageName()
62 virtual int Dump(LoadedApk* apk) = 0;
71 for (auto apk : args) { in Action() local
72 auto loaded_apk = LoadedApk::LoadApkFromPath(apk, diag_); in Action()
131 int Dump(LoadedApk* apk) override { in Dump() argument
132 return DumpManifest(apk, options_, GetPrinter(), GetDiagnostics()); in Dump()
146 int Dump(LoadedApk* apk) override;
156 int Dump(LoadedApk* apk) override;
166 int Dump(LoadedApk* apk) override { in Dump() argument
[all …]
DLink_test.cpp46 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_apk, &diag); in TEST_F() local
47 std::unique_ptr<io::IData> data = OpenFileAsData(apk.get(), "res/xml/test.xml"); in TEST_F()
49 AssertLoadXml(apk.get(), data.get(), &tree); in TEST_F()
72 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_apk, &diag); in TEST_F() local
73 std::unique_ptr<io::IData> data = OpenFileAsData(apk.get(), "res/xml/test.xml"); in TEST_F()
75 AssertLoadXml(apk.get(), data.get(), &tree); in TEST_F()
105 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_apk, &diag); in TEST_F() local
106 ASSERT_THAT(apk, Ne(nullptr)); in TEST_F()
107 io::IFileCollection* zip = apk->GetFileCollection(); in TEST_F()
153 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_apk, &diag); in TEST_F() local
[all …]
DConvert.cpp263 int Convert(IAaptContext* context, LoadedApk* apk, IArchiveWriter* output_writer, in Convert() argument
268 serializer.reset(new BinaryApkSerializer(context, apk->GetSource(), table_flattener_options, in Convert()
271 serializer.reset(new ProtoApkSerializer(context, apk->GetSource())); in Convert()
273 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
278 io::IFile* manifest = apk->GetFileCollection()->FindFile(kAndroidManifestPath); in Convert()
279 if (!serializer->SerializeXml(apk->GetManifest(), kAndroidManifestPath, true /*utf16*/, in Convert()
282 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
287 if (apk->GetResourceTable() != nullptr) { in Convert()
289 auto converted_table = apk->GetResourceTable(); in Convert()
301 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
[all …]
DOptimize.cpp131 int Run(std::unique_ptr<LoadedApk> apk) { in Run() argument
137 if (!filter.Consume(context_, apk->GetResourceTable())) { in Run()
144 if (!collapser.Consume(context_, apk->GetResourceTable())) { in Run()
149 if (!deduper.Consume(context_, apk->GetResourceTable())) { in Run()
156 if (!shortener.Consume(context_, apk->GetResourceTable())) { in Run()
180 splitter.SplitTable(apk->GetResourceTable()); in Run()
209 MultiApkGenerator generator{apk.get(), context_}; in Run()
221 if (!apk->WriteToArchive(context_, options_.table_flattener_options, writer.get())) { in Run()
350 bool ExtractAppDataFromManifest(OptimizeContext* context, const LoadedApk* apk, in ExtractAppDataFromManifest() argument
352 const xml::XmlResource* manifest = apk->GetManifest(); in ExtractAppDataFromManifest()
[all …]
DConvert_test.cpp56 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_convert_apk, &diag); in TEST_F() local
58 std::unique_ptr<io::IData> data = OpenFileAsData(apk.get(), "res/xml/test.xml"); in TEST_F()
61 AssertLoadXml(apk.get(), data.get(), &tree); in TEST_F()
94 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_convert_apk, &diag); in TEST_F() local
96 std::unique_ptr<io::IData> data = OpenFileAsData(apk.get(), "res/xml/test.xml"); in TEST_F()
99 AssertLoadXml(apk.get(), data.get(), &tree); in TEST_F()
/frameworks/base/libs/androidfw/tests/data/overlay/
Dbuild20 FRAMEWORK_RES_APK=${ANDROID_PRODUCT_OUT}/system/framework/framework-res.apk
23 aapt2 link -I $FRAMEWORK_RES_APK --manifest AndroidManifest.xml -o overlay.apk compiled.flata \
30 idmap2 create --target-apk-path overlayable/overlayable.apk \
31 --overlay-apk-path overlay/overlay.apk --idmap-path overlay/overlay.idmap
/frameworks/base/libs/androidfw/tests/data/basic/
Dbuild27 --split basic_hdpi-v4.apk:hdpi \
28 --split basic_xhdpi-v4.apk:xhdpi \
29 --split basic_xxhdpi-v4.apk:xxhdpi \
30 --split basic_de_fr.apk:de,fr \
31 -o basic.apk \
/frameworks/base/libs/androidfw/tests/
DAssetManager2_bench.cpp41 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path); in BM_AssetManagerLoadAssets() local
43 assets.SetApkAssets({apk.get()}); in BM_AssetManagerLoadAssets()
64 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path); in BM_AssetManagerLoadFrameworkAssets() local
66 assets.SetApkAssets({apk.get()}); in BM_AssetManagerLoadFrameworkAssets()
132 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(GetTestDataPath() + "/styles/styles.apk"); in BM_AssetManagerGetBag() local
133 if (apk == nullptr) { in BM_AssetManagerGetBag()
139 assets.SetApkAssets({apk.get()}); in BM_AssetManagerGetBag()
180 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_AssetManagerGetResourceLocales() local
181 if (apk == nullptr) { in BM_AssetManagerGetResourceLocales()
187 assets.SetApkAssets({apk.get()}); in BM_AssetManagerGetResourceLocales()
[all …]
DTheme_bench.cpp31 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_ThemeApplyStyleFramework() local
32 if (apk == nullptr) { in BM_ThemeApplyStyleFramework()
38 assets.SetApkAssets({apk.get()}); in BM_ThemeApplyStyleFramework()
65 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_ThemeGetAttribute() local
68 assets.SetApkAssets({apk.get()}); in BM_ThemeGetAttribute()
/frameworks/base/tools/aapt2/optimize/
DMultiApkGenerator_test.cpp59 MultiApkGeneratorWrapper(LoadedApk* apk, IAaptContext* context) in MultiApkGeneratorWrapper() argument
60 : MultiApkGenerator(apk, context) { in MultiApkGeneratorWrapper()
109 LoadedApk apk = {{"test.apk"}, {}, std::move(table), {}, kBinary}; in TEST_F() local
115 MultiApkGeneratorWrapper generator{&apk, ctx.get()}; in TEST_F()
117 generator.FilterTable(ctx.get(), artifact, *apk.GetResourceTable(), &chain); in TEST_F()
136 LoadedApk apk = {{"test.apk"}, {}, std::move(table), {}, kBinary}; in TEST_F() local
142 MultiApkGeneratorWrapper generator{&apk, ctx.get()};; in TEST_F()
144 generator.FilterTable(ctx.get(), artifact, *apk.GetResourceTable(), &chain); in TEST_F()
161 LoadedApk apk = {{"test.apk"}, {}, std::move(table), {}, kBinary}; in TEST_F() local
167 MultiApkGeneratorWrapper generator{&apk, ctx.get()}; in TEST_F()
[all …]
/frameworks/base/cmds/idmap2/tests/data/overlay/
Dbuild15 FRAMEWORK_RES_APK=${ANDROID_PRODUCT_OUT}/system/framework/framework-res.apk
23 -o overlay.apk \
30 -o overlay-no-name.apk \
37 -o overlay-no-name-static.apk \
44 -o overlay-static-1.apk \
51 -o overlay-static-2.apk \
59 -o overlay-shared.apk \
/frameworks/base/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/
DOriginalPackageMigrationTest.kt79 private fun runForApk(apk: String) { in runForApk()
80 preparer.pushApk(apk, Partition.SYSTEM) in runForApk()
83 assertCodePath(apk) in runForApk()
89 preparer.deleteApkFolders(Partition.SYSTEM, apk) in runForApk()
101 private fun assertCodePath(apk: String) { in assertCodePath()
105 .contains(HostUtils.makePathForApk(apk, Partition.SYSTEM).parent.toString()) in assertCodePath()
/frameworks/base/libs/androidfw/tests/data/loader/
Dbuild20 FRAMEWORK_RES_APK=${ANDROID_PRODUCT_OUT}/system/framework/framework-res.apk
24 aapt2 link -I $FRAMEWORK_RES_APK --manifest AndroidManifest.xml -o loader.apk compiled.flata
25 unzip loader.apk resources.arsc
26 rm loader.apk
/frameworks/base/services/tests/servicestests/assets/PackageSignaturesTest/xml/
DREADME8 apksigner sign --in ${OUT}/data/app/CtsPkgInstallTinyApp/CtsPkgInstallTinyApp.apk --out test.apk \
12 adb install test.apk
45 apksigner sign --in ${OUT}/data/app/CtsPkgInstallTinyApp/CtsPkgInstallTinyApp.apk --out test.apk \
50 apksigner sign --in ${OUT}/data/app/CtsPkgInstallTinyApp/CtsPkgInstallTinyApp.apk --out test.apk \
56 apksigner sign --in ${OUT}/data/app/CtsPkgInstallTinyApp/CtsPkgInstallTinyApp.apk --out test.apk \
/frameworks/base/.prebuilt_info/
Dprebuilt_info_packages_CtsShim_apk__x86_CtsShim_apk.asciipb5 source_file: "aosp_x86_64/CtsShim.apk"
7 dest_file: "packages/CtsShim/apk//x86/CtsShim.apk"
Dprebuilt_info_packages_CtsShim_apk__arm_CtsShim_apk.asciipb5 source_file: "aosp_arm64/CtsShim.apk"
7 dest_file: "packages/CtsShim/apk//arm/CtsShim.apk"

123456