GNU bug report logs - #64445
30.0.50; Android: Emacs cannot access /storage/emulated/0 although other apps can

Previous Next

Package: emacs;

Reported by: Milan Zamazal <pdm <at> zamazal.org>

Date: Mon, 3 Jul 2023 20:13:02 UTC

Severity: normal

Found in version 30.0.50

Full log


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

From: Milan Zamazal <pdm <at> zamazal.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 64445 <at> debbugs.gnu.org
Subject: Re: bug#64445: 30.0.50; Android: Emacs cannot access
 /storage/emulated/0 although other apps can
Date: Fri, 18 Aug 2023 19:17:51 +0200
>>>>> "PL" == Po Lu <luangruo <at> yahoo.com> writes:

    PL> While I never did manage to locate the cause of this bug, two
    PL> new workarounds for it are now possible.

    PL> The first is to type:

    PL>   M-x android-request-storage-access

Just in case someone else reads this: It’s actually
android-request-directory-access.

    PL> and select the ``internal storage'' directory from the file
    PL> manager dialog displayed.  It will then appear under:

    PL>   /content/storage/com.android.externalstorage*

It works for me, thank you!

    PL> Mind that this form of file access is somewhat slow due to inept
    PL> programming by the Android developers:

    PL>   https://issuetracker.google.com/u/1/issues/293494717

    PL> which they have dismissed, since they are evidently incapable of
    PL> attaining even the most elementary levels of reading
    PL> comprehension, and consequent of being implemented in Java,
    PL> files within /content/storage will be inaccessible to
    PL> subprocesses.

Hmm, not very nice.

Another annoyance is the `primary:' component in the storage path as
Android doesn't like colons in paths and e.g. symlinking such a
directory doesn't work.  Is this name imposed by Android?

    PL> The second is to install Termux-enabled builds (see the README
    PL> in the Sourceforge repository for further details), in which
    PL> case any permissions you grant Termux will also be extended to
    PL> cover Emacs.

I haven't tested this, do you want me to test it?

Thanks,
Milan




This bug report was last modified 1 year and 306 days ago.

Previous Next


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