Android4.0 开放Root权限
2015-06-03 09:58
169 查看
system/extras/su/
1>Android.mk:
添加: ifeq ($(strip $(TARGET_OPEN_ROOT)),true)
LOCAL_CFLAGS += -DOPEN_ROOT=1
endif
2>su.c:
/* Until we have something better, only root and the shell can use su. */
myuid = getuid();
#if OPEN_ROOT
#else
if (myuid != AID_ROOT && myuid != AID_SHELL) {
fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
return 1;
}
#endif
3>init.rc:
chown root root /system/xbin/su
chmod 4755 /system/xbin/su
4>删除busybox里面的su
1>Android.mk:
添加: ifeq ($(strip $(TARGET_OPEN_ROOT)),true)
LOCAL_CFLAGS += -DOPEN_ROOT=1
endif
2>su.c:
/* Until we have something better, only root and the shell can use su. */
myuid = getuid();
#if OPEN_ROOT
#else
if (myuid != AID_ROOT && myuid != AID_SHELL) {
fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
return 1;
}
#endif
3>init.rc:
chown root root /system/xbin/su
chmod 4755 /system/xbin/su
4>删除busybox里面的su
相关文章推荐
- 关于android旋转屏幕时activity重建和android 转屏 onConfigurationChanged 不会执行的问题
- 开放Android root权限
- android常用的命令
- Android NFC基础开发教程
- android studio加载动态库
- Android listview addHeaderView和addFooterView详解
- Android圆角边框
- android studio导入外部项目或类库的方法
- "Selenium for Android"的Robotium 一 概述
- 【转载】Android中attr自定义标签详解
- Android学习 - ant批量打包
- android开发用户和密码登陆
- Android px、dp和sp单位区别
- Android 向ListView里动态添加内容
- android (12) Fragment使用上
- android 多进程编程 必看!
- 博文共赏:Android推送服务——百度云推送
- Android新控件RecyclerView浅析及上拉和下拉刷新
- 【Android笔记】Activity的四种启动模式
- GitHub上史上最全的Android开源项目分类汇总