安卓系统文件变更许可

编程入门 行业动态 更新时间:2024-10-21 07:38:29
本文介绍了安卓系统文件变更许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的手机是植根我写code。在我的应用程序,以改变它位于/ SYS /班/ LED灯/ LCD背光/亮度系统文件的文件权限

My phone is rooted and i wrote code in my app to change file permission of system file which is located at /sys/class/leds/lcd-backlight/brightness

Runtime.getRuntime().exec("su"); Runtime.getRuntime().exec("chmod 777 /sys/class/leds/lcd-backlight/brightness");

但这code不能更改指定的文件的文件许可权,我不会有任何错误或异常的

but this code can't change the file permission of the specified file and i won't got any kind of error or exception

推荐答案

从这个链接 github/Stericson/RootTools/releases

把该.jar文件到您的项目的库目录

Put that .jar file into your project's 'libs' directory

import com.stericson.RootTools.*;

Command cmd=new Command(0,"chmod 766 /sys/class/leds/lcd-backlight/brightness"); RootShell.getShell(true).add(cmd);

更多推荐

安卓系统文件变更许可

本文发布于:2023-11-27 08:07:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637214.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   系统   许可

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!