Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Sunday, October 28, 2018

Install android apk using adb with all permissions granted by default


adb install -g myAndroidApplication.apk

Clear android Application data using shell command


adb shell pm clear com.app.packageName

Reset all granted permissions to a android package


adb shell pm reset-permissions -p com.app.packageName

Get environment variables passed to android/linux process


adb shell cat /proc/238/environ | sed -e "s/\x0/\n/g"

Set/Get global android device settings using command line


  • adb shell settings put global bluetooth_disabled_profiles 6
  • adb shell settings put global device_provisioned 1
  • adb shell settings list global
  • adb shell settings list system
  • adb shell settings list secure
  • adb shell settings get global bluetooth_on
  • Friday, August 12, 2016

    How to get print from android makefile

    Add below line to get print from android makefile
    $(info "I want this print")

    Tuesday, August 2, 2016

    To grant all permission to android app


    To grant all permissions to app, use -g as argument while installing with adb
     adb install -g myapp.apk 

    Friday, February 15, 2013

    Use command line to get screen tap in Android


    If you want to tap on android device screen and touch is not working then you can use following command to tap screen. Suppose you want to tap 300, 500 location on screen then use following command

    adb shell input tap 300 500

    Dial/Accept phone call using command line in Android

  • To dial phone number using service call
  • adb shell service call phone 2 s16 "+123456789"

  • To dial call using activity manager
  • adb shell am start -a android.intent.action.CALL -d tel:123456789

  • To accept incomming call
  • adb shell input keyevent 5
  • To disconnect call
  • adb shell input keyevent 6
  • Wednesday, October 17, 2012

    How to extract files from android system.img


    To extract files from android system.img on linux PC, use below steps
    1) simg2img system.img system_ext4.img
    2) mkdir temp
    3) sudo mount -o rw,loop system_ext4.img temp
    Now you can browse or copy files from temp folder.

    Get google android phone factory images


    https://developers.google.com/android/nexus/images