如何在Unroot之后授予SU允许应用程序?
我想要的内容:
我希望我的应用使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不一根后,不可能授予根访问权限。您可以在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.