如何复制保存在/data/data/com.sai.myproj/files/a.txt一个文件中的Andr​​oid到res文件夹

问题描述:

我有存储在/data/data/com.sai.myproj/files/a.txt。这文件是我创建并写数据的文件,它存储在数据/数据​​/ com.sai.myproj /文件/ A.TXT其可以使用DDMS的文件资源管理器中查看。如何将这个文件从那里复制到res文件夹,因为我需要分析这个文件。搜索结果
谁能帮我整理出这个问题。结果

I have a file stored in /data/data/com.sai.myproj/files/a.txt .This is the file I created and wrote data, it was stored in data/data/com.sai.myproj/files/a.txt which can be viewed using FileExplorer of DDMS. How to copy this file from there to res folder as I need to parse this file .

Can anyone help me in sorting out this issue.

在预先感谢

据我所知一个安装的应用程序不能写自己的res文件夹

AFAIK an installed application cannot write to its own res folder

如果您想从一个设备复制到东西的项目源res文件夹,您可以使用adb工具,无论是从通过在命令行中使用程序的命令行脚本或.bat文件或部分使用所选语言的外壳exec函数您所选择的开发平台。

If you want to copy something from a device into the res folder of your project sources, you can use the adb tool, either from the command line by programmatic usage of the command line as part of a script or .bat file or using the shell exec function of your chosen language on your chosen development platform

请确保您在SDK完全安装和亚行可执行文件在路径或通过其全路径名引用它(即确保亚行的shell的作品)

Make sure you have the SDK fully installed and that the adb executable is in your path or reference it by its full path name (ie, make sure 'adb shell' works)