<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Android(AOSP) Geeks - Medium]]></title>
        <description><![CDATA[The publication for Android AOSP developement - Medium]]></description>
        <link>https://medium.com/android-aosp-geeks?source=rss----65d7968471d3---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Android(AOSP) Geeks - Medium</title>
            <link>https://medium.com/android-aosp-geeks?source=rss----65d7968471d3---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:15:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/android-aosp-geeks" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring Android APK in Android 10( API level 29)]]></title>
            <link>https://medium.com/android-aosp-geeks/exploring-android-apk-in-android-10-api-level-29-c9e175f971e?source=rss----65d7968471d3---4</link>
            <guid isPermaLink="false">https://medium.com/p/c9e175f971e</guid>
            <category><![CDATA[apk]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[androidmanifest]]></category>
            <category><![CDATA[android-apps]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Rishikesh Pathak]]></dc:creator>
            <pubDate>Sat, 14 Dec 2019 18:46:39 GMT</pubDate>
            <atom:updated>2019-12-14T18:46:39.137Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*T5dCQwQNb2WpyEW_E5NIXA.png" /></figure><p>If you are using an Android phone you will likely have heard of an APK file at some point.<br>So basically Android Package Kit (APK) is the package file format used by the Android operating system for distribution and installation of mobile apps. Every application installed in your Android Phone is being downloaded in .apk format.</p><blockquote>What an Android APK Contains?</blockquote><p>Let&#39;s take an example, I have made a Sample Application using <a href="https://developer.android.com/studio/">Android Studio</a> and got an APK with compile and taget SDK version 29, named as “<strong>app-debug.apk” </strong>having package name<strong> “com.aospgeeks.sample”. <br></strong>We will extract that APK as we <a href="https://support.microsoft.com/en-in/help/14200/windows-compress-uncompress-zip-files">extract</a> any other .zip/.rar file. To Extract an APK lets rename the extension as .rar and than we can extract it. Below is file structure we got after extraction:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*8OqRpuNP3ts0AW2gQ_Lr8Q.png" /></figure><p>Your APK may contain more items like assets,lib etc. It depends on what you have included in your project. Above one is small project example. We will elaborate all one by one from downward directions,</p><p><strong>resources.arsc:</strong> <br>This <em>resources.arsc</em> file contains all the meta-information about the resources and the xml nodes(e.g. LinearLayout, FrameLayout, etc) and their attributes(e.g. <em>android:layout_height</em>) including their ids. These ids reference into the actual resources in the apk-file. These are resolved to a value at runtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*7WrGfqvhnUAPk8vyVzsdOA.png" /><figcaption><strong>the resource items available in resource.arsc file</strong></figcaption></figure><p><strong>classes.dex and classes2.dex: <br></strong> Android programs are compiled into .dex (Dalvik Executable) files,<br>The DEX byte code format is translated to native machine code via either ART or the Dalvik runtimes. Here DEX bytecode is independent of device architecture. So, basically <strong>classes.dex </strong>file contains all the java classes in .dex format if you observe below two photos, <strong>classes.dex </strong>containing all library/sdk classes and <strong>classes2.dex</strong> containing your application classes along with some support library classes.</p><blockquote>Note: An APK can contain Multiple dex files</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*-Fg3G-kVVnchBv8e1_-erQ.png" /><figcaption><strong>classes.dex</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*9Nu5UDnAURszRSlUSEzY4w.png" /><figcaption><strong>classes2.dex</strong></figcaption></figure><p><strong>AndroidManifest.xml:<br></strong>AndroidManifest contains all your application configuration, components and permission requirements that you provided while creating your application. It is same that you written for your application.</p><p><strong>res:<br></strong>If you will open <strong>res </strong>folder you will find all <em>drawable, layout, anim, color, mipmap, etc </em>folder inside as given in below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*vver2aqItnl4rGd0lt0KKw.png" /></figure><p>Basically, it contains all .xml and .png files that you provided in your project while writing your application.</p><p><strong>META-INF:<br></strong>META_INF folder contains application signature details which look like below when you open it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*n5gaGoLV_JDDUZxdYtFfSQ.png" /></figure><p>We will mainly discuss about MANIFEST.MF, CERT.SF and CERT.RSA.</p><ul><li><strong>MANIFEST.MF:</strong> <br> It stores the message digests of all source files in the apk to prevent their integrity from tampering. Enumerate all the files, calculate their message digest, and finally convert all digests to base64-encoded binary value.<br> The default digest used is <a href="http://en.wikipedia.org/wiki/SHA-1">SHA-1</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*cdWrMlrX6JRq6KtPQjbSIw.png" /><figcaption><strong>MANIFEST.MF</strong></figcaption></figure><ul><li><strong>CERT.SF:</strong> <br>This is similar to MANIFEST.MF but it stores the base64-encoded codes of MANIFEST.MF’s message digest, and the message digests of all the digests stored in MANIFEST.MF.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*nw9pgsQV-zYj_JihJom4ig.png" /><figcaption><strong>CERT.SF</strong></figcaption></figure><blockquote>In a simple terms, CERT.SF is similar to the MANIFEST.MF file, except that instead of the SHA1 hash of the contents for a file, it lists a SHA1 hash of the lines for the file from the MANIFEST.MF file.</blockquote><p>The “TTYx9NO2OS5ScAuB+LNG2A/b/qOXlBalU5dDggHMXPA=” you see in CERT.SF for Name AndroidManifest.xml is the SHA1 hash of this string from MANIFEST.MF <br>“Name: AndroidManifest.xml<br>SHA-256-Digest: hOQuzwEFzVI1wPTsLkTULBwOa15M5p2Jdpor9G6fVc0=”</p><ul><li><strong>CERT.RSA:</strong> <br>It stores the digital signature of CERT.SF, as well as the certificate used for signing.<br>It can be viewed by below command:<br>“<em>keytool -printcert -file CERT.RSA”<br></em>It contains<em> </em>Owner details such as (Email, Company details), Issuer details, Serial number, Valid from, Valid Until, Certificate fingerprints, Signature algorithm name, Subject Public Key Algorithm, Extensions.</li></ul><p><em>If you liked my story please click on clap icon and if you want to read future stories by me related to Android Development please follow me </em>and publication. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9e175f971e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-aosp-geeks/exploring-android-apk-in-android-10-api-level-29-c9e175f971e">Exploring Android APK in Android 10( API level 29)</a> was originally published in <a href="https://medium.com/android-aosp-geeks">Android(AOSP) Geeks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>