Home
last modified time | relevance | path

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

12

/tools/apksig/src/test/java/com/android/apksig/
DApkVerifierTest.java25 import com.android.apksig.apk.ApkFormatException;
726 String apk = "v1-only-with-signed-attrs.apk"; in testV1SignedAttrs() local
728 verifyForMinSdkVersion(apk, AndroidSdkVersion.JELLY_BEAN_MR2), in testV1SignedAttrs()
730 assertVerified(verifyForMinSdkVersion(apk, AndroidSdkVersion.KITKAT)); in testV1SignedAttrs()
732 apk = "v1-only-with-signed-attrs-signerInfo1-good-signerInfo2-good.apk"; in testV1SignedAttrs()
734 verifyForMinSdkVersion(apk, AndroidSdkVersion.JELLY_BEAN_MR2), in testV1SignedAttrs()
736 assertVerified(verifyForMinSdkVersion(apk, AndroidSdkVersion.KITKAT)); in testV1SignedAttrs()
754 String apk = "v1-only-with-signed-attrs-missing-content-type.apk"; in testV1SignedAttrsMissingContentType() local
755 assertVerified(verifyForMaxSdkVersion(apk, AndroidSdkVersion.N - 1)); in testV1SignedAttrsMissingContentType()
756 assertVerificationFailure(verify(apk), Issue.JAR_SIG_VERIFY_EXCEPTION); in testV1SignedAttrsMissingContentType()
[all …]
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zfile/
DApkAlignmentTest.java40 File apk = new File(mTemporaryFolder.getRoot(), "a.apk"); in soFilesUncompressedAndAligned() local
48 apk, in soFilesUncompressedAndAligned()
64 try (ZFile zf = new ZFile(apk)) { in soFilesUncompressedAndAligned()
97 File apk = new File(mTemporaryFolder.getRoot(), "b.apk"); in soFilesMergedFromZipsCanBeUncompressedAndAligned() local
101 apk, in soFilesMergedFromZipsCanBeUncompressedAndAligned()
117 try (ZFile zf = new ZFile(apk)) { in soFilesMergedFromZipsCanBeUncompressedAndAligned()
137 File apk = new File(mTemporaryFolder.getRoot(), "a.apk"); in soFilesUncompressedAndNotAligned() local
145 apk, in soFilesUncompressedAndNotAligned()
161 try (ZFile zf = new ZFile(apk)) { in soFilesUncompressedAndNotAligned()
194 File apk = new File(mTemporaryFolder.getRoot(), "b.apk"); in soFilesMergedFromZipsCanBeUncompressedAndNotAligned() local
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DBuildTestsZipUtilsTest.java69 File apk = new File(apkDir, "TestApk.apk"); in testGetApkFile_fromTestDir() local
70 apk.createNewFile(); in testGetApkFile_fromTestDir()
80 assertEquals(apk, apkFile); in testGetApkFile_fromTestDir()
100 File apk = new File(apkDir, "TestApk.apk"); in testGetApkFile_fromTestDir_testCase() local
101 apk.createNewFile(); in testGetApkFile_fromTestDir_testCase()
111 assertEquals(apk, apkFile); in testGetApkFile_fromTestDir_testCase()
/tools/apksig/src/main/java/com/android/apksig/
DApkVerifier.java19 import com.android.apksig.apk.ApkFormatException;
20 import com.android.apksig.apk.ApkUtils;
21 import com.android.apksig.internal.apk.AndroidBinXmlParser;
22 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
23 import com.android.apksig.internal.apk.v1.V1SchemeVerifier;
24 import com.android.apksig.internal.apk.ContentDigestAlgorithm;
25 import com.android.apksig.internal.apk.SignatureAlgorithm;
26 import com.android.apksig.internal.apk.v2.V2SchemeVerifier;
27 import com.android.apksig.internal.apk.v3.V3SchemeVerifier;
114 DataSource apk; in verify() local
[all …]
/tools/apksig/src/main/java/com/android/apksig/apk/
DApkUtils.java17 package com.android.apksig.apk;
19 import com.android.apksig.internal.apk.AndroidBinXmlParser;
20 import com.android.apksig.internal.apk.v1.V1SchemeVerifier;
52 public static ZipSections findZipSections(DataSource apk) in findZipSections() argument
55 ZipUtils.findZipEndOfCentralDirectoryRecord(apk); in findZipSections()
180 public static ApkSigningBlock findApkSigningBlock(DataSource apk, ZipSections zipSections) in findApkSigningBlock() argument
208 ByteBuffer footer = apk.getByteBuffer(centralDirStartOffset - 24, 24); in findApkSigningBlock()
228 ByteBuffer apkSigBlock = apk.getByteBuffer(apkSigBlockOffset, 8); in findApkSigningBlock()
236 return new ApkSigningBlock(apkSigBlockOffset, apk.slice(apkSigBlockOffset, totalSize)); in findApkSigningBlock()
280 public static ByteBuffer getAndroidManifest(DataSource apk) in getAndroidManifest() argument
[all …]
DMinSdkVersionException.java17 package com.android.apksig.apk;
DApkFormatException.java17 package com.android.apksig.apk;
DApkSigningBlockNotFoundException.java17 package com.android.apksig.apk;
DCodenameMinSdkVersionException.java17 package com.android.apksig.apk;
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/
DV2SchemeSigner.java17 package com.android.apksig.internal.apk.v2;
19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeCertificates;
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodePublicKey;
24 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
25 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig;
26 import com.android.apksig.internal.apk.ContentDigestAlgorithm;
27 import com.android.apksig.internal.apk.SignatureAlgorithm;
DV2SchemeVerifier.java17 package com.android.apksig.internal.apk.v2;
20 import com.android.apksig.apk.ApkFormatException;
21 import com.android.apksig.apk.ApkUtils;
22 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
23 import com.android.apksig.internal.apk.ContentDigestAlgorithm;
24 import com.android.apksig.internal.apk.SignatureAlgorithm;
25 import com.android.apksig.internal.apk.SignatureInfo;
90 DataSource apk, in verify() argument
101 ApkSigningBlockUtils.findSignature(apk, zipSections, in verify()
104 DataSource beforeApkSigningBlock = apk.slice(0, signatureInfo.apkSigningBlockOffset); in verify()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v3/
DV3SchemeSigner.java17 package com.android.apksig.internal.apk.v3;
19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsLengthPrefixedElement;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeCertificates;
23 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodePublicKey;
26 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
27 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig;
28 import com.android.apksig.internal.apk.ContentDigestAlgorithm;
29 import com.android.apksig.internal.apk.SignatureAlgorithm;
DV3SchemeVerifier.java17 package com.android.apksig.internal.apk.v3;
19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.readLengthPrefixedByteArray;
24 import com.android.apksig.apk.ApkFormatException;
25 import com.android.apksig.apk.ApkUtils;
26 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
27 import com.android.apksig.internal.apk.ApkSigningBlockUtils.SignatureNotFoundException;
28 import com.android.apksig.internal.apk.ContentDigestAlgorithm;
29 import com.android.apksig.internal.apk.SignatureAlgorithm;
30 import com.android.apksig.internal.apk.SignatureInfo;
[all …]
DV3SigningCertificateLineage.java17 package com.android.apksig.internal.apk.v3;
19 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsLengthPrefixedElement;
20 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.encodeAsSequenceOfLengthPrefixed…
21 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.getLengthPrefixedSlice;
22 import static com.android.apksig.internal.apk.ApkSigningBlockUtils.readLengthPrefixedByteArray;
24 import com.android.apksig.apk.ApkFormatException;
25 import com.android.apksig.internal.apk.ApkSigningBlockUtils;
26 import com.android.apksig.internal.apk.SignatureAlgorithm;
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/suite/
DSuiteApkInstallerTest.java108 File apk = FileUtil.createTempFile("testapk", ".apk", varDir); in testGetLocalPathForFilename_withVariable() local
118 mPreparer.getLocalPathForFilename(mMockBuildInfo, apk.getName(), mMockDevice); in testGetLocalPathForFilename_withVariable()
121 assertEquals(apk.getAbsolutePath(), res.getAbsolutePath()); in testGetLocalPathForFilename_withVariable()
174 File apk = in testGetLocalPathForFileName() local
177 assertEquals(tmpApk.getAbsolutePath(), apk.getAbsolutePath()); in testGetLocalPathForFileName()
227 File apk = in testGetLocalPathForFileName_testsDir() local
230 assertEquals(tmpApk.getAbsolutePath(), apk.getAbsolutePath()); in testGetLocalPathForFileName_testsDir()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DInstallBuildEnvApkSetup.java59 File apk = FileUtil.getFileForPath(testAppDir, apkPrimaryFileName, apkName); in setUp() local
60 CLog.i("Installing %s on %s", apk.getName(), device.getSerialNumber()); in setUp()
61 String result = device.installPackage(apk, true); in setUp()
64 "Failed to install %s on device %s. Reason: %s", apk.getAbsolutePath(), in setUp()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zfile/
DZFiles.java65 public static ZFile apk(@Nonnull File f, @Nonnull ZFileOptions options) throws IOException { in apk() method in ZFiles
92 public static ZFile apk( in apk() method in ZFiles
103 ZFile zfile = apk(f, options); in apk()
/tools/apksig/src/apksigner/java/com/android/apksigner/
Dhelp.txt6 apksigner sign --ks release.jks app.apk
7 apksigner verify --verbose app.apk
Dhelp_verify.txt1 USAGE: apksigner verify [options] apk
35 $ apksigner verify app.apk
39 $ apksigner verify --min-sdk-version 15 app.apk
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DTestFilePushSetupTest.java143 File apk = setup.getLocalPathForFilename(info, ALT_FILENAME1, mMockDevice); in testAltDirOverride() local
144 assertEquals(mAltDirFile1.getAbsolutePath(), apk.getAbsolutePath()); in testAltDirOverride()
186 File apk = setup.getLocalPathForFilename(info, ALT_FILENAME1, mMockDevice); in testAltDirNoFallback() local
189 assertEquals(apkInTestDir.getAbsolutePath(), apk.getAbsolutePath()); in testAltDirNoFallback()
200 File apk = setup.getLocalPathForFilename(info, ALT_FILENAME2, mMockDevice); in testAltDirFallback() local
201 assertEquals(mAltDirFile2.getAbsolutePath(), apk.getAbsolutePath()); in testAltDirFallback()
/tools/apksig/src/test/java/com/android/apksig/apk/
DApkUtilsTest.java17 package com.android.apksig.apk;
108 private static ByteBuffer getAndroidManifest(byte[] apk) in getAndroidManifest() argument
110 return ApkUtils.getAndroidManifest(DataSources.asDataSource(ByteBuffer.wrap(apk))); in getAndroidManifest()
DAllTests.java17 package com.android.apksig.apk;
/tools/tradefederation/core/res/apks/wifiutil/
DPREBUILT1 This apk can be rebuilt from
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DContentDigestAlgorithm.java17 package com.android.apksig.internal.apk;
/tools/apksig/src/main/java/com/android/apksig/internal/zip/
DLocalFileRecord.java124 DataSource apk, in getRecord() argument
128 apk, in getRecord()
142 DataSource apk, in getRecord() argument
163 header = apk.getByteBuffer(headerStartOffset, headerSizeWithName); in getRecord()
244 extra = apk.getByteBuffer( in getRecord()
267 ByteBuffer dataDescriptorPotentialSig = apk.getByteBuffer(dataEndOffset, 4); in getRecord()

12