[英]Pull files from Android tablet for debugging purposes.
In school (high school), my partner and I are developing an Android tablet application. 在学校(高中),我和我的合作伙伴正在开发Android平板电脑应用程序。 We were both issued Acer Iconia A500 tablets to use. 我们都发布了Acer Iconia A500平板电脑使用。 I need to pull files created by our application on run-time off the device (adb pull), but because they are not rooted, and I wouldn't want to root school property, is there an effective way to remove files from an android device stored in your applications data/data/packagename/ area? 我需要在运行时将设备创建的文件拉出设备(adb pull),但因为它们没有root,我不想root学校属性,是否有一种有效的方法从android中删除文件存储在应用程序数据/数据/包名称/区域中的设备? We also did try the emulator, but have had numerous different problems with it, and when it does work, it takes about 4-5 minutes to upload an apk to it every time I change code and re-upload it. 我们也尝试过模拟器,但它有很多不同的问题,当它确实有效时,每次我更改代码并重新上传它时,上传一个apk大约需要4-5分钟。 Any ideas on a good way to get files off a non-rooted device, in this case a database I'm trying to copy from assets, so I can inspect it? 关于从非root设备上获取文件的好方法的任何想法,在这种情况下是我试图从资产中复制的数据库,所以我可以检查它?
If you have a choice, I'd definitely recommend writing your files to the SD card because that will be a lot easier to view and handle. 如果您有选择,我绝对建议您将文件写入SD卡,因为查看和处理起来会更容易。
If your file must necessarily be written in /data, what you could do is mirror it to the SD card for debugging purposes. 如果您的文件必须写入/ data,您可以做的是将其镜像到SD卡以进行调试。 So every time you write the file, you also write exactly the same content to the SD card (if the debug flag is on, otherwise no). 因此,每次编写文件时,您也会向SD卡写入完全相同的内容(如果调试标志打开,否则为no)。
If it's a file that is not being created by your code but by other code, what you can do in your app is copy it to the SD card when you detect that it's been changed. 如果它不是由您的代码创建的文件,而是由其他代码创建的文件,那么您在应用程序中可以执行的操作是在检测到它已被更改时将其复制到SD卡。
You could use the external storage permission and write to the SD Card instead. 您可以使用外部存储权限并写入SD卡。 Then you can pull them using the regular windows directory when you plug it in. Also, it should not take that long to update your code via the emulator, are you turning the emulator off every time? 然后,当你插入它时,你可以使用常规的Windows目录来拉它们。而且,通过模拟器更新代码不应该花那么长时间,你是不是每次关闭模拟器?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.