【问题标题】:Sign a debug APK file while using cordova run command line使用 cordova 运行命令行时签署调试 APK 文件
【发布时间】:2019-06-11 21:35:58
【问题描述】:

我想使用 Apache Cordova 命令行测试和调试 APK 文件的签名版本。当我们运行cordova build androidcordova run android --device 时,会在以下位置创建一个APK 文件:

<project_dir>/platforms/android/build/outputs/apk/debug/android-debug.apk

在运行cordova run android --device 时,我们可以在将此调试文件发送到设备之前对其进行签名吗?

或者这个android-debug.apk 是否已经使用 SHA1 签名,如果是,如何获得该签名?

【问题讨论】:

    标签: android cordova ionic-framework keytool


    【解决方案1】:

    它已经在~/.android/debug.keystore 密钥库中使用名称为 androiddebugkey 的证书签名。

    获取签名:

    keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore > debug.crt
    openssl sha1 -binary debug.crt > debug.sha
    openssl base64 -in debug.sha > debug.txt
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多