Giter Site home page Giter Site logo

dhizuku's Introduction

English | 简体中文 | 日本語

Dhizuku

Downloads Lastest

Introduction

A tool that can share DeviceOwner permissions to other application.

Activation tutorial

Supported Versions

Android 5.0 ~ 14

For Developer(Join Dhizuku-API)

Participate in translation

If you would like to get involved in translating Dhizuku, head over to Weblate

status

Donation support

License

Dhizuku is licensed under the GNU General Public License v3 (GPL-3) , And promises to continue to keep it open source in the future.

dhizuku's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dhizuku's Issues

dhizuku xposed模块注入testdpc导致其闪退

无论是下载 #14 里提到的lspatch修补后的文件,还是自行修补刚从Github下载的最新版,安装后都直接闪退,用本地模式修补后如果不启用模块(模块作用域)还可以正常打开。
前提:dhizuku正常配置并使用。

Dhizuku Not Activating On My Android 12

When I try to activate Dhizuku:
ConsoleError(code=255, read=, error=
Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device.
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9498)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8434)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:256)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:89)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:9817)
at android.os.Binder.shellCommand(Binder.java:950)
at android.os.Binder.onTransact(Binder.java:834)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6966)
at android.os.Binder.execTransactInternal(Binder.java:1184)
at android.os.Binder.execTransact(Binder.java:1143)
)
at f5.s.g(SourceFile:296)
at s5.a.u(Unknown Source:8)
at g6.g0.run(Unknown Source:102)
at kotlinx.coroutines.internal.e.run(Unknown Source:11)
at kotlinx.coroutines.scheduling.i.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.a.run(SourceFile:77)

Not allowed to set the device owner because there are already some accounts on the device

Android 14

Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device.
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:10687)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:9364)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:264)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:87)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:11119)
at android.os.Binder.shellCommand(Binder.java:1094)
at android.os.Binder.onTransact(Binder.java:911)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6328)
at android.os.Binder.execTransactInternal(Binder.java:1362)
at android.os.Binder.execTransact(Binder.java:1301)

License 问题

我注意到这个 library 的协议是 GPL3,这要求所有使用这个库的 APP 开源其自身代码,这实际上是不现实的。很多使用 deviceowner 的 APP 都不开源,如冰箱,太极,小黑屋。
如果你想让这个库被更多人使用,建议你更换 License 为 LGPL。
当然,这只是一个建议,我们尊重你的选择。

English version?

Hi so i dont understand the language and i wonder if its possible to switch the language into english

Dhizuku 被杀死

在华为的应用启动管理中找不到 Dhizuku,因此 Dhizuku 无法自启动、被关联启动和后台包活。

Device admin activated, but need device owner

Hello there im new to these things and also kinda a newbie to github so sorry if idk what im talking about when i try to use Dhizuku with shizuku i keep running into Device admin activated, but need device owner. "ConsoleError(code=1, read=, error=java.lang.RuntimeException: Can't set package ComponentInfo{com.rosan.dhizuku/com.rosan.dhizuku.server.DhizukuDAReceiver} as device owner.
at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:204)
at com.android.commands.dpm.Dpm.onRun(Dpm.java:115)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:56)
at com.android.commands.dpm.Dpm.main(Dpm.java:41)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)"

缺少锁定设备权限

调用DevicePolicyManager.lockNow()时报错:No active admin owned by uid 10233 for policy #3, which doesn't have android.permisson.LOCK_DEVICE
解决方法:在 device_admin.xml 的uses-policies标签中添加<force-lock />

Use Dhizukhu to authorize opening Activities?

Is there any app that allows me to open activities and use Dhizhuku to authorize opening activities? E.g. on Samsung I know I can open - com.sec.android.sdhms.debugger.ui.ThermalLimitSettingActivity (from app com.sec.android.sdhms ) only with Device Owner rights (or Knox rights which would be another option) so how can I authorize this?

(Alliance Shield Rebirth allows this, but you cannot install both Alliance Shield Rebirth and Dhizhuku both at the same time with device owner rights). Or can I use Dhizhuku to pass on device owner rights to any app?

Where it possible to use "generic delegation", for instant from "testdpc"?

i have installed testdpc and testdpc-replica here on some devices and there it is possible to delegate selected permissions to other apps and for instant testdpc-replica is recognize it and display that it has delegated permissions, but dhizuku does this not

where it possible to implement?

(sorry, if that was a duplicated feature request), icould not read all issues because i could not read all languages)

DhizukuVariables.COMPONENT_NAME always NULL

Dhizuku set up properly, reports "Activated"
I first tried to make my own app to connect do dhizuku-api, and couldn't get it working. always crash. So then I tried "known working" apps from other people, and they also crash.
Looking at logcat, it looks like any DevicePolicyManager(Component, xxxx, xxxx) call always fails because component is NULL

授权失败

授权“爱玩机工具箱”时显示Class文件丢失。

Support for Island/Insular's Open API

It would be nice if Dhizuku could use Island/Insular's Open API for controlling Android DPC, it would be useful for people who have Island already installed and don't want to reset their device, but also want to use other apps which only support Dhizuku 😄

ADB set-device-owner issues.

Heya, I have been trying to use your software but there is one issue I keep running into when trying to activate it.

It keeps telling me that the "Device admin activated, but need device owner" but when ever I try to use -
"adb shell dpm set-device-owner com.rosan.dhizuku/.server.DhizukuDAReceiver"
It will first say there are accounts on the device but when rerunning it, it states "Error: Trying to set an admin which is being removed"

If you lot have any suggestions, please give me a heads up!

未完全激活,已获得设备管理员,重启软件是未激活

[shproc] Process[pid=12652, hasExited=false]

Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Unexpected @ProvisioningPreCondition: 99
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9667)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8494)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:259)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:89)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:10007)
at android.os.Binder.shellCommand(Binder.java:1073)
at android.os.Binder.onTransact(Binder.java:901)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6054)
at android.os.Binder.execTransactInternal(Binder.java:1331)
at android.os.Binder.execTransact(Binder.java:1268)
[shproc] Process[pid=12652, hasExited=true, exitcode=0]
Screenshot_2023-05-11-20-32-49-77_581242ce254f386c2386b7887f61c792

An unknown error occurred, please fix it

The following error appears after activating dhizuku on the mumu12 emulator:
No interface method setDeviceOwner(Landroid/content/ComponentName;Ljava/lang/String;I)Z in class Landroid/app/admin/IDevicePolicyManager; or its super classes (declaration of 'android.app.admin.IDevicePolicyManager' appears in /system/framework/framework.jar)java.lang.NoSuchMethodError: No interface method setDeviceOwner(Landroid/content/ComponentName;Ljava/lang/String;I)Z in class Landroid/app/admin/IDevicePolicyManager; or its super classes (declaration of 'android.app.admin.IDevicePolicyManager' appears in /system/framework/framework.jar)
at t4.a.h(SourceFile:105)
at s5.a.s(SourceFile:1)
at g6.e0.run(SourceFile:1)
at l.h.run(SourceFile:13)
at m6.i.run(SourceFile:1)
at m6.a.run(SourceFile:92)

功能建议,组织名自定义

获得设备所有者权限后,在控制中心和锁屏界面显示的
“设备由您所在单位管理”,是否会出一个名称的自定义功能

调用Dhizuku时崩溃,日志收集

有人反馈在部分系统(MIUI14 Android13)上,应用在调用Dhizuku时会崩溃或失败。

但是我自己在Xiaomi CIVI与Xiaomi Pad 5上测试均正常。

请出现这类情况在这条issue留下日志。

请使用Dhizuku 2.6以上版本测试,并抓取Dhizuku日志。

电脑执行

adb shell "logcat --uid=$(dumpsys package com.rosan.dhizuku | grep 'userId=' | awk -F 'userId=' '{print $2}')"

或手机Shizuku终端执行

logcat --uid=$(dumpsys package com.rosan.dhizuku | grep 'userId=' | awk -F 'userId=' '{print $2}')

即可抓取Dhizuku日志

建议

希望能把dax软件链接和其作用放到#16

Exception occurred while executing 'set-device-owner'

Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Trying to set the device owner (com.rosan.dhizuku/.server.DhizukuDAReceiver), but the user already has a profile owner (com.google.android.gms/.kids.account.receiver.ProfileOwnerReceiver).
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:10687)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:9364)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:264)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:87)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:11119)
at android.os.Binder.shellCommand(Binder.java:1094)
at android.os.Binder.onTransact(Binder.java:911)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6328)
at android.os.Binder.execTransactInternal(Binder.java:1362)
at android.os.Binder.execTransact(Binder.java:1301)

How can I fix this?

提供英文版本的激活教程?

您好。感谢您开发了 Dhizuku 这样优秀的程序,让我们能够便捷地在应用间共享 DeviceOwner 权限。
我最近在自己的应用中接入了 Dhizuku API,但我在编写用户文档时发现 Dhizuku 并未提供英文版本的激活指南。(或者我漏掉了些什么没找到?)

您是否考虑提供一个英文版本的指南呢?相信提供英文文档能够使您的应用受到更广泛的使用,而非仅限与国内。

或许您也可以创建一个独立的文档仓库,使用 Vuepress 构建静态文档网站并托管在 GitHub Pages 上。并将文档加入 Weblate,允许社区贡献翻译。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.