I'm writing an init service which make sure a package is installed and if not, it will install the apk.
The problem is, that currently I'm using a boot trigger with
on boot
but when I run pm install from there it doesn't seem to work. I've used a sleep command to wait for the package manager service to load but I would like to find a proper solution.
I've had three ideas which all seems to lead to me to a dead end:
1. wait for a prop to show up, but the package manager service doesn't create any.
2. wait for a file to show up, again no such file exist
3. set my service in a class but it seems to be relevant for the service itself and not the trigger or am I misunderstanding something?
My current service definition is like so:
on boot
exec_background -- /vendor/bin/install.sh
Asked by yotamN
(121 rep)
May 8, 2023, 01:53 PM
Last activity: May 9, 2023, 06:22 AM
Last activity: May 9, 2023, 06:22 AM