如何在Unroot之后授予SU允许应用程序?

发布于 2025-01-24 11:54:46 字数 400 浏览 3 评论 0原文

我想要的内容:

我希望我的应用使用su命令即使在我解开手机后,也可以在后台拍摄屏幕截图。

代码示例:

val process = Runtime.getRuntime().exec("su")
val outputStream = OutputStreamWriter(process.outputStream)
outputStream.write("/system/bin/screencap -p\n")

我尝试过的内容:

我认为我只会扎根手机,然后将应用程序安装在Priv-App文件夹中,然后将其安装在Unroot中,但不是这样工作的。

我该怎么做?

What I want:

I want my app to use su command to take screenshot in background even after I unroot the phone.

code example:

val process = Runtime.getRuntime().exec("su")
val outputStream = OutputStreamWriter(process.outputStream)
outputStream.write("/system/bin/screencap -p\n")

What I tried:

I thought I will just root my phone and install the app in priv-app folder and then unroot but it's not working like that.

How can I do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撩心不撩汉 2025-01-31 11:54:46

不一根后,不可能授予根访问权限。您可以在Termux中给予假根访问权限,但它只是显示#。所以没有用。

It's impossible to grant root access after unrooting. You can give fake root access in termux but it just shows #. So no use.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文