Android System App

System app 권한 추가.

AndroidManifest.xml에 sharedUserId 추가.

1
2
3
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ckbs.ywjung.btremocon"
android:sharedUserId="android.uid.system">

build/target/product/security에 있는 platform.pk8파일을 이용해 key파일 생성

1
2
3
4
$ openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.pem
$ openssl pkcs12 -export -in platform.x509.pem -inkey platform.pem -out platform.p12 -password pass:android -name androiddebugkey

$ keytool -importkeystore -deststorepass android -destkeystore platform.jks -srcstoretype PKCS12 -srcstorepass android -srckeystore platform.p12

app build.gradle 수정

android {} 맨 앞에 아래 내용 추가.

1
2
3
4
5
6
7
8
signingConfigs {
config {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('D:\\Android_Project\\BtRemoCon\\Keystore\\platform.jks')
storePassword 'android'
}
}

android {} buildTypes 수정

1
2
3
4
5
6
7
8
9
   buildTypes {
// release {
// minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// }
debug {
signingConfig signingConfigs.config
}
}
공유하기