命令备忘录

1 获取调试日志:
输入adb logcat -v time | tee log.txt创建log文件用来保存日志,操作完后ctrl+c停止
输入gedit log.txt 打开log文件
nautilus . 打开当前的目录
windows获取调试日志:
adb shell logcat -v threadtime > log.txt

2 网络数据tcpdump:
adb shell tcpdump -i wlan0 -s 0 -w /data/1.pcap 开始抓包,将抓包内容保存在/data目录
adb pull /data/1.pcap,将pcap文件拉取到当前目录
输入wireshark 1.cap,用wireshark打开抓包文件

3 android update project -l dlna_sdk -s -p ./ -t android-20 生成local.properties build.xml,
local.properties配置sdk.dir,sdk的路径,
build.xml是一些ant编译需要的配置。

4 查看网络地址 adb shell netcfg
root@rk322x:/ # netcfg
wlan0 UP 192.168.1.105/24 0x00001043 cc:b8:a8:13:d0:0e
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
5 查看ARP表 adb shell arp MAC地址和IP地址的对应关系列表 arp-地址解析协议
root@rk322x:/ # arp
? (192.168.1.103) at e4:b3:18:4b:4e:16 [ether] on wlan0
? (192.168.1.107) at 38:bc:1a:4a:4b:87 [ether] on wlan0
? (192.168.1.102) at 2c:20:0b:0e:c7:98 [ether] on wlan0
? (192.168.1.1) at 48:7d:2e:31:92:af [ether] on wlan0
? (192.168.1.100) at e4:90:7e:12:0b:eb [ether] on wlan0
7 Linux下设置Android环境变量:
vim ~/.bashrc, 在末尾添加
#android sdk tools
export ANDROID_HOME=/home/fzf/androiddevtools/android-sdk
export NDK_ROOT=/opt/android-ndk-r15c
export PATH=$PATH:/home/fzf/androiddevtools/android-sdk/tools:/home/fzf/androiddevtools/android-sdk/platform-tools
source ~/.bashrc
8 git修改上次的commit信息
git commit --amend
9 删除git仓库内的untracked文件
Step 1 is to show what will be deleted by using the -n option:

  git clean -n

Clean Step - beware: this will delete files:

git clean -f

To remove directories, run git clean -f -d or git clean -fd
To remove ignored files, run git clean -f -X or git clean -fX
To remove ignored and non-ignored files, run git clean -f -x or git clean -fx
10 添加远程仓库:
git remote add origin https://github.com/myremoterepo/WordSizeBar.git
11 拉取远程分支到本地仓库:
git checkout -b origin/remotename localname
12 将标签推送到远程
git push origin/upstream [tagname]
13 给工程打标签
git tag -a [tagname] -m [taginfo]

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值