Explicitly remind user about the incorrect "factory reset" dialog when rebooting to recovery.

Open
#1,208 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile-dev

Research direction

Start in app/src/main/java/me/bmax/apatch/util/APatchCli.kt around line 252 and trace the APatch app's reboot-to-recovery flow. Determine where a confirmation dialog or toast belongs, then verify that users are explicitly warned about the misleading factory-reset message before the reboot proceeds.

Written by the indexing model from the issue text.

Description

enhancement
Is your request related to a specific issue? | 你的请求是否与某个问题相关?

On AOSP-like ROMs such as LineageOS, the system will display a "factory reset" dialog when rebooting to recovery, even if it is actually NOT going to perform a factory reset.

Screenshot

APatch has already done something to prevent the user from seeing this when using the "reboot to recovery" feature from the APatch app - by mimicking a power button press to turn off the screen (https://github.com/bmax121/APatch/blob/bae4ce1d0e35403f338f02e682992c19441a834d/app/src/main/java/me/bmax/apatch/util/APatchCli.kt#L252). But in my case, since the screen displayed the normal locking animation, I thought I have somehow accidentally turned it off, so I pressed the power button again and saw this. Literally frightening.

Describe the solution you'd like | 描述你想要的解决方案

There seems to be nothing APatch could do to properly remove the incorrect dialog. Rather than trying to hide the dialog (and failing to outrule the possibility of users seeing it), maybe it would be better to just remind the user that the "factory reset" is not real by using a confirmation dialog or a toast notification.

Describe the alternatives you've considered | 描述您考虑过的备选方案

Always use the hard reboot command (/system/bin/reboot recovery) to reboot into recovery. But since it is a hard reboot, I am unsure if this method could cause potential data loss.

Other information | 其他信息

Device: OnePlus 9R (LE2100, lemonades)
OS: LineageOS 22.2-20250915-microG-lemonades

Dominant language
Kotlin
Stars
8.2k
Forks
809
Avg merge
7d 17h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bmax121/APatch

All issues in bmax121/APatch

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.