Closes https://github.com/termux/termux-api/issues/12
TERMUX_PKG_HOMEPAGE=http://termux.com/add-ons/api/
TERMUX_PKG_DESCRIPTION="Termux API commands"
TERMUX_PKG_HOMEPAGE=http://termux.com/add-ons/api/
TERMUX_PKG_DESCRIPTION="Termux API commands"
termux_step_make_install () {
mkdir -p $TERMUX_PREFIX/bin
termux_step_make_install () {
mkdir -p $TERMUX_PREFIX/bin
char const* const file = "/system/bin/am";
// Avoid the system am binary from linking to wrong libraries:
unsetenv("LD_LIBRARY_PATH");
char const* const file = "/system/bin/am";
// Avoid the system am binary from linking to wrong libraries:
unsetenv("LD_LIBRARY_PATH");
+ // Ensure /system/bin/app_process is in path, which is needed by am in some systems:
+ putenv("PATH=/system/bin");
// The user is calculated from the uid in android.os.UserHandle#getUserId(int uid) as "uid / 100000", so we do the same:
uid_t current_uid = getuid();
// The user is calculated from the uid in android.os.UserHandle#getUserId(int uid) as "uid / 100000", so we do the same:
uid_t current_uid = getuid();