Faulty behavior when the device is rooted but root access is denied

Offen
#105 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
58/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
android, java
Bereich
mobile-dev

Rechercherichtung

Start by reproducing the issue on Android 11 with Magisk, denying root access to Package Manager, and triggering batch uninstallation. Trace the root-access check and batch uninstall flow to find where denied root access still selects the root-based path; the change is done when denied access falls back to the system uninstall dialog for each app.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Android version 11 (LineageOS 18.1)
Root method: Magisk version 26.1
Package Manager version: 7.0 (70) from F-Droid

Issue description

Some features that work on a non-rooted device do not work on a rooted device if root access for Package Manager is denied. I noticed it with batch uninstallation of apps at least. I did not test any other feature that might be affected.

Steps to reproduce
  1. Root the device
  2. Install Package Manager
  3. Deny root access when asked
  4. Select multiple applications
  5. Choose action "Uninstall"
Expected behavior

Package Manager detects that root access was denied and falls back to uninstalling each app one by one via the system dialog.

Observed behavior

Package Manager opens a batch uninstall activity and appears to try and uninstall the apps via root access which obviously fails.

Suggested solution

Detect if root access was denied and perform each action as if the device was not rooted at all.

Possible alternatives
  • Grant root access to Package Manager
    Batch uninstallation is the only feature i'm using which is affected by root access. I don't use it very much so when i do, i am fine with clicking the system uninstall dialog a couple of times. I try to grant root access to as few apps as possible and i'd prefer to not grant root access just for this one feature.
Vorherrschende Sprache
Java
Sterne
877
Forks
121
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus SmartPack/PackageManager

Alle Issues in SmartPack/PackageManager

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.