Commit Graph

123 Commits

Author SHA1 Message Date
vvb2060 7871c2f595 Update deps 2022-12-26 17:16:26 -08:00
topjohnwu e9af773901 Remove usage of AndroidX CoreComponentFactory 2022-08-26 06:31:51 -07:00
vvb2060 42606efe56 Always remove task 2022-06-09 21:02:31 -07:00
topjohnwu eb777296d4 Suppress AppLinkUrlError 2022-06-06 05:26:53 -07:00
vvb2060 569e9ad937 Use noHistory attribute for SuRequestActivity 2022-06-06 02:58:52 -07:00
vvb2060 c495b3d183 Remove request uninstall code
unreachable
2022-06-06 02:51:11 -07:00
topjohnwu 24603b3cef Update Android Studio 2022-05-09 20:53:47 -07:00
topjohnwu 256ff31d11 Show notification after app upgrade 2022-02-13 18:35:35 -08:00
vvb2060 f6d765bf81 Su request activity has no affinity for any task 2022-02-11 01:08:04 -08:00
vvb2060 5e8e94fd0f Remove emoji compat 2022-01-22 05:30:59 -08:00
topjohnwu 022c217cfe Migrate to SplashScreen API 2021-11-05 04:16:58 -07:00
topjohnwu 81f57949ed Remove WorkManager as a dependency 2021-11-04 23:39:35 -07:00
topjohnwu 9c09ad3b62 Open source fully obfuscated stub 2021-09-02 21:31:33 -07:00
vvb2060 dcc1fd3ee4
Use PACKAGE_FULLY_REMOVED for magiskhide
Remove from magiskhide only if pkg fully deleted
2021-09-02 02:15:25 -07:00
vvb2060 68fbdd474c Target SDK 31 2021-09-02 01:39:34 -07:00
topjohnwu 5e1fba3603 Build a single APK for all ABIs 2021-05-13 00:21:04 -07:00
vvb2060 66cc9bc545 Pure 64bit support 2021-05-12 16:38:34 -07:00
vvb2060 aad52ae743 Fix UID removed action 2021-03-24 04:43:45 -07:00
vvb2060 ee0ec3fbfa Use UID_REMOVED action for multi-user and shared user id compatibility 2021-02-25 20:08:42 -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 1024e68eb6 Remove class mapping in full APK 2021-01-26 07:27:35 -08:00
vvb2060 4ea5f34bf3 Remove unused action 2021-01-23 18:11:08 -08:00
topjohnwu ab9a83c82f Bump target SDK to 30 2021-01-22 05:03:33 -08:00
topjohnwu ec8fffe61c Merge Magisk install zip into Magisk Manager
Distribute Magisk directly with Magisk Manager APK. The APK will
contain all required binaries and scripts for installation and
uninstallation. App versions will now align with Magisk releases.

Extra effort is spent to make the APK itself also a flashable zip that
can be used in custom recoveries, so those still prefer to install
Magisk with recoveries will not be affected with this change.

As a bonus, this makes the whole installation and uninstallation
process 100% offline. The existing Magisk Manager was not really
functional without an Internet connection, as the installation process
was highly tied to zips hosted on the server.

An additional bonus: since all binaries are now shipped as "native
libraries" of the APK, we can finally bump the target SDK version
higher than 28. The target SDK version was stuck at 28 for a long time
because newer SELinux restricts running executables from internal
storage. More details can be found here: https://github.com/termux/termux-app/issues/1072
The target SDK bump will be addressed in a future commit.

Co-authored with @vvb2060
2021-01-22 02:29:54 -08:00
topjohnwu 1232113772 Update preference migration implementation
Only try to read preference through content provider when the app
is fresh install and a previous package ID is set. Also catch all
Exceptions to prevent crashing the app.

This prevents malicious settings injection and crashes when multiple
manager is installed.

Fix #3542
2020-12-09 02:07:58 -08:00
topjohnwu 9241246de6 Only use MediaStore APIs on Android 11+
Fix #3428
2020-11-13 02:53:30 -08:00
vvb2060 a4c48847d1 Cancel vibration to sync with notification channel 2020-10-17 05:56:07 -07:00
topjohnwu eb04ca4c4a Make provider boot aware
Close #3322
2020-10-11 05:19:05 -07:00
topjohnwu 6092d7ca88 Minor cleanups 2020-10-11 05:10:02 -07:00
topjohnwu 65f88e4ae2 Remove unnecessary permissions 2020-08-23 04:36:22 -07:00
topjohnwu 31681c9c5f Remove ProcessPhoenix 2020-08-23 00:12:58 -07:00
topjohnwu 4b238a9cd0 Add feature to create launch shortcuts 2020-08-21 03:36:12 -07:00
topjohnwu f200d472ef Move icon resources out of stubs 2020-08-20 06:02:22 -07:00
topjohnwu cba26eedb5 Move several stuffs out of shared 2020-03-30 04:25:42 -07:00
Viktor De Pasquale 6907651756 Updated flash screen so it's a fragment
The FlashActivity has been removed and all of it's functionality has been transferred to the FlashFragment.
The FlashFragment needs to be however launched in a different way than the activity using the MainActivity's stub and so seemingly massive changes had to be made.

Notably the RemoteFileService didn't seem to be calling Service.startForeground(), which has been crashing the application due to the system requirements, so that's been fixed.
2020-03-26 03:42:52 -07:00
topjohnwu df0a5b59f8 Replace old design with redesign (p1) 2020-01-12 15:00:49 +08:00
topjohnwu 7e9b3f1a60 Merge components 2020-01-04 04:48:13 +08: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
topjohnwu b29f0ca4d1 Support using BiometricPrompt 2019-11-14 05:42:39 -05:00
topjohnwu a2ddf362d8 Make a.a not extend AppComponentFactory
Fix #2053
2019-11-09 16:13:15 -05:00
topjohnwu 61de63a518 Cleanup manifest 2019-11-08 02:15:30 -05:00
topjohnwu d952cc2327 Properly solve the connection problem 2019-11-07 17:41:59 -05:00
Viktor De Pasquale 169e9ab5ad Updated hide fragment layout and design of the filter window 2019-11-04 16:02:23 +01:00
topjohnwu 26618f8d73 Don't do broadcast tests from app
Running broadcast tests from the app does not accurately verifies
whether the broadcasts can be delivered when the app is not running in
the foreground, which is why we are running the test.

The only sane way to verify broadcasts is to trigger the broadcast test
directly from the daemon on boot complete. If it is not deliverable,
then activity mode shall be chosen.

In the meantime, cleanup AndroidManifest.xml
2019-11-03 17:01:09 -05: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 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
topjohnwu 96a8a2a8b8 Make SuRequest default to Translucent.NoTitleBar
Close #1959
2019-10-20 17:35:38 -04:00
topjohnwu 9f9de8c43b Obfuscate WorkManager components
Remove unused components and hack the context sent into WorkManager
2019-10-16 17:03:55 -04:00