我买了我的第一部 Android 手机 Sony Xperia M,却没有意识到我们无法将应用程序移动到外部 sd 卡的问题。有关详细信息,请参阅此链接。
索尼建议的唯一一件事是根设备、分区并使用第三方应用程序来移动它。他们还提到生根可能会使保修失效。
下面列出了我的 Sony Xperia M 的 Android 详细信息
Model number C1904
Android version 4.1.2
Build number 15.1.C.2.8
我尝试从某个论坛运行以下命令,但它对我不起作用,
adb devices
adb shell pm get-install-location
adb shell pm set-install-location 2
虽然上述命令没有提示任何错误,但我可以将安装位置设为 2(使用 adb shell pm get-install-location)。所以我相信它已经正确设置了。但后来我尝试安装一些应用程序,它只安装在内部存储器中。
我尝试了“ apps2sd ”实用程序来移动我的应用程序,它显示以下错误,
'The device does not have a real primary external storage, or the primary external storage is emulated. Moving app to SD function cannot be supported by this device.'
最后从另一个论坛,我了解到我们可以通过'adb install'命令安装apk文件直接安装到sd卡中,如下所示,
adb install -s C:\com.furkan0gul.mvanparking.apk
上述命令失败并出现此错误,
3531 KB/s (13523837 bytes in 3.740s)
pkg: /sdcard/tmp/com.furkan0gul.mvanparking.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
我的外部卡中有足够的空间(总 8GB 内存中超过 6GB)。您可以使用以下命令找到它,
>adb shell df
Filesystem Size Used Free Blksize
/dev 402M 64K 402M 4096
/mnt/asec 402M 0K 402M 4096
/mnt/obb 402M 0K 402M 4096
/system 1183M 907M 275M 4096
/cache 246M 4M 241M 4096
/persist 3M 80K 3M 4096
/firmware 63M 43M 19M 16384
/data 2101M 1401M 700M 4096
/lta-label 15M 4M 10M 4096
/storage/sdcard0 2101M 1401M 700M 4096
/storage/sdcard1 7572M 1088M 6483M 32768
如果我在没有“-s”开关的情况下运行adb install 命令,它可以在内部内存中正常安装,没有任何问题,如下所示,
> adb install C:\com.furkan0gul.mvanparking.apk
2549 KB/s (13523837 bytes in 5.180s)
pkg: /data/local/tmp/com.furkan0gul.mvanparking.apk
Success
在安装到 sd 卡时,应用程序似乎安装在“/sdcard”中,但在“df”命令输出中没有安装这样的东西。还尝试通过 google搜索此“ INSTALL_FAILED_INSUFFICIENT_STORAGE ”。他们中的大多数人要求在模拟器中进行一些更改以完成此操作。我已经卸载了该应用程序,重新启动了设备并尝试再次安装到 sd 卡中,但由于同样的存储不足错误而无法正常工作。
我没有使用模拟器。我只是直接将apk安装到我的sd卡中。我不想根设备并取消保修优惠。
感谢有人可以就此提出您的想法。