Commit Graph

4130 Commits

Author SHA1 Message Date
0b87108174 Move things around 2019-10-24 05:21:42 -04:00
7fc7809cfc More precise channel targeting 2019-10-24 04:25:05 -04:00
c30be20e49 Minor CachedValue fix 2019-10-24 04:02:01 -04:00
25c64db0a1 Treat outdated stub as outdated manager 2019-10-24 03:54:16 -04:00
676e9c6593 Provide upgrade path for stubs 2019-10-24 02:47:40 -04:00
d459859361 Show stub version 2019-10-24 00:54:40 -04:00
2be0cef446 Add proper intent filters to stub 2019-10-23 17:55:26 -04:00
294db93fde Copy instead of move
We might be copying from CE to DE storage, which cannot be moved
2019-10-23 17:20:55 -04:00
21f2f86cb8 Added safetynet implementation
The implementation itself was moved from fragment to self contained event. The result resolution might be moved to the event as well
2019-10-23 21:17:53 +02:00
04576ca828 Added install implementation 2019-10-23 19:14:39 +02:00
067cb0cd9d Fixed magisk button states 2019-10-23 16:20:01 +02:00
7f971f7173 Make sure our constructor is preserved 2019-10-23 07:51:32 -04:00
5c7b59524d Fix strings 2019-10-23 07:15:28 -04:00
5133e5910e Don't relaunch app immediately 2019-10-23 07:12:00 -04:00
1512c350df magiskboot: add SPRD dt support
- per https://github.com/USA-RedDragon/sprd-mkbootimg-tools/blob/master/dtbtool.c
- touch up hdr and table naming to be more uniform
2019-10-23 06:58:31 -04:00
a5fc7891a6 build: Addressed file not found 2019-10-23 06:57:47 -04:00
3eb9633231 Add Hindi Translation 2019-10-23 06:53:46 -04:00
ac67b48247 Fix swedish translation typo 2019-10-23 06:53:07 -04:00
81b65ea646 Exclude stub id mappings from git 2019-10-23 06:45:47 -04:00
45c1f6bc27 Fix restore manager when running as stub 2019-10-23 06:43:08 -04:00
0d31e5c8b1 Properly migrate update channels when repackaging 2019-10-23 06:41:25 -04:00
6378abf454 Make stub support directBootAware 2019-10-23 05:52:32 -04:00
f8fcaadb5b Hide manager with stub if feasible 2019-10-23 05:50:06 -04:00
0b5fd3ee76 Only allow hide/restore app if connected 2019-10-23 05:43:01 -04:00
d010cb7e42 Update stub 2019-10-23 05:19:54 -04:00
71136d7347 Manually trigger broadcast tests if necessary 2019-10-22 16:04:20 -04:00
a18c552ddf Guard env state behind cached objects 2019-10-22 15:37:55 -04:00
17fb8f2298 Added new magisk install flow 2019-10-22 20:46:09 +02:00
fbfc4e72ca Updated appbar design to be more android-like 2019-10-22 18:09:26 +02:00
d2e171eabc Added a way to listen to download service from homepage and behave accordingly 2019-10-22 17:29:45 +02:00
e50094af80 Added install fragment 2019-10-22 16:29:01 +02:00
93edf72993 Rationalize download failure 2019-10-22 16:26:28 +02:00
a230d63cf9 Fixed having an error doesn't inform external listeners 2019-10-22 16:22:28 +02:00
9656878ef3 Actually apply the input name 2019-10-22 05:06:17 -04:00
7ded7de39a Added custom dialog for setting app's name after repackaging 2019-10-22 04:52:19 -04:00
0f74e89b44 Introduce component agnostic communication
Usually, the communication between native and the app is done via
sending intents to either broadcast or activity. These communication
channels are for launching root requests dialogs, sending root request
notifications (the toast you see when an app gained root access), and
root request logging.

Sending intents by am (activity manager) usually requires specifying
the component name in the format of <pkg>/<class name>. This means parts
of Magisk Manager cannot be randomized or else the native daemon is
unable to know where to send data to the app.

On modern Android (not sure which API is it introduced), it is possible
to send broadcasts to a package, not a specific component. Which
component will receive the intent depends on the intent filter declared
in AndroidManifest.xml. Since we already have a mechanism in native code
to keep track of the package name of Magisk Manager, this makes it
perfect to pass intents to Magisk Manager that have components being
randomly obfuscated (stub APKs).

There are a few caveats though. Although this broadcasting method works
perfectly fine on AOSP and most systems, there are OEMs out there
shipping ROMs blocking broadcasts unexpectedly. In order to make sure
Magisk works in all kinds of scenarios, we run actual tests every boot
to determine which communication method should be used.

We have 3 methods in total, ordered in preference:
1. Broadcasting to a package
2. Broadcasting to a specific component
3. Starting a specific activity component

Method 3 will always work on any device, but the downside is anytime
a communication happens, Magisk Manager will steal foreground focus
regardless of whether UI is drawn. Method 1 is the only way to support
obfuscated stub APKs. The communication test will test method 1 and 2,
and if Magisk Manager is able to receive the messages, it will then
update the daemon configuration to use whichever is preferable. If none
of the broadcasts can be delivered, then the fallback method 3 will be
used.
2019-10-21 13:59:04 -04:00
953c40b083 Allow upgrade Magisk daemon in emulator 2019-10-21 13:58:57 -04:00
2bb39bee2f Updated redesign button design 2019-10-21 19:30:14 +02:00
ce2ca5446a Fixed checkbox's theme implementation in dark mode 2019-10-21 19:22:56 +02:00
8a014ff786 Added most of the remaining functionality for Magisk install dialog 2019-10-21 19:22:16 +02:00
271b0287d8 Pass in stub version just in case 2019-10-20 17:47:55 -04:00
96a8a2a8b8 Make SuRequest default to Translucent.NoTitleBar
Close #1959
2019-10-20 17:35:38 -04:00
dc09ec7598 Added theme mode picker dialog
Redesigned settings' selector for dark mode a bit
2019-10-20 17:28:18 +02:00
27fb0474d5 Added more standard night-mode system 2019-10-20 17:27:39 +02:00
7f0a87742a Fixed design issues in dialogs
Dark theme not being properly implemented
Icons were not set
2019-10-20 17:26:00 +02:00
47e236788c Added uninstall dialog 2019-10-20 16:47:02 +02:00
75306f658f Revert "Drop API 17 (Android 4.2) support"
Turns out that we cannot use AndroidKeystore anyways, so we don't
actually need to drop API 17. Revert this change.
2019-10-20 07:13:03 -04:00
325d9a0b86 Generate keys for signing hidden Magisk Manager 2019-10-20 06:56:33 -04:00
236ad57608 Added showing download progress in the home ui 2019-10-20 12:40:50 +02:00
6d03798314 Added internal download pseudo broadcasts 2019-10-20 12:40:26 +02:00