Tabnine Logo
ApkVerifier$Result.containsErrors
Code IndexAdd Tabnine to your IDE (free)

How to use
containsErrors
method
in
com.android.apksig.ApkVerifier$Result

Best Java code snippets using com.android.apksig.ApkVerifier$Result.containsErrors (Showing top 3 results out of 315)

origin: mcxiaoke/packer-ng-plugin

public void testOverrideSignature() throws IOException,
    ApkFormatException,
    NoSuchAlgorithmException {
  File f = newTestFile();
  // don't write with APK Signature Scheme v2 Block ID 0x7109871a
  PackerCommon.writeString(f, "OverrideSignatureSchemeBlock", 0x7109871a);
  assertEquals("OverrideSignatureSchemeBlock", PackerCommon.readString(f, 0x7109871a));
  ApkVerifier verifier = new Builder(f).build();
  Result result = verifier.verify();
  final List<IssueWithParams> errors = result.getErrors();
  if (errors != null && errors.size() > 0) {
    for (IssueWithParams error : errors) {
      System.out.println("testOverrideSignature " + error);
    }
  }
  assertTrue(result.containsErrors());
  assertFalse(result.isVerified());
  assertFalse(result.isVerifiedUsingV1Scheme());
  assertFalse(result.isVerifiedUsingV2Scheme());
}
origin: mcxiaoke/ApkSigner

    result.mergeFrom(v2Result);
  } catch (V2SchemeVerifier.SignatureNotFoundException ignored) {}
  if (result.containsErrors()) {
    return result;
  result.mergeFrom(v1Result);
if (result.containsErrors()) {
  return result;
if (result.containsErrors()) {
  return result;
origin: mcxiaoke/packer-ng-plugin

  public static boolean apkVerified(File f) throws ApkFormatException,
      NoSuchAlgorithmException,
      IOException {
    ApkVerifier verifier = new Builder(f).build();
    Result result = verifier.verify();
    return result.isVerified()
        && result.isVerifiedUsingV1Scheme()
        && result.isVerifiedUsingV2Scheme()
        && !result.containsErrors();
  }
}
com.android.apksigApkVerifier$ResultcontainsErrors

Javadoc

Returns true if an error was encountered while verifying the APK. Any error prevents the APK from being considered verified.

Popular methods of ApkVerifier$Result

  • isVerified
    Returns true if the APK's signatures verified.
  • isVerifiedUsingV1Scheme
    Returns true if the APK's JAR signatures verified.
  • isVerifiedUsingV2Scheme
    Returns true if the APK's APK Signature Scheme v2 signatures verified.
  • getErrors
    Returns errors encountered while verifying the APK's signatures.
  • getV1SchemeSigners
    Returns information about JAR signers associated with the APK's signature. These are the signers use
  • getV2SchemeSigners
    Returns information about APK Signature Scheme v2 signers associated with the APK's signature.
  • getSignerCertificates
    Returns the verified signers' certificates, one per signer.
  • getWarnings
    Returns warnings encountered while verifying the APK's signatures.
  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ImageIO (javax.imageio)
  • JLabel (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now