-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Morphe homepage root installation #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The only way to know a device is rooted, is to do something that requires root, and magisk/etc prompts the user to grant root. So, that makes it tricky presenting a "Use root installation" UI switch in the simple settings when root status has not been confirmed. The choices are:
I don't like option 1 because it shows settings that are meaningless and potentially confusing to 99% of users. Option 2 is by far the easiest and most seamless for the end user. But is it rude requesting root preemptively? The user can deny the magisk popup, and it would only ask once ever. But it is concerning the app is requesting root without the user knowing why. Option 3 is the safest/laziest. We don't request root unless the user opts in using the advanced settings and the user changes the installer type to root. I am in favor of option 2 or option 3. Option 3 is the lowest code maintenance and less likely to have future bugs. |
|
I'm going to do option 3 because it's the simplest, root users are rare, and non-root install can change the app icon. Simple install mode will still show the slightly different instructions that were previously added. |
app/src/main/java/app/revanced/manager/ui/screen/MorphePatcherScreen.kt
Outdated
Show resolved
Hide resolved
35ba0f9 to
1fdcf20
Compare
| // Install type is needed for UI components. | ||
| // Ideally this logic is part of some other code, but for now this is simple and works. | ||
| val usingMountInstall = | ||
| prefs.installerPrimary.getBlocking() == InstallerPreferenceTokens.AUTO_SAVED && | ||
| dashboardViewModel.rootInstaller?.hasRootAccess() == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be improved, but for now it works and makes no changes to upstream URV
|
@MarcaDian If you want to make any adjustments to the mount (root) dialogs or anything else about root usage, then feel free. Otherwise I think this is ready to merge. |
|
I'm some busy at real job, so I'll check later tonight. Has the second dialog been fixed? In the previous code it showed the same instructions for root users as for non-root users. Can you write here the steps of the instructions? Also, might need to use a different solution for landscape mode instead of scrolling. The hard way is to completely disable landscape mode and remove the adaptation code, but this might be a problem for those who will use the manager on non-standard devices such as TVs or tablets. |
|
All the dialogs show the correct information for root and non root. I'll post screenshots later. Can show root UI by changing morphe-manager/app/src/main/java/app/revanced/manager/ui/screen/MorpheHomeScreen.kt Lines 68 to 69 in 65ba674
|
This comment was marked as outdated.
This comment was marked as outdated.
|
maybe remove the cancel button entirely? The user can press back button if they must. |
|
Maybe remove the icon from the top too. Keep everything on screen as minimal as possible so there's less to read/process. |
|
From what I can find, it might be possible for Manager to monitor the device downloads and automatically check for the expected APK. It only works with more recent Android releases, but it seems that if a criteria is given (such as apk files), then files in the download folder can be scanned without requiring approval from the end user. This could remove the need for the user to pick the file when they return to the app, because Manager would detect the correct apk (correct version number, and could check the download date to verify it's new and not some old patched apk)., Maybe it was A.I. hallucinating this feature, but could explore this more at a later time. |
|
I think it's ready (I didn't check the root layout) Also I didn't notice at what point the patch update function broke. |
|
I have patch update almost fixed in the other PR. It broke with 1.6.0 update. |
# app [1.0.0-dev.2](v1.0.0-dev.1...v1.0.0-dev.2) (2025-12-15) ### Bug Fixes * After changing pre-release, show snackbar and block starting patching until bundles are updated ([1fe7aa1](1fe7aa1)) * Change first greeting message shown to be more traditional and easier to understand what to do ([c8f797f](c8f797f)) * Correct rounding errors of progress value ([eb31b73](eb31b73)) * Do not show patches update snackbar unless user is manually refreshing ([8d35d28](8d35d28)) * Fix app console warning of provider not found ([d2c76b7](d2c76b7)) * Hide update on metered connection from advanced settings menu ([91ae275](91ae275)) * Show patches update UI when using advanced mode ([309f7db](309f7db)) * Use Morphe patches API ([#12](#12)) ([01cdffc](01cdffc)) ### Features * Add a delay at 100% before showing success screen ([abb5ab5](abb5ab5)) * Adjust layout of patches list and change log in modal patches bundle ([#13](#13)) ([0dcf5b9](0dcf5b9)) * Morphe homepage root installation ([#10](#10)) ([8ed769f](8ed769f))
# app 1.0.0 (2026-01-01) ### Bug Fixes * After changing pre-release, show snackbar and block starting patching until bundles are updated ([1fe7aa1](1fe7aa1)) * Allow all files as .mpp files are not available in file picker ([80ad1ec](80ad1ec)) * Change first greeting message shown to be more traditional and easier to understand what to do ([c8f797f](c8f797f)) * Correct rounding errors of progress value ([eb31b73](eb31b73)) * Do not show empty space above the About section ([e2eaf7d](e2eaf7d)) * Do not show patches update snackbar unless user is manually refreshing ([8d35d28](8d35d28)) * Fix `isBundleUpdating` state after merge upstream changes ([7598e6d](7598e6d)) * Fix `lateinit property eventHandler has not been initialized` ([#25](#25)) ([d074a14](d074a14)) * Fix apk picker ([ae813d6](ae813d6)) * Fix app console warning of provider not found ([d2c76b7](d2c76b7)) * Fix build ([fe5250b](fe5250b)) * Fix the dack theme color picker ([24d4c5f](24d4c5f)) * Hide update on metered connection from advanced settings menu ([91ae275](91ae275)) * Increase installer timeout ([934305b](934305b)) * Increase installer timeout wait time ([648f22b](648f22b)) * Remove blinking when opening dialog, use gradient instead of blur (works on A12+ but not well) ([b851913](b851913)) * Resolve bundle fetching from upstream merge ([#11](#11)) ([d9166b8](d9166b8)) * Restore only delete button ([bf7c045](bf7c045)) * Show "Patches are loading" on fresh install ([170d17f](170d17f)) * Show "Patches are loading" toast if bundles are downloading ([3d59980](3d59980)) * Show patches update UI when using advanced mode ([309f7db](309f7db)) * Skip if patch doesn't exist in this bundle ([6482987](6482987)) * Update changelog after bundle update ([ed9c173](ed9c173)) * Use Morphe patches API ([#12](#12)) ([01cdffc](01cdffc)) * Use the appropriate string ([7661989](7661989)) ### Features * Add a delay at 100% before showing success screen ([abb5ab5](abb5ab5)) * Add adaptive landscape mode ([#8](#8)) ([3bbc62e](3bbc62e)) * Add haptic feedback to About setting item ([d3f8e33](d3f8e33)) * Add in-app patches options ([#27](#27)) ([2ce57a7](2ce57a7)) * Add link to the Crowdin ([b0b94cb](b0b94cb)) * Add more haptic feedback ([967f9ca](967f9ca)) * Adjust layout of patches list and change log in modal patches bundle ([#13](#13)) ([0dcf5b9](0dcf5b9)) * Change buttons priority ([85fdd86](85fdd86)) * Change Particles background to Space ([9575446](9575446)) * Custom Morphe home screen ([515d08c](515d08c)) * Morphe homepage root installation ([#10](#10)) ([8ed769f](8ed769f)) * Refactor color row elements ([86b11b6](86b11b6)) * UI & UX Improvements ([#17](#17)) ([9e72b08](9e72b08)) * Use fullscreen dialog for manager update ([91bb4d1](91bb4d1))
# app 1.0.0 (2026-01-01) ### Bug Fixes * After changing pre-release, show snackbar and block starting patching until bundles are updated ([1fe7aa1](1fe7aa1)) * Allow all files as .mpp files are not available in file picker ([80ad1ec](80ad1ec)) * Change first greeting message shown to be more traditional and easier to understand what to do ([c8f797f](c8f797f)) * Correct rounding errors of progress value ([eb31b73](eb31b73)) * Do not show empty space above the About section ([e2eaf7d](e2eaf7d)) * Do not show patches update snackbar unless user is manually refreshing ([8d35d28](8d35d28)) * Fix `isBundleUpdating` state after merge upstream changes ([7598e6d](7598e6d)) * Fix `lateinit property eventHandler has not been initialized` ([#25](#25)) ([d074a14](d074a14)) * Fix apk picker ([ae813d6](ae813d6)) * Fix app console warning of provider not found ([d2c76b7](d2c76b7)) * Fix build ([fe5250b](fe5250b)) * Fix the dack theme color picker ([24d4c5f](24d4c5f)) * Hide update on metered connection from advanced settings menu ([91ae275](91ae275)) * Increase installer timeout ([934305b](934305b)) * Increase installer timeout wait time ([648f22b](648f22b)) * Remove blinking when opening dialog, use gradient instead of blur (works on A12+ but not well) ([b851913](b851913)) * Resolve bundle fetching from upstream merge ([#11](#11)) ([d9166b8](d9166b8)) * Restore only delete button ([bf7c045](bf7c045)) * Show "Patches are loading" on fresh install ([170d17f](170d17f)) * Show "Patches are loading" toast if bundles are downloading ([3d59980](3d59980)) * Show patches update UI when using advanced mode ([309f7db](309f7db)) * Skip if patch doesn't exist in this bundle ([6482987](6482987)) * Update changelog after bundle update ([ed9c173](ed9c173)) * Use Morphe patches API ([#12](#12)) ([01cdffc](01cdffc)) * Use the appropriate string ([7661989](7661989)) ### Features * Add a delay at 100% before showing success screen ([abb5ab5](abb5ab5)) * Add adaptive landscape mode ([#8](#8)) ([3bbc62e](3bbc62e)) * Add haptic feedback to About setting item ([d3f8e33](d3f8e33)) * Add in-app patches options ([#27](#27)) ([2ce57a7](2ce57a7)) * Add link to the Crowdin ([b0b94cb](b0b94cb)) * Add more haptic feedback ([967f9ca](967f9ca)) * Adjust layout of patches list and change log in modal patches bundle ([#13](#13)) ([0dcf5b9](0dcf5b9)) * Change buttons priority ([85fdd86](85fdd86)) * Change Particles background to Space ([9575446](9575446)) * Custom Morphe home screen ([515d08c](515d08c)) * Morphe homepage root installation ([#10](#10)) ([8ed769f](8ed769f)) * Refactor color row elements ([86b11b6](86b11b6)) * UI & UX Improvements ([#17](#17)) ([9e72b08](9e72b08)) * Use fullscreen dialog for manager update ([91bb4d1](91bb4d1))
Finished prior work of adding root install in the simple homepage.