1. adb shell
2. cd sdcard/abc/config/
3. 导出文件:adb pull /data/abc/config/
4. start . 打开当前的文件位置找到abc.conf文件
5. 修改内容
6. adb push d:\abc.conf /data/abc/config/
7. adb shell
8. cat /data/abc/config/abc.conf 检查配置文件是否更新
9. sync 保存一次
执行第6步:adb push d:\abc.conf /data/abc/config/
若报错:failed to copy '' to '': Is a directory
则应 adb push d:\abc.conf /data/abc/config/abc.conf
ps:
public static String getRootPath() { if (Environment.MEDIA_MOUNTED .equals(Environment.getExternalStorageState())) { rootPath = Environment.getExternalStorageDirectory() .getAbsolutePath().toString(); Log.d(TAG, "getRootPath: rootPath = " + rootPath); } else { rootPath = "/data/data/"; } return rootPath; }
由getRootPath()得到的路径为:/storage/emulated/0/xxx/xxxx
映射到真实路径为:sdcard/xxx/xxx
来源:51CTO
作者:lyl0530
链接:https://blog.csdn.net/lyl0530/article/details/100936459