Android中debug.keystore的用途是什么? [英] What is the use of debug.keystore in android?

查看:187
本文介绍了Android中debug.keystore的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一点澄清。我有以下问题

i have a small clarification. i have the following question,

1。是否在每次正常构建项目时都使用debug.keystore来生成apk?

1.Whether the debug.keystore is used to generating the apk every time building the project normally?

2。我已经完成了对生成的apk文件的解压缩。我来看看证书在META-INF文件夹中可用。是否使用debug.keystore生成了这些证书以标识系统标识?因为,两个SHA1散列值在解压缩后的APK中的debug.keystore和cert.RSA中都相同。

2.I have done unzip the generated apk file. I came to see certificates are available in META-INF folder. Are these certificates generated with debug.keystore to identify the system identification?. Because, Both SHA1 hash values are same in debug.keystore and cert.RSA of unzipped apk.

请澄清此疑问。

谢谢。.

推荐答案

要在设备上安装的每个apk都需要签名。调试密钥只是您的构建工具第一次使用时随机生成的证书,该证书会在构建调试版本时自动用于签名。否则,它与您为在Play商店中发行而生成的证书基本上没有区别(当然,它会忽略使用错误的个人信息和固定密码的事实)

Every apk that you want to install on your device needs to be signed. The debug key is just a random generated certificate by your build tools the first time you use it that is automatically used to sign when you build a debug build. It otherwise does not basically differ from a certificate that you generate for releasing in the play store (ommiting the fact that it uses wrong personal information and a fixed password, of course)

再次如此:如果您以调试方式进行构建,则使用调试密钥库,否则,如果要创建发行版,则必须创建自己的密钥库并将构建脚本指向它。

So again: if you build as debug the debug keystore is used, otherwise if you want to create a release you have to create your own keystore and point the build script to it.

有关Google文档的更多信息: http://developer.android.com/tools/publishing/app-signing.html

More on google docs: http://developer.android.com/tools/publishing/app-signing.html


正在调试模式,则使用
Android SDK工具生成的调试证书对应用程序进行签名。该证书具有一个带有已知
密码的私钥,因此您每次运行项目更改时都无需输入
密码即可运行和调试应用。

In debug mode, you sign your app with a debug certificate generated by the Android SDK tools. This certificate has a private key with a known password, so you can run and debug your app without typing the password every time you make a change to your project.

运行
或从IDE调试项目时,Android Studio会自动以调试模式对应用程序进行签名。

Android Studio signs your app in debug mode automatically when you run or debug your project from the IDE.

您可以运行和调试在模拟器上以调试模式签名的应用程序,以及通过USB连接到开发计算机的设备上以
签名的应用程序,但是您
无法分发以调试模式签名的应用程序。

You can run and debug an app signed in debug mode on the emulator and on devices connected to your development machine through USB, but you cannot distribute an app signed in debug mode.

默认情况下,调试配置使用带有
已知密码的调试密钥库和具有已知密码的默认密钥。调试
密钥库位于$ HOME / .android / debug.keystore中,如果不存在,则会创建
。调试构建类型设置为自动使用此调试
SigningConfig。

By default, the debug configuration uses a debug keystore, with a known password and a default key with a known password. The debug keystore is located in $HOME/.android/debug.keystore, and is created if not present. The debug build type is set to use this debug SigningConfig automatically.

作为附加提示:如果您是使用不同的共享测试设备组成的团队进行开发,那么如果您都共享相同的调试密钥库,则可以节省大量时间,否则从另一个开发人员那里获取测试设备时,您始终必须卸载调试应用程序

As a added pro tip: If you develop in a team with different shared test devices, it saves a lot of time if you all share the same debug keystore or else you always have to deinstall the debug app when getting the test device from another dev

这篇关于Android中debug.keystore的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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