Skip to content

Add an option to restart the app without extensions in the crash screen - #2753

Open
NGB-Was-Taken wants to merge 14 commits into
mihonapp:mainfrom
NGB-Was-Taken:safe-mode
Open

Add an option to restart the app without extensions in the crash screen#2753
NGB-Was-Taken wants to merge 14 commits into
mihonapp:mainfrom
NGB-Was-Taken:safe-mode

Conversation

@NGB-Was-Taken

@NGB-Was-Taken NGB-Was-Taken commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

Also adds a shortcut to do the same (replaces the library shortcut).

Image 1 Image 2
image image

Need someone to design the shortcut icon. I'm too lazy
Closes #2445

Comment thread presentation-core/src/main/java/tachiyomi/presentation/core/screens/InfoScreen.kt Outdated
Comment thread i18n/src/commonMain/moko-resources/base/strings.xml Outdated
@nnnn20430

nnnn20430 commented Dec 7, 2025

Copy link
Copy Markdown

Does this let you reset the settings of the extensions? If not you should add it, cause I'm currently having a problem where a setting is causing an extensions and the app to crash, and only way to make it stop is uninstalling the extension apk from system. And if I attempt to reinstall the extension it just crashes again, no way to fix the broken setting. So the extension is soft bricked for me.

@NGB-Was-Taken

Copy link
Copy Markdown
Contributor Author

Does this let you reset the settings of the extensions? If not you should add it

No it does not, and no it will not be added. This is built with malicious actors in mind and avoids execution of any extension provided code, which includes getting the ID that is needed for accessing its preferences.

I'm currently having a problem where a setting is causing an extensions and the app to crash

If the problem can be isolated to a single preference, there are probably ways to get around the crash to change that preference. Safe mode is not intended for this. This is a last resort option meant to remove a totally broken or malicious extension, similar to going into Settings > Installed apps and uninstalling the problematic extension there.

Comment thread app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt Outdated
Comment thread app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt Outdated
Comment thread app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt Outdated
# Conflicts:
#	app/src/main/java/eu/kanade/domain/base/BasePreferences.kt
#	app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
#	app/src/main/shortcuts.xml
#	domain/src/main/java/eu/kanade/tachiyomi/extension/model/Extension.kt

@AntsyLich AntsyLich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NotLoaded extensions should have a reason attached to it (for this pr's case "Due to safe mode" or something along those lines). Tapping on a not loaded extension should show the reason in a dialog and also use the warning icon.

@NGB-Was-Taken

Copy link
Copy Markdown
Contributor Author

NotLoaded extensions should have a reason attached to it (for this pr's case "Due to safe mode" or something along those lines). Tapping on a not loaded extension should show the reason in a dialog and also use the warning icon.

image

Also, there's this issue currently where if the app is not closed before launching it in safe mode (from the shortcut), the extensions stay loaded. Not sure what we can do in this situation. Maybe launch a different activity that kills and relaunches the main activity?

@AntsyLich

Copy link
Copy Markdown
Member

Also, there's this issue currently where if the app is not closed before launching it in safe mode (from the shortcut), the extensions stay loaded. Not sure what we can do in this situation. Maybe launch a different activity that kills and relaunches the main activity?

rerun extension loader when safe mode value changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Safe mode to troubleshoot extensions from "Private" installer

3 participants