HomeDevelopmentAndroid CoreApp & SharedUserId

[Android] CoreApp & SharedUserId

CoreApp & SharedUserId
CoreApp & SharedUserId

Android System App에서 주로 사용되는 CoreApp과 SharedUserId에 대해 알아본다.

AndroidManifest

Android Manifest 상단에 다음과 같이 작성되어 있는 App이 있는 경우가 있다.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    coreApp="true"
    package="com.test.example"
    android:sharedUserId="android.uid.system">

coreApp

coreApp="true"

 1. Core App만을 사용하는 부팅 모드를 이용 시 사용한다.(ex. 안전 모드)

 2. 안전 모드(Safe Mode)는 시스템 운영에 필요한 최소한의 프로그램만 작동하여 실행되는 부팅 모드이다.

 3. 보통 System은 다음의 frameworkes.apk, settingsProvider.apk, SystemUI.apk, DefaultContainerService.apk, Launcher2.apk와 같은 Core App들만 있어도 실행이 가능한데, 이와 같은 Core App에 해당 Application을 추가하기 위해서 AndroidManifest에 coreApp=true를 작성하여 사용한다.

android:sharedUserId

android:sharedUserId="android.uid.system"

 1. 해당 Application이 System Application으로 작동할 수 있도록 권한을 줄 때 사용한다.

 2. System Process와 같은 uid를 사용하여 해당 Code와 Data를 공유할 수 있도록 권한을 준다는 의미이다.

SharedUserId

 3. 안드로이드 개발자 문서를 보면 API 29 즉, Android 10 버전부터는 지원이 중단되었다고 한다.

참고(Reference)

 https://stackoverflow.com/questions/56099960/android-what-does-coreapp-means-in-the-manifest

 https://developer.android.com/guide/topics/manifest/manifest-element?hl=ko

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Read

Latest Post