Skip to content

Commit 4519779

Browse files
Add New References to Android API changes (by @nowsecure) (#2153)
* add api changes Co-authored-by: Jeroen Beckers <[email protected]>
1 parent 51c152b commit 4519779

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

Document/0x05a-Platform-Overview.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Android apps interact with system services via the Android Framework, an abstrac
163163

164164
The framework also offers common security functions, such as cryptography.
165165

166-
The API specifications change with every new Android release. Critical bug fixes and security patches are usually applied to earlier versions as well. The oldest Android version supported at the time of writing is Android 8.1 (API level 27) and the current Android version is Android 10 (API level 29).
166+
The API specifications change with every new Android release. Critical bug fixes and security patches are usually applied to earlier versions as well.
167167

168168
Noteworthy API versions:
169169

@@ -175,7 +175,25 @@ Noteworthy API versions:
175175
- Android 7.0 (API level 24-25) in August 2016 (new JIT compiler on ART)
176176
- Android 8.0 (API level 26-27) in August 2017 (a lot of security improvements)
177177
- Android 9 (API level 28) in August 2018 (restriction of background usage of mic or camera, introduction of lockdown mode, default HTTPS for all apps)
178-
- Android 10 (API level 29) in September 2019 (notification bubbles, project Mainline)
178+
- **Android 10 (API level 29)** in September 2019 (access location "only while using the app", device tracking prevention, improve secure external storage,)
179+
- Privacy ([overview](https://developer.android.com/about/versions/10/highlights#privacy_for_users), [details 1](https://developer.android.com/about/versions/10/privacy), [details 2](https://developer.android.com/about/versions/10/privacy/changes))
180+
- Security ([overview](https://developer.android.com/about/versions/10/highlights#security), [details](https://developer.android.com/about/versions/10/behavior-changes-all#security))
181+
- **Android 11 (API level 30)** in September 2020 (scoped storage enforcement, Permissions auto-reset, [reduced package visibility](https://developer.android.com/training/package-visibility), APK Signature Scheme v4)
182+
- Privacy ([overview](https://developer.android.com/about/versions/11/privacy))
183+
- [Privacy Behavior changes (all apps)](https://developer.android.com/about/versions/11/behavior-changes-all)
184+
- [Security Behavior changes (all apps)](https://developer.android.com/about/versions/11/behavior-changes-all#security)
185+
- [Privacy Behavior changes (apps targeting version)](https://developer.android.com/about/versions/11/behavior-changes-11#privacy)
186+
- [Security Behavior changes (apps targeting version)](https://developer.android.com/about/versions/11/behavior-changes-11#security)
187+
- **Android 12 (API level 31-32)** in August 2021 (Material You, Web intent resolution, Privacy Dashboard)
188+
- [Security and privacy](https://developer.android.com/about/versions/12/features#security-privacy)
189+
- [Behavior changes (all apps)](https://developer.android.com/about/versions/12/behavior-changes-all#security-privacy)
190+
- [Behavior changes (apps targeting version)](https://developer.android.com/about/versions/12/behavior-changes-12#security-privacy)
191+
- [BETA] **Android 13 (API level 33)** in 2022 (Safer exporting of context-registered receivers, new photo picker)
192+
- [Security and privacy](https://developer.android.com/about/versions/13/features#privacy-security)
193+
- [Privacy Behavior changes (all apps)](https://developer.android.com/about/versions/13/behavior-changes-all#privacy)
194+
- [Security Behavior changes (all apps)](https://developer.android.com/about/versions/13/behavior-changes-all#security)
195+
- [Privacy Behavior changes (apps targeting version)](https://developer.android.com/about/versions/13/behavior-changes-13#privacy)
196+
- [Security Behavior changes (apps targeting version)](https://developer.android.com/about/versions/13/behavior-changes-13#security)
179197

180198
### The App Sandbox
181199

@@ -641,7 +659,7 @@ It is no longer possible to sign APKs independently, because the proof-of-rotati
641659

642660
#### APK Signature Scheme (v4 Scheme)
643661

644-
The APK Signature Scheme v4 was introduced along with Android 11.0 (API level 30). which requires all devices launched with it to have [fs-verity](https://kernel.org/doc/html/latest/filesystems/fsverity.html) enabled by default. fs-verity is a Linux kernel feature that is primarily used for file authentication (detection of malicious modifications) due to its extremely efficient file hash calculation. Read requests only will succeed if the content verifies against trusted digital certificates that were loaded to the kernel keyring during boot time.
662+
The APK Signature Scheme v4 was introduced along with Android 11 (API level 30). which requires all devices launched with it to have [fs-verity](https://kernel.org/doc/html/latest/filesystems/fsverity.html) enabled by default. fs-verity is a Linux kernel feature that is primarily used for file authentication (detection of malicious modifications) due to its extremely efficient file hash calculation. Read requests only will succeed if the content verifies against trusted digital certificates that were loaded to the kernel keyring during boot time.
645663

646664
The v4 signature requires a complementary v2 or v3 signature and in contrast to previous signature schemes, the v4 signature is stored in a separate file `<apk name>.apk.idsig`. Remember to specify it using the `--v4-signature-file` flag when verifying a v4-signed APK with `apksigner verify`.
647665

Document/0x05e-Testing-Cryptography.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ keyPairGenerator.initialize(keyPairGeneratorSpec);
201201
KeyPair keyPair = keyPairGenerator.generateKeyPair();
202202
```
203203

204-
This sample creates the RSA key pair with a key size of 4096-bit (i.e. modulus size). Elliptic Curve (EC) keys can also be generated in a similar way. However as of Android 11, [AndroidKeyStore does not support encryption or decryption with EC keys](https://developer.android.com/guide/topics/security/cryptography#SupportedCipher). They can only be used for signatures.
204+
This sample creates the RSA key pair with a key size of 4096-bit (i.e. modulus size). Elliptic Curve (EC) keys can also be generated in a similar way. However as of Android 11 (API level 30), [AndroidKeyStore does not support encryption or decryption with EC keys](https://developer.android.com/guide/topics/security/cryptography#SupportedCipher). They can only be used for signatures.
205205

206206
A symmetric encryption key can be generated from the passphrase by using the Password Based Key Derivation Function version 2 (PBKDF2). This cryptographic protocol is designed to generate cryptographic keys, which can be used for cryptography purpose. Input parameters for the algorithm are adjusted according to [weak key generation function](0x04g-Testing-Cryptography.md#weak-key-generation-functions) section. The code listing below illustrates how to generate a strong encryption key based on a password.
207207

Document/0x05h-Testing-Platform-Interaction.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ Apps targeting Android 9 (API level 28) or higher [are affected](https://develop
5252

5353
- **Build serial number deprecation**: device's hardware serial number cannot be read (e.g. via [`Build.getSerial`](https://developer.android.com/reference/android/os/Build.html#getSerial%28%29 "getSerial")) unless the `READ_PHONE_STATE` (dangerous) permission is granted.
5454

55-
#### Android 10 Changes (Beta)
55+
#### Android 10 (API level 29) Changes
5656

57-
Android 10 Beta introduces several [user privacy enhancements](https://developer.android.com/preview/privacy/permissions "Android Q privacy: Changes to permissions"). The changes regarding permissions affect to all apps running on Android 10, including those targeting lower API levels.
57+
Android 10 (API level 29) introduces several [user privacy enhancements](https://developer.android.com/about/versions/10/highlights#privacy_for_users "Android 10 for Developers: Privacy for users"). The changes regarding permissions affect to all apps running on Android 10 (API level 29), including those targeting lower API levels.
5858

59+
- **Restricted Location access**: new permission option for location access "only while using the app".
60+
- **Scoped storage by default**: apps targeting Android 10 (API level 29) don't need to declare any storage permission to access their files in the app specific directory in external storage as well as for files creates from the media store.
5961
- **Restricted access to screen contents**: `READ_FRAME_BUFFER`, `CAPTURE_VIDEO_OUTPUT`, and `CAPTURE_SECURE_VIDEO_OUTPUT` permissions are now signature-access only, which prevents silent access to the device's screen contents.
6062
- **User-facing permission check on legacy apps**: when running an app targeting Android 5.1 (API level 22) or lower for the first time, users will be prompted with a permissions screen where they can revoke access to specific _legacy permissions_ (which previously would be automatically granted at installation time).
6163

0 commit comments

Comments
 (0)