I am currently working on an Android AOSP project for which I am developing a java module which will be a part of the core services (such as the Phone app, for example).
There are some frameworks I use which are not exposed by default to "regular" apps (which lay in the private framework.jar).
For example: There are places I directly use android.app.IActivityManager's Binder API.
I do own the platform keys, but I not prefer compiling the whole AOSP framework each time I want to make a change.
I also prefer working with Android Studio, but will compromise on compiling the application through the terminal, if not possible.
What is the correct way of working on a project of this kind?
How do AOSP's developers develop their code without re-compiling the whole framework each time?
Update:
The best way I've found so far is to simply create an android studio project, get the framework.jar from the device (adb pull /system/framework/framework.jar) or from the AOSP source code, and add it as a compileOnly or runtimeOnly dependency in the gradle.build file of your app.
dependencies {
compileOnly files('libs/framework.jar')
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
Then just add android:sharedUserId="android.uid.system" to the Android Manifest and compile it using the platform keys.
It should be installable as is.
This post seems to sum it up pretty good: https://kwagjj.wordpress.com/2017/10/27/building-custom-android-sdk-from-aosp-and-adding-it-to-android-studio/comment-page-1/
Is there any other way?