android RootTooles 分享
来源:互联网 发布:linux账号密码忘记了 编辑:程序博客网 时间:2024/06/11 16:19
RootTools 共享的root代码lib.jar 分析
下载地址:
文件
使用jar-lib-java.exe 打开jar文件,可以看到java源码
RootTools 类里面接口:
Set<String> getPath() 获取系统环境变量PATH值
ArrayList<Mount> getMounts() 获取所有挂载点
offerBusyBox(Activity activity) 应用市场搜索busybox
Intent offerBusyBox(Activity activity, int requestCode) 带返回值
offerSuperUser 搜索SuperUser应用
rootAvailable 判断是否有su,可执行root操作
busyboxAvailable 判断是否存在busybox
accessGiven 判断是否允许了应用root权限
EnoughSpaceOnSdCard(long updateSize) 是否有足够的空间
remount(String file, String mountType) 重新挂载某文件
installBinary(Context context, int sourceId, String destName, String mode) 安装文件,路径还需要查询确认
sendShell(String[] commands, int sleepTime, Result result)执行命令,返回结果
sendShell(String[] commands, int sleepTime) 不需要结果
sendShell(String command, Result result) 命令之间不需要sleep
sendShell(String command) 直接执行
getSpace(String path)获取路径使用空间
Remounter 类:
remount(String file, String mountType) 重新挂载
findMountPointRecursive先查找挂载点
Mount类:
拼出参数列表
InternalMethods类:
InternalMethods instance() 获取实例
doExec(String[] commands) 执行命令
returnPath 返回系统路径PATH值
getMounts 获取所有挂载点
Installer
installBinary(int sourceId, String destName, String mode)
将资源sourceId 复制到context.getFilesDir().getCanonicalPath(); 下的destname,改变mode为mode
Executer类:
sendShell(String[] commands, int sleepTime, IResult result) 执行命令,返回执行结果
0 0
- android RootTooles 分享
- 【Android】分享
- android分享
- android 分享
- android 分享
- android 分享
- Android分享
- Android分享
- Android 分享
- android分享支付经验分享
- Android的Ril分享
- Android模拟器介绍 分享
- Android蓝牙经验分享
- 分享一些android题目
- Android学习资料分享
- Android PowerManager.WakeLock分享
- Android 分享功能
- android 使用分享功能
- 主流数据库分页查询介绍
- Android AsyncTask 使用时需要注意的地方
- std::less()用法及分析分析
- 信息学奥林匹克竞赛-陶陶摘苹果
- 使用Struts2简单的基本文件上传下载实现
- android RootTooles 分享
- SQL Server: 索引禁用、启用状态对比测试
- jstl 的<c:if>标签没有else的解决办法
- Git 常用命令整理
- c++11线程安全的队列的类的定义
- 在ubuntu中安装jdk以及环境配置
- [Mysql数据库] 每天自动备份mysql脚本
- c++ friend functions and inline functions
- AndroidStudio快捷键Editing