参考官方 注册报名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)为例
hdc list targets -v
hdc -t deviceIDxxxx shell
1、查看系统安装了哪些应用
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 应用步伐的功能模块):
字段名称寄义moduleNameHAP 模块的名称,比方 entry。abilityInfos模块中定义的功能能力,描述了应用的能力入口(如 EntryAbility)。deviceTypes模块支持的装备类型,比方手机(phone)、平板(tablet)。extensionInfos模块定义的扩展能力,比方远程关照扩展。hapPathHAP 模块文件的路径。 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:/
复制代码 另外使用
也可以 然后拉取方式同上个方法
5、手机常亮:
- hdc shell power-shell setmode 602
复制代码 6 获取系统信息集群详细信息。
hidumper-调试命令-调测调优-系统 - 华为HarmonyOS开辟者
- hdc shell hidumper -c
- 获取"base"或者"system"信息集群详细信息。
- hidumper -c base
- hidumper -c system
复制代码 7获取当前系统参数
会得到下面一坨,留意如果查获取下面单独一个项的值 ,如const.product.name
则使用
- params get const.product.name
复制代码 装备基本信息
字段名称寄义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.apiversionHarmonyOS 的 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.ntpserverNTP 时间同步服务器列表。persist.time.auto_time是否自动更新时间(如 ON 表示启用)。persist.global.tz_override是否覆盖默认时区设置(布尔值)。 8 获取指定应用的名称,先将后台应用全退,再运行要查看的应用,
得到如果,就是上划进入任务管理器中任务的列表
- 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_yswipeVelocityPps_ (默认 600), stepLengthhdc shell uitest uiInput fling 10 10 200 200 500慢滑from_x, from_y, to_x, to_yswipeVelocityPps_ (默认 600)hdc shell uitest uiInput swipe 10 10 200 200 500拖拽from_x, from_y, to_x, to_yswipeVelocityPps_ (默认 600)hdc shell uitest uiInput drag 10 10 100 100 500指定方向滑动无direction (0: 左, 1: 右, 2: 上, 3: 下), swipeVelocityPps_, stepLengthhdc shell uitest uiInput dircFling 0 500输入框输入point_x, point_y, input无hdc shell uitest uiInput inputText 100 100 "hello 中国人"实体按键变乱keyIDkeyID2hdc shell uitest uiInput keyEvent Home组合按键变乱keyID, keyID2无hdc shell uitest uiInput keyEvent 2072 2038 键盘映射表如下:
NameValueDescriptionKEYCODE_FN0Function (Fn) keyKEYCODE_UNKNOWN-1Unknown keyKEYCODE_HOME1Function (Home) keyKEYCODE_BACK2Back keyKEYCODE_MEDIA_PLAY_PAUSE10Play/Pause keyKEYCODE_MEDIA_STOP11Stop keyKEYCODE_MEDIA_NEXT12Next keyKEYCODE_MEDIA_PREVIOUS13Previous keyKEYCODE_MEDIA_REWIND14Rewind keyKEYCODE_MEDIA_FAST_FORWARD15Fast Forward keyKEYCODE_VOLUME_UP16Volume Up keyKEYCODE_VOLUME_DOWN17Volume Down keyKEYCODE_POWER18Power keyKEYCODE_CAMERA19Camera keyKEYCODE_VOLUME_MUTE22Speaker Mute keyKEYCODE_MUTE23Mute keyKEYCODE_BRIGHTNESS_UP40Brightness Up keyKEYCODE_BRIGHTNESS_DOWN41Brightness Down keyKEYCODE_02000Key 0KEYCODE_12001Key 1KEYCODE_22002Key 2KEYCODE_32003Key 3KEYCODE_42004Key 4KEYCODE_52005Key 5KEYCODE_62006Key 6KEYCODE_72007Key 7KEYCODE_82008Key 8KEYCODE_92009Key 9KEYCODE_STAR2010Key *KEYCODE_POUND2011Key #KEYCODE_DPAD_UP2012Up key on D-padKEYCODE_DPAD_DOWN2013Down key on D-padKEYCODE_DPAD_LEFT2014Left key on D-padKEYCODE_DPAD_RIGHT2015Right key on D-padKEYCODE_DPAD_CENTER2016Center key on D-padKEYCODE_A2017Key AKEYCODE_B2018Key BKEYCODE_C2019Key CKEYCODE_D2020Key DKEYCODE_E2021Key EKEYCODE_F2022Key FKEYCODE_G2023Key GKEYCODE_H2024Key HKEYCODE_I2025Key IKEYCODE_J2026Key JKEYCODE_K2027Key KKEYCODE_L2028Key LKEYCODE_M2029Key MKEYCODE_N2030Key NKEYCODE_O2031Key OKEYCODE_P2032Key PKEYCODE_Q2033Key QKEYCODE_R2034Key RKEYCODE_S2035Key SKEYCODE_T2036Key TKEYCODE_U2037Key UKEYCODE_V2038Key VKEYCODE_W2039Key WKEYCODE_X2040Key XKEYCODE_Y2041Key YKEYCODE_Z2042Key ZKEYCODE_COMMA2043Key ,KEYCODE_PERIOD2044Key .KEYCODE_ALT_LEFT2045Left Alt keyKEYCODE_ALT_RIGHT2046Right Alt keyKEYCODE_SHIFT_LEFT2047Left Shift keyKEYCODE_SHIFT_RIGHT2048Right Shift keyKEYCODE_TAB2049Tab keyKEYCODE_SPACE2050Space keyKEYCODE_SYM2051Symbol keyKEYCODE_EXPLORER2052Explorer key, used to start the explorer applicationKEYCODE_ENVELOPE2053Email key, used to start the email applicationKEYCODE_ENTER2054Enter keyKEYCODE_DEL2055Delete keyKEYCODE_GRAVE2056Key `KEYCODE_MINUS2057Key -KEYCODE_EQUALS2058Key =KEYCODE_LEFT_BRACKET2059Key [KEYCODE_RIGHT_BRACKET2060Key ]KEYCODE_BACKSLASH2061Key \KEYCODE_SEMICOLON2062Key ;KEYCODE_APOSTROPHE2063Key ’KEYCODE_SLASH2064Key /KEYCODE_AT2065Key @KEYCODE_PLUS2066Key +KEYCODE_MENU2067Menu keyKEYCODE_PAGE_UP2068Page Up keyKEYCODE_PAGE_DOWN2069Page Down keyKEYCODE_ESCAPE2070ESC keyKEYCODE_FORWARD_DEL2071Delete keyKEYCODE_CTRL_LEFT2072Left Ctrl keyKEYCODE_CTRL_RIGHT2073Right Ctrl keyKEYCODE_CAPS_LOCK2074Caps Lock keyKEYCODE_SCROLL_LOCK2075Scroll Lock keyKEYCODE_META_LEFT2076Left Meta keyKEYCODE_META_RIGHT2077Right Meta keyKEYCODE_FUNCTION2078Function keyKEYCODE_SYSRQ2079System Request/Print Screen keyKEYCODE_BREAK2080Break/Pause keyKEYCODE_MOVE_HOME2081Move to Home keyKEYCODE_MOVE_END2082Move to End keyKEYCODE_INSERT2083Insert keyKEYCODE_FORWARD2084Forward keyKEYCODE_MEDIA_PLAY2085Play keyKEYCODE_MEDIA_PAUSE2086Pause keyKEYCODE_MEDIA_CLOSE2087Close keyKEYCODE_MEDIA_EJECT2088Eject keyKEYCODE_MEDIA_RECORD2089Record keyKEYCODE_F12090F1 keyKEYCODE_F22091F2 keyKEYCODE_F32092F3 keyKEYCODE_F42093F4 keyKEYCODE_F52094F5 keyKEYCODE_F62095F6 keyKEYCODE_F72096F7 keyKEYCODE_F82097F8 keyKEYCODE_F92098F9 keyKEYCODE_F102099F10 keyKEYCODE_F112100F11 keyKEYCODE_F122101F12 keyKEYCODE_NUM_LOCK2102Number Lock keyKEYCODE_NUMPAD_02103Key 0 on numeric keypadKEYCODE_NUMPAD_12104Key 1 on numeric keypadKEYCODE_NUMPAD_22105Key 2 on numeric keypadKEYCODE_NUMPAD_32106Key 3 on numeric keypadKEYCODE_NUMPAD_42107Key 4 on numeric keypadKEYCODE_NUMPAD_52108Key 5 on numeric keypadKEYCODE_NUMPAD_62109Key 6 on numeric keypadKEYCODE_NUMPAD_72110Key 7 on numeric keypadKEYCODE_NUMPAD_82111Key 8 on numeric keypadKEYCODE_NUMPAD_92112Key 9 on numeric keypadKEYCODE_NUMPAD_DIVIDE2113Key / on numeric keypadKEYCODE_NUMPAD_MULTIPLY2114Key * on numeric keypadKEYCODE_NUMPAD_SUBTRACT2115Key - on numeric keypadKEYCODE_NUMPAD_ADD2116Key + on numeric keypadKEYCODE_NUMPAD_DOT2117Key . on numeric keypadKEYCODE_NUMPAD_COMMA2118Key , on numeric keypadKEYCODE_NUMPAD_ENTER2119Enter key on numeric keypadKEYCODE_NUMPAD_EQUALS2120Key = on numeric keypadKEYCODE_NUMPAD_LEFT_PAREN2121Key ( on numeric keypadKEYCODE_NUMPAD_RIGHT_PAREN2122Key ) on numeric keypadKEYCODE_VIRTUAL_MULTITASK2210Multi-task keyKEYCODE_SLEEP2600Sleep keyKEYCODE_ZENKAKU_HANKAKU2601Zenkaku/Hankaku keyKEYCODE_102ND2602102nd keyKEYCODE_RO2603Ro keyKEYCODE_KATAKANA2604Katakana keyKEYCODE_HIRAGANA2605Hiragana keyKEYCODE_HENKAN2606Henkan keyKEYCODE_KATAKANA_HIRAGANA2607Katakana/Hiragana keyKEYCODE_MUHENKAN2608Muhenkan keyKEYCODE_LINEFEED2609Linefeed keyKEYCODE_MACRO2610Macro keyKEYCODE_NUMPAD_PLUSMINUS2611Plus/Minus key on the numeric keypadKEYCODE_SCALE2612Scale keyKEYCODE_HANGUEL2613Hanguel keyKEYCODE_HANJA2614Hanja keyKEYCODE_YEN2615Yen keyKEYCODE_STOP2616Stop keyKEYCODE_AGAIN2617Again keyKEYCODE_PROPS2618Props keyKEYCODE_UNDO2619Undo keyKEYCODE_COPY2620Copy keyKEYCODE_OPEN2621Open keyKEYCODE_PASTE2622Paste keyKEYCODE_FIND2623Find keyKEYCODE_CUT2624Cut keyKEYCODE_HELP2625Help keyKEYCODE_CALC2626Calc key, used to start the calculator applicationKEYCODE_FILE2627File keyKEYCODE_BOOKMARKS2628Bookmarks keyKEYCODE_NEXT2629Next keyKEYCODE_PLAYPAUSE2630Play/Pause keyKEYCODE_PREVIOUS2631Previous keyKEYCODE_STOPCD2632Stop CD keyKEYCODE_CONFIG2634Config keyKEYCODE_REFRESH2635Refresh keyKEYCODE_EXIT2636Exit keyKEYCODE_EDIT2637Edit keyKEYCODE_SCROLLUP2638Scroll Up keyKEYCODE_SCROLLDOWN2639Scroll Down keyKEYCODE_NEW2640New keyKEYCODE_REDO2641Redo keyKEYCODE_CLOSE2642Close keyKEYCODE_PLAY2643Play keyKEYCODE_BASSBOOST2644Bass Boost keyKEYCODE_PRINT2645Print keyKEYCODE_CHAT2646Chat keyKEYCODE_FINANCE2647Finance keyKEYCODE_CANCEL2648Cancel keyKEYCODE_KBDILLUM_TOGGLE2649Keyboard Illumination Toggle keyKEYCODE_KBDILLUM_DOWN2650Keyboard Illumination Up keyKEYCODE_KBDILLUM_UP2651Keyboard Illumination Down keyKEYCODE_SEND2652Send keyKEYCODE_REPLY2653Reply keyKEYCODE_FORWARDMAIL2654Forward Mail keyKEYCODE_SAVE2655Save keyKEYCODE_DOCUMENTS2656Documents keyKEYCODE_VIDEO_NEXT2657Next Video keyKEYCODE_VIDEO_PREV2658Previous Video keyKEYCODE_BRIGHTNESS_CYCLE2659Brightness Cycle keyKEYCODE_BRIGHTNESS_ZERO2660Brightness Zero keyKEYCODE_DISPLAY_OFF2661Display Off KeyKEYCODE_BTN_MISC2662Misc Button keyKEYCODE_GOTO2663Goto keyKEYCODE_INFO2664Info keyKEYCODE_PROGRAM2665Program keyKEYCODE_PVR2666PVR keyKEYCODE_SUBTITLE2667Subtitle keyKEYCODE_FULL_SCREEN2668Full Screen keyKEYCODE_KEYBOARD2669KeyboardKEYCODE_ASPECT_RATIO2670Aspect Ratio keyKEYCODE_PC2671Port Control keyKEYCODE_TV2672TV keyKEYCODE_TV22673TV key 2KEYCODE_VCR2674VCR keyKEYCODE_VCR22675VCR key 2KEYCODE_SAT2676SAT keyKEYCODE_CD2677CD keyKEYCODE_TAPE2678Tape keyKEYCODE_TUNER2679Tuner keyKEYCODE_PLAYER2680Player keyKEYCODE_DVD2681DVD keyKEYCODE_AUDIO2682Audio keyKEYCODE_VIDEO2683Video keyKEYCODE_MEMO2684Memo keyKEYCODE_CALENDAR2685Calendar keyKEYCODE_RED2686Red indicatorKEYCODE_GREEN2687Green indicatorKEYCODE_YELLOW2688Yellow indicatorKEYCODE_BLUE2689Blue indicatorKEYCODE_CHANNELUP2690Channel Up keyKEYCODE_CHANNELDOWN2691Channel Down keyKEYCODE_LAST2692Last keyKEYCODE_RESTART2693Restart keyKEYCODE_SLOW2694Slow keyKEYCODE_SHUFFLE2695Shuffle keyKEYCODE_VIDEOPHONE2696Videophone keyKEYCODE_GAMES2697Games keyKEYCODE_ZOOMIN2698Zoom-in keyKEYCODE_ZOOMOUT2699Zoom-out keyKEYCODE_ZOOMRESET2700Zoom Reset keyKEYCODE_WORDPROCESSOR2701Word Processor keyKEYCODE_EDITOR2702Editor keyKEYCODE_SPREADSHEET2703Spreadsheet keyKEYCODE_GRAPHICSEDITOR2704Graphics Editor keyKEYCODE_PRESENTATION2705Presentation keyKEYCODE_DATABASE2706Database keyKEYCODE_NEWS2707News keyKEYCODE_VOICEMAIL2708Voicemail keyKEYCODE_ADDRESSBOOK2709Addressbook keyKEYCODE_MESSENGER2710Messenger keyKEYCODE_BRIGHTNESS_TOGGLE2711Brightness Toggle keyKEYCODE_SPELLCHECK2712Spell Check keyKEYCODE_COFFEE2713Coffee key, used to launch screen lock or screen saverKEYCODE_MEDIA_REPEAT2714Media Repeat keyKEYCODE_IMAGES2715Images keyKEYCODE_BUTTONCONFIG2716Button Configuration keyKEYCODE_TASKMANAGER2717Task Manager keyKEYCODE_JOURNAL2718Log keyKEYCODE_CONTROLPANEL2719Control Panel keyKEYCODE_APPSELECT2720App Select keyKEYCODE_SCREENSAVER2721Screen Saver keyKEYCODE_ASSISTANT2722Assistant keyKEYCODE_KBD_LAYOUT_NEXT2723Next Keyboard Layout keyKEYCODE_BRIGHTNESS_MIN2724Min Brightness keyKEYCODE_BRIGHTNESS_MAX2725Max Brightness keyKEYCODE_KBDINPUTASSIST_PREV2726Assist_Previous key, used to view historical inputs.KEYCODE_KBDINPUTASSIST_NEXT2727Assist_Next key, used to view predictive inputs.KEYCODE_KBDINPUTASSIST_PREVGROUP2728Assist_Previous_Group key, used to switch to the previous input method in the input group.KEYCODE_KBDINPUTASSIST_NEXTGROUP2729Assist_Next_Group key, used to switch to the next input method in the input group.KEYCODE_KBDINPUTASSIST_ACCEPT2730Keyboard Input-assisted Accept keyKEYCODE_KBDINPUTASSIST_CANCEL2731Keyboard Input-assisted Cancel keyKEYCODE_FRONT2800Front key, used to launch the windshield defoggerKEYCODE_SETUP2801Setup keyKEYCODE_WAKEUP2802Wakeup keyKEYCODE_SENDFILE2803Send File keyKEYCODE_DELETEFILE2804Delete File keyKEYCODE_XFER2805XFER key, used to start file transferKEYCODE_PROG12806Program key 1KEYCODE_PROG22807Program key 2KEYCODE_MSDOS2808MS-DOS keyKEYCODE_SCREENLOCK2809Screen Lock keyKEYCODE_DIRECTION_ROTATE_DISPLAY2810Directional Rotation Display keyKEYCODE_CYCLEWINDOWS2811Windows Cycle keyKEYCODE_COMPUTER2812KeysKEYCODE_EJECTCLOSECD2813Eject CD keyKEYCODE_ISO2814ISO keyKEYCODE_MOVE2815Move keyKEYCODE_F132816F13 keyKEYCODE_F142817F14 keyKEYCODE_F152818F15 keyKEYCODE_F162819F16 keyKEYCODE_F172820F17 keyKEYCODE_F182821F18 keyKEYCODE_F192822F19 keyKEYCODE_F202823F20 keyKEYCODE_F212824F21 keyKEYCODE_F222825F22 keyKEYCODE_F232826F23 keyKEYCODE_F242827F24 keyKEYCODE_PROG32828Program key 3KEYCODE_PROG42829Program key 4KEYCODE_DASHBOARD2830DashboardKEYCODE_SUSPEND2831Suspend keyKEYCODE_HP2832HP keyKEYCODE_SOUND2833Sound keyKEYCODE_QUESTION2834Question keyKEYCODE_CONNECT2836Connect keyKEYCODE_SPORT2837Sport keyKEYCODE_SHOP2838Shop keyKEYCODE_ALTERASE2839Alternate keyKEYCODE_SWITCHVIDEOMODE2841Switch Video Mode key (monitor, LCD, and TV, etc.)KEYCODE_BATTERY2842Battery keyKEYCODE_BLUETOOTH2843Bluetooth keyKEYCODE_WLAN2844WLAN keyKEYCODE_UWB2845Ultra-wideband keyKEYCODE_WWAN_WIMAX2846WWAN WiMAX keyKEYCODE_RFKILL2847RF Kill keyKEYCODE_CHANNEL3001Channel keyKEYCODE_BTN_03100Button 0KEYCODE_BTN_13101Button 1KEYCODE_BTN_23102Button 2KEYCODE_BTN_33103Button 3KEYCODE_BTN_43104Button 4KEYCODE_BTN_53105Button 5KEYCODE_BTN_63106Button 6KEYCODE_BTN_73107Button 7KEYCODE_BTN_83108Button 8KEYCODE_BTN_93109Button 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
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |