gtf35 / app_process-shell-use Goto Github PK
View Code? Open in Web Editor NEW利用 app_process 实现免root调用shell
License: MIT License
利用 app_process 实现免root调用shell
License: MIT License
感觉服务会死的很快 请问有什么技巧可以长期保活吗?
APP可以基本实现保活,但是service无法保活,重启服务也就挂了,因此,用标题的方案,可行吗?
如执行命令前,检查服务是否存在,如果不存在,通过Java调用c,然后fork一个服务,再链接到这个服务
134|OnePlus6:/data/local/tmp $ app_process -Djava.class.path=/data/local/tmp/classes.dex /system/bin shellService.Main
Aborted
java.io.IOException: Cannot run program "sh": CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:621)
at java.lang.Runtime.exec(Runtime.java:451)
at java.lang.Runtime.exec(Runtime.java:348)
at shellService.ServiceShellUtils.execCommand(ServiceShellUtils.java:58)
at shellService.ServiceShellUtils.execCommand(ServiceShellUtils.java:26)
at shellService.ServiceThread$1.getText(ServiceThread.java:16)
at shellService.Service$CreateServerThread.run(Service.java:57)
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:444)
at java.lang.ProcessImpl.start(ProcessImpl.java:139)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 7 more
Ânnnss
failed to connect to /127.0.0.1 (port 4521) after 3000ms: isConnected failed: ECONNREFUSED (Connection refused)
用你的代码跑起来了,确实能做到很多平时adb命令做不到的事情;
但是静默更新没成功,执行静默更新命令还是会弹出安装界面
手机环境:华为P20,没有root权限,Android 10
输入框命令:pm install -r xxxx.apk
请我是我操作有问题吗,望回复,谢谢
特别棒,给了很好的思路
Nam
mido:/data/local/tmp $ app_process -Djava.class.path=/data/local/tmp/classes.dex /system/bin shellService.Main
th=/data/local/tmp/classes.dex /system/bin shellService.Main <
杩愯浜?in shell
Shell鏈嶅姟绔▼搴忚璋冪敤<<<<<<
鏈嶅姟绔繍琛屽湪4521绔彛
[完全按照readme操作的,结果还是没有提权
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.