2017년 1월 29일 일요일

android 에서 toast 팝업을 누가(어떤 앱이) 호출 했는지 찾기 dumpstate 이용

아래 내용은 일부 android device에 제한된 내용일 수 있습니다.

dumptstate로그 획득하기

로그를 일단 획득해야 합니다.
http://android.stackexchange.com/questions/51733/how-to-get-dumpstate-logs-in-samsung-galaxy-grand

ADB가 있을때


adb shell dumpstate > dumpstate.log


삼성 device인 경우


1) Open the Phone app in your device and type: *#9900#

2) Depending on how much detailed logs you would like to get change Debug Level and Silent log options (by default Debug Level is Disabled/LOW and Silent Log is turned Off)

3) Click on Run dumpstate/logcat/modem log (should be first option) wait until process finishes

4) Click Copy to sdcard(include CP Ramdump). This is important step because by default collected logs will be stored in /data/log directory, which is under root permissions so you can't access to it without root permissions

5) Your logs will be stored in /log directory on your DEVICE STORAGE.(this means that you don't need root access to find it just use file manager).


로그에서 TOAST_WINDOW 검색하기

참고로 아래 로그는 S7 M OS 에서의 로그입니다.
time 정보가 있는데 time 정보를 보고 해당 line 근처를 보면 패키지명이 나옵니다.

Line 257763:     Op TOAST_WINDOW:
Line 257864:       TOAST_WINDOW: mode=0; time=+4d8h0m52s671ms ago; duration=+2s86ms
Line 257897:       TOAST_WINDOW: mode=0; time=+9d21h9m45s825ms ago; duration=+1s713ms
Line 257913:       TOAST_WINDOW: mode=0; time=+320d5h8m2s545ms ago; duration=+2s419ms
Line 257919:       TOAST_WINDOW: mode=0; time=+28d11h47m37s848ms ago; duration=+2s25ms
Line 257999:       TOAST_WINDOW: mode=0; time=+27d1h20m18s738ms ago; duration=+2s510ms
Line 258079:       TOAST_WINDOW: mode=0; time=+26d23h43m48s62ms ago; duration=+2s489ms
Line 258105:       TOAST_WINDOW: mode=0; time=+25d21h14m52s465ms ago; duration=+4s68ms
Line 258143:       TOAST_WINDOW: mode=0; time=+10d1h33m37s743ms ago; duration=+1s317ms
Line 258162:       TOAST_WINDOW: mode=0; time=+18d2h51m31s756ms ago; duration=+3s494ms
Line 258433:       TOAST_WINDOW: mode=0; time=+24d5h14m50s347ms ago; duration=+4s26ms
Line 258453:       TOAST_WINDOW: mode=0; time=+27d1h21m35s166ms ago; duration=+3s993ms
Line 258488:       TOAST_WINDOW: mode=0; time=+27d1h13m6s901ms ago; duration=+2s535ms
Line 258496:       TOAST_WINDOW: mode=0; time=+21d1h0m1s898ms ago; duration=+1s276ms
Line 258543:       TOAST_WINDOW: mode=0; time=+10h12m59s837ms ago; duration=+2s541ms
Line 258593:       TOAST_WINDOW: mode=0; time=+26d23h51m39s18ms ago; duration=+3s721ms
Line 258609:       TOAST_WINDOW: mode=0; time=+26d1h3m17s833ms ago; duration=+2s562ms
Line 258626:       TOAST_WINDOW: mode=0; time=+10d7h10m41s289ms ago; duration=+3s868ms
Line 258635:       TOAST_WINDOW: mode=0; time=+23d9h10m25s870ms ago; duration=+2s535ms
Line 258659:       TOAST_WINDOW: mode=0; time=+26d18h28m23s861ms ago; duration=+6s570ms
Line 258680:       TOAST_WINDOW: mode=0; time=+16d1h3m1s715ms ago; duration=+2s474ms
Line 258734:       TOAST_WINDOW: mode=0; time=+2h29m39s924ms ago; duration=+1s816ms
Line 258751:       TOAST_WINDOW: mode=0; time=+26d10h49m44s940ms ago; duration=+2s540ms
Line 258796:       TOAST_WINDOW: mode=0; time=+15d0h46m40s597ms ago; duration=+1s921ms
Line 258812:       TOAST_WINDOW: mode=0; time=+24d5h17m15s876ms ago; duration=+2s270ms
Line 258825:       TOAST_WINDOW: mode=0; time=+28d15h37m41s708ms ago; duration=+3s457ms
Line 258848:       TOAST_WINDOW: mode=0; time=+26d17h0m34s430ms ago; duration=+4s24ms
Line 258910:       TOAST_WINDOW: mode=0; time=+9d21h6m46s469ms ago; duration=+4s6ms
Line 258964:       TOAST_WINDOW: mode=0; time=+6d5h37m54s159ms ago; duration=+1s616ms
Line 259038:       TOAST_WINDOW: mode=0; time=+9d9h47m26s469ms ago; duration=+3s585ms
Line 259067:       TOAST_WINDOW: mode=0; time=+4d21h48m55s791ms ago; duration=+2s533ms
Line 259203:       TOAST_WINDOW: mode=0; time=+5d8h20m25s479ms ago; duration=+2s433ms
Line 259235:       TOAST_WINDOW: mode=0; time=+21d6h35m41s13ms ago; duration=+2s533ms
Line 259272:       TOAST_WINDOW: mode=0; time=+7h43m13s384ms ago; duration=+2s537ms
Line 259282:       TOAST_WINDOW: mode=0; time=+23d1h17m40s758ms ago; duration=+2s550ms
Line 259299:       TOAST_WINDOW: mode=0; time=+2d0h19m32s295ms ago; duration=+1s920ms
Line 259314:       TOAST_WINDOW: mode=0; time=+4h48m2s954ms ago; duration=+2s551ms
Line 259323:       TOAST_WINDOW: mode=0; time=+3d6h35m49s293ms ago; duration=+2s368ms
Line 259337:       TOAST_WINDOW: mode=0; time=+7d5h2m3s94ms ago; duration=+2s515ms
Line 259344:       TOAST_WINDOW: mode=0; time=+26d17h14m21s890ms ago; duration=+2s542ms
Line 259351:       TOAST_WINDOW: mode=0; time=+5d5h4m18s863ms ago; duration=+2s541ms
Line 259358:       TOAST_WINDOW: mode=0; time=+26d11h8m4s896ms ago; duration=+2s556ms
Line 259366:       TOAST_WINDOW: mode=0; time=+3h17m16s496ms ago; duration=+2s484ms
Line 259374:       TOAST_WINDOW: mode=0; time=+23d20h12m1s860ms ago; duration=+3s139ms
Line 259380:       TOAST_WINDOW: mode=0; time=+26d17h5m58s587ms ago; duration=+2s496ms
Line 259417:       TOAST_WINDOW: mode=0; time=+21d21h25m35s179ms ago; duration=+2s538ms
Line 259458:       TOAST_WINDOW: mode=0; time=+26d18h2m43s572ms ago; duration=+2s521ms
Line 259477:       TOAST_WINDOW: mode=0; time=+13d9h21m30s312ms ago; duration=+2s552ms
Line 259492:       TOAST_WINDOW: mode=0; time=+27d1h21m26s227ms ago; duration=+2s538ms
Line 259506:       TOAST_WINDOW: mode=0; time=+24d3h5m26s694ms ago; duration=+1s993ms
Line 259526:       TOAST_WINDOW: mode=0; time=+27d0h15m56s930ms ago; duration=+2s16ms
Line 259535:       TOAST_WINDOW: mode=0; time=+10h25m51s161ms ago; duration=+2s372ms
Line 259543:       TOAST_WINDOW: mode=0; time=+22d1h17m11s242ms ago; duration=+2s529ms
Line 259557:       TOAST_WINDOW: mode=0; time=+6d0h26m39s416ms ago; duration=+1s928ms
Line 259566:       TOAST_WINDOW: mode=0; time=+3d2h19m30s871ms ago; duration=+2s571ms
Line 259574:       TOAST_WINDOW: mode=0; time=+25d23h58m38s29ms ago; duration=+3s895ms
Line 259611:       TOAST_WINDOW: mode=0; time=+10d9h17m4s830ms ago; duration=+2s329ms
Line 259621:       TOAST_WINDOW: mode=0; time=+2d0h34m20s504ms ago; duration=+2s486ms
Line 259633:       TOAST_WINDOW: mode=0; time=+2d8h35m40s587ms ago; duration=+2s554ms
Line 259725:       TOAST_WINDOW: mode=0; time=+26d23h2m13s851ms ago; duration=+679ms
Line 259959:       TOAST_WINDOW: mode=0; time=+2d19h40m59s819ms ago; duration=+2s312ms

제가 사용하는 단말에서는 약 3시간전에 토스트윈도우가 떴었네요 +3h17m16s496ms ago
그리고 발생을 요청한 앱은 nhn calendar앱이었습니다.

  Uid u0a207:
    Package com.nhn.android.calendar:
      POST_NOTIFICATION: mode=0; time=+3h17m18s998ms ago
      WAKE_LOCK: mode=0; time=+23d6h58m31s74ms ago; duration=+259ms
      TOAST_WINDOW: mode=0; time=+3h17m16s496ms ago; duration=+2s484ms
      READ_EXTERNAL_STORAGE: mode=0; time=+1m29s888ms ago
      WRITE_EXTERNAL_STORAGE: mode=0; time=+1m29s888ms ago
      BOOT_COMPLETED: mode=0; time=+4d8h1m2s980ms ago


댓글 없음:

댓글 쓰기