使用背景busybox的安装APK [英] install apk in background using busybox

查看:246
本文介绍了使用背景busybox的安装APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以安装APK使用busybox的根设备上的背景???

我看到类似的东西,但它不能正常工作

 过程中安装;
CommandCapture命令=新CommandCapture(0,文件模式777 /数据/应用程序);
RootTools.getShell(真)。新增(命令).waitForFinish();
CommandCapture命令2 =新CommandCapture(0,搭配chmod 777 /系统/ XBIN / busybox的);
RootTools.getShell(真)。新增(命令2).waitForFinish();
。安装=调用Runtime.getRuntime()EXEC(/系统/ XBIN / busybox的安装+ Environment.getExternalStorageDirectory()+/下载/+xxx.apk /data/app/xxx.apk);
 

解决方案

如果您运行苏-c时安装在一个root shell myapp.apk ,你应该能安装在后台(注意下午)的一部分。这已无关,与busybox的,你可以使用任何shell,你肯定不需要更改权限 /数据/应用程序

can i install apk in background using busybox on rooted device ???

i see something like that but it doesn't work

process install;
CommandCapture command = new CommandCapture(0, "chmod 777 /data/app");
RootTools.getShell(true).add(command).waitForFinish(); 
CommandCapture command2 = new CommandCapture(0, "chmod 777 /system/xbin/busybox");
RootTools.getShell(true).add(command2).waitForFinish();
install = Runtime.getRuntime().exec("/system/xbin/busybox install " + Environment.getExternalStorageDirectory() + "/Download/" + "xxx.apk /data/app/xxx.apk");

解决方案

If you run su -c pm install myapp.apk in a root shell, you should be able install in the background (note the 'pm') part. This has nothing to do with busybox, you can use any shell and you certainly don't need to change permission of /data/app.

这篇关于使用背景busybox的安装APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆