Android SDK 中常用的几个命令

本文深入解析了Android SDK中的关键命令,包括如何关闭和启动ADB服务、查看连接设备、安装与卸载应用,以及如何通过shell命令在指定设备上启动应用和进行文件操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

<Android SDK directory>\tools

 

adb kill-server 关闭adb服务

adb start-server

 

adb devices 查看当前在线的模拟器或是真机数量

 

adb -s emulator-5554 install parking.apk 把parking.apk安装到指定的机器上

adb -s emulator-5554 install -r parking.apk

 

adb -s emulator-5554 uninstall com.yh.park

 

adb -s emulator-5554 shell am start -n com.yh.park/com.yh.park.Main 

在指定的机器上通过shell启动parking这个app

 

adb -s emulator-5554 pull /sdcard/1.jpg picture.jpg

把指定手机上内存卡根目录中的1.jpg copy 到PC的当前目录中,并重命名为picture.jpg

 

adb -s emulator-5554 push picture.jpg /sdcard/1.jpg

 

adb -s emulator-5554 shell 在PC上进入Android shell里面

进入shell之后 输入 cd system/bin , 再输入ls 可以查看当前Android系统支持的命令文件

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值