Closed lainiwa closed 3 years ago
Thanks so much for reporting this with all the most useful details. I shall work on a fix as soon as possible, and perhaps you can help me to test it out.
I just put what should be a one-line fix on the android
branch of this repo, but I don't have Android handy -- could you give it a try? Many thanks.
Comparing $OSTYPE
with linux-android
is not a very robust way of detecting Android OS. $OSTYPE
tells you about the build environment rather than the execution environment, and they aren't always the same. E.g., you can run Zsh compiled against musl libc on Android just fine, which normally would have OSTYPE
set to linux-musl
.
Since what you really care about is /proc/version
being readable, it's a good idea to check that directly.
The android branch (0b6256e) is working for me.
However, given what @romkatv commented, I guess you might want to reconsider handling this as a special case? If you do -- I will then also check it against android's hardened /proc
to see it is working.
Thanks, @romkatv. I think I'll have to spin up Android in a VM and do this properly.
@lainiwa, I'm glad I've got something working for you for the time being. I'll try to have something permanent soon (I'm getting used to new eyeglasses, so I'm pacing myself).
@lainiwa, I did what @romkatv suggested. Please give the android
branch another pull and confirm that it works. Thanks!
Working great! Thanks for fixing the issue!
If it's all right, I'll reopen this issue just until I've merged the new code into the master
branch. I'll let you know when that's done.
All right - the bug fix is now part of release v3.8.1 on the master branch. Thanks again for raising this issue.
On Android >7 (?) the access to
/proc
seems to be partly restricted by SELinux. This leads to error being printed when using prompt on termux (OSTYPE=linux-android
):