From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Milan Zamazal Newsgroups: gmane.emacs.bugs Subject: bug#64445: 30.0.50; Android: Emacs cannot access /storage/emulated/0 although other apps can Date: Wed, 05 Jul 2023 11:44:39 +0200 Message-ID: <87h6qig0ag.fsf@zamazal.org> References: <87zg4c92l4.fsf@zamazal.org> <87a5wcsdpg.fsf@yahoo.com> <871qhohziz.fsf@zamazal.org> <87lefwqdsy.fsf@yahoo.com> <87ttukgiwh.fsf@zamazal.org> <871qhnp4sd.fsf@yahoo.com> <87pm56g5zl.fsf@zamazal.org> <87lefuokkt.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13311"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: 64445@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 05 11:45:34 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qGz4n-0003Eo-9L for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jul 2023 11:45:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGz4R-00074Q-2U; Wed, 05 Jul 2023 05:45:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGz4J-00073Q-He for bug-gnu-emacs@gnu.org; Wed, 05 Jul 2023 05:45:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGz4I-0001Iu-JB for bug-gnu-emacs@gnu.org; Wed, 05 Jul 2023 05:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGz4H-0005mv-S3 for bug-gnu-emacs@gnu.org; Wed, 05 Jul 2023 05:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Milan Zamazal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jul 2023 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64445 X-GNU-PR-Package: emacs Original-Received: via spool by 64445-submit@debbugs.gnu.org id=B64445.168855028622210 (code B ref 64445); Wed, 05 Jul 2023 09:45:01 +0000 Original-Received: (at 64445) by debbugs.gnu.org; 5 Jul 2023 09:44:46 +0000 Original-Received: from localhost ([127.0.0.1]:37122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGz42-0005mA-GH for submit@debbugs.gnu.org; Wed, 05 Jul 2023 05:44:46 -0400 Original-Received: from petrel.zamazal.org ([37.205.9.215]:58272 helo=zamazal.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGz3z-0005m0-DH for 64445@debbugs.gnu.org; Wed, 05 Jul 2023 05:44:44 -0400 DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=zamazal.org; s=ed25519; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N3YXoiWyE5xU3guyzSnGI4rGDGOMpEqsWdlk0NIfRxI=; b=v5xeQLvFoa5MtRI44j5Gaznr7O ispGWhcUiI0IkUuukbgZ7lgRLO/GzBlx5MQ/QP/8vQgxl8uz+yNjgzrqstBw==; Original-Received: from cst-prg-100-231.cust.vodafone.cz ([46.135.100.231] helo=finch) by zamazal.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qGz3w-000BdE-1v; Wed, 05 Jul 2023 11:44:41 +0200 In-Reply-To: <87lefuokkt.fsf@yahoo.com> (Po Lu's message of "Wed, 05 Jul 2023 15:59:14 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264623 Archived-At: >>>>> "PL" =3D=3D Po Lu writes: PL> Milan Zamazal writes: >> W org.gnu.emacs: type=3D1400 audit(0.0:910): avc: denied { read } >> for comm=3D456D616373206D61696E2074687265 name=3D"/" dev=3D"dm-0" in= o=3D2 >> scontext=3Du:r:untrusted_app:s0:c157,c256,c512,c768 >> tcontext=3Du:object_r:rootfs:s0 tclass=3Ddir permissive=3D0 PL> Right... how exactly are you trying to access /sdcard? Through PL> Dired? Yes, for example: =E2=80=98C-x C-f /sdcard/ RET=E2=80=99 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 =E2=80=98M-x shell=E2=80=98 and for example = =E2=80=98cat=E2=80=99 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.