There are two ways to solve the problem:
First Kind
If you repo sync the entire source of Android, then you can put your app directly under/packages/apps to MM, but remember to add local_certificate attribute in android.mk, this attribute has three specific Value:
All APK that use Android.uid.system as the shared UID in the system will first add android:shareduserid= "Android.uid.system" to the manifest node and then android.mk Add Local_certificate: = platform. You can see Settings, etc.
All APK that use android.uid.shared as the shared UID in the system will add android:shareduserid= "android.uid.shared" to the Manifest node, and then Android.mk Add Local_certificate: = Shared. You can see Launcher, etc.
All APK that use Android.media as the shared UID in the system will add android:shareduserid= "Android.media" to the manifest node and then increase android.mk in Local_ Certificate: = media. You can see Gallery and so on.
Second Kind
Of course, not everyone has the opportunity, or it is necessary to download the entire source. Simply, when you use the IDE to make a apk, you can go to/build/tools/signapk/to find Signapk.jar files, and then go to/build/target/product/security/to find platform.pk8, pl Atform.x509.pem these two documents. Throw them together with your apk into a folder, and then CD to the folder to execute Java-jar signapk.jar platform.x509.pem platform.pk8 origin.apk, get signed.apk PK can direct adb install.