Termux存储权限

发布于 2025-02-08 22:42:39 字数 221 浏览 3 评论 0原文

我一直在尝试使用此目录访问内部存储:

/storage/Code/workspace/try/css/index.scss

但是Termux告诉我bash

/storage/code/workspace/try/css/index.scss:否此类文件或目录。

如何解决此问题?

I have been trying to access my internal storage using this directory:

/storage/Code/workspace/Try/css/index.scss

But termux tells me bash:

/storage/Code/workspace/Try/css/index.scss: No such file or directory.

How can I fix this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风蛊 2025-02-15 22:42:39

您需要发行此命令termux-setup-storage

有关更多详细信息,请参见链接我希望它对您有用

You need to issue this command termux-setup-storage

For more details here's a link I hope it works for you

睡美人的小仙女 2025-02-15 22:42:39

您的问题是,您没有正确编写目录名称。如果您不知道内部存储名称或内部存储的根目录名称(ex:/storage/emulator/0可能在其他设备上有所不同),则可以找到使用此简单df命令,众所周知,Android的内部或外部存储位于/storege中,因此我们只能抓取或过滤该文件夹名称信息仅通过说 df | GREP Storage

✓ u0_axxx@localhost ~ $ df | grep storage
/dev/fuse                                        xxxxxxx xxxxxx  xxxxx  xx% /storage/emulated

此处/storage/emulation是内部存储的入口点,某些设备的目录名称为'/storage/amulation/emulation/0'。因此,您的目录应该像/storage/emulation/0/code/workspace/try/css/index.scss或可能不同。

您可以通过编写df命令来观看更多有关目录的信息:

✓ u0_axxx@localhost ~ $ df
Filesystem                                      1K-blocks    Used Available Use% Mounted on
/dev/block/dm-0                                   xxxxxx xxxxxx    xxxxxx  89% /
tmpfs                                              xxxxxx    xxxx    xxxxxx   1% /dev
tmpfs                                              xxxxx      xx    xxxxx   1% /mnt
/dev/block/dm-2                                  xxxxxx xxxxxx  xxxxxxx  11% /mnt/expand/7843497a-bd2b-40df-82ee-1eb72580c0f7
/dev/block/dm-1                                    xxxxxx  xxxxxx    xxxxxx  43% /vendor
tmpfs                                              xxxxx       0    xxxxxx   0% /apex
/dev/block/platform/bootdevice/by-name/userdata   xxxxxx xxxxx   xxxxx  82% /data
/dev/fuse                                        xxxxxx xxxxxx  xxxxx  xx% /storage/emulated

谢谢。

Your issue was, you didn't write directory name properly. If you don't know about your internal storage name or internal storage's root directory name (ex: /storage/emulator/0 which can be different on others devices) you can find that with this simple df command, and as we know that, android's internal or external storage is situated in /storage, so we can only grab or filter that folder name info only by saying df | grep storage

✓ u0_axxx@localhost ~ $ df | grep storage
/dev/fuse                                        xxxxxxx xxxxxx  xxxxx  xx% /storage/emulated

Here /storage/emulated is the internal storage's entry point and somtimes the directory name for some devices is '/storage/emulated/0'. So your directory should be somthing like, /storage/emulated/0/Code/workspace/Try/css/index.scss or maybe different for you.

You can watch more infos about your directories by writting the df command without any filter:

✓ u0_axxx@localhost ~ $ df
Filesystem                                      1K-blocks    Used Available Use% Mounted on
/dev/block/dm-0                                   xxxxxx xxxxxx    xxxxxx  89% /
tmpfs                                              xxxxxx    xxxx    xxxxxx   1% /dev
tmpfs                                              xxxxx      xx    xxxxx   1% /mnt
/dev/block/dm-2                                  xxxxxx xxxxxx  xxxxxxx  11% /mnt/expand/7843497a-bd2b-40df-82ee-1eb72580c0f7
/dev/block/dm-1                                    xxxxxx  xxxxxx    xxxxxx  43% /vendor
tmpfs                                              xxxxx       0    xxxxxx   0% /apex
/dev/block/platform/bootdevice/by-name/userdata   xxxxxx xxxxx   xxxxx  82% /data
/dev/fuse                                        xxxxxx xxxxxx  xxxxx  xx% /storage/emulated

Thanks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文