安卓APK的静默安装 [英] android apk's silent installation

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

问题描述

我在寻找一个方案我的应用程序静默安装的APK文件的方式。 我知道有关的可能性,推出code看起来是这样的:

I'm searching for a way to program my application to install silently an apk file. I'm aware about the possibility to launch code looks something like this:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
startActivity(intent);   

但安装在此之前code筹集启动一个对话框,的需要权限的apk文件,需要用户授权开始安装。

but this code raising before the installation starts a dialog with the apk's require permissions and needs the user to authorization to start the installation.

有没有办法跳过此对话框? 有没有从我的code不要求用户交互安装上运行的应用程序的任何其他方式?

Is there any way to skip this dialog? Is there any other way to install application on run-time from my code that don't requires the user interaction?

推荐答案

没有。这是一件好事,这将是一个(其他)打开大门,恶意软件和不需要的安装。你为什么要这么做,如果你介意我问?有什么问题让用户知道你想自己的设备上安装的东西?

No. And that's a good thing, this would be an (other) open door to malware and unwanted installs. Why do you want to do that, if you mind me asking? What's wrong with letting users know that you want to install something on their device?

此外,一些细节在这里:静默安装

Also, some details here: Silent installation on Android devices

最后,这或许可以扎根的设备:如果你写你自己的安装程序,可以绕过完全内置的安装程序,并以root权限,你基本上可以做你想做的。但我仍然认为这是一个严重的安全漏洞。

And finally, this might be possible for rooted devices: if you write your own installer, you can bypass completely the built-in installer, and with root privilege, you can basically do what you want. But I still think that would be a serious breach of security.

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

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