Linux以及Android開發中的小技巧和長繁命令記錄收集,androidlinux命令
不斷更新收集中....
2014071743
ssh以nx_guest的身份登入到172.24.221.137,然後在172.24.221.137與172.24.61.252的8080連接埠建立網路連接,同時建立連接埠為5678的本地代理服務
ssh -C -f -N -o 'TCPKeepAlive=yes' -L 5678:172.24.61.252:8080 nx_guest@172.24.221.137
反編譯android下的二進位程式
./prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-objdump -D -S --start-address=0xc00bc000 --stop-address=0xc00bd000 -t /local/soul4tmous_mini/out/target/product/jrdsh82_w_tmous_kk/obj/KERNEL_OBJ/vmlinux > ~/dump.log
批量取消${mypath}*下所有檔案的-sign名稱尾碼
rename -v 's/-sign//' ${mypath}*
批量替換目前的目錄下所有檔案中的INTLTOOL_MERGE-NOTFOUND為intltool-merge
sed -i "s/INTLTOOL_MERGE-NOTFOUND/intltool-merge/g" `grep INTLTOOL_MERGE-NOTFOUND -rl ./`
常用adb shell 命令
adb shell service list
adb shell dumpsys
adb shell pm list package -f
adb shell dumpsys activity activities
adb shell dumpsys wifi
adb shell dumpsys cpuinfo
adb shell dumpsys meminfo [packagename]
1 SurfaceFlinger
2 accessibility
3 account
4 activity
5 alarm
6 appwidget
7 audio
8 backup
9 battery
10 batteryinfo
11 bluetooth
12 bluetooth_a2dp
13 clipboard
14 connectivity
15 content
16 cpuinfo
17 device_policy
18 devicestoragemonitor
19 diskstats
20 dropbox
21 entropy
22 ethernet
23 hardware
24 input_method
25 iphonesubinfo
26 isms
27 keybar
28 location
29 media.audio_flinger
30 media.audio_policy
31 media.camera
32 media.player
33 meminfo
34 mount
35 netstat
36 network_management
37 notification
38 package
39 permission
40 phone
41 power
42 search
43 sensorservice
44 simphonebook
45 statusbar
46 telephony.registry
47 throttle
48 uimode
49 usagestats
50 vibrator
51 wallpaper
52 wifi
53 window
54 gfxinfo
linux中Shell曆史命令記錄檔案的路徑是什嗎?Bash shell~/.bash_history(~/表示使用者目錄)檔案儲存了500條使用過命令樣能使輸入使用過長命令變得容易每系統擁有帳號使用者目錄下都有.bash_history檔案
bash shell應該儲存少量命令並且每次使用者登出時都把些曆史命令刪除
第步:
/etc/profile檔案HISTFILESIZE和HISTSIZE行確定所有使用者.bash_history檔案能保
存舊命令條數強烈建議把把/etc/profile檔案HISTFILESIZE和HISTSIZE行值設較小數比
30編輯profile檔案(vi /etc/profile)把下面行改:
HISTFILESIZE=30
HISTSIZE=30
表示每使用者.bash_history檔案只能儲存30條舊命令
第二步:
網管還應該"/etc/skel/.bash_logout" 檔案添加下面行"rm -f $HOME/.bash_history" 樣當使用者每次登出時.bash_history檔案都會被刪除.
在android寫程式通過linux命令列擷取記憶體與CPU使用率,需要什麼許可權所有使用者也任意使用者皆
超級許可權使用者獲得高優先權