No description
Find a file
2024-12-02 08:42:14 +01:00
apps/webview fix .gitignore 2024-12-01 08:32:32 +01:00
.gitignore improve Makefile 2024-11-01 06:12:24 +01:00
compose.yml commit to new branch for android emulator 2024-12-01 08:25:10 +01:00
Dockerfile make Makefile.apps generation outsourced bash script 2024-12-02 08:41:51 +01:00
entrypoint.sh improve Makefile 2024-11-01 06:12:24 +01:00
IDEAS.TODOS.md keep track of ideas 2024-12-02 08:42:14 +01:00
LICENSE Add LICENSE 2024-06-16 14:26:42 +02:00
Makefile make Makefile.apps generation outsourced bash script 2024-12-02 08:41:51 +01:00
Makefile.make.Makefile.apps.sh make Makefile.apps generation outsourced bash script 2024-12-02 08:41:51 +01:00
README.md fix typo in README.md 2024-10-08 11:38:09 +02:00

Repo allowing -in a KISS way- to create a containered way to build an Android App APK

brach no-res.xml

this branch features the exmaple.app to not require the compoletely bogus unneeded requirement to setup a ./apk/res/layouts/res.xml file to setup the layout to be used. Instead a layout is created inline

tl;dr

to make minimal exmaple.app via the docker-compose:

# clone repo
git clone https://git.alexmahr.de/lion/android-app-docker
# enter local copy
cd android-app-docker
# checkout the branch for minmal-example-app
git checkout minimal-example-app
# set env variable
export YESACCEPT=y #to acceccpt the license agreement terms (it is your responsibility to read it)
# build app (this involves first building the docker compose setup and container used to build the apk)
make build

This will generate the APK file ./apk/example.app.apk

this can be installed via adb

adb install -r ./apk/example.app.apk 
# or alternative type
make install

which of course would require your mobile device to be connected and setup for USB-debugging.

a bit longer

build an application

  1. build the image *
# set YESSACCEPT TO "y" else the buid will not work, you agree to the upstream google corp licenses as shown
# without that a dockerimage cannot bu build
docker compose build --pull --build-arg YESACCEPT=
  1. modify the example minimal application source code found in
vim ./apk/Makefile 
vim ./apk/..... (other files)
  1. run the compilation in the container (which is build via Dockerfile and docker-compose.yml upon first usage)
docker-compose run compile

this should result in the apk being build and be available at ./apk/app.apk

Dependencies / Requirementes

Ideally to work the system mus have docker and docker-compose (or some equivalend like podman etc.) installed. Having GNU make installed would allow to use the contained Makefile, which however is not necessary

Concepts and Ideals

Many smart folks use Android Studio IDE to build Applications knowing the in and outs of what such an Android App amounts to. Sadly often the formerly mentioned Software also allows for many less experienced or even uninformed persons to end up with an Application, wiithout having had much or any insight what is really happening. The "comfort" and assistence and overhead of the "automagic" support of the IDE might have drawbacks such as

  • more complex and hence less understood build system
  • lower actual understanding of the build system
  • dependence on the toolset and being basically "spoon-fed"
  • lack of mastery and dominance and autonomy
  • needless loss of insight
  • ... (1001 further permutations of the previous criticisms)...

To counteract this "generate an app via mouseclick", this repo strives to provide an alternative route to build an Android application, that via its "Hello World" app example should allow to

  • generate a "hello world" application (and extend/grow/modify that) easily via CLI
  • being portable and easily installable (hence the docker compose)
  • reuse Makefile as an often familiar concept of "recipe" way to build the application

Helpful commands

  • coerce rebuild:
docker-compose down --remove-orphans --rmi all 
docker-compose build --no-cache