Get sdcard directory by adb
2013-12-10 18:52
148 查看
解决方案:
原文连接:http://stackoverflow.com/questions/9374628/get-sdcard-directory-by-adb
adb shell echo $EXTERNAL_STORAGE
I am making an application, which pulls files(Saved by android app) from the device sdcard by adb. The problem is that different devices, have various sdcard directories i.e: sdcard sdcard/external_sd Firstly I invented following solution: run adb shell ls Check if dir "sdcard" exists If yes run sdcard/ ls and check if external_sd exists return value. But the problem is that I have two samsung devices GT-I9100and GT-I9000and both have a directory sdcard/external_sd. When I am checking System.getenv("EXTERNAL_STORAGE")one returns sdcardand another sdcard/external_sd. I need to pull file which was previously saved to System.getenv("EXTERNAL_STORAGE"). EDIT: Found the solution: adb shell echo $EXTERNAL_STORAGE |
相关文章推荐
- 控制台ADB 命令安装apk到手机sdcard及安装qq过程中问题:: to '/sdcard/tmp/': Is a directory解决
- Do not hardcode "/sdcard/"; use Environment.getExternalStorageDirectory().ge
- 博客、帮助文档-从Android模拟器sdcard中导出文件-by小雨
- Android:使用命令行工具adb、mksdcard等
- 【Android】adb mount挂载sdcard,删除垃圾app
- Android中sdcard和adb命令的使用
- 模拟器找不到sdcard,Environment.getExternalStorageState()=removed
- 使用adb命令对手机进行截屏保存到电脑,SDCard
- get external sdcard status using java reflection
- 【转】使用adb命令对手机进行截屏(截图)保存到电脑,SDCard
- 如何使用adb命令将应用程序安装到sdCard中
- Adroid: getExternalStorageDirectory 不一定是你想要的外部存储SdCard
- 使用adb命令对手机进行截屏保存到电脑,SDCard
- android java.io.IOException: Parent directory of file is not writable: /sdcard/...
- 使用adb命令对手机进行截屏保存到电脑,SDCard
- 500 OOPS: cannot change directory 500 OOPS: priv_sock_get_cmd Connection closed by remote host.
- android adb与sdcard
- Android:使用命令行工具adb、mksdcard等
- 使用adb命令对手机进行截屏保存到电脑,SDCard
- adb push 上传文件到sdcard文件出现readonly的解决方法