Updating System.img Using Fastboot (over USB)
U-Boot > setenv booti mmc3 U-boot > setenv fastboot_dev mmc3 U-Boot > saveenv
C:\adbgjb>adb reboot fastboot ... C:\adbgjb>fastboot flash boot boot.img ... C:\adbgjb>fastboot flash system system.img ... C:\adbgjb>fastboot flash recovery recovery.img ...
C:\adbgjb>adb push c:\flash_image /sdcard/ C:\adbgjb>adb push c:\recovery.img /sdcard/ C:\adbgjb>adb shell ... $ su # mount -o remount,rw /system # cp /sdcard/flash_image /system/bin # cd /system/bin # chmod 777 flash_image # flash_image recovery /sdcard/recovery.img ...
C:\adbgjb>adb connect 192.168.3.41 C:\adbgjb>adb -s 192.168.3.41:5555 push system.img /data/local/tmp/ ... # cd /data/local/tmp # dd if=system.img of=/dev/block/mmcblk0p5 # reboot
C:\adbgjb>adb push boot.img.img /mnt/asec/ ... # cd /mnt/asec/ # dd if=boot.img of=/dev/block/mmcblk0p1 # reboot
Updating Using Updater
U-Boot > download_mode
Image files plaseholder
UPDATER-MRS\Profiles\MX6Q Linux Update\OS Firmware\files\android\
IMX6 Framebuffer Setting
U-Boot > setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video=mxcfb0:dev=hdmi,1280x720M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=28M androidboot.hardware=freescale U-Boot > saveenv U-Boot > boot
Show The List of Notifications
// Notification – Show the list of notifications $ adb shell input swipe 10 10 10 1000
Get the X and Y Dimensions of The Screen
// Get the X and Y dimensions of the screen # dumpsys window | \ # sed -n '/mUnrestrictedScreen/ s/^.*) \([0-9][0-9]*\)x\([0-9][0-9]*\)/\1 \2/p'
Show the List of Notifications Using ADB
$ adb shell input swipe 10 10 10 1000
Get the X and Y Dimensions of the Screen Using Dumpsys
# dumpsys window | \ # sed -n '/mUnrestrictedScreen/ s/^.*) \([0-9][0-9]*\)x\([0-9][0-9]*\)/\1 \2/p'
Show Recent Applications
$ adb shell input touchscreen tap 800 1850
Swipe Up,Down,Left,Right
// Swipe down $ adb shell input swipe 800 400 1200 400 // Swipe left $ adb shell input swipe 400 400 800 400 // Swipe right $ adb shell input swipe 800 400 400 400 // Swipe up $ adb shell input swipe 800 400 400 400
Unlock the Device on Boot
// Unlock – Unlock the device $ adb shell input keyevent 82
Volume Up,Down
// turn volume up $ adb shell input keyevent 25 // turn volume down $ adb shell input keyevent KEYCODE_VOLUME_DOWN
Take a Screen And Store in Screen.png
// Take a screen show and stores it in screen.png $ adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
Get the Orientation of the Device
// get the orientation of the device. Returns 0, 1, 2, or 3 $ adb shell dumpsys input | grep SurfaceOrientation | awk '{ print $2 }'
Wakeup and Unlock of the Device
// wakeup & unlock $ adb shell input keyevent 26 $ adb shell input keyevent 82
Waiting for Android SystemUI
root@android:/# while [ 1 -eq 1 ]; do ps | grep com.android.systemui ; if [ $? -eq 0 ]; then break ; fi ; sleep 1 ; done
Clear Notifications Using ADB Shell
$ adb shell service call notification 1
Disable Screen Auto-rotate
root@android:/# content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
Disable Screen Lock
root@android:/# [ -f /data/system/locksettings.db ] && sqlite3 /data/system/locksettings.db "UPDATE locksettings SET value = '1' WHERE name = 'lockscreen.disabled'"
// 圖形鎖紀錄檔 $ adb shell rm /data/system/gesture.key
Allow Non-market Apps Install
root@android:/# settings put global install_non_market_apps 1
Black Wallpaper
$ adb push black.png /mnt/asec/ && adb shell cp /mnt/asec//black.png /data/system/users/0/wallpaper
Adb Over Ethernet
root@android:/# setprop service.adb.tcp.port 5555 root@android:/# setprop ro.secure 0 root@android:/# stop adbd root@android:/# start adbd ... ... // CONNCECT $ adb connect 192.168.3.39 // INSTALL $ adb -s 192.168.3.39:5555 install -r bin/Screencast-debug-unaligned.apk // RUN $ adb shell am start -a android.intent.action.MAIN -n com.atgames.screencast/.CastActivity ...
Activity Manager & Monkey Application Exerciser
$ adb -s ${IP}:${PORT} shell am start -a android.intent.action.MAIN -n com.atgames.screencast/.CastActivity
// [-n <COMPONENT>] [-d <DATA_URI>] [-t <MIME_TYPE>] $ adb shell am start -a android.intent.action.VIEW -n com.atgames.sms/com.atgames.MainActivity -d file:///mnt/asec/SonicBlast.gg.gz -t "application/octet-stream"
// Candy Crush Saga # am start -S com.king.candycrushsaga/.CandyCrushSagaActivity # am force-stop com.king.candycrushsaga // Cake Bake Blitz # am start -S com.bgi.cakebakeblitzfb/.MainActivity # am force-stop com.bgi.cakebakeblitzfb // Quantic Pinball # am start -S com.shine_research.quantic_pinball/com.shine.sdk.TheActivity # am force-stop com.shine_research.quantic_pinball // Angry Birds # am start -S com.rovio.angrybirds/com.rovio.fusion.App # am force-stop com.rovio.angrybirds // Paranormal State # am start -S com.teyon.paranormalstatea/com.teyon.hoe.HOEActivity # am force-stop com.teyon.paranormalstatea
// Candy Crush Saga # monkey -p com.king.candycrushsaga -c android.intent.category.LAUNCHER 1 // Cake Bake Blitz # monkey -p com.bgi.cakebakeblitzfb -c android.intent.category.LAUNCHER 1 // Quantic Pinball # monkey -p com.shine_research.quantic_pinball -c android.intent.category.LAUNCHER 1 // Angry Birds # monkey -p com.rovio.angrybirds -c android.intent.category.LAUNCHER 1 // Paranormal State # monkey -p com.teyon.paranormalstatea -c android.intent.category.LAUNCHER 1
ADB Input Text / Fire a Key Event
$ adb shell input text 'lexra.chang@gmail.com' $ adb shell input text '3d%smark' $ adb shell input keyevent KEYCODE_HOME
Simulate Touch Fast Swipe
root@android:/# sendevent /dev/input/event5 3 57 49 root@android:/# sendevent /dev/input/event5 3 53 942 root@android:/# sendevent /dev/input/event5 3 54 2747 root@android:/# sendevent /dev/input/event5 0 0 0 root@android:/# sendevent /dev/input/event5 3 53 1207 root@android:/# sendevent /dev/input/event5 3 54 2483 root@android:/# sendevent /dev/input/event5 0 0 0 root@android:/# sendevent /dev/input/event5 3 53 1472 root@android:/# sendevent /dev/input/event5 0 0 0 root@android:/# sendevent /dev/input/event5 3 54 2218 root@android:/# sendevent /dev/input/event5 0 0 0 root@android:/# sendevent /dev/input/event5 3 53 1207 root@android:/# sendevent /dev/input/event5 3 54 2483 root@android:/# sendevent /dev/input/event5 0 0 0 root@android:/# sendevent /dev/input/event5 3 53 1472
Getprop Net.Hostname
root@android:/system/bin # getprop net.hostname android-55097e16b0a8a77b ... root@android:/system/bin # setprop net.hostname android-55097e16b0a8a77b ...
CPU 0~3 Status
root@android:/system/bin # cat /proc/stat cpu 1521768 7545 192015 6416567 260320 151 26564 0 0 0 cpu0 197704 1889 92738 1764753 27122 149 21920 0 0 0 cpu1 370768 1754 35382 1623341 73817 0 1138 0 0 0 cpu2 464389 2189 33022 1510319 95247 1 1067 0 0 0 cpu3 488907 1713 30873 1518154 64134 1 2439 0 0 0
CPU Temperature
root@android:/system/bin # cat /sys/devices/virtual/thermal/thermal_zone0/temp root@android:/system/bin # 36
Compile-time Dismiss Status Bar
# vi frameworks/base/core/res/res/values/dimens.xml ... <dimen name="navigation_bar_height">0dp</dimen> ... # source build/envsetup.sh # lunch sabresd_6dq-eng # make -j4 showcommands 2>&1 | tee build_android.log ...
Watchdog Enable (60 seconds) / Disable
# echo a > /dev/watchdog
# echo V > /dev/watchdog
Change the Screen DPI (Dots Per Inch)
# vi /system/build.prop ... ro.sf.lcd_density=240 ro.sf.lcd_density=160 ro.sf.lcd_density=120
Framebuffer Rotate
# echo 0 > /sys/devices/platform/mxc_sdc_fb.0/graphics/fb0/rotate # echo 0 > /sys/devices/platform/mxc_sdc_fb.0/graphics/fb1/rotate
Dumpsys & Service List
root@android:/ # service list Found 71 services: 0 sip: [android.net.sip.ISipService] 1 phone: [com.android.internal.telephony.ITelephony] 2 iphonesubinfo: [com.android.internal.telephony.IPhoneSubInfo] 3 simphonebook: [com.android.internal.telephony.IIccPhoneBook] 4 isms: [com.android.internal.telephony.ISms] 5 dreams: [android.service.dreams.IDreamManager] 6 commontime_management: [] 7 samplingprofiler: [] 8 diskstats: [] 9 appwidget: [com.android.internal.appwidget.IAppWidgetService] 10 backup: [android.app.backup.IBackupManager] 11 uimode: [android.app.IUiModeManager] 12 serial: [android.hardware.ISerialManager] 13 usb: [android.hardware.usb.IUsbManager] 14 audio: [android.media.IAudioService] 15 wallpaper: [android.app.IWallpaperManager] 16 dropbox: [com.android.internal.os.IDropBoxManagerService] 17 search: [android.app.ISearchManager] 18 country_detector: [android.location.ICountryDetector] 19 location: [android.location.ILocationManager] 20 devicestoragemonitor: [] 21 notification: [android.app.INotificationManager] 22 updatelock: [android.os.IUpdateLock] 23 throttle: [android.net.IThrottleManager] 24 servicediscovery: [android.net.nsd.INsdManager] 25 connectivity: [android.net.IConnectivityManager] 26 ethernet: [android.net.ethernet.IEthernetManager] 27 wifi: [android.net.wifi.IWifiManager] 28 wifip2p: [android.net.wifi.p2p.IWifiP2pManager] 29 netpolicy: [android.net.INetworkPolicyManager] 30 netstats: [android.net.INetworkStatsService] 31 textservices: [com.android.internal.textservice.ITextServicesManager] 32 network_management: [android.os.INetworkManagementService] 33 clipboard: [android.content.IClipboard] 34 statusbar: [com.android.internal.statusbar.IStatusBarService] 35 device_policy: [android.app.admin.IDevicePolicyManager] 36 lock_settings: [com.android.internal.widget.ILockSettings] 37 mount: [IMountService] 38 accessibility: [android.view.accessibility.IAccessibilityManager] 39 input_method: [com.android.internal.view.IInputMethodManager] 40 bluetooth_manager: [android.bluetooth.IBluetoothManager] 41 input: [android.hardware.input.IInputManager] 42 window: [android.view.IWindowManager] 43 alarm: [android.app.IAlarmManager] 44 vibrator: [android.os.IVibratorService] 45 battery: [] 46 hardware: [android.os.IHardwareService] 47 content: [android.content.IContentService] 48 account: [android.accounts.IAccountManager] 49 user: [android.os.IUserManager] 50 permission: [android.os.IPermissionController] 51 cpuinfo: [] 52 dbinfo: [] 53 gfxinfo: [] 54 meminfo: [] 55 activity: [android.app.IActivityManager] 56 package: [android.content.pm.IPackageManager] 57 media.audio_policy: [android.media.IAudioPolicyService] 58 scheduling_policy: [android.os.ISchedulingPolicyService] 59 telephony.registry: [com.android.internal.telephony.ITelephonyRegistry] 60 display: [android.hardware.display.IDisplayManager] 61 usagestats: [com.android.internal.app.IUsageStats] 62 batteryinfo: [com.android.internal.app.IBatteryStats] 63 power: [android.os.IPowerManager] 64 entropy: [] 65 sensorservice: [android.gui.SensorServer] 66 SurfaceFlinger: [android.ui.ISurfaceComposer] 67 drm.drmManager: [drm.IDrmManagerService] 68 media.camera: [android.hardware.ICameraService] 69 media.player: [android.media.IMediaPlayerService] 70 media.audio_flinger: [android.media.IAudioFlinger]
root@android:/ # dumpsys | grep "^DUMP" DUMP OF SERVICE SurfaceFlinger: DUMP OF SERVICE VZW_LOCATION_SERVICE: DUMP OF SERVICE accessibility:0 DUMP OF SERVICE account: DUMP OF SERVICE activity: DUMP OF SERVICE alarm: DUMP OF SERVICE appwidget: DUMP OF SERVICE audio: DUMP OF SERVICE backup: DUMP OF SERVICE battery: DUMP OF SERVICE batteryinfo: DUMP OF SERVICE bluetooth: DUMP OF SERVICE bluetooth_a2dp:0 DUMP OF SERVICE bluetooth_dg_service:0 DUMP OF SERVICE bluetooth_fm_receiver_service:0 DUMP OF SERVICE clipboard:0 DUMP OF SERVICE connectivity: DUMP OF SERVICE content: DUMP OF SERVICE cpuinfo: DUMP OF SERVICE device_policy: DUMP OF SERVICE devicestoragemonitor:0 DUMP OF SERVICE diskstats: DUMP OF SERVICE dropbox: DUMP OF SERVICE entropy:0 DUMP OF SERVICE hardware:0 DUMP OF SERVICE htc_checkin:0 DUMP OF SERVICE htchardware:0 DUMP OF SERVICE input_method: DUMP OF SERVICE iphonesubinfo: DUMP OF SERVICE isms:0 DUMP OF SERVICE location: DUMP OF SERVICE media.audio_flinger: DUMP OF SERVICE media.audio_policy: DUMP OF SERVICE media.camera: DUMP OF SERVICE media.player: DUMP OF SERVICE meminfo: DUMP OF SERVICE mount:0 DUMP OF SERVICE netstat: DUMP OF SERVICE network_management:0 DUMP OF SERVICE notification: DUMP OF SERVICE package: (garbage snipped) DUMP OF SERVICE permission:0 DUMP OF SERVICE phone:0 DUMP OF SERVICE power: DUMP OF SERVICE search:0 DUMP OF SERVICE sensor: DUMP OF SERVICE simphonebook:0 DUMP OF SERVICE statusbar: DUMP OF SERVICE telephony.registry: DUMP OF SERVICE throttle: DUMP OF SERVICE uimode: DUMP OF SERVICE usagestats: DUMP OF SERVICE vibrator:0 DUMP OF SERVICE wallpaper: DUMP OF SERVICE wifi: DUMP OF SERVICE window:
Dumpsys Cpuinfo
root@android:/ # dumpsys cpuinfo Load: 4.18 / 3.99 / 2.87 CPU usage from 116474ms to 56475ms ago: 0% 2652/system_server: 0% user + 0% kernel / faults: 32 minor 0% 3154/mrtgs: 0% user + 0% kernel / faults: 100 minor 0% 2243/surfaceflinger: 0% user + 0% kernel 0% 2898/com.android.systemui: 0% user + 0% kernel / faults: 10 minor 0% 3003/com.android.launcher: 0% user + 0% kernel / faults: 2 minor 0% 3544/cast_av_7: 0% user + 0% kernel 0% 1//init: 0% user + 0% kernel / faults: 36 minor 0% 576/kworker/2:1: 0% user + 0% kernel 0% 2278/flush-179:0: 0% user + 0% kernel 0% 2989/com.android.phone: 0% user + 0% kernel / faults: 3 minor 0% 4563/kworker/0:2: 0% user + 0% kernel 0.2% TOTAL: 0% user + 0.1% kernel
Dumpsys Meminfo
root@android:/ # dumpsys meminfo --oom Applications Memory Usage (kB): Uptime: 1212058 Realtime: 1212049 Total PSS by OOM adjustment: 17843 kB: System 17843 kB: system (pid 2652) 45145 kB: Persistent 38382 kB: com.android.systemui (pid 2898) 6763 kB: com.android.phone (pid 2989) 17938 kB: Foreground 17938 kB: com.android.launcher (pid 3003) 8066 kB: Perceptible 5232 kB: com.android.inputmethod.latin (pid 2971) 2834 kB: com.android.location.fused (pid 3041) 4540 kB: A Services 4540 kB: com.google.process.gapps (pid 3197) 5788 kB: B Services 5788 kB: com.google.process.location (pid 3396) 59741 kB: Background 6329 kB: android.process.acore (pid 3064) 5925 kB: com.android.email (pid 3312) 5804 kB: android.process.media (pid 2957) 5244 kB: com.google.android.gms (pid 3139) 4900 kB: com.android.contacts (pid 3237) 4456 kB: com.android.mms (pid 3361) 4359 kB: com.android.settings (pid 3109) 4308 kB: com.android.providers.calendar (pid 3276) 4187 kB: com.android.deskclock (pid 3293) 3910 kB: com.android.exchange (pid 3332) 3897 kB: com.google.android.gsf.login (pid 3186) 3563 kB: com.android.music (pid 3166) 2859 kB: com.android.musicfx (pid 3569) Total PSS: 159061 kB KSM: 0 kB saved from shared 0 kB 0 kB unshared; 0 kB volatile
Dumpsys Diskstats
root@android:/ # dumpsys diskstats Latency: 1ms [512B Data Write] Data-Free: 4838700K / 6421112K total = 75% free Cache-Free: 471020K / 507744K total = 92% free System-Free: 20580K / 352756K total = 5% free root@android:/ #
Dumpsys SurfaceFlinger
root@android:/ # dumpsys SurfaceFlinger | more Build configuration: [sf] [libui] [libgui] Visible layers (count = 6) + LayerDim 0x400225f0 (DimAnimator) Region transparentRegion (this=0x40022728, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0x400225fc, count=1) [ 0, 0, 0, 0] layerStack= 0, z= 0, pos=(0,0), size=( 16, 16), crop=( 0, 0, -1, -1), isOpaque=0, needsDithering=0, invalidate=0, alpha=0x00, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00] client=0x40022518, identity=2 + LayerDim 0x40022960 (DimSurface) Region transparentRegion (this=0x40022a98, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0x4002296c, count=1) [ 0, 0, 0, 0] layerStack= 0, z= 0, pos=(0,0), size=( 16, 16), crop=( 0, 0, -1, -1), isOpaque=0, needsDithering=0, invalidate=0, alpha=0x00, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00] client=0x40022518, identity=3 + Layer 0x4009b030 (com.android.systemui.ImageWallpaper) Region transparentRegion (this=0x4009b168, count=1) [ 0, 0, 0, 0] --More--
Dumpsys Gfx
root@android:/ # dumpsys gfxinfo | more Applications Graphics Acceleration Info: Uptime: 1962138 Realtime: 1962129 ** Graphics info for pid 5645 [com.google.android.gms] ** ** Graphics info for pid 3197 [com.google.process.gapps] ** ** Graphics info for pid 5678 [com.google.android.gsf.login] ** ** Graphics info for pid 3041 [com.android.location.fused] ** ** Graphics info for pid 2898 [com.android.systemui] ** Recent DisplayList operations Scale Translate DrawBitmapRect RestoreToCount Save Translate ConcatMatrix DrawBitmapRect RestoreToCount --More--
Dumpsys Networl_Management
root@android:/ # dumpsys network_management NetworkManagementService NativeDaemonConnector Log: 05:25:11 - SND -> {1 interface ipv6 wlan0 disable} 05:25:11 - RCV <- {400 1 Failed to change IPv6 state (No such file or directory)} 05:25:11 - RMV <- {400 1 Failed to change IPv6 state (No such file or directory)} 05:25:12 - SND -> {2 interface getcfg eth0} 05:25:12 - RCV <- {213 2 00:00:e9:ff:e0:35 0.0.0.0 0 down broadcast multicast} 05:25:12 - RMV <- {213 2 00:00:e9:ff:e0:35 0.0.0.0 0 down broadcast multicast} 05:25:12 - SND -> {3 interface setcfg eth0 0.0.0.0 0 multicast up broadcast} 05:25:12 - RCV <- {600 Iface linkstate eth0 down} 05:25:12 - RCV <- {200 3 Interface configuration set} 05:25:12 - RMV <- {200 3 Interface configuration set} 05:25:12 - SND -> {4 interface getcfg eth0} 05:25:12 - RCV <- {213 4 00:00:e9:ff:e0:35 0.0.0.0 0 up broadcast running multicast} 05:25:12 - RMV <- {213 4 00:00:e9:ff:e0:35 0.0.0.0 0 up broadcast running multicast} 05:25:12 - SND -> {5 interface setcfg eth0 0.0.0.0 0 running multicast broadcast up} 05:25:12 - RCV <- {200 5 Interface configuration set} 05:25:12 - RMV <- {200 5 Interface configuration set} 05:25:12 - SND -> {6 bandwidth enable} 05:25:12 - RCV <- {200 6 Bandwidth command succeeeded} 05:25:12 - RMV <- {200 6 Bandwidth command succeeeded} 05:25:12 - SND -> {7 firewall disable} 05:25:12 - RCV <- {200 7 Firewall command succeeded} 05:25:12 - RMV <- {200 7 Firewall command succeeded} 05:25:12 - SND -> {8 bandwidth setglobalalert 2097152} 05:25:12 - RCV <- {200 8 Bandwidth command succeeeded} 05:25:12 - RMV <- {200 8 Bandwidth command succeeeded} 05:25:12 - SND -> {9 firewall disable} 05:25:12 - RCV <- {200 9 Firewall command succeeded} 05:25:12 - RMV <- {200 9 Firewall command succeeded} 05:25:13 - SND -> {10 interface setthrottle rmnet0 -1 -1} 05:25:13 - RCV <- {200 10 Interface throttling set} 05:25:13 - RMV <- {200 10 Interface throttling set} 05:25:15 - RCV <- {600 Iface linkstate eth0 up} 05:25:22 - SND -> {11 resolver setifdns null} 05:25:22 - RCV <- {500 11 Wrong number of arguments to resolver setifdns} 05:25:22 - RMV <- {500 11 Wrong number of arguments to resolver setifdns} 05:25:22 - SND -> {12 bandwidth setglobalalert 2097152} 05:25:22 - RCV <- {200 12 Bandwidth command succeeeded} 05:25:22 - RMV <- {200 12 Bandwidth command succeeeded} 05:39:22 - SND -> {13 bandwidth setglobalalert 2097152} 05:39:22 - RCV <- {200 13 Bandwidth command succeeeded} 05:39:22 - RMV <- {200 13 Bandwidth command succeeeded} Pending requests: Bandwidth control enabled: true Active quota ifaces: {} Active alert ifaces: {} UID reject on quota ifaces: [] Firewall enabled: false
Dumpsys Notification
root@android:/system/bin # dumpsys notification Current Notification Manager state: Listeners (0) enabled for current user: Live listeners (0): Notification List: NotificationRecord(0x41c8bc28: pkg=android user=UserHandle{-1} id=17040510 tag=null score=-10: Notification(pri=-1 contentView=android/0x1090082 vibrate=null sound=null defaults=0x0 flags=0x0 kind=[null])) uid=1000 userId=-1 icon=0x108035c / android:drawable/ic_settings_language pri=-1 score=-10 contentIntent=PendingIntent{41c82448: PendingIntentRecord{41d1b940 android startActivity}} deleteIntent=null tickerText=null contentView=android.widget.RemoteViews@41c5eb48 defaults=0x00000000 flags=0x00000000 sound=null vibrate=null led=0x00000000 onMs=0 offMs=0 extras={ android.progressMax=0 android.subText=null android.text=Touch to select a keyboard layout. android.showWhen=true android.progressIndeterminate=false android.icon=17302364 android.title=Select keyboard layout android.progress=0 android.showChronometer=false android.infoText=null } mSoundNotification=null mVibrateNotification=null mDisabledNotifications=0x0 mSystemReady=true mArchive=Archive (1 notification) StatusBarNotification(pkg=android user=UserHandle{-1} id=17040510 tag=null score=-10: Notification(pri=-1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 kind=[null]))
Framebuffer Rotation, Mirroring ...
Rotation Enable rotation angle of 0 degrees: # echo 0 > /sys/class/graphics/fb0/rotate Enable rotation angle of 90 degrees: # echo 1 > /sys/class/graphics/fb0/rotate Enable rotation angle of 180 degrees: # echo 2 > /sys/class/graphics/fb0/rotate Enable rotation angle of 270 degrees: # echo 3 > /sys/class/graphics/fb0/rotate Mirroring Enable mirroring: # echo 1 > /sys/class/graphics/fb0/mirror Disable mirroring: # echo 0 > /sys/class/graphics/fb0/mirror Setting framebuffer to overlay: Setting fb0 to overlay0: # echo 0 > /sys/class/graphics/fb0/overlays Setting fb0 to overlay1: # echo 0 > /sys/class/graphics/fb0/overlays Setting fb0 to both overlay0 and overlay1: # echo "0,1" > /sys/class/graphics/fb0/overlays Blanking FB: Powerdown fb0: # echo 4 > /sys/class/graphics/fb0/blank Unblanking fb0: # echo 0 > /sys/class/graphics/fb0/blank
Status Bar Dismiss & Restore
$ adb shell pm disable com.android.systemui $ adb shell pm enable com.android.systemui
# service call activity 42 s16 com.android.systemui
# am startservice -n com.android.systemui/.SystemUIService
Toggle Android Location Service
$ adb shell settings put secure location_providers_allowed gps,wifi,network ... adb shell settings put secure location_providers_allowed ' ' ...
Wpa_Cli
# wpa_cli scan # wpa_cli scan_result Selected interface 'wlan0' bssid / frequency / signal level / rate / protocol caps / flags / ssid xx:xx:xx:xx:xx:xx 2412 -45 54M 802.11b/g BW20 [WPA2-PSK-TKIP][ESS] MyWifiAP # wpa_cli -i wlan0 remove_network 0 # wpa_cli -i wlan0 add_network 0 # wpa_cli -i wlan0 set_network 0 ssid '"MyWifiAP"' # wpa_cli -i wlan0 set_network 0 key_mgmt WPA-PSK # wpa_cli -i wlan0 set_network 0 psk '"Password"' # wpa_cli -i wlan0 set_network 0 pairwise TKIP # wpa_cli -i wlan0 set_network 0 group TKIP # wpa_cli -i wlan0 set_network 0 proto RSN # wpa_cli -i wlan0 enable_network 0 # wpa_cli -i wlan0 select_network 0 # wpa_cli -i wlan0 status
Toggle Android Location Service
adb shell 'setprop persist.sys.root_access 3'
Disable Wifi-Direct
# rm -rf /system/etc/permissions/android.hardware.wifi.direct.xml or root@{yourboard}:/ # busybox vi system/etc/permissions/required_hardware.xml or # vim device/fsl/{yourboard}/required_hardware.xml or # vim out/target/product/{yourboard}/system/etc/permissions/required_hardware.xml <!-- <feature name="android.hardware.wifi.direct" /> --> or # setprop net.wifi.p2p 0
Turn on Android Wifi Using Adb
$ adb shell "svc wifi enable" $ adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db update secure set value=1 where name='wifi_on'; $ adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings $ adb shell input keyevent 20 & adb shell input keyevent 23
$ adb shell svc wifi disable ... $ adb shell svc wifi enable
Clear a Given App Data
$ adb shell pm clear com.growingwiththeweb.example
Mobile Data on, off
// Mobile Data on $ adb shell svc data enable // Mobile Data off $ adb shell svc data disable
How do I Turn off the Usb Debugging Notification?
# echo "persist.adb.notify=0" >> /system/build.prop
How do I clear notifications using ADB shell??
$ adb shell service call notification 1
How to Disable Google Asking Permissions to Regularly Check the Installed Apps on My Phone?
// enable # settings put global package_verifier_enable 1 ... // disable # settings put global package_verifier_enable 0
Clock App Start, Stop
// start clock app $ adb shell am start com.google.android.deskclock // stop clock app $ adb shell am force-stop com.google.android.deskclock
Open the Default Browser
// connect adb over wi-fi $ adb shell setprop service.adb.tcp.port 5555 && stop adbd && start adbd $ adb connect // Unlock your Android screen $ adb shell input keyevent 82 // Lock your Android screen $ adb shell input keyevent 6 $ adb shell input keyevent 26 // Open default browser $ adb shell input keyevent 23
Multiple User Accounts Inside Android
# pm create-user USER_NAME ... # am switch-user USER_ID ... # pm list-users ... # pm remove-user USER_ID ...
PackageManager disable/enable MediaScannerReceiver
# pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver ... # pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver ...
Manipulate Screen Lock Settings over Adb
$ adb -s 192.168.3.41:5555 slell rm -rf /data/system/locksettings.db* ...
Android 刪除手機內的 Google 帳號
登入我的帳戶。如果您忘記密碼,可以重設密碼。 在「帳戶偏好設定」專區中,選取 [刪除帳戶或服務]。 選擇 [刪除 Google 帳戶和資料]。 檢查您即將刪除的內容,並勾選頁面底端的兩個方塊。 選擇 [刪除帳戶]。
$ adb busybox rm -rf /data/system/accounts.db* $ adb busybox rm -rf /data/system/users/0/accounts.db*
How to cause kernel panic with a single command ?
# echo c > /proc/sysrq-trigger ...
Change screen resolution to 1080 x 1920 and density to 390
adb shell wm size 1080x1920 adb shell wm density 390