更改设备上的临时目录位置 [英] Changing the temp directory location on device

查看:186
本文介绍了更改设备上的临时目录位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用托管-ADB或Madbee库在C#中访问亚洲开发银行。我正确收到的所有设备,并且可以从该设备访问的包和其他信息。然而,当我尝试安装使用device.installPackage()方法的APK,它返回FileNotFoundException异常。检查异常消息后,我才知道,它的访问设备上的 SD卡的/ tmp 的位置,这是我鼻涕访问,因为我的设备不具有一个SD卡。我试图找到一种方法来更改默认位置,但没有成功。

I am using Managed-ADB or Madbee library to access adb in C#. I am properly getting all the devices and can access the packages and other info from the device. However when I try to install any apk using device.installPackage() method, it returns FileNotFoundException. After checking the exception message, I got to know that it's accessing sdcard/tmp location on device, which i snot accessible, since my device doesn't have a sdcard. I am trying to find a way to change the default location, but with no success.

我想,这是考虑该位置从 TEMP_DIRECTORY_FOR_INSTALL 在设备类常量。我不认为有任何办法改变它的价值。有没有什么办法可以更改默认的临时目录访问一些诸如数据/本地/ TEMP

I suppose, It's taking that location from TEMP_DIRECTORY_FOR_INSTALL constant in Device class. I don't think there's any way to change it's value. Is there any way I can change the default temp directory to something accessible such as data/local/temp?

推荐答案

我必须下载源代码,更改恒 TEMP_DIRECTORY_FOR_INSTALL 的值,然后重新编译它。我不认为有任何其他方式。我选择了的/ mnt / SD卡/ tmp目录的位置,这是在我的所有设备的正常工作。

I had to download the source, change the value of constant TEMP_DIRECTORY_FOR_INSTALL and then recompile it. I don't think there was any other way. I chose /mnt/sdcard/tmp as location, which is working fine on all of my devices.

这篇关于更改设备上的临时目录位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆