Git ,Linux,adb常用命令

开发常用命令

挂载
sshfs xiao.sun@10.129.93.185:/home/xiao.sun ~/sshfs-mount/10.128.161.137/
sshfs xiao.sun@10.129.93.249:/home/xiao.sun ~/sshfs-mount/10.129.93.249/
卸载
fusermount -u ~/luping
登陆
ssh -l xiao.sun 10.129.93.185

如何查看哪些终端用户在使用违规命令如make -j32等等
ps -aux | grep make

使用who(w)查看有多少个用户登录终端ip 地址是多少?
w

opt强制执行
adb shell cmd package bg-dexopt-job

make -j32 2>&1 |tee xxx.log

鼠标不能点击
compiz --replace

查看服务器空间
$quota -sv
Filesystem space quota limit grace files quota limit grace
/dev/mapper/datavg-lv_data 4K 477G 496G 2 0 0

space : 对应你当前已经使用的磁盘空间大小
quota :对应你可用的磁盘空间大小

通过adb shell命令查看当前与用户交互的activity
adb shell dumpsys activity | grep -i run
adb shell dumpsys activity | grep “mFoc”

git config --global user.name xiao.sun
git config --global user.email xiao.sun@tcl.com
git config -l

user.email=wangxiuqin@tcl.com
user.name=xiuqin.wang

user.name=meiqin
user.email=meiqin@tcl.com

Eclipse 格式化代码块快捷键:Ctrl+Shift+F

源码编译完成后,之后的framework的修改不用再次重新编译,只需使用mmm命令编译部分模块即可,最后使用make snod生成system.img,刷进手机即可。

修改framework后生成的system.img,在进行刷机时仅仅刷进system.img即可,首次刷机尽量把userdata.img, boot.img都进行刷入。

更新代码
repo forall -c git clean -df
repo forall -c git reset --hard HEAD^
repo sync -j32 -d -c --no-tags

adb shell am startservice -n 包名/Class名 -a action名称

-n 表示组件
-a 表示Action

adb shell am startservice -n com.android.xxx.powersave/com.android.xxx.powersave.service.PowerSaveService

adb shell am broadcast 后面的参数有:

[-a ]
[-d <DATA_URI>]
[-t <MIME_TYPE>]
[-c [-c ] …]
[-e|–es <EXTRA_KEY> <EXTRA_STRING_VALUE> …]
[–ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> …]
[-e|–ei <EXTRA_KEY> <EXTRA_INT_VALUE> …]
[-n ]
[-f ] []

adb shell am broadcast -a com.android.test --es test_string “this is test string” --ei test_int 100 --ez test_boolean true

hprof文件格式转换
xiao.sun@U-xiao-sun:/data/tools/android-sdk-linux_x86/platform-tools$ hprof-conv settingsmemory.hprof settingsmemory1.hprof

repo init -u git@shenzhen.gitweb.com:gcs_sz/manifest.git -m MTK8765-O1-E8-DINT.xml --reference=/home/android/mirror

repo sync -j32 -d -c --no-tags

查看字段问题命令
Settings.Secure.putInt(mContext.getContentResolver(), THEME_MODE, value)

通过在framework/base目录下,是用grep -irns THEME_MODE --include=*.java

adb shell settings put system “screen_brightness” 100
相当于 Settings.System.putInt 的命令效果

adb shell settings get system “screen_brightness”
相当于 Settings.System.getInt 的命令效果

adb shell settings put secure “theme_mode” 1

adb shell dumpsys meminfo [包名]

  1. git log filename
    可以看到fileName相关的commit记录
  2. git log -p filename
    可以显示每次提交的diff
  3. 只看某次提交中的某个文件变化,可以直接加上fileName
    git show c5e69804bbd9725b5dece57f8cbece4a96b9f80b filename

子View调用setLayoutParams(), 向父布局传达自己的意图。 且父布局的类型必须与子View期待的类型一致。

chown system:system /sys/bus/platform/drivers/als_ps/stk_25cm_calibration

adb shell screencap -p /sdcard/001.png

adb shell dumpsys media.camera

adb logcat -G 20M

adb -s 设备名 shell

adb shell
settings put global device_provisioned 1
settings put secure user_setup_complete 1
reboot

adb logcat -v threadtime | grep -E ‘关键字1|关键字2|…|关键字n’ |左右都不能有空格
adb logcat -v threadtime | grep -e “onShutterButtonClick” -e “capture” -e “takePicture” -e “handleMessage - action”

通过包名快速搜索机器中的APK路径:pm list packages -f camera(包名的关键字)

git stash
git stash pop stash@{0}

adb shell am start com.jrdcom.mmitest/com.jrdcom.mmitest.common.MmiTest
adb shell am start com.mediatek.mtklogger/.MainActivity
adb shell am start com.mediatek.ygps/.YgpsActivity

dumpsys |grep BroadcastRecord

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值