<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックDoes Android OS 10 support make with password-protected certificates?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Does-Android-OS-10-support-make-with-password-protected/m-p/1958161#M228678</link>
    <description>&lt;P&gt;Environment:&lt;BR /&gt;The Android OS environment being used is as follows:&lt;BR /&gt;URL: &lt;A href="https://www.nxp.jp/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-mx-applications-processors:IMXANDROID" target="_blank"&gt;https://www.nxp.jp/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-mx-applications-processors:IMXANDROID&lt;/A&gt;&lt;BR /&gt;Android Version: Android Q10.0.0_2.6.0 (Linux 5.4.70 kernel)&lt;/P&gt;&lt;P&gt;Objective:&lt;BR /&gt;We would like to create an environment where the NXP certificates located in the following folder are replaced with custom certificates:&lt;/P&gt;&lt;P&gt;(path/to/)/android_build/devices/fsl/common/security/&lt;BR /&gt;media, networkstack, platform, shared, testkey&lt;BR /&gt;and&lt;BR /&gt;releasekey (this one is custom-added)&lt;/P&gt;&lt;P&gt;Problem:&lt;BR /&gt;When we place a password-protected certificate and attempt to build, the following error occurs:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;gt; java.lang.IllegalArgumentException: illegal object in getInstance: org.bouncycastle.asn1.DLSequence&lt;BR /&gt;&amp;gt; at org.bouncycastle.asn1.ASN1Integer.getInstance(ASN1Integer.java:44)&lt;BR /&gt;&amp;gt; at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.&amp;lt;init&amp;gt;(PrivateKeyInfo.java:134)&lt;BR /&gt;&amp;gt; at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getInstance(PrivateKeyInfo.java:83)&lt;BR /&gt;&amp;gt; at com.android.signapk.SignApk.readPrivateKey(SignApk.java:277)&lt;BR /&gt;&amp;gt; at com.android.signapk.SignApk.main(SignApk.java:1091)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Note: This issue does not occur if the certificate is not password-protected.&lt;/P&gt;&lt;P&gt;Question 1:&lt;BR /&gt;In the Android make process, there is no prompt for password input. How should the password be set?&lt;/P&gt;&lt;P&gt;Question 2:&lt;BR /&gt;We believe that the prebuilt JDK 9 does not support password-protected certificates.&lt;BR /&gt;Has it been confirmed that JDK 9 can be used to build with password-protected certificates?&lt;BR /&gt;Or should we assume that Android Q10.0.0_2.6.0 (Linux 5.4.70 kernel) does not support password-protected certificates?&lt;/P&gt;&lt;P&gt;When I sign an apk with a passworded certificate with sign_target_files_apks after making with a non-passworded certificate, I get a prompt for a password.&lt;BR /&gt;However, the same error occurs when the password is entered.&lt;BR /&gt;This seems to occur when using a pre-built JDK 9, and it is believed that JDK 9 does not support password-protected certificates.&lt;/P&gt;&lt;P&gt;In the Android OS build steps, JDK 9 is set in the path when running source build/envsetup.sh.&lt;BR /&gt;Thus, we believe that using JDK 9 is the correct approach.&lt;/P&gt;&lt;P&gt;When using JDK 19 installed on a PC to run sign_targetfiles_apk, this issue does not occur.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Sep 2024 01:37:46 GMT</pubDate>
    <dc:creator>yamasita_yoshiyuki</dc:creator>
    <dc:date>2024-09-20T01:37:46Z</dc:date>
    <item>
      <title>Does Android OS 10 support make with password-protected certificates?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Does-Android-OS-10-support-make-with-password-protected/m-p/1958161#M228678</link>
      <description>&lt;P&gt;Environment:&lt;BR /&gt;The Android OS environment being used is as follows:&lt;BR /&gt;URL: &lt;A href="https://www.nxp.jp/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-mx-applications-processors:IMXANDROID" target="_blank"&gt;https://www.nxp.jp/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-mx-applications-processors:IMXANDROID&lt;/A&gt;&lt;BR /&gt;Android Version: Android Q10.0.0_2.6.0 (Linux 5.4.70 kernel)&lt;/P&gt;&lt;P&gt;Objective:&lt;BR /&gt;We would like to create an environment where the NXP certificates located in the following folder are replaced with custom certificates:&lt;/P&gt;&lt;P&gt;(path/to/)/android_build/devices/fsl/common/security/&lt;BR /&gt;media, networkstack, platform, shared, testkey&lt;BR /&gt;and&lt;BR /&gt;releasekey (this one is custom-added)&lt;/P&gt;&lt;P&gt;Problem:&lt;BR /&gt;When we place a password-protected certificate and attempt to build, the following error occurs:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;gt; java.lang.IllegalArgumentException: illegal object in getInstance: org.bouncycastle.asn1.DLSequence&lt;BR /&gt;&amp;gt; at org.bouncycastle.asn1.ASN1Integer.getInstance(ASN1Integer.java:44)&lt;BR /&gt;&amp;gt; at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.&amp;lt;init&amp;gt;(PrivateKeyInfo.java:134)&lt;BR /&gt;&amp;gt; at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getInstance(PrivateKeyInfo.java:83)&lt;BR /&gt;&amp;gt; at com.android.signapk.SignApk.readPrivateKey(SignApk.java:277)&lt;BR /&gt;&amp;gt; at com.android.signapk.SignApk.main(SignApk.java:1091)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Note: This issue does not occur if the certificate is not password-protected.&lt;/P&gt;&lt;P&gt;Question 1:&lt;BR /&gt;In the Android make process, there is no prompt for password input. How should the password be set?&lt;/P&gt;&lt;P&gt;Question 2:&lt;BR /&gt;We believe that the prebuilt JDK 9 does not support password-protected certificates.&lt;BR /&gt;Has it been confirmed that JDK 9 can be used to build with password-protected certificates?&lt;BR /&gt;Or should we assume that Android Q10.0.0_2.6.0 (Linux 5.4.70 kernel) does not support password-protected certificates?&lt;/P&gt;&lt;P&gt;When I sign an apk with a passworded certificate with sign_target_files_apks after making with a non-passworded certificate, I get a prompt for a password.&lt;BR /&gt;However, the same error occurs when the password is entered.&lt;BR /&gt;This seems to occur when using a pre-built JDK 9, and it is believed that JDK 9 does not support password-protected certificates.&lt;/P&gt;&lt;P&gt;In the Android OS build steps, JDK 9 is set in the path when running source build/envsetup.sh.&lt;BR /&gt;Thus, we believe that using JDK 9 is the correct approach.&lt;/P&gt;&lt;P&gt;When using JDK 19 installed on a PC to run sign_targetfiles_apk, this issue does not occur.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2024 01:37:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Does-Android-OS-10-support-make-with-password-protected/m-p/1958161#M228678</guid>
      <dc:creator>yamasita_yoshiyuki</dc:creator>
      <dc:date>2024-09-20T01:37:46Z</dc:date>
    </item>
  </channel>
</rss>

