自己写一个终端程序
c4droid吧
全部回复
仅看楼主
level 9
1574553506 楼主
绝对原创,如有雷同,纯属巧合。
一个简单的小程序。先上图。
2016年04月02日 11点04分 1
level 9
1574553506 楼主
代码如下:
#include <iostream>
#include <cstdlib>
using namespace std;
const int MaxSize = 100;
int main(void){
char cmd[MaxSize];
cout << "Android Shell v1.0" << endl;
cout << "------------------------------" << endl;
cout << "提示:你既可以直接输入shell命令,也可以先输入\"sh\"间接进入shell" << endl;
cout << "输入exit退出" << endl;
cout << ">" ;
while (cin.getline(cmd,MaxSize)){
if (strcmp(cmd,"exit")==0) break;
system(cmd);
cout << ">" ;
}
return 0;
}
2016年04月02日 11点04分 2
[真棒]
2016年07月01日 06点07分
level 9
1574553506 楼主
Shell命令都可以运行:
2016年04月02日 11点04分 3
level 9
1574553506 楼主
小白一枚,欢迎对代码提意见;
打包好的apk文件:[无效] http://pan.baidu.com/share/link?shareid=3884563166&uk=68366457
2016年04月02日 11点04分 4
怎么打包代码变成apk文件(安装包)?
2016年05月04日 00点05分
同求,怎么打包
2016年05月13日 22点05分
感谢楼主,教会给礼物🎁
2016年05月13日 22点05分
2016年07月10日 15点07分
level 9
1574553506 楼主
ctrl-c在Windows下不能调出cmd,我是考虑了代码的通用性的。不知这是不是画蛇添足。
2016年04月03日 04点04分 12
1