简体   繁体   English

从Android平板电脑中提取文件以进行调试。

[英]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.

相关问题 我在教程后写了一个witre / read android应用程序,但为了我的目的改变了一些东西。 应用程序启动时会崩溃 - I wrote a witre/read android app following a tutorial, but changed some stuff for my purposes. The app crashes right when it starts 线程被禁用以进行线程调度。 这意味着什么? - Thread becomes disabled for thread scheduling purposes. What does that mean? android测试HttpPost字符串以进行调试 - android testing HttpPost string for debugging purposes 通过USB进行的Android调试不适用于WM6850平板电脑 - Android Debugging by USB not working with WM6850 Tablet 用于调试目的的简单Java警报 - Simple Java alert for debugging purposes 有没有一种简单的方法可以在Android Studio的“设计”标签中显示视图和视图组的边框,以进行调试和样式设置? - Is there an easy way to show borders around Views and ViewGroups in the design tab of Android Studio for debugging and styling purposes? JNI:如何获取方法签名以进行调试 - JNI: How to get method signature for debugging purposes CXF中是否有一种方法可以禁用SoapCompressed标头以进行调试? - Is there a way in CXF to disable the SoapCompressed header for debugging purposes? 在 Java 中打印用于调试目的的唯一对象标识 - Printing unique object identity for debugging purposes in Java 在 Intellij/Android Studio 中调试 Gradle 构建文件 - Debugging Gradle build files in Intellij / Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM