diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd index 4fbb160e56f2b..f5442b8e272a9 100644 --- a/docs/html/preview/api-overview.jd +++ b/docs/html/preview/api-overview.jd @@ -723,18 +723,46 @@ specify how user CAs should be trusted.

APK signature scheme v2

-

The PackageManager class now supports verifying apps using the APK -signature scheme v2. The APK signature scheme v2 is a whole-file signature scheme -that significantly improves verification speed and strengthens integrity - guarantees by detecting any unauthorized changes to APK files.

+

+ Android N introduces APK Signature Scheme v2, a new app-signing scheme that + offers faster app install times and better protection against unauthorized + alterations to APK files. Android Studio 2.2 and Gradle provide built-in + support for APK Signature Scheme v2. +

-

To maintain backward-compatibility, an APK must be signed with the v1 signature -scheme (JAR signature scheme) before being signed with the v2 signature scheme. -With the v2 signature scheme, verification fails if you sign the APK with an - additional certificate after signing with the v2 scheme.

+

+ Although we recommend applying APK Signature Scheme v2 to your app, the new + scheme is not mandatory. If your app doesn't build properly when using the + APK Signature Scheme v2, you can use the traditional signing scheme—which + uses JAR signing—instead. To use the traditional scheme, open the + module-level build.gradle file and add the + v2SigningEnabled parameter to your release signing + configuration, setting this parameter's value to false: +

-

APK signature scheme v2 support will be available later in the N Developer -Preview.

+
+  android {
+    ...
+    defaultConfig { ... }
+    signingConfigs {
+      release {
+        storeFile file("myreleasekey.keystore")
+        storePassword "password"
+        keyAlias "MyReleaseKey"
+        keyPassword "password"
+        v2SigningEnabled false
+      }
+    }
+  }
+
+ +

+ For more information, see the following guides, which describe how to sign an app + in Android Studio and how to configure + the Gradle build file for signing apps. +

Scoped directory access