Commit b1e63f0f authored by osm0sis's avatar osm0sis Committed by John Wu

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
parent b0e49a4c
...@@ -68,18 +68,21 @@ class ModulesFragment : MagiskFragment<ModuleViewModel, FragmentModulesBinding>( ...@@ -68,18 +68,21 @@ class ModulesFragment : MagiskFragment<ModuleViewModel, FragmentModulesBinding>(
return true return true
} }
R.id.reboot_recovery -> { R.id.reboot_recovery -> {
reboot("recovery") Shell.su("/system/bin/reboot recovery").submit()
return true return true
} }
R.id.reboot_bootloader -> { R.id.reboot_bootloader -> {
reboot("booloader") reboot("bootloader")
Shell.su("/system/bin/reboot bootloader").submit()
return true return true
} }
R.id.reboot_download -> { R.id.reboot_download -> {
reboot("download") reboot("download")
return true return true
} }
R.id.reboot_edl -> {
reboot("edl")
return true
}
else -> return false else -> return false
} }
} }
......
...@@ -22,4 +22,9 @@ ...@@ -22,4 +22,9 @@
android:title="@string/reboot_download" android:title="@string/reboot_download"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/reboot_edl"
android:title="@string/reboot_edl"
app:showAsAction="never" />
</menu> </menu>
\ No newline at end of file
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<string name="reboot_recovery">Reboot to Recovery</string> <string name="reboot_recovery">Reboot to Recovery</string>
<string name="reboot_bootloader">Reboot to Bootloader</string> <string name="reboot_bootloader">Reboot to Bootloader</string>
<string name="reboot_download">Reboot to Download</string> <string name="reboot_download">Reboot to Download</string>
<string name="reboot_edl">Reboot to EDL</string>
<!--Repo Fragment--> <!--Repo Fragment-->
<string name="update_available">Update Available</string> <string name="update_available">Update Available</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment