android

[android] 부팅시 Receiver 디버깅 하는 방법

tbMaster 2020. 12. 6. 20:54
반응형

안드로이드에서 부팅 시 앱에서 처리할 내용이 있었다. 디버깅을 하고 싶은데 방법을 찾다가 adb 를 이용해서 처리하는 방법을 찾아 기록해본다. 

 

 

방법)

>adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -n [PACKAGE_NAME]/[RECEIVER_CLASS_NAME]

 

ex)

action : android.intent.action.BOOT_COMPLETED

package name : com.example.app

boot receiver class name : BootReceiver

> adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -n com.example.app/.BootReceiver

반응형
댓글수0