harmony?鴻蒙hdc_std常用操作命令大全
鴻蒙hdc_std 常用操作命令大全
讀卡器USB權限問題:
進入shell:hdc_std shell
lsusb
找到ID為06ce:e03f的設備,例如Bus 005 Device 006: ID 06ce:e03f
執行:chmod 777 /dev/bus/usb/005/*
shell
# 1. 獲取設備UDID
hdc_std list targets
hdc_std shell bm get -u
# 2. 全新安裝HAP
hdc_std install entry-default-signed.hap
# 3. 覆蓋升級安裝(保留應用數據)
hdc_std install -r entry/build/default/outputs/default/entry-default-signed.hap
# 4. 列出設備所有已安裝應用包名
hdc_std shell bm dump -a
# 5. 卸載指定應用
hdc_std uninstall com.example.donseereader
# 6. 過濾查找讀卡器相關應用
hdc_std shell
bm dump -a | grep donsee
# 7. 查詢設備CPU架構
hdc_std shell param get const.product.cpu.abilist
# 8. 查詢設備系統版本
hdc_std shell param get const.product.software.version
# 9. bat截圖
創建jietu.bat,放下面代碼進去
set filepath=/data/%date:~0,4%%date:~5,2%%date:~8,2%%time:~1,1%%time:~3,2%%time:~6,2%.jpeg
echo %filepath%
: pause
hdc_std shell snapshot_display -f %filepath%
: pause
hdc_std file recv %filepath% ./
: pause








































