Description
Following is the code which I am executing from my app .... command executes successfully but it exits before completion i.e it doesn't download the packages fully using pkg install commands and exits the service.
Intent intent = new Intent();
intent.setClassName("com.termux", "com.termux.app.RunCommandService");
intent.setAction("com.termux.RUN_COMMAND");
intent.putExtra("com.termux.RUN_COMMAND_PATH", "/data/data/com.termux/files/usr/bin/pkg");
intent.putExtra("com.termux.RUN_COMMAND_BACKGROUND", true);
intent.putExtra("com.termux.RUN_COMMAND_ARGUMENTS", new String[]{"install -y jq gettext curl openssh"});
startService(intent);
this is the output from logcat
2021-05-24 03:32:27.250 28306-7451/com.termux I/termux-task: [7448] starting: [/data/data/com.termux/files/usr/bin/pkg, install -y jq gettext curl openssh]
2021-05-24 03:32:29.643 28306-7451/com.termux I/termux-task: [7448] stdout: Checking availability of current mirror: ok
2021-05-24 03:32:29.659 28306-7450/com.termux I/termux-task: [7448] stderr:
2021-05-24 03:32:29.659 28306-7450/com.termux I/termux-task: [7448] stderr: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2021-05-24 03:32:29.659 28306-7450/com.termux I/termux-task: [7448] stderr:
2021-05-24 03:32:32.627 28306-7451/com.termux I/termux-task: [7448] stdout: Get:1 https://k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx.ipns.dweb.link stable InRelease [14.0 kB]
2021-05-24 03:32:35.393 28306-7451/com.termux I/termux-task: [7448] stdout: Hit:2 https://grimler.se/game-packages-24 games InRelease
2021-05-24 03:32:35.558 28306-7451/com.termux I/termux-task: [7448] stdout: Hit:3 https://grimler.se/science-packages-24 science InRelease
2021-05-24 03:32:35.683 28306-7451/com.termux I/termux-task: [7448] stdout: Fetched 14.0 kB in 6s (2333 B/s)
2021-05-24 03:32:35.707 28306-7451/com.termux I/termux-task: [7448] stdout: Reading package lists...
2021-05-24 03:32:35.711 28306-7451/com.termux I/termux-task: [7448] stdout: Building dependency tree...
2021-05-24 03:32:35.711 28306-7451/com.termux I/termux-task: [7448] stdout: Reading state information...
2021-05-24 03:32:35.711 28306-7451/com.termux I/termux-task: [7448] stdout: All packages are up to date.
2021-05-24 03:32:35.716 28306-7450/com.termux I/termux-task: [7448] stderr:
2021-05-24 03:32:35.716 28306-7450/com.termux I/termux-task: [7448] stderr: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2021-05-24 03:32:35.716 28306-7450/com.termux I/termux-task: [7448] stderr:
2021-05-24 03:32:35.723 28306-7451/com.termux I/termux-task: [7448] stdout: Reading package lists...
2021-05-24 03:32:35.724 28306-7451/com.termux I/termux-task: [7448] stdout: Building dependency tree...
2021-05-24 03:32:35.724 28306-7451/com.termux I/termux-task: [7448] stdout: Reading state information...
2021-05-24 03:32:35.727 28306-7451/com.termux I/termux-task: [7448] stdout: The following package was automatically installed and is no longer required:
2021-05-24 03:32:35.727 28306-7451/com.termux I/termux-task: [7448] stdout: oniguruma
2021-05-24 03:32:35.727 28306-7451/com.termux I/termux-task: [7448] stdout: Use 'apt autoremove' to remove it.
2021-05-24 03:32:35.728 28306-7451/com.termux I/termux-task: [7448] stdout: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2021-05-24 03:32:35.729 28306-7451/com.termux I/termux-task: [7448] exited normally
Any help please?
Activity