S
S
sergeimvc2020-02-20 12:22:25
Java
sergeimvc, 2020-02-20 12:22:25

How to use APT inside Android apps?

Good morning everyone :)
I would like to talk with Android specialists (Java / Kotlin Development).
The task was to execute PHP code inside an Android application. The Kotlin language is used.

-- FOREWORD --
To begin with, I tried to work directly in the Android terminal.
I installed the first client I came across from Google Play (Termius), but I could not go far with the commands.
For example, apt is an unknown command, and accordingly "apt install php -y" will fail.
Many terminals that I installed gave the same result, but then I came across Termux ( https://termux.com/).
Everything worked out without problems.

For example, the "pkg install php" command installed PHP.
I went ahead and tested with vim, mc and other software - everything also works.
It feels like a little Linux is inside the application.

-- ACTUALLY THE QUESTION --
How to run PHP scripts inside an Android application written in Kotlin?
Is there anyone who has come across or who can give adequate advice where to dig in this matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergeimvc, 2020-02-20
@sergeimvc

I re-read my question and in this comment I will be brief.
It is required to execute commands through the terminal using, for example, Runtime.getRuntime().exec("some linux command") but for all this to work on non-rooted devices, by analogy as it is done in Termux.
It is also very important that you can use APT https://en.wikipedia.org/wiki/APT_(software) in exec to install additional software.
There are options?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question