简体   繁体   English

如何从Android模拟器中替换/卸载电子邮件应用程序

[英]How to replace / uninstall Email application from android emulator

Is there any way to uninstall/replace the inbuilt application in android emulator so that i can install my customized apps for Mail, Contacts, Music etc. 有没有办法卸载/替换Android模拟器中的内置应用程序,以便我可以安装我的邮件,联系人,音乐等自定义应用程序。

I have downloaded android 2.2 code for Email application and i want to modify certain things and install. 我已下载Android 2.2代码用于电子邮件应用程序,我想修改某些东西并安装。

Please let me know if there is any way. 如果有任何办法,请告诉我。

I have done this way: 我这样做了:

adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /data
rm /system/app/MyAppName.apk
rm -rf /data/data/package_name_here/
mount -o remount,ro -t yaffs2 /dev/block/mtdblock0 /system
mount -o remount,ro -t yaffs2 /dev/block/mtdblock1 /data
pm uninstall package_name_here
exit

Take care points : 照顾要点

You have to provide details of your application: 您必须提供申请的详细信息:

Line number 4: rm /system/app/ MyAppName.apk 第4行: rm / system / app / MyAppName.apk

Line number 5: rm -rf /data/data/ package_name_here / 第5行: rm -rf / data / data / package_name_here /

Line number 8: pm uninstall package_name_here 第8行: pm卸载package_name_here

Done 完成

There's no point in replacing the apps in /system while the emulator is running, since the emulator doesn't save /system anyway. 在模拟器运行时更​​换/system的应用程序毫无意义,因为模拟器无论如何都不会保存/system

In order to permanently replace apps in /system , one can edit the system.img file. 为了永久替换/system应用程序,可以编辑system.img文件。 It's quite easy really. 真的很容易。 As easy as extracting, moving files around, and compressing it back. 像提取,移动文件和压缩文件一样简单。

http://www.rodneybeede.com/Customize_an_Android_system_img.html http://www.rodneybeede.com/Customize_an_Android_system_img.html

Launch your emulator, then make sure it is connected via adb, by typing: 启动您的模拟器,然后输入以下内容确保通过adb连接:

adb -e devices

Make /system writable, by typing: 通过输入以下内容使/系统可写:

adb -e remount

Backup & remove Email.apk: 备份和删除Email.apk:

adb -e pull /system/app/Email.apk
adb -e rm /system/app/Email.apk

Push you own Email.apk: 推送你自己的Email.apk:

adb -e push Email.apk /system/app

That's about it. 就是这样。

所有我可以说的是,我也试图找到解决方案,但你可以尝试替代,尝试通过系统应用程序卸妆卸载不必要的应用程序,现在从市场安装类似于相同目的的应用程序,看看它是否工作相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM