如何复制和Android的壳编辑文件?编辑、文件、Android

2023-09-04 03:21:35 作者:一季凄凉。

Android的壳不具备 CP 命令。 Android的外壳也没有 SED 或的grep 或六。我没有亚洲开发银行守护程序可用。有 MV 命令,但它拒绝工作,如果源是一个只读设备上。

在做什么,如果我不得不从递归只读设备复制一些目录? 如何更改行的文本文件(如PATH = /缓存是PATH =到/ mnt / ASEC)? 解决方案

最常见的问题的答案是简单的:捆绑一些应用程序(?busybox的)与您的APK(假设你想在应用程序中使用它)。据我所知,在/ data分区未安装NOEXEC,即使你不希望部署一个完全成熟的APK,你可以修改ConnectBot来源,以建立一个APK了一组命令行工具包括在内。

有关命令行工具,我推荐使用的crosstool-NG,建设了一套静态链接的工具(对uClibc的链接)。他们可能是很大的,但他们肯定会工作。

The Android shell does not have the cp command. Android shell also has no sed or grep or vi. I have no adb daemon available. There is mv command but it rejects to work if source is on a read-only device.

What to do if I have to copy some directories from read-only device recursively? How to change a line in a text file (e.g. "PATH=/cache" to be "PATH=/mnt/asec") ? 怎么把自己编辑的word文档变成不能在粘贴复制的文档

解决方案

The most common answer to that is simple: Bundle few apps (busybox?) with your APK (assuming you want to use it within an application). As far as I know, the /data partition is not mounted noexec, and even if you don't want to deploy a fully-fledged APK, you could modify ConnectBot sources to build an APK with a set of command line tools included.

For command line tools, I recommend using crosstool-ng and building a set of statically-linked tools (linked against uClibc). They might be big, but they'll definitely work.