Open ThinkMaster opened 6 years ago
Have you installed the termux-api app?
Yes, I have installed termux-api app on the phone
Have you granted the app necessary permissions?
Yes, I have.
..as attached
On Wed, May 2, 2018, 12:42 PM Henrik Grimler notifications@github.com wrote:
Have you granted the app necessary permissions?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/termux/termux-api/issues/168#issuecomment-385863146, or mute the thread https://github.com/notifications/unsubscribe-auth/AJgEHhyAM8OSqGaWDlO1CD8slLM7cycOks5tuTkxgaJpZM4Tt_Xi .
I have a close look into the log. Is it anything relating to the spawning of process to execute AM with regards to these messages: 05-01 18:12:23.922 31758 31758 D AndroidRuntime: Calling main entry com.example.termuxam.Am 05-01 18:12:23.924 31758 31765 E SchedPolicy: open of dev/cpuctl/limit_fg/tasks failed: No such file or directory 05-01 18:12:23.924 31758 31765 E SchedPolicy: open of dev/cpuctl/bg_non_interactive/limit_bg/tasks failed: No such file or directory 05-01 18:12:24.013 31758 31758 D AndroidRuntime: Shutting down VM
I did a "ls -l /dev" on Termux and it says "ls: can't open '/dev': Permission denied". Will it be relating to the way that somehow my phone spawned the process successful but due to 'extra permission problem' and the fact that it could not access relevant files outside termux that it gets stuck?
BTW, I have given all permissions that are possible to termux and termux-api as attached last time.
Same problem on Nougat.
Can't read /dev, because it's a system folder.
@Taguar258 On most devices with SELinux enabled you view content of /dev folder, but you still have access to some important files such as:
/dev/null
/dev/zero
/dev/random
/dev/urandom
/dev/tty
I have permission denied on ls /dev
, but Termux API for me is working.
Same issue with Neffox X1: All Termux:API scripts hang endless. No Log:
$ logcat -s termux:* termux-api:*
--------- beginning of main
$ termux-info
Updatable packages:
All packages up to date
System information:
Linux localhost 3.18.35+ #1 SMP PREEMPT Thu Jul 5 09:33:24 C
ST 2018 aarch64 Android
Termux-packages arch:
aarch64
Android version:
7.0
Device manufacturer:
TP-Link
Device model:
Neffos X1
Terminated
$ apt list term*
Listing... Done
termux-am/stable,now 0.2 all [installed]
termux-api/stable,now 0.33 aarch64 [installed]
termux-apt-repo/stable 0.2 all
termux-create-package/stable 0.4 all
termux-elf-cleaner/stable 1.2 aarch64
termux-exec/stable,now 0.3 aarch64 [installed]
termux-tools/stable,now 0.56 all [installed]
No Log:
logcat -s termux: termux-api:
Of course there no log - this is related more to Android OS itself than to Termux or Termux:API.
So you have to dump full log: Run any of termux-api commands and immediately dump log:
logcat -d > mylog.txt
Then post it here (as file attachment) or to github gist service.
Possible that this issue may be related to missing BOOTCLASSPATH
environment variable (which is required by dalvikvm on some devices). Fix here: https://github.com/termux/termux-app/pull/811, but it is not merged to Termux currently.
You can try the following code to generate BOOTCLASSPATH variable:
for lib in $(find /system/framework -type f -iname \*.jar); do
BOOTCLASSPATH=${lib}:${BOOTCLASSPATH};
done
BOOTCLASSPATH=${BOOTCLASSPATH%%:}
export BOOTCLASSPATH
Then try execute any of termux-api commands, e.g. termux-battery-status
.
Go to Huawei EMUI's settings. Under Apps > Termux:API > Set Individual Permissions, check trust this app and also check App auto-launch
I have done everything according to Wiki and still cannot get termux-api working on my phone. Every API just returns me nothing, and I have to ctrl-c.
This is the output of termux-info on my phone: $ termux-info Updatable packages: All packages up to date System information: Linux localhost 4.1.18-g725239a #1 SMP PREEMPT Wed Jan 17 03:18:54 CST 2018 aarch64 Android Termux-packages arch: aarch64 Android version: 7.0 Device manufacturer: HUAWEI Device model: EDI-AL10 Terminated $
And this is what I have installed: *$ apt list term Listing... Done termux-am/stable,now 0.2 all [installed] termux-api/stable,now 0.28 aarch64 [installed] termux-apt-repo/stable 0.2 all termux-create-package/stable 0.4 all termux-elf-cleaner/stable 1.2 aarch64 termux-exec/stable,now 0.3 aarch64 [installed] termux-tools/stable,now 0.53 all [installed]**
I have used two termux sessions and use logcat to capture the output from "termu-camera-info".
Please kindly help.
Thanks Brian