简体   繁体   English

没有用户输入安装apk

[英]Installing apk without user input

I have been searching the internet wildly for an answer to this question. 我一直在网上搜索这个问题的答案。

We are creating custom android app for internal use only and we would be installing that on custom andoid devices. 我们正在创建仅供内部使用的自定义Android应用程序,我们将在自定义andoid设备上安装它。 We would like to have full control of the device through the app. 我们希望通过应用程序完全控制设备。 The end user of this device is not meant to use anything other than the app on this device. 此设备的最终用户不打算在此设备上使用除应用程序之外的任何内容。 I have sealed out all the possibilities of getting out of the app except this one possibility where the program tries to update itself and asks for user permission. 我已经把所有离开应用程序的可能性都封锁了,除了这种程序试图更新自己并要求用户许可的可能性。

Let me repeat again, This app is not meant to be put on market, only for use with custom devices designed for specific purpose. 让我再说一遍,这个应用程序不打算投放市场,仅用于为特定目的设计的定制设备。 So security is not an issue here. 所以安全性不是问题。 The device is rooted and we have done a lot of alterations with it. 该设备已植根,我们已经做了很多改动。 But I cant quite figure out how to make this update work. 但我不知道如何使这个更新工作。

If you have any ideas/solution please share it with me. 如果您有任何想法/解决方案,请与我分享。 I can do anything with my device, (even dig a hole in it if required :P) as they would be custom made, and would be packaged with us before going out. 我可以用我的设备做任何事情,(如果需要的话,甚至可以在其中挖一个洞:P)因为它们是定制的,并且在外出之前将与我们打包在一起。 Just have to make it work. 只需要让它工作。

If you are talking about internally installing the APK with like an update application specifically designed to update your other application which is not managed by Google Play you may want to look into this . 如果您正在讨论在内部安装APK,而更新应用程序专门用于更新您的其他应用程序(不是由Google Play管理),您可能需要查看此内容 So between xjaphx's answer and the link I just shared you will be able to install and maintain updates. 因此,在xjaphx的答案和我刚刚分享的链接之间,您将能够安装和维护更新。

This is as simple as how it works. 这就像它的工作原理一样简单。

Pre-condition: 前提:

  • Get devices rooted 获得根植的设备
  • Prepare Android development environment (Android SDK, platforms-tools) 准备Android开发环境(Android SDK,平台工具)
  • A cable to connect PC and devices. 用于连接PC和设备的电缆。

Steps: 脚步:

  • Open command-line if Windows or shell if Linux 如果是Windows,则打开命令行,如果是Linux则打开shell

  • type: "adb push YourApp.apk /system/app" 键入:“adb push YourApp.apk / system / app”

That's done for installation of the app. 这是为了安装应用程序。 Reboot and check whether your app works or not. 重新启动并检查您的应用是否有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM