-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault when calling api command inside proot #434
Comments
Please provide a full output of |
Sure! here's the output inside a proot-distro session
and here is outside a proot-distro session (termux enviroment) just in case
|
Sorry to bother, but I've just discovered that the issue is not limited to termux-api; it affects every executable/command that is previously installed in the Termux environment, unless it’s in proot-distro. |
Variables look good for Android 7.x. If you are saying that all Termux commands do not work in proot-distro, try to run this:
Instead of Also you can try to start just |
Hi, I just tried what you suggested, and it seems to work fine. I think it might be related to Alpine Linux running the commands differently (just a guess). I’ll keep you updated if I find anything that doesn’t work. ~ $ proot pwd
/data/data/com.termux/files/home
~ $ termux-chroot pwd
/data/data/com.termux/files/home
~ $ echo "trying one of the termux-api commands using proot and termux-chroot"
trying one of the termux-api commands using proot and termux-chroot
~ $ proot termux-battery-status
WARNING: linker: /system/vendor/lib/hw/memtrack.clovertrail.so: unused DT entry: type 0xf arg 0x130
WARNING: linker: /system/vendor/lib/libsrv_um.so: unused DT entry: type 0xf arg 0xbe3
WARNING: linker: /system/vendor/lib/hw/memtrack.clovertrail.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /system/vendor/lib/libsrv_um.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /system/vendor/lib/hw/gralloc.clovertrail.so: unused DT entry: type 0xf arg 0x62a
WARNING: linker: /system/vendor/lib/libpvr2d.so: unused DT entry: type 0xf arg 0x79b
WARNING: linker: /system/vendor/lib/hw/gralloc.clovertrail.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /system/vendor/lib/libpvr2d.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
{
"health": "GOOD",
"percentage": 40,
"plugged": "UNPLUGGED",
"status": "DISCHARGING",
"temperature": 25.899999618530273,
"current": -6
}
~ $ termux-chroot termux-battery-status
WARNING: linker: /vendor/lib/hw/memtrack.clovertrail.so: unused DT entry: type 0xf arg 0x130
WARNING: linker: /vendor/lib/libsrv_um.so: unused DT entry: type 0xf arg 0xbe3
WARNING: linker: /vendor/lib/hw/memtrack.clovertrail.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /vendor/lib/libsrv_um.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /vendor/lib/hw/gralloc.clovertrail.so: unused DT entry: type 0xf arg 0x62a
WARNING: linker: /vendor/lib/libpvr2d.so: unused DT entry: type 0xf arg 0x79b
WARNING: linker: /vendor/lib/hw/gralloc.clovertrail.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /vendor/lib/libpvr2d.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
{
"health": "GOOD",
"percentage": 40,
"plugged": "UNPLUGGED",
"status": "DISCHARGING",
"temperature": 25.899999618530273,
"current": -14
}
~ $ echo "Starting termux-chroot and running termux-api commands"
Starting termux-chroot and running termux-api commands
~ $ termux-chroot
~ $ termux-battery-status
WARNING: linker: /vendor/lib/hw/memtrack.clovertrail.so: unused DT entry: type 0xf arg 0x130
WARNING: linker: /vendor/lib/libsrv_um.so: unused DT entry: type 0xf arg 0xbe3
WARNING: linker: /vendor/lib/hw/memtrack.clovertrail.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /vendor/lib/libsrv_um.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /vendor/lib/hw/gralloc.clovertrail.so: unused DT entry: type 0xf arg 0x62a
WARNING: linker: /vendor/lib/libpvr2d.so: unused DT entry: type 0xf arg 0x79b
WARNING: linker: /vendor/lib/hw/gralloc.clovertrail.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
WARNING: linker: /vendor/lib/libpvr2d.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
{
"health": "GOOD",
"percentage": 40,
"plugged": "UNPLUGGED",
"status": "DISCHARGING",
"temperature": 25.799999237060547,
"current": -3
}
~ $ |
Problem description
I can't run succesfully termux-api commands inside proot-distro (using alpine linux), it causes segmentation fault. Works fine on default termux enviroment. I've tested the following commands: "termux-battery-status" "termux-brightness" "termux-volume"
Steps to reproduce
pkg update && pkg upgrade
termux-api
package:pkg add termux-api
pkg install proot-distro
proot-distro install alpine
proot-distro login alpine
Expected behavior
Expected to run normally (in this case, termux-battery-status should return a JSON containing info of the device's battery) as shown in the section "Problem Description"
Additional information
The text was updated successfully, but these errors were encountered: