usb通过hdc连接鸿蒙next的常用指令

参考官方 注册报名https://www.hiascend.com/developer/activities/details/44de441ef599450596131c8cb52f7f8c/signup?channelCode=S1\&recommended=496144

hdc-调试命令-调测调优-系统 - 华为HarmonyOS开发者https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V13/hdc-V13

hdc是用于Openharmony的命令行调试工具,这边将它与android的adb进行对应

|-------------|-------------|
| Openharmony | Android |
| Ability | Activity |
| bundle | packageName |

用中文说的话就是 以前adb 获取的包名,在纯血鸿蒙中就叫bundle ,

android 运行的activity 现在叫 ability

关于 hdc 的服务,在任务管理器中可以看到

hdc进程带有参数 dummy -l 3-s::ffff:127.0.0.1:8710 -m

参数解释

dummy

表示运行 HDC 工具的 dummy 子命令。

dummy 通常用于模拟或测试连接,可能与特定调试场景相关。

-l 3

设置日志等级(Log Level)。

具体级别通常按数字区分:

0: 不输出日志。

1: 输出错误日志。

2: 输出警告和错误日志。

3: 输出详细的调试日志(通常是最详细的)。

-s ::ffff:127.0.0.1:8710

指定连接的目标地址和端口。

::ffff:127.0.0.1 是 IPv4 地址(127.0.0.1)在 IPv6 映射中的表示方式。

127.0.0.1: 指向本地回环地址(localhost)。

8710: 指定的端口号。

该参数通常用于指定设备或服务的连接地址,表示将 HDC 连接到本地设备或服务。

-m

可能是一个标志参数(Flag),通常表示启用特定模式或功能。

具体作用需要查看 hdc.exe 的文档或帮助信息。

常用命令

以微信(com.tencent.wechat)为例

1、查看系统安装了哪些应用

hdc shell bm dump -a

2、查询该应用的详细信息

hdc shell bm dump -n com.tencent.wechat -u 100

得到下面一坨东东

com.tencent.wechat:
{
    "appId": "com.tencent.wechat_BDzt+HA+eicpXsiMTgQzrRAEE6KUDZUCzKE42ck22zI8VHF5r6G6ZGj8fMCmPOnf/3U5rnRlUcgYKwTA7ZEDnyg=",
    "appIdentifier": "5765880207854244859",
    "appIndex": 0,
    "applicationInfo": {
        "GWPAsanEnabled": false,
        "accessTokenId": 537063932,
        "accessTokenIdEx": 537063932,
        "accessible": false,
        "allowAppRunWhenDeviceFirstLocked": false,
        "allowCommonEvent": [],
        "allowEnableNotification": false,
        "apiCompatibleVersion": 50001013,
        "apiReleaseType": "Release",
        "apiTargetVersion": 50001013,
        "appDetailAbilityLibraryPath": "",
        "appDistributionType": "app_gallery",
        "appEnvironments": [
            {
                "name": "ASAN_OPTIONS",
                "value": "detect_stack_use_after_return=true alloc_dealloc_mismatch=0 detect_container_overflow=0"
            }
        ],
        "appIndex": 0,
        "appPrivilegeLevel": "normal",
        "appProvisionType": "release",
        "appQuickFix": {
            "bundleName": "",
            "deployedAppqfInfo": {
                "cpuAbi": "",
                "hqfInfos": [],
                "nativeLibraryPath": "",
                "type": 0,
                "versionCode": 0,
                "versionName": ""
            },
            "deployingAppqfInfo": {
                "cpuAbi": "",
                "hqfInfos": [],
                "nativeLibraryPath": "",
                "type": 0,
                "versionCode": 0,
                "versionName": ""
            },
            "versionCode": 0,
            "versionName": ""
        },
        "applicationFlags": 1,
        "applicationReservedFlag": 1,
        "arkNativeFileAbi": "",
        "arkNativeFilePath": "",
        "asanEnabled": false,
        "asanLogPath": "",
        "associatedWakeUp": false,
        "bundleName": "com.tencent.wechat",
        "bundleType": 0,
        "cacheDir": "",
        "cloudFileSyncEnabled": false,
        "codePath": "/data/app/el1/bundle/public/com.tencent.wechat",
        "compileSdkType": "HarmonyOS",
        "compileSdkVersion": "5.0.1.112",
        "configuration": "",
        "cpuAbi": "arm64-v8a",
        "crowdtestDeadline": -1,
        "dataBaseDir": "/data/app/el2/database/com.tencent.wechat",
        "dataDir": "",
        "debug": false,
        "description": "",
        "descriptionId": 0,
        "descriptionResource": {
            "bundleName": "com.tencent.wechat",
            "id": 0,
            "moduleName": "entry"
        },
        "deviceId": "PHONE-001",
        "distributedNotificationEnabled": true,
        "enabled": true,
        "entityType": "unspecified",
        "entryDir": "",
        "entryModuleName": "",
        "fingerprint": "9D4F2B7B0310D637EF99505FAF5FC7C5B8FF16C84B44C4BEABA4F8859BB45912",
        "flags": 0,
        "formVisibleNotify": false,
        "hideDesktopIcon": false,
        "hnpPackages": {},
        "hwasanEnabled": false,
        "icon": "",
        "iconId": 788529153,
        "iconPath": "$media:app_icon",
        "iconResource": {
            "bundleName": "com.tencent.wechat",
            "id": 788529153,
            "moduleName": "entry"
        },
        "installSource": "com.huawei.hmsapp.appgallery",
        "isCompressNativeLibs": true,
        "isFreeInstallApp": false,
        "isLauncherApp": false,
        "isSystemApp": false,
        "keepAlive": false,
        "label": "$string:app_name",
        "labelId": 788529156,
        "labelResource": {
            "bundleName": "com.tencent.wechat",
            "id": 788529156,
            "moduleName": "entry"
        },
        "maxChildProcess": 1,
        "metaData": {},
        "metadata": {},
        "minCompatibleVersionCode": 1049386,
        "moduleInfos": [
            {
                "moduleName": "entry",
                "moduleSourceDir": "",
                "preloads": []
            }
        ],
        "moduleSourceDirs": [],
        "multiAppMode": {
            "maxCount": 1,
            "multiAppModeType": 2
        },
        "multiProjects": false,
        "name": "com.tencent.wechat",
        "nativeLibraryPath": "libs/arm64",
        "needAppDetail": false,
        "organization": "腾讯科技(北京)有限公司",
        "overlayState": 0,
        "permissions": [],
        "process": "com.tencent.wechat",
        "removable": true,
        "resourcesApply": [],
        "runningResourcesApply": false,
        "signatureKey": "",
        "singleton": false,
        "supportedModes": 0,
        "targetBundleList": [],
        "targetBundleName": "",
        "targetPriority": 0,
        "tsanEnabled": false,
        "ubsanEnabled": false,
        "uid": 20020196,
        "userDataClearable": true,
        "vendor": "Tencent",
        "versionCode": 1049386,
        "versionName": "1.0.3.42"
    },
    "compatibleVersion": 50001013,
    "cpuAbi": "",
    "defPermissions": [],
    "description": "",
    "entryInstallationFree": false,
    "entryModuleName": "entry",
    "gid": 20020196,
    "hapModuleInfos": [
        {
            "abilityInfos": [
                {
                    "appIndex": 0,
                    "applicationName": "com.tencent.wechat",
                    "backgroundModes": 130,
                    "bundleName": "com.tencent.wechat",
                    "codePath": "",
                    "compileMode": 1,
                    "configChanges": [],
                    "continuable": false,
                    "continueBundleName": [],
                    "continueType": [
                        "EntryAbility"
                    ],
                    "defaultFormHeight": 0,
                    "defaultFormWidth": 0,
                    "description": "$string:EntryAbility_desc",
                    "descriptionId": 788529155,
                    "deviceCapabilities": [],
                    "deviceTypes": [
                        "phone",
                        "tablet",
                        "2in1"
                    ],
                    "enabled": true,
                    "excludeFromDock": false,
                    "excludeFromMissions": false,
                    "extensionAbilityType": 255,
                    "formEnabled": false,
                    "formEntity": 0,
                    "hapPath": "/data/app/el1/bundle/public/com.tencent.wechat/entry.hap",
                    "iconId": 788529153,
                    "iconPath": "$media:app_icon",
                    "isLauncherAbility": false,
                    "isModuleJson": true,
                    "isNativeAbility": false,
                    "isStageBasedModel": true,
                    "isolationProcess": false,
                    "kind": "",
                    "label": "$string:EntryAbility_label",
                    "labelId": 788529156,
                    "launchMode": 0,
                    "maxWindowHeight": 0,
                    "maxWindowRatio": 0,
                    "maxWindowWidth": 0,
                    "metaData": {
                        "customizeData": []
                    },
                    "metadata": [],
                    "minFormHeight": 0,
                    "minFormWidth": 0,
                    "minWindowHeight": 0,
                    "minWindowRatio": 0,
                    "minWindowWidth": 0,
                    "moduleName": "entry",
                    "name": "EntryAbility",
                    "orientation": 0,
                    "orientationId": 0,
                    "package": "entry",
                    "permissions": [],
                    "preferMultiWindowOrientation": "default",
                    "priority": 0,
                    "process": "",
                    "readPermission": "",
                    "recoverable": false,
                    "removeMissionAfterTerminate": false,
                    "resourcePath": "/data/app/el1/bundle/public/com.tencent.wechat/entry/resources.index",
                    "skills": [
                        {
                            "actions": [
                                "action.system.home",
                                "action.ohos.push.listener"
                            ],
                            "domainVerify": false,
                            "entities": [
                                "entity.system.home"
                            ],
                            "permissions": [],
                            "uris": []
                        },
                        {
                            "actions": [
                                "action.system.home",
                                "ohos.want.action.viewData"
                            ],
                            "domainVerify": false,
                            "entities": [
                                "entity.system.home"
                            ],
                            "permissions": [],
                            "uris": [
                                {
                                    "host": "",
                                    "linkFeature": "",
                                    "maxFileSupported": 0,
                                    "path": "",
                                    "pathRegex": "",
                                    "pathStartWith": "",
                                    "port": "",
                                    "scheme": "weixin",
                                    "type": "",
                                    "utd": ""
                                }
                            ]
                        },
                        {
                            "actions": [
                                "action.system.home",
                                "ohos.want.action.viewData"
                            ],
                            "domainVerify": false,
                            "entities": [
                                "entity.system.home"
                            ],
                            "permissions": [],
                            "uris": [
                                {
                                    "host": "wap",
                                    "linkFeature": "",
                                    "maxFileSupported": 0,
                                    "path": "",
                                    "pathRegex": "",
                                    "pathStartWith": "",
                                    "port": "",
                                    "scheme": "weixin",
                                    "type": "",
                                    "utd": ""
                                },
                                {
                                    "host": "betalogin",
                                    "linkFeature": "",
                                    "maxFileSupported": 0,
                                    "path": "",
                                    "pathRegex": "",
                                    "pathStartWith": "",
                                    "port": "",
                                    "scheme": "weixin",
                                    "type": "",
                                    "utd": ""
                                }
                            ]
                        },
                        {
                            "actions": [
                                "ohos.want.action.sendData"
                            ],
                            "domainVerify": false,
                            "entities": [
                                "entity.system.home"
                            ],
                            "permissions": [],
                            "uris": [
                                {
                                    "host": "",
                                    "linkFeature": "",
                                    "maxFileSupported": 1,
                                    "path": "",
                                    "pathRegex": "",
                                    "pathStartWith": "",
                                    "port": "",
                                    "scheme": "file",
                                    "type": "",
                                    "utd": "general.image"
                                },
                                {
                                    "host": "",
                                    "linkFeature": "",
                                    "maxFileSupported": 1,
                                    "path": "",
                                    "pathRegex": "",
                                    "pathStartWith": "",
                                    "port": "",
                                    "scheme": "file",
                                    "type": "",
                                    "utd": "general.video"
                                }
                            ]
                        }
                    ],
                    "srcEntrance": "./ets/entryability/EntryAbility.ets",
                    "srcLanguage": "js",
                    "srcPath": "",
                    "startWindowBackground": "$color:entry_start_window_background",
                    "startWindowBackgroundId": 788529168,
                    "startWindowIcon": "$media:start_window_icon",
                    "startWindowIconId": 788529170,
                    "supportExtNames": [],
                    "supportMimeTypes": [],
                    "supportPipMode": false,
                    "supportWindowMode": [
                        0,
                        1,
                        2
                    ],
                    "targetAbility": "",
                    "theme": "",
                    "type": 1,
                    "uid": -1,
                    "unclearableMission": false,
                    "uri": "",
                    "visible": true,
                    "writePermission": ""
                }
            ],
            "aotCompileStatus": 0,
            "appEnvironments": [],
            "appStartup": "",
            "backgroundImg": "",
            "buildHash": "",
            "bundleName": "com.tencent.wechat",
            "colorMode": -1,
            "compileMode": 1,
            "compressNativeLibs": true,
            "cpuAbi": "",
            "deliveryWithInstall": true,
            "dependencies": [],
            "description": "$string:module_desc",
            "descriptionId": 788529166,
            "deviceTypes": [
                "phone",
                "tablet",
                "2in1"
            ],
            "extensionInfos": [
                {
                    "appIndex": 0,
                    "bundleName": "com.tencent.wechat",
                    "compileMode": 1,
                    "dataGroupIds": [],
                    "description": "",
                    "descriptionId": 0,
                    "enabled": true,
                    "extensionProcessMode": -1,
                    "extensionTypeName": "backup",
                    "hapPath": "/data/app/el1/bundle/public/com.tencent.wechat/entry.hap",
                    "icon": "",
                    "iconId": 0,
                    "label": "",
                    "labelId": 0,
                    "metadata": [
                        {
                            "name": "ohos.extension.backup",
                            "resource": "$profile:backup_config",
                            "value": ""
                        }
                    ],
                    "moduleName": "entry",
                    "name": "EntryBackupAbility",
                    "needCreateSandbox": false,
                    "permissions": [],
                    "priority": 0,
                    "process": "com.tencent.wechat:backup",
                    "readPermission": "",
                    "resourcePath": "/data/app/el1/bundle/public/com.tencent.wechat/entry/resources.index",
                    "skills": [],
                    "srcEntrance": "./ets/entrybackupability/EntryBackupAbility.ets",
                    "type": 9,
                    "uid": -1,
                    "uri": "",
                    "validDataGroupIds": [],
                    "visible": false,
                    "writePermission": ""
                },
                {
                    "appIndex": 0,
                    "bundleName": "com.tencent.wechat",
                    "compileMode": 1,
                    "dataGroupIds": [],
                    "description": "PushExtAbility test",
                    "descriptionId": 0,
                    "enabled": true,
                    "extensionProcessMode": -1,
                    "extensionTypeName": "remoteNotification",
                    "hapPath": "/data/app/el1/bundle/public/com.tencent.wechat/entry.hap",
                    "icon": "",
                    "iconId": 0,
                    "label": "",
                    "labelId": 0,
                    "metadata": [],
                    "moduleName": "entry",
                    "name": "RemoteNotificationExtAbility",
                    "needCreateSandbox": false,
                    "permissions": [],
                    "priority": 0,
                    "process": "com.tencent.wechat:remoteNotification",
                    "readPermission": "",
                    "resourcePath": "/data/app/el1/bundle/public/com.tencent.wechat/entry/resources.index",
                    "skills": [
                        {
                            "actions": [
                                "action.hms.push.extension.remotenotification"
                            ],
                            "domainVerify": false,
                            "entities": [],
                            "permissions": [],
                            "uris": []
                        }
                    ],
                    "srcEntrance": "./ets/entryability/PushExtAbility.ets",
                    "type": 260,
                    "uid": -1,
                    "uri": "",
                    "validDataGroupIds": [],
                    "visible": false,
                    "writePermission": ""
                }
            ],
            "fileContextMenu": "",
            "hapPath": "/data/app/el1/bundle/public/com.tencent.wechat/entry.hap",
            "hashValue": "6cfc97af5e5ff90edb57e6f1e53c79132326ed7c3a8ece377960a124fca02bfe",
            "hqfInfo": {
                "cpuAbi": "",
                "hapSha256": "",
                "hqfFilePath": "",
                "moduleName": "",
                "nativeLibraryPath": "",
                "type": 0
            },
            "iconId": 788529153,
            "iconPath": "$media:app_icon",
            "installationFree": false,
            "isLibIsolated": false,
            "isModuleJson": true,
            "isRemovable": {},
            "isStageBasedModel": true,
            "isolationMode": 0,
            "label": "$string:EntryAbility_label",
            "labelId": 788529156,
            "mainAbility": "EntryAbility",
            "mainElementName": "EntryAbility",
            "metadata": [
                {
                    "name": "client_id",
                    "resource": "",
                    "value": "110859259"
                },
                {
                    "name": "half_leading",
                    "resource": "",
                    "value": "true"
                }
            ],
            "moduleName": "entry",
            "moduleSourceDir": "",
            "moduleType": 1,
            "name": "entry",
            "nativeLibraryFileNames": [],
            "nativeLibraryPath": "",
            "overlayModuleInfos": [],
            "package": "entry",
            "packageName": "entry",
            "pages": "",
            "preloads": [],
            "process": "com.tencent.wechat",
            "proxyDatas": [],
            "reqCapabilities": [],
            "resourcePath": "/data/app/el1/bundle/public/com.tencent.wechat/entry/resources.index",
            "routerArray": [
                {
                    "buildFunction": "WAPageBuilder",
                    "bundleName": "com.tencent.wechat",
                    "customData": "",
                    "data": {},
                    "moduleName": "entry",
                    "name": "ChildPage",
                    "ohmurl": "@normalized:N&&&feat_weapp/src/main/ets/core/page/WAPage&1.0.0",
                    "pageSourceFile": "src/main/ets/core/page/WAPage.ets"
                },
                {
                    "buildFunction": "WALoadingPageBuilder",
                    "bundleName": "com.tencent.wechat",
                    "customData": "",
                    "data": {},
                    "moduleName": "entry",
                    "name": "WALoadingPage",
                    "ohmurl": "@normalized:N&&&feat_weapp/src/main/ets/core/page/WALoadingPage&1.0.0",
                    "pageSourceFile": "src/main/ets/core/page/WALoadingPage.ets"
                }
            ],
            "routerMap": "$profile:default-router-map",
            "srcEntrance": "./ets/abilitystate/WXAbilityStage.ets",
            "srcPath": "",
            "supportedModes": 0,
            "uiSyntax": "hml",
            "upgradeFlag": 0,
            "virtualMachine": ""
        }
    ],
    "hapModuleNames": [
        "entry"
    ],
    "installTime": 1736141906722,
    "isDifferentName": false,
    "isKeepAlive": false,
    "isNativeApp": false,
    "isNewVersion": true,
    "isPreInstallApp": false,
    "jointUserId": "",
    "label": "",
    "mainEntry": "entry",
    "maxSdkVersion": -1,
    "minCompatibleVersionCode": 1049386,
    "minSdkVersion": -1,
    "moduleDirs": [
        "/data/app/el1/bundle/public/com.tencent.wechat/entry"
    ],
    "moduleNames": [
        "entry"
    ],
    "modulePublicDirs": [
        ""
    ],
    "moduleResPaths": [
        "/data/app/el1/bundle/public/com.tencent.wechat/entry/resources.index"
    ],
    "name": "com.tencent.wechat",
    "oldAppIds": [
        "com.tencent.wechat_BDzt+HA+eicpXsiMTgQzrRAEE6KUDZUCzKE42ck22zI8VHF5r6G6ZGj8fMCmPOnf/3U5rnRlUcgYKwTA7ZEDnyg="
    ],
    "overlayBundleInfos": [],
    "overlayType": 3,
    "releaseType": "Release",
    "reqPermissionDetails": [
        {
            "moduleName": "entry",
            "name": "ohos.permission.ACCELEROMETER",
            "reason": "$string:request_accelerometer_permission_reason",
            "reasonId": 788530365,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.ACCESS_BLUETOOTH",
            "reason": "$string:permission_reason_access_bluetooth",
            "reasonId": 788530359,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.APPROXIMATELY_LOCATION",
            "reason": "$string:Permission_APPROXIMATELY_LOCATION_reason",
            "reasonId": 788529982,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.APP_TRACKING_CONSENT",
            "reason": "$string:Permission_APP_TRACKING_CONSENT_reason",
            "reasonId": 788529157,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.CAMERA",
            "reason": "$string:request_permission_camera_reason",
            "reasonId": 788529167,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.GET_NETWORK_INFO",
            "reason": "$string:Permission_GET_NETWORK_INFO_reason",
            "reasonId": 788529158,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.GET_WIFI_INFO",
            "reason": "",
            "reasonId": 0,
            "usedScene": {
                "abilities": [],
                "when": ""
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.GYROSCOPE",
            "reason": "$string:request_gyroscope_permission_reason",
            "reasonId": 788530366,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.INTERNET",
            "reason": "$string:Permission_INTERNET_reason",
            "reasonId": 788529159,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
            "reason": "$string:Permission_KEEP_BACKGROUND_RUNNING_reason",
            "reasonId": 788529160,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "always"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.LOCATION",
            "reason": "$string:request_permission_location",
            "reasonId": 788530369,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.MICROPHONE",
            "reason": "$string:request_permission_mic_reason",
            "reasonId": 788530907,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.PRIVACY_WINDOW",
            "reason": "$string:Permission_PRIVACY_WINDOW_reason",
            "reasonId": 788529161,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.READ_CALENDAR",
            "reason": "$string:permission_reason_read_calendar",
            "reasonId": 788530360,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.READ_PASTEBOARD",
            "reason": "$string:request_pasteboard_permission_reason",
            "reasonId": 788530367,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.RUNNING_LOCK",
            "reason": "$string:Permission_PROXIMITY_RUNNING_LOCK_reason",
            "reasonId": 788529162,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.SET_WIFI_INFO",
            "reason": "$string:permission_reason_set_wifi_info",
            "reasonId": 788530361,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.STORE_PERSISTENT_DATA",
            "reason": "$string:Permission_STORE_PERSISTENT_DATA_reason",
            "reasonId": 788529163,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.VIBRATE",
            "reason": "$string:Permission_VIBRATE_reason",
            "reasonId": 788529164,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        },
        {
            "moduleName": "entry",
            "name": "ohos.permission.WRITE_CALENDAR",
            "reason": "$string:permission_reason_write_calendar",
            "reasonId": 788530362,
            "usedScene": {
                "abilities": [
                    "EntryAbility"
                ],
                "when": "inuse"
            }
        }
    ],
    "reqPermissionStates": [
        0,
        -1,
        -1,
        -1,
        -1,
        0,
        0,
        0,
        0,
        0,
        -1,
        -1,
        0,
        -1,
        -1,
        0,
        0,
        0,
        0,
        -1
    ],
    "reqPermissions": [
        "ohos.permission.ACCELEROMETER",
        "ohos.permission.ACCESS_BLUETOOTH",
        "ohos.permission.APPROXIMATELY_LOCATION",
        "ohos.permission.APP_TRACKING_CONSENT",
        "ohos.permission.CAMERA",
        "ohos.permission.GET_NETWORK_INFO",
        "ohos.permission.GET_WIFI_INFO",
        "ohos.permission.GYROSCOPE",
        "ohos.permission.INTERNET",
        "ohos.permission.KEEP_BACKGROUND_RUNNING",
        "ohos.permission.LOCATION",
        "ohos.permission.MICROPHONE",
        "ohos.permission.PRIVACY_WINDOW",
        "ohos.permission.READ_CALENDAR",
        "ohos.permission.READ_PASTEBOARD",
        "ohos.permission.RUNNING_LOCK",
        "ohos.permission.SET_WIFI_INFO",
        "ohos.permission.STORE_PERSISTENT_DATA",
        "ohos.permission.VIBRATE",
        "ohos.permission.WRITE_CALENDAR"
    ],
    "routerArray": [
        {
            "buildFunction": "WAPageBuilder",
            "bundleName": "com.tencent.wechat",
            "customData": "",
            "data": {},
            "moduleName": "entry",
            "name": "ChildPage",
            "ohmurl": "@normalized:N&&&feat_weapp/src/main/ets/core/page/WAPage&1.0.0",
            "pageSourceFile": "src/main/ets/core/page/WAPage.ets"
        },
        {
            "buildFunction": "WALoadingPageBuilder",
            "bundleName": "com.tencent.wechat",
            "customData": "",
            "data": {},
            "moduleName": "entry",
            "name": "WALoadingPage",
            "ohmurl": "@normalized:N&&&feat_weapp/src/main/ets/core/page/WALoadingPage&1.0.0",
            "pageSourceFile": "src/main/ets/core/page/WALoadingPage.ets"
        }
    ],
    "seInfo": "",
    "singleton": false,
    "targetVersion": 50001013,
    "uid": 20020196,
    "updateTime": 1736465427604,
    "userInfo": [
        {
            "accessTokenId": 537063932,
            "accessTokenIdEx": 537063932,
            "bundleName": "com.tencent.wechat",
            "bundleUserInfo": {
                "disabledAbilities": [],
                "enabled": true,
                "overlayState": [],
                "setEnabledCaller": "",
                "userId": 100
            },
            "cloneInfos": {},
            "gids": [
                20020196
            ],
            "installTime": 1736141906722,
            "isRemovable": true,
            "keyId": "",
            "uid": 20020196,
            "updateTime": 1736465427604
        }
    ],
    "vendor": "Tencent",
    "versionCode": 1049386,
    "versionName": "1.0.3.42"
}

顶层字段

字段名称 含义
appId 应用程序的唯一标识符,通常由系统生成,用于标识应用。
appIdentifier 应用的唯一标识符,与 appId 类似,用于应用管理。
appIndex 应用索引编号,在多个应用程序中用于标识应用的顺序。
applicationInfo 应用的详细信息,包含更多配置和元数据,详细字段见下文。
compatibleVersion 应用程序的兼容版本,用于表示该应用适配的最小 API 版本。
cpuAbi 应用支持的 CPU 架构,例如 arm64-v8a 表示支持 64 位 ARM 架构。
hapModuleInfos 应用的模块信息,列出了所有 HAP 模块及其包含的能力。
installTime 应用的安装时间(时间戳)。
updateTime 应用的最后更新时间(时间戳)。
name 应用的包名(bundleName),唯一标识应用程序的包名称。
vendor 应用的供应商信息,例如腾讯公司。
versionCode 应用的版本号(整数),表示软件版本的递增编号,用于更新判断。
versionName 应用的版本名称(字符串),用户可见的版本号。

applicationInfo 字段

该字段包含了应用的详细信息:

字段名称 含义
GWPAsanEnabled 是否启用 AddressSanitizer(ASan)调试工具,用于检测内存问题。
accessible 表示应用是否可访问,通常用于权限控制。
allowAppRunWhenDeviceFirstLocked 是否允许应用在设备首次锁定时运行。
apiCompatibleVersion 应用程序的兼容 API 版本。
apiTargetVersion 应用的目标 API 版本。
appDistributionType 应用的分发类型,例如 app_gallery 表示通过应用市场分发。
bundleName 应用包名,唯一标识应用。
codePath 应用程序代码所在的路径。
compileSdkType 应用编译时的 SDK 类型(如 HarmonyOS)。
compileSdkVersion 编译时使用的 SDK 版本号。
cpuAbi 应用支持的 CPU 架构,例如 arm64-v8a
dataBaseDir 应用的数据文件存储路径。
debug 是否处于调试模式。
enabled 应用是否启用。
entryDir 应用入口文件的路径。
flags 应用标志位,用于表示特殊属性(如系统应用标志)。
iconPath 应用图标的资源路径。
installSource 应用的安装来源(如应用市场 appgallery)。
isSystemApp 是否为系统应用。
label 应用的显示名称(如微信)。
organization 应用的组织或开发者名称。
permissions 应用请求的权限列表。
process 应用运行的默认进程名称。
uid 应用的用户 ID(系统分配)。

hapModuleInfos 字段

该字段包含了应用 HAP 模块的信息(HarmonyOS 应用程序的功能模块):

字段名称 含义
moduleName HAP 模块的名称,例如 entry
abilityInfos 模块中定义的功能能力,描述了应用的能力入口(如 EntryAbility)。
deviceTypes 模块支持的设备类型,例如手机(phone)、平板(tablet)。
extensionInfos 模块定义的扩展能力,例如远程通知扩展。
hapPath HAP 模块文件的路径。

permissions 字段

该字段定义了应用所请求的权限信息,例如:

权限名称 含义
ohos.permission.INTERNET 访问网络权限。
ohos.permission.LOCATION 访问设备位置信息的权限。
ohos.permission.CAMERA 使用摄像头权限。
ohos.permission.MICROPHONE 使用麦克风权限。

routerArray 字段

该字段描述了应用程序的页面路由信息:

字段名称 含义
name 路由的名称,例如 ChildPage
buildFunction 构建页面的函数,例如 WAPageBuilder
pageSourceFile 页面源文件路径。

3、启动、结束微信

hdc shell aa start -a EntryAbility -b com.tencent.wechat

hdc shell aa force-stop  com.tencent.wechat

4、截图并下载

命令:(注真机只能以jpeg为后缀,貌似只能放在/data/local/tmp/下)

hdc shell snapshot_display -f /data/local/tmp/screenshot.jpeg

hdc shell file recv/data/local/tmp/screenshot.jpeg  d:/

另外使用

uitest screenCap

也可以 然后拉取方式同上个方法

5、手机常亮:

hdc shell power-shell setmode 602

6 获取系统信息集群详细信息。

hidumper-调试命令-调测调优-系统 - 华为HarmonyOS开发者

hdc shell hidumper -c

获取"base"或者"system"信息集群详细信息。

hidumper -c base
hidumper -c system

7获取当前系统参数

param get

会得到下面一坨,注意如果查获取下面单独一个项的值 ,如const.product.name

则使用

params get const.product.name

const.product.productid = 0x2D034C11
    const.product.model = ALN-AL00
    const.product.name = HUAWEI Mate 60 Pro
    const.product.dfx.fans.stage = 1
    const.product.os.dist.apiname = 5.0.1
    const.product.os.dist.version = 5.0.0
    const.product.os.dist.apiversion = 50001
    const.product.os.dist.releasetype = Release
    const.product.cpu.abilist = arm64-v8a
    const.product.hide = false
    const.product.hide.matchers = OpenHarmony-5
    const.product.hide.replacements = OpenHarmony-5
    const.product.brand = HUAWEI
    const.product.build.type = default
    const.product.build.user = default
    const.product.build.host = default
    const.product.build.date = default
    const.product.software.version = ALN-AL00 5.0.0.123(C00E120R4P24)
    const.product.cover_mode = 2
    const.product.baseappid = 20000
    const.product.cover_window_size = 806,0,1260,2720
    const.product.device_radius = 36
    const.product.manufacturer = HUAWEI
    const.product.bootloader.version = bootloader
    const.product.incremental.version = default
    const.product.hardwareversion = HL1CMSM
    const.product.firstapiversion = 1
    const.product.hardwareprofile = default
    const.product.device_authentication = HWALN
    const.ohos.version.security_patch = 2025/01/01
    const.ohos.version.certified = OpenHarmony 5.0.1
    const.ohos.releasetype = Release
    const.ohos.apiversion = 13
    const.ohos.fullname = OpenHarmony-5.0.1.120
    const.ohos.buildroothash = default
    const.build.description = ALN-AL00-user 205.0.0 HUAWEIALN-AL00 123-CHN-LGRP1 release-keys
    const.build.product = ALN
    const.build.vendor.date = 2024-12-31 14:36:55
    const.build.vendor.date.utc = 1735598215155
    const.build.ver.physical = ALN-AL00 205.0.0.123(C00E120R4P24)
    const.build.system.date = 2024-12-31 15:34:36
    const.build.system.date.utc = 1735601676847
    const.build.sa_sdk_version = arm64_10.2.5.0
    const.SystemCapability.AI.AICaption = true
    const.SystemCapability.AI.AiEngine = true
    const.SystemCapability.AI.Face.Comparator = true
    const.SystemCapability.AI.Face.Detector = true
    const.SystemCapability.AI.OCR.TextRecognition = true
    const.SystemCapability.AI.Search = true
    const.SystemCapability.AI.Vision.ImageCaption = true
    const.SystemCapability.AI.Vision.VisionBase = true
    const.SystemCapability.AI.Vision.ObjectDetection = true
    const.SystemCapability.AI.Vision.SkeletonDetection = true
    const.SystemCapability.AI.Vision.SubjectSegmentation = true
    const.SystemCapability.AI.Component.CardRecognition = true
    const.SystemCapability.AI.Component.DocScan = true
    const.SystemCapability.AI.Component.LivenessDetect = true
    const.SystemCapability.AI.Component.TextReader = true
    const.SystemCapability.AI.GenerateAI.LLM = true
    const.SystemCapability.AI.HiAIFoundation = true
    const.SystemCapability.AI.InsightIntent = true
    const.SystemCapability.AI.MindSporeLite = true
    const.SystemCapability.AI.TextToSpeech = true
    const.SystemCapability.AI.IntelligentKws.Core = true
    const.SystemCapability.AI.ImageAnalyzerOverlay = true
    const.SystemCapability.AI.IntelligentVoice.Core = true
    const.SystemCapability.AI.NaturalLanguage.TextProcessing = true
    const.SystemCapability.AI.SpeechRecognizer = true
    const.SystemCapability.AI.NeuralNetworkRuntime = true
    const.SystemCapability.AI.VisionImageAnalyzer = true
    const.SystemCapability.Ai.MindSpore = true
    const.SystemCapability.AREngine.Core = true
    const.SystemCapability.Ability.AbilityBase = true
    const.SystemCapability.Ability.AppStartup = true
    const.SystemCapability.Ability.Form = true
    const.SystemCapability.Ability.AbilityRuntime.AbilityCore = true
    const.SystemCapability.Ability.AbilityRuntime.Core = true
    const.SystemCapability.Ability.AbilityRuntime.FAModel = true
    const.SystemCapability.Ability.AbilityRuntime.Mission = true
    const.SystemCapability.Ability.AbilityRuntime.QuickFix = true
    const.SystemCapability.Ability.AbilityTools.AbilityAssistant = true
    const.SystemCapability.Ability.AppExtension.PhotoEditorExtension = true
    const.SystemCapability.Ability.DistributedAbilityManager = true
    const.SystemCapability.Account.AppAccount = true
    const.SystemCapability.Account.OsAccount = true
    const.SystemCapability.ArkUI.ArkUI.Full = true
    const.SystemCapability.ArkUI.ArkUI.Lite = true
    const.SystemCapability.ArkUI.ArkUI.Napi = true
    const.SystemCapability.ArkUI.ArkUI.Libuv = true
    const.SystemCapability.ArkUI.UiAppearance = true
    const.SystemCapability.ArkUi.Graphics3D = true
    const.SystemCapability.Base = true
    const.SystemCapability.Game.GameService.GamePlayer = true
    const.SystemCapability.Map.Core = true
    const.SystemCapability.USB.USBManager = true
    const.SystemCapability.Web.Webview.Core = true
    const.SystemCapability.XTS.DeviceAttest = true
    const.SystemCapability.Msdp.DeviceStatus.Cooperate = true
    const.SystemCapability.Msdp.DeviceStatus.Drag = true
    const.SystemCapability.Msdp.DeviceStatus.Stationary = true
    const.SystemCapability.Msdp.Geofence = true
    const.SystemCapability.Msdp.Motion = true
    const.SystemCapability.Msdp.Movement = true
    const.SystemCapability.Msdp.Timeline = true
    const.SystemCapability.Msdp.MultiModalAwareness = true
    const.SystemCapability.Msdp.SpatialAwareness = true
    const.SystemCapability.Msdp.UserStatusAwareness = true
    const.SystemCapability.Push.PushService = true
    const.SystemCapability.Test.UiTest = true
    const.SystemCapability.Cloud.HiAnalytics = true
    const.SystemCapability.Print.PrintFramework = true
    const.SystemCapability.Utils.Lang = true
    const.SystemCapability.Global.I18n = true
    const.SystemCapability.Global.I18nExt = true
    const.SystemCapability.Global.ResourceManager = true
    const.SystemCapability.Health.Cooperation = true
    const.SystemCapability.Health.HealthStore = true
    const.SystemCapability.Health.WearEngine = true
    const.SystemCapability.Health.HealthService = true
    const.SystemCapability.Stylus.Handwrite = true
    const.SystemCapability.Update.DistributedUpdateEngine = true
    const.SystemCapability.Update.UpdateService = true
    const.SystemCapability.Window.SessionManager = true
    const.SystemCapability.Graphic.ApsManager.Resolution = true
    const.SystemCapability.Graphic.Graphic2D.ColorManager.Core = true
    const.SystemCapability.Graphic.Graphic2D.EGL = true
    const.SystemCapability.Graphic.Graphic2D.GLES2 = true
    const.SystemCapability.Graphic.Graphic2D.GLES3 = true
    const.SystemCapability.Graphic.Graphic2D.WebGL = true
    const.SystemCapability.Graphic.Graphic2D.NativeBuffer = true
    const.SystemCapability.Graphic.Graphic2D.NativeImage = true
    const.SystemCapability.Graphic.Graphic2D.NativeVsync = true
    const.SystemCapability.Graphic.Graphic2D.WebGL2 = true
    const.SystemCapability.Graphic.Graphic2D.NativeWindow = true
    const.SystemCapability.Graphic.Graphic2D.HyperGraphicManager = true
    const.SystemCapability.Graphic.Graphic2D.NativeDrawing = true
    const.SystemCapability.Graphic.Vulkan = true
    const.SystemCapability.Graphic.XEngine = true
    const.SystemCapability.Payment.ECNYPaymentService = true
    const.SystemCapability.Payment.IAP = true
    const.SystemCapability.Payment.PaymentService = true
    const.SystemCapability.Payment.Wallet = true
    const.SystemCapability.Request.FileTransferAgent = true
    const.SystemCapability.Sensors.MiscDevice = true
    const.SystemCapability.Sensors.MiscDevice.Lite = true
    const.SystemCapability.Sensors.Sensor = true
    const.SystemCapability.Sensors.Sensor.Lite = true
    const.SystemCapability.Startup.SystemInfo = true
    const.SystemCapability.Startup.SystemInfo.Lite = true
    const.SystemCapability.UserIAM.FingerprintAuthExt = true
    const.SystemCapability.UserIAM.UserAuth.Core = true
    const.SystemCapability.UserIAM.UserAuth.FaceAuth = true
    const.SystemCapability.UserIAM.UserAuth.PinAuth = true
    const.SystemCapability.UserIAM.UserAuth.FingerprintAuth = true
    const.SystemCapability.Weather.Core = true
    const.SystemCapability.Graphics.Drawing = true
    const.SystemCapability.HuaweiID.InvoiceAssistant = true
    const.SystemCapability.LiveView.LiveViewService = true
    const.SystemCapability.Location.Location.Core = true
    const.SystemCapability.Location.Location.Gnss = true
    const.SystemCapability.Location.Location.Lite = true
    const.SystemCapability.Location.Location.Geocoder = true
    const.SystemCapability.Location.Location.Geofence = true
    const.SystemCapability.Ringtone.Core = true
    const.SystemCapability.Security.AccessToken = true
    const.SystemCapability.Security.AppLock = true
    const.SystemCapability.Security.Asset = true
    const.SystemCapability.Security.Cert = true
    const.SystemCapability.Security.FIDO = true
    const.SystemCapability.Security.Huks.AttestKeyExt = true
    const.SystemCapability.Security.Huks.Core = true
    const.SystemCapability.Security.Huks.Extension = true
    const.SystemCapability.Security.Ifaa = true
    const.SystemCapability.Security.SOTER = true
    const.SystemCapability.Security.Cipher = true
    const.SystemCapability.Security.CodeProtect = true
    const.SystemCapability.Security.DeviceAuth = true
    const.SystemCapability.Security.TrustedRing = true
    const.SystemCapability.Security.ActivationLock = true
    const.SystemCapability.Security.PrivateSpace = true
    const.SystemCapability.Security.SafetyDetect = true
    const.SystemCapability.Security.SecurityGuard = true
    const.SystemCapability.Security.BusinessRiskIntelligentDetection = true
    const.SystemCapability.Security.CertificateManager = true
    const.SystemCapability.Security.CryptoFramework = true
    const.SystemCapability.Security.CryptoFramework.Cipher = true
    const.SystemCapability.Security.CryptoFramework.Kdf = true
    const.SystemCapability.Security.CryptoFramework.Key = true
    const.SystemCapability.Security.CryptoFramework.Key.AsymKey = true
    const.SystemCapability.Security.CryptoFramework.Key.SymKey = true
    const.SystemCapability.Security.CryptoFramework.Mac = true
    const.SystemCapability.Security.CryptoFramework.Rand = true
    const.SystemCapability.Security.CryptoFramework.KeyAgreement = true
    const.SystemCapability.Security.CryptoFramework.Signature = true
    const.SystemCapability.Security.CryptoFramework.MessageDigest = true
    const.SystemCapability.Security.DataLossPrevention = true
    const.SystemCapability.Security.DataTransitManager = true
    const.SystemCapability.Security.DeviceCertificate = true
    const.SystemCapability.Security.TrustedAppService.Core = true
    const.SystemCapability.Security.TrustedAppService.Location = true
    const.SystemCapability.Security.DeviceSecurityMode = true
    const.SystemCapability.Security.DeviceHealthAttestation = true
    const.SystemCapability.Security.DeviceSecurityLevel = true
    const.SystemCapability.Security.DlpCredentialService = true
    const.SystemCapability.Security.ScreenLockFileManager = true
    const.SystemCapability.Security.SecurityPrivacyServer = true
    const.SystemCapability.UIDesign.Core = true
    const.SystemCapability.UIDesign.HDSComponent.Core = true
    const.SystemCapability.Advertising.Ads = true
    const.SystemCapability.Advertising.OAID = true
    const.SystemCapability.ArkCompiler.JSVM = true
    const.SystemCapability.BarrierFree.Accessibility.Core = true
    const.SystemCapability.BarrierFree.Accessibility.Hearing = true
    const.SystemCapability.BarrierFree.Accessibility.Vision = true
    const.SystemCapability.CarService.DistributedEngine = true
    const.SystemCapability.CarService.NavigationInfo = true
    const.SystemCapability.FindDevice.FindNetwork = true
    const.SystemCapability.HiViewDFX.HiviewcareManager = true
    const.SystemCapability.HiViewDFX.Maintenance = true
    const.SystemCapability.HiviewDFX.HiAppEvent = true
    const.SystemCapability.HiviewDFX.HiChecker = true
    const.SystemCapability.HiviewDFX.HiCollie = true
    const.SystemCapability.HiviewDFX.HiDumper = true
    const.SystemCapability.HiviewDFX.HiLog = true
    const.SystemCapability.HiviewDFX.HiTrace = true
    const.SystemCapability.HiviewDFX.HiView.ChrLogService = true
    const.SystemCapability.HiviewDFX.HiView.LogService = true
    const.SystemCapability.HiviewDFX.Hiview = true
    const.SystemCapability.HiviewDFX.Hiview.FaultLogger = true
    const.SystemCapability.HiviewDFX.Hiview.LogLibrary = true
    const.SystemCapability.HiviewDFX.XPower = true
    const.SystemCapability.HiviewDFX.InfoSec = true
    const.SystemCapability.HiviewDFX.HiProfiler.HiDebug = true
    const.SystemCapability.HiviewDFX.HiSysEvent = true
    const.SystemCapability.Telephony.CallManager = true
    const.SystemCapability.Telephony.CoreService = true
    const.SystemCapability.Telephony.SmsMms = true
    const.SystemCapability.Telephony.CellularCall = true
    const.SystemCapability.Telephony.CellularData = true
    const.SystemCapability.Telephony.StateRegistry = true
    const.SystemCapability.Telephony.TelephonyEnhanced = true
    const.SystemCapability.Telephony.TelephonyEnhanced.VSim = true
    const.SystemCapability.Telephony.VoipCallManager = true
    const.SystemCapability.Multimedia.AVSession.AVCast = true
    const.SystemCapability.Multimedia.AVSession.Core = true
    const.SystemCapability.Multimedia.AVSession.ExtendedDisplayCast = true
    const.SystemCapability.Multimedia.AVSession.Manager = true
    const.SystemCapability.Multimedia.Audio.Capturer = true
    const.SystemCapability.Multimedia.Audio.Core = true
    const.SystemCapability.Multimedia.Audio.Tone = true
    const.SystemCapability.Multimedia.Audio.Device = true
    const.SystemCapability.Multimedia.Audio.Volume = true
    const.SystemCapability.Multimedia.Audio.Renderer = true
    const.SystemCapability.Multimedia.Audio.Communication = true
    const.SystemCapability.Multimedia.Audio.Interrupt = true
    const.SystemCapability.Multimedia.Audio.PlaybackCapture = true
    const.SystemCapability.Multimedia.Audio.Spatialization = true
    const.SystemCapability.Multimedia.Drm.Core = true
    const.SystemCapability.Multimedia.Image.Core = true
    const.SystemCapability.Multimedia.Image.ImageCreator = true
    const.SystemCapability.Multimedia.Image.ImagePacker = true
    const.SystemCapability.Multimedia.Image.ImageSource = true
    const.SystemCapability.Multimedia.Image.ImageReceiver = true
    const.SystemCapability.Multimedia.Media.AVImageGenerator = true
    const.SystemCapability.Multimedia.Media.AVPlayer = true
    const.SystemCapability.Multimedia.Media.Core = true
    const.SystemCapability.Multimedia.Media.Muxer = true
    const.SystemCapability.Multimedia.Media.Spliter = true
    const.SystemCapability.Multimedia.Media.AVRecorder = true
    const.SystemCapability.Multimedia.Media.AudioCodec = true
    const.SystemCapability.Multimedia.Media.CodecBase = true
    const.SystemCapability.Multimedia.Media.SoundPool = true
    const.SystemCapability.Multimedia.Media.AVScreenCapture = true
    const.SystemCapability.Multimedia.Media.AVTranscoder = true
    const.SystemCapability.Multimedia.Media.AudioDecoder = true
    const.SystemCapability.Multimedia.Media.AudioEncoder = true
    const.SystemCapability.Multimedia.Media.AudioPlayer = true
    const.SystemCapability.Multimedia.Media.VideoPlayer = true
    const.SystemCapability.Multimedia.Media.VideoDecoder = true
    const.SystemCapability.Multimedia.Media.VideoEncoder = true
    const.SystemCapability.Multimedia.Media.AudioRecorder = true
    const.SystemCapability.Multimedia.Media.VideoRecorder = true
    const.SystemCapability.Multimedia.Media.AVMetadataExtractor = true
    const.SystemCapability.Multimedia.Scan.Core = true
    const.SystemCapability.Multimedia.Scan.GenerateBarcode = true
    const.SystemCapability.Multimedia.Scan.ScanBarcode = true
    const.SystemCapability.Multimedia.Camera.Core = true
    const.SystemCapability.Multimedia.AudioHaptic.Core = true
    const.SystemCapability.Multimedia.ImageEffect.Core = true
    const.SystemCapability.Multimedia.ImageLoader.Core = true
    const.SystemCapability.Multimedia.SystemSound.Core = true
    const.SystemCapability.Multimedia.MediaLibrary.Core = true
    const.SystemCapability.Multimedia.MediaLibrary.DistributedCore = true
    const.SystemCapability.Multimedia.VideoProcessingEngine = true
    const.SystemCapability.GameService.GamePerformance = true
    const.SystemCapability.VirtService.Base = true
    const.SystemCapability.AppGalleryService.AppInfoManager = true
    const.SystemCapability.AppGalleryService.Distribution.OnDemandInstall = true
    const.SystemCapability.AppGalleryService.Distribution.Recommendations = true
    const.SystemCapability.AppGalleryService.Distribution.UnifiedInstall = true
    const.SystemCapability.AppGalleryService.Distribution.Update = true
    const.SystemCapability.AppGalleryService.PrivacyManager = true
    const.SystemCapability.AppGalleryService.AttributionManager = true
    const.SystemCapability.Applications.CalendarData = true
    const.SystemCapability.Applications.Contacts = true
    const.SystemCapability.Applications.Settings.Core = true
    const.SystemCapability.Applications.ContactsData = true
    const.SystemCapability.Developtools.Syscap = true
    const.SystemCapability.GraphicsGame.RenderAccelerate = true
    const.SystemCapability.MiscServices.Download = true
    const.SystemCapability.MiscServices.Theme = true
    const.SystemCapability.MiscServices.Time = true
    const.SystemCapability.MiscServices.Upload = true
    const.SystemCapability.MiscServices.InputMethodFramework = true
    const.SystemCapability.MiscServices.Pasteboard = true
    const.SystemCapability.MiscServices.ScreenLock = true
    const.SystemCapability.MiscServices.Wallpaper = true
    const.SystemCapability.Notification.CommonEvent = true
    const.SystemCapability.Notification.Emitter = true
    const.SystemCapability.Notification.Notification = true
    const.SystemCapability.Notification.NotificationSettings = true
    const.SystemCapability.Notification.ReminderAgent = true
    const.SystemCapability.PowerManager.BatteryManager.Core = true
    const.SystemCapability.PowerManager.BatteryManager.Extension = true
    const.SystemCapability.PowerManager.PowerManager.Core = true
    const.SystemCapability.PowerManager.PowerManager.Extension = true
    const.SystemCapability.PowerManager.ThermalManager = true
    const.SystemCapability.PowerManager.BatteryStatistics = true
    const.SystemCapability.PowerManager.DisplayPowerManager = true
    const.SystemCapability.PowerManager.DisplayPowerManager.Lite = true
    const.SystemCapability.BundleManager.AppDomainVerify = true
    const.SystemCapability.BundleManager.BundleFramework = true
    const.SystemCapability.BundleManager.BundleFramework.AppControl = true
    const.SystemCapability.BundleManager.BundleFramework.Core = true
    const.SystemCapability.BundleManager.BundleFramework.DefaultApp = true
    const.SystemCapability.BundleManager.BundleFramework.Launcher = true
    const.SystemCapability.BundleManager.BundleFramework.Overlay = true
    const.SystemCapability.BundleManager.BundleFramework.Resource = true
    const.SystemCapability.BundleManager.BundleFramework.FreeInstall = true
    const.SystemCapability.BundleManager.Zlib = true
    const.SystemCapability.BundleManager.DistributedBundleFramework = true
    const.SystemCapability.BundleManager.EcologicalRuleManager.EcologicalRuleDataManager = true
    const.SystemCapability.BundleManager.EcologicalRuleManager.SceneManager = true
    const.SystemCapability.Collaboration.Camera = true
    const.SystemCapability.Collaboration.DevicePicker = true
    const.SystemCapability.Collaboration.HarmonyShare = true
    const.SystemCapability.Collaboration.Service = true
    const.SystemCapability.Collaboration.SystemShare = true
    const.SystemCapability.Collaboration.NetworkSharing = true
    const.SystemCapability.Collaboration.ServiceManager = true
    const.SystemCapability.Collaboration.RemoteCommunication = true
    const.SystemCapability.Communication.Bluetooth.Core = true
    const.SystemCapability.Communication.Bluetooth.Lite = true
    const.SystemCapability.Communication.IPC.Core = true
    const.SystemCapability.Communication.NFC.CardEmulation = true
    const.SystemCapability.Communication.NFC.Core = true
    const.SystemCapability.Communication.NFC.Tag = true
    const.SystemCapability.Communication.NFC.WalletExt = true
    const.SystemCapability.Communication.NearLink.Core = true
    const.SystemCapability.Communication.NetStack = true
    const.SystemCapability.Communication.SoftBus.Core = true
    const.SystemCapability.Communication.WiFi.AP.Core = true
    const.SystemCapability.Communication.WiFi.Core = true
    const.SystemCapability.Communication.WiFi.P2P = true
    const.SystemCapability.Communication.WiFi.STA = true
    const.SystemCapability.Communication.NetManager.Core = true
    const.SystemCapability.Communication.NetManager.MDNS = true
    const.SystemCapability.Communication.NetManager.Vpn = true
    const.SystemCapability.Communication.NetManager.Ethernet = true
    const.SystemCapability.Communication.NetManager.NetFirewall = true
    const.SystemCapability.Communication.NetManager.NetSharing = true
    const.SystemCapability.Communication.NetManager.SmartHotSpot = true
    const.SystemCapability.Communication.NetworkBoost.Core = true
    const.SystemCapability.Communication.SecureElement = true
    const.SystemCapability.Customization.ConfigPolicy = true
    const.SystemCapability.Customization.CustomConfig = true
    const.SystemCapability.Customization.EnterpriseDeviceManager = true
    const.SystemCapability.Customization.EnterpriseDeviceManagerExt = true
    const.SystemCapability.OfficeService.PDFService.Core = true
    const.SystemCapability.WindowManager.WindowManager.Core = true
    const.SystemCapability.FileManagement.AppFileService = true
    const.SystemCapability.FileManagement.AppFileService.FolderAuthorization = true
    const.SystemCapability.FileManagement.File.DistributedFile = true
    const.SystemCapability.FileManagement.File.Environment = true
    const.SystemCapability.FileManagement.File.FileIO = true
    const.SystemCapability.FileManagement.File.FileIO.Lite = true
    const.SystemCapability.FileManagement.FilePreview.Core = true
    const.SystemCapability.FileManagement.StorageService.Backup = true
    const.SystemCapability.FileManagement.StorageService.Volume = true
    const.SystemCapability.FileManagement.StorageService.Encryption = true
    const.SystemCapability.FileManagement.StorageService.SpatialStatistics = true
    const.SystemCapability.FileManagement.DistributedFileService.CloudSync.Core = true
    const.SystemCapability.FileManagement.DistributedFileService.CloudSyncManager = true
    const.SystemCapability.FileManagement.PhotoAccessHelper.Core = true
    const.SystemCapability.FileManagement.UserFileManager.Core = true
    const.SystemCapability.FileManagement.UserFileManager.DistributedCore = true
    const.SystemCapability.FileManagement.UserFileService = true
    const.SystemCapability.MultimodalInput.Input.Cooperator = true
    const.SystemCapability.MultimodalInput.Input.Core = true
    const.SystemCapability.MultimodalInput.Input.Pointer = true
    const.SystemCapability.MultimodalInput.Input.ShortKey = true
    const.SystemCapability.MultimodalInput.Input.InfraredEmitter = true
    const.SystemCapability.MultimodalInput.Input.InputConsumer = true
    const.SystemCapability.MultimodalInput.Input.InputDevice = true
    const.SystemCapability.MultimodalInput.Input.InputMonitor = true
    const.SystemCapability.MultimodalInput.Input.InputSimulator = true
    const.SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask = true
    const.SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask = true
    const.SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply = true
    const.SystemCapability.ResourceSchedule.DeviceStandby = true
    const.SystemCapability.ResourceSchedule.SystemLoad = true
    const.SystemCapability.ResourceSchedule.WorkScheduler = true
    const.SystemCapability.ResourceSchedule.LowpowerManager = true
    const.SystemCapability.ResourceSchedule.UsageStatistics.App = true
    const.SystemCapability.ResourceSchedule.UsageStatistics.AppGroup = true
    const.SystemCapability.Resourceschedule.Ffrt.Core = true
    const.SystemCapability.AtomicserviceComponent.UIComponent = true
    const.SystemCapability.AtomicserviceComponent.atomicservice = true
    const.SystemCapability.AuthenticationServices.HuaweiID.Auth = true
    const.SystemCapability.AuthenticationServices.HuaweiID.ExtendService = true
    const.SystemCapability.AuthenticationServices.HuaweiID.MyFamily = true
    const.SystemCapability.AuthenticationServices.HuaweiID.RetailAuth = true
    const.SystemCapability.AuthenticationServices.HuaweiID.UIComponent = true
    const.SystemCapability.AuthenticationServices.HuaweiID.MinorsProtection = true
    const.SystemCapability.AuthenticationServices.HuaweiID.RealNameVerify = true
    const.SystemCapability.AuthenticationServices.HuaweiID.ShippingAddress = true
    const.SystemCapability.DeviceCloudGateway.ClientCloudCacheService.Grs = true
    const.SystemCapability.DeviceCloudGateway.CloudCapabilityManager = true
    const.SystemCapability.DeviceCloudGateway.CloudFoundation = true
    const.SystemCapability.UtilityApplication.ParentControl.Core = true
    const.SystemCapability.DistributedDataManager.CloudSync.Client = true
    const.SystemCapability.DistributedDataManager.CloudSync.Config = true
    const.SystemCapability.DistributedDataManager.CloudSync.Server = true
    const.SystemCapability.DistributedDataManager.DataShare.Consumer = true
    const.SystemCapability.DistributedDataManager.DataShare.Core = true
    const.SystemCapability.DistributedDataManager.DataShare.Provider = true
    const.SystemCapability.DistributedDataManager.KVStore.Core = true
    const.SystemCapability.DistributedDataManager.KVStore.DistributedKVStore = true
    const.SystemCapability.DistributedDataManager.UDMF.Core = true
    const.SystemCapability.DistributedDataManager.CommonType = true
    const.SystemCapability.DistributedDataManager.DataObject.DistributedObject = true
    const.SystemCapability.DistributedDataManager.Preferences.Core = true
    const.SystemCapability.DistributedDataManager.Preferences.Core.Lite = true
    const.SystemCapability.DistributedDataManager.RelationalStore.Core = true
    const.SystemCapability.DistributedHardware.DeviceManager = true
    const.SystemCapability.DistributedHardware.DistributedHardwareFWK = true
    const.SystemCapability.ScenarioFusionComponent.FileUriService = true
    ohos.boot.time.kernel = 2476032
    ohos.boot.time.init = 10569047
    ohos.boot.time.bms.main.bundles.ready = 17285693
    ohos.boot.time.wms.fullscreen.ready = 19769081
    ohos.boot.time.wms.ready = 19793538
    ohos.boot.time.samgr.ready = 10615671
    ohos.boot.time.boot.completed = 26583547
    ohos.boot.time.hdf_devmgr.ready = 10628298
    ohos.boot.time.appspawn.started = 10709817
    ohos.boot.time.useriam.fwkready = 13120256
    ohos.boot.time.appfwk.ready = 13464271
    ohos.boot.time.account.ready = 13500233
    ohos.boot.time.launcher.ready = 26583182
    ohos.boot.time.lockscreen.ready = 21863974
    ohos.boot.time.param_watcher.started = 10636987
    ohos.boot.time.renderservice.ready = 11336109
    ohos.boot.time.avsessionservice.ready = 12462154
    ohos.boot.time.bootanimation.ready = 12884752
    ohos.boot.time.bootanimation.started = 13143584
    ohos.boot.time.bootanimation.finished = 21261009
    bootevent.boot.completed = true
    persist.sys.hilog.kmsg.on = true
    persist.sys.hilog.binary.on = true
    persist.sys.hilog.binary.forhota.on = false
    hilog.flowctrl.proc.on = true
    hilog.flowctrl.domain.on = true
    hilog.level.debug.on = false
    hilog.loggable.global = I
    hilog.buffersize.global = 262144
    const.hdc.version = Ver: 3.0.0b
    web.debug.devtools = false
    web.debug.netlog = None
    web.debug.trace = false
    web.debug.strictsiteIsolation.enable = none
    persist.hdc.jdwp = 0
    persist.time.auto_restore_timer_apps = com.huawei.hmos.clock,com.huawei.hmos.settings,com.huawei.hmos.emergencycommunication
    persist.time.ntpserver = 1.cn.pool.ntp.org,ntp.sjtu.edu.cn,time.windows.com,time.nist.gov,pool.ntp.org
    persist.time.timezone = Asia/Shanghai
    persist.time.ntpserver_specific =
    persist.time.auto_time = ON
    persist.global.tz_override = false
    const.product.devicetype = phone
    const.build.characteristics = default 

设备基本信息

字段名称 含义
const.product.productid 产品的唯一标识符。
const.product.model 设备型号(例如 ALN-AL00 表示 HUAWEI Mate 60 Pro 的具体型号)。
const.product.name 设备名称。
const.product.brand 品牌名称,例如 HUAWEI。
const.product.manufacturer 设备制造商名称,例如 HUAWEI。
const.product.devicetype 设备类型,例如 phone 表示手机。
const.product.hardwareversion 硬件版本号(例如 HL1CMSM)。
const.product.cpu.abilist 支持的 CPU 架构,例如 arm64-v8a 表示 64 位 ARM 架构。
const.product.device_radius 设备的物理尺寸或显示尺寸。

操作系统信息

字段名称 含义
const.product.os.dist.apiname 操作系统 API 名称,例如 OpenHarmony 的版本号。
const.product.os.dist.version 操作系统版本号。
const.product.os.dist.apiversion 操作系统的 API 版本号,例如 50001 表示 OpenHarmony 的版本级别。
const.product.os.dist.releasetype 操作系统的发布类型(如 Release 表示稳定版本)。
const.ohos.version.security_patch 操作系统的安全补丁日期。
const.ohos.version.certified 系统认证的版本号,例如 OpenHarmony 5.0.1。
const.ohos.apiversion HarmonyOS 的 API 版本号,例如 13
const.ohos.fullname 完整的系统版本名称,例如 OpenHarmony-5.0.1.120。

构建与发布信息

字段名称 含义
const.build.description 构建描述,包括版本号和签名类型。
const.build.product 产品代号,例如 ALN。
const.build.vendor.date 供应商构建日期(精确到秒)。
const.build.system.date 系统构建日期(精确到秒)。
const.build.sa_sdk_version 使用的 SDK 版本号。
const.product.build.type 构建类型(如 default 表示默认构建)。
const.product.build.user 构建用户(通常为 default)。
const.product.build.host 构建主机名(通常为 default)。
const.product.software.version 软件的完整版本号,包括区域和构建版本信息。

系统功能支持(SystemCapability)

这些字段定义了系统支持的能力模块,每个字段以布尔值表示是否支持。以下是常见字段示例:

人工智能相关
字段名称 含义
const.SystemCapability.AI.AICaption 支持 AI 图像字幕生成。
const.SystemCapability.AI.TextToSpeech 支持文本转语音功能。
const.SystemCapability.AI.Vision.ObjectDetection 支持 AI 图像物体检测。
const.SystemCapability.AI.Face.Detector 支持人脸检测功能。
系统能力模块
字段名称 含义
const.SystemCapability.Ability.AbilityBase 支持基本的系统能力。
const.SystemCapability.BundleManager.BundleFramework 支持应用管理框架。
const.SystemCapability.Notification.Notification 支持通知功能模块。
const.SystemCapability.Location.Location.Core 支持位置服务的核心功能。
多媒体功能
字段名称 含义
const.SystemCapability.Multimedia.Audio.Core 支持音频处理的核心功能。
const.SystemCapability.Multimedia.Media.AVPlayer 支持音视频播放器功能。
const.SystemCapability.Multimedia.Camera.Core 支持摄像头功能的核心模块。

启动时间与性能信息

字段名称 含义
ohos.boot.time.kernel 内核启动时间(毫秒)。
ohos.boot.time.init 系统初始化完成时间(毫秒)。
ohos.boot.time.wms.ready 窗口管理服务准备好的时间点。
ohos.boot.time.launcher.ready 桌面启动器准备好的时间点。
bootevent.boot.completed 系统启动是否完成(布尔值)。

持久化配置

字段名称 含义
persist.sys.hilog.kmsg.on 是否启用系统日志记录。
persist.time.ntpserver NTP 时间同步服务器列表。
persist.time.auto_time 是否自动更新时间(如 ON 表示启用)。
persist.global.tz_override 是否覆盖默认时区设置(布尔值)。

8 获取指定应用的名称,先将后台应用全退,再运行要查看的应用,

 aa dump -l

得到如果,就是上划进入任务管理器中任务的列表

User ID #100
  current mission lists:{
    Mission ID #68  mission name #[#com.tencent.mqq:entry:EntryAbility]  lockedState #0  mission affinity #[]
      AbilityRecord ID #701
        app name [com.tencent.mqq]
        main name [EntryAbility]
        bundle name [com.tencent.mqq]
        ability type [PAGE]
        state #BACKGROUND  start time [69617025]
        app state #BACKGROUND
        ready #1  window attached #0  launcher #0
        callee connections:
        isKeepAlive: false
 }
    Mission ID #109  mission name #[#com.xingin.xhs_hos:redbook:EntryAbility]  lockedState #0  mission affinity #[]
      AbilityRecord ID #1675
        app name [com.xingin.xhs_hos]
        main name [EntryAbility]
        bundle name [com.xingin.xhs_hos]
        ability type [PAGE]
        state #BACKGROUND  start time [221407252]
        app state #BACKGROUND
        ready #1  window attached #0  launcher #0
        callee connections:
        isKeepAlive: false
 }
    Mission ID #111  mission name #[#com.tencent.wechat:entry:EntryAbility]  lockedState #0  mission affinity #[]
      AbilityRecord ID #1677
        app name [com.tencent.wechat]
        main name [EntryAbility]
        bundle name [com.tencent.wechat]
        ability type [PAGE]
        state #BACKGROUND  start time [221410026]
        app state #BACKGROUND
        ready #1  window attached #0  launcher #0
        callee connections:
        isKeepAlive: false
 }

9获取界面的结构图

hdc shell uitest dumpLayout

hdc file recv /data/local/tmp/xxxx.json

10模拟点击(输入文字)等

操作类型 必选参数 可选参数 示例
单击 point_x, point_y hdc shell uitest uiInput click 100 100
双击 point_x, point_y hdc shell uitest uiInput doubleClick 100 100
长按 point_x, point_y hdc shell uitest uiInput longClick 100 100
快滑 from_x, from_y, to_x, to_y swipeVelocityPps_ (默认 600), stepLength hdc shell uitest uiInput fling 10 10 200 200 500
慢滑 from_x, from_y, to_x, to_y swipeVelocityPps_ (默认 600) hdc shell uitest uiInput swipe 10 10 200 200 500
拖拽 from_x, from_y, to_x, to_y swipeVelocityPps_ (默认 600) hdc shell uitest uiInput drag 10 10 100 100 500
指定方向滑动 direction (0: 左, 1: 右, 2: 上, 3: 下), swipeVelocityPps_, stepLength hdc shell uitest uiInput dircFling 0 500
输入框输入 point_x, point_y, input hdc shell uitest uiInput inputText 100 100 "hello 中国人"
实体按键事件 keyID keyID2 hdc shell uitest uiInput keyEvent Home
组合按键事件 keyID, keyID2 hdc shell uitest uiInput keyEvent 2072 2038

键盘映射表如下:


Name Value Description
KEYCODE_FN 0 Function (Fn) key
KEYCODE_UNKNOWN -1 Unknown key
KEYCODE_HOME 1 Function (Home) key
KEYCODE_BACK 2 Back key
KEYCODE_MEDIA_PLAY_PAUSE 10 Play/Pause key
KEYCODE_MEDIA_STOP 11 Stop key
KEYCODE_MEDIA_NEXT 12 Next key
KEYCODE_MEDIA_PREVIOUS 13 Previous key
KEYCODE_MEDIA_REWIND 14 Rewind key
KEYCODE_MEDIA_FAST_FORWARD 15 Fast Forward key
KEYCODE_VOLUME_UP 16 Volume Up key
KEYCODE_VOLUME_DOWN 17 Volume Down key
KEYCODE_POWER 18 Power key
KEYCODE_CAMERA 19 Camera key
KEYCODE_VOLUME_MUTE 22 Speaker Mute key
KEYCODE_MUTE 23 Mute key
KEYCODE_BRIGHTNESS_UP 40 Brightness Up key
KEYCODE_BRIGHTNESS_DOWN 41 Brightness Down key
KEYCODE_0 2000 Key 0
KEYCODE_1 2001 Key 1
KEYCODE_2 2002 Key 2
KEYCODE_3 2003 Key 3
KEYCODE_4 2004 Key 4
KEYCODE_5 2005 Key 5
KEYCODE_6 2006 Key 6
KEYCODE_7 2007 Key 7
KEYCODE_8 2008 Key 8
KEYCODE_9 2009 Key 9
KEYCODE_STAR 2010 Key *
KEYCODE_POUND 2011 Key #
KEYCODE_DPAD_UP 2012 Up key on D-pad
KEYCODE_DPAD_DOWN 2013 Down key on D-pad
KEYCODE_DPAD_LEFT 2014 Left key on D-pad
KEYCODE_DPAD_RIGHT 2015 Right key on D-pad
KEYCODE_DPAD_CENTER 2016 Center key on D-pad
KEYCODE_A 2017 Key A
KEYCODE_B 2018 Key B
KEYCODE_C 2019 Key C
KEYCODE_D 2020 Key D
KEYCODE_E 2021 Key E
KEYCODE_F 2022 Key F
KEYCODE_G 2023 Key G
KEYCODE_H 2024 Key H
KEYCODE_I 2025 Key I
KEYCODE_J 2026 Key J
KEYCODE_K 2027 Key K
KEYCODE_L 2028 Key L
KEYCODE_M 2029 Key M
KEYCODE_N 2030 Key N
KEYCODE_O 2031 Key O
KEYCODE_P 2032 Key P
KEYCODE_Q 2033 Key Q
KEYCODE_R 2034 Key R
KEYCODE_S 2035 Key S
KEYCODE_T 2036 Key T
KEYCODE_U 2037 Key U
KEYCODE_V 2038 Key V
KEYCODE_W 2039 Key W
KEYCODE_X 2040 Key X
KEYCODE_Y 2041 Key Y
KEYCODE_Z 2042 Key Z
KEYCODE_COMMA 2043 Key ,
KEYCODE_PERIOD 2044 Key .
KEYCODE_ALT_LEFT 2045 Left Alt key
KEYCODE_ALT_RIGHT 2046 Right Alt key
KEYCODE_SHIFT_LEFT 2047 Left Shift key
KEYCODE_SHIFT_RIGHT 2048 Right Shift key
KEYCODE_TAB 2049 Tab key
KEYCODE_SPACE 2050 Space key
KEYCODE_SYM 2051 Symbol key
KEYCODE_EXPLORER 2052 Explorer key, used to start the explorer application
KEYCODE_ENVELOPE 2053 Email key, used to start the email application
KEYCODE_ENTER 2054 Enter key
KEYCODE_DEL 2055 Delete key
KEYCODE_GRAVE 2056 Key `
KEYCODE_MINUS 2057 Key -
KEYCODE_EQUALS 2058 Key =
KEYCODE_LEFT_BRACKET 2059 Key [
KEYCODE_RIGHT_BRACKET 2060 Key ]
KEYCODE_BACKSLASH 2061 Key \
KEYCODE_SEMICOLON 2062 Key ;
KEYCODE_APOSTROPHE 2063 Key '
KEYCODE_SLASH 2064 Key /
KEYCODE_AT 2065 Key @
KEYCODE_PLUS 2066 Key +
KEYCODE_MENU 2067 Menu key
KEYCODE_PAGE_UP 2068 Page Up key
KEYCODE_PAGE_DOWN 2069 Page Down key
KEYCODE_ESCAPE 2070 ESC key
KEYCODE_FORWARD_DEL 2071 Delete key
KEYCODE_CTRL_LEFT 2072 Left Ctrl key
KEYCODE_CTRL_RIGHT 2073 Right Ctrl key
KEYCODE_CAPS_LOCK 2074 Caps Lock key
KEYCODE_SCROLL_LOCK 2075 Scroll Lock key
KEYCODE_META_LEFT 2076 Left Meta key
KEYCODE_META_RIGHT 2077 Right Meta key
KEYCODE_FUNCTION 2078 Function key
KEYCODE_SYSRQ 2079 System Request/Print Screen key
KEYCODE_BREAK 2080 Break/Pause key
KEYCODE_MOVE_HOME 2081 Move to Home key
KEYCODE_MOVE_END 2082 Move to End key
KEYCODE_INSERT 2083 Insert key
KEYCODE_FORWARD 2084 Forward key
KEYCODE_MEDIA_PLAY 2085 Play key
KEYCODE_MEDIA_PAUSE 2086 Pause key
KEYCODE_MEDIA_CLOSE 2087 Close key
KEYCODE_MEDIA_EJECT 2088 Eject key
KEYCODE_MEDIA_RECORD 2089 Record key
KEYCODE_F1 2090 F1 key
KEYCODE_F2 2091 F2 key
KEYCODE_F3 2092 F3 key
KEYCODE_F4 2093 F4 key
KEYCODE_F5 2094 F5 key
KEYCODE_F6 2095 F6 key
KEYCODE_F7 2096 F7 key
KEYCODE_F8 2097 F8 key
KEYCODE_F9 2098 F9 key
KEYCODE_F10 2099 F10 key
KEYCODE_F11 2100 F11 key
KEYCODE_F12 2101 F12 key
KEYCODE_NUM_LOCK 2102 Number Lock key
KEYCODE_NUMPAD_0 2103 Key 0 on numeric keypad
KEYCODE_NUMPAD_1 2104 Key 1 on numeric keypad
KEYCODE_NUMPAD_2 2105 Key 2 on numeric keypad
KEYCODE_NUMPAD_3 2106 Key 3 on numeric keypad
KEYCODE_NUMPAD_4 2107 Key 4 on numeric keypad
KEYCODE_NUMPAD_5 2108 Key 5 on numeric keypad
KEYCODE_NUMPAD_6 2109 Key 6 on numeric keypad
KEYCODE_NUMPAD_7 2110 Key 7 on numeric keypad
KEYCODE_NUMPAD_8 2111 Key 8 on numeric keypad
KEYCODE_NUMPAD_9 2112 Key 9 on numeric keypad
KEYCODE_NUMPAD_DIVIDE 2113 Key / on numeric keypad
KEYCODE_NUMPAD_MULTIPLY 2114 Key * on numeric keypad
KEYCODE_NUMPAD_SUBTRACT 2115 Key - on numeric keypad
KEYCODE_NUMPAD_ADD 2116 Key + on numeric keypad
KEYCODE_NUMPAD_DOT 2117 Key . on numeric keypad
KEYCODE_NUMPAD_COMMA 2118 Key , on numeric keypad
KEYCODE_NUMPAD_ENTER 2119 Enter key on numeric keypad
KEYCODE_NUMPAD_EQUALS 2120 Key = on numeric keypad
KEYCODE_NUMPAD_LEFT_PAREN 2121 Key ( on numeric keypad
KEYCODE_NUMPAD_RIGHT_PAREN 2122 Key ) on numeric keypad
KEYCODE_VIRTUAL_MULTITASK 2210 Multi-task key
KEYCODE_SLEEP 2600 Sleep key
KEYCODE_ZENKAKU_HANKAKU 2601 Zenkaku/Hankaku key
KEYCODE_102ND 2602 102nd key
KEYCODE_RO 2603 Ro key
KEYCODE_KATAKANA 2604 Katakana key
KEYCODE_HIRAGANA 2605 Hiragana key
KEYCODE_HENKAN 2606 Henkan key
KEYCODE_KATAKANA_HIRAGANA 2607 Katakana/Hiragana key
KEYCODE_MUHENKAN 2608 Muhenkan key
KEYCODE_LINEFEED 2609 Linefeed key
KEYCODE_MACRO 2610 Macro key
KEYCODE_NUMPAD_PLUSMINUS 2611 Plus/Minus key on the numeric keypad
KEYCODE_SCALE 2612 Scale key
KEYCODE_HANGUEL 2613 Hanguel key
KEYCODE_HANJA 2614 Hanja key
KEYCODE_YEN 2615 Yen key
KEYCODE_STOP 2616 Stop key
KEYCODE_AGAIN 2617 Again key
KEYCODE_PROPS 2618 Props key
KEYCODE_UNDO 2619 Undo key
KEYCODE_COPY 2620 Copy key
KEYCODE_OPEN 2621 Open key
KEYCODE_PASTE 2622 Paste key
KEYCODE_FIND 2623 Find key
KEYCODE_CUT 2624 Cut key
KEYCODE_HELP 2625 Help key
KEYCODE_CALC 2626 Calc key, used to start the calculator application
KEYCODE_FILE 2627 File key
KEYCODE_BOOKMARKS 2628 Bookmarks key
KEYCODE_NEXT 2629 Next key
KEYCODE_PLAYPAUSE 2630 Play/Pause key
KEYCODE_PREVIOUS 2631 Previous key
KEYCODE_STOPCD 2632 Stop CD key
KEYCODE_CONFIG 2634 Config key
KEYCODE_REFRESH 2635 Refresh key
KEYCODE_EXIT 2636 Exit key
KEYCODE_EDIT 2637 Edit key
KEYCODE_SCROLLUP 2638 Scroll Up key
KEYCODE_SCROLLDOWN 2639 Scroll Down key
KEYCODE_NEW 2640 New key
KEYCODE_REDO 2641 Redo key
KEYCODE_CLOSE 2642 Close key
KEYCODE_PLAY 2643 Play key
KEYCODE_BASSBOOST 2644 Bass Boost key
KEYCODE_PRINT 2645 Print key
KEYCODE_CHAT 2646 Chat key
KEYCODE_FINANCE 2647 Finance key
KEYCODE_CANCEL 2648 Cancel key
KEYCODE_KBDILLUM_TOGGLE 2649 Keyboard Illumination Toggle key
KEYCODE_KBDILLUM_DOWN 2650 Keyboard Illumination Up key
KEYCODE_KBDILLUM_UP 2651 Keyboard Illumination Down key
KEYCODE_SEND 2652 Send key
KEYCODE_REPLY 2653 Reply key
KEYCODE_FORWARDMAIL 2654 Forward Mail key
KEYCODE_SAVE 2655 Save key
KEYCODE_DOCUMENTS 2656 Documents key
KEYCODE_VIDEO_NEXT 2657 Next Video key
KEYCODE_VIDEO_PREV 2658 Previous Video key
KEYCODE_BRIGHTNESS_CYCLE 2659 Brightness Cycle key
KEYCODE_BRIGHTNESS_ZERO 2660 Brightness Zero key
KEYCODE_DISPLAY_OFF 2661 Display Off Key
KEYCODE_BTN_MISC 2662 Misc Button key
KEYCODE_GOTO 2663 Goto key
KEYCODE_INFO 2664 Info key
KEYCODE_PROGRAM 2665 Program key
KEYCODE_PVR 2666 PVR key
KEYCODE_SUBTITLE 2667 Subtitle key
KEYCODE_FULL_SCREEN 2668 Full Screen key
KEYCODE_KEYBOARD 2669 Keyboard
KEYCODE_ASPECT_RATIO 2670 Aspect Ratio key
KEYCODE_PC 2671 Port Control key
KEYCODE_TV 2672 TV key
KEYCODE_TV2 2673 TV key 2
KEYCODE_VCR 2674 VCR key
KEYCODE_VCR2 2675 VCR key 2
KEYCODE_SAT 2676 SAT key
KEYCODE_CD 2677 CD key
KEYCODE_TAPE 2678 Tape key
KEYCODE_TUNER 2679 Tuner key
KEYCODE_PLAYER 2680 Player key
KEYCODE_DVD 2681 DVD key
KEYCODE_AUDIO 2682 Audio key
KEYCODE_VIDEO 2683 Video key
KEYCODE_MEMO 2684 Memo key
KEYCODE_CALENDAR 2685 Calendar key
KEYCODE_RED 2686 Red indicator
KEYCODE_GREEN 2687 Green indicator
KEYCODE_YELLOW 2688 Yellow indicator
KEYCODE_BLUE 2689 Blue indicator
KEYCODE_CHANNELUP 2690 Channel Up key
KEYCODE_CHANNELDOWN 2691 Channel Down key
KEYCODE_LAST 2692 Last key
KEYCODE_RESTART 2693 Restart key
KEYCODE_SLOW 2694 Slow key
KEYCODE_SHUFFLE 2695 Shuffle key
KEYCODE_VIDEOPHONE 2696 Videophone key
KEYCODE_GAMES 2697 Games key
KEYCODE_ZOOMIN 2698 Zoom-in key
KEYCODE_ZOOMOUT 2699 Zoom-out key
KEYCODE_ZOOMRESET 2700 Zoom Reset key
KEYCODE_WORDPROCESSOR 2701 Word Processor key
KEYCODE_EDITOR 2702 Editor key
KEYCODE_SPREADSHEET 2703 Spreadsheet key
KEYCODE_GRAPHICSEDITOR 2704 Graphics Editor key
KEYCODE_PRESENTATION 2705 Presentation key
KEYCODE_DATABASE 2706 Database key
KEYCODE_NEWS 2707 News key
KEYCODE_VOICEMAIL 2708 Voicemail key
KEYCODE_ADDRESSBOOK 2709 Addressbook key
KEYCODE_MESSENGER 2710 Messenger key
KEYCODE_BRIGHTNESS_TOGGLE 2711 Brightness Toggle key
KEYCODE_SPELLCHECK 2712 Spell Check key
KEYCODE_COFFEE 2713 Coffee key, used to launch screen lock or screen saver
KEYCODE_MEDIA_REPEAT 2714 Media Repeat key
KEYCODE_IMAGES 2715 Images key
KEYCODE_BUTTONCONFIG 2716 Button Configuration key
KEYCODE_TASKMANAGER 2717 Task Manager key
KEYCODE_JOURNAL 2718 Log key
KEYCODE_CONTROLPANEL 2719 Control Panel key
KEYCODE_APPSELECT 2720 App Select key
KEYCODE_SCREENSAVER 2721 Screen Saver key
KEYCODE_ASSISTANT 2722 Assistant key
KEYCODE_KBD_LAYOUT_NEXT 2723 Next Keyboard Layout key
KEYCODE_BRIGHTNESS_MIN 2724 Min Brightness key
KEYCODE_BRIGHTNESS_MAX 2725 Max Brightness key
KEYCODE_KBDINPUTASSIST_PREV 2726 Assist_Previous key, used to view historical inputs.
KEYCODE_KBDINPUTASSIST_NEXT 2727 Assist_Next key, used to view predictive inputs.
KEYCODE_KBDINPUTASSIST_PREVGROUP 2728 Assist_Previous_Group key, used to switch to the previous input method in the input group.
KEYCODE_KBDINPUTASSIST_NEXTGROUP 2729 Assist_Next_Group key, used to switch to the next input method in the input group.
KEYCODE_KBDINPUTASSIST_ACCEPT 2730 Keyboard Input-assisted Accept key
KEYCODE_KBDINPUTASSIST_CANCEL 2731 Keyboard Input-assisted Cancel key
KEYCODE_FRONT 2800 Front key, used to launch the windshield defogger
KEYCODE_SETUP 2801 Setup key
KEYCODE_WAKEUP 2802 Wakeup key
KEYCODE_SENDFILE 2803 Send File key
KEYCODE_DELETEFILE 2804 Delete File key
KEYCODE_XFER 2805 XFER key, used to start file transfer
KEYCODE_PROG1 2806 Program key 1
KEYCODE_PROG2 2807 Program key 2
KEYCODE_MSDOS 2808 MS-DOS key
KEYCODE_SCREENLOCK 2809 Screen Lock key
KEYCODE_DIRECTION_ROTATE_DISPLAY 2810 Directional Rotation Display key
KEYCODE_CYCLEWINDOWS 2811 Windows Cycle key
KEYCODE_COMPUTER 2812 Keys
KEYCODE_EJECTCLOSECD 2813 Eject CD key
KEYCODE_ISO 2814 ISO key
KEYCODE_MOVE 2815 Move key
KEYCODE_F13 2816 F13 key
KEYCODE_F14 2817 F14 key
KEYCODE_F15 2818 F15 key
KEYCODE_F16 2819 F16 key
KEYCODE_F17 2820 F17 key
KEYCODE_F18 2821 F18 key
KEYCODE_F19 2822 F19 key
KEYCODE_F20 2823 F20 key
KEYCODE_F21 2824 F21 key
KEYCODE_F22 2825 F22 key
KEYCODE_F23 2826 F23 key
KEYCODE_F24 2827 F24 key
KEYCODE_PROG3 2828 Program key 3
KEYCODE_PROG4 2829 Program key 4
KEYCODE_DASHBOARD 2830 Dashboard
KEYCODE_SUSPEND 2831 Suspend key
KEYCODE_HP 2832 HP key
KEYCODE_SOUND 2833 Sound key
KEYCODE_QUESTION 2834 Question key
KEYCODE_CONNECT 2836 Connect key
KEYCODE_SPORT 2837 Sport key
KEYCODE_SHOP 2838 Shop key
KEYCODE_ALTERASE 2839 Alternate key
KEYCODE_SWITCHVIDEOMODE 2841 Switch Video Mode key (monitor, LCD, and TV, etc.)
KEYCODE_BATTERY 2842 Battery key
KEYCODE_BLUETOOTH 2843 Bluetooth key
KEYCODE_WLAN 2844 WLAN key
KEYCODE_UWB 2845 Ultra-wideband key
KEYCODE_WWAN_WIMAX 2846 WWAN WiMAX key
KEYCODE_RFKILL 2847 RF Kill key
KEYCODE_CHANNEL 3001 Channel key
KEYCODE_BTN_0 3100 Button 0
KEYCODE_BTN_1 3101 Button 1
KEYCODE_BTN_2 3102 Button 2
KEYCODE_BTN_3 3103 Button 3
KEYCODE_BTN_4 3104 Button 4
KEYCODE_BTN_5 3105 Button 5
KEYCODE_BTN_6 3106 Button 6
KEYCODE_BTN_7 3107 Button 7
KEYCODE_BTN_8 3108 Button 8
KEYCODE_BTN_9 3109 Button 9

其它常用指令(未整理)

1、hdc是否安装成功
命令:hdc shell (能识别即成功)
2、关机
命令:hdc shell reboot shutdown
3、、重新启动系统
命令:hdc shell reboot
4、安装应用:
命令:hdc install 应用包所在路径
举例:hdc install D:\browser.hap
5、卸载应用
命令:hdc uninstall [BundleName]
举例:hdc uninstall com.archermind.web
6、查BundleName和AbilityName名称
命令:hdc shell wukong appinfo
7、上传文件到pad
命令:hdc file send 文件路径(文件位置) 文件上传pad的路径
举例:hdc file send D:\8.jpg /data/local/tmp
8、从pad下载文件到电脑
命令:hdc file recv 文件路径(文件位置) 文件下载到电脑的路径
举例:hdc file recv /data/local/tmp/aa.jpeg D:\
9、查看日志
命令:hdc hilog
10、抓取log并保存
命令:hdc hilog >log.log
举例:hdc hilog > D:\log.txt
11、查询连接设备
命令:hdc list targets
12、获取设备udid
命令:hdc shell bm get -u
13、查看应用配置信息
命令:hdc shell bm dump -n [BundleName]
举例:hdc shell bm dump -n com.tencent.wechat
14、清除应用缓存
命令:hdc shell bm clean -n [BundleName] -c
举例:hdc shell bm clean -n com.archermind.web -c
15、清除应用数据
命令:hdc shell bm clean -n [BundleName] -d
举例:hdc shell bm clean -n com.archermind.web -d
16、启动指定应用
命令:hdc shell aa start -a EntryAbility -b 包名
举例: hdc shell aa start -a EntryAbility -b com.archermind.web
17、强制退出应用
命令:hdc shell aa force-stop [BundleName]
举例:hdc shell aa force-stop com.superred.reminder
18、查看当前任务栈的ability信息(后台启动的应用)
命令:hdc shell aa dump -l
19、截图
命令:
hdc shell snapshot_display -f /data/local/tmp/screenshot.jpeg
hdc shell file recv/data/local/tmp/screenshot.jpeg  D:
20、获取进程信息和线程信息
hdc shell top
21、查看屏幕信息
hdc shell hidumper -s 10 -a screen
22、查看当前窗口信息
hdc shell hidumper -s WindowManagerService -a '-a'
23、获取应用信息
hdc shell aa dump -a
相关推荐
智汇云校乐乐老师3 小时前
华为数通HCIE备考经验分享
经验分享·华为·华为认证
塞尔维亚大汉3 小时前
OpenHarmony(鸿蒙南向开发)——轻量系统芯片移植指南(二)
操作系统·harmonyos
鸿蒙自习室6 小时前
鸿蒙UI开发——文本级联选择器
ui·华为·harmonyos·鸿蒙
雨汨6 小时前
鸿蒙-UIAbility组件生命周期
华为·harmonyos
程序猿阿伟6 小时前
《鸿蒙Next微内核:解锁人工智能决策树并行计算的加速密码》
人工智能·决策树·harmonyos
程序猿阿伟6 小时前
《鸿蒙Next平台:决策树面对噪声数据的鲁棒性逆袭》
决策树·华为·harmonyos
可可鸭~6 小时前
鸿蒙学习基础环境搭建、基本的语法、以及构建视图的基本语法(一)
android·学习·harmonyos
Mars--12 小时前
华为数通-访问控制列表
网络·华为
特立独行的猫a15 小时前
HarmonyOS NEXT应用开发边学边玩系列:从零实现一影视APP (四、最近上映电影滚动展示及加载更多的实现)
华为·harmonyos