admin管理员组

文章数量:1542928

目录

1.修改su可执行文件

2.添加日志工具

3.修改编译文件

4.rootWhiteList.txt配置文件


修改原生代码支持su可执行文件通过rootWhiteList.txt进行超级用户权限分配。

1.修改su可执行文件

  • 读取文件中存放的白名单列表rootWhiteList.txt(也就是包名列表),动态管理app的root权限
  • 找到su文件存放位置system/extras/su/su.cpp,参考修改对应的代码
/*
 * Copyright (C) 2008 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distrib

本文标签: 源码用户权限名单动态SU