android手机权限分析
2014-09-15 15:37
169 查看
一,如何将user版本手机root。
如何root user版本手机
1,将user load的bootimg解包,将default.prop里的ro.secure值改写。
2,将eng版本的adbd放到user版本的bootimg里的/sbin/目录下
二:android 4.3权限分析
android 4.3权限分析
如何root user版本手机
1,将user load的bootimg解包,将default.prop里的ro.secure值改写。
2,将eng版本的adbd放到user版本的bootimg里的/sbin/目录下
if (should_drop_privileges()) { struct __user_cap_header_struct header; struct __user_cap_data_struct cap; if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) != 0) { exit(1); } /* add extra groups: ** AID_ADB to access the USB driver ** AID_LOG to read system logs (adb logcat) ** AID_INPUT to diagnose input issues (getevent) ** AID_INET to diagnose network issues (netcfg, ping) ** AID_GRAPHICS to access the frame buffer ** AID_NET_BT and AID_NET_BT_ADMIN to diagnose bluetooth (hcidump) ** AID_SDCARD_R to allow reading from the SD card ** AID_SDCARD_RW to allow writing to the SD card ** AID_MOUNT to allow unmounting the SD card before rebooting ** AID_NET_BW_STATS to read out qtaguid statistics */ gid_t groups[] = { AID_ADB, AID_LOG, AID_INPUT, AID_INET, AID_GRAPHICS, AID_NET_BT, AID_NET_BT_ADMIN, AID_SDCARD_R, AID_SDCARD_RW, AID_MOUNT, AID_NET_BW_STATS }; if (setgroups(sizeof(groups)/sizeof(groups[0]), groups) != 0) { exit(1); } /* then switch user and group to "shell" */ if (setgid(AID_SHELL) != 0) { exit(1); } if (setuid(AID_SHELL) != 0) { exit(1); } /* set CAP_SYS_BOOT capability, so "adb reboot" will succeed */ header.version = _LINUX_CAPABILITY_VERSION; header.pid = 0; cap.effective = cap.permitted = (1 << CAP_SYS_BOOT); cap.inheritable = 0; capset(&header, &cap); D("Local port disabled\n");
二:android 4.3权限分析
android 4.3权限分析
相关文章推荐
- android手机权限分析(二)
- 智能手机软件平台 Android VS iPhone OS: 平台对比分析 (1/4)
- 分析称谷歌Android智能手机明年占据10%的市场
- Android核心分析之四 ---手机的软件形态
- Android权限机制总结与常见权限不足问题分析
- Android权限机制总结与常见权限不足问题分析
- 基于Windows手机的android移植可行性分析
- android手机的存储空间分析,及扩容方法,以moto里程碑为例
- 分析称2016年Android智能手机市场份额将近半
- Android核心分析之四 ---手机的软件形态
- [智能手机取证系列] Android手机逻辑数据提取和分析
- Android驱动开发入门及手机案例开发分析
- 转:如何获得Android手机Root权限
- Android权限机制总结与常见权限不足问题分析
- Android权限机制总结与常见权限不足问题分析
- 智能手机软件平台 Android VS iPhone OS: 商业模式分析 (2/4)
- 转发:如何获得Android手机Root权限
- 获取android手机Root权限
- 智能手机应用取证系列之三:腾讯微博Android手机客户端取证分析
- Android权限获取机制与常见权限不足问题分析