Skip to content

Instantly share code, notes, and snippets.

View Guhan-SenSam's full-sized avatar
:octocat:

Guhan Sensam Guhan-SenSam

:octocat:
View GitHub Profile
@Guhan-SenSam
Guhan-SenSam / instructions.md
Last active April 4, 2024 05:06
Creating an AAB for python apps using Buildozer

Introduction

Recently Google made it compulsory that all new apps must be uploaded not as .apk files but as .aab files. Till just recently the tool Buildozer was only able to compile your python applications to .apk but recent changes have allowed us to compile to .aab format. This is an instruction set that can be used to create a release .aab.

What is an AAB

The new .aab format may be a little confusing. .aab stands for app bundles and consists of a bundle of apk's within it. When you upload an aab to the playstore you are basically uploading a bunch of apk. PlayStore then based on the device that is downloading your application will generate the required apk based on that devices architecture and other parameters.

The introduction of .aab doesn't mean that .apk are no longer useful. .aab are only used for releases where as .apk are still used for testing your application and sharing it with others to directly install(not through the store).

> Note: Test your applications

In this gist I will explain what are all the steps that I followed in order to generate a signed version of my .aab.

Note: This signing process only works on Ubuntu and only works in a single terminal. YOU MUST COMPLETE ALL THE STEPS IN A SINGLE TERMINAL.DO NOT CLOSE THE TERMINAL IN ANY STEPS IN BETWEEN.

  1. Open any directory in your terminal(I prefer the documents directory).
  2. Now type mkdir -p ~/keystores/. This will create a folder in your home directory witht the name keystore. Keep this folder safe as you need it to update your app later down the line
  3. Now run this command keytool -genkey -v -keystore ~/keystores/<your-new-key>.keystore -alias <your-key-alias> -keyalg RSA -keysize 2048 -validity 10000. Here replace <your-new-key> with the name of your keystore. Replace <your-key-alias> with the name of your key(typically your app name) Set the validity to whatever you want. It represents the number of days your key will be valid. I would recommend setting it to the numbe
@Guhan-SenSam
Guhan-SenSam / 1info.md
Last active April 20, 2024 08:15
Methods to Optimizing Kivy Performance

Many people state that kivy is slow. While this may be true it is mostly due to that python is slow to run on android devices.Thus it is in the programmer's hands to properly optimize their code so as to create a performant application.

Most of the lag on android devices runing kivy apps arise due to widget creation. Widget creation remains the slowest step in a kivy app. Here are some of the methods that I follow to optimize my apps and ensure I can hit 60fps even on old devices

Optimization Methods: