从外部改变的.apk文件资产 [英] Change .apk asset file from outside

查看:175
本文介绍了从外部改变的.apk文件资产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将很多用户之间分配apk文件。该文件是相同的,但所有我需要为将在code使用每一个(理想情况下,应该由PHP脚本自动完成)指定的ID。现在我试图把ID在资产文本文件,然后打开APK作为存档在Windows中,在文本文件更新值然后保存(更新存档)。由于导致我的应用程序不能再安装。
为什么它不工作?或者可能是有另一种方式来设置每个APK ID没有在开发环境中重新创建包?

I have apk file that will be distributed between a lot of users. The file is same for all but I need to specify ID for each one that will be used in code (ideally it should be done automatically by php script). For now I tried to put ID to text file in Assets and then open apk as archive in Windows, update value in text file then save (update archive). As result my application cannot be installed anymore. Why it doesn't work? Or may be there another way to set ID for each apk without recreating package in development environment?

推荐答案

有没有办法做到这一点,必须编译并签上您的应用程序上的每一个变化。

There is no way to do that, you must compile and sign your app on every change.

的Andr​​oid做一个哈希您的APK,如果你改变了一下内容,这个哈希不重合,也不会是一个有效的APK(无法安装)。

Android do a hash for your apk, if you change a bit the content, this hash do not coincide and will not be a valid apk (not able to install).

您可以做一定程度的脚本来使自动化文件的变化,您的APK之后编译/迹象。

You can do somewhat script to automatize the change of a file and compile/sign after your apk.

这篇关于从外部改变的.apk文件资产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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