<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Android on Aamnah - Frontend Web Developer</title>
    <link>https://aamnah.com/notes/android/</link>
    <description>Recent content in Android on Aamnah - Frontend Web Developer</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 26 May 2022 12:33:34 +0500</lastBuildDate>
    <atom:link href="https://aamnah.com/notes/android/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Adding Google Play Store to an Android Emulator device on macOS</title>
      <link>https://aamnah.com/notes/android/install-play-store-emulator-device-avd-macos/</link>
      <pubDate>Thu, 26 May 2022 12:33:34 +0500</pubDate>
      <guid>https://aamnah.com/notes/android/install-play-store-emulator-device-avd-macos/</guid>
      <description>&lt;p&gt;This is something that turned out to be fairly simple to do and took less than five minutes.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Turn off the emulator device&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The Emulator device settings are in &lt;code&gt;~/.android/avd/EMULATOR_DEVICE_NAME.avd/config.ini&lt;/code&gt;. (You can also find the emulator device&amp;rsquo;s config folder by clicking options dropdown and selecting &lt;em&gt;Show on Disk&lt;/em&gt;)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Set &lt;code&gt;PlayStore.enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; and change &lt;code&gt;google_apis&lt;/code&gt; in &lt;code&gt;image.sysdir.1&lt;/code&gt; to &lt;code&gt;google_apis_playstore&lt;/code&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;PlayStore.enabled&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;image.sysdir.1&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;system-images/android-32/google_apis/arm64-v8a/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;will become:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;PlayStore.enabled&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;image.sysdir.1&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;system-images/android-32/google_apis_playstore/arm64-v8a/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;Wipe Data and Cold Boot the the emulator device. You should now see Play Store in apps.&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>Installing Google Play Store on AVD emulator devices</title>
      <link>https://aamnah.com/notes/android/play_store_emulator_install_missing/</link>
      <pubDate>Sun, 02 Aug 2020 00:00:00 +0000</pubDate>
      <guid>https://aamnah.com/notes/android/play_store_emulator_install_missing/</guid>
      <description>&lt;p&gt;Why?&#xA;Not all AVD profiles come with Play Store installed. I needed a phone with a notch, and decided on Google Pixel XL, but turns out it didn&amp;rsquo;t have Play Store installed&lt;/p&gt;&#xA;&lt;p&gt;I found the answer on StackOverflow, and it&amp;rsquo;s pretty straight forward. Compare the &lt;code&gt;config.ini&lt;/code&gt; file with another AVD device that does has Play Store installed and then update the one for Google Pixel XL after figuring out the change&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using keytool for keystore management and app code signing</title>
      <link>https://aamnah.com/notes/android/keytool-app-code-signing-keystore-management/</link>
      <pubDate>Mon, 29 Jun 2020 20:15:26 +0500</pubDate>
      <guid>https://aamnah.com/notes/android/keytool-app-code-signing-keystore-management/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;The app signing key never changes, but the upload key can be reset if the two are not the same (i.e. your signing key is different from your upload key)&lt;/li&gt;&#xA;&lt;li&gt;To use the &lt;em&gt;Android App Bundle&lt;/em&gt; format, you need to opt-in to &lt;em&gt;Play App Signing&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;By using a separate upload key, you can request an upload key &lt;em&gt;reset&lt;/em&gt; if the key is ever lost of compromised&lt;/li&gt;&#xA;&lt;li&gt;It is recommended you generate your own keys, just in case you want to release the app to other marketplaces (e.g. Amazon Appstore, Samsung Galaxy Apps, F-Droid)&lt;/li&gt;&#xA;&lt;li&gt;It is recommended you use two separate keys for app signing and upload (instead of making your app signing key your upload key).&lt;/li&gt;&#xA;&lt;li&gt;We sign the app with &lt;em&gt;upload key&lt;/em&gt; and then upload it to Google Play Console. Google then uses our upload certificate to verify our identity, sign our builds with &lt;em&gt;app signing key&lt;/em&gt; and distributes them to devices.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;App Signing Key&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Upload key&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Serves as &lt;em&gt;master&lt;/em&gt; key, never changes during the lifetime of your app. Can not be reset if lost/stolen&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;An additional layer of security, can be reset if lost/stolen&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Generated by us. Managed by Play Console&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Generated by us (optional). Managed by Play Console&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Play Console manages and keeps this key and automatically signs the uploaded app for distribution&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Kept by us&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h3 id=&#34;generate-a-keystore&#34;&gt;Generate a keystore&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;keytool -genkeypair -v -keyalg RSA -keysize &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt; -validity &lt;span class=&#34;m&#34;&gt;10000&lt;/span&gt; -keystore KEYSTORE_OUTPUT_FILE.keystore -alias KEY_ALIAS&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You&amp;rsquo;ll get a prompt for setting the keystore password and then asked for some additional info about yur organization. Next it&amp;rsquo;ll ask you for a password for your key &lt;em&gt;Alias&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Export and upload a key and certificate from a Java keystore</title>
      <link>https://aamnah.com/notes/android/pepk-tool-export-key-certificate-java-keystore/</link>
      <pubDate>Mon, 29 Jun 2020 18:31:27 +0500</pubDate>
      <guid>https://aamnah.com/notes/android/pepk-tool-export-key-certificate-java-keystore/</guid>
      <description>&lt;h3 id=&#34;play-encrypt-private-key-pepk-tool&#34;&gt;Play Encrypt Private Key (PEPK) tool&lt;/h3&gt;&#xA;&lt;p&gt;Use this tool to export private keys from a Java Keystore and encrypt them for transfer to Google Play. When providing the app signing key for Google to use, select the option to &lt;strong&gt;Export and upload a key from a Java keystore&lt;/strong&gt; and follow the instructions to download and use the tool.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Download the PEPK tool&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Run the given command to generate app signing key and certificate zip PEPK tool. Replace values for your keystore (&lt;code&gt;foo.keystore&lt;/code&gt;, &lt;code&gt;foo&lt;/code&gt;, and &lt;code&gt;output.zip&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
  </channel>
</rss>
