Android的修改联系人应用程序的源$ C ​​$ C [英] Android modify the source code of contacts application

查看:129
本文介绍了Android的修改联系人应用程序的源$ C ​​$ C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,Android的是开源平台,

I Understand that Android it's open-source platform,

那么,有什么办法可以添加/修改默认的联系人应用程序,

So is there any way to add/modify the default Contacts application,

喜欢将它添加新的皮肤或新的选择?

like adding it new skin or new options ?

推荐答案

这很容易修改捆绑应用程序的源代码。

It's very easy to modify the source of a bundled application.

什么是不那么容易的构建和安装它,因为许可这两个原因,并因为许多捆绑的应用程序的使用功能,不支持的公共SDK的API(有时是由于历史原因,已经开发前的SDK发布)。

What's not so easy is to build and install it, for both reasons of permission and because many of the bundled apps use capabilities not supported in public SDK APIs (sometimes for historic reasons, having been developed before the SDK was released).

最直接的可能是从一个社区开发了一个官方ROM切换设备,下载完整的源代码的修改你喜欢什么,开始一个完整的Andr​​oid系统版本,外出吃饭,并安装完整的结果当你回家。问题的关键将利用已完成的社区ROM维护者提供货源,他们的安装版本完全匹配的工作,与此相反的AOSP源可以从安装厂商的版本有很大的差别(虽然你可能能够樱桃挑选一个pre-DEX-选择APK出的AOSP版本的结果,并成功地使用在供应商构建,如果证书不挡路)

Most straightforward may be to switch your device from an official ROM to a community developed one, download the full source for that, modify what you like, start a full android system build, go out to dinner, and install the complete result when you get home. The point would be leveraging the work that has been done by community rom maintainers to provide sources which exactly match their installed version, in contrast to the AOSP sources which can differ substantially from installed vendor versions (though you may be able to cherry pick one pre-dex-opt APK out of the result of an AOSP build and successfully use that on a vendor build, if certificates do not get in the way)

要使用SDK,而不是作为一个完整的系统构建的一部分,你可能需要作实质性修改来解决任何使用非公开的API重建一个捆绑的应用程序。理想的情况下仅使用正确的SDK的API,你会重新实现该功能;少最好你可以使用反射来寻找非公开依赖性在运行时,或者包括简单的什么也不做存根丢失的API在你的应用程序,它会被剥离(尽管有一个错误信息)在有利于非安装时-public真正的能力(希望)present兼容设备上。

To rebuild a bundled app using the SDK rather than as a part of a full system build, you may need to make substantial modifications to work around any use of non-public APIs. Ideally you would re-implement that functionality using only proper SDK APIs; less ideally you can use reflection to find non-public dependencies at runtime, or include simple "do-nothing" stubs for the missing APIs in your application which will be stripped (albeit with an error message) at install time in favor of the non-public real capabilities (hopefully) present on a compatible device.

您可能需要的,如果你想安装旁边原有的修改版本做一个包重新命名;你需要root /系统键来代替原来的安装。

You may need to do a package re-name if you want to install your modified version alongside the original; you would need root / system keys to install it in place of the original.

这篇关于Android的修改联系人应用程序的源$ C ​​$ C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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