Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)

adb常用命令大全 ADB是Android Debug Bridge的缩写,它是一个命令行工具,主要用于在开发过程中实现计算机与Android设备之间的通信。ADB工具允许开发者执行一系列调试操作,如安装应用、管理应用的生命周期、读取日志数据、执行shell命令等。 阅读详情
AI摘要

本文详细介绍了ADB命令的使用方法,包括获取序列号、查看设备、重启、安装与卸载APK、查看内存占用、进程管理、文件操作等功能,帮助开发者和用户高效地进行Android设备操作。

        ADB很强大,记住一些ADB命令有助于提高工作效率。

1. 获取序列号:

        adb get-serialno

2. 查看连接计算机的设备:
    
        adb devices

3. 重启机器:
    
        adb reboot

4. 重启到bootloader,即刷机模式:

        adb reboot bootloader

5. 重启到recovery,即恢复模式:

        adb reboot recovery

6. 查看log:

        adb logcat

7. 终止adb服务进程:

        adb kill-server

8. 重启adb服务进程:

        adb start-server

9. 获取机器MAC地址:
    
        adb shell  cat /sys/class/net/wlan0/address

10. 获取CPU序列号:

        adb shell cat /proc/cpuinfo

11. 安装APK:
    
        adb install <apkfile> //比如:adb install baidu.apk

12. 保留数据和缓存文件,重新安装apk:

        adb install -r <apkfile> //比如:adb install -r baidu.apk

13. 安装apk到sd卡:

        adb install -s <apkfile> // 比如:adb install -s baidu.apk

14. 卸载APK:

        adb uninstall <package> //比如:adb uninstall com.baidu.search

15. 卸载app但保留数据和缓存文件:
    
        adb uninstall -k <package> //比如:adb uninstall -k com.baidu.search

16. 启动应用:

        adb shell am start -n <package_name>/.<activity_class_name>

17. 查看设备cpu和内存占用情况:
    
        adb shell top

18. 查看占用内存前6的app:

        adb shell top -m 6

19. 刷新一次内存信息,然后返回:

        adb shell top -n 1

20. 查询各进程内存使用情况:

        adb shell procrank

21. 杀死一个进程:

        adb shell kill [pid]

22. 查看进程列表:

        adb shell ps

23. 查看指定进程状态:

        adb shell ps -x [PID]

24. 查看后台services信息:

        adb shell service list

25. 查看当前内存占用:

        adb shell cat /proc/meminfo

26. 查看IO内存分区:

        adb shell cat /proc/iomem

27. 将system分区重新挂载为可读写分区:

        adb remount

28. 从本地复制文件到设备:

        adb push <local> <remote>

29. 从设备复制文件到本地:

        adb pull <remote>  <local>

30. 列出目录下的文件和文件夹,等同于dos中的dir命令:

        adb shell ls

31. 进入文件夹,等同于dos中的cd 命令:

        adb shell cd <folder>

32. 重命名文件:

        adb shell rename path/oldfilename path/newfilename

33. 删除system/avi.apk:

        adb shell rm /system/avi.apk

34. 删除文件夹及其下面所有文件:

        adb shell rm -r <folder>

35. 移动文件:

        adb shell mv path/file newpath/file

36. 设置文件权限:

        adb shell chmod 777 /system/fonts/DroidSansFallback.ttf

37. 新建文件夹:

        adb shell mkdir path/foldelname

38. 查看文件内容:

        adb shell cat <file>

39. 查看wifi密码:

        adb shell cat /data/misc/wifi/*.conf

40. 清除log缓存:

        adb logcat -c

41. 查看bug报告:

        adb bugreport

42. 获取设备名称:

        adb shell cat /system/build.prop

43. 查看ADB帮助:
    
        adb help

44. 跑monkey:

        adb shell monkey -v -p your.package.name 500

More:

如何获得Android设备名称(ADB命令详细介绍)

官方说明
全网最全,adb常用命令大全(详细)全覆盖,看这篇就够了.. adb 模拟按键输入命令大全语法格式物理键。 阅读详情

相关推荐

ADB各种操作指令详解大汇总

1. ADB:ADB,即 Android Debug Bridge,它是 Android 开发/测试人员不可替代的强大工具,也是 Android 设备玩家的好玩具。可用于执行各种设备操作(例如安装和调试应用),并提供对 Unix shell(可用来在设备上运行各种命令)的访问权限。客户端:用于发送命令。客户端在开发计算机上运行。您可以通过发出 ADB命令来从命令行终端调用客户端。守护进程:在设备上运行命令。守护进程在每个设备上作为后台进程运行。服务器:管理客户端和守护进程之间的通信。...

数据知道的博客 4万+

ADB常用命令及其用法大全

前言: 本文主要记述ADB的常用命令,关于ADB用法大全,可参考文末链接 ADB简介: ADB,即 Android Debug Bridge,它是 Android 开发/测试人员不可替代的强大工具,也是 Android 设备玩家的好玩具。安卓调试桥 (Android Debug Bridge, adb),是一种可以用来操作手机设备或模拟器的命令行工具。它存在于 sdk/platform-to...

手写我对你的温柔 53万+

告别‘耀斑’降落:手把手教你用PX4+激光测距仪实现固定翼精准自动着陆

本文详细介绍了如何利用PX4飞控与激光测距仪实现固定翼无人机的精准自动着陆,解决传统气压计在低空环境下的测量误差问题。通过硬件选型、安装要点、PX4参数配置及实战调校,帮助开发者实现厘米级高度感知,优化降落曲线,提升着陆稳定性与安全性。

weixin_30336061的博客 522

安卓测试常用的 ADB 命令大全,非常全!!!!!

一、前言  1、介绍:     学习前是不是得先看看 adb 具体是啥东西,好吧,网上一大堆,截取了部分如下:SDK的Tools文件夹下包含着Android模拟器操作的重要命令adb,adb的全称为(Android Debug Bridge就是调试桥的作用。通过adb我们可以在Eclipse中方面通过DDMS来调试Android程序。借助这个工具,我们可以管理设备或手机模拟器的状态。还可以进行以下...

MzTestor的博客 15万+

永久关闭Windows更新的5种方法

很多家用电脑,如果系统自动更新的话,会变得越来越卡顿,且硬件型号兼容也并不完美。那么我们该如何彻底关闭Win11的自动更新呢?以下准备了5种方法,您可以根据自身实际情况选择合适的方法!

qq_43652793的博客 1万+

Zynq远程更新程序实战:从UDP传输到Flash烧写的完整避坑指南

本文详细介绍了Zynq远程更新程序的完整实现流程,从UDP传输到Flash烧写的全链路避坑指南。针对ZU11EG等Zynq UltraScale+ MPSoC器件,分享了网络通信、EMMC缓存和QSPI Flash编程等关键技术,帮助开发者构建稳定可靠的远程更新系统。

t8u9v0w1x的博客 444

android 删除wifi文件,Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)...

获取序列号:adb get-serialno查看连接计算机的设备:adb devices重启机器:adb reboot重启到bootloader,即刷机模式:adb reboot bootloader重启到recovery,即恢复模式:adb reboot recovery查看log:adb logcat终止adb服务进程:adb kill-server重启adb服务进程:adb start-se...

weixin_36086032的博客 1516

FPGA之全数字锁相环(DPLL)

1. 数字锁相环的基本原理和组成 1.1 锁相环(PLL)的简介 锁相环最开始并不是用在数字电路中,而是模拟短路中。对于模拟电路中的锁相环,大家可以参考这篇文章稍微看一下,数字和模拟只是实现的方法不同,但是原理、步骤还是共同的。关于模拟PLL。可以参考一片文章: http://www.sohu.com/a/190569594_464086 首先在学习数字锁相环之前,我们应该先了解什么是锁相环?锁相...

DBLLLLLLLL的博客 5万+

Android adb命令大全(通过adb命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)

adb命令很强大,记住一些adb命令有助于提高工作效率。 获取序列号: adb get-serialno 查看连接计算机的设备: adb devices 重启机器: adb reboot 重启到bootloader,即刷机模式: adb reboot bootloader 重启到recovery,即恢复模式: adb reboot recov

浅梦墨汐的博客 1394

方法二:旋转机械动平衡精度计算

本文以实际案例为基础,系统阐述基于ISO 1940标准的动平衡精度G GG等级计算方法。通过角速度转换、许用剩余不平衡量e p e r e_{per}e per ​ 推导及G GG等级公式应用,结合惯性力偶矩、转子质量等参数,得出某转子系统的动平衡精度为G 40 G40G40。文中详细解析了公式原理与参数单位转换要点,并附完整ISO 1940动平衡等级参考表,为工程师提供从理论到实践的完整解决方案。研究结果表明,该方法可有效量化旋转机械的平衡精度,适用于风机、泵类等中低速设备的设计与调试,对提升设备运行

weixin_46153372的博客 925

嵌入式工程师成长之路(1)——元件基础(试读版)

上拉电阻阻值选错导致MCU反复重启?0欧电阻竟然能“背锅”信号干扰?高精密采样电阻的温漂毁了整个控制系统?——这些问题,都是基础不牢!CSDN硬件领域头部博主十年经验汇总,涵盖电阻分类、封装、实战选型、避坑指南,附带职业进阶路径,助你从小白进阶为“电路医生”!

云轩阁 34万+

android shn1 获取_Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)...

adb 介绍adb的全称为Android Debug Bridge 调试桥,是连接Android手机与PC端的桥梁,通过adb可以管理、操作模拟器和设备,如安装软件、系统升级、运行shell命令等。管理设备注:android手机、模拟器统一称为“设备”adbdevices//显示连接到计算机的设备adbget-serialno//获取设备的ID和序列号serialNumber----...

weixin_29028611的博客 328

抑制电磁干扰(EMI)的实用电路技术

抑制电磁干扰(EMI)的实用电路技术 qtFK_EMC_EMI 【导读】本系列文章的第 1 部分至第 4 部分详细介绍了开关电源稳压器引起的传导发射和辐射发射,包括噪声产生机制、测量要求、频率范围、适用的测试限值、传播模式和寄生效应。在第 5 部分中,我将基于这一理论基础介绍抑制电磁干扰 (EMI) 的实用电路技术。 一般来说,电路原理图和印刷电路板 (PCB) 对于实现出色的 EMI 性能至关重要。第 3 部分重点强调通过谨慎的元器件选型和 PCB 布局尽量减小“功率回路”寄生电感的重要性。电源转换

学海无涯的专栏 1203

linux adb查看设备时间,Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)...

获取序列号:adb get-serialno查看连接计算机的设备:adb devices重启机器:adb reboot重启到bootloader,即刷机模式:adb reboot bootloader重启到recovery,即恢复模式:adb reboot recovery查看log:adb logcat终止adb服务进程:adb kill-server重启adb服务进程:adb start-se...

weixin_42097508的博客 556

NSGA-II 多目标优化 —— 理论、案例与交互式 GUI 实现

本文详细介绍了 NSGA-II 多目标优化算法的基本原理、数学模型和实现流程。从非支配排序、拥挤距离计算到遗传操作,NSGA-II 通过对种群进行分层和排序,能够有效求解多目标优化问题,获得 Pareto 前沿解集。通过机械结构优化、资源分配和控制参数调优等典型案例,我们展示了 NSGA-II 在实际工程中的广泛应用。为帮助工程师和研究者更直观地理解算法求解过程,本文提供了基于 Python 与 PyQt6 的交互式 GUI 演示系统代码示例。

闲人编程的博客 2124

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

adb命令获取sys_Android ADB命令大全(通过ADB命令查看wifi密码、MAC地址、设备信息、操作文件、查看文件、日志信息、卸载、启动和安装APK等)...

获取序列号:adb get-serialno查看连接计算机的设备:adb devices重启机器:adb reboot重启到bootloader,即刷机模式:adb reboot bootloader重启到recovery,即恢复模式:adb reboot recovery查看log:adb logcat终止adb服务进程:adb kill-server重启adb服务进程:adb start-se...

weixin_29306571的博客 238

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: Android一个APK多个入口(多个桌面图标)的实现
下一篇: Windows系统下的奇技淫巧大汇总
张明云
博客等级 码龄16年 271粉丝 80原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值