Skip to content
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

$ bash setupTermuxArch.sh not working #112

Closed
djrivington opened this issue Aug 19, 2018 · 14 comments
Closed

$ bash setupTermuxArch.sh not working #112

djrivington opened this issue Aug 19, 2018 · 14 comments

Comments

@djrivington
Copy link

djrivington commented Aug 19, 2018

setupTermuxArch.sh: line 392: /proc/sys/kernel/random/uuid: Permission denied
TermuxArch warning:  Script signal 1 generated!
setupTermuxArch.sh: line 232: tmpdir: unbound variable

I reinstalled Termux today on both my aarch64 phone and armv8 chromebook and now I'm facing this issue on both devices.

@SDRausty
Copy link
Owner

Can you $ ls -al /proc/sys/kernel/random/? What does $ cat /proc/sys/kernel/random/* give? Are the ROMs stock? A little bit more information is requested. Use setupTermuxArch.sh sysinfo.

@djrivington
Copy link
Author

djrivington commented Aug 19, 2018

Sorry about that. I wasn't sure where to start. I'm primarily focused on the phone. It's a galaxy s8 active running stock Android 8 without root. Until I reinstalled Termux, TermuxArch had been running flawlessly.

> ls -al /proc/sys/kernel/random/ > 

shows:

ls: /proc/sys/kernel/random/boot_id: Permission denied
ls: /proc/sys/kernel/random/entropy_avail: Permission denied
ls: /proc/sys/kernel/random/poolsize: Permission denied
ls: /proc/sys/kernel/random/read_wakeup_threshold: Permission denied
ls: /proc/sys/kernel/random/urandom_min_reseed_secs: Permission denied
ls: /proc/sys/kernel/random/uuid: Permission denied
ls: /proc/sys/kernel/random/write_wakeup_threshold: Permission denied
total 0
dr-xr-xr-x    1 root     root             0 Aug 19 11:06 .
dr-xr-xr-x    1 root     root             0 Aug 19 11:06 ..

and

cat /proc/sys/kernel/random/*

shows:

cat: can't open '/proc/sys/kernel/random/boot_id': Permission denied
cat: can't open '/proc/sys/kernel/random/entropy_avail': Permission denied
cat: can't open '/proc/sys/kernel/random/poolsize': Permission denied
cat: can't open '/proc/sys/kernel/random/read_wakeup_threshold': Permission denied
cat: can't open '/proc/sys/kernel/random/urandom_min_reseed_secs': Permission denied
cat: can't open '/proc/sys/kernel/random/uuid': Permission denied
cat: can't open '/proc/sys/kernel/random/write_wakeup_threshold': Permission denied

and

bash setupTermuxArch.sh sysinfo

returns:

setupTermuxArch.sh: line 392: /proc/sys/kernel/random/uuid: Permission denied
TermuxArch warning:  Script signal 1 generated!
setupTermuxArch.sh: line 232: tmpdir: unbound variable

I've been an arch and arch arm user for about a year but I'm still very green to chrooted and fakerooted environments. It seems from most errors that it's a permissions issue but the error I get from sysinfo seems to point to a syntax error in the bash script that doesn't exist.

@s73obrien
Copy link

s73obrien commented Aug 19, 2018

I'm having the same issue. Looks like it is related to termux/termux-app#299, as I am running Oreo as well.

@djrivington djrivington changed the title $ bash setupTermuxArch.sh broken $ bash setupTermuxArch.sh not working Aug 19, 2018
@s73obrien
Copy link

Changed the path in preptmpdir() to avoid using /proc/sys/kernel/random/uuid and it ran past that, but hangs up with some illegal character errors from curl down the line.

@djrivington
Copy link
Author

djrivington commented Aug 19, 2018

Thanks. Studying that issue now. I passed it over last night mistaking it to be unrelated.

@SDRausty
Copy link
Owner

@s73obrien This is related to a new function: preptmpdir() It's supposed to be a major improvement, and it appears that we have run into a hiccup on certain devices. More information regarding proc random is requested.

Can you $ ls -al /proc/sys/kernel/random/? What does $ cat /proc/sys/kernel/random/* give? Are the ROMs stock? A little bit more information is requested, including uname -a:

@s73obrien
Copy link

Sure thing!

$ ls -al /proc/sys/kernel/random
ls: cannot access '/proc/sys/kernel/random/boot_id': Permission denied
ls: cannot access '/proc/sys/kernel/random/entropy_avail': Permission denied
ls: cannot access '/proc/sys/kernel/random/poolsize': Permission denied
ls: cannot access '/proc/sys/kernel/random/read_wakeup_threshold': Permission denied
ls: cannot access '/proc/sys/kernel/random/urandom_min_reseed_secs': Permission denied
ls: cannot access '/proc/sys/kernel/random/uuid': Permission denied
ls: cannot access '/proc/sys/kernel/random/write_wakeup_threshold': Permission denied
total 0
dr-xr-xr-x 1 root root 0 Aug 19 12:36 .
dr-xr-xr-x 1 root root 0 Aug 19 12:36 ..
-????????? ? ?    ?    ?            ? boot_id
-????????? ? ?    ?    ?            ? entropy_avail
-????????? ? ?    ?    ?            ? poolsize
-????????? ? ?    ?    ?            ? read_wakeup_threshold
-????????? ? ?    ?    ?            ? urandom_min_reseed_secs
-????????? ? ?    ?    ?            ? uuid
-????????? ? ?    ?    ?            ? write_wakeup_threshold
$ cat /proc/sys/kernel/random/*
cat: /proc/sys/kernel/random/boot_id: Permission denied
cat: /proc/sys/kernel/random/entropy_avail: Permission denied
cat: /proc/sys/kernel/random/poolsize: Permission denied
cat: /proc/sys/kernel/random/read_wakeup_threshold: Permission denied
cat: /proc/sys/kernel/random/urandom_min_reseed_secs: Permission denied
cat: /proc/sys/kernel/random/uuid: Permission denied
cat: /proc/sys/kernel/random/write_wakeup_threshold: Permission denied

Stock Android 8 on Galaxy S9

$ uname -a
Linux localhost 4.9.65-13087505 #1 SMP PREEMPT Wed Feb 28 18:50:17 KST 2018 aarch64 Android

@s73obrien
Copy link

So I uninstalled curl in order to force the script to use wget, and it downloaded with no issues. Unpacking now....

@s73obrien
Copy link

Aside from a handful of download errors from updating the pacman database, it seems to have installed correctly. (well, I got a prompt, anyway)

@djrivington
Copy link
Author

djrivington commented Aug 19, 2018

@s73obrien Very cool. What did you change the path to in preptmpdir()?

@SDRausty
Copy link
Owner

This issue is resolved. tmp="$(date +%s)" tmp is now set to date, not uuid. Thank you for your time and help. Any idea why uuid is not readable on some devices? I am curious about the rationale.

@djrivington
Copy link
Author

Working like a charm now after a refresh. Thank you!

@SDRausty
Copy link
Owner

You are welcome; thank you for confirming 🏌

@s73obrien
Copy link

I don't really know, but according to the conversation on termux/termux-app#299, sounds like Oreo brought tighter permissions around information related to currently running processes. I suppose that uuid generation can be considered a part of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants