常用指令及快捷键

常用指令

 

----------------------------------------------------

目录

Adb

1 :PM

2:dump

Linux

git 

Android Studio

Mac



windows

退出全屏 + Esc/F11

------------------------------------------------------------

Adb

1 :PM

adb shell pm list packages -f  | grep -iE "Oppocamera.apk"\ 或 adb shell pm path + 包名

2:dump

adb dump 指令

Dump当前Activity

1.adb shell dumpsys activity | grep -iE  "Focused"

2.dump内存相关信息

adb shell dumpsys meminfo $package_name or $pid

Dump native heap 相关信息

adb shell am dumpheap -n com.oppo.camera /data/local/tmp/meminfo/native_heap.txt

获取当前线程 hprof 信息

adb shell am dumpheap com.oppo.camera /data/local/tmp/meminfo/OppoCamea_dumpheap_start.hprof

adb shell setprop persist.version.confidential false

设备解锁

2、解锁

Android P 刷debug版本后 remount 提示权限denied

方法1:

1、adb root

2、adb disable-verity

3、adb reboot

4、adb root

5、adb remount

如果上面方法执行disable-verity时有下面提示,那么请使用下面的方式先解锁

Device is locked. Please unlock the device first

方法2:

1、进开发者选项,OEM unlocking打开

2、adb reboot bootloader

3、fastboot flashing unlock //显示成功,等待手机格式化

4、fastboot reboot

5、开机后执行adb root

6、adb disable-verity

7、adb reboot

8、adb root

9、adb remount


 

查询当前活动

adb shell dumpsys activity | grep -i Focused

缩略图方块

adb shell dumpsys window displays | head -n(3)

查询屏幕分辨率

adb shell dumpsys window displays | head -n(3)

init=720x1600 320dpi cur=720x1600 app=720x1402 rng=720x610-1402x1402  优先适配XHDPI

  Display: mDisplayId=0 stacks=3

init=1080x2400 480dpi cur=1080x2400 app=1080x2161 rng=1080x967-2161x2155   优先适配XXHDPI

应用size

app=1080x2161

Linux

ls -li

获取文件 编码

cd $(find -inum  +  编码)

可利用编码执行linux 下指令 增 删 改 查

创建文件 ">" + 文件夹名称

创建文件夹 “mkdir” +文件夹名称 

git 

注意git 指令严格区分大小写及空格

git 设置

查看git 安装目录

linux :which git

windows: where git

git 查看 用户名 邮箱

git config user.name   //获取当前登录的用户
git config user.email  //获取当前登录用户的邮箱

设置 用户名 邮箱

git config --global user.name 'userName'    // 修改登陆账号,userName为你的git账号
git config --global user.email 'email'      // 修改登陆邮箱,email为你的git邮箱
git config --global user.password 'password'  // 修改登陆密码,password为你的git密码

查询git 账号 密码 分支配置

git config --list

git code

代码回退 打补丁

临时 缓存文件 

git stash

补丁patch 

 git diff +(文件名) > test.patch

git apply test.patch

git reset HEAD^

git 

git log

查看提交历史

显示每次提交的内容差异

git log -p 

显示最近两次提交的内容差异

git log -p -2

显示每次提交的简略信息,列出被修改的文件

git log --stat

提交信息在一行显示 

oneline,short,full,fuller

git log --pretty=oneline

定制log格式

git log --pretty=format:"%h - %an, %ar : %s"

输出结果:

%h              %an                     %ar                         %s

ca82a6d - Scott Chacon, 6 years ago : changed the version number

git log --pretty=format 常用的选项

显示分支合并历史

git log --pretty=“”   --graph

$ git log --pretty="%h - %s" --author=gitster --since="2008-10-01" \
--before="2008-11-01" --no-merges -- t/
5610e3b - Fix testcase failure when extended attributes are in use
acd3b9e - Enhance hold_lock_file_for_{update,append}() API
f563754 - demonstrate breakage of detached checkout with symbolic link HEAD
d1a43f2 - reset --hard/read-tree --reset -u: remove unmerged new paths
51a94af - Fix "checkout --track -b newbranch" on detached HEAD
b0ad11e - pull: allow "git pull origin $something:$current_branch" into an unborn bran
ch
在近40000条提交中,上面的输出仅列出了符合条件的6条记录。

Windows

分屏:“windows”键+“←”左分屏, “windows”键+“→”右分屏

Android Studio

Android Studio 快捷键失效问题总结:

首先 查询 Android Studio 快捷是否配置,查询方法 File-----> Settings-------> KeyMap

快捷键失效,快捷键冲突导致,取消冲突的快捷键即可

可能冲突的快捷键  搜狗输入法,win10输入法热键,AndroidStudio插件中的快捷键,桌面图形显示快捷键

昨晚手残 下了一个不用的插件导致,Android Studio 部分快捷键冲突,卸载插件,问题解决

Vim

翻页 ctrl + f、 ctrl + b

Mac

Mac下解压zip文件

unzip指令 乱码 ,右键 使用zip打开 报错 21 是目录

解决办法 

ditto -V -x -k --sequesterRsrc --rsrc  1E3print.zip 1E3

ditto -V -x -k --sequesterRsrc --rsrc  源压缩文件 目标文件夹

Mac 加速播放

按住option + 点击 前进 后退 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值