Android笔记

来源:互联网 发布:淘宝如何指纹支付 编辑:程序博客网 时间:2024/05/17 00:59


Android模拟器快捷键(Windows)


  • Home键                 home键,这倒是很好记。
  • Menu键                  F2键,PgUp键同样可以
  • Start键                      Shift+F2或PgDn
  • Back键                        ESC键。
  • Call/Dial键(电话键)F3键。
  • Hangup/Light             Off键(挂机键)映射F4键。
  • Search键                      映射F5。
  • Power Down键           映射F7。
  • Volume Up                  Ctrl+5,也可以使用小数字键盘的”+”键。
  • Volume Down            Ctrl+6,也可以使用小数字键盘的”-”键。
  • Camera键                  映射Ctrl+F3

Adb 命令


  • adb shell service list
  • adb shell dumpsys wifi
  • adb shell dumpsys activity
  • adb shell dumpsys battery
  • adb shell dumpsys cpuinfo
  • adb shell dumpsys meminfo 'your apps package name'
  • adb shell dumpsys activity -h
  • adb shell dumpsys window -h
  • adb shell dumpsys meminfo -h
  • adb shell dumpsys package -h
  • adb shell dumpsys batteryinfo -h
  •  
  • db shell am broadcast -a com.miui.uac.REQUEST
  • pm list package -e | busybox wc –l
  •  
  • http://stackoverflow.com/questions/2097813/how-to-parse-the-androidmanifest-xml-file-inside-an-apk-package
  •  
  • $ aapt l -a <someapp.apk>
  • $ aapt dump permissions package.apk
  • $ aapt dump permissions package.apk | sed 1d | awk'{ print $NF }'
  • $ aapt dump xmltree package.apk AndroidManifest.xml



android sqlite3不存在,如何添加sqlite3(需要root权限)

来源于stackoverflow

As an alternative (may not be secure or even good idea though) youcan always upload the sqlite3 binary to /system/bin this worked for me:

 First lets mount /system/ to allow read/write (rw)

 

$ adb shell

$ su

# mount -o remount,rw /system

或者mount -oremount rw /system

in another terminal change directory (cd) to where sqlite3 is andlets push it

 

$ ls

sqlite3

$ adb push sqlite3 /sdcard/

Now back to the other shell lets copy and change permissions of thebinary

# cat /sdcard/sqlite3 > /system/bin/sqlite3

# chmod 4755 /system/bin/sqlite3

Now lets mount back /system/ as read only (ro)

# mount -o remount,ro /system

And now we can use sqlite3 from shell:

# sqlite3 /data/data/com.telly/databases/fun.db

SQLite version 3.7.4

Enter ".help" for instructions

sqlite> .tables

android_metadata  lulz              

Note: I'm using the sqlite3 binary that comes with "SuperOneClickv1.6.5-ShortFuse"

 

You can always pull sqlite3 binary from emulator:Start an emulator and then from a terminal

 $ adb pull /system/xbin/sqlite3

If you are lazy like me you can download one right here for ICS orbefore or for Jelly Bean and later here




原创粉丝点击