更新应用程序而不安装新的 APK [英] Updating App without installing new APK

查看:42
本文介绍了更新应用程序而不安装新的 APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查看是否可以在不下载 .apk 文件的情况下远程更新用户手机上的应用.(这是我老板"的信息收集请求.他认为在 iOS 上是可能的,所以他希望我在 Android 上检查).

本质上,我试图让我的应用偶尔从我们的网络服务器中提取一个版本号,看看它是否需要更新,如果需要,那么应用会请求许可,然后下载新文件(更新源代码,.xml布局文件、图像等),从而完全不需要从 Play 商店下载我们的 APK(大小为 50mb)以进行修补程序甚至小功能更新.

根据我的发现:

  1. 我可以下载可以阅读更多内容的资源/数据文本文件,但不能真正修改源代码,因为...

  2. APK 文件在创建时基本上是烘焙"的,因此源代码、.xml 文件等被最小化、重命名和混淆,这意味着向现有 APK 添加新功能或修补程序将很困难.我认为您可以更改图片,但仅此而已.

我相信 Candycrush 在他们下载新关卡(不涉及 Play 商店的应用内更新)时会以某种方式这样做,但这可能只是方法 1.Firebase 遥控器的简要研究config 也有类似的东西,但预设参数的限制意味着尝试使用它进行修补/更新可能会出现问题.

我是对的还是我遗漏了一些明显的东西?

解决方案

我认为您的问题可以通过使用 patching 系统来解决.

一些图书馆可以帮助你:

  1. ...

  2. 朋友

    <块引用>

    Amigo 是一个修补程序库,可以修复您的 Android 应用程序的几乎所有内容.

I'm trying see whether it's possible to remotely update an app on a users phones without downloading an .apk file. (It's an information gathering request from my "boss". He thinks it's possible on iOS so he wants me to check on Android).

Essentially, I'm trying to have my app occasionally pull a version number from our web server to see if it needs updating, if so then the app would ask permission, then download the new files (updating source code, .xml layout files, images, etc.) and thereby bypassing the need to download our APK (which is 50mb in size) from the Play Store at all for hotfixes or even small feature updates.

From what I've found:

  1. I could download resource/data text files which could be read for more content, but can't really modify source code because...

  2. the APK file is essentially "baked" when its created so source code, .xml files, etc. are minimized, renamed, and obfuscated meaning adding new features or hotfixes to an existing APK would be difficult. I think you can change images but that's about it.

I believe Candycrush does it somehow when they download new levels (an in-app update that doesn't involve the play store), but that might just be method 1. Brief research of Firebase's remote config also has something similar but the constraint of pre-setting parameters means trying to use it for hotfixing/updating might be spotty.

Am I correct or am I missing something obvious?

解决方案

I think your problem could be solved by using patching system.

Some library could help you:

  1. Tinker

    Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstalling apk.

  2. AndFix

    AndFix is a solution to fix the bugs online instead of redistributing Android App. It is distributed as Android Library.

    Andfix is an acronym for "Android hot-fix".

    AndFix supports Android version from 2.3 to 7.0, both ARM and X86 architecture, both Dalvik and ART runtime, both 32bit and 64bit.

    The compressed file format of AndFix's patch is .apatch. It is dispatched from your own server to client to fix your App's bugs

    Principle
    The implementation principle of AndFix is method body's replacing,

    ...

  3. Amigo

    Amigo is a hotfix library which can fix almost everything for your Android app.

这篇关于更新应用程序而不安装新的 APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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