丢失了debug.keystore文件

时间:2016-12-09 12:28:03

标签: android sqlite android-keystore

我将.apk(调试模式)文件分发给了一个封闭的用户组(通过电子邮件)。他们玩弄了应用程序,一些数据存储在sqlite数据库(内部存储)中。最近,我的机器崩溃并丢失了包括debug.keystore在内的所有内容。我现在需要提供一个更新的版本(从新机器)但是如你所知,由于密钥不匹配,它不会安装在旧版本之上。

存储在sqlite数据库中的数据非常重要,所以有什么方法可以获得该db文件吗?此外,如果我root手机,我将能够在已安装的构建之上安装更新而不会出现密钥不匹配,或者我是否至少可以获取该db文件以便我可以使用其他应用程序访问数据?

提前谢谢。

1 个答案:

答案 0 :(得分:0)

Your error was that you distribute your apk signed by debug.keystore. That is wrong and you face a consequence of this action. debug.keystore is generated dynamicly and can change often (for example reinstal of android studio) and you don't have assurance that next build will be signed with same key. From that point you are not able to update your app even Google itself can't help.

As far as i know the only chance for you is to get the db file manualy from the phone install new version of your app with new release.keystore and swap the new empty db file with old one.

Note that if your db file is in private storage of your app you need root to access that file.

if you already have access to file here is adb command for pulling file to PC:

adb pull /sdcard/absolute/path/to/file/database.db C:/destination/of/file/on/PC
相关问题