Commit Graph
57 Commits
Author SHA1 Message Date
topjohnwu 447a8f9965 app: Move core-only manifest entries from shared
Move permissions, requestLegacyExternalStorage, and the debug
usesCleartextTraffic manifest from :shared into :core so the stub APK
only retains permissions required for downloading and installing the
full Magisk APK.

Assisted-by: Gemini 4 Argon
2026-10-22 14:06:48 -07:00
topjohnwu 7d9b0dfb3e app: Remove dynamic code loading and simplify stub
Remove dynamic APK class and resource loading across :app, :shared,
and :stub. Consolidate stub resources into :stub and remove stub
obfuscation and encryption.

- Merge :stub-res into :stub and delete the :stub-res module.
- Delete DynLoad, DelegateComponentFactory, ClassLoaders,
  StubApplication, StubRootService, and dummy component classes.
- Delete StubApk, DynamicClassLoader, and CompoundEnumeration from
  :shared.
- Remove lsparanoid, stub component randomization, resource
  encryption, and Stub.kt from build-logic.
- Remove stubVersion and STUB_VERSION tracking.
- Simplify DownloadActivity to use direct resources and APKInstall.
- Remove isRunningAsStub and stub-specific hooks across :core.

Assisted-by: Gemini 4 Argon
2026-10-22 14:06:48 -07:00
topjohnwu b43a08fdde Bump minSdk to 24 and drop API 23 workarounds
- Bump minSdk to 24 in Setup.kt, APP_PLATFORM to android-24 in
  Application.mk, and update CI AVD matrices and scripts.
- Unify SePatchStrategy::Legacy with SePatchStrategy::SelinuxFs in
  magiskinit to use MOCK_ENFORCE FIFO blocking and remove MOCK_REQPROT.
- Make APP_DATA_DIR a compile-time "/data/user_de" constant and remove
  pre-API 24 /data/user and /data/adb fallbacks.
- Remove Android 6.0 Samsung forkAndSpecialize JNI hook signature.
- Remove pre-API 24 device-protected storage wrappers, Api23Impl in
  LocaleSetting, AndroidManifest.xml stub resource workaround, and
  ServiceCompat/ProcessCompat/InlinedApi workarounds in the app.

Assisted-by: Gemini 4 Argon
2026-10-22 14:06:48 -07:00
vvb2060 8c972dcf34 app: target sdk 36 2025-03-26 13:15:12 -07:00
Wang Han 8e73536e02 Remove unused hasGMS variable 2025-03-09 00:16:25 -08:00
topjohnwu 5885b8c20d Add new tests for app hiding 2024-12-18 17:22:31 -08:00
Wang Han c2eb603957 Require GMS to be system app
Fixes https://github.com/topjohnwu/Magisk/issues/8279.
2024-08-20 10:36:14 -07:00
残页 c8fe0f5524 Catch possible exceptions when the receiver is already unregistered 2024-07-23 02:06:15 -07:00
topjohnwu 050a073771 Make all I/O suspendable 2024-03-12 03:24:42 -07:00
topjohnwu 4bf1c74164 Disable foreground service on API 34+ 2024-02-06 17:29:42 -08:00
topjohnwu 38ad871e33 Use user-initiated jobs for download tasks on API 34+ 2024-02-06 17:04:39 -08:00
topjohnwu 5a5d0d5d72 Add missing permissions 2023-08-27 23:29:34 -07:00
vvb2060 f827755aaf Skip getSessionInfo 2023-04-05 01:46:33 -07:00
LoveSy b0fc580860 Avoid crash when calling abandonSession 2023-04-05 00:36:51 -07:00
LoveSy c7a27481f9 Update proguard rules to fix module page crash 2023-02-27 20:50:24 -08:00
LoveSy 594c304634 Fix release build 2023-02-26 22:35:20 -08:00
topjohnwu 9b1e173373 Update AGP 2023-02-20 01:03:35 -08:00
LoveSy 4ba365565f Upgrade gradle 2023-02-20 00:08:23 -08:00
vvb2060 7769ba5f54 Remove READ_EXTERNAL_STORAGE permission added by AGP 1.8 2023-01-18 12:52:24 +08:00
canyie 2839978cc1 Use null oat dir in root service only 2023-01-12 22:38:14 +08:00
vvb2060 7871c2f595 Update deps 2022-12-26 17:16:26 -08:00
vvb2060 52cf72002a Update resources load
addAssetPath supports apk and directory
2022-10-12 13:07:30 -07:00
topjohnwu 928a16d8cc Update app to target API 33
Close #6206
2022-08-23 03:59:09 -07:00
topjohnwu 3f7f6e619a Use VERSION_CODES instead of raw numbers 2022-08-23 01:43:53 -07:00
topjohnwu 9016e6727d Fix stub app loading on older Android versions 2022-06-05 01:09:30 -07:00
残页 a3381da7ed Bypass DexFile's security check for RootService (#5911)
Old Android (pre 8.0) enforces `optimizedDirectory` to have the same uid with the process. If repackaged, root service (uid=0) will crash when trying to load current.apk. So we set `optimizedDirectory` to null to bypass the check.
2022-06-04 04:21:57 -07:00
topjohnwu c8492b0c58 Use official APIs to load dynamic resources 2022-05-22 19:20:24 -07:00
vvb2060 6df42a4be7 Handle install failure 2022-03-01 23:05:06 -08:00
vvb2060 6dabd3bb2d Abandon unsuccessful session 2022-02-16 23:03:01 -08:00
topjohnwu e36596470c Minor adjustments 2022-02-13 20:16:23 -08:00
topjohnwu 668e549208 Refactor APKInstall 2022-02-13 19:54:59 -08:00
topjohnwu 256ff31d11 Show notification after app upgrade 2022-02-13 18:35:35 -08:00
topjohnwu 8f0ea5925a Relaunch process without second process 2022-02-13 02:58:55 -08:00
topjohnwu 10f991b8d0 Directly stream APK into install session 2022-02-03 03:50:52 -08:00
topjohnwu c1fc3f373c Proper app relaunch for stub 2022-02-02 04:44:22 -08:00
topjohnwu f4cf5dc0cd Rename class 2022-02-02 02:50:27 -08:00
topjohnwu 355341f0ab Use AppComponentFactory to replace ClassLoader 2022-02-01 22:43:44 -08:00
topjohnwu e0410b6f10 TLS only on release builds 2022-01-22 22:57:34 -08:00
南宫雪珊 baa19f0ccf Rewrite app installation
Fix  #4960
2021-12-14 05:20:29 -08:00
topjohnwu 54e3f1998a Support RootService on stub APKs 2021-12-13 04:05:42 -08:00
topjohnwu 470fc97d1f Remove SafetyNet check 2021-09-13 01:41:31 -07:00
vvb2060 605189bc6e Hide overlay windows 2021-09-02 23:17:01 -07:00
topjohnwu 9c09ad3b62 Open source fully obfuscated stub 2021-09-02 21:31:33 -07:00
vvb2060 fb93af665d Remove obsolete SDK_INT check 2021-04-23 16:56:23 -07:00
topjohnwu 1b9d8e068a Remove/move unused files 2021-04-18 05:04:14 -07:00
topjohnwu 7e01f9c95e Minor changes 2021-04-17 19:57:47 -07:00
vvb2060 0a6140c6eb Try install with root first 2021-02-22 03:08:51 -08:00
vvb2060 bba2ac8817 Add unsupport env check 2021-02-22 03:08:51 -08:00
topjohnwu 331b1f542f Use standard Android APIs for install and launch 2021-02-20 20:12:35 -08:00
topjohnwu 6951d926f7 Rename app name to just Magisk 2021-01-24 07:35:00 -08:00