보안 및 개발/MOBILE

자주사용하는 ADB 명령어

CH@3M 2020. 11. 3. 10:16
  • adb 연결 명령어
adb shell
  •  adb 연결가능한 device 목록
adb devices -l
  •  해당 IP에 adb 연결
adb connect + IP
  •  ~.apk 설치
adb install + ~.apk
  • 디바이스에 설치되어 있는 패키지 목록 출력
adb shell pm package

  •  모바일 -> PC 파일 옮기기
adb pull + 모바일파일 위치

참고) 기기에서 파일들 다 클릭해서 봐도 되고,, PC로 옮긴 DB 파일의 경우 https://sqlitebrowser.org/dl/ 를 통해 볼 수 있음

  • PC -> 모바일 파일 옮기기
adb push + PC의 파일 위치
  • activity 강제 실행
nox_adb shell am start -n 패키지명/실행하고자하는 Activity경로

ex) nox_adb shell am start -n com.kr.sample/com.kr.sample.activity.changepwActivity

    const-string v0, "App Integrity check test01" 

    const/4 v1, 0x0 

    iinvoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast; 

    move-result-object v0 

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

 

  • 시스템 파일 안의 문자열 검색
grep -rinoE '검색어'*

 

  • 앱에 허용하는 권한 목록
aapt d permissions + ~.apk

반응형