Reputation: 470
I have been able to build AOSP. However, I'm trying to add this app to AOSP and build it with mm ghetto-unlock but I am getting errors that symbols cannot be found and @Override methods aren't overriding anything. I'm fairly certain the problem is that the app isn't binding with the right libraries or APIs but I'm not sure what I'm doing wrong. Any help would be greatly appreciated.
Upvotes: 0
Views: 1608
Reputation: 2351
First make sure you have these libraries: libs/sc-light-jdk15on-1.47.0.2.jar libs/scprov-jdk15on-1.47.0.2.jar
The Override problem is that the AOSP master branch has changed TrustAgentService's method "onSetTrustAgentFeaturesEnabled" to "onConfigure", comparing with lollipop release branch.(lollipop, master)
So modify GhettoTrustAgent.java as bellow, it should build with no error.
import android.os.PersistableBundle;
import java.util.List;
......
//@Override
//public boolean onSetTrustAgentFeaturesEnabled(Bundle options) {
// Log.v(TAG, "Policy options received: " + options.getStringArrayList(KEY_FEATURES));
//
// return true; // inform DPM that we support it
//}
@Override
public boolean onConfigure(List<PersistableBundle> options) {
return true; // inform DPM that we support it
}
......
To make it a system app and pack it in the system.img.
Android.mk, change these two lines as this:
Create a new file named proguard.flags, and its content:
Modify the layout file, all android:text should be localized, like this android:text="@string/string_name"
Modify [aosp_root]/build/target/product/full_base.mk, add your package name there:
That's all. Now build it with mm/mmm, it should be installed in system/app, and it should be packed in the system.img when running a full build with make.
Upvotes: 5