Skip to content

[Bug] cannot detect shizuku when shizuku package name is hidden #415

Description

@MikuDroid

Describe the bug

New feature of shizuku, the dev said to copy this snippet to help app developer to add support for hidden shizuku package name

import android.content.Context
import rikka.shizuku.ShizukuProvider

private fun Context.shizukuPermission() =
runCatching {
packageManager.getPermissionInfo(ShizukuProvider.PERMISSION, 0)
}.getOrNull()

fun Context.isShizukuInstalled() =
shizukuPermission() != null

fun Context.getShizukuPackageName() =
shizukuPermission()?.packageName

To Reproduce

  1. Hide shizuku using built-in feature called "Hide Shizuku from other apps"
    2.open aShell to re-pair
  2. aShell failed to detect shizuku

Expected behavior

Shizuku should be detected

Screenshots

No response

Device

Xiaomi 14T Pro

OS

Android 16 3.0.302.0.WNNEUXM.C07

Version

v7.4.0

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions