Commit Graph

953 Commits

Author SHA1 Message Date
Viktor De Pasquale 588e94c11d Updated locations of certain elements
Settings are now only on home screen as it directly relates to what user might want to do. It is highly unlikely that they would jump from any other screen to settings.
Log is no longer main destination as it's not used very widely; it's been moved to Superuser screen. This screen now encapsulates all root-related stuff.

Home screen is now strictly info-based, except install buttons, of course.
2019-10-30 17:11:42 +01:00
Viktor De Pasquale 93c422dce6 Added post-merge fixes 2019-10-29 16:52:42 +01:00
Viktor De Pasquale 7d6eebdae3 Fixed unreasonable change resulting in major breakage all around the app 2019-10-29 16:50:01 +01:00
Viktor De Pasquale f11bb609c9 Merge remote-tracking branch 'john/master' into feature/redesign
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/topjohnwu/magisk/ClassMap.kt
#	app/src/main/java/com/topjohnwu/magisk/Info.kt
#	app/src/main/java/com/topjohnwu/magisk/extensions/XAndroid.kt
#	app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.kt
#	app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.kt
#	app/src/main/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt
2019-10-29 15:53:53 +01:00
topjohnwu 5e87483f34 Move addAssetPath to shared 2019-10-29 07:37:19 -04:00
topjohnwu ee447bc4ce Improve Keygen yet again 2019-10-26 21:11:32 -04:00
topjohnwu 7693024c29 Replace general resources with platform 2019-10-26 19:23:57 -04:00
topjohnwu 626507093a Don't need to wrap another layer of context 2019-10-26 15:37:12 -04:00
Viktor De Pasquale ee7d297ca8 Partially reverted developer section changes 2019-10-26 21:14:01 +02:00
Viktor De Pasquale a70c0174e1 Added device info card 2019-10-26 21:03:25 +02:00
Viktor De Pasquale da707afa3f Updated install ui to better fit app's theme 2019-10-26 17:40:29 +02:00
Viktor De Pasquale a41597431c Added more information to magisk/manager cards 2019-10-26 17:33:27 +02:00
Viktor De Pasquale d0b817381e Added "caching" of the safetynet response 2019-10-26 16:03:07 +02:00
Viktor De Pasquale df3a37b0a3 Updated developer section to be horizontally scrollable instead of vertically
In order to make room for more information
2019-10-26 12:41:34 +02:00
Viktor De Pasquale 3cc5cb3123 Updated the install flow
Now the binary is downloaded after user selects a method. It also shows download progress as the file's being downloaded
2019-10-25 19:13:54 +02:00
Viktor De Pasquale 8a2872afa4 Removed pre-download while installing magisk 2019-10-25 17:46:20 +02:00
Viktor De Pasquale 85941c4729 Removed lol code 2019-10-25 15:40:46 +02:00
topjohnwu 97a691ce2f Improve keygen for signing repackaged manager 2019-10-24 13:04:15 -04:00
Viktor De Pasquale 82eeefb544 Added system version to the details section for safetynet checks 2019-10-24 18:40:15 +02:00
topjohnwu 9d948f2c2b Temporary disable verification when hiding app
For some reason, Google Play Protect randomly blocks our self-signed
repackaged Magisk Manager APKs. Since we are root, the sky is our
limit, so yeah, disable package verification temporarily when installing
patched APKs, LOLz

Close #1979
2019-10-24 12:23:03 -04:00
Viktor De Pasquale f6061ba00e Fixed bottom navigation popping up when it shouldn't 2019-10-24 18:07:36 +02:00
Viktor De Pasquale 9e3afcfe7a Added safetynet implementation 2019-10-24 18:00:51 +02:00
topjohnwu 0b87108174 Move things around 2019-10-24 05:21:42 -04:00
topjohnwu 7fc7809cfc More precise channel targeting 2019-10-24 04:25:05 -04:00
topjohnwu c30be20e49 Minor CachedValue fix 2019-10-24 04:02:01 -04:00
topjohnwu 25c64db0a1 Treat outdated stub as outdated manager 2019-10-24 03:54:16 -04:00
topjohnwu 676e9c6593 Provide upgrade path for stubs 2019-10-24 02:47:40 -04:00
topjohnwu d459859361 Show stub version 2019-10-24 00:54:40 -04:00
topjohnwu 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
Viktor De Pasquale 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
Viktor De Pasquale 04576ca828 Added install implementation 2019-10-23 19:14:39 +02:00
Viktor De Pasquale 067cb0cd9d Fixed magisk button states 2019-10-23 16:20:01 +02:00
topjohnwu 5133e5910e Don't relaunch app immediately 2019-10-23 07:12:00 -04:00
topjohnwu 45c1f6bc27 Fix restore manager when running as stub 2019-10-23 06:43:08 -04:00
topjohnwu 0d31e5c8b1 Properly migrate update channels when repackaging 2019-10-23 06:41:25 -04:00
topjohnwu f8fcaadb5b Hide manager with stub if feasible 2019-10-23 05:50:06 -04:00
topjohnwu 0b5fd3ee76 Only allow hide/restore app if connected 2019-10-23 05:43:01 -04:00
topjohnwu 71136d7347 Manually trigger broadcast tests if necessary 2019-10-22 16:04:20 -04:00
topjohnwu a18c552ddf Guard env state behind cached objects 2019-10-22 15:37:55 -04:00
Viktor De Pasquale 17fb8f2298 Added new magisk install flow 2019-10-22 20:46:09 +02:00
Viktor De Pasquale d2e171eabc Added a way to listen to download service from homepage and behave accordingly 2019-10-22 17:29:45 +02:00
Viktor De Pasquale e50094af80 Added install fragment 2019-10-22 16:29:01 +02:00
Viktor De Pasquale 93edf72993 Rationalize download failure 2019-10-22 16:26:28 +02:00
Viktor De Pasquale a230d63cf9 Fixed having an error doesn't inform external listeners 2019-10-22 16:22:28 +02:00
topjohnwu 9656878ef3 Actually apply the input name 2019-10-22 05:06:17 -04:00
Viktor De Pasquale 7ded7de39a Added custom dialog for setting app's name after repackaging 2019-10-22 04:52:19 -04:00
topjohnwu 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
Viktor De Pasquale 8a014ff786 Added most of the remaining functionality for Magisk install dialog 2019-10-21 19:22:16 +02:00
Viktor De Pasquale dc09ec7598 Added theme mode picker dialog
Redesigned settings' selector for dark mode a bit
2019-10-20 17:28:18 +02:00
Viktor De Pasquale 27fb0474d5 Added more standard night-mode system 2019-10-20 17:27:39 +02:00