r/androiddev • u/NorthArder • Oct 16 '26
Article Running a full PostgreSQL 18 server inside an Android app: SELinux exec rules, argv[0] tricks and no shmget()
https://dev.to/pocketcode/how-i-got-postgresql-18-running-inside-an-android-app-5chjAuthor here. I'm building an Android IDE on my own and wanted a real Postgres running on the device, no remote server. The write-up covers the parts that took me longest: shipping the binaries as .so files so Android lets them execute, the argv[0]/symlink trick initdb needs, rebuilding without the Termux prefix, and forcing mmap because there's no System V shared memory. Happy to answer anything about it.
2
Upvotes