From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Milan Zamazal <pdm@zamazal.org>
Cc: 64445@debbugs.gnu.org
Subject: bug#64445: 30.0.50; Android: Emacs cannot access /storage/emulated/0 although other apps can
Date: Wed, 05 Jul 2023 20:21:29 +0800 [thread overview]
Message-ID: <878rbuo8fq.fsf@yahoo.com> (raw)
In-Reply-To: <87h6qig0ag.fsf@zamazal.org> (Milan Zamazal's message of "Wed, 05 Jul 2023 11:44:39 +0200")
Milan Zamazal <pdm@zamazal.org> writes:
>>>>>> "PL" == Po Lu <luangruo@yahoo.com> writes:
>
> PL> Milan Zamazal <pdm@zamazal.org> writes:
> >> W org.gnu.emacs: type=1400 audit(0.0:910): avc: denied { read }
> >> for comm=456D616373206D61696E2074687265 name="/" dev="dm-0" ino=2
> >> scontext=u:r:untrusted_app:s0:c157,c256,c512,c768
> >> tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
>
> PL> Right... how exactly are you trying to access /sdcard? Through
> PL> Dired?
>
> Yes, for example: ‘C-x C-f /sdcard/ RET’
>
> PL> If so, my guess is that ls-lisp is trying to stat the root file
> PL> system, which is forbidden by some versions of Android. Would
> PL> you please enable debug-on-error (Options -> Enter Debugger on
> PL> Error) and display the backtrace from whatever file access
> PL> operation complains?
>
> It's this one:
>
> directory-files-and-attributes("/sdcard/" nil nil t string)
>
> I also tried what happens in ‘M-x shell‘ and for example ‘cat’ does the
> same:
>
> $ cat /sdcard/existent-file
> cat: /sdcard/existent-file: Permission denied
> $ cat /sdcard/non-existent-file
> cat: /sdcard/non-existent-file: No such file or directory
>
> This at least verifies that /sdcard points to the right location.
>
> The same happens in Termux if and only if I remove the given storage
> permission from it. But in Emacs, it happens whether the permission is
> given or not.
I think this should now be fixed. Prebuilts will be available in
approximately 20 minutes. Would you please test them and ack?
next prev parent reply other threads:[~2023-07-05 12:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 20:12 bug#64445: 30.0.50; Android: Emacs cannot access /storage/emulated/0 although other apps can Milan Zamazal
2023-07-04 0:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-04 8:05 ` Milan Zamazal
2023-07-04 8:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-04 8:50 ` Milan Zamazal
2023-07-05 0:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05 7:41 ` Milan Zamazal
2023-07-05 7:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05 9:44 ` Milan Zamazal
2023-07-05 12:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-07-05 13:35 ` Milan Zamazal
2023-07-06 0:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-06 7:30 ` Milan Zamazal
2023-08-18 4:13 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-18 17:17 ` Milan Zamazal
2023-08-19 0:13 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rbuo8fq.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=64445@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
--cc=pdm@zamazal.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).