<p>If you're sure you want to do all of this manually, read on. You can use the
<aclass="extlink-source reference external" href="https://github.com/python/cpython/tree/3.15/Platforms/Android/testbed">testbed app</a> as a guide; each step below contains a
<li><p>Or if you want to build it yourself, follow the instructions in
<aclass="extlink-source reference external" href="https://github.com/python/cpython/tree/3.15/Platforms/Android/README.md">Platforms/Android/README.md</a>. The <codeclass="docutils literal notranslate"><spanclass="pre">prefix</span></code> directory will be created under
<li><p>Add code to your <aclass="extlink-source reference external" href="https://github.com/python/cpython/tree/3.15/Platforms/Android/testbed/app/build.gradle.kts">build.gradle</a>
file to copy the following items into your project. All except your own Python
code can be copied from <codeclass="docutils literal notranslate"><spanclass="pre">prefix/lib</span></code>:</p>
<li><p>Add code to your app to <aclass="extlink-source reference external" href="https://github.com/python/cpython/tree/3.15/Platforms/Android/testbed/app/src/main/java/org/python/testbed/MainActivity.kt">extract the assets to the filesystem</a>.</p></li>
<li><p>Add code to your app to <aclass="extlink-source reference external" href="https://github.com/python/cpython/tree/3.15/Platforms/Android/testbed/app/src/main/c/main_activity.c">start Python in embedded mode</a>. This will need to be C code