Skip to content

Comments

Target Android 15 (SDK 35)#5204

Merged
mikescamell merged 37 commits intodevelopfrom
feature/mike/android-15
Jul 10, 2025
Merged

Target Android 15 (SDK 35)#5204
mikescamell merged 37 commits intodevelopfrom
feature/mike/android-15

Conversation

@mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Oct 28, 2024

Task/Issue URL: https://app.asana.com/0/1207908166761516/1206705314358009/f

Description

Targets Android SDK 35 and makes the required changes to be compatible. See the Asana task for full details.

A key part was adding native library alignment checks and updated dependencies to support 16KB page size alignment.

End to End test run: https://github.com/duckduckgo/Android/actions/runs/16137443827/job/45536745475

Key changes include:

  • Updated target SDK to v35
  • Added script to verify ELF alignment in native libraries
  • Updated SQLCipher to use newer version with proper alignment
  • Added alignment flags to CMake configurations
  • Removed deprecated WebSQL database settings
  • Updated Conscrypt, NetGuard, and sync-crypto dependencies

Steps to test this PR

  • Run the app and verify no crashes related to native libraries
  • Test autofill functionality with updated SQLCipher
  • Verify VPN and network protection features work correctly
  • Test web browsing functionality
  • Check it runs on different Android versions to ensure compatibility (SDK 26-35)
  • Test AppTp functionality
  • Test sync funcationality

UI changes

N/A


Copy link
Contributor Author

mikescamell commented Oct 28, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mikescamell mikescamell force-pushed the feature/mike/android-15 branch from cf0972a to 9e35dd9 Compare November 18, 2024 15:25
@mikescamell mikescamell force-pushed the feature/mike/android-15 branch from 9e35dd9 to ed1c9a8 Compare November 29, 2024 12:26
@mikescamell mikescamell force-pushed the feature/mike/android-15 branch from ed1c9a8 to 52e4a50 Compare December 12, 2024 10:23
@mikescamell mikescamell force-pushed the feature/mike/android-15 branch from 52e4a50 to 229458f Compare December 19, 2024 18:23
@aitorvs aitorvs force-pushed the feature/mike/android-15 branch from fd78ff3 to 2da6dca Compare December 21, 2024 19:54
aitorvs added a commit to duckduckgo/sync_crypto that referenced this pull request Jan 14, 2025
Task: https://app.asana.com/0/488551667048375/1209000029029646/f

### Description
Make builds 16KB compliant

This is needed to target Android 15

### Test
- [x] check out duckduckgo/Android#5204 
- [x] Build app (internal debug is fine)
- [x] smoke test sync feature
@aitorvs aitorvs force-pushed the feature/mike/android-15 branch from 10d7e5e to f15ba7c Compare January 21, 2025 19:53
@mikescamell mikescamell force-pushed the feature/mike/android-15 branch 2 times, most recently from 563db61 to d836cb4 Compare February 14, 2025 18:19
@mikescamell mikescamell force-pushed the feature/mike/android-15 branch from 33c318e to bf0f573 Compare February 18, 2025 11:22
@mikescamell mikescamell marked this pull request as ready for review February 18, 2025 14:34
mikescamell and others added 12 commits March 18, 2025 10:12
we can tackle this at a later date
SupportFactory -> SupportOpenHelperFactory
It's false by default and was only added as protection. Since SQLCipher has supported sqlite 3.26.0 since 4.0.1 (released 2018) this should no longer be a concern in my opinion: https://www.zetetic.net/blog/2018/12/18/sqlcipher-401-release/
"The List type in Java is mapped to the MutableList type in Kotlin. Because the List.removeFirst() and List.removeLast() APIs have been introduced in Android 15 (API level 35), the Kotlin compiler resolves function calls, for example list.removeFirst(), statically to the new List APIs instead of to the extension functions in kotlin-stdlib."

Robolectric supports 34 right now so easier that we just change these functions.
The function in this class was not used but we can rename it and use it as it uses the removeAt function which we need due to the collision with the stdlib.
@mikescamell mikescamell added PR-task Enables the creation of a PR task and removed DO NOT MERGE labels Jul 7, 2025
@CDRussell CDRussell self-assigned this Jul 8, 2025
Instead of relying on callback from MainProcessLifecycleObserver and doing the library init there, this commit changes it to happen on class init instead. The main reason for this is to avoid any footguns around other lifecycle observers triggering autofill (and therefore sqlcipher) codepaths before this one could run and initialize the library)
Copy link
Member

@CDRussell CDRussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional approval, since mostly everything is working. the one thing that needs fixed is the final library re-compilation which I'm assuming will also come in this branch (@aitorvs ?)

Someone can double check 01065e3 for me so that has 2nd pair of eyes before it merges.

@aitorvs aitorvs force-pushed the feature/mike/android-15 branch from 53528eb to 4897b2f Compare July 9, 2025 14:01
aitorvs added a commit to duckduckgo/sync_crypto that referenced this pull request Jul 9, 2025
Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1210616215807112?focus=true

## Description
Update to central portal and fix 16kb page size compatibility

## Testing
- [ ] checkout this PR and execute
```bash
./gradlew clean assemble publishToMavenLocal
```
- [ ] Check out duckduckgo/Android#5204 apply the following patch
```diff
Subject: [PATCH] Fix style of data volume
---
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle	(revision 444923c21ce09f2e0fca27d5650c0ab32005ba84)
+++ b/build.gradle	(date 1752067989987)
@@ -42,6 +42,7 @@
         google()
         mavenCentral()
         maven { url 'https://jitpack.io' }
+        mavenLocal()
     }
     configurations.all {
         resolutionStrategy.force 'org.objenesis:objenesis:2.6'
Index: versions.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/versions.properties b/versions.properties
--- a/versions.properties	(revision 444923c21ce09f2e0fca27d5650c0ab32005ba84)
+++ b/versions.properties	(date 1752068035878)
@@ -81,7 +81,7 @@
 
 version.com.duckduckgo.netguard..netguard-android=1.10.2
 
-version.com.duckduckgo.synccrypto..sync-crypto-android=0.4.0
+version.com.duckduckgo.synccrypto..sync-crypto-android=0.5.0-SNAPSHOT
 
 version.com.frybits.harmony..harmony=1.2.6
  
```
- [ ] Build the Android app
```bash
rm -rf build-cache/; ./gradlew clean assembleID
```
- [ ] Install on device and test sync
- [ ] Install on 16kb page size device and test sync
aitorvs added a commit to duckduckgo/sync_crypto that referenced this pull request Jul 9, 2025
Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1210616215807112?focus=true

## Description
Update to central portal and fix 16kb page size compatibility

## Testing
- [ ] checkout this PR and execute
```bash
./gradlew clean assemble publishToMavenLocal
```
- [ ] Check out duckduckgo/Android#5204 apply the following patch
```diff
Subject: [PATCH] Fix style of data volume
---
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle	(revision 444923c21ce09f2e0fca27d5650c0ab32005ba84)
+++ b/build.gradle	(date 1752067989987)
@@ -42,6 +42,7 @@
         google()
         mavenCentral()
         maven { url 'https://jitpack.io' }
+        mavenLocal()
     }
     configurations.all {
         resolutionStrategy.force 'org.objenesis:objenesis:2.6'
Index: versions.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/versions.properties b/versions.properties
--- a/versions.properties	(revision 444923c21ce09f2e0fca27d5650c0ab32005ba84)
+++ b/versions.properties	(date 1752068035878)
@@ -81,7 +81,7 @@
 
 version.com.duckduckgo.netguard..netguard-android=1.10.2
 
-version.com.duckduckgo.synccrypto..sync-crypto-android=0.4.0
+version.com.duckduckgo.synccrypto..sync-crypto-android=0.5.0-SNAPSHOT
 
 version.com.frybits.harmony..harmony=1.2.6
  
```
- [ ] Build the Android app
```bash
rm -rf build-cache/; ./gradlew clean assembleID
```
- [ ] Install on device and test sync
- [ ] Install on 16kb page size device and test sync
aitorvs added a commit to duckduckgo/sync_crypto that referenced this pull request Jul 10, 2025
Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1206705314358009?focus=true

## Description
Update to central portal and fix 16kb page size compatibility

## Testing
- [x] checkout this PR and execute
```bash
./gradlew clean assemble publishToMavenLocal
```
- [x] Check out duckduckgo/Android#5204 apply the following patch
```diff
diff --git a/build.gradle b/build.gradle
index a620d932d..0b5cee9cd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,6 +42,7 @@ allprojects {
         google()
         mavenCentral()
         maven { url 'https://jitpack.io' }
+        mavenLocal()
     }
     configurations.all {
         resolutionStrategy.force 'org.objenesis:objenesis:2.6'
diff --git a/versions.properties b/versions.properties
index f4547d0a1..82c9f20e7 100644
--- a/versions.properties
+++ b/versions.properties
@@ -81,7 +81,7 @@ version.com.android.installreferrer..installreferrer=2.2
 
 version.com.duckduckgo.netguard..netguard-android=1.10.2
 
-version.com.duckduckgo.synccrypto..sync-crypto-android=0.6.0
+version.com.duckduckgo.synccrypto..sync-crypto-android=0.6.0-SNAPSHOT
 
 version.com.frybits.harmony..harmony=1.2.6
   
```
- [ ] Build the Android app
```bash
rm -rf build-cache/; ./gradlew clean assembleID
```
- [x] Install on device and test sync
- [ ] Install on 16kb page size device and test sync
- [x] install on pixel 3a API 29 emulator and test sync
Copy link
Member

@CDRussell CDRussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested again after latest changes, including running on an 16KB emulator. LGTM

@mikescamell mikescamell merged commit 260d9c0 into develop Jul 10, 2025
10 of 11 checks passed
@mikescamell mikescamell deleted the feature/mike/android-15 branch July 10, 2025 16:53
joshliebe pushed a commit that referenced this pull request Jul 11, 2025
Task/Issue URL:
https://app.asana.com/0/1207908166761516/1206705314358009/f

### Description

Targets Android SDK 35 and makes the required changes to be compatible.
See the Asana task for full details.

A key part was adding native library alignment checks and updated
dependencies to support 16KB page size alignment.

End to End test run:
https://github.com/duckduckgo/Android/actions/runs/16137443827/job/45536745475

Key changes include:

- Updated target SDK to v35
- Added script to verify ELF alignment in native libraries
- Updated SQLCipher to use newer version with proper alignment
- Added alignment flags to CMake configurations
- Removed deprecated WebSQL database settings
- Updated Conscrypt, NetGuard, and sync-crypto dependencies

### Steps to test this PR

- [ ] Run the app and verify no crashes related to native libraries
- [ ] Test autofill functionality with updated SQLCipher
- [ ] Verify VPN and network protection features work correctly
- [ ] Test web browsing functionality
- [ ] Check it runs on different Android versions to ensure
compatibility (SDK 26-35)
- [ ] Test AppTp functionality 
- [ ] Test sync funcationality

### UI changes

N/A

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1209856558112240

---------

Co-authored-by: Aitor Viana <aitorvs@gmail.com>
Co-authored-by: Craig Russell <1336281+CDRussell@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-task Enables the creation of a PR task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants