feat(lsposed): experimentally lower minSdk to 28 for Android 9#48
Open
feat(lsposed): experimentally lower minSdk to 28 for Android 9#48
Conversation
aa486f6 to
0228df0
Compare
Users on older devices asked for Android 9 support. The APK code had no hard dependency on API 29+ beyond a handful of specific call sites; the kmod (GKI 5.10+) still requires Android 12+, but the lsposed path can cover Android 9 if the hooks hold. This ships a build users can test. - minSdk 29 -> 28 - Switch FileObserver(File, Int) to FileObserver(String, Int) in three places (HookEntry, HookLog, PackageVisibilityHooks). The File-based ctor is API 29+ and would NoSuchMethodError on Android 9 during hook install. - Guard NetworkCapabilities.getTransportInfo() (API 29+) in the two self-test call sites in DashboardData and DiagnosticsScreen; on API 28 the leak path does not exist, so report PASS/skipped.
0228df0 to
a85cf1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users on older devices have been asking for Android 9 support. The lsposed APK code had no fundamental dependency on API 29+, so this lowers
minSdkto 28 and fixes the handful of call sites Android Lint flagged. Marked experimental — only Android 10+ builds have been verified locally, Android 9 behaviour depends on privatesystem_serverfield layouts that may differ and needs confirmation from users on real devices. The kmod component still requires GKI 5.10+ (Android 12+); this PR only affects the lsposed path.minSdk = 29→minSdk = 28inlsposed/app/build.gradle.ktsHookEntry.kt,HookLog.kt,PackageVisibilityHooks.kt: switch fromFileObserver(File, Int)(API 29+) toFileObserver(String, Int). Without this, hook installation throwsNoSuchMethodErroron Android 9.DashboardData.kt,DiagnosticsScreen.kt: gateNetworkCapabilities.getTransportInfo()(API 29+) behindBuild.VERSION.SDK_INT >= Q. TheVpnTransportInfoleak path does not exist pre-Android 10, so the self-check reports PASS / skipped there.unreleased(changed, bilingual).Testing
./gradlew :app:lint— 0 errors (was 4 after the initialminSdkdrop).ktlint "**/*.kt"— clean../gradlew :app:assembleDebug— builds.