问题
I know that some methods and some classes that are implemented in Android are not exported to the Android public SDK. I've been able to create an application that uses some of these functions by compiling my application placing it inside the Android tree. Would it be possible to export these functions to the Android SDK by recompiling it from the sources? How can this be done? Can I include custom classes and functions in the Android SDK as well (supposing of course I create a new SDK and a new firmware)? Thanks!
回答1:
I didn't try it, but this should be the answer to my question: https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_SDK.txt.
回答2:
It is possible to download the SDK and make changes to it.
If you are releasing a public app, you should not use any non-public API's as there are no guarantees they will be available on all phones, or in future versions of OS.
来源:https://stackoverflow.com/questions/4727032/modifying-and-recompiling-the-android-sdk