在不安装新APK的情况下更新App[英] Updating App without installing new APK

本文是小编为大家收集整理的关于在不安装新APK的情况下更新App的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在尝试查看是否可以在用户电话上远程更新应用程序,而无需下载.apk 文件. (这是来自我的"老板"的信息收集请求.他认为在iOS上是可能的,所以他希望我检查Android).

本质上,我试图让我的应用程序偶尔从我们的Web服务器中提取版本号,看它是否需要更新,如果是这样,那么该应用程序会询问权限,然后下载新文件(更新源代码,.xml布局文件,图像等),从而绕过从播放商店下载我们的APK(大小为50MB),根本用于修补程序甚至小功能更新.

从我找到的东西:

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

  2. APK文件基本上是"烘焙"当它创建的所以源代码,.xml文件等最小化,重命名和混淆含义为现有APK添加新功能或修补程序是困难的.我认为你可以改变图像,但这是关于它的.

我相信 candycrush 如果他们下载新级别(一个不涉及播放商店的应用程序更新),但这可能只是方法1. Firebase的遥控器简要研究Config还具有类似的东西,但预设置参数的约束意味着尝试将其用于修补/更新可能是斑点.

我是纠正否则我错过了明显的东西?

推荐答案

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

一些图书馆可以帮助您:

  1. tinker

    Tinker是一个用于Android的热修复解决方案库,它支持DEX,库和资源更新而不重新安装APK.

  2. 和fix

    Andfix是一个解决在线错误而不是重新分发的解决方案 Android应用程序.它分发给Android库.

    和修复是"Android热修复"的首字母缩写.

    Andfix支持Android版本从2.3到7.0,均可,臂和x86 建筑,Dalvik和艺术运行时,32位和64位.

    ANDFIX的补丁的压缩文件格式是.APATCH.它是 从您自己的服务器派遣到客户端以修复您的应用程序的错误

    原则
    Andfix的实施原则是方法身体的替换,

    在此处输入图像描述 ...

  3. amigo

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

其他推荐答案

不可能更新源代码而无需更新. Firebase Remote Config可以帮助您在不更新应用程序的情况下更新某些参数的值.您还可以定义自己的方法来从您自己的服务器下载附加文件,但无法更改应用程序内的源代码.

本文地址:https://www.itbaoku.cn/post/1937937.html

问题描述

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,

    enter image description here ...

  3. Amigo

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

其他推荐答案

It is impossible to update source code without apk updating. Firebase Remote Config can help you to update the values of some parameters without updating app. You can also define your own way to download the additional files from your own server, but the source code inside app cannot be changed.