Home
last modified time | relevance | path

Searched refs:apk (Results 1 – 25 of 129) 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",
70 apk: "apk/arm/CtsShim.apk",
73 apk: "apk/arm/CtsShim.apk",
76 apk: "apk/x86/CtsShim.apk",
79 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.SIGNATURE_DSA_WITH_SHA256;
21 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_ECDSA_WITH_SHA256;
22 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_ECDSA_WITH_SHA512;
23 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PKCS1_V1_5_WITH_SHA256;
24 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PKCS1_V1_5_WITH_SHA512;
25 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PSS_WITH_SHA256;
26 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PSS_WITH_SHA512;
27 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_VERITY_DSA_WITH_SHA256;
[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.SIGNATURE_DSA_WITH_SHA256;
21 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_ECDSA_WITH_SHA256;
22 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_ECDSA_WITH_SHA512;
23 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PKCS1_V1_5_WITH_SHA256;
24 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PKCS1_V1_5_WITH_SHA512;
25 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PSS_WITH_SHA256;
26 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_RSA_PSS_WITH_SHA512;
27 import static android.util.apk.ApkSigningBlockUtils.SIGNATURE_VERITY_DSA_WITH_SHA256;
[all …]
DVerityBuilder.java17 package android.util.apk;
80 public static VerityResult generateFsVerityTree(@NonNull RandomAccessFile apk, in generateFsVerityTree() argument
83 return generateVerityTreeInternal(apk, bufferFactory, null /* signatureInfo */, in generateFsVerityTree()
97 public static VerityResult generateApkVerityTree(@NonNull RandomAccessFile apk, in generateApkVerityTree() argument
100 return generateVerityTreeInternal(apk, bufferFactory, signatureInfo, in generateApkVerityTree()
105 private static VerityResult generateVerityTreeInternal(@NonNull RandomAccessFile apk, in generateVerityTreeInternal() argument
109 long dataSize = apk.length(); in generateVerityTreeInternal()
125 byte[] apkRootHash = generateVerityTreeInternal(apk, signatureInfo, salt, levelOffset, in generateVerityTreeInternal()
130 static void generateApkVerityFooter(@NonNull RandomAccessFile apk, in generateApkVerityFooter() argument
134 generateApkVerityHeader(footerOutput, apk.length(), DEFAULT_SALT); in generateApkVerityFooter()
[all …]
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
330 RandomAccessFile apk, in verifyIntegrityForVerityBasedAlgorithm() argument
334 apk.length(), signatureInfo); in verifyIntegrityForVerityBasedAlgorithm()
[all …]
/frameworks/base/tools/aapt2/cmd/
DDump.cpp222 int DumpConfigsCommand::Dump(LoadedApk* apk) { in Dump() argument
223 ResourceTable* table = apk->GetResourceTable(); in Dump()
253 int DumpPackageNameCommand::Dump(LoadedApk* apk) { in Dump() argument
254 Maybe<std::string> package_name = GetPackageName(apk); in Dump()
263 int DumpStringsCommand::Dump(LoadedApk* apk) { in Dump() argument
264 ResourceTable* table = apk->GetResourceTable(); in Dump()
279 int DumpStyleParentCommand::Dump(LoadedApk* apk) { in Dump() argument
280 Maybe<std::string> package_name = GetPackageName(apk); in Dump()
286 const auto table = apk->GetResourceTable(); in Dump()
304 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 …]
DConvert.cpp257 int Convert(IAaptContext* context, LoadedApk* apk, IArchiveWriter* output_writer, in Convert() argument
262 serializer.reset(new BinaryApkSerializer(context, apk->GetSource(), table_flattener_options, in Convert()
265 serializer.reset(new ProtoApkSerializer(context, apk->GetSource())); in Convert()
267 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
272 io::IFile* manifest = apk->GetFileCollection()->FindFile(kAndroidManifestPath); in Convert()
273 if (!serializer->SerializeXml(apk->GetManifest(), kAndroidManifestPath, true /*utf16*/, in Convert()
276 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
281 if (apk->GetResourceTable() != nullptr) { in Convert()
283 auto converted_table = apk->GetResourceTable(); in Convert()
295 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
[all …]
DLink_test.cpp45 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()
50 AssertLoadXml(apk.get(), data.get(), &tree); in TEST_F()
73 std::unique_ptr<LoadedApk> apk = LoadedApk::LoadApkFromPath(out_apk, &diag); in TEST_F() local
75 std::unique_ptr<io::IData> data = OpenFileAsData(apk.get(), "res/xml/test.xml"); in TEST_F()
78 AssertLoadXml(apk.get(), data.get(), &tree); in TEST_F()
DOptimize.cpp125 int Run(std::unique_ptr<LoadedApk> apk) { in Run() argument
131 if (!filter.Consume(context_, apk->GetResourceTable())) { in Run()
138 if (!collapser.Consume(context_, apk->GetResourceTable())) { in Run()
143 if (!deduper.Consume(context_, apk->GetResourceTable())) { in Run()
150 if (!shortener.Consume(context_, apk->GetResourceTable())) { in Run()
174 splitter.SplitTable(apk->GetResourceTable()); in Run()
203 MultiApkGenerator generator{apk.get(), context_}; in Run()
215 if (!apk->WriteToArchive(context_, options_.table_flattener_options, writer.get())) { in Run()
357 bool ExtractAppDataFromManifest(OptimizeContext* context, const LoadedApk* apk, in ExtractAppDataFromManifest() argument
359 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/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()
DBenchmarkHelpers.cpp59 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path); in GetResourceBenchmark() local
60 if (apk == nullptr) { in GetResourceBenchmark()
64 apk_assets_ptrs.push_back(apk.get()); in GetResourceBenchmark()
65 apk_assets.push_back(std::move(apk)); in GetResourceBenchmark()
/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/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/libs/androidfw/tests/data/libclient/
Dbuild21 PATH_TO_LIB_ONE=../lib_one/lib_one.apk
22 PATH_TO_LIB_TWO=../lib_two/lib_two.apk
30 -F libclient.apk -f
/frameworks/base/cmds/idmap2/tests/data/overlay/
Dbuild23 -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 \
/frameworks/base/tools/bit/
Dmain.cpp875 InstallApk& apk = installApks[i]; in run_phases() local
876 if (!apk.file.fileInfo.exists || apk.file.HasChanged()) { in run_phases()
878 err = run_adb("install", "-r", "-g", apk.file.filename.c_str(), NULL); in run_phases()
880 apk.installed = true; in run_phases()
882 printf("APK didn't change. Skipping install of %s\n", apk.file.filename.c_str()); in run_phases()
979 Apk apk; in run_phases() local
980 err = inspect_apk(&apk, filename); in run_phases()
986 if (apk.runner.length() == 0) { in run_phases()
993 action.packageName = apk.package; in run_phases()
994 action.runner = apk.runner; in run_phases()
[all …]
Daapt.cpp159 inspect_apk(Apk* apk, const string& filename) in inspect_apk() argument
240 apk->package = root->GetAttr("", "package"); in inspect_apk()
241 if (apk->package.size() == 0) { in inspect_apk()
254 apk->runner = instrumentation[0]->GetAttr(ANDROID_NS, "name"); in inspect_apk()
265 apk->activities.push_back(full_class_name(apk->package, name)); in inspect_apk()
/frameworks/base/tools/aapt2/
DLoadedApk.cpp38 static ApkFormat DetermineApkFormat(io::IFileCollection* apk) { in DetermineApkFormat() argument
39 if (apk->FindFile(kApkResourceTablePath) != nullptr) { in DetermineApkFormat()
41 } else if (apk->FindFile(kProtoResourceTablePath) != nullptr) { in DetermineApkFormat()
45 io::IFile* manifest_file = apk->FindFile(kAndroidManifestPath); in DetermineApkFormat()
78 std::unique_ptr<io::ZipFileCollection> apk = io::ZipFileCollection::Create(path, &error); in LoadApkFromPath() local
79 if (apk == nullptr) { in LoadApkFromPath()
84 ApkFormat apkFormat = DetermineApkFormat(apk.get()); in LoadApkFromPath()
87 return LoadBinaryApkFromFileCollection(source, std::move(apk), diag); in LoadApkFromPath()
89 return LoadProtoApkFromFileCollection(source, std::move(apk), diag); in LoadApkFromPath()
/frameworks/base/libs/androidfw/tests/data/app/
Dbuild23 -I ../system/system.apk \
25 -o app.apk \
/frameworks/base/libs/androidfw/tests/data/appaslib/
Dbuild22 aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES -F appaslib.apk -f
23 aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES -F appaslib_lib.apk -f --share…

123456