GNU bug report logs - #79120
30.1; Emacs android can't execute programs in /system/bin (127)

Previous Next

Package: emacs;

Reported by: Theia <theia.j.ware <at> gmail.com>

Date: Tue, 29 Jul 2025 05:16:02 UTC

Severity: normal

Found in version 30.1

To reply to this bug, email your comments to 79120 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79120; Package emacs. (Tue, 29 Jul 2025 05:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Theia <theia.j.ware <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 29 Jul 2025 05:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Theia <theia.j.ware <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.1; Emacs android can't execute programs in /system/bin (127)
Date: Mon, 28 Jul 2025 13:16:15 -0700
With a fresh app install on Android 15+:
1. Launch emacs
2. M-x term, RET
3. Error is written in buffer *terminal*:

  Process terminal exited abnormally with code 127

When I first started using emacs on android I assumed this was normal
and immediately jumped to using emacs with termux. However, a number
of built-in packages (term, tramp, etc) assume that /system/bin/sh (or
other programs) are executable. I'm guessing this is some change in
security on Android's part, but it's unclear to me the exact issue.

I've tested this on my phone and in an emulator. I acquired the package
for this test from f-droid.

For what it is worth, /system/bin/sh can be called from termux on
Android 15+, so there must be some way to get it to work.


In GNU Emacs 30.1 (build 1, aarch64-unknown-linux-android22) of
 2025-02-27 built on bookworm
Repository revision: 8ac894e2246f25d2a2a97d866b10e6e0b0fede5a
Repository branch: HEAD
Windowing system distributor 'Google', version 35.0.0
System Description:
google/sdk_gphone64_x86_64/emu64xa:15/AE3A.240806.043/12960925:userdebug/dev-keys

Configured using:
 'configure --with-png=yes --with-webp=yes --with-gif=yes
 --with-jpeg=yes --with-xml2=yes --with-sqlite3=yes --with-gnutls=yes
 --with-tiff=yes --with-selinux=yes --with-modules=yes
 --with-tree-sitter=yes --with-imagemagick=no --with-lcms2=yes
 --with-mailutils= --with-pop=no-by-default --with-harfbuzz=yes
 --with-threads=yes --with-rsvg=yes --enable-check-lisp-object-type=
 'CFLAGS= -Werror=implicit-function-declaration''

Configured features:
GIF GMP GNUTLS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP THREADS TIFF TREE_SITTER WEBP ZLIB

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
term disp-table shell pcomplete ehelp comint subr-x ansi-osc ansi-color
ring rmc iso-transl tooltip cus-start cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
android-win term/common-win touch-screen ls-lisp tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads inotify android multi-tty
move-toolbar make-network-process emacs)

Memory information:
((conses 16 52478 20929) (symbols 48 6261 0) (strings 32 15983 2245)
 (string-bytes 1 365002) (vectors 16 11628)
 (vector-slots 8 122476 10946) (floats 8 27 2) (intervals 56 803 23)
 (buffers 992 14))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79120; Package emacs. (Tue, 29 Jul 2025 11:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 79120 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theia <theia.j.ware <at> gmail.com>,
 Po Lu <luangruo <at> yahoo.com>, waylandthrowaway <at> gmail.com
Cc: 79120 <at> debbugs.gnu.org
Subject: Re: bug#79120: 30.1;
 Emacs android can't execute programs in /system/bin (127)
Date: Tue, 29 Jul 2025 14:13:52 +0300
> From: Theia <theia.j.ware <at> gmail.com>
> Date: Mon, 28 Jul 2025 13:16:15 -0700
> 
> With a fresh app install on Android 15+:
> 1. Launch emacs
> 2. M-x term, RET
> 3. Error is written in buffer *terminal*:
> 
>   Process terminal exited abnormally with code 127
> 
> When I first started using emacs on android I assumed this was normal
> and immediately jumped to using emacs with termux. However, a number
> of built-in packages (term, tramp, etc) assume that /system/bin/sh (or
> other programs) are executable. I'm guessing this is some change in
> security on Android's part, but it's unclear to me the exact issue.
> 
> I've tested this on my phone and in an emulator. I acquired the package
> for this test from f-droid.
> 
> For what it is worth, /system/bin/sh can be called from termux on
> Android 15+, so there must be some way to get it to work.

Po Lu, could you perhaps look into this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79120; Package emacs. (Fri, 08 Aug 2025 06:13:01 GMT) Full text and rfc822 format available.

Message #11 received at 79120 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79120 <at> debbugs.gnu.org, Theia <theia.j.ware <at> gmail.com>,
 waylandthrowaway <at> gmail.com
Subject: Re: bug#79120: 30.1; Emacs android can't execute programs in
 /system/bin (127)
Date: Fri, 08 Aug 2025 14:12:36 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Theia <theia.j.ware <at> gmail.com>
>> Date: Mon, 28 Jul 2025 13:16:15 -0700
>> 
>> With a fresh app install on Android 15+:
>> 1. Launch emacs
>> 2. M-x term, RET
>> 3. Error is written in buffer *terminal*:
>> 
>>   Process terminal exited abnormally with code 127
>> 
>> When I first started using emacs on android I assumed this was normal
>> and immediately jumped to using emacs with termux. However, a number
>> of built-in packages (term, tramp, etc) assume that /system/bin/sh (or
>> other programs) are executable. I'm guessing this is some change in
>> security on Android's part, but it's unclear to me the exact issue.
>> 
>> I've tested this on my phone and in an emulator. I acquired the package
>> for this test from f-droid.
>> 
>> For what it is worth, /system/bin/sh can be called from termux on
>> Android 15+, so there must be some way to get it to work.
>
> Po Lu, could you perhaps look into this?


Theia, could you test a build from the Emacs 31 branch, where the
executable loader has been adapted to the version of the runtime link
editor included in Android 15 and 16?  If the issue is not present
there, I shall backport it to Emacs 30 hopefully with plenty of time to
spare till the next release.

  https://sourceforge.net/projects/android-ports-for-gnu-emacs/files




This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.