more than nexus, better than nexus

40
AOSP로 넥서스 보다 더 넥서스처럼 만들기 More than Nexus, Better than Nexus.

Upload: young-ho-cha

Post on 28-Jan-2018

584 views

Category:

Software


5 download

TRANSCRIPT

Page 1: More than nexus, better than nexus

AOSP로 넥서스 보다더 넥서스처럼 만들기

More than Nexus, Better than Nexus.

Page 2: More than nexus, better than nexus

Nexus 4 (2012)

● Android 4.2 (2012)● Android 4.3● Android 4.4 (2013)● Android 5.0 (2014)● Android 5.1

● Android 6.0 (2015)

Image Source

Page 4: More than nexus, better than nexus

그런데 빌드를 끝내고 나면....

Page 6: More than nexus, better than nexus

Agenda ● What is Android Open Source Project?

● Following Nexus

● More than Nexus, Better than Nexus

Page 7: More than nexus, better than nexus

What isAndroid Open Source Project?

Page 9: More than nexus, better than nexus

How to build

Android Source code Downloading and Building

Page 10: More than nexus, better than nexus

Nexus Series제조사 제품 이름 hardware product

Huawei Nexus 6P angler? ?

LG Nexus 5X bullhead bullhead

Motorola Nexus 6 shamu shamu

LG Nexus 5 hammerhead hammerhead

ASUS Nexus 7(2013) flo, deb flo, deb

LG Nexus 4 mako mako

Samsung Galaxy Nexus tuna maguro,toro

Samsung Nexus S herring crespo

Page 12: More than nexus, better than nexus

Nexus Series제조사 제품 이름 hardware product Nexus branded product

Huawei Nexus 6P angler? ? ?

LG Nexus 5X bullhead bullhead bullhead

Motorola Nexus 6 shamu shamu shamu

LG Nexus 5 hammerhead hammerhead heammerhead

ASUS Nexus 7(2013) flo, deb flo, deb razor, razorg

LG Nexus 4 mako mako occam

Samsung Galaxy Nexus tuna maguro,toro yakju,takju,mysid

Samsung Nexus S herring crespo soju

Page 13: More than nexus, better than nexus

mako occam

Page 14: More than nexus, better than nexus

무엇부터 시작해야 하나?

Following NexusBe copycat

Page 16: More than nexus, better than nexus

system/app:BackupTestApp Development HTMLViewer PicoTtsBasicDreams DevelopmentSettings KeyChain PrintSpoolerBrowser DocumentsUI LatinIME ProtipsCalculator DownloadProviderUi LegacyCamera QuickSearchBoxCalendar Email LiveWallpapersPicker SdkSetupCaptivePortalLogin EmulatorSmokeTests Music SoundRecorderCertInstaller Exchange2 NetSpeed UserDictionaryProviderCustomLocale Fallback OpenWnn webviewDeskClock Gallery PacProcessor

system/app:BasicDreams DMAgent GoogleContactsSyncAdapter MapsBluetooth DocumentsUI GoogleEars MediaShortcutsBluetoothMidiService DownloadProviderUi GoogleHindiIME Music2Books Drive GoogleHome NewsstandStubCalculatorGoogle EditorsDocsStub GooglePinyinIME 중간 생략CalendarGooglePrebuilt EditorsSheetsStub GoogleTTS VideosCaptivePortalLogin EditorsSlidesStub Hangouts WalletCertInstaller FaceLock KeyChain WebViewGoogleChrome FitnessPrebuilt KoreanIME YouTubeCloudPrint2 GoogleCamera LatinImeGoogle talkback

Page 17: More than nexus, better than nexus

앱 대응 테이블

Emulator (AOSP) Nexus 5

Browser Chrome

Calculator CalculatorGoogle

Dialer GoogleDialer

LegacyCamera GoogleCamera

Music Music2

Launcher3 GoogleHome

webview WebViewGoogle

Page 18: More than nexus, better than nexus

Android의숨겨진 심장

Page 19: More than nexus, better than nexus

GAPPS

Collection of Google Mobile Services and Apps

Search Gapps on Google

Page 21: More than nexus, better than nexus

각종 상수 및 기본 설정값

● /root/default.prop● /system/build.prop● /system/framework/framework-res.apk● /system/priv-app/SettingsProvider.apk● /system/priv-app/Settings.apk● /system/priv-app/SystemUI.apk● /system/priv-app/TeleService.apk

Page 22: More than nexus, better than nexus

aapt

● Android Asset Packaging Tool● 다음 명령어로 .apk 파일에 포함된 리소스 분석 가능

$ aapt d --values resources framework-res.apk

spec resource 0x01040029 android:string/default_sms_application: flags=0x00000000

resource 0x01040029 android:string/default_sms_application: t=0x03 d=0x00001e00 (s=0x0008 r=0x00)

(string8) "com.android.mms"

Page 23: More than nexus, better than nexus

수정 전략

● 안드로이드 기본 빌드 스크립트를 이용해 factory image 생성

● 유지 보수가 가능○ bug fix 또는 major 업그레이드가 되었을 때 따라가기 편해야 한다.

● 결론

○ 원래 코드는 되도록이면 건드리지 말자

○ 수정하고 싶으면 원래 코드 바깥에서 건드리자

Page 25: More than nexus, better than nexus

상수 교체 (system property)

PRODUCT_PROPERTY_OVERRIDES := \

ro.com.android.dataroaming=false \

Page 26: More than nexus, better than nexus

Resource 교체

기본 리소스:

frameworks/base/core/res/res/values/config.xml /drawable-mdpi/ic-search.png

특정 기기용 리소스:

device/lge/occam/overlay/frameworks/base/core/res/res/

Page 27: More than nexus, better than nexus

Resource 교체

PRODUCT_PACKAGE_OVERLAYS := \

device/lge/occam/overlay

out-occam-user/host/linux-x86/bin/aapt package blahblah -S device/lge/occam/overlay/frameworks/base/core/res/res -S device/lge/mako/overlay/frameworks/base/core/res/res -S frameworks/base/core/res/res

Page 28: More than nexus, better than nexus

앱 교체

include $(CLEAR_VARS)

LOCAL_MODULE := Chrome

LOCAL_SRC_FILES := com.android.chrome.apk

LOCAL_MODULE_CLASS := APPS

LOCAL_MODULE_TAGS := optional

LOCAL_OVERRIDES_PACKAGES := Browser

LOCAL_CERTIFICATE := PRESIGNED

LOCAL_MODULE_OWNER := google

include $(BUILD_PREBUILT)

Page 29: More than nexus, better than nexus

앱 교체

PRODUCT_PACKAGES := \

Chrome \

Page 30: More than nexus, better than nexus

빌드 시작

Page 31: More than nexus, better than nexus

빌드 끝

Page 32: More than nexus, better than nexus
Page 33: More than nexus, better than nexus

More than Nexus,Better than Nexus.

Page 34: More than nexus, better than nexus

Unlock hidden feature.

Page 39: More than nexus, better than nexus

Conclusion

● You can build your own Real Nexus image without modification source codes on AOSP.

● You can unlock or add several features, and improve your experiences

Page 40: More than nexus, better than nexus

References

● http://s.android.com/● How to build Android Marshmallow on Nexus 4● https://github.com/ganadist/device_lge_mako● https://github.com/ganadist/device_lge_occam● https://github.com/ganadist/gms_addon/tree/android-6.0.0_r1