如何复制和Android的壳编辑文件? [英] How to copy and edit files in Android shell?

查看:132
本文介绍了如何复制和Android的壳编辑文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

  1. 在做什么,如果我不得不从递归只读设备复制一些目录?
  2. 如何更改行的文本文件(如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.

  1. What to do if I have to copy some directories from read-only device recursively?
  2. How to change a line in a text file (e.g. "PATH=/cache" to be "PATH=/mnt/asec") ?

解决方案

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.

这篇关于如何复制和Android的壳编辑文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆