![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
icyfirekiss
这个作者很懒,什么都没留下…
展开
-
Android 一种通用的按键精灵的实现思路
input keyevent 发送键盘事件 用法说明: adb shell input keyevent “value” usage: input ... input text <string> input keyevent <key code number or name> input tap <x> <y> input swipe <x1转载 2019-01-26 15:47:15 · 4679 阅读 · 0 评论 -
Android应用程序永久获取root权限方法
转自:https://hold-on.iteye.com/blog/1901152在项目的过程中,有可能会要实现类似360优化大师、安卓优化大师的软件搬家、静默安装等需要root权限的功能,或者类似SET_PREFERRED_APPLICATIONS、MOVE_PACKAGE 等需要系统的权限,必须要有系统签名。咱们拿 软件搬家 来当例子(通过获取系统权限,而不是弹出系统的应用管理界面来搬...转载 2019-01-16 15:13:41 · 3501 阅读 · 3 评论 -
system与execv函数使用详解
转自:https://www.cnblogs.com/akira90/archive/2012/12/05/2802809.htmlsystem()与execv()函数使用详解2012-12-05 12:12 by Rudrj2, 22772 阅读, 0 评论, 收藏, 编辑在网上搜了很久都没有一个很好的解释,都只说了一方面system调用子进程后继续执行父进程,execv是调用一个新的进程...转载 2019-01-16 17:00:20 · 1787 阅读 · 1 评论 -
Linux下Fork与Exec使用
转自:https://www.cnblogs.com/wuchanming/p/3784862.html一、引言对于没有接触过Unix/Linux操作系统的人来说,fork是最难理解的概念之一:它执行一次却返回两个值。fork函数是Unix系统最杰出的成就之一,它是七十年代UNIX早期的开发者经过长期在理论和实践上的艰苦探索后取得的成果,一方面,它使操作系统在进程管理上付出了最小的代价,另一方...转载 2019-01-17 02:14:56 · 175 阅读 · 0 评论 -
execv的坑
......char sz_cmd[]="/system/bin/su" ; strcpy(sz_filepath,R"("chmod 4755 -R /data/user/0/com.my.myapp/files/*")");...char *const argv_chmod[256] = { "su","-c",sz_file...原创 2019-02-12 23:09:26 · 509 阅读 · 0 评论 -
CMakelists.txt配符添加源文件
file(GLOB source_files "src/main/cpp/*.cpp") add_library( native-lib SHARED ${source_files} )转载 2019-04-18 20:30:12 · 4511 阅读 · 0 评论 -
安卓最简单的类似su的demo
安卓最简单的类似su的demo,没加任何判断,安全性为0#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <android/log.h>int main(int argc, char **argv) { if (setgid(0) || setui...原创 2019-04-24 12:58:29 · 340 阅读 · 0 评论