In the AndroidManifest.xml of your application: under the element, add the attribute android:sharedUserId="android.uid.system".
Export an unsigned version of your Android application using Eclipse: right-click on the project >> Android Tools >> Export Unsigned Application Package.
Use /out/host//framework/signapk.jar to sign your app using platform.x509.pem and platform.pk8 in /build/target/product/security generated earlier: