Commit Graph

340 Commits

Author SHA1 Message Date
Viktor De Pasquale
cf918e7df8 Updated text "variant" transparency 2020-01-31 04:09:45 +08:00
Viktor De Pasquale
1ba9faf35b Added legacy theme (Fraxure)
Theme is, in color, identical to legacy colors.
2020-01-31 04:09:45 +08:00
Viktor De Pasquale
6e48294f2a Removed unnecessary files and merged styles 2020-01-31 04:09:45 +08:00
Viktor De Pasquale
7bf7bfb9c6 Updated Flash / SuRequest activities with app themes
CompatActivity/Fragment logic has been moved to respective BaseUI. Some deprecated and unused styles have been removed in favor or newer themes.
2020-01-29 01:12:21 +08:00
topjohnwu
a8bb7c68a3 Add missing string resources 2020-01-25 23:03:39 +08:00
topjohnwu
0dc9f5c324 Rename some string IDs 2020-01-23 02:34:18 +08:00
topjohnwu
3a10597aed Remove unused resources 2020-01-23 02:14:00 +08:00
topjohnwu
2291be5d26 Merge string resources 2020-01-23 01:40:36 +08:00
topjohnwu
433ae89e53 Make things run on API 17 2020-01-15 00:05:44 +08:00
Viktor De Pasquale
fcedd06e72 Added grid column count settings
*Cough, cough* Use pinch to zoom gesture instead, not a fan of this.
2020-01-06 20:00:33 +01:00
Viktor De Pasquale
6a2acbe929 Added tiny hint that magisk can be uninstalled using the icon 2020-01-06 19:31:06 +01:00
Viktor De Pasquale
904948dc7d Added empty states for all remaining screens
Fixed some issues in the process as the MergeObservableList doesn't support additions or deletions, duh...
2020-01-06 19:03:36 +01:00
Viktor De Pasquale
ed837ba26f Updated the logic that refreshes the modules
Also added empty states for installed and made updatable modules visible all the time to avoid unnecessary transitions
2020-01-06 17:46:08 +01:00
Viktor De Pasquale
8737be2623 Updated policy (apps) layout to be more compact
Added pinch in to increase list span count / out to decrease
  The setting will be remembered across the whole app (every list that uses Staggered Grid)
Updated indication of whether the policy has root access enabled permitted or not
  Displays crossed out app logo if not permitted
2020-01-04 16:07:53 +01:00
Viktor De Pasquale
37677f389c Finished rebranding core-only mode to safe mode
In compliance with #2131

Mentioned features are not contained within this commit
2019-12-06 15:00:55 +01:00
Viktor De Pasquale
dec1094a59 Added "input" settings item, that opens custom input dialog
Updated order of some items in settings
2019-11-29 20:22:24 +01:00
Viktor De Pasquale
627b40799c Fixed checkbox (switch) colors 2019-11-28 18:58:04 +01:00
Viktor De Pasquale
73c4b21285 Added (partially) settings screen
Most importantly added design and functionality backing for these items
2019-11-27 19:47:20 +01:00
Viktor De Pasquale
a20594ed48 Added emphasis on support section 2019-11-25 17:25:49 +01:00
Viktor De Pasquale
cb59cc92a3 Updated action cards to be more colorful 2019-11-25 16:58:57 +01:00
Viktor De Pasquale
cc7e47bbb6 Added themes
All files (that used styles) were refactored to use styles directly so themes can only actually adjust colors
 - Elaborate themes would be super hard to maintain and would certainly break over time
2019-11-22 19:29:53 +01:00
Viktor De Pasquale
4f0e1c6c61 Merge remote-tracking branch 'john/master' into feature/redesign
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/topjohnwu/magisk/Hacks.kt
#	app/src/main/java/com/topjohnwu/magisk/data/database/RepoDatabase.kt
#	app/src/main/java/com/topjohnwu/magisk/data/repository/LogRepository.kt
#	app/src/main/java/com/topjohnwu/magisk/di/DatabaseModule.kt
#	app/src/main/java/com/topjohnwu/magisk/extensions/RxJava.kt
#	app/src/main/java/com/topjohnwu/magisk/extensions/XAndroid.kt
#	app/src/main/java/com/topjohnwu/magisk/extensions/XJava.kt
#	app/src/main/java/com/topjohnwu/magisk/model/download/RemoteFileService.kt
#	app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/LogRvItem.kt
#	app/src/main/java/com/topjohnwu/magisk/model/events/ViewEvents.kt
#	app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.kt
#	app/src/main/res/xml/app_settings.xml
2019-11-21 17:46:59 +01:00
Viktor De Pasquale
6379108a75 Added new log screen 2019-11-20 22:42:44 +01:00
Viktor De Pasquale
fbeaad077f Updated themes so they are separated from styles 2019-11-19 18:53:50 +01:00
Viktor De Pasquale
8918113a31 Added colored borderless ripple effect 2019-11-19 17:56:32 +01:00
Viktor De Pasquale
afc3fb10c7 Updated icon padding for all buttons 2019-11-19 17:16:07 +01:00
Viktor De Pasquale
833269fd0a Updated install from storage button to be more expressive 2019-11-18 17:49:03 +01:00
Viktor De Pasquale
332c1a6c59 Removed overcomplicated updates loading
The mechanism was replaced by loading updated directly by id to the initial list. There are two factors why yesterday-me was dumb:

1) By asynchronously loading update state, you have no control over it - hence no search
2) It's incredibly wasteful; running that hardcore search on every query? Not cool
...and from UX stand-point having updates inlined right under installed modules is by far better than nitpicking it from the list or in the search
2019-11-18 17:21:23 +01:00
Viktor De Pasquale
59c5363933 Updated colors and styles
Namely added secondary button
2019-11-16 20:07:35 +01:00
Viktor De Pasquale
0f140b408c Added installing external modules from storage 2019-11-16 19:16:59 +01:00
Viktor De Pasquale
2105cacce3 Fixed fab background color in dark mode
Now it's recognizable from the background
2019-11-14 19:10:49 +01:00
Viktor De Pasquale
9d1d1710eb Added new search functionality to module screen 2019-11-14 18:56:03 +01:00
topjohnwu
b29f0ca4d1 Support using BiometricPrompt 2019-11-14 05:42:39 -05:00
Viktor De Pasquale
e1bda4ee8b Added new filter for hide section
Parts of which will be reused in modules down the line
2019-11-13 18:29:30 +01:00
Viktor De Pasquale
495e734428 Updated module sections so it looks more consistent 2019-11-11 19:36:40 +01:00
Ilya Kushnir
65eca31635 Updating RU translation 2019-11-09 04:40:10 -05:00
Viktor De Pasquale
f83f92d3fa Updated modules screen so it displays all the content in one recyclerview
Added "endless" scrolling support
 - this is done in order to display everything very swiftly and load as user needs it
 - for the most part we'll download only ~10 items and load the rest as scroll progresses, this accomplishes the illusion that whole list is being populated
Added sections and updated repo view
2019-11-08 19:04:30 +01:00
Viktor De Pasquale
70a3dbe2b0 Added primitive implementation of modules screen 2019-11-05 19:38:02 +01:00
Viktor De Pasquale
169e9ab5ad Updated hide fragment layout and design of the filter window 2019-11-04 16:02:23 +01:00
topjohnwu
472cde29b8 Allow non supported Magisk to use Magisk Manager
Close #1576
2019-11-04 03:24:27 -05:00
Viktor De Pasquale
dad52724db Updated hide fragment with more robust filtering UI 2019-11-02 18:31:20 +01:00
Viktor De Pasquale
7d5555f82e Added safety notice and support section description 2019-11-01 19:02:30 +01:00
Viktor De Pasquale
6720725d27 Added clarifying tooltips and captions 2019-11-01 18:12:52 +01:00
Viktor De Pasquale
86551909fc Added safe mode notice to modules screen 2019-10-30 17:59:03 +01:00
Viktor De Pasquale
93c422dce6 Added post-merge fixes 2019-10-29 16:52:42 +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
f7aa451591 Update strings 2019-10-29 07:36:50 -04:00
topjohnwu
7693024c29 Replace general resources with platform 2019-10-26 19:23:57 -04:00
Viktor De Pasquale
a70c0174e1 Added device info card 2019-10-26 21:03:25 +02:00
Viktor De Pasquale
a41597431c Added more information to magisk/manager cards 2019-10-26 17:33:27 +02:00
Viktor De Pasquale
60a2e9b5dc Updated home info cards to be more compressed 2019-10-26 15:14:20 +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
5f4718cd13 Added string resources for install screen 2019-10-25 19:17:13 +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
82eeefb544 Added system version to the details section for safetynet checks 2019-10-24 18:40:15 +02:00
Viktor De Pasquale
9e3afcfe7a Added safetynet implementation 2019-10-24 18:00:51 +02:00
Viktor De Pasquale
17fb8f2298 Added new magisk install flow 2019-10-22 20:46:09 +02:00
Viktor De Pasquale
fbfc4e72ca Updated appbar design to be more android-like 2019-10-22 18:09:26 +02:00
Viktor De Pasquale
7ded7de39a Added custom dialog for setting app's name after repackaging 2019-10-22 04:52:19 -04:00
Viktor De Pasquale
ce2ca5446a Fixed checkbox's theme implementation in dark mode 2019-10-21 19:22:56 +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
236ad57608 Added showing download progress in the home ui 2019-10-20 12:40:50 +02:00
Viktor De Pasquale
c954a4f7bc Updated icons and texts for magisk hide and safetynet 2019-10-20 11:29:04 +02:00
Viktor De Pasquale
c44a942fb7 Added entry for safetynet attestation 2019-10-19 22:28:01 +02:00
Viktor De Pasquale
d713ad3499 Added "advanced" install options for installing magisk 2019-10-19 22:14:23 +02:00
Viktor De Pasquale
ddf40df649 Updated colors and elevation to be less distracting 2019-10-19 21:12:30 +02:00
Viktor De Pasquale
fcbf56e93a Added superuser screen implementation
* partially
2019-10-18 19:38:55 +02:00
Viktor De Pasquale
a539ffb188 Updated styles due to low accessibility 2019-10-18 18:15:22 +02:00
topjohnwu
40eda05a30 Make main app fully independent from the stub
- Skip 0x7f01XXXX - 0x7f05XXXX resource IDs in the main app; they are
reserved for stub resources
- Support sending additional data from host to guest
- Use resource mapping passed from host when they are being sent
to the system framework (notifications and shortcuts)
2019-10-17 02:55:42 -04:00
Viktor De Pasquale
6ccbc272c6 Merge remote-tracking branch 'john/master' into feature/redesign
# Conflicts:
#	app/build.gradle
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/topjohnwu/magisk/model/events/ViewEvents.kt
#	app/src/main/java/com/topjohnwu/magisk/model/navigation/MagiskNavigationEvent.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/view/MagiskDialog.kt
#	app/src/main/res/layout/dialog_magisk_base.xml
2019-10-16 17:33:54 +02:00
Viktor De Pasquale
51247d36c5 Added disabled state for sections where unrooted user shouldn't have access 2019-10-16 15:47:41 +02:00
topjohnwu
5673a9bace Move system accessible resources to shared 2019-10-15 05:49:23 -04:00
topjohnwu
34ff764515 Stabilize resource IDs 2019-10-15 04:37:12 -04:00
topjohnwu
a49002bb2c Reorganize string resources 2019-10-15 03:33:22 -04:00
topjohnwu
5ffb9eaa5b Support loading Magisk Manager from stub on 9.0+
In the effort of preventing apps from crawling APK contents across the
whole installed app list to detect Magisk Manager, the solution here
is to NOT install the actual APK into the system, but instead
dynamically load the full app at runtime by a stub app. The full APK
will be stored in the application's private internal data where
non-root processes cannot read or scan.

The basis of this implementation is the class "AppComponentFactory"
that is introduced in API 28. If assigned, the system framework will
delegate app component instantiation to our custom implementation,
which allows us to do all sorts of crazy stuffs, in our case dynamically
load classes and create objects that does not exist in our APK.

There are a few challenges to achieve our goal though. First, Java
ClassLoaders follow the "delegation pattern", which means class loading
resolution will first be delegated to the parent loader before we get
a chance to do anything. This includes DexClassLoader, which is what
we will be using to load DEX files at runtime. This is a problem
because our stub app and full app share quite a lot of class names.
A custom ClassLoader, DynamicClassLoader, is created to overcome this
issue: it will always load classes in its current dex path before
delegating it to the parent.

Second, all app components (with the exception of runtime
BroadcastReceivers) are required to be declared in AndroidManifest.xml.
The full Magisk Manager has quite a lot of components (including
those from WorkManager and Room). The solution is to copy the complete
AndroidManifest.xml from the full app to the stub, and our
AppComponentFactory is responsible to construct the proper objects or
return dummy implementations in case the full APK isn't downloaded yet.

Third, other than classes, all resources required to run the full app
are also not bundled with the stub APK. We have to call an internal API
`AssetManager.addAssetPath(String)` to add our downloaded full APK into
AssetManager in order to access resources within our full app. That
internal API has existed forever, and is whitelisted from restricted
API access on modern Android versions, so it is pretty safe to use.

Fourth, on the subject of resources, some resources are not just being
used by our app at runtime. Resources such as the app icon, app label,
launch theme, basically everything referred in AndroidManifest.xml,
are used by the system to display the app properly. The system get these
resources via resource IDs and direct loading from the installed APK.
This subset of resources would have to be copied into the stub to make
the app work properly.

Fifth, resource IDs are used all over the place in XMLs and Java code.
The resource IDs in the stub and full app cannot missmatch, or
somewhere, either it be the system or AssetManager, will refer to the
incorrect resource. The full app will have to include all resources in
the stub, and all of them have to be assigned to the exact same IDs in
both APKs. To achieve this, we use AAPT2's "--emit-ids" option to dump
the resource ID mapping when building the stub, and "--stable-ids" when
building the full APK to make sure all overlapping resources in full
and stub are always assigned to the same ID.

Finally, both stub and full app have to work properly independently.
On 9.0+, the stub will have to first launch an Activity to download
the full APK before it can relaunch into the full app. On pre-9.0, the
stub should behave as it always did: download and prompt installation
to upgrade itself to full Magisk Manager. In the full app, the goal
is to introduce minimal intrusion to the code base to make sure this
whole thing is maintainable in the future. Fortunately, the solution
ends up pretty slick: all ContextWrappers in the app will be injected
with custom Contexts. The custom Contexts will return our patched
Resources object and the ClassLoader that loads itself, which will be
DynamicClassLoader in the case of running as a delegate app.
By directly patching the base Context of ContextWrappers (which covers
tons of app components) and in the Koin DI, the effect propagates deep
into every aspect of the code, making this change basically fully
transparent to almost every piece of code in full Magisk Manager.

After this commit, the stub app is able to properly download and launch
the full app, with most basic functionalities working just fine.
Do not expect Magisk Manager upgrades and hiding (repackaging) to
work properly, and some other minor issues might pop up.
This feature is still in the early WIP stages.
2019-10-14 03:49:17 -04:00
Viktor De Pasquale
ff24bc0b68 Updated card design on homepage 2019-10-12 16:10:44 +02:00
Viktor De Pasquale
ee06aed94b Updated toolbar and bottom bar design implementation
TBD:
Both toolbars should move away from the screen when scrolling
2019-10-10 17:34:06 +02:00
Viktor De Pasquale
5e01f785ae Added handling for state with no connection 2019-10-06 12:06:09 +02:00
Viktor De Pasquale
d35d1b8860 Added more styles to be used on top of primary color 2019-10-06 11:14:11 +02:00
Viktor De Pasquale
88027f2151 Fixed fonts 2019-10-05 23:31:05 +02:00
Viktor De Pasquale
df7a866617 Fixed widget order
Content mustn't overlay appbar
2019-10-05 22:59:04 +02:00
Viktor De Pasquale
1d64ddb7f5 Fixed dimensions and padding throughout the homescreen 2019-10-05 12:53:40 +02:00
Viktor De Pasquale
823b121cc7 Added support section content 2019-10-05 12:42:27 +02:00
Viktor De Pasquale
149d35c687 Updated strings 2019-10-05 11:39:33 +02:00
Viktor De Pasquale
4820a6e01c Updated toolbar to look more android-like 2019-10-03 18:41:04 +02:00
Viktor De Pasquale
14e49f3c80 Added redesign base
... also basic switching to redesign was added, haha
2019-10-02 19:42:38 +02:00
Viktor De Pasquale
cc8f1adca3 Added more styles regarding homescreen 2019-10-02 18:15:16 +02:00
Viktor De Pasquale
122e2f7a8e Updated styles and simplified dimension usage 2019-09-30 19:37:57 +02:00
Viktor De Pasquale
a5830599c4 Added initial load of styles and attributes
Required for creating basic screens
2019-09-24 20:29:35 +02:00
topjohnwu
0118f2efa7 Merge styles 2019-09-09 19:58:19 -04:00
topjohnwu
15312e4709 Remove unused resources 2019-09-09 17:57:25 -04:00
Ilya Kushnir
4119e6669e Update RU strings 2019-09-09 17:36:57 -04:00
topjohnwu
86481c74ff Allow user to select recovery mode
Close #1674
2019-09-08 00:44:26 -04:00
Viktor De Pasquale
f6045bf8b5 Added custom dialog for download location only 2019-07-20 14:57:03 -07:00
Viktor De Pasquale
e83f40d5c5 Added actions for opening files in the file browser
No icons are added at this time, so crashes might occur
2019-07-20 14:57:03 -07:00
Viktor De Pasquale
e5118418b2 Added option to have custom download location
The location is automatically added to list of supported paths for caching
2019-07-20 14:57:03 -07:00
Viktor De Pasquale
0785945635 Added appending installers to modules 2019-07-20 14:57:03 -07:00
Viktor De Pasquale
40b683111c Added an option to disable the new caching mechanism completely 2019-07-20 14:57:03 -07:00
Viktor De Pasquale
9542ca773f Added new CompoundDownloadService which will encapsulate all downloads and should manage post-download events as well
As of now it's still in a development stage and isn't connected to anything
2019-07-20 14:57:03 -07:00
osm0sis
b1e63f0f14 Manager: fix ModulesFragment reboot menu
- correct 'booloader' typo breaking bootloader entry
- remove extra bootloader entry Shell.su line which is unnecessary since it's covered by reboot()
- revert to using `reboot recovery` for recovery entry since `svc power reboot recovery` triggers a very disconcerting "Factory data reset" reboot dialog on many devices
- add Reboot to EDL mode option for good measure
2019-06-27 04:09:41 -04:00