Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this questionI 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.
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).
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)
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.
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.
精彩评论