diff --git a/.gitattributes b/.gitattributes index 1ef325f1b111266a6b26e0196871bd78baa8c2f3..cb63b16a03293cd0d5d76c4cd1c5f69a644278ac 100644 --- a/.gitattributes +++ b/.gitattributes @@ -57,3 +57,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text # Video files - compressed *.mp4 filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text +agent_for_ui/logcat_output.txt filter=lfs diff=lfs merge=lfs -text diff --git a/agent_for_ui/__pycache__/agent_html_prompt.cpython-311.pyc b/agent_for_ui/__pycache__/agent_html_prompt.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..165fde67f76dc51596dae719e93d6f3f12e6cae8 Binary files /dev/null and b/agent_for_ui/__pycache__/agent_html_prompt.cpython-311.pyc differ diff --git a/agent_for_ui/__pycache__/agent_html_prompt.cpython-312.pyc b/agent_for_ui/__pycache__/agent_html_prompt.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51615a1f718f15a634844a0efb576f69ab57263c Binary files /dev/null and b/agent_for_ui/__pycache__/agent_html_prompt.cpython-312.pyc differ diff --git a/agent_for_ui/__pycache__/agent_html_prompt_thought.cpython-311.pyc b/agent_for_ui/__pycache__/agent_html_prompt_thought.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..36d9a423e777b76a8ee84d01af48333a92d67cc2 Binary files /dev/null and b/agent_for_ui/__pycache__/agent_html_prompt_thought.cpython-311.pyc differ diff --git a/agent_for_ui/__pycache__/app_list_MIUI.cpython-312.pyc b/agent_for_ui/__pycache__/app_list_MIUI.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa62d983c078097d225ee16d68df7c74e750d187 Binary files /dev/null and b/agent_for_ui/__pycache__/app_list_MIUI.cpython-312.pyc differ diff --git a/agent_for_ui/__pycache__/chatgpt.cpython-312.pyc b/agent_for_ui/__pycache__/chatgpt.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78a142f0d6e2f4ae700c800597956bcca136c7e6 Binary files /dev/null and b/agent_for_ui/__pycache__/chatgpt.cpython-312.pyc differ diff --git a/agent_for_ui/__pycache__/episode_pb2.cpython-311.pyc b/agent_for_ui/__pycache__/episode_pb2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c6710a80104ea67d5b87c4f6391cfe766cf89224 Binary files /dev/null and b/agent_for_ui/__pycache__/episode_pb2.cpython-311.pyc differ diff --git a/agent_for_ui/__pycache__/main_for_ui.cpython-311.pyc b/agent_for_ui/__pycache__/main_for_ui.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..857252cff5ac2876429dc91749cdb7e7fe8ea1a8 Binary files /dev/null and b/agent_for_ui/__pycache__/main_for_ui.cpython-311.pyc differ diff --git a/agent_for_ui/__pycache__/xml_to_html.cpython-311.pyc b/agent_for_ui/__pycache__/xml_to_html.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eae43be698762e82ee8ececf56c9822abed80eb6 Binary files /dev/null and b/agent_for_ui/__pycache__/xml_to_html.cpython-311.pyc differ diff --git a/agent_for_ui/__pycache__/xml_to_html.cpython-312.pyc b/agent_for_ui/__pycache__/xml_to_html.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ece188b89395676478eaec3fa9f2971031259753 Binary files /dev/null and b/agent_for_ui/__pycache__/xml_to_html.cpython-312.pyc differ diff --git a/agent_for_ui/agent_for_api/API_list.py b/agent_for_ui/agent_for_api/API_list.py new file mode 100644 index 0000000000000000000000000000000000000000..e15dbab771b537efcf27233af2fe4b6619479b3d --- /dev/null +++ b/agent_for_ui/agent_for_api/API_list.py @@ -0,0 +1,277 @@ +usr_api_list = ''' +The following api list will be listed in this format: ADB Command - Function Description - Parameter Information +------------ +api list: +{ + { + "ADB Command": "adb shell am start -n com.miui.calculator/.cal.CalculatorActivity", + "Function Description": "启动计算器主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.SCIENTIFIC_MODE", + "Function Description": "启动科学计算器模式", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.calculator/.convert.CurrencyActivity", + "Function Description": "打开货币转换功能", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.TAX", + "Function Description": "打开房贷计算器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.MORTGAGE", + "Function Description": "打开税务计算器", + "Parameter Information": "No additional parameters required." + } +} +''' +usr_api_list_1 = ''' + +The following api list will be listed in this format: ADB Command - Function Description - Parameter Information +If the current step is completed and you need to return, you should give priority to return to the previous step/return to the main interface in the adb command. + +api list: +------------ +ADB Command: adb shell am start -a android.intent.action.MAIN -c android.intent.category.HOME +Function Description: Launches the home screen. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -n com.traveloka.android/.appentry.splash.SplashActivity +Function Description: Open the traveloka app +Parameter Information: No additional parameters required. + +ADB Command: adb shell input keyevent KEYCODE_HOME +Function Description: go to the home screen +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.SET_ALARM --ei android.intent.extra.alarm.HOUR --ei android.intent.extra.alarm.MINUTES +Function Description: Triggers an intent to open the alarm clock application with a pre-filled time for setting a new alarm. +Parameter Information: Replace with the hour and with the minutes for the alarm time. For example, for an alarm set at 7:15, would be 7 and would be 15. + +ADB Command: adb shell am start -n com.channel.weather.forecast/com.mytools.weather.ui.home.MainActivity +Function Description: Open the weather app +Parameter Information: No additional parameters required. + +ADB Command: adb shell input keyevent KEYCODE_BACK +Function Description: Return to previous page +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.WEB_SEARCH +Function Description: Open the Google Search app +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.settings.SETTINGS +Function Description: Opens the system settings. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.settings.WIRELESS_SETTINGS +Function Description: Opens wireless and network settings. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -d package: -a android.settings.APPLICATION_DETAILS_SETTINGS +Function Description: Opens the application information page. +Parameter Information: - Specific package name of the app. + +ADB Command: adb shell am broadcast -a clipper.set -e text "" +Function Description: Sends text to the clipboard. +Parameter Information: - Text to be sent to the clipboard. + +ADB Command: adb shell am start -n com.google.android.contacts/com.android.contacts.activities.PeopleActivity +Function Description: Opens the contacts app. +Parameter Information: Requires contact's URI. + +ADB Command: adb shell am start -a android.intent.action.SENDTO -d sms: --es sms_body "" +Function Description: Sends an SMS. +Parameter Information: - Recipient's phone number, - SMS text. + +ADB Command: adb shell am start -a android.intent.action.VIEW -d file:// -t +Function Description: Plays a multimedia file. +Parameter Information: - URI of the file, - MIME type of the file. + +ADB Command: adb shell am start -n com.google.android.GoogleCamera/com.android.camera.CameraLauncher +Function Description: Opens the camera. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.DIAL -d tel: +Function Description: Opens the dialer with a specific number. +Parameter Information: - Phone number to dial. + +ADB Command: adb shell am start -a android.media.action.STILL_IMAGE_CAMERA +Function Description: Takes a photo and saves it. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.media.action.VIDEO_CAMERA +Function Description: Records a video. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.VIEW -d +Function Description: Opens the browser and visits a web page. +Parameter Information: URL of the web page. + +ADB Command: adb shell am start -a android.intent.action.VIEW -d geo:37.7749,-122.4194 +Function Description: Opens maps and locates a specific position. +Parameter Information: Geographic coordinates. + +ADB Command: adb shell settings put global airplane_mode_on 0; adb shell am broadcast -a android.intent.action.AIRPLANE_MODE +Function Description: Enables airplane mode. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -n com.google.android.calendar/com.android.calendar.AllInOneActivity +Function Description: Opens the calendar app. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.item/event +Function Description: Creates a new event in the calendar. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.SHOW_ALARMS +Function Description: Opens the system alarm. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.SET_TIMER +Function Description: Opens the system timer. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -n com.google.android.apps.photos/com.google.android.apps.photos.home.HomeActivity +Function Description: Opens the gallery. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -n com.google.android.calculator/com.android.calculator2.Calculator +Function Description: Opens the calculator. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.MUSIC_PLAYER +Function Description: Opens the music player. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -n com.google.android.gm/com.google.android.gm.ConversationListActivityGmail +Function Description: Opens the email app. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.MAIN -c android.intent.category.APP_MESSAGING +Function Description: Opens the SMS app. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.VIEW -t video/* +Function Description: Opens the video player. +Parameter Information: No additional parameters required. + +ADB Command: adb shell am start -a android.intent.action.VIEW -d geo:0,0?q=Xiaomi+Technology+Park+Beijing +Function Description: Uses map for location (Xiaomi Technology Park Beijing example). +Parameter Information: Location query. + +ADB Command: adb shell am start -a android.intent.action.VIEW -d file:///sdcard/Download/video.mp4 -t video/mp4 +Function Description: Opens a specific video. +Parameter Information: - File path of the video, - MIME type of the file. + +ADB Command: adb shell am start -a android.intent.action.VIEW -d file:// -t +Function Description: Opens a file. +Parameter Information: - Absolute path of the target file, - MIME type of the file. + +ADB Command: adb shell screencap -p /sdcard/screenshot.png +Function Description: Takes a screenshot and saves it. +Parameter Information: No additional parameters required. + +ADB Command: adb shell screenrecord +Function Description: Records the screen. +Parameter Information: - Save path for the screen recording. + +ADB Command: adb shell ls | wc -l +Function Description: Counts the number of files in a folder. +Parameter Information: - Path of the folder. +''' + +# 创建备忘录: +# adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.item/event -e title "" -e begin "<starttime>" -e end "<endtime>" --ei allDay 0 --es description "<task_description>" --ez hasAlarm 1 +system_api_list = ''' +杀死进程: +adb shell am force-stop <package_name> + +清除应用数据: +adb shell pm clear <package_name> + +重启设备: +adb shell reboot + +清理内存(需要root权限): +adb shell am send-trim-memory <package_name> <level> + +安装应用: +adb install <path_to_apk> + +卸载应用: +adb uninstall <package_name> + +查看前台应用和服务: +adb shell dumpsys activity services <package_name> + +更改系统设置值(例如,关闭自动旋转): +adb shell settings put system accelerometer_rotation 0 + +获取设备的电池状态: +adb shell dumpsys battery + +设置设备进入休眠状态: +adb shell input keyevent KEYCODE_SLEEP + +唤醒设备: +adb shell input keyevent KEYCODE_WAKEUP + +查询某个应用的详细信息: +adb shell dumpsys package <package_name> + +开启或关闭WiFi(需要root权限): +adb shell svc wifi enable +adb shell svc wifi disable + +数据流量开关(需要root权限): +adb shell svc data enable +adb shell svc data disable + +开启或关闭蓝牙(需要root权限): +adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLE +adb shell am start -a android.bluetooth.adapter.action.REQUEST_DISABLE + +更改设备的屏幕亮度(数值为0-255): +adb shell settings put system screen_brightness <brightness_value> + +模拟电池充电状态(需要root权限): +adb shell dumpsys battery set status <status_code> + +模拟电池电量变化(需要root权限): +adb shell dumpsys battery set level <level> + +查询当前的内存使用情况: +adb shell dumpsys meminfo + +查询特定应用的内存使用情况: +adb shell dumpsys meminfo <package_name> + +获取系统广播列表: +adb shell dumpsys activity broadcasts + +获取当前的CPU使用情况: +adb shell dumpsys cpuinfo + +查看当前网络状态: +adb shell dumpsys netstats + +查看电池统计信息: +adb shell dumpsys batterystats + +查看系统服务列表: +adb shell service list +''' +# 还没有测试,不确定,多是java工具包, +non_standard_api_list = ''' +看壁纸dump信息 +adb shell dumpsys activity service com.miui.miwallpaper/.wallpaperservice.ImageWallpaper +adb shell dumpsys activity service com.miui.miwallpaper/.wallpaperservice.MiuiKeyguardPictorialWallpaper + + +''' \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/ApiReference.md b/agent_for_ui/agent_for_api/ApiReference.md new file mode 100644 index 0000000000000000000000000000000000000000..0ef1c4eadda3ab3eb9b8e16df962d0e6cb239b0e --- /dev/null +++ b/agent_for_ui/agent_for_api/ApiReference.md @@ -0,0 +1,2801 @@ +More detailed API Help [here](http://www.mithril.com.au/android/doc) + +**ActivityResultFacade** + * [setResultBoolean](#setResultBoolean.md) + * [setResultBooleanArray](#setResultBooleanArray.md) + * [setResultByte](#setResultByte.md) + * [setResultByteArray](#setResultByteArray.md) + * [setResultChar](#setResultChar.md) + * [setResultCharArray](#setResultCharArray.md) + * [setResultDouble](#setResultDouble.md) + * [setResultDoubleArray](#setResultDoubleArray.md) + * [setResultFloat](#setResultFloat.md) + * [setResultFloatArray](#setResultFloatArray.md) + * [setResultInteger](#setResultInteger.md) + * [setResultIntegerArray](#setResultIntegerArray.md) + * [setResultLong](#setResultLong.md) + * [setResultLongArray](#setResultLongArray.md) + * [setResultSerializable](#setResultSerializable.md) + * [setResultShort](#setResultShort.md) + * [setResultShortArray](#setResultShortArray.md) + * [setResultString](#setResultString.md) + * [setResultStringArray](#setResultStringArray.md) +**AndroidFacade** + * [environment](#environment.md) + * [getClipboard](#getClipboard.md) + * [getConstants](#getConstants.md) + * [getInput](#getInput.md) + * [getIntent](#getIntent.md) + * [getPackageVersion](#getPackageVersion.md) + * [getPackageVersionCode](#getPackageVersionCode.md) + * [getPassword](#getPassword.md) + * [log](#log.md) + * [makeIntent](#makeIntent.md) + * [makeToast](#makeToast.md) + * [notify](#notify.md) + * [requiredVersion](#requiredVersion.md) + * [sendBroadcast](#sendBroadcast.md) + * [sendBroadcastIntent](#sendBroadcastIntent.md) + * [sendEmail](#sendEmail.md) + * [setClipboard](#setClipboard.md) + * [startActivity](#startActivity.md) + * [startActivityForResult](#startActivityForResult.md) + * [startActivityForResultIntent](#startActivityForResultIntent.md) + * [startActivityIntent](#startActivityIntent.md) + * [vibrate](#vibrate.md) +**ApplicationManagerFacade** + * [forceStopPackage](#forceStopPackage.md) + * [getLaunchableApplications](#getLaunchableApplications.md) + * [getRunningPackages](#getRunningPackages.md) + * [launch](#launch.md) +**BatteryManagerFacade** + * [batteryCheckPresent](#batteryCheckPresent.md) + * [batteryGetHealth](#batteryGetHealth.md) + * [batteryGetLevel](#batteryGetLevel.md) + * [batteryGetPlugType](#batteryGetPlugType.md) + * [batteryGetStatus](#batteryGetStatus.md) + * [batteryGetTechnology](#batteryGetTechnology.md) + * [batteryGetTemperature](#batteryGetTemperature.md) + * [batteryGetVoltage](#batteryGetVoltage.md) + * [batteryStartMonitoring](#batteryStartMonitoring.md) + * [batteryStopMonitoring](#batteryStopMonitoring.md) + * [readBatteryData](#readBatteryData.md) +**BluetoothFacade** Requires API Level 5. + * [bluetoothAccept](#bluetoothAccept.md) + * [bluetoothActiveConnections](#bluetoothActiveConnections.md) + * [bluetoothConnect](#bluetoothConnect.md) + * [bluetoothDiscoveryCancel](#bluetoothDiscoveryCancel.md) + * [bluetoothDiscoveryStart](#bluetoothDiscoveryStart.md) + * [bluetoothGetConnectedDeviceName](#bluetoothGetConnectedDeviceName.md) + * [bluetoothGetLocalAddress](#bluetoothGetLocalAddress.md) + * [bluetoothGetLocalName](#bluetoothGetLocalName.md) + * [bluetoothGetRemoteDeviceName](#bluetoothGetRemoteDeviceName.md) + * [bluetoothGetScanMode](#bluetoothGetScanMode.md) + * [bluetoothIsDiscovering](#bluetoothIsDiscovering.md) + * [bluetoothMakeDiscoverable](#bluetoothMakeDiscoverable.md) + * [bluetoothRead](#bluetoothRead.md) + * [bluetoothReadBinary](#bluetoothReadBinary.md) + * [bluetoothReadLine](#bluetoothReadLine.md) + * [bluetoothReadReady](#bluetoothReadReady.md) + * [bluetoothSetLocalName](#bluetoothSetLocalName.md) + * [bluetoothStop](#bluetoothStop.md) + * [bluetoothWrite](#bluetoothWrite.md) + * [bluetoothWriteBinary](#bluetoothWriteBinary.md) + * [checkBluetoothState](#checkBluetoothState.md) + * [toggleBluetoothState](#toggleBluetoothState.md) +**CameraFacade** + * [cameraCapturePicture](#cameraCapturePicture.md) + * [cameraInteractiveCapturePicture](#cameraInteractiveCapturePicture.md) +**CommonIntentsFacade** + * [pick](#pick.md) + * [scanBarcode](#scanBarcode.md) + * [search](#search.md) + * [view](#view.md) + * [viewContacts](#viewContacts.md) + * [viewHtml](#viewHtml.md) + * [viewMap](#viewMap.md) +**ContactsFacade** + * [contactsGet](#contactsGet.md) + * [contactsGetAttributes](#contactsGetAttributes.md) + * [contactsGetById](#contactsGetById.md) + * [contactsGetCount](#contactsGetCount.md) + * [contactsGetIds](#contactsGetIds.md) + * [pickContact](#pickContact.md) + * [pickPhone](#pickPhone.md) + * [queryAttributes](#queryAttributes.md) + * [queryContent](#queryContent.md) +**EventFacade** + * [eventClearBuffer](#eventClearBuffer.md) + * [eventGetBrodcastCategories](#eventGetBrodcastCategories.md) + * [eventPoll](#eventPoll.md) + * [eventPost](#eventPost.md) + * [eventRegisterForBroadcast](#eventRegisterForBroadcast.md) + * [eventUnregisterForBroadcast](#eventUnregisterForBroadcast.md) + * [eventWait](#eventWait.md) + * [eventWaitFor](#eventWaitFor.md) + * [postEvent](#postEvent.md) + * [receiveEvent](#receiveEvent.md) + * [startEventDispatcher](#startEventDispatcher.md) + * [stopEventDispatcher](#stopEventDispatcher.md) + * [waitForEvent](#waitForEvent.md) +**LocationFacade** + * [geocode](#geocode.md) + * [getLastKnownLocation](#getLastKnownLocation.md) + * [locationProviderEnabled](#locationProviderEnabled.md) + * [locationProviders](#locationProviders.md) + * [readLocation](#readLocation.md) + * [startLocating](#startLocating.md) + * [stopLocating](#stopLocating.md) +**MediaPlayerFacade** + * [mediaIsPlaying](#mediaIsPlaying.md) + * [mediaPlay](#mediaPlay.md) + * [mediaPlayClose](#mediaPlayClose.md) + * [mediaPlayInfo](#mediaPlayInfo.md) + * [mediaPlayList](#mediaPlayList.md) + * [mediaPlayPause](#mediaPlayPause.md) + * [mediaPlaySeek](#mediaPlaySeek.md) + * [mediaPlaySetLooping](#mediaPlaySetLooping.md) + * [mediaPlayStart](#mediaPlayStart.md) +**MediaRecorderFacade** + * [recorderCaptureVideo](#recorderCaptureVideo.md) + * [recorderStartMicrophone](#recorderStartMicrophone.md) + * [recorderStartVideo](#recorderStartVideo.md) + * [recorderStop](#recorderStop.md) + * [startInteractiveVideoRecording](#startInteractiveVideoRecording.md) +**PhoneFacade** + * [checkNetworkRoaming](#checkNetworkRoaming.md) + * [getCellLocation](#getCellLocation.md) + * [getDeviceId](#getDeviceId.md) + * [getDeviceSoftwareVersion](#getDeviceSoftwareVersion.md) + * [getLine1Number](#getLine1Number.md) + * [getNeighboringCellInfo](#getNeighboringCellInfo.md) + * [getNetworkOperator](#getNetworkOperator.md) + * [getNetworkOperatorName](#getNetworkOperatorName.md) + * [getNetworkType](#getNetworkType.md) + * [getPhoneType](#getPhoneType.md) + * [getSimCountryIso](#getSimCountryIso.md) + * [getSimOperator](#getSimOperator.md) + * [getSimOperatorName](#getSimOperatorName.md) + * [getSimSerialNumber](#getSimSerialNumber.md) + * [getSimState](#getSimState.md) + * [getSubscriberId](#getSubscriberId.md) + * [getVoiceMailAlphaTag](#getVoiceMailAlphaTag.md) + * [getVoiceMailNumber](#getVoiceMailNumber.md) + * [phoneCall](#phoneCall.md) + * [phoneCallNumber](#phoneCallNumber.md) + * [phoneDial](#phoneDial.md) + * [phoneDialNumber](#phoneDialNumber.md) + * [readPhoneState](#readPhoneState.md) + * [startTrackingPhoneState](#startTrackingPhoneState.md) + * [stopTrackingPhoneState](#stopTrackingPhoneState.md) +**PreferencesFacade** + * [prefGetAll](#prefGetAll.md) + * [prefGetValue](#prefGetValue.md) + * [prefPutValue](#prefPutValue.md) +**SensorManagerFacade** + * [readSensors](#readSensors.md) + * [sensorsGetAccuracy](#sensorsGetAccuracy.md) + * [sensorsGetLight](#sensorsGetLight.md) + * [sensorsReadAccelerometer](#sensorsReadAccelerometer.md) + * [sensorsReadMagnetometer](#sensorsReadMagnetometer.md) + * [sensorsReadOrientation](#sensorsReadOrientation.md) + * [startSensing](#startSensing.md) + * [startSensingThreshold](#startSensingThreshold.md) + * [startSensingTimed](#startSensingTimed.md) + * [stopSensing](#stopSensing.md) +**SettingsFacade** + * [checkAirplaneMode](#checkAirplaneMode.md) + * [checkRingerSilentMode](#checkRingerSilentMode.md) + * [checkScreenOn](#checkScreenOn.md) + * [getMaxMediaVolume](#getMaxMediaVolume.md) + * [getMaxRingerVolume](#getMaxRingerVolume.md) + * [getMediaVolume](#getMediaVolume.md) + * [getRingerVolume](#getRingerVolume.md) + * [getScreenBrightness](#getScreenBrightness.md) + * [getScreenTimeout](#getScreenTimeout.md) + * [getVibrateMode](#getVibrateMode.md) + * [setMediaVolume](#setMediaVolume.md) + * [setRingerVolume](#setRingerVolume.md) + * [setScreenBrightness](#setScreenBrightness.md) + * [setScreenTimeout](#setScreenTimeout.md) + * [toggleAirplaneMode](#toggleAirplaneMode.md) + * [toggleRingerSilentMode](#toggleRingerSilentMode.md) + * [toggleVibrateMode](#toggleVibrateMode.md) +**SignalStrengthFacade** Requires API Level 7. + * [readSignalStrengths](#readSignalStrengths.md) + * [startTrackingSignalStrengths](#startTrackingSignalStrengths.md) + * [stopTrackingSignalStrengths](#stopTrackingSignalStrengths.md) +**SmsFacade** + * [smsDeleteMessage](#smsDeleteMessage.md) + * [smsGetAttributes](#smsGetAttributes.md) + * [smsGetMessageById](#smsGetMessageById.md) + * [smsGetMessageCount](#smsGetMessageCount.md) + * [smsGetMessageIds](#smsGetMessageIds.md) + * [smsGetMessages](#smsGetMessages.md) + * [smsMarkMessageRead](#smsMarkMessageRead.md) + * [smsSend](#smsSend.md) +**SpeechRecognitionFacade** + * [recognizeSpeech](#recognizeSpeech.md) +**TextToSpeechFacade** Requires API Level 4. + * [ttsIsSpeaking](#ttsIsSpeaking.md) + * [ttsSpeak](#ttsSpeak.md) +**ToneGeneratorFacade** + * [generateDtmfTones](#generateDtmfTones.md) +**UiFacade** + * [addContextMenuItem](#addContextMenuItem.md) + * [addOptionsMenuItem](#addOptionsMenuItem.md) + * [clearContextMenu](#clearContextMenu.md) + * [clearOptionsMenu](#clearOptionsMenu.md) + * [dialogCreateAlert](#dialogCreateAlert.md) + * [dialogCreateDatePicker](#dialogCreateDatePicker.md) + * [dialogCreateHorizontalProgress](#dialogCreateHorizontalProgress.md) + * [dialogCreateInput](#dialogCreateInput.md) + * [dialogCreatePassword](#dialogCreatePassword.md) + * [dialogCreateSeekBar](#dialogCreateSeekBar.md) + * [dialogCreateSpinnerProgress](#dialogCreateSpinnerProgress.md) + * [dialogCreateTimePicker](#dialogCreateTimePicker.md) + * [dialogDismiss](#dialogDismiss.md) + * [dialogGetInput](#dialogGetInput.md) + * [dialogGetPassword](#dialogGetPassword.md) + * [dialogGetResponse](#dialogGetResponse.md) + * [dialogGetSelectedItems](#dialogGetSelectedItems.md) + * [dialogSetCurrentProgress](#dialogSetCurrentProgress.md) + * [dialogSetItems](#dialogSetItems.md) + * [dialogSetMaxProgress](#dialogSetMaxProgress.md) + * [dialogSetMultiChoiceItems](#dialogSetMultiChoiceItems.md) + * [dialogSetNegativeButtonText](#dialogSetNegativeButtonText.md) + * [dialogSetNeutralButtonText](#dialogSetNeutralButtonText.md) + * [dialogSetPositiveButtonText](#dialogSetPositiveButtonText.md) + * [dialogSetSingleChoiceItems](#dialogSetSingleChoiceItems.md) + * [dialogShow](#dialogShow.md) + * [fullDismiss](#fullDismiss.md) + * [fullKeyOverride](#fullKeyOverride.md) + * [fullQuery](#fullQuery.md) + * [fullQueryDetail](#fullQueryDetail.md) + * [fullSetList](#fullSetList.md) + * [fullSetProperty](#fullSetProperty.md) + * [fullSetTitle](#fullSetTitle.md) + * [fullShow](#fullShow.md) + * [webViewShow](#webViewShow.md) +**WakeLockFacade** + * [wakeLockAcquireBright](#wakeLockAcquireBright.md) + * [wakeLockAcquireDim](#wakeLockAcquireDim.md) + * [wakeLockAcquireFull](#wakeLockAcquireFull.md) + * [wakeLockAcquirePartial](#wakeLockAcquirePartial.md) + * [wakeLockRelease](#wakeLockRelease.md) +**WebCamFacade** Requires API Level 8. + * [cameraStartPreview](#cameraStartPreview.md) + * [cameraStopPreview](#cameraStopPreview.md) + * [webcamAdjustQuality](#webcamAdjustQuality.md) + * [webcamStart](#webcamStart.md) + * [webcamStop](#webcamStop.md) +**WifiFacade** + * [checkWifiState](#checkWifiState.md) + * [toggleWifiState](#toggleWifiState.md) + * [wifiDisconnect](#wifiDisconnect.md) + * [wifiGetConnectionInfo](#wifiGetConnectionInfo.md) + * [wifiGetScanResults](#wifiGetScanResults.md) + * [wifiLockAcquireFull](#wifiLockAcquireFull.md) + * [wifiLockAcquireScanOnly](#wifiLockAcquireScanOnly.md) + * [wifiLockRelease](#wifiLockRelease.md) + * [wifiReassociate](#wifiReassociate.md) + * [wifiReconnect](#wifiReconnect.md) + * [wifiStartScan](#wifiStartScan.md) + + +### <sub>addContextMenuItem</sub> ### +``` +addContextMenuItem( + String label: label for this menu item, + String event: event that will be generated on menu item click, + Object eventData[optional]) + +Adds a new item to context menu. +``` + +### <sub>addOptionsMenuItem</sub> ### +``` +addOptionsMenuItem( + String label: label for this menu item, + String event: event that will be generated on menu item click, + Object eventData[optional], + String iconName[optional]: Android system menu icon, see +http://developer.android.com/reference/android/R.drawable.html) + +Adds a new item to options menu. +``` + +### <sub>batteryCheckPresent</sub> ### +``` +batteryCheckPresent() + +Returns the most recently received battery presence data. + +Requires API Level 5. +``` + +### <sub>batteryGetHealth</sub> ### +``` +batteryGetHealth() + +Returns the most recently received battery health data: +1 - unknown; +2 - good; +3 - overheat; +4 - dead; +5 - over voltage; +6 - unspecified failure; +``` + +### <sub>batteryGetLevel</sub> ### +``` +batteryGetLevel() + +Returns the most recently received battery level (percentage). + +Requires API Level 5. +``` + +### <sub>batteryGetPlugType</sub> ### +``` +batteryGetPlugType() + +Returns the most recently received plug type data: +-1 - unknown +0 - unplugged; +1 - power source is an AC charger +2 - power source is a USB port +``` + +### <sub>batteryGetStatus</sub> ### +``` +batteryGetStatus() + +Returns the most recently received battery status data: +1 - unknown; +2 - charging; +3 - discharging; +4 - not charging; +5 - full; +``` + +### <sub>batteryGetTechnology</sub> ### +``` +batteryGetTechnology() + +Returns the most recently received battery technology data. + +Requires API Level 5. +``` + +### <sub>batteryGetTemperature</sub> ### +``` +batteryGetTemperature() + +Returns the most recently received battery temperature. + +Requires API Level 5. +``` + +### <sub>batteryGetVoltage</sub> ### +``` +batteryGetVoltage() + +Returns the most recently received battery voltage. + +Requires API Level 5. +``` + +### <sub>batteryStartMonitoring</sub> ### +``` +batteryStartMonitoring() + +Starts tracking battery state. + +Generates "battery" events. +``` + +### <sub>batteryStopMonitoring</sub> ### +``` +batteryStopMonitoring() + +Stops tracking battery state. +``` + +### <sub>bluetoothAccept</sub> ### +``` +bluetoothAccept( + String uuid[optional, default 457807c0-4897-11df-9879-0800200c9a66], + Integer timeout[optional, default 0]: How long to wait for a new connection, 0 +is wait for ever) + +Listens for and accepts a Bluetooth connection. Blocks until the connection is +established or fails. + +Requires API Level 5. +``` + +### <sub>bluetoothActiveConnections</sub> ### +``` +bluetoothActiveConnections() + +Returns active Bluetooth connections. + +Requires API Level 5. +``` + +### <sub>bluetoothConnect</sub> ### +``` +bluetoothConnect( + String uuid[optional, default 457807c0-4897-11df-9879-0800200c9a66]: The UUID +passed here must match the UUID used by the server device., + String address[optional]: The user will be presented with a list of discovered +devices to choose from if an address is not provided.) + +Connect to a device over Bluetooth. Blocks until the connection is established +or fails. + +Returns: + True if the connection was established successfully. + +Requires API Level 5. +``` + +### <sub>bluetoothDiscoveryCancel</sub> ### +``` +bluetoothDiscoveryCancel() + +Cancel the current device discovery process. + +Returns: + true on success, false on error + +Requires API Level 5. +``` + +### <sub>bluetoothDiscoveryStart</sub> ### +``` +bluetoothDiscoveryStart() + +Start the remote device discovery process. + +Returns: + true on success, false on error + +Requires API Level 5. +``` + +### <sub>bluetoothGetConnectedDeviceName</sub> ### +``` +bluetoothGetConnectedDeviceName( + String connID[optional, default null]: Connection id) + +Returns the name of the connected device. + +Requires API Level 5. +``` + +### <sub>bluetoothGetLocalAddress</sub> ### +``` +bluetoothGetLocalAddress() + +Returns the hardware address of the local Bluetooth adapter. + +Requires API Level 5. +``` + +### <sub>bluetoothGetLocalName</sub> ### +``` +bluetoothGetLocalName() + +Gets the Bluetooth Visible device name + +Requires API Level 5. +``` + +### <sub>bluetoothGetRemoteDeviceName</sub> ### +``` +bluetoothGetRemoteDeviceName( + String address: Bluetooth Address For Target Device) + +Queries a remote device for it's name or null if it can't be resolved + +Requires API Level 5. +``` + +### <sub>bluetoothGetScanMode</sub> ### +``` +bluetoothGetScanMode() + +Gets the scan mode for the local dongle. +Return values: +-1 when Bluetooth is disabled. +0 if non discoverable and non connectable. +1 connectable non discoverable. +3 connectable and discoverable. + +Requires API Level 5. +``` + +### <sub>bluetoothIsDiscovering</sub> ### +``` +bluetoothIsDiscovering() + +Return true if the local Bluetooth adapter is currently in the device discovery +process. + +Requires API Level 5. +``` + +### <sub>bluetoothMakeDiscoverable</sub> ### +``` +bluetoothMakeDiscoverable( + Integer duration[optional, default 300]: period of time, in seconds, during +which the device should be discoverable) + +Requests that the device be discoverable for Bluetooth connections. + +Requires API Level 5. +``` + +### <sub>bluetoothRead</sub> ### +``` +bluetoothRead( + Integer bufferSize[optional, default 4096], + String connID[optional, default null]: Connection id) + +Read up to bufferSize ASCII characters. + +Requires API Level 5. +``` + +### <sub>bluetoothReadBinary</sub> ### +``` +bluetoothReadBinary( + Integer bufferSize[optional, default 4096], + String connID[optional, default ]: Connection id) + +Read up to bufferSize bytes and return a chunked, base64 encoded string. + +Requires API Level 5. +``` + +### <sub>bluetoothReadLine</sub> ### +``` +bluetoothReadLine( + String connID[optional, default null]: Connection id) + +Read the next line. + +Requires API Level 5. +``` + +### <sub>bluetoothReadReady</sub> ### +``` +bluetoothReadReady( + String connID[optional, default ]: Connection id) + +Returns True if the next read is guaranteed not to block. + +Requires API Level 5. +``` + +### <sub>bluetoothSetLocalName</sub> ### +``` +bluetoothSetLocalName( + String name: New local name) + +Sets the Bluetooth Visible device name, returns True on success + +Requires API Level 5. +``` + +### <sub>bluetoothStop</sub> ### +``` +bluetoothStop( + String connID[optional, default null]: Connection id) + +Stops Bluetooth connection. + +Requires API Level 5. +``` + +### <sub>bluetoothWrite</sub> ### +``` +bluetoothWrite( + String ascii, + String connID[optional, default ]: Connection id) + +Sends ASCII characters over the currently open Bluetooth connection. + +Requires API Level 5. +``` + +### <sub>bluetoothWriteBinary</sub> ### +``` +bluetoothWriteBinary( + String base64: A base64 encoded String of the bytes to be sent., + String connID[optional, default ]: Connection id) + +Send bytes over the currently open Bluetooth connection. + +Requires API Level 5. +``` + +### <sub>cameraCapturePicture</sub> ### +``` +cameraCapturePicture( + String targetPath, + Boolean useAutoFocus[optional, default true]) + +Take a picture and save it to the specified path. + +Returns: + A map of Booleans autoFocus and takePicture where True indicates success. +``` + +### <sub>cameraInteractiveCapturePicture</sub> ### +``` +cameraInteractiveCapturePicture( + String targetPath) + +Starts the image capture application to take a picture and saves it to the +specified path. +``` + +### <sub>cameraStartPreview</sub> ### +``` +cameraStartPreview( + Integer resolutionLevel[optional, default 0]: increasing this number provides +higher resolution, + Integer jpegQuality[optional, default 20]: a number from 0-100, + String filepath[optional]: Path to store jpeg files.) + +Start Preview Mode. Throws 'preview' events. + +Returns: + True if successful + +Requires API Level 8. +``` + +### <sub>cameraStopPreview</sub> ### +``` +cameraStopPreview() + +Stop the preview mode. + +Requires API Level 8. +``` + +### <sub>checkAirplaneMode</sub> ### +``` +checkAirplaneMode() + +Checks the airplane mode setting. + +Returns: + True if airplane mode is enabled. +``` + +### <sub>checkBluetoothState</sub> ### +``` +checkBluetoothState() + +Checks Bluetooth state. + +Returns: + True if Bluetooth is enabled. + +Requires API Level 5. +``` + +### <sub>checkNetworkRoaming</sub> ### +``` +checkNetworkRoaming() + +Returns true if the device is considered roaming on the current network, for +GSM purposes. +``` + +### <sub>checkRingerSilentMode</sub> ### +``` +checkRingerSilentMode() + +Checks the ringer silent mode setting. + +Returns: + True if ringer silent mode is enabled. +``` + +### <sub>checkScreenOn</sub> ### +``` +checkScreenOn() + +Checks if the screen is on or off (requires API level 7). + +Returns: + True if the screen is currently on. +``` + +### <sub>checkWifiState</sub> ### +``` +checkWifiState() + +Checks Wifi state. + +Returns: + True if Wifi is enabled. +``` + +### <sub>clearContextMenu</sub> ### +``` +clearContextMenu() + +Removes all items previously added to context menu. +``` + +### <sub>clearOptionsMenu</sub> ### +``` +clearOptionsMenu() + +Removes all items previously added to options menu. +``` + +### <sub>contactsGet</sub> ### +``` +contactsGet( + JSONArray attributes[optional]) + +Returns a List of all contacts. + +Returns: + a List of contacts as Maps +``` + +### <sub>contactsGetAttributes</sub> ### +``` +contactsGetAttributes() + +Returns a List of all possible attributes for contacts. +``` + +### <sub>contactsGetById</sub> ### +``` +contactsGetById( + Integer id, + JSONArray attributes[optional]) + +Returns contacts by ID. +``` + +### <sub>contactsGetCount</sub> ### +``` +contactsGetCount() + +Returns the number of contacts. +``` + +### <sub>contactsGetIds</sub> ### +``` +contactsGetIds() + +Returns a List of all contact IDs. +``` + +### <sub>dialogCreateAlert</sub> ### +``` +dialogCreateAlert( + String title[optional], + String message[optional]) + +Create alert dialog. +``` + +### <sub>dialogCreateDatePicker</sub> ### +``` +dialogCreateDatePicker( + Integer year[optional, default 1970], + Integer month[optional, default 1], + Integer day[optional, default 1]) + +Create date picker dialog. +``` + +### <sub>dialogCreateHorizontalProgress</sub> ### +``` +dialogCreateHorizontalProgress( + String title[optional], + String message[optional], + Integer maximum progress[optional, default 100]) + +Create a horizontal progress dialog. +``` + +### <sub>dialogCreateInput</sub> ### +``` +dialogCreateInput( + String title[optional, default Value]: title of the input box, + String message[optional, default Please enter value:]: message to display +above the input box, + String defaultText[optional]: text to insert into the input box, + String inputType[optional]: type of input data, ie number or text) + +Create a text input dialog. +``` + +### <sub>dialogCreatePassword</sub> ### +``` +dialogCreatePassword( + String title[optional, default Password]: title of the input box, + String message[optional, default Please enter password:]: message to display +above the input box) + +Create a password input dialog. +``` + +### <sub>dialogCreateSeekBar</sub> ### +``` +dialogCreateSeekBar( + Integer starting value[optional, default 50], + Integer maximum value[optional, default 100], + String title, + String message) + +Create seek bar dialog. +``` + +### <sub>dialogCreateSpinnerProgress</sub> ### +``` +dialogCreateSpinnerProgress( + String title[optional], + String message[optional], + Integer maximum progress[optional, default 100]) + +Create a spinner progress dialog. +``` + +### <sub>dialogCreateTimePicker</sub> ### +``` +dialogCreateTimePicker( + Integer hour[optional, default 0], + Integer minute[optional, default 0], + Boolean is24hour[optional, default false]: Use 24 hour clock) + +Create time picker dialog. +``` + +### <sub>dialogDismiss</sub> ### +``` +dialogDismiss() + +Dismiss dialog. +``` + +### <sub>dialogGetInput</sub> ### +``` +dialogGetInput( + String title[optional, default Value]: title of the input box, + String message[optional, default Please enter value:]: message to display +above the input box, + String defaultText[optional]: text to insert into the input box) + +Queries the user for a text input. +``` + +### <sub>dialogGetPassword</sub> ### +``` +dialogGetPassword( + String title[optional, default Password]: title of the password box, + String message[optional, default Please enter password:]: message to display +above the input box) + +Queries the user for a password. +``` + +### <sub>dialogGetResponse</sub> ### +``` +dialogGetResponse() + +Returns dialog response. +``` + +### <sub>dialogGetSelectedItems</sub> ### +``` +dialogGetSelectedItems() + +This method provides list of items user selected. + +Returns: + Selected items +``` + +### <sub>dialogSetCurrentProgress</sub> ### +``` +dialogSetCurrentProgress( + Integer current) + +Set progress dialog current value. +``` + +### <sub>dialogSetItems</sub> ### +``` +dialogSetItems( + JSONArray items) + +Set alert dialog list items. +``` + +### <sub>dialogSetMaxProgress</sub> ### +``` +dialogSetMaxProgress( + Integer max) + +Set progress dialog maximum value. +``` + +### <sub>dialogSetMultiChoiceItems</sub> ### +``` +dialogSetMultiChoiceItems( + JSONArray items, + JSONArray selected[optional]: list of selected items) + +Set dialog multiple choice items and selection. +``` + +### <sub>dialogSetNegativeButtonText</sub> ### +``` +dialogSetNegativeButtonText( + String text) + +Set alert dialog button text. +``` + +### <sub>dialogSetNeutralButtonText</sub> ### +``` +dialogSetNeutralButtonText( + String text) + +Set alert dialog button text. +``` + +### <sub>dialogSetPositiveButtonText</sub> ### +``` +dialogSetPositiveButtonText( + String text) + +Set alert dialog positive button text. +``` + +### <sub>dialogSetSingleChoiceItems</sub> ### +``` +dialogSetSingleChoiceItems( + JSONArray items, + Integer selected[optional, default 0]: selected item index) + +Set dialog single choice items and selected item. +``` + +### <sub>dialogShow</sub> ### +``` +dialogShow() + +Show dialog. +``` + +### <sub>environment</sub> ### +``` +environment() + +A map of various useful environment details +``` + +### <sub>eventClearBuffer</sub> ### +``` +eventClearBuffer() + +Clears all events from the event buffer. +``` + +### <sub>eventGetBrodcastCategories</sub> ### +``` +eventGetBrodcastCategories() + +Lists all the broadcast signals we are listening for +``` + +### <sub>eventPoll</sub> ### +``` +eventPoll( + Integer number_of_events[optional, default 1]) + +Returns and removes the oldest n events (i.e. location or sensor update, etc.) +from the event buffer. + +Returns: + A List of Maps of event properties. +``` + +### <sub>eventPost</sub> ### +``` +eventPost( + String name: Name of event, + String data: Data contained in event., + Boolean enqueue[optional, default null]: Set to False if you don't want your +events to be added to the event queue, just dispatched.) + +Post an event to the event queue. +``` + +### <sub>eventRegisterForBroadcast</sub> ### +``` +eventRegisterForBroadcast( + String category, + Boolean enqueue[optional, default true]: Should this events be added to the +event queue or only dispatched) + +Registers a listener for a new broadcast signal +``` + +### <sub>eventUnregisterForBroadcast</sub> ### +``` +eventUnregisterForBroadcast( + String category) + +Stop listening for a broadcast signal +``` + +### <sub>eventWait</sub> ### +``` +eventWait( + Integer timeout[optional]: the maximum time to wait) + +Blocks until an event occurs. The returned event is removed from the buffer. + +Returns: + Map of event properties. +``` + +### <sub>eventWaitFor</sub> ### +``` +eventWaitFor( + String eventName, + Integer timeout[optional]: the maximum time to wait (in ms)) + +Blocks until an event with the supplied name occurs. The returned event is not +removed from the buffer. + +Returns: + Map of event properties. +``` + +### <sub>forceStopPackage</sub> ### +``` +forceStopPackage( + String packageName: name of package) + +Force stops a package. +``` + +### <sub>fullDismiss</sub> ### +``` +fullDismiss() + +Dismiss Full Screen. +``` + +### <sub>fullKeyOverride</sub> ### +``` +fullKeyOverride( + JSONArray keycodes: List of keycodes to override, + Boolean enable[optional, default true]: Turn overriding or off) + +Override default key actions +``` + +### <sub>fullQuery</sub> ### +``` +fullQuery() + +Get Fullscreen Properties +``` + +### <sub>fullQueryDetail</sub> ### +``` +fullQueryDetail( + String id: id of layout widget) + +Get fullscreen properties for a specific widget +``` + +### <sub>fullSetList</sub> ### +``` +fullSetList( + String id: id of layout widget, + JSONArray list: List to set) + +Attach a list to a fullscreen widget +``` + +### <sub>fullSetProperty</sub> ### +``` +fullSetProperty( + String id: id of layout widget, + String property: name of property to set, + String value: value to set property to) + +Set fullscreen widget property +``` + +### <sub>fullSetTitle</sub> ### +``` +fullSetTitle( + String title: Activity Title) + +Set the Full Screen Activity Title +``` + +### <sub>fullShow</sub> ### +``` +fullShow( + String layout: String containing View layout, + String title[optional]: Activity Title) + +Show Full Screen. +``` + +### <sub>generateDtmfTones</sub> ### +``` +generateDtmfTones( + String phoneNumber, + Integer toneDuration[optional, default 100]: duration of each tone in +milliseconds) + +Generate DTMF tones for the given phone number. +``` + +### <sub>geocode</sub> ### +``` +geocode( + Double latitude, + Double longitude, + Integer maxResults[optional, default 1]: maximum number of results) + +Returns a list of addresses for the given latitude and longitude. + +Returns: + A list of addresses. +``` + +### <sub>getCellLocation</sub> ### +``` +getCellLocation() + +Returns the current cell location. +``` + +### <sub>getClipboard</sub> ### +``` +getClipboard() + +Read text from the clipboard. + +Returns: + The text in the clipboard. +``` + +### <sub>getConstants</sub> ### +``` +getConstants( + String classname: Class to get constants from) + +Get list of constants (static final fields) for a class +``` + +### <sub>getDeviceId</sub> ### +``` +getDeviceId() + +Returns the unique device ID, for example, the IMEI for GSM and the MEID for +CDMA phones. Return null if device ID is not available. +``` + +### <sub>getDeviceSoftwareVersion</sub> ### +``` +getDeviceSoftwareVersion() + +Returns the software version number for the device, for example, the IMEI/SV +for GSM phones. Return null if the software version is not available. +``` + +### <sub>getInput</sub> ### +``` +getInput( + String title[optional, default SL4A Input]: title of the input box, + String message[optional, default Please enter value:]: message to display +above the input box) + +Queries the user for a text input. + +Deprecated in r3! Please use dialogGetInput instead. +``` + +### <sub>getIntent</sub> ### +``` +getIntent() + +Returns the intent that launched the script. +``` + +### <sub>getLastKnownLocation</sub> ### +``` +getLastKnownLocation() + +Returns the last known location of the device. + +Returns: + A map of location information by provider. +``` + +### <sub>getLaunchableApplications</sub> ### +``` +getLaunchableApplications() + +Returns a list of all launchable application class names. +``` + +### <sub>getLine1Number</sub> ### +``` +getLine1Number() + +Returns the phone number string for line 1, for example, the MSISDN for a GSM +phone. Return null if it is unavailable. +``` + +### <sub>getMaxMediaVolume</sub> ### +``` +getMaxMediaVolume() + +Returns the maximum media volume. +``` + +### <sub>getMaxRingerVolume</sub> ### +``` +getMaxRingerVolume() + +Returns the maximum ringer volume. +``` + +### <sub>getMediaVolume</sub> ### +``` +getMediaVolume() + +Returns the current media volume. +``` + +### <sub>getNeighboringCellInfo</sub> ### +``` +getNeighboringCellInfo() + +Returns the neighboring cell information of the device. +``` + +### <sub>getNetworkOperator</sub> ### +``` +getNetworkOperator() + +Returns the numeric name (MCC+MNC) of current registered operator. +``` + +### <sub>getNetworkOperatorName</sub> ### +``` +getNetworkOperatorName() + +Returns the alphabetic name of current registered operator. +``` + +### <sub>getNetworkType</sub> ### +``` +getNetworkType() + +Returns a the radio technology (network type) currently in use on the device. +``` + +### <sub>getPackageVersion</sub> ### +``` +getPackageVersion( + String packageName) + +Returns package version name. +``` + +### <sub>getPackageVersionCode</sub> ### +``` +getPackageVersionCode( + String packageName) + +Returns package version code. +``` + +### <sub>getPassword</sub> ### +``` +getPassword( + String title[optional, default SL4A Password Input]: title of the input box, + String message[optional, default Please enter password:]: message to display +above the input box) + +Queries the user for a password. + +Deprecated in r3! Please use dialogGetPassword instead. +``` + +### <sub>getPhoneType</sub> ### +``` +getPhoneType() + +Returns the device phone type. +``` + +### <sub>getRingerVolume</sub> ### +``` +getRingerVolume() + +Returns the current ringer volume. +``` + +### <sub>getRunningPackages</sub> ### +``` +getRunningPackages() + +Returns a list of packages running activities or services. + +Returns: + List of packages running activities. +``` + +### <sub>getScreenBrightness</sub> ### +``` +getScreenBrightness() + +Returns the screen backlight brightness. + +Returns: + the current screen brightness between 0 and 255 +``` + +### <sub>getScreenTimeout</sub> ### +``` +getScreenTimeout() + +Returns the current screen timeout in seconds. + +Returns: + the current screen timeout in seconds. +``` + +### <sub>getSimCountryIso</sub> ### +``` +getSimCountryIso() + +Returns the ISO country code equivalent for the SIM provider's country code. +``` + +### <sub>getSimOperator</sub> ### +``` +getSimOperator() + +Returns the MCC+MNC (mobile country code + mobile network code) of the provider +of the SIM. 5 or 6 decimal digits. +``` + +### <sub>getSimOperatorName</sub> ### +``` +getSimOperatorName() + +Returns the Service Provider Name (SPN). +``` + +### <sub>getSimSerialNumber</sub> ### +``` +getSimSerialNumber() + +Returns the serial number of the SIM, if applicable. Return null if it is +unavailable. +``` + +### <sub>getSimState</sub> ### +``` +getSimState() + +Returns the state of the device SIM card. +``` + +### <sub>getSubscriberId</sub> ### +``` +getSubscriberId() + +Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return +null if it is unavailable. +``` + +### <sub>getVibrateMode</sub> ### +``` +getVibrateMode( + Boolean ringer[optional]) + +Checks Vibration setting. If ringer=true then query Ringer setting, else query +Notification setting + +Returns: + True if vibrate mode is enabled. +``` + +### <sub>getVoiceMailAlphaTag</sub> ### +``` +getVoiceMailAlphaTag() + +Retrieves the alphabetic identifier associated with the voice mail number. +``` + +### <sub>getVoiceMailNumber</sub> ### +``` +getVoiceMailNumber() + +Returns the voice mail number. Return null if it is unavailable. +``` + +### <sub>launch</sub> ### +``` +launch( + String className) + +Start activity with the given class name. +``` + +### <sub>locationProviderEnabled</sub> ### +``` +locationProviderEnabled( + String provider: Name of location provider) + +Ask if provider is enabled +``` + +### <sub>locationProviders</sub> ### +``` +locationProviders() + +Returns availables providers on the phone +``` + +### <sub>log</sub> ### +``` +log( + String message) + +Writes message to logcat. +``` + +### <sub>makeIntent</sub> ### +``` +makeIntent( + String action, + String uri[optional], + String type[optional]: MIME type/subtype of the URI, + JSONObject extras[optional]: a Map of extras to add to the Intent, + JSONArray categories[optional]: a List of categories to add to the Intent, + String packagename[optional]: name of package. If used, requires classname to +be useful, + String classname[optional]: name of class. If used, requires packagename to be +useful, + Integer flags[optional]: Intent flags) + +Create an Intent. + +Returns: + An object representing an Intent +``` + +### <sub>makeToast</sub> ### +``` +makeToast( + String message) + +Displays a short-duration Toast notification. +``` + +### <sub>mediaIsPlaying</sub> ### +``` +mediaIsPlaying( + String tag[optional, default default]: string identifying resource) + +Checks if media file is playing. + +Returns: + true if playing +``` + +### <sub>mediaPlay</sub> ### +``` +mediaPlay( + String url: url of media resource, + String tag[optional, default default]: string identifying resource, + Boolean play[optional, default true]: start playing immediately) + +Open a media file + +Returns: + true if play successful +``` + +### <sub>mediaPlayClose</sub> ### +``` +mediaPlayClose( + String tag[optional, default default]: string identifying resource) + +Close media file + +Returns: + true if successful +``` + +### <sub>mediaPlayInfo</sub> ### +``` +mediaPlayInfo( + String tag[optional, default default]: string identifying resource) + +Information on current media + +Returns: + Media Information +``` + +### <sub>mediaPlayList</sub> ### +``` +mediaPlayList() + +Lists currently loaded media + +Returns: + List of Media Tags +``` + +### <sub>mediaPlayPause</sub> ### +``` +mediaPlayPause( + String tag[optional, default default]: string identifying resource) + +pause playing media file + +Returns: + true if successful +``` + +### <sub>mediaPlaySeek</sub> ### +``` +mediaPlaySeek( + Integer msec: Position in millseconds, + String tag[optional, default default]: string identifying resource) + +Seek To Position + +Returns: + New Position (in ms) +``` + +### <sub>mediaPlaySetLooping</sub> ### +``` +mediaPlaySetLooping( + Boolean enabled[optional, default true], + String tag[optional, default default]: string identifying resource) + +Set Looping + +Returns: + True if successful +``` + +### <sub>mediaPlayStart</sub> ### +``` +mediaPlayStart( + String tag[optional, default default]: string identifying resource) + +start playing media file + +Returns: + true if successful +``` + +### <sub>notify</sub> ### +``` +notify( + String title: title, + String message) + +Displays a notification that will be canceled when the user clicks on it. +``` + +### <sub>phoneCall</sub> ### +``` +phoneCall( + String uri) + +Calls a contact/phone number by URI. +``` + +### <sub>phoneCallNumber</sub> ### +``` +phoneCallNumber( + String phone number) + +Calls a phone number. +``` + +### <sub>phoneDial</sub> ### +``` +phoneDial( + String uri) + +Dials a contact/phone number by URI. +``` + +### <sub>phoneDialNumber</sub> ### +``` +phoneDialNumber( + String phone number) + +Dials a phone number. +``` + +### <sub>pick</sub> ### +``` +pick( + String uri) + +Display content to be picked by URI (e.g. contacts) + +Returns: + A map of result values. +``` + +### <sub>pickContact</sub> ### +``` +pickContact() + +Displays a list of contacts to pick from. + +Returns: + A map of result values. +``` + +### <sub>pickPhone</sub> ### +``` +pickPhone() + +Displays a list of phone numbers to pick from. + +Returns: + The selected phone number. +``` + +### <sub>postEvent</sub> ### +``` +rpcPostEvent( + String name, + String data) + +Post an event to the event queue. + +Deprecated in r4! Please use eventPost instead. +``` + +### <sub>prefGetAll</sub> ### +``` +prefGetAll( + String filename[optional]: Desired preferences file. If not defined, uses the +default Shared Preferences.) + +Get list of Shared Preference Values + +Returns: + Map of key,value +``` + +### <sub>prefGetValue</sub> ### +``` +prefGetValue( + String key, + String filename[optional]: Desired preferences file. If not defined, uses the +default Shared Preferences.) + +Read a value from shared preferences +``` + +### <sub>prefPutValue</sub> ### +``` +prefPutValue( + String key, + Object value, + String filename[optional]: Desired preferences file. If not defined, uses the +default Shared Preferences.) + +Write a value to shared preferences +``` + +### <sub>queryAttributes</sub> ### +``` +queryAttributes( + String uri: The URI, using the content:// scheme, for the content to +retrieve.) + +Content Resolver Query Attributes + +Returns: + a list of available columns for a given content uri +``` + +### <sub>queryContent</sub> ### +``` +queryContent( + String uri: The URI, using the content:// scheme, for the content to +retrieve., + JSONArray attributes[optional]: A list of which columns to return. Passing +null will return all columns, + String selection[optional]: A filter declaring which rows to return, + JSONArray selectionArgs[optional]: You may include ?s in selection, which will +be replaced by the values from selectionArgs, + String order[optional]: How to order the rows) + +Content Resolver Query + +Returns: + result of query as Maps +``` + +### <sub>readBatteryData</sub> ### +``` +readBatteryData() + +Returns the most recently recorded battery data. +``` + +### <sub>readLocation</sub> ### +``` +readLocation() + +Returns the current location as indicated by all available providers. + +Returns: + A map of location information by provider. +``` + +### <sub>readPhoneState</sub> ### +``` +readPhoneState() + +Returns the current phone state and incoming number. + +Returns: + A Map of "state" and "incomingNumber" +``` + +### <sub>readSensors</sub> ### +``` +readSensors() + +Returns the most recently recorded sensor data. +``` + +### <sub>readSignalStrengths</sub> ### +``` +readSignalStrengths() + +Returns the current signal strengths. + +Returns: + A map of "gsm_signal_strength" + +Requires API Level 7. +``` + +### <sub>receiveEvent</sub> ### +``` +receiveEvent() + +Returns and removes the oldest event (i.e. location or sensor update, etc.) +from the event buffer. + +Returns: + Map of event properties. + +Deprecated in r4! Please use eventPoll instead. +``` + +### <sub>recognizeSpeech</sub> ### +``` +recognizeSpeech( + String prompt[optional]: text prompt to show to the user when asking them to +speak, + String language[optional]: language override to inform the recognizer that it +should expect speech in a language different than the one set in the +java.util.Locale.getDefault(), + String languageModel[optional]: informs the recognizer which speech model to +prefer (see android.speech.RecognizeIntent)) + +Recognizes user's speech and returns the most likely result. + +Returns: + An empty string in case the speech cannot be recongnized. +``` + +### <sub>recorderCaptureVideo</sub> ### +``` +recorderCaptureVideo( + String targetPath, + Integer duration[optional], + Boolean recordAudio[optional, default true]) + +Records video (and optionally audio) from the camera and saves it to the given +location. +Duration specifies the maximum duration of the recording session. +If duration is not provided this method will return immediately and the +recording will only be stopped +when recorderStop is called or when a scripts exits. +Otherwise it will block for the time period equal to the duration argument. +``` + +### <sub>recorderStartMicrophone</sub> ### +``` +recorderStartMicrophone( + String targetPath) + +Records audio from the microphone and saves it to the given location. +``` + +### <sub>recorderStartVideo</sub> ### +``` +recorderStartVideo( + String targetPath, + Integer duration[optional, default 0], + Integer videoSize[optional, default 1]) + +Records video from the camera and saves it to the given location. +Duration specifies the maximum duration of the recording session. +If duration is 0 this method will return and the recording will only be stopped + +when recorderStop is called or when a scripts exits. +Otherwise it will block for the time period equal to the duration argument. +videoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480. +``` + +### <sub>recorderStop</sub> ### +``` +recorderStop() + +Stops a previously started recording. +``` + +### <sub>requiredVersion</sub> ### +``` +requiredVersion( + Integer requiredVersion) + +Checks if version of SL4A is greater than or equal to the specified version. +``` + +### <sub>scanBarcode</sub> ### +``` +scanBarcode() + +Starts the barcode scanner. + +Returns: + A Map representation of the result Intent. +``` + +### <sub>search</sub> ### +``` +search( + String query) + +Starts a search for the given query. +``` + +### <sub>sendBroadcast</sub> ### +``` +sendBroadcast( + String action, + String uri[optional], + String type[optional]: MIME type/subtype of the URI, + JSONObject extras[optional]: a Map of extras to add to the Intent, + String packagename[optional]: name of package. If used, requires classname to +be useful, + String classname[optional]: name of class. If used, requires packagename to be +useful) + +Send a broadcast. +``` + +### <sub>sendBroadcastIntent</sub> ### +``` +sendBroadcastIntent( + Intent intent: Intent in the format as returned from makeIntent) + +Send Broadcast Intent +``` + +### <sub>sendEmail</sub> ### +``` +sendEmail( + String to: A comma separated list of recipients., + String subject, + String body, + String attachmentUri[optional]) + +Launches an activity that sends an e-mail message to a given recipient. +``` + +### <sub>sensorsGetAccuracy</sub> ### +``` +sensorsGetAccuracy() + +Returns the most recently received accuracy value. +``` + +### <sub>sensorsGetLight</sub> ### +``` +sensorsGetLight() + +Returns the most recently received light value. +``` + +### <sub>sensorsReadAccelerometer</sub> ### +``` +sensorsReadAccelerometer() + +Returns the most recently received accelerometer values. + +Returns: + a List of Floats [(acceleration on the) X axis, Y axis, Z axis]. +``` + +### <sub>sensorsReadMagnetometer</sub> ### +``` +sensorsReadMagnetometer() + +Returns the most recently received magnetic field values. + +Returns: + a List of Floats [(magnetic field value for) X axis, Y axis, Z axis]. +``` + +### <sub>sensorsReadOrientation</sub> ### +``` +sensorsReadOrientation() + +Returns the most recently received orientation values. + +Returns: + a List of Doubles [azimuth, pitch, roll]. +``` + +### <sub>setClipboard</sub> ### +``` +setClipboard( + String text) + +Put text in the clipboard. +``` + +### <sub>setMediaVolume</sub> ### +``` +setMediaVolume( + Integer volume) + +Sets the media volume. +``` + +### <sub>setResultBoolean</sub> ### +``` +setResultBoolean( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Boolean resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultBooleanArray</sub> ### +``` +setResultBooleanArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Boolean[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultByte</sub> ### +``` +setResultByte( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Byte resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultByteArray</sub> ### +``` +setResultByteArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Byte[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultChar</sub> ### +``` +setResultChar( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Character resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultCharArray</sub> ### +``` +setResultCharArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Character[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultDouble</sub> ### +``` +setResultDouble( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Double resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultDoubleArray</sub> ### +``` +setResultDoubleArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Double[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultFloat</sub> ### +``` +setResultFloat( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Float resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultFloatArray</sub> ### +``` +setResultFloatArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Float[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultInteger</sub> ### +``` +setResultInteger( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Integer resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultIntegerArray</sub> ### +``` +setResultIntegerArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Integer[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultLong</sub> ### +``` +setResultLong( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Long resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultLongArray</sub> ### +``` +setResultLongArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Long[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultSerializable</sub> ### +``` +setResultSerializable( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Serializable resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultShort</sub> ### +``` +setResultShort( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Short resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultShortArray</sub> ### +``` +setResultShortArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + Short[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultString</sub> ### +``` +setResultString( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + String resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setResultStringArray</sub> ### +``` +setResultStringArray( + Integer resultCode: The result code to propagate back to the originating +activity, often RESULT_CANCELED (0) or RESULT_OK (-1), + String[] resultValue) + +Sets the result of a script execution. Whenever the script APK is called via +startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra +with the given value. +``` + +### <sub>setRingerVolume</sub> ### +``` +setRingerVolume( + Integer volume) + +Sets the ringer volume. +``` + +### <sub>setScreenBrightness</sub> ### +``` +setScreenBrightness( + Integer value: brightness value between 0 and 255) + +Sets the the screen backlight brightness. + +Returns: + the original screen brightness. +``` + +### <sub>setScreenTimeout</sub> ### +``` +setScreenTimeout( + Integer value) + +Sets the screen timeout to this number of seconds. + +Returns: + The original screen timeout. +``` + +### <sub>smsDeleteMessage</sub> ### +``` +smsDeleteMessage( + Integer id) + +Deletes a message. + +Returns: + True if the message was deleted +``` + +### <sub>smsGetAttributes</sub> ### +``` +smsGetAttributes() + +Returns a List of all possible message attributes. +``` + +### <sub>smsGetMessageById</sub> ### +``` +smsGetMessageById( + Integer id: message ID, + JSONArray attributes[optional]) + +Returns message attributes. +``` + +### <sub>smsGetMessageCount</sub> ### +``` +smsGetMessageCount( + Boolean unreadOnly, + String folder[optional, default inbox]) + +Returns the number of messages. +``` + +### <sub>smsGetMessageIds</sub> ### +``` +smsGetMessageIds( + Boolean unreadOnly, + String folder[optional, default inbox]) + +Returns a List of all message IDs. +``` + +### <sub>smsGetMessages</sub> ### +``` +smsGetMessages( + Boolean unreadOnly, + String folder[optional, default inbox], + JSONArray attributes[optional]) + +Returns a List of all messages. + +Returns: + a List of messages as Maps +``` + +### <sub>smsMarkMessageRead</sub> ### +``` +smsMarkMessageRead( + JSONArray ids: List of message IDs to mark as read., + Boolean read) + +Marks messages as read. + +Returns: + number of messages marked read +``` + +### <sub>smsSend</sub> ### +``` +smsSend( + String destinationAddress: typically a phone number, + String text) + +Sends an SMS. +``` + +### <sub>startActivity</sub> ### +``` +startActivity( + String action, + String uri[optional], + String type[optional]: MIME type/subtype of the URI, + JSONObject extras[optional]: a Map of extras to add to the Intent, + Boolean wait[optional]: block until the user exits the started activity, + String packagename[optional]: name of package. If used, requires classname to +be useful, + String classname[optional]: name of class. If used, requires packagename to be +useful) + +Starts an activity. +``` + +### <sub>startActivityForResult</sub> ### +``` +startActivityForResult( + String action, + String uri[optional], + String type[optional]: MIME type/subtype of the URI, + JSONObject extras[optional]: a Map of extras to add to the Intent, + String packagename[optional]: name of package. If used, requires classname to +be useful, + String classname[optional]: name of class. If used, requires packagename to be +useful) + +Starts an activity and returns the result. + +Returns: + A Map representation of the result Intent. +``` + +### <sub>startActivityForResultIntent</sub> ### +``` +startActivityForResultIntent( + Intent intent: Intent in the format as returned from makeIntent) + +Starts an activity and returns the result. + +Returns: + A Map representation of the result Intent. +``` + +### <sub>startActivityIntent</sub> ### +``` +startActivityIntent( + Intent intent: Intent in the format as returned from makeIntent, + Boolean wait[optional]: block until the user exits the started activity) + +Start Activity using Intent +``` + +### <sub>startEventDispatcher</sub> ### +``` +startEventDispatcher( + Integer port[optional, default 0]: Port to use) + +Opens up a socket where you can read for events posted +``` + +### <sub>startInteractiveVideoRecording</sub> ### +``` +startInteractiveVideoRecording( + String path) + +Starts the video capture application to record a video and saves it to the +specified path. +``` + +### <sub>startLocating</sub> ### +``` +startLocating( + Integer minDistance[optional, default 60000]: minimum time between updates in +milliseconds, + Integer minUpdateDistance[optional, default 30]: minimum distance between +updates in meters) + +Starts collecting location data. + +Generates "location" events. +``` + +### <sub>startSensing</sub> ### +``` +startSensing( + Integer sampleSize[optional, default 5]: number of samples for calculating +average readings) + +Starts recording sensor data to be available for polling. + +Deprecated in 4! Please use startSensingTimed or startSensingThreshhold +instead. +``` + +### <sub>startSensingThreshold</sub> ### +``` +startSensingThreshold( + Integer sensorNumber: 1 = Orientation, 2 = Accelerometer, 3 = Magnetometer and +4 = Light, + Integer threshold: Threshold level for chosen sensor (integer), + Integer axis: 0 = No axis, 1 = X, 2 = Y, 3 = X+Y, 4 = Z, 5= X+Z, 6 = Y+Z, 7 = +X+Y+Z) + +Records to the Event Queue sensor data exceeding a chosen threshold. + +Generates "threshold" events. +``` + +### <sub>startSensingTimed</sub> ### +``` +startSensingTimed( + Integer sensorNumber: 1 = All, 2 = Accelerometer, 3 = Magnetometer and 4 = +Light, + Integer delayTime: Minimum time between readings in milliseconds) + +Starts recording sensor data to be available for polling. + +Generates "sensors" events. +``` + +### <sub>startTrackingPhoneState</sub> ### +``` +startTrackingPhoneState() + +Starts tracking phone state. + +Generates "phone" events. +``` + +### <sub>startTrackingSignalStrengths</sub> ### +``` +startTrackingSignalStrengths() + +Starts tracking signal strengths. + +Generates "signal_strengths" events. + +Requires API Level 7. +``` + +### <sub>stopEventDispatcher</sub> ### +``` +stopEventDispatcher() + +Stops the event server, you can't read in the port anymore +``` + +### <sub>stopLocating</sub> ### +``` +stopLocating() + +Stops collecting location data. +``` + +### <sub>stopSensing</sub> ### +``` +stopSensing() + +Stops collecting sensor data. +``` + +### <sub>stopTrackingPhoneState</sub> ### +``` +stopTrackingPhoneState() + +Stops tracking phone state. +``` + +### <sub>stopTrackingSignalStrengths</sub> ### +``` +stopTrackingSignalStrengths() + +Stops tracking signal strength. + +Requires API Level 7. +``` + +### <sub>toggleAirplaneMode</sub> ### +``` +toggleAirplaneMode( + Boolean enabled[optional]) + +Toggles airplane mode on and off. + +Returns: + True if airplane mode is enabled. +``` + +### <sub>toggleBluetoothState</sub> ### +``` +toggleBluetoothState( + Boolean enabled[optional], + Boolean prompt[optional, default true]: Prompt the user to confirm changing +the Bluetooth state.) + +Toggle Bluetooth on and off. + +Returns: + True if Bluetooth is enabled. + +Requires API Level 5. +``` + +### <sub>toggleRingerSilentMode</sub> ### +``` +toggleRingerSilentMode( + Boolean enabled[optional]) + +Toggles ringer silent mode on and off. + +Returns: + True if ringer silent mode is enabled. +``` + +### <sub>toggleVibrateMode</sub> ### +``` +toggleVibrateMode( + Boolean enabled[optional], + Boolean ringer[optional]) + +Toggles vibrate mode on and off. If ringer=true then set Ringer setting, else +set Notification setting + +Returns: + True if vibrate mode is enabled. +``` + +### <sub>toggleWifiState</sub> ### +``` +toggleWifiState( + Boolean enabled[optional]) + +Toggle Wifi on and off. + +Returns: + True if Wifi is enabled. +``` + +### <sub>ttsIsSpeaking</sub> ### +``` +ttsIsSpeaking() + +Returns True if speech is currently in progress. + +Requires API Level 4. +``` + +### <sub>ttsSpeak</sub> ### +``` +ttsSpeak( + String message) + +Speaks the provided message via TTS. + +Requires API Level 4. +``` + +### <sub>vibrate</sub> ### +``` +vibrate( + Integer duration[optional, default 300]: duration in milliseconds) + +Vibrates the phone or a specified duration in milliseconds. +``` + +### <sub>view</sub> ### +``` +view( + String uri, + String type[optional]: MIME type/subtype of the URI, + JSONObject extras[optional]: a Map of extras to add to the Intent) + +Start activity with view action by URI (i.e. browser, contacts, etc.). +``` + +### <sub>viewContacts</sub> ### +``` +viewContacts() + +Opens the list of contacts. +``` + +### <sub>viewHtml</sub> ### +``` +viewHtml( + String path: the path to the HTML file) + +Opens the browser to display a local HTML file. +``` + +### <sub>viewMap</sub> ### +``` +viewMap( + String query, e.g. pizza, 123 My Street) + +Opens a map search for query (e.g. pizza, 123 My Street). +``` + +### <sub>waitForEvent</sub> ### +``` +waitForEvent( + String eventName, + Integer timeout[optional]: the maximum time to wait) + +Blocks until an event with the supplied name occurs. The returned event is not +removed from the buffer. + +Returns: + Map of event properties. + +Deprecated in r4! Please use eventWaitFor instead. +``` + +### <sub>wakeLockAcquireBright</sub> ### +``` +wakeLockAcquireBright() + +Acquires a bright wake lock (CPU on, screen bright). +``` + +### <sub>wakeLockAcquireDim</sub> ### +``` +wakeLockAcquireDim() + +Acquires a dim wake lock (CPU on, screen dim). +``` + +### <sub>wakeLockAcquireFull</sub> ### +``` +wakeLockAcquireFull() + +Acquires a full wake lock (CPU on, screen bright, keyboard bright). +``` + +### <sub>wakeLockAcquirePartial</sub> ### +``` +wakeLockAcquirePartial() + +Acquires a partial wake lock (CPU on). +``` + +### <sub>wakeLockRelease</sub> ### +``` +wakeLockRelease() + +Releases the wake lock. +``` + +### <sub>webViewShow</sub> ### +``` +webViewShow( + String url, + Boolean wait[optional]: block until the user exits the WebView) + +Display a WebView with the given URL. +``` + +### <sub>webcamAdjustQuality</sub> ### +``` +webcamAdjustQuality( + Integer resolutionLevel[optional, default 0]: increasing this number provides +higher resolution, + Integer jpegQuality[optional, default 20]: a number from 0-100) + +Adjusts the quality of the webcam stream while it is running. + +Requires API Level 8. +``` + +### <sub>webcamStart</sub> ### +``` +webcamStart( + Integer resolutionLevel[optional, default 0]: increasing this number provides +higher resolution, + Integer jpegQuality[optional, default 20]: a number from 0-100, + Integer port[optional, default 0]: If port is specified, the webcam service +will bind to port, otherwise it will pick any available port.) + +Starts an MJPEG stream and returns a Tuple of address and port for the stream. + +Requires API Level 8. +``` + +### <sub>webcamStop</sub> ### +``` +webcamStop() + +Stops the webcam stream. + +Requires API Level 8. +``` + +### <sub>wifiDisconnect</sub> ### +``` +wifiDisconnect() + +Disconnects from the currently active access point. + +Returns: + True if the operation succeeded. +``` + +### <sub>wifiGetConnectionInfo</sub> ### +``` +wifiGetConnectionInfo() + +Returns information about the currently active access point. +``` + +### <sub>wifiGetScanResults</sub> ### +``` +wifiGetScanResults() + +Returns the list of access points found during the most recent Wifi scan. +``` + +### <sub>wifiLockAcquireFull</sub> ### +``` +wifiLockAcquireFull() + +Acquires a full Wifi lock. +``` + +### <sub>wifiLockAcquireScanOnly</sub> ### +``` +wifiLockAcquireScanOnly() + +Acquires a scan only Wifi lock. +``` + +### <sub>wifiLockRelease</sub> ### +``` +wifiLockRelease() + +Releases a previously acquired Wifi lock. +``` + +### <sub>wifiReassociate</sub> ### +``` +wifiReassociate() + +Reassociates with the currently active access point. + +Returns: + True if the operation succeeded. +``` + +### <sub>wifiReconnect</sub> ### +``` +wifiReconnect() + +Reconnects to the currently active access point. + +Returns: + True if the operation succeeded. +``` + +### <sub>wifiStartScan</sub> ### +``` +wifiStartScan() + +Starts a scan for Wifi access points. + +Returns: + True if the scan was initiated successfully. +``` \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/__pycache__/API_list.cpython-311.pyc b/agent_for_ui/agent_for_api/__pycache__/API_list.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c3683665a25980d34b618090cf5ae6800ca9e7a4 Binary files /dev/null and b/agent_for_ui/agent_for_api/__pycache__/API_list.cpython-311.pyc differ diff --git a/agent_for_ui/agent_for_api/__pycache__/API_list.cpython-312.pyc b/agent_for_ui/agent_for_api/__pycache__/API_list.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55c12452246eac633c0d7180998d0fde537646d0 Binary files /dev/null and b/agent_for_ui/agent_for_api/__pycache__/API_list.cpython-312.pyc differ diff --git a/agent_for_ui/agent_for_api/__pycache__/agent_api_prompt.cpython-311.pyc b/agent_for_ui/agent_for_api/__pycache__/agent_api_prompt.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c60bc8fca6f7fc8b388860cc7f39b5bae5ccd436 Binary files /dev/null and b/agent_for_ui/agent_for_api/__pycache__/agent_api_prompt.cpython-311.pyc differ diff --git a/agent_for_ui/agent_for_api/__pycache__/agent_api_prompt.cpython-312.pyc b/agent_for_ui/agent_for_api/__pycache__/agent_api_prompt.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fafb93a0a320b6b4c61c52c7ec45d84e8523442e Binary files /dev/null and b/agent_for_ui/agent_for_api/__pycache__/agent_api_prompt.cpython-312.pyc differ diff --git a/agent_for_ui/agent_for_api/__pycache__/main_for_api.cpython-311.pyc b/agent_for_ui/agent_for_api/__pycache__/main_for_api.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9485f97ec61479557b6912d115a88b62015b67d4 Binary files /dev/null and b/agent_for_ui/agent_for_api/__pycache__/main_for_api.cpython-311.pyc differ diff --git a/agent_for_ui/agent_for_api/__pycache__/main_for_api.cpython-312.pyc b/agent_for_ui/agent_for_api/__pycache__/main_for_api.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1641635da9ef175cffd09380b09a7129fd090d01 Binary files /dev/null and b/agent_for_ui/agent_for_api/__pycache__/main_for_api.cpython-312.pyc differ diff --git a/agent_for_ui/agent_for_api/agent_api_prompt.py b/agent_for_ui/agent_for_api/agent_api_prompt.py new file mode 100644 index 0000000000000000000000000000000000000000..88c5db2ddc0d7bc83bf7c9f98765864bbfb92a1e --- /dev/null +++ b/agent_for_ui/agent_for_api/agent_api_prompt.py @@ -0,0 +1,224 @@ +from agent_for_api.API_list import * +select_api_prompt = ''' +You are the largest large language model agent stored on the phone. +It will give you a list of APIs that the phone can call, the tasks that need to be completed, what has been done, and what needs to be done now. +You need to choose one of the above APIs to complete the action that needs to be completed now. +You should not use the API to complete the work that has been completed by the UI interaction components in the previous steps. +Your decision should consider the following factors: +1. You must only choose one API that should be executed most at the moment to complete the first action in next action. +2. If there is no suitable API, you only need to say sorry without providing any additional suggestions. +The string in <> needs to be replaced with specific parameters and must return a fully executable adb command. +API list: {api_list} +Below are some examples. +----- +{select_api_example} +----- + +Your [Answer] can only follow the two templates: "Yes, the most suitable api function call is [adb command]" or "Sorry,[explain]" +[Task]: {task} +[Planning]: {planning} +[UI information]: {ui_information} +[Actions History]: {memory} +[WARNING]: It is strictly prohibited to use any commands other than the ADB commands listed in the API list. +[Answer]: +''' +# +# shell 似乎可以直接调用基本运算,这是意料之外的事情。 +# +''' +Notice! +You must choose only one API that should be executed most at present and give the specific adb command in []. +The API you choose must come from the API list. APIs from unknown sources are prohibited from being used. +If an API command fails to execute in the actions history, you should no longer use it as an answer. +''' + +select_api_example = ''' +Example 1: +[Task]:I'm going to travel to Beijing next week. Please help me determine the hotel and specific time. +[Planning]: Open the travel APP, check Beijing hotels, sort by rating, recommend the top three, then open Google search, search and check the weather conditions in Beijing next week. +[UI inforamtion]: +<div id="com.google.android.apps.nexuslauncher:id/workspace" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,0][1080,1857]"> </div> +<p class="android.widget.TextView" description="ClevCalc" clickable="true"> ClevCalc </p> +<p class="android.widget.TextView" description="New event" clickable="true"> New event </p> +<p class="android.widget.TextView" description="Traveloka" clickable="true"> Traveloka </p> +<p class="android.widget.TextView" description="Weather" clickable="true"> Weather </p> +<p class="android.widget.TextView" description="Clock" clickable="true"> Clock </p> +<p class="android.widget.TextView" description="Maps" clickable="true"> Maps </p> +<p class="android.widget.TextView" description="Play Store" clickable="true"> Play Store </p> +<p class="android.widget.TextView" description="Agent-LLM" clickable="true"> Agent-LLM </p> +<div class="android.view.View" description="Home" clickable="false"> </div> +<p class="android.widget.TextView" description="Phone" clickable="true"> Phone </p> +<p class="android.widget.TextView" description="Messages" clickable="true"> Messages </p> +<p class="android.widget.TextView" description="Play Store" clickable="true"> Play Store </p> +<p class="android.widget.TextView" description="Chrome" clickable="true"> Chrome </p> +<p class="android.widget.TextView" description="Camera" clickable="true"> Camera </p> +<img id="com.google.android.apps.nexuslauncher:id/g_icon" class="android.widget.ImageView" description="Google app" clickable="true"> </img> +<img id="com.google.android.apps.nexuslauncher:id/mic_icon" class="android.widget.ImageView" description="Voice search" clickable="true"> </img> +<button id="com.google.android.apps.nexuslauncher:id/lens_icon" class="android.widget.ImageButton" description="Google Lens" clickable="true"> </button> +[Actions history]: No action has been completed yet +[Thought]: I am on the home page. No action has been completed yet. I will open the Traveloka app first and check the flight. +[Answer]:Yes, the most suitable api function call is [adb shell am start -n com.traveloka.android/.appentry.splash.SplashActivity] + +Example 2: +[Task]: Recommend to me the most suitable ticket to Beijing this Saturday +[Planning]: +1. Open Traveloka: + - Search for flights from Chengdu to Beijing for the desired date. + - Take screenshots of the flight options, including prices and timings. + - Save the screenshots in a designated folder on your phone for easy access. +[UI information]: +<button id="com.traveloka.android:id/tray_text_button_left" class="android.widget.Button" clickable="true"> </button> +<p id="com.traveloka.android:id/tray_title" class="android.widget.TextView" clickable="false"> Your Trip </p> +<button id="com.traveloka.android:id/tray_text_button" class="android.widget.Button" clickable="true"> </button> +<button id="com.traveloka.android:id/tray_text_button2" class="android.widget.Button" clickable="true"> </button> +<p id="com.traveloka.android.flight:id/text_title_journey" class="android.widget.TextView" clickable="true"> Chengdu Beijing </p> +<p id="com.traveloka.android.flight:id/text_card_title_departure" class="android.widget.TextView" clickable="true"> Sat, 25 Nov 2023 </p> +<p id="com.traveloka.android.flight:id/text_departure_time" class="android.widget.TextView" clickable="true"> 07:20 </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 40m </p> +<p id="com.traveloka.android.flight:id/text_arrival_time" class="android.widget.TextView" clickable="true"> 10:00 </p> +<p id="com.traveloka.android.flight:id/badge_departure_airport" class="android.widget.TextView" clickable="true"> CTU </p> +<p id="com.traveloka.android.flight:id/text_flight_transit" class="android.widget.TextView" clickable="true"> Direct </p> +<p id="com.traveloka.android.flight:id/badge_arrival_airport" class="android.widget.TextView" clickable="true"> PKX </p> +<p id="com.traveloka.android.flight:id/text_airline_name" class="android.widget.TextView" clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_seat_class" class="android.widget.TextView" clickable="true"> Economy </p> +<p id="com.traveloka.android.flight:id/text_details" class="android.widget.TextView" clickable="true"> Details </p> +<p id="com.traveloka.android.flight:id/text_title" class="android.widget.TextView" clickable="false"> Your ticket type </p> +<p id="com.traveloka.android.flight:id/text_title" class="android.widget.TextView" clickable="true"> Original </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> USD 125.71 </p> +<p id="com.traveloka.android.flight:id/text_per_pax" class="android.widget.TextView" clickable="true"> /pax </p> +<p id="com.traveloka.android.flight:id/text" class="android.widget.TextView" clickable="true"> Cabin baggage 1 x 5 kg </p> +<p id="com.traveloka.android.flight:id/text" class="android.widget.TextView" clickable="true"> Baggage 1 x 20 kg </p> +<p id="com.traveloka.android.flight:id/text" class="android.widget.TextView" clickable="true"> Reschedule not available </p> +<p id="com.traveloka.android.flight:id/text" class="android.widget.TextView" clickable="true"> Refund info unavailable </p> +<p id="com.traveloka.android.flight:id/text_see_detail" class="android.widget.TextView" clickable="true"> Learn more </p> +<p id="com.traveloka.android.flight:id/text_view_label" class="android.widget.TextView" clickable="true"> Total price for 1 person(s) </p> +<p class="android.widget.TextView" description="pre_booking_price" clickable="true"> USD 125.71 </p> +<p id="com.traveloka.android.flight:id/text_description" class="android.widget.TextView" clickable="true"> Inclusive of all fares & taxes </p> +<button id="com.traveloka.android.flight:id/button_select" class="android.widget.Button" clickable="true"> Continue </button> +[Actions history]: +{'[API call]': 'adb shell am start -n com.traveloka.android/.appentry.splash.SplashActivity. [Call result]:API execution successful'} +{'[Action]': 'click(<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Flights </p>)'} +{'[Action]': 'click(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 25 Nov 2023 </input>)'} +{'[Action]': 'click(<div id="com.traveloka.android:id/calendar_date_text" class="android.view.View" description="25" clickable="true"> </div>)'} +{'[Action]': 'click(<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button>)'} +{'[Action]': 'click(<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p>)'} + +[Thought]: I have already opened the traveloka, searched for flight from chengdu to beijing this Saturday, And i found the cheapest flight. Then, I will take the screenshot and save it. +[Answer]:Yes, the most suitable api function call is [adb shell screencap -p /sdcard/flight_info.png] +''' +# Task: 今晚8点要洗衣服, 请建立备忘录提醒我 +# Ans:Yes, the api function call is :"adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.item/event --es title "洗衣服" --es description "今晚不要忘记洗衣服" --ez allDay false --ei beginTime 1662820800000 --ei endTime 1662824400000" +''' +Example 1: +[Task]:Hello, I plan to travel from Chengdu to Beijing on business next week to attend the Xiaomi Technology Park meeting on Sunday. Please help me plan the specific travel time and mode, and make simple suggestions. + +[Planning]: To plan your travel from Chengdu to Beijing, we can use the following apps: + +1. Open Traveloka: + - Search for flights from Chengdu to Beijing for the desired date. + - Take screenshots of the flight options, including prices and timings. + - Save the screenshots in a designated folder on your phone for easy access. + +2. Open Weather: + - Check the weather forecast for both Chengdu and Beijing for the upcoming week. + - Take screenshots of the weather forecast for each city. + - Save the screenshots in the same folder as the flight options. + +3. Open New event: + - Create a memo titled "Travel Plan to Beijing." + - Write down the recommended flight options, including the airline, departure time, and arrival time. + - Mention the weather conditions in Chengdu and Beijing for the travel dates. + - Save the memo for easy review. + +By using Traveloka, Weather, and New event apps, you can gather the necessary information and save it on your phone for future reference. Remember, this plan does not involve directly booking the tickets; it's solely for collecting information and making suggestions. +[UI information]: +<div id="com.traveloka.android:id/recycler_view" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,63][1080,1723]"> </div> +<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Flights </p> +<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Hotels </p> +<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Xperience </p> +<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Airport Transfer </p> +<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Car Rental </p> +<p id="com.traveloka.android:id/text_background_banner" class="android.widget.TextView" clickable="false"> Get access to Traveloka's complete features by choosing to enable location service all the time. </p> +<p id="com.traveloka.android:id/text_allow_background" class="android.widget.TextView" clickable="false"> Enable </p> +<p id="com.traveloka.android:id/text_widget_item_description" class="android.widget.TextView" clickable="true"> You're missing security alerts, booking updates, and chat replies. </p> +<p id="com.traveloka.android:id/text_widget_item_button" class="android.widget.TextView" clickable="true"> Check notification settings </p> +<p id="com.traveloka.android:id/text_view_title" class="android.widget.TextView" clickable="true"> Flight Discount up to 10% is yours! </p> +<p id="com.traveloka.android:id/text_view_subtitle" class="android.widget.TextView" clickable="true"> Just book a trip and explore the world </p> +<p id="com.traveloka.android:id/text_more_button" class="android.widget.TextView" clickable="true"> More </p> +<button id="com.traveloka.android:id/icon_notification" class="android.widget.ImageButton" description="Open Notification" clickable="true"> </button> +<button id="com.traveloka.android:id/icon_inbox" class="android.widget.ImageButton" description="Open Inbox" clickable="true"> </button> +<p id="com.traveloka.android:id/text_label" class="android.widget.TextView" clickable="true"> Home </p> +<p id="com.traveloka.android:id/text_label" class="android.widget.TextView" clickable="true"> Explore </p> +<p id="com.traveloka.android:id/text_label" class="android.widget.TextView" clickable="true"> Bookings </p> +<p id="com.traveloka.android:id/text_label" class="android.widget.TextView" clickable="true"> Saved </p> +<p id="com.traveloka.android:id/text_label" class="android.widget.TextView" clickable="true"> My Account </p> + +[Actions history]: +{'[API call]': 'adb shell am start -n com.traveloka.android/.appentry.splash.SplashActivity. [Call result]:API execution successful'} + +[Thought]: Based on the changes in UI information and action history, the following steps have been completed: + +1. The Traveloka app was opened by clicking on the "Traveloka" option. +2. The app successfully launched, and the current UI information shows the available products: Flights, Hotels, Xperience, Airport Transfer, and Car Rental. + +Next, you should perform the following actions: + +1. Click on the "Flights" option in the Traveloka app to search for flights. +2. Enter the necessary travel details, such as the origin (Chengdu) and destination (Beijing), and select the desired travel dates. +3. Take screenshots of the flight options, including prices and timings. +4. Save the screenshots in a designated folder on your phone for easy access. +5. Open the Weather app to check the weather forecast for both Chengdu and Beijing for the upcoming week. +6. Take screenshots of the weather forecast for each city. +7. Save the weather forecast screenshots in the same folder as the flight options. +8. Open the New event app and create a memo titled "Travel Plan to Beijing." +9. Write down the recommended flight options, including the airline, departure time, and arrival time. +10. Mention the weather conditions in Chengdu and Beijing for the travel dates. +11. Save the memo for easy review. + +Remember, this plan does not involve directly booking the tickets but focuses on collecting information and making suggestions. + +[Answer]:Sorry, the next action is to click the "Flights" option. I cannot complete it through the appropriate API. I suggest handing over this task to the UI interaction module. + + + +Example 1: +[Task description]: Calculate 9.5×5+2 +[Planning]: Open a computing-related application and click the buttons one by one. +[UI information]: +<img class="android.widget.ImageView" description="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算 </p> +<p class="android.widget.TextView" clickable="true"> 换算 </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" description="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/view_pager" class="androidx.viewpager.widget.OriginalViewPager" clickable="false" scrollable="true" bounds="[0,275][1080,2400]"> </div> +<div id="com.miui.calculator:id/expression" class="android.view.View" description="9.5×5" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" description="= 47.5" clickable="true"> = 47.5 </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" description="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7 </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4 </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1 </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" description="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" description="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8 </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5 </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2 </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0 </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" description="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9 </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6 </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3 </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true"> . </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" description="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" description="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" description="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" description="等于" clickable="true"> </img> +[Actions history]: +adb shell am start -n com.cleveni.app.calculator/com.cleveni.app.calculator.MainActivity +click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +click(<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true"> . </p>) +click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true"> </img>) +[Thought]: Calculate 9.5×5+2, I have clicked on 9.5 and the multiplication sign, now I should click on 5. +Ans:Sorry, I can't help you click on 5 with suitbale api. I suggest handing over this task to the UI interaction module. + +''' \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_list.json b/agent_for_ui/agent_for_api/api_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d529c5efc39d449a016c75d77821c6a8ea8907df --- /dev/null +++ b/agent_for_ui/agent_for_api/api_list.json @@ -0,0 +1,626 @@ +{ + "日历": [ + { + "ADB Command": "adb shell am start -n com.android.calendar/.AllInOneActivity\n", + "Function Description": "启动日历到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.item/event -e \"title\" <x> --es \"beginTime\" \"<startTimestamp>\" --es \"endTime\" \"<endtimestamp>\"", + "Function Description": "Create a new calendar event with pre-populated title", + "Parameter Information": "Replace <x> with the event title, <start timestamp> and <end timestamp> are replaced with the timestamps of the event's start and end times respectively" + } + ], + "时钟": [ + { + "ADB Command": "adb shell am start -a android.intent.action.SET_ALARM --ei android.intent.extra.alarm.HOUR <x> --ei android.intent.extra.alarm.MINUTES <y>", + "Function Description": "Triggers an intent to open the alarm clock application with a pre-filled time for setting a new alarm.", + "Parameter Information": "Replace <x> with the hour and <y> with the minutes for the alarm time. For example, for an alarm set at 7:15, <x> would be 7 and <y> would be 15." + }, + { + "ADB Command": "adb shell am start -n com.android.deskclock/.DeskClockTabActivity\n", + "Function Description": "启动时钟到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.EDIT -d deskclock://details/edit", + "Function Description": "编辑世界时钟", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d deskclock://deskclock.android.com/main/SettingsActivity", + "Function Description": "打开时钟设置,铃声、音量、响铃时长", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.android.deskclock.shortcut.START_TIMER", + "Function Description": "启动计时器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.android.deskclock.shortcut.STOP_WATCH", + "Function Description": "启动秒表", + "Parameter Information": "No additional parameters required." + } + ], + "通用按键": [ + { + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } + ], + "系统": [ + { + "ADB Command": "adb shell svc wifi enable", + "Function Description": "Open wifi connection", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell svc wifi disable", + "Function Description": "Close wifi connection", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.settings.SETTINGS", + "Function Description": "Open the system settings.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLE", + "Function Description": "Open bluetooth", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.bluetooth.adapter.action.REQUEST_DISABLE", + "Function Description": "Close bluetooth", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell svc data enable", + "Function Description": "Open Data flow switch", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell svc data disable", + "Function Description": "Close Data flow switch", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell settings put system screen_brightness <brightness_value>", + "Function Description": "Change screen brightness (0-255)", + "Parameter Information": "Replace <brightness_value> with a number from 0 to 255" + } + ], + "QQ音乐": [ + { + "ADB Command": "adb shell am start -n com.tencent.qqmusic/.third.DispacherActivityForThird", + "Function Description": "打开QQ音乐到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d <file:///path/to/your/music.mp3> -t audio/mp3 com.tencent.qqmusic/.activity.AppStarterActivity", + "Function Description": "播放本地的MP3文件", + "Parameter Information": "替换 /path/to/your/music.mp3 为实际文件路径。" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d http://[音乐流URL] com.tencent.qqmusic/.activity.AppStarterActivity\n", + "Function Description": "打开指定的网页音乐流", + "Parameter Information": "替换 [音乐流URL] 为实际音乐流的网址" + } + ], + "天气": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d weather://weather2.miui.com/main com.miui.weather2/.ActivityWeatherMain\n", + "Function Description": "打开天气APP的主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.EDIT -d weather://details com.miui.weather2/.view.EditDeeplinkActivity\n", + "Function Description": "编辑天气详情页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.weather.widget_city_manager com.miui.weather2/.ActivitySearchCity", + "Function Description": "搜索城市,添加新城市的天气", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d weather://weather2.miui.com/dailyforcast/detail com.miui.weather2/.ActivityDailyForecastDetail", + "Function Description": "查看当前城市的天气详情", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a miui.intent.action.weather -d weather://weather2.miui.com/dailyforcast/detail com.miui.weather2/.ActivityDailyForecastDetail", + "Function Description": "查看特定日期的天气预报", + "Parameter Information": "No additional parameters required." + } + ], + "计算器": [ + { + "ADB Command": "adb shell am start -n com.miui.calculator/.cal.CalculatorActivity", + "Function Description": "启动计算器主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.SCIENTIFIC_MODE", + "Function Description": "启动科学计算器模式", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.calculator/.convert.CurrencyActivity", + "Function Description": "打开货币转换功能", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.TAX", + "Function Description": "打开税务计算器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.MORTGAGE", + "Function Description": "打开房贷计算器", + "Parameter Information": "No additional parameters required." + } + ], + "文件管理": [ + { + "ADB Command": "adb shell am start -n com.android.fileexplorer/.FileExplorerTabActivity", + "Function Description": "启动文件管理器到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d <file path> -t <file type>", + "Function Description": "打开特定文件类型", + "Parameter Information": "将<file path>替换为目标文件的绝对路径, 例如file:///path/to/your/file.pdf <file type>替换为目标文件的类型,例如:application/pdf" + }, + { + "ADB Command": "adb shell am start -a com.android.fileexplorer.search -d content://com.android.fileexplorer.myprovider/search_suggest_query?query=<YourSearchQuery>", + "Function Description": "搜索文件", + "Parameter Information": "将<YourSearchQuery>替换为匹配条件" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.GET_CONTENT -t */*", + "Function Description": "启动一个内容选择器,允许用户在设备上选择任何类型的文件。", + "Parameter Information": "No additional parameters required." + } + ], + "高德地图": [ + { + "ADB Command": "adb shell am start -n com.autonavi.minimap/com.autonavi.map.activity.SplashActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d amapuri://route/plan/?dname=<目的地> com.autonavi.minimap", + "Function Description": "搜索从当前位置到目的地位置的路线导航", + "Parameter Information": "替换 <目的地> 为您想搜索的位置的名称" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d geo:纬度,经度?z=缩放级别&q=搜索关键词 com.autonavi.minimap", + "Function Description": "附近推荐搜索", + "Parameter Information": "替换 纬度 和 经度 为您当前位置的坐标。\n缩放级别 可以根据您的需求调整。\n搜索关键词 可以替换为您想搜索的内容,如“餐厅”、“咖啡馆”等" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d geo:纬度,经度 com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity", + "Function Description": "使用地理位置打开地图", + "Parameter Information": "替换 纬度 和 经度 为实际的坐标值。" + } + ], + "米家": [ + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.SmartHomeMainActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.device.DeviceListActivity", + "Function Description": "启动设备列表", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.device.control.DeviceControlActivity", + "Function Description": "打开设备控制界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.smartscene.SmartSceneActivity", + "Function Description": "打开智能场景设置", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb logcat | grep com.xiaomi.smarthome", + "Function Description": "查看设备日志", + "Parameter Information": "No additional parameters required." + } + ], + "小米商城": [ + { + "ADB Command": "adb shell am start -n com.xiaomi.shop/.activity.MainTabActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + } + ], + "多看": [ + { + "ADB Command": "adb shell am start -n com.duokan.reader/.DkReaderActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d <filepath> -t application/epub+zip com.duokan.reader/.DkReaderActivity", + "Function Description": "打开特定格式的文件", + "Parameter Information": "<filepath>替换为文件地址,例如file:///path/to/your/book.epub" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEARCH -n com.duokan.reader/.DkReaderActivity --es query \"<搜索关键词>\"", + "Function Description": "搜索小说", + "Parameter Information": "<搜索关键词>替换为实际的搜索词" + } + ], + "有道翻译官": [ + { + "ADB Command": "adb shell am start -n com.youdao.translator/.MainActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.youdao.translator/com.youdao.yddocumenttranslate.activity.DocTransActivity", + "Function Description": "打开文档翻译活动", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.youdao.translator/com.youdao.webtrans.WebTransActivity", + "Function Description": "打开网页翻译活动", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -t text/plain -e android.intent.extra.TEXT \"<翻译这段文本>\" com.youdao.translator", + "Function Description": "文本翻译", + "Parameter Information": "将<翻译这段文本>替换为你需要翻译的文本" + } + ], + "携程旅行": [ + { + "ADB Command": "adb shell am start -n ctrip.android.view/ctrip.business.splash.CtripSplashActivity\n", + "Function Description": "启动携程主界面", + "Parameter Information": "No additional parameters required." + } + ], + "喜马拉雅": [ + { + "ADB Command": "adb shell am start -n com.ximalaya.ting.android/.host.activity.MainActivity\n", + "Function Description": "启动喜马拉雅主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d file:///path/to/your/audio.mp3 -t audio/* com.ximalaya.ting.android/.host.activity.MainActivity", + "Function Description": "处理音频文件", + "Parameter Information": "替换 /path/to/your/audio.mp3 为音频文件路径。" + } + ], + "QQ": [ + { + "ADB Command": "adb shell am start -n com.tencent.mobileqq/.activity.SplashActivity\n", + "Function Description": "启动 QQ 主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.tencent.mobileqq/.activity.ChatActivity --es uin \"联系人QQ号码\"\n", + "Function Description": "启动聊天界面", + "Parameter Information": "联系人QQ号码替换为具体的QQ号码" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -t text/plain -e android.intent.extra.TEXT \"要发送的文本\" com.tencent.mobileqq\n", + "Function Description": "建立发送文件意图,但并没指定联系人", + "Parameter Information": "将<要发送的文本>替换为具体文本" + } + ], + "拼多多": [ + { + "ADB Command": "adb shell am start -n com.xunmeng.pinduoduo/.ui.activity.MainFrameActivity", + "Function Description": "启动拼多多主界面", + "Parameter Information": "No additional parameters required." + } + ], + "爱奇艺": [ + { + "ADB Command": "adb shell am start -n com.qiyi.video/.WelcomeActivity", + "Function Description": "启动爱奇艺主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "Function Description": "打开爱奇艺播放器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d file:///path/to/your/video.mp4 -t video/mp4 com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "Function Description": "播放本地存储的 MP4 文件", + "Parameter Information": "替换 /path/to/your/video.mp4 为视频文件路径" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d http://[视频流URL] com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "Function Description": "打开网络视频流", + "Parameter Information": "替换 视频流URL 为实际的视频流网址" + } + ], + "微博": [ + { + "ADB Command": "adb shell am start -n com.sina.weibo/.SplashActivity\n", + "Function Description": "启动微博主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d sinaweibo://user?uid=用户UID com.sina.weibo\n", + "Function Description": "打开特定用户的微博页面", + "Parameter Information": "替换 用户UID 为实际用户的UID。" + }, + { + "ADB Command": "adb shell am start -n com.sina.weibo/.MainTabActivity --es extra_show_tab \"MESSAGE\"\n", + "Function Description": "打开微博消息界面", + "Parameter Information": "No additional parameters required." + } + ], + "抖音": [ + { + "ADB Command": "adb shell am start -n com.ss.android.ugc.aweme/.main.MainActivity\n", + "Function Description": "打开抖音到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.ss.android.ugc.aweme/.share.OpenPlatformShareRealActivity\n", + "Function Description": "打开分享活动", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -c android.intent.category.DEFAULT -d \"taobao://detail.aweme.sdk.com\"\n", + "Function Description": "处理淘宝链接", + "Parameter Information": "taobao://detail.aweme.sdk.com 替换为任何和淘宝相关的链接" + } + ], + "小米视频": [ + { + "ADB Command": "adb shell am start -a android.intent.action.SEARCH -n com.miui.video/.feature.mine.setting.SettingActivity", + "Function Description": "此命令在小米视频应用内执行搜索操作", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.video/.Launcher1", + "Function Description": "启动小米视频主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.video/.localvideoplayer.LocalPlayerActivity -a duokan.intent.action.VIDEO_PLAY -d content://path/to/video", + "Function Description": "播放本地视频文件", + "Parameter Information": "//path/to/video 替换为本地视频文件的路径" + } + ], + "小米有品": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.youpin/.activity.SplashActivity -d \"youpin://\"", + "Function Description": "打开小米有品的主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.youpin/.activity.SplashActivity -d \"http://app.youpin.mi.com\"", + "Function Description": "在小米有品应用内打开指定的HTTP链接", + "Parameter Information": "将http://app.youpin.mi.com替换为目标页面的链接" + } + ], + "今日头条": [ + { + "ADB Command": "adb shell am start -n com.ss.android.article.news/.activity.MainActivity\n", + "Function Description": "今日头条打开主界面", + "Parameter Information": "无参数要求" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.ss.android.article.news/com.bytedance.news.schema.AdsAppActivity -d \"snssdk141://特定内容\"", + "Function Description": "此命令用于打开头条新闻应用并查看特定Scheme的内容", + "Parameter Information": "将特定内容换为你感兴趣的主题" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -n com.ss.android.article.news/com.bytedance.ug.diversion.DyNewSearchActivity", + "Function Description": "进入搜索页面", + "Parameter Information": "No additional parameters required." + } + ], + "应用商店": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.ui.MarketTabActivity -d \"mimarket://home\"", + "Function Description": "打开应用商城主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEARCH -n com.xiaomi.market/.ui.MarketPreferenceActivity", + "Function Description": "打开应用商店设置页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.ui.JoinActivity -d \"mimarket://search\"", + "Function Description": "打开商城搜索页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.business_ui.useragreement.basicmode.BasicModeAgreementActivity -d \"mimarket://agreement/basicmode\"", + "Function Description": "进入商城模式选择页面", + "Parameter Information": "No additional parameters required." + } + ], + "大众点评": [ + { + "ADB Command": "adb shell am start -n com.dianping.v1/.NovaMainActivity -d \"dianping://home\"", + "Function Description": "大众点评打开主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.dianping.v1/.NovaMainActivity -d \"dianping://me\"", + "Function Description": "打开个人中心页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.dianping.v1/com.meituan.android.trafficayers.webview.TrafficKNBWebViewActivity -d \"dianping://www.dianping.com\"", + "Function Description": "此命令尝试在大众点评应用内打开一个特定的网页。", + "Parameter Information": "替换dianping://www.dianping.com,为要打开的目标网页" + } + ], + "去哪儿旅行": [ + { + "ADB Command": "adb shell monkey -p com.Qunar -c android.intent.category.LAUNCHER 1", + "Function Description": "启动去哪儿旅行到主界面", + "Parameter Information": "No additional parameters required." + } + ], + "照片": [ + { + "ADB Command": "adb shell am start -n com.miui.gallery/.activity.HomePageActivity", + "Function Description": "启动小米相册应用的主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d [file_uri] -t [mime_type] com.miui.gallery", + "Function Description": "查看相册中的特定图片或视频", + "Parameter Information": "替换[file_uri]为图片或视频的文件URI,替换[mime_type]为相应的MIME类型,如image/jpeg或video/mp4。" + }, + { + "ADB Command": "adb push /path/to/your/image.jpg /sdcard/DCIM/Camera/\n", + "Function Description": "导入照片到默认相册", + "Parameter Information": "/path/to/your/image.jpg /sdcard/DCIM/Camera/ 分别为源和目标路径" + }, + { + "ADB Command": "adb pull /sdcard/DCIM/Camera/your_image.jpg /path/to/destination/\n", + "Function Description": "导出照片到设备", + "Parameter Information": "/sdcard/DCIM/Camera/your_image.jpg 替换为照片路径 /path/to/destination/ 为目标路径" + } + ], + "短信": [ + { + "ADB Command": "adb shell am start -n com.android.mms/.ui.MmsTabActivity\n", + "Function Description": "短信打开主界面", + "Parameter Information": "无额外参数要求" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -n com.android.mms/.ui.ComposeMessageRouterActivity --es sms_body \"消息内容\"", + "Function Description": "此命令仅用于发送纯文本消息", + "Parameter Information": "消息内容 替换为要发送的消息内容" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.mms/.ui.ComposeMessageRouterActivity -d \"sms://\" --es address \"电话号码\"", + "Function Description": "此命令用于查看或发送SMS消息", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a miui.intent.action.APP_SETTINGS -n com.android.mms/.ui.MessagingPreferenceActivity", + "Function Description": "此命令打开短信应用的设置界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.mms/.ui.ManageSimMessages", + "Function Description": "此命令用于管理SIM卡上的短信", + "Parameter Information": "No additional parameters required." + } + ], + "联系人": [ + { + "ADB Command": "adb shell am start -n com.android.contacts/.activities.PeopleActivity\n", + "Function Description": "联系人打开到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.INSERT -n com.android.contacts/.activities.ContactEditorActivity", + "Function Description": "此命令用于插入新的联系人", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.DIAL -n com.android.contacts/.activities.TwelveKeyDialer", + "Function Description": "此命令用于拨打电话号码", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.GET_CONTENT -n com.android.contacts/.activities.ContactPhonePickerActivity --ei type 1", + "Function Description": "此命令用于获取联系人的内容", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.contacts/.activities.NonPhoneActivity", + "Function Description": "此命令用于查看电话记录", + "Parameter Information": "No additional parameters required." + } + ], + "笔记": [ + { + "ADB Command": "adb shell am start -a com.miui.todo.shortcut.action.INSERT_OR_EDIT -n com.miui.notes/.ui.NotesListActivity", + "Function Description": "此命令用于添加或编辑文本或音频便签", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.INSERT_OR_EDIT -n com.miui.notes/.ui.activity.CreateDoodleNoteBridgeActivity", + "Function Description": "此命令用于创建涂鸦类型的便签", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.miui.notes/.ui.NotesListActivity", + "Function Description": "此命令用于查看文本或电话便签", + "Parameter Information": "No additional parameters required." + } + ], + "主题壁纸": [ + { + "ADB Command": "adb shell am start -n com.android.thememanager/.ThemeResourceProxyTabActivity", + "Function Description": "打开主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.android.thememanager/.search.ThemeSearchActivity", + "Function Description": "打开搜索页面", + "Parameter Information": "No additional parameters required." + } + ], + "游戏中心": [ + { + "ADB Command": "adb shell am start -n com.xiaomi.gamecenter/.ui.MainTabActivity", + "Function Description": "打开游戏中心到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.gamecenter/.ui.MainTabActivity -a android.shortcuts.mainactivity.welfare", + "Function Description": "打开游戏中心到福利页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.gamecenter/.ui.search.newsearch.NewSearchActivity", + "Function Description": "打开游戏中心到搜索页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.gamecenter/.ui.MainTabActivity -a android.shortcuts.mainactivity.mine", + "Function Description": "打开游戏中心到我的个人页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.gamecenter/.ui.explore.activity.ExploreTypeGameListActivity", + "Function Description": "打开游戏中心到动态页面", + "Parameter Information": "No additional parameters required." + } + ] +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test.zip b/agent_for_ui/agent_for_api/api_test.zip new file mode 100644 index 0000000000000000000000000000000000000000..480db3ef6aae31085e62b3104d5b2a89edb1cc61 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dd8208c24f829b22c9035cd0ea4bc864965b74f20fb23111fd1d887d4b77beb +size 1482742 diff --git a/agent_for_ui/agent_for_api/api_test/1_ndk_reference.json b/agent_for_ui/agent_for_api/api_test/1_ndk_reference.json new file mode 100644 index 0000000000000000000000000000000000000000..815fe9582877defd17909ca10dfdbfb25f12e7ce --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_ndk_reference.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/ndk/reference" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_activity_result_contract_ActivityResultContracts.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_activity_result_contract_ActivityResultContracts.json new file mode 100644 index 0000000000000000000000000000000000000000..662ade42e79b6750e203bf29066b67e34fb93987 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_activity_result_contract_ActivityResultContracts.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/activity/result/contract/ActivityResultContracts" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_AnimatorRes.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_AnimatorRes.json new file mode 100644 index 0000000000000000000000000000000000000000..fe61d7dca518e858a59c9d0cc3107d8aeba6b74b --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_AnimatorRes.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/annotation/AnimatorRes" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_LayoutRes.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_LayoutRes.json new file mode 100644 index 0000000000000000000000000000000000000000..8ed4b5e685f4c64f69dede58bcb51537f4754f85 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_LayoutRes.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/annotation/LayoutRes" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_StyleableRes.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_StyleableRes.json new file mode 100644 index 0000000000000000000000000000000000000000..fc3305b9532489bdae93f6000322d14511e04736 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_StyleableRes.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/annotation/StyleableRes" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_experimental_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_experimental_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..9dbc7692f8b64589988ee6eefd103377f72cb707 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_annotation_experimental_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/annotation/experimental/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_appsearch_annotation_Document_Namespace.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_appsearch_annotation_Document_Namespace.json new file mode 100644 index 0000000000000000000000000000000000000000..474cf0c897194c24f87f83ccd20ae86b05b5bea4 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_appsearch_annotation_Document_Namespace.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/appsearch/annotation/Document.Namespace" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_arch_core_util_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_arch_core_util_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..e1e9f629e6f8b0ab50d1301c7a8f79aa67221fa9 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_arch_core_util_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/arch/core/util/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_autofill_inline_SuggestionHintConstants.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_autofill_inline_SuggestionHintConstants.json new file mode 100644 index 0000000000000000000000000000000000000000..842e1f391cd3cd13deacec6a269a9c61f555d779 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_autofill_inline_SuggestionHintConstants.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/autofill/inline/SuggestionHintConstants" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ExperimentalBenchmarkConfigApi.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ExperimentalBenchmarkConfigApi.json new file mode 100644 index 0000000000000000000000000000000000000000..5589d006411b8da41747edd9a4b43fd3bed99b80 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ExperimentalBenchmarkConfigApi.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/benchmark/ExperimentalBenchmarkConfigApi" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ExperimentalBenchmarkStateApi.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ExperimentalBenchmarkStateApi.json new file mode 100644 index 0000000000000000000000000000000000000000..dcb652e429eee7bf42e130129a839999cb9aad40 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ExperimentalBenchmarkStateApi.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/benchmark/ExperimentalBenchmarkStateApi" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ProfilerConfig_StackSampling.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ProfilerConfig_StackSampling.json new file mode 100644 index 0000000000000000000000000000000000000000..5dbe45f3ca39ddf769eb09a3daa7139d0326634a --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_benchmark_ProfilerConfig_StackSampling.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/benchmark/ProfilerConfig.StackSampling" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_biometric_auth_AuthPromptFailureException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_biometric_auth_AuthPromptFailureException.json new file mode 100644 index 0000000000000000000000000000000000000000..f88b365bbd3f51ac6b08df67c1aa99a2c46fa6f9 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_biometric_auth_AuthPromptFailureException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/biometric/auth/AuthPromptFailureException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_extensions_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_extensions_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..5435a5ee4426fb1960ecd14eaa88e0e0471a1e08 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_extensions_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/camera/extensions/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_video_VideoRecordEvent_Start.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_video_VideoRecordEvent_Start.json new file mode 100644 index 0000000000000000000000000000000000000000..cd84258b57d0a991ba95a4ccea5b92ab589c8f02 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_video_VideoRecordEvent_Start.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/camera/video/VideoRecordEvent.Start" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_view_transform_OutputTransform.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_view_transform_OutputTransform.json new file mode 100644 index 0000000000000000000000000000000000000000..335f30eb2bc2b80e7a2191a4aac4bd34c7cd6141 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_view_transform_OutputTransform.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/camera/view/transform/OutputTransform" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_view_video_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_view_video_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..cf149473f0913d55ccf9321299d0515df92cf29e --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_camera_view_video_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/camera/view/video/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_classes.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_classes.json new file mode 100644 index 0000000000000000000000000000000000000000..3db653760590a390537a570557b12b805fcb4173 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_classes.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/constraintlayout/classes" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_core_motion_utils_TimeCycleSplineSet_Sort.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_core_motion_utils_TimeCycleSplineSet_Sort.json new file mode 100644 index 0000000000000000000000000000000000000000..88ec35fabeff52b8dad311be57ee0f78204a84f9 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_core_motion_utils_TimeCycleSplineSet_Sort.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/constraintlayout/core/motion/utils/TimeCycleSplineSet.Sort" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_helper_widget_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_helper_widget_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..06ee4d34ad973777a4ee59635d92f443ecc2c0a8 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_helper_widget_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/constraintlayout/helper/widget/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_packages.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_packages.json new file mode 100644 index 0000000000000000000000000000000000000000..af7abd055b168ba3e9685e029bb2e0bf8b006f20 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_constraintlayout_packages.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/constraintlayout/packages" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_graphics_drawable_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_graphics_drawable_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3acd190cac9e92c69e0b2370d75a14566120b4d9 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_graphics_drawable_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/graphics/drawable/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_location_altitude_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_location_altitude_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..e11eca0153b739f0f929c4ec80ef3092b808e926 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_location_altitude_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/location/altitude/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_net_ParseException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_net_ParseException.json new file mode 100644 index 0000000000000000000000000000000000000000..f66210838d500deb1c3052ba50b52301c647adaf --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_net_ParseException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/net/ParseException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_os_OperationCanceledException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_os_OperationCanceledException.json new file mode 100644 index 0000000000000000000000000000000000000000..1c7db08300475678fbbbc5d29a233e731436e230 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_os_OperationCanceledException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/os/OperationCanceledException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_performance_testing_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_performance_testing_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..ce6c702ead03e9c2549e92076b729e431824f8b8 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_performance_testing_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/performance/testing/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_role_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_role_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..cf2aeba420276f6c2f570b5e896af638a3cbae80 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_role_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/role/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_service_quicksettings_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_service_quicksettings_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..c8a8758a36611e3f9bff4bc38bf509ad459f3ebb --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_service_quicksettings_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/service/quicksettings/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_telecom_CallControlResult.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_telecom_CallControlResult.json new file mode 100644 index 0000000000000000000000000000000000000000..493f1e1157f5974820d68b68c109bcf75ca09637 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_telecom_CallControlResult.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/telecom/CallControlResult" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_telephony_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_telephony_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..c851d47b924d2e3bfd5130650bb19dd266e03456 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_telephony_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/telephony/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_util_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_util_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..59f81ba19b806646c273c1f40d50db712f0a6d8e --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_util_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/util/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_view_accessibility_AccessibilityManagerCompat_AccessibilityStateChangeListenerCompat.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_view_accessibility_AccessibilityManagerCompat_AccessibilityStateChangeListenerCompat.json new file mode 100644 index 0000000000000000000000000000000000000000..36bdb279fb57613882c4ef66ac19f6c4713ef2a5 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_view_accessibility_AccessibilityManagerCompat_AccessibilityStateChangeListenerCompat.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/view/accessibility/AccessibilityManagerCompat.AccessibilityStateChangeListenerCompat" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_view_autofill_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_view_autofill_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..f9f1b607804bbab8d41d92d08dd058f6a5d62323 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_core_view_autofill_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/core/view/autofill/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_ClearCredentialUnknownException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_ClearCredentialUnknownException.json new file mode 100644 index 0000000000000000000000000000000000000000..2440bdb4726c7ad568898295474b8d78d8613831 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_ClearCredentialUnknownException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/ClearCredentialUnknownException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_CreateCredentialCancellationException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_CreateCredentialCancellationException.json new file mode 100644 index 0000000000000000000000000000000000000000..7735c9b4fc65af3fb51c45fa1f419df0289c8c27 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_CreateCredentialCancellationException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/CreateCredentialCancellationException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_CreateCredentialUnknownException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_CreateCredentialUnknownException.json new file mode 100644 index 0000000000000000000000000000000000000000..bd29b84e03e9cc3bcb9ca57b25c997954920f69c --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_CreateCredentialUnknownException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/CreateCredentialUnknownException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_GetCredentialInterruptedException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_GetCredentialInterruptedException.json new file mode 100644 index 0000000000000000000000000000000000000000..5424fdabc7142574cc926960e982c55accaa76db --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_GetCredentialInterruptedException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/GetCredentialInterruptedException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_GetCredentialUnknownException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_GetCredentialUnknownException.json new file mode 100644 index 0000000000000000000000000000000000000000..83bf91a47fc5ae8c354d31c8fd6bc3e76f011c47 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_GetCredentialUnknownException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/GetCredentialUnknownException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_InvalidStateError.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_InvalidStateError.json new file mode 100644 index 0000000000000000000000000000000000000000..6f3602d70b09374e1eabc87f8e5795ab4b7a8d58 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_InvalidStateError.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/domerrors/InvalidStateError" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_VersionError.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_VersionError.json new file mode 100644 index 0000000000000000000000000000000000000000..af3a102fa29d27b1f2a78a669ea73ff159e1f153 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_VersionError.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/domerrors/VersionError" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..6d31741cc63115c044e04b2e600b2e26f71ed59c --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_credentials_exceptions_domerrors_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/credentials/exceptions/domerrors/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_core_ExperimentalMultiProcessDataStore.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_core_ExperimentalMultiProcessDataStore.json new file mode 100644 index 0000000000000000000000000000000000000000..941e4a640642a38edd52246b67e3fdde87ba0aea --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_core_ExperimentalMultiProcessDataStore.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/datastore/core/ExperimentalMultiProcessDataStore" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_core_okio_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_core_okio_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..f7fb44bb82ec95ebd0f43750be7fe7956e519217 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_core_okio_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/datastore/core/okio/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_preferences_core_Preferences_Pair.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_preferences_core_Preferences_Pair.json new file mode 100644 index 0000000000000000000000000000000000000000..8a79f9de33390cf238a89dcc55d9b1b7218a5a79 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_datastore_preferences_core_Preferences_Pair.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/datastore/preferences/core/Preferences.Pair" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_drawerlayout_widget_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_drawerlayout_widget_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3e7d2b3d6eea6c43bab94b35865b2333e771bb34 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_drawerlayout_widget_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/drawerlayout/widget/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_emoji2_bundled_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_emoji2_bundled_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3e2c3e7225ca65336e65133084172de3f4240f29 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_emoji2_bundled_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/emoji2/bundled/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_fragment_app_strictmode_RetainInstanceUsageViolation.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_fragment_app_strictmode_RetainInstanceUsageViolation.json new file mode 100644 index 0000000000000000000000000000000000000000..96cb0367b086bdd61aa0c1ce95b8913277293910 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_fragment_app_strictmode_RetainInstanceUsageViolation.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/fragment/app/strictmode/RetainInstanceUsageViolation" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_changes_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_changes_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..9ac2f88ad0d79b37aba7bea0733c23ea8b98479e --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_changes_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/health/connect/client/changes/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3c1c86e7d679c756f2dfd0245dad7d810d6618da --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/health/connect/client/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_time_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_time_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..72fcf819dc724fe69b7a1324248681edb9b44514 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_connect_client_time_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/health/connect/client/time/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_services_client_data_ExerciseEvent.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_services_client_data_ExerciseEvent.json new file mode 100644 index 0000000000000000000000000000000000000000..a5712af23c87b74bc49e1c12856015c435918e24 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_health_services_client_data_ExerciseEvent.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/health/services/client/data/ExerciseEvent" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_hilt_work_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_hilt_work_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..9f39fe80db8a5bdb913f44a1973faf8be2271cc9 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_hilt_work_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/hilt/work/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_leanback_graphics_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_leanback_graphics_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..0d5580830c34d0a52c35269fb8ce97708f009160 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_leanback_graphics_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/leanback/graphics/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_leanback_widget_PlaybackControlsRow_ShuffleAction.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_leanback_widget_PlaybackControlsRow_ShuffleAction.json new file mode 100644 index 0000000000000000000000000000000000000000..906b71eda2687d5d359c14659a6946cffe8c0aef --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_leanback_widget_PlaybackControlsRow_ShuffleAction.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/leanback/widget/PlaybackControlsRow.ShuffleAction" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_lifecycle_ViewModelProvider_NewInstanceFactory_Companion.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_lifecycle_ViewModelProvider_NewInstanceFactory_Companion.json new file mode 100644 index 0000000000000000000000000000000000000000..721cdb68dafcb156fabf11459b26b10a7f158a4d --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_lifecycle_ViewModelProvider_NewInstanceFactory_Companion.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/lifecycle/ViewModelProvider.NewInstanceFactory.Companion" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media2_session_MediaConstants.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media2_session_MediaConstants.json new file mode 100644 index 0000000000000000000000000000000000000000..70449f7d15dd9ec179114411a09ed5695bf52789 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media2_session_MediaConstants.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media2/session/MediaConstants" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_BuildConfig.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_BuildConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..61272be2ce79217ad06a212d0966c430926b3c24 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_BuildConfig.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/common/BuildConfig" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_C_VideoScalingMode.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_C_VideoScalingMode.json new file mode 100644 index 0000000000000000000000000000000000000000..6368384b802e42c159f88414b368d8c05e2e4e4a --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_C_VideoScalingMode.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/common/C.VideoScalingMode" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_C_WakeMode.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_C_WakeMode.json new file mode 100644 index 0000000000000000000000000000000000000000..792af6d108295cf274f6663f476f42488c2a8791 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_C_WakeMode.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/common/C.WakeMode" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_Player_TimelineChangeReason.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_Player_TimelineChangeReason.json new file mode 100644 index 0000000000000000000000000000000000000000..9385bae9386b69cf6e79f367372519781b001852 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_common_Player_TimelineChangeReason.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/common/Player.TimelineChangeReason" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_container_BuildConfig.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_container_BuildConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..94fd8756d678fa52031a45c01a101a4f48ccaa60 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_container_BuildConfig.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/container/BuildConfig" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_BuildConfig.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_BuildConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..77372728159782ac7036faf2c3c0d5b9be72d568 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_BuildConfig.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/datasource/BuildConfig" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_cache_CacheDataSource_CacheIgnoredReason.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_cache_CacheDataSource_CacheIgnoredReason.json new file mode 100644 index 0000000000000000000000000000000000000000..973515424360735a88ef8d6121edd7ef35e2a667 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_cache_CacheDataSource_CacheIgnoredReason.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/datasource/cache/CacheDataSource.CacheIgnoredReason" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_rtmp_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_rtmp_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..11c7d2c4b9b874a1a7c9b5afa0e8b933aaaf8c0f --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_datasource_rtmp_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/datasource/rtmp/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_BuildConfig.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_BuildConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..0890fc335ce5c913d98e3ddc61bcb99fa02da46d --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_BuildConfig.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/BuildConfig" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_ExoPlaybackException_Type.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_ExoPlaybackException_Type.json new file mode 100644 index 0000000000000000000000000000000000000000..c3127195aee6f129974358b4c6b09482f1a11db1 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_ExoPlaybackException_Type.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/ExoPlaybackException.Type" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_Renderer_MessageType.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_Renderer_MessageType.json new file mode 100644 index 0000000000000000000000000000000000000000..d859a4163fa22d90327d17d47360422bdaf07753 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_Renderer_MessageType.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/Renderer.MessageType" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_audio_AudioSink_SinkFormatSupport.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_audio_AudioSink_SinkFormatSupport.json new file mode 100644 index 0000000000000000000000000000000000000000..69d783769ca1dfa8dea51c897ddae26d8894f941 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_audio_AudioSink_SinkFormatSupport.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/audio/AudioSink.SinkFormatSupport" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_dash_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_dash_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..59387db4eedae2ec3b6aa157c763ba8960b6d896 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_dash_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/dash/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_drm_DefaultDrmSessionManager_Mode.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_drm_DefaultDrmSessionManager_Mode.json new file mode 100644 index 0000000000000000000000000000000000000000..0d01cf397152d0b8437b8bee5f7fa8f9debfa749 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_drm_DefaultDrmSessionManager_Mode.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/drm/DefaultDrmSessionManager.Mode" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_drm_DrmSession_DrmSessionException.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_drm_DrmSession_DrmSessionException.json new file mode 100644 index 0000000000000000000000000000000000000000..c836b59973d2464f69f6a40488fda93d37dcfafe --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_drm_DrmSession_DrmSessionException.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/drm/DrmSession.DrmSessionException" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_hls_playlist_HlsMediaPlaylist_PlaylistType.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_hls_playlist_HlsMediaPlaylist_PlaylistType.json new file mode 100644 index 0000000000000000000000000000000000000000..d8ef28b37e0e6e5495eb20d138882f342b0c14dc --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_hls_playlist_HlsMediaPlaylist_PlaylistType.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.PlaylistType" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_smoothstreaming_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_smoothstreaming_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..ba855b6527061ab0a83658b6bfc4e892a260805f --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_smoothstreaming_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/smoothstreaming/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_source_MediaLoadData.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_source_MediaLoadData.json new file mode 100644 index 0000000000000000000000000000000000000000..c222a96b13c7344d087027d18ec33e87d8e0c6f6 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_source_MediaLoadData.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/source/MediaLoadData" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_source_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_source_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..cc92a0c10b86c858fe1ab9ec72f59fbe5ec66a90 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_source_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/source/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_trackselection_ExoTrackSelection_Definition.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_trackselection_ExoTrackSelection_Definition.json new file mode 100644 index 0000000000000000000000000000000000000000..658eda8a7b1c75b046f9bda38263e44992c2f595 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_trackselection_ExoTrackSelection_Definition.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_trackselection_TrackSelection_Type.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_trackselection_TrackSelection_Type.json new file mode 100644 index 0000000000000000000000000000000000000000..cb8c3b54ca4ccd222691ec6e79a0532deef680b4 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_trackselection_TrackSelection_Type.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/trackselection/TrackSelection.Type" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_upstream_CmcdData_StreamingFormat.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_upstream_CmcdData_StreamingFormat.json new file mode 100644 index 0000000000000000000000000000000000000000..2547a35f99835560f740cbcef3948f819ab0caaa --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_exoplayer_upstream_CmcdData_StreamingFormat.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/exoplayer/upstream/CmcdData.StreamingFormat" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_Ac4Util_SyncFrameInfo.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_Ac4Util_SyncFrameInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..1aa0111b79abd3f8c92a9eca0aa4eeefaa7ce89b --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_Ac4Util_SyncFrameInfo.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/Ac4Util.SyncFrameInfo" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_BinarySearchSeeker_SeekOperationParams.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_BinarySearchSeeker_SeekOperationParams.json new file mode 100644 index 0000000000000000000000000000000000000000..42cd53a2b7166f86157ba0ba9b4eeb1c6833ae86 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_BinarySearchSeeker_SeekOperationParams.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/BinarySearchSeeker.SeekOperationParams" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_avi_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_avi_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3de8bcf9de371df8aa679f90ea09953cad19e897 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_avi_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/avi/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_jpeg_JpegExtractor_Flags.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_jpeg_JpegExtractor_Flags.json new file mode 100644 index 0000000000000000000000000000000000000000..7d761c055bd213c5162b46b9032a87152acd3b0b --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_jpeg_JpegExtractor_Flags.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/jpeg/JpegExtractor.Flags" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_metadata_flac_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_metadata_flac_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..5120b4402b6e799149a05cba8b0f9267e8e35f48 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_metadata_flac_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/metadata/flac/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_metadata_id3_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_metadata_id3_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..a66963fa73d8532d788de82719498af4befeb0ac --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_metadata_id3_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/metadata/id3/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_ts_TsPayloadReader_EsInfo.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_ts_TsPayloadReader_EsInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..e4e9eb4a69b1f30059dfac90f837350e206071ee --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_ts_TsPayloadReader_EsInfo.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/ts/TsPayloadReader.EsInfo" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_wav_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_wav_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..45e4467889ee0dade0a224f083d4be11f4a4349a --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_extractor_wav_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/extractor/wav/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_muxer_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_muxer_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..a108de483b3dc4085764d79b49824a521ab223ec --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_muxer_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/muxer/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_SessionCommand_CommandCode.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_SessionCommand_CommandCode.json new file mode 100644 index 0000000000000000000000000000000000000000..d38476f7b733fcf6f7e1cef77fc79230c982e871 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_SessionCommand_CommandCode.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/session/SessionCommand.CommandCode" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_SessionResult_Code.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_SessionResult_Code.json new file mode 100644 index 0000000000000000000000000000000000000000..1335d1d91febd718caa441f847b1a9603f2deef4 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_SessionResult_Code.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/session/SessionResult.Code" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..73d42d174e22a289243e6b7f2136624d48de78f8 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_session_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/session/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_ClearMediaItems.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_ClearMediaItems.json new file mode 100644 index 0000000000000000000000000000000000000000..3c7a3faeaf7a9db7d4bc6cf1a5595c1f00b889a9 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_ClearMediaItems.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/test/utils/Action.ClearMediaItems" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_SetMediaItems.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_SetMediaItems.json new file mode 100644 index 0000000000000000000000000000000000000000..73b865919eb404434eb817fd6d0144c4d067ca84 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_SetMediaItems.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/test/utils/Action.SetMediaItems" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_WaitForPositionDiscontinuity.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_WaitForPositionDiscontinuity.json new file mode 100644 index 0000000000000000000000000000000000000000..511af5a43c30571c259396c773fa9d47c618e6ed --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_Action_WaitForPositionDiscontinuity.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/test/utils/Action.WaitForPositionDiscontinuity" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_ExtractorAsserts_AssertionConfig.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_ExtractorAsserts_AssertionConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..26465d36e66603f8f24d3ef1aed15eddf4c2ba12 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_ExtractorAsserts_AssertionConfig.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/test/utils/ExtractorAsserts.AssertionConfig" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_robolectric_BuildConfig.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_robolectric_BuildConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..38033698673d8f659c7c63c2a7a64ce6a7690c40 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_robolectric_BuildConfig.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/test/utils/robolectric/BuildConfig" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_robolectric_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_robolectric_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..e6b8997deb5a44eb709c3d05dbb8e9b41ac9aa30 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_test_utils_robolectric_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/test/utils/robolectric/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_transformer_EditedMediaItemSequence.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_transformer_EditedMediaItemSequence.json new file mode 100644 index 0000000000000000000000000000000000000000..1bac49a22e919c1e6b5f2ff80abd585f0894c677 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_transformer_EditedMediaItemSequence.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/transformer/EditedMediaItemSequence" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_transformer_TransformationResult_ProcessedInput.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_transformer_TransformationResult_ProcessedInput.json new file mode 100644 index 0000000000000000000000000000000000000000..705ae71f39fd2a4c7185c67f0e45299d2c1b12ed --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_transformer_TransformationResult_ProcessedInput.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/transformer/TransformationResult.ProcessedInput" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_ui_leanback_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_ui_leanback_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..6cf0696cb9182010e87c91519f3c2f5253ffa804 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_ui_leanback_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/ui/leanback/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_ui_package-summary.json b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_ui_package-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3c860c4232638a6053f159e405bac3ce8555a90c --- /dev/null +++ b/agent_for_ui/agent_for_api/api_test/1_reference_androidx_media3_ui_package-summary.json @@ -0,0 +1,3 @@ +{ + "baseurl": "https://developer.android.google.cn/reference/androidx/media3/ui/package-summary" +} \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/api_use_info.json b/agent_for_ui/agent_for_api/api_use_info.json new file mode 100644 index 0000000000000000000000000000000000000000..d6917497951ca7450080f305d4122c2a3ea24626 --- /dev/null +++ b/agent_for_ui/agent_for_api/api_use_info.json @@ -0,0 +1,1928 @@ +[ + { + "Package Name": "com.android.camera", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "5.1.000241.0" + }, + { + "Package Name": "com.miui.daemon", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "2.0" + }, + { + "Package Name": "com.iflytek.inputmethod.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "8.1.8099" + }, + { + "Package Name": "com.google.android.overlay.modules.documentsui.cn", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.updater", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "8.1.9" + }, + { + "Package Name": "com.miui.powerkeeper", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "4.2.00" + }, + { + "Package Name": "com.miui.miservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14.1.0.0" + }, + { + "Package Name": "com.miui.miwallpaper.overlay.customize", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.miui.tsmclient", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "23.08.22.1.f" + }, + { + "Package Name": "com.android.modulemetadata", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.connectivity.resources", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "S-initial" + }, + { + "Package Name": "android.miui.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.calllogbackup", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "io.appium.uiautomator2.server", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "4.12.2" + }, + { + "Package Name": "android.miui.home.launcher.res", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.systemui.accessibility.accessibilitymenu", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.internal.emulation.pixel_3_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.securitycore", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.7-14-230915" + }, + { + "Package Name": "com.android.providers.contacts", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.vpnsdkmanager", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "24" + }, + { + "Package Name": "com.android.internal.emulation.pixel_4a", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.xiaomi.mibrain.speech", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.5.1" + }, + { + "Package Name": "com.miui.fm", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "10.1.2.2" + }, + { + "Package Name": "com.miui.nextpay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "23.07.25.1" + }, + { + "Package Name": "com.android.dreams.basic", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.companiondevicemanager", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.cts.priv.ctsshim", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14-10093150" + }, + { + "Package Name": "com.xiaomi.securitysts", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.230720" + }, + { + "Package Name": "com.miui.video", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "v2023022430(MiVideo-ROM)" + }, + { + "Package Name": "com.android.mms.service", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.providers.downloads", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "134.23.09.800001" + }, + { + "Package Name": "com.miui.mediaviewer", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "v2023073002(MediaViewer-TEST)" + }, + { + "Package Name": "com.android.bluetoothmidiservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.mfashiongallery.emag", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "M923083100-S" + }, + { + "Package Name": "com.miui.carlink", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.5.0-20230824" + }, + { + "Package Name": "com.android.credentialmanager", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.networkstack", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.xmsf", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "6.2.4-C" + }, + { + "Package Name": "io.appium.settings", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.2.0" + }, + { + "Package Name": "android.miui.overlay.telephony", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "android.ext.shared", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1" + }, + { + "Package Name": "com.miui.voiceassist", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "6.7.3.4914" + }, + { + "Package Name": "com.android.networkstack.tethering", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.micloud.sdk", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "2.0.0.0" + }, + { + "Package Name": "com.android.keychain", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.internal.emulation.pixel_2_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.xiaomi.metoknlp", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "6.0.4" + }, + { + "Package Name": "com.android.connectivity.resources.goldfish.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.webview", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "113.0.5672.136" + }, + { + "Package Name": "com.android.virtualmachine.res", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.emulator.multidisplay", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.shell", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.micloudsync", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.12.0.0.20" + }, + { + "Package Name": "com.android.wifi.resources.xiaomi", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miuix.editor", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.scanner", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "15.1.0" + }, + { + "Package Name": "com.android.inputdevices", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.nearby.halfsheet", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.providers.telephony.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.miui.weather2", + "miui.permission.USE_INTERNAL_GENERAL_API": "false", + "usesNonSdkApi": false, + "Version Name": "13.5.3.0" + }, + { + "Package Name": "com.miui.rom", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.11.0.0" + }, + { + "Package Name": "com.xiaomi.gnss.polaris", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2023.09.06.2" + }, + { + "Package Name": "com.android.sdksetup", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.carrierconfig.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.apps.tag", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.1" + }, + { + "Package Name": "com.miui.core.internal.services", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.0" + }, + { + "Package Name": "com.android.internal.emulation.pixel_6a", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.touchassistant", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "9.0.5.8.1" + }, + { + "Package Name": "com.android.sharedstoragebackup", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.providers.media", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.providers.calendar", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "13.0.0.4" + }, + { + "Package Name": "com.miui.analytics", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "5.13.0" + }, + { + "Package Name": "com.android.incallui", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.0.46" + }, + { + "Package Name": "com.android.providers.blockednumber", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.google.android.documentsui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14-10484568" + }, + { + "Package Name": "com.android.statementservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.printservice.recommendation", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.3.0" + }, + { + "Package Name": "com.xiaomi.smarthome", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "8.8.627" + }, + { + "Package Name": "com.miui.audiomonitor", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.proxyhandler", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.calendar", + "miui.permission.USE_INTERNAL_GENERAL_API": "false", + "usesNonSdkApi": false, + "Version Name": "13.18.1.0" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_3a", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.settings.rro.device.hide.statusbar.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.xiaomi.account", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "R-23.08.07.02" + }, + { + "Package Name": "com.miui.thirdappassistant", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.5" + }, + { + "Package Name": "com.android.safetycenter.resources", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "33 system image" + }, + { + "Package Name": "com.android.managedprovisioning", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.emergency", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.healthconnect.controller", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.mishare.connectivity", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.16.0" + }, + { + "Package Name": "com.miui.aod", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "DEV-2.14.1210-08021449" + }, + { + "Package Name": "com.android.carrierdefaultapp", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.payment", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.6.2" + }, + { + "Package Name": "com.android.backupconfirm", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.mi_connect_service", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.14.121" + }, + { + "Package Name": "com.miui.uireporter", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.1.0" + }, + { + "Package Name": "com.android.server.telecom.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.networkstack.tethering.emulator", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.cellbroadcastservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.mtp", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_4a", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.navigation.bar.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.virtualsim", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "6.5.3" + }, + { + "Package Name": "com.miui.screenrecorder", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.12.7.10.1" + }, + { + "Package Name": "com.android.internal.display.cutout.emulation.double", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.theme.font.notoserifsource", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.networkstack.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.simactivate.service", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "R-23.08.28" + }, + { + "Package Name": "com.miui.personalassistant", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "5.7.13-08161724" + }, + { + "Package Name": "com.android.browser", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "17.7.570901" + }, + { + "Package Name": "com.miui.greenguard", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.8.09.04" + }, + { + "Package Name": "com.miui.guardprovider", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.7.0-20230712.0" + }, + { + "Package Name": "com.miui.cloudbackup", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.12.1.6.0" + }, + { + "Package Name": "com.android.managedprovisioning.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_3", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "20230316.0" + }, + { + "Package Name": "com.android.wallpapercropper", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.security.onetrack", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.230901" + }, + { + "Package Name": "com.android.internal.emulation.pixel_4", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_7", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.emulation.pixel_5", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_6", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_5", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.emulation.pixel_3", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_4", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.contentcatcher", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.004" + }, + { + "Package Name": "com.android.internal.emulation.pixel_6", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.systemui.navbar.gestural", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.emulation.pixel_7", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.soundrecorder", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.3.14.9" + }, + { + "Package Name": "com.android.role.notes.enabled", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.baidu.input_mi", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "10.6.121.710" + }, + { + "Package Name": "com.miui.systemui.overlay.devices.android", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.settings.intelligence", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.macro", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.2.4.S" + }, + { + "Package Name": "com.lbe.security.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "1.8.4" + }, + { + "Package Name": "com.xiaomi.aicr", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.0" + }, + { + "Package Name": "com.android.settings.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.miui.player", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.17.0.14-R" + }, + { + "Package Name": "com.xiaomi.registration", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.0.1" + }, + { + "Package Name": "com.miui.phrase", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.4.1" + }, + { + "Package Name": "com.android.internal.emulation.pixel_6_pro", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.extraphoto", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.8.6.0.0" + }, + { + "Package Name": "com.bsp.catchlog", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "0.0.6-SNAPSHOT" + }, + { + "Package Name": "com.xiaomi.vipaccount", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.2.6" + }, + { + "Package Name": "com.android.internal.emulation.pixel_3a", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.deskclock", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "13.81.0" + }, + { + "Package Name": "com.android.wallpaperbackup", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_6a", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.securityadd", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "9.11.47-230831.0.1" + }, + { + "Package Name": "com.android.internal.systemui.navbar.twobutton", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.systemui.navbar.threebutton", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.systemAdSolution", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2023.03.28.17-release" + }, + { + "Package Name": "com.miui.core", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.20.1.3" + }, + { + "Package Name": "com.miui.settings.rro.device.type.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.localtransport", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "android", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.duokan.phone.remotecontroller", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "6.6.0M" + }, + { + "Package Name": "com.miui.compass", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "13.2.8.1" + }, + { + "Package Name": "com.android.email", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "V13_20230721_b2" + }, + { + "Package Name": "com.android.rkpdapp", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.permissioncontroller", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "33 system image" + }, + { + "Package Name": "com.miui.gallery", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "3.5.7.3" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_3a_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.face.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.se", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.pacprocessor", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.messaging", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.001" + }, + { + "Package Name": "com.miui.accessibility", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "5.16.0" + }, + { + "Package Name": "com.android.providers.media.module", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.freeform", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.youpin", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "5.4.44_miui" + }, + { + "Package Name": "com.miui.contentextension", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.5.99" + }, + { + "Package Name": "com.android.thememanager.customthemeconfig.config.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.tencent.mm", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "8.0.42" + }, + { + "Package Name": "com.android.stk", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.camera.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "5.0.000045.3" + }, + { + "Package Name": "com.android.internal.display.cutout.emulation.hole", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.calculator", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "13.1.29" + }, + { + "Package Name": "com.android.settings", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.bips", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.internal.systemui.navbar.gestural_narrow_back", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.display.cutout.emulation.tall", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_7_pro", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "io.github.ylimit.droidbotapp", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.notes", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "6.1.5" + }, + { + "Package Name": "com.android.carrierconfig", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "1.0.0" + }, + { + "Package Name": "com.android.internal.systemui.navbar.gestural_wide_back", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.xiaomi.shop", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "5.9.10.20230417.miui.1" + }, + { + "Package Name": "com.android.federatedcompute.services", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "T-initial" + }, + { + "Package Name": "com.xiaomi.finddevice", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.packageinstaller", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "5.1.6.2.0-20230725" + }, + { + "Package Name": "com.xiaomi.xmsfkeeper", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.5" + }, + { + "Package Name": "com.miui.notification", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.1.4.98" + }, + { + "Package Name": "com.ifaa.seccam", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.9" + }, + { + "Package Name": "com.xiaomi.location.fused", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.0.0" + }, + { + "Package Name": "com.xiaomi.aireco", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.11.18.9bhr" + }, + { + "Package Name": "com.android.devicelockcontroller", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.musicfx", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "1.4" + }, + { + "Package Name": "com.android.internal.systemui.navbar.transparent", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.adservices.api", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "android.aosp.overlay.telephony", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.health.connect.backuprestore", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.google.android.overlay.modules.ext.services.cn", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "miui.systemui.plugin", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "14.0.1.94.0" + }, + { + "Package Name": "com.miui.bugreport", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "3.3.15.37" + }, + { + "Package Name": "com.miui.yellowpage", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "202308290" + }, + { + "Package Name": "com.xiaomi.aiasst.service", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "5.4.0" + }, + { + "Package Name": "com.xiaomi.cameratools", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "23.09.05.0" + }, + { + "Package Name": "com.android.providers.downloads.ui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "123.05.19.800006" + }, + { + "Package Name": "com.miui.miwallpaper", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.9.9-ALPHA-08121530" + }, + { + "Package Name": "com.android.ons", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.intentresolver", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "2021-11" + }, + { + "Package Name": "com.miui.cit", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "0.3.8-SNAPSHOT" + }, + { + "Package Name": "com.miui.misightservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "0.9.5" + }, + { + "Package Name": "com.xiaomi.ugd", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.2.0" + }, + { + "Package Name": "com.miui.vsimcore", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.8" + }, + { + "Package Name": "com.android.certinstaller", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.mediaeditor", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.3.2.6" + }, + { + "Package Name": "com.miui.hybrid", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.10.3.9" + }, + { + "Package Name": "com.miui.system", + "miui.permission.USE_INTERNAL_GENERAL_API": "signature|privileged", + "usesNonSdkApi": false, + "Version Name": "1.15.0.0" + }, + { + "Package Name": "com.android.wifi.resources", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "R-initial" + }, + { + "Package Name": "com.android.wifi.dialog", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.cleanmaster", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "662.0.230905.release" + }, + { + "Package Name": "com.android.captiveportallogin", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.market", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.51.10" + }, + { + "Package Name": "com.miui.newmidrive", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.12.0.5.91" + }, + { + "Package Name": "com.android.internal.emulation.pixel_7_pro", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.systemui.carriers.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.xiaomi.otrpbroker", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.220829" + }, + { + "Package Name": "com.miui.backup", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "6.5.0.5" + }, + { + "Package Name": "com.miui.securitycenter", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "8.2.2-230907.0.1" + }, + { + "Package Name": "com.android.fileexplorer", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.5.1.0" + }, + { + "Package Name": "com.android.simappdialog", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.providers.telephony", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.wallpaper.livepicker", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.internal.display.cutout.emulation.emu01", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.fido.asm", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.230706.2" + }, + { + "Package Name": "com.miui.settings.rro.device.config.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.sdksandbox", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "T-initial" + }, + { + "Package Name": "com.xiaomi.xaee", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "0.2" + }, + { + "Package Name": "io.appium.uiautomator2.server.test", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "null" + }, + { + "Package Name": "com.xiaomi.barrage", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.0.9" + }, + { + "Package Name": "com.miui.miwallpaper.config.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.aon", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.50" + }, + { + "Package Name": "com.android.internal.display.cutout.emulation.waterfall", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.qr", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2023_09_12_12_35" + }, + { + "Package Name": "com.android.providers.settings", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_3_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.phone", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.internal.systemui.navbar.gestural_extra_wide_back", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.systemui.gesture.line.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.emulation.pixel_4_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "android.aosp.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.bluetooth.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.traceur", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.contacts", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "12.3.7.1" + }, + { + "Package Name": "com.android.phone.common.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.mirror", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "3.7.91.a" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_6_pro", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.internal.emulation.pixel_3a_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "cn.wps.moffice_eng.xiaomi.lite", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.3.0" + }, + { + "Package Name": "com.android.location.fused", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.vpndialogs", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.uwb.resources", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "T-initial" + }, + { + "Package Name": "com.miui.screenshot", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "RELEASE-1.4.78-08281728" + }, + { + "Package Name": "com.android.cellbroadcastreceiver", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "R-initial" + }, + { + "Package Name": "com.xiaomi.migameservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "0.6.3" + }, + { + "Package Name": "com.miui.voicetrigger", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "v-5.7.0.15-qcom" + }, + { + "Package Name": "com.android.systemui.emulation.pixel_4_xl", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.google.android.cellbroadcastreceiver.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.ondevicepersonalization.services", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "T-initial" + }, + { + "Package Name": "com.android.htmlviewer", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.home", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "RELEASE-4.39.12.6764-09151558" + }, + { + "Package Name": "com.google.android.ext.services", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "frc_340818020" + }, + { + "Package Name": "com.miui.wmsvc", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.0.13" + }, + { + "Package Name": "com.miui.system.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.xiaomi.gamecenter.sdk.service", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "8.1.6.2" + }, + { + "Package Name": "org.ifaa.aidl.manager", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.230625" + }, + { + "Package Name": "com.android.mms", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "14.2.4.6" + }, + { + "Package Name": "com.android.providers.settings.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.providers.userdictionary", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.mi.health", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.19.3" + }, + { + "Package Name": "com.android.cts.ctsshim", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14-10093150" + }, + { + "Package Name": "com.xiaomi.aiasst.vision", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.2.2" + }, + { + "Package Name": "com.android.emulator.radio.config", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.internal.display.cutout.emulation.corner", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.storagemanager", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.android.quicksearchbox", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "10.3.2.07241" + }, + { + "Package Name": "com.miui.cloudservice", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "1.12.0.1.25" + }, + { + "Package Name": "com.android.systemui.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.simplemobiletools.calendar", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.4.2" + }, + { + "Package Name": "com.milink.service", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14.4.2.0.876ac38.2809693" + }, + { + "Package Name": "com.android.thememanager", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.0.9.5" + }, + { + "Package Name": "com.miui.voiceassistoverlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.0" + }, + { + "Package Name": "com.android.inputsettings.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.miui.huanji", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "4.1.5" + }, + { + "Package Name": "com.android.phone.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.printspooler", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.duokan.reader", + "miui.permission.USE_INTERNAL_GENERAL_API": "false", + "usesNonSdkApi": false, + "Version Name": "7.31.85" + }, + { + "Package Name": "com.miui.systemui.devices.overlay", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.miui.otaprovision", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "13.1.07.26.1" + }, + { + "Package Name": "com.miui.newhome", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "6.0.08.0916" + }, + { + "Package Name": "com.xiaomi.misettings", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "2.9.9.60" + }, + { + "Package Name": "com.xiaomi.gamecenter", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": false, + "Version Name": "12.11.1.300" + }, + { + "Package Name": "com.miui.misound", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "2.0" + }, + { + "Package Name": "com.goolge.android.wifi.resources.xiaomi", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0" + }, + { + "Package Name": "com.android.providers.partnerbookmarks", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.miui.wallpaper.overlay.customize", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.mipay.wallet", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "6.62.0.4876.2147" + }, + { + "Package Name": "com.android.dynsystem", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "org.mipay.android.manager", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.221024" + }, + { + "Package Name": "com.tencent.soter.soterserver", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "1.0.221024.2" + }, + { + "Package Name": "com.sohu.inputmethod.sogou.xiaomi", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "10.32.21.202308282141" + }, + { + "Package Name": "com.android.hotspot2.osulogin", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.unionpay.tsmservice.mi", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "01.00.44" + }, + { + "Package Name": "com.google.android.cellbroadcastservice.overlay.miui", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "14" + }, + { + "Package Name": "com.android.externalstorage", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.youba.calculate", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.0.4" + }, + { + "Package Name": "com.android.server.telecom", + "miui.permission.USE_INTERNAL_GENERAL_API": "true", + "usesNonSdkApi": true, + "Version Name": "14" + }, + { + "Package Name": "com.miui.securityinputmethod", + "miui.permission.USE_INTERNAL_GENERAL_API": "", + "usesNonSdkApi": false, + "Version Name": "3.0.3" + } +] \ No newline at end of file diff --git a/agent_for_ui/agent_for_api/main_for_api.py b/agent_for_ui/agent_for_api/main_for_api.py new file mode 100644 index 0000000000000000000000000000000000000000..959aae1d7da4407a2363ff05586f25bd5a471312 --- /dev/null +++ b/agent_for_ui/agent_for_api/main_for_api.py @@ -0,0 +1,180 @@ +import requests +import subprocess +from agent_for_api.agent_api_prompt import * +from chatgpt import * +from agent_for_api.API_list import * +import socket +import argparse +import subprocess +import sys +import time +from appium import webdriver +from tqdm import tqdm +from agent_for_api.API_list import usr_api_list +from selenium.common.exceptions import WebDriverException, InvalidElementStateException, NoSuchElementException +# 选择api接口, 合成一个adb的指令, +def calculate(expression): # use a http api + try: + # 向计算器 API 发送 POST 请求 + api_url = "https://api.calculator.com/calculate" # 这个接口是外在接口,而不是手机内部的。 + data = {"expression": expression} + response = requests.post(api_url, json=data) + + # 解析 API 响应 + if response.status_code == 200: + result = response.json() + return result["result"] + else: + return "Error: Unable to calculate." + + except Exception as e: + return "Error: " + str(e) + +def contact_command(contact_number, message_body): + adb_command = [ + 'adb', 'shell', 'am', 'start', + '-a', 'android.intent.action.SENDTO', + '-d', 'sms:', f'{contact_number}', + '--es', 'sms_body', f'{message_body}' + ] + return adb_command + +def build_command(title, task_description, starttime, endtime): + adb_command = [ + 'adb', 'shell', 'am', 'start', + '-a', 'android.intent.action.INSERT', + '-t', 'vnd.android.cursor.item/event', + '-e', 'title', f'{title}', + '-e', 'begin', f'{starttime}', + '-e', 'end', f'{endtime}', + '--ei', 'allDay', '0', + '--es', 'description', f'{task_description}', + '--ez', 'hasAlarm', '1' + # '--ez', + # 'android.intent.extra.REFRESH', + # 'false' + ] + print(adb_command) + return adb_command + +def get_api_list(mode): + api_list = [] + if mode == 'usr': + api_list = usr_api_list + elif mode == 'system': + api_list = system_api_list + return api_list + +# 定义信息结构体列表 +history_actions = [] + +def get_memory(history_actions): + memory_list = [] + for round_number, action_info in enumerate(history_actions, 1): + action = action_info['action'] + memory_list.append(f"Round {round_number}: Action: {action}") + memory = "\n".join(memory_list) + return memory +def is_port_open(port): + try: + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + s.settimeout(1) + s.connect(('127.0.0.1', port)) + return False # 端口已被占用 + except (ConnectionRefusedError, socket.timeout): + return True # 端口可用 + +max_attempts = 5 # Set the maximum number of retry attempts +def open_driver(): + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) + success = True + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if not success: + print(f"Failed to connect after {max_attempts} attempts. Exiting program.") + driver.quit() + sys.exit() # Exit the program if connection is not successful + else: + print("[Device connected successfully!]") + return driver + + +# add contact person +if __name__ == '__main__': + desired_caps = { + "platformName": "Android", # 操作系统 + "deviceName": "emulator-5554", + "platformVersion": "14.0", + 'automationName': 'uiautomator2', + 'noReset': True, + 'unicodeKeyboard': True, + 'resetKeyboard': False, + # "skipServerInstallation": "false", + } + print("[start connected]") + # driver to connect to the emulator + driver = open_driver() + adb = 'adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.business_ui.useragreement.basicmode.BasicModeAgreementActivity -d "mimarket://agreement/basicmode"' + subprocess.run(adb) + driver.quit() + # task = '提醒我下午五点去接孩子,在红星幼儿园。' + # # 在ui和api之间抉择时,选定调用api作为下一个步骤。 + # # 获取当前页面的任务状态,他可能已经进行到中间步骤了。 + # + # # prompt = select_api_prompt.format(select_api_example=select_api_example, api_list=get_api_list('usr'), task=task) + # # # print(prompt) + # # res = chatgpt(prompt) + # # print("adb command: ", res) + # # 解析api&参数 + # ''' + # 这部分是将api包装成adb指令,然后运行,adb的缺陷是动作完成后普遍需要用户确认。 + # ''' + # # adb_command = res + # # + # command = "adb shell am start -n com.traveloka.android/.appentry.splash.SplashActivity" + # # 使用subprocess执行ADB命令 + # result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + # + # # 获取标准输出 + # stdout = result.stdout + # print("stdout: ", stdout) + # # 获取标准错误 + # stderr = result.stderr + # print("stderr: ", stderr) + # if not stderr: + # print("api correct") + # # 获取返回代码 + # return_code = result.returncode + # print("return_code: ", return_code) + # + + # url = 'http://127.0.0.1:12345' + # data = { + # "apiName": "---", + # "params": { + # "noteKey": "----", + # "noteContent": "----" + # } + # } + # + # ''' + # 这部分是将api和参数包装成url包,发给我们自定义的apk + # ''' + # try: + # response = requests.post(url, json=data) + # print("Response Status:", response.status_code) + # print("Response Body:", response.text) + # except requests.exceptions.RequestException as e: + # print("Error:", e) + # + # # port_to_check = 12345 # 你要检查的端口 + # # if is_port_open(port_to_check): + # # print(f"Port {port_to_check} is available.") + # # else: + # # print(f"Port {port_to_check} is already in use.") \ No newline at end of file diff --git a/agent_for_ui/agent_html_prompt.py b/agent_for_ui/agent_html_prompt.py new file mode 100644 index 0000000000000000000000000000000000000000..d12b10a1ede5fc8ae1123b2e79da612b99567e9f --- /dev/null +++ b/agent_for_ui/agent_html_prompt.py @@ -0,0 +1,865 @@ +# maybe we can use the guidance format +# DengSHIHAN write this prompt for test. +actions_making_prompt = ''' +You are a large language model agent stored on a mobile phone, You need to give the current one-step action that needs to be taken to complete the task. +Below I will provide you with a task, a plan, the actionspace of the current page, action history, thought about the next action. +You need to select the most suitable one element and give the corresponding one action based on the actionspace and thought. +Your selection should also consider action history, and have the courage to try new buttons instead of the same buttons from history. +You just need to give the object number. There are four directions for scrolling, and you need to choose one of them. +Action can only be the following three functions: + 1.click(number) + 2.input(number, text) + 3.scroll(number,up)|scroll(number,down)|scroll(number,left)|scroll(number,right) +------Below is examples: +{actions_making_example} +------examples ended + +REMEMBER: +1.Click and input have higher priority than scrolling. Scrolling is only considered when all elements of the current interface are indeed irrelevant to the task. +2.When you fail to try repeatedly in one interface, maybe you can try to turn back to select other options. +3.When you need to switch apps, you need to return to the HOME page first. +4.When you find that the current page does not have the APP you want, you need to scroll left and right to find more APPs. + +Let's Begin! +[Task description]: {task_description} +[Planning]: {planning} +[Action Space]: {action} +[Actions history]: {memory} +[Thought]: {thought} +[Answer]: The only action that should be taken below is: +''' + + +actions_making_example = ''' +Example 1: +[Task description]: Calculate 9.5×5+2 +[Planning]: Open a computing-related application and click the buttons one by one. +[Action Space]: +[Clickables]: + 1: 小窗 + 2: 计算 + 3: 换算 + 6: 清除 + 7: 7 + 8: 4 + 9: 1 +10: 切换 +11: 退格 +12: 8 +13: 5 +14: 2 +15: 0 +16: 百分号 +17: 9 +18: 6 +19: 3 +20: 小数点 +21: 除 +22: 乘 +23: 减 +24: 加 +25: 等于 +[Scrollables]: +4: Empty androidx.viewpager.widget.OriginalViewPager ([0,231][1080,2280]) +[Inputs]: +5: 0 +[Actions history]: +adb shell am start -n com.cleveni.app.calculator/com.cleveni.app.calculator.MainActivity +click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +click(<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true"> . </p>) +click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true"> </img>) +[Thought]: Calculate 9.5×5+2, I have clicked on 9.5 and the multiplication sign, now I should click on 5. +[Answer]: click(13) + +Example 2: +[Task description]: Write a note for me, title: Sunday, content: Complete the work and finish the file +[Planning]: Open the calendar, create a new event, fill in the title: Sunday, fill in the content: Complete the work and finish the file. +[Action Space] +[Clickables]: + 3: 7月4日 上午11:55 + 4: 0字 + 5: 开始书写或 + 6: mind_map + 7: 创建思维笔记 + 8: Empty android.widget.TextView + 9: 录音 +10: 添加图片 +11: 涂鸦 +12: 任务列表 +13: 展开富文本编辑 +14: 返回 +15: 撤销 +16: 恢复 +17: 完成编辑 +[Scrollables]: +1: 小米笔记 ([0,231][1080,1232]) +[Inputs]: +2: 标题 +[Thought]: I clicked on voice input, but my device doesn't support this feature, so I need to use another input method, such as manual ways to input sunday. +[Answer]: input(2,Sunday) + +Example 3: +[Task description]: Help me set an Write a memorandum for me on November 23, title: work, content: Complete the work and finish the file. +[Planning]: Open the calendar, create a new event, fill in the title: work, fill in the content: Complete the work and finish the file. +[Action Space]: +[Clickables]: + 2: 11:51 + 3: 7月4日 + 4: 周四 + 5: 点击获取数据 + 6: 天气 + 7: 小米商城 + 8: 小米商城 + 9: 小米视频 +10: 小米视频 +11: 游戏中心 +12: 游戏中心 +13: 应用商店 +14: 应用商店 +15: 设置 +16: 设置 +17: 相册 +18: 相册 +19: 手机管家 +20: 手机管家 +21: 笔记 +22: 笔记 +24: 智能助理 +25: 第1屏 +26: 第2屏 +28: 电话 +29: 短信 +30: 浏览器 +31: 相机 +[Scrollables]: + 1: Empty com.miui.home.launcher.ScreenView ([0,0][1080,2280]) +23: Empty com.miui.home.launcher.ScreenView ([0,1909][1080,1962]) +27: Empty com.miui.home.launcher.ScreenView ([11,1972][1069,2155]) +[Actions history]: None +[Thought]: I need to find and open the calendar first. +[Answer]: scroll(1,left) +''' + +''' +Example 3: +[Task description]: Help me set an alarm clock for five o'clock. +[Planning]: Turn on the clock, set an alarm, and adjust the time to five o'clock. +[UI information]: +<button id="android:id/button1" class="android.widget.Button" description="取消" clickable="true"> </button> +<p id="android:id/title" class="android.widget.TextView" clickable="false"> 添加闹钟 </p> +<p id="com.android.deskclock:id/alarm_in_future" class="android.widget.TextView" clickable="false"> 23小时56分钟后响铃 </p> +<button id="android:id/button2" class="android.widget.Button" description="确定" clickable="true"> </button> +<div id="com.android.deskclock:id/amPm" class="com.android.deskclock.widget.NumberPicker" descript ion="下午" clickable="true" scrollable="true" bounds="[31,319][369,1036]"> 1.0 </div> +<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" descript ion="12时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 12.0 </div> +<div id="com.android.deskclock:id/minute" class="com.android.deskclock.widget.NumberPicker" descript ion="11分" clickable="true" scrollable="true" bounds="[710,319][1049,1036]"> 11.0 </div> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 铃声 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 元素动态铃声 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 重复 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 只响一次 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃时振动 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃后删除此闹钟 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 备注 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 请输入 </p> +[Actions history]: +click(<img id="com.miui.home:id/icon_icon" class="android.widget.ImageView" description="时钟" clickable="true"> </img>) +click(<img id="com.android.deskclock:id/end_btn2" class="android.widget.ImageButton" description="添加闹钟" clickable="true"> </img>) +click(<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" description="11时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 11.0 </div>) +[Thought]: What I need is 5, the current page is 11, so I need to slide the page until it is 5 +[Answer]: scroll([359,558][359,797]) + +Example: +Task description: Calculate 9×5+2 +UI information: +<img class="android.widget.ImageView" description="小窗" clickable="true" scrollable="false" bounds="[55,143][165,253]"> </img> +<p class="android.widget.TextView" clickable="true" scrollable="false" bounds="[398,158][508,238]"> 计算 </p> +<p class="android.widget.TextView" clickable="true" scrollable="false" bounds="[572,158][682,238]"> 换算 </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" description="更多选项" clickable="true" scrollable="false" bounds="[926,143][1036,253]"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" description="0" clickable="true" scrollable="false" bounds="[58,887][1022,1083]"> </div> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" description="清除" clickable="true" scrollable="false" bounds="[76,1149][275,1347]"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[76,1391][275,1589]"> 7 </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[76,1633][275,1832]"> 4 </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[76,1876][275,2075]"> 1 </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" description="切换" clickable="true" scrollable="false" bounds="[76,2119][275,2318]"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" description="退格" clickable="true" scrollable="false" bounds="[319,1149][518,1347]"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,1391][518,1589]"> 8 </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,1633][518,1832]"> 5 </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,1876][518,2075]"> 2 </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,2119][518,2318]"> 0 </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" description="百分号" clickable="true" scrollable="false" bounds="[562,1149][761,1347]"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1391][761,1589]"> 9 </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1633][761,1832]"> 6 </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1876][761,2075]"> 3 </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true" scrollable="false" bounds="[562,2119][761,2318]"> . </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" description="除" clickable="true" scrollable="false" bounds="[805,1149][1004,1347]"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true" scrollable="false" bounds="[805,1391][1004,1589]"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" description="减" clickable="true" scrollable="false" bounds="[805,1633][1004,1832]"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" description="加" clickable="true" scrollable="false" bounds="[805,1876][1004,2075]"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" description="等于" clickable="true" scrollable="false" bounds="[805,2119][1004,2318]"> </img> + +Actions history: none +Answer: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1391][761,1589]"> 9 </p>) + +Example 3: +Task description: Calculate 9×5+2 +UI information: +<img class="android.widget.ImageView" alt="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算, </p> +<p class="android.widget.TextView" clickable="true"> 换算, </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" alt="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" alt="9.5×5" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" alt="= 47.5" clickable="true"> = 47.5, </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" alt="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7, </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4, </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1, </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" alt="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" alt="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8, </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0, </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" alt="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6, </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3, </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" alt="小数点" clickable="true"> ., </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" alt="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" alt="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img> +Actions history: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Answer: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +''' +''' +Example 4: +Task description: Write a note for me, title: Sunday, content: Complete the work and finish the file +UI information: +<div class="android.widget.FrameLayout" clickable="false"> </div> +<img id="com.miui.notes:id/home" class="android.widget.ImageView" alt="返回" clickable="true"> </img> +<div class="android.view.View" clickable="false"> </div> +<img id="com.miui.notes:id/undo" class="android.widget.ImageView" alt="撤销" clickable="true"> </img> +<img id="com.miui.notes:id/redo" class="android.widget.ImageView" alt="恢复" clickable="true"> </img> +<img id="com.miui.notes:id/done" class="android.widget.ImageView" alt="完成编辑" clickable="true"> </img> +<input class="android.widget.EditText" clickable="true"> Sunday </input> +<p class="android.widget.TextView" clickable="true"> 11月10日 上午9:35 </p> +<p class="android.widget.TextView" clickable="true"> 0字 </p> +<p class="android.widget.TextView" clickable="true"> 开始书写或 </p> +<img class="android.widget.Image" clickable="true"> mind_map </img> +<p class="android.widget.TextView" clickable="true"> 创建思维笔记 </p> +<p class="android.widget.TextView" clickable="true"> </p> +<div id="com.miui.notes:id/mix_view" class="android.view.View" clickable="true"> </div> +<img id="com.miui.notes:id/audio" class="android.widget.ImageView" alt="录音" clickable="true"> </img> +<img id="com.miui.notes:id/gallery" class="android.widget.ImageView" alt="添加图片" clickable="true"> </img> +<img id="com.miui.notes:id/edit_image" class="android.widget.ImageView" alt="涂鸦" clickable="true"> </img> +<img id="com.miui.notes:id/check" class="android.widget.ImageView" alt="任务列表" clickable="true"> </img> +<img id="com.miui.notes:id/rich_text_switch" class="android.widget.ImageView" alt="展开富文本编辑" clickable="true"> </img> +<div id="com.miui.notes:id/panel_divide" class="android.view.View" clickable="true"> </div> +<div id="com.miui.notes:id/navi_placeholder" class="android.view.View" clickable="true"> </div> +Actions history: +Action: {'click(<img id="com.miui.notes:id/content_add" class="android.widget.ImageView" alt="点击创建文字,长按录入语音,松手完成录音并创建,手指上滑取消录音" clickable="true"> </img>)'} +Action: {'action': 'input(<input class="android.widget.EditText" clickable="true"> 标题 </input>, Sunday)'} +Answer: input(<p class="android.widget.TextView" clickable="true"> 开始书写或 </p>, Complete the work and finish the file) +''' + +html_ui_understanding = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with an environment of the current mobile phone interface. +Please tell me the information contained in this html interface. +''' +html_ui_examples = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with an environment of the current mobile phone interface. +<img id=17 class="com.miui.calculator:id/btn_c_s" alt="清除" clickable="true"> </img> +<button id=17 class="com.miui.calculator:id/digit_7" clickable="true"> 7 </button> +<button id=17 class="com.miui.calculator:id/digit_4" clickable="true"> 4 </button> +Please tell me the information contained in this html interface. +Answer: There is a picture that says "Clear" and two buttons representing 4 and 7. +''' + +# ------------------------------------------------------------------------------------------------------- +app_selection_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, the environment of the current mobile phone interface(Apps information). +Please help me choose the correct app to perform the task based on the Apps information. +On this basis, you should make a simple plan for completing the task. +[Apps information]: +{apps_information} + +----Below are some examples: +{app_selection_example} +----examples ended + +[Task description]: {task_description} +[Answer]: +''' +app_selection_example = ''' +Example 1: +[Task description]: Read the latest message. +[Answer]: I should open Messages before I can view recent text messages, then using this one application should be enough. + +Example 2: +[Task description]: Calculate 7*2.2/4+1 +[Answer]: I should open ClevCalc because this is an application directly related to the calculator and since the task only involves calculations, then using this one application should be enough. + +Example 3: +[Task description]: I want to go to Wuhan next week. Please help me determine the specific travel time and method. The information you collect can be saved on my phone for easy review by me. +[Answer]: To determine the time and mode of travel, I should at least check the air tickets or train tickets and hotel conditions on Traveloka, and check the weather conditions for the next few days on Weather. Because the collected information needs to be stored on the mobile phone, I will take screenshots of the necessary air and train ticket information and write the most recommended solution in a memo. +''' + +# Base passrate +# ------------------------------------------------------------------------------------------------------- +Task_finish_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, +the environment of the current mobile phone interface(UI information), historical action information, thoughts on the current situation. +You need to judge whether the current task has been completed based on the current environment and action history. +If the "Thought" answer indicates that there are no further actions to finish, this means the task is completed. + +----Below are the examples: +{task_finish_example} +----examples ended + +[Task description]: {task_description} +[UI information]: {ui_information} +[Actions history]: {memory} +[Thought]:{thought} +[Question]: Is the task completed? +[Answer]: +''' +Task_finish_example = ''' +Example 1: +[Task description]: Calculate 9×5+2 +[UI information]: +<img class="android.widget.ImageView" alt="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算, </p> +<p class="android.widget.TextView" clickable="true"> 换算, </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" alt="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" alt="9×5+2" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" alt="= 47" clickable="true"> = 47, </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" alt="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7, </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4, </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1, </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" alt="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" alt="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8, </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0, </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" alt="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6, </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3, </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" alt="小数点" clickable="true"> ., </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" alt="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" alt="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img> +[Actions history]: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +Action: click(<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p>) +Action: click(<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img>) +[Thought]: I have already calculate 9×5+2 = 47, there is no need for any further action. +[Question]: Is the task completed? +[Answer]: Yes, the task is completed. + +Example 2: +[Task description]: Calculate 9×5+2 +[UI information]: +<img class="android.widget.ImageView" alt="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算, </p> +<p class="android.widget.TextView" clickable="true"> 换算, </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" alt="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" alt="9×5" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" alt="= 45" clickable="true"> = 47, </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" alt="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7, </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4, </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1, </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" alt="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" alt="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8, </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0, </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" alt="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6, </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3, </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" alt="小数点" clickable="true"> ., </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" alt="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" alt="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img> +[Actions history]: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +[Thought]: I have already calculate 9×5, next I will click +. +[Question]: Is the task completed? +Answer: No, the task is not completed. +''' + +# ------------------------------------------------------------------------------------------------------- +Thought_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, a plan, +the environment of the current mobile phone interface before action (Previous UI information), action history, the environment of the current mobile phone interface(Now UI information). +Action history records completed operations, including click, input, scroll and api_call. +You need to summarize these four aspects: changes in the UI page, task progress, actions that have been completed, one next action based on UI information and action history. +[Action History] are all previous historical actions, and [current action] is the current action that causes the UI page to change. +[task progress] Where in the plan is the current page? +[One next action] You need to choose one among click, input, scroll and one api as the next action, and give one and only one operation object. +[One next action] Strictly refer to [current action] and [action history] result to do the next action. +Additional information: If you want to play history records in Ximalaya, you need to open Ximalaya, click "My", view the playback records under the "My" page, and select the most recent one to play. +------Below are examples: +{thought_example} +------examples ended + +Let's Begin! +[Task description]: {task_description} +[Planning]: {planning} +[Previous UI information]: {ui_information} +[Now UI information]: {now_ui_information} +[Action History]: {action_history} +[Current Action]:{action} +[Answer]: +''' +Thought_example = ''' +Example 1: +[Task description]: I'm going to travel from chengdu to Beijing next week. Please help me determine the flight and specific time. +[Planning]: Open the travel APP, check flight from chengdu to beijing, sort by price, take a screenshot, then open Google search, search and check the weather conditions in Beijing next week. + +[Previous UI information]: <button id="com.traveloka.android:id/toolbar_left" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android:id/text_view_toolbar_title" class="android.widget.TextView" clickable="false"> Flights </p> +<button id="com.traveloka.android:id/toolbar_right" class="android.widget.ImageButton" clickable="true"> </button> +<div id="com.traveloka.android.flight:id/layout_scroll" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,210][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/text_owrt" class="android.widget.TextView" clickable="true"> One-way / Round-trip </p> +<p id="com.traveloka.android.flight:id/text_mc" class="android.widget.TextView" clickable="true"> Multi-city </p> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> From </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> To </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Beijing (BEIA) </input> +<button id="com.traveloka.android.flight:id/btn_swap" class="android.widget.ImageButton" description="flight_searchform_button_swap" clickable="true"> </button> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Departure Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Wednesday, 29 Nov 2023 </input> +<p id="com.traveloka.android.flight:id/text_rt" class="android.widget.TextView" clickable="false"> Round-trip? </p> +<div id="com.traveloka.android.flight:id/switch_rt" class="android.widget.Switch" description="flight_searchform_button_roundtrip" clickable="true"> </div> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Return Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Passengers </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> 1 passenger </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Seat Class </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Economy </input> +<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button> +<p id="com.traveloka.android.flight:id/flight_searchform_textview_recent_search" class="android.widget.TextView" clickable="false"> Your Recent Searches </p> +<div id="com.traveloka.android.flight:id/flight_searchform_recyclerview_recent_search" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,1711][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/textview_search" class="android.widget.TextView" clickable="true"> Search </p> +<p id="com.traveloka.android.flight:id/textview_discover" class="android.widget.TextView" clickable="true"> Discover </p> + +[Now UI information]: <button id="com.traveloka.android.flight:id/image_arrow_back" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android.flight:id/text_title" class="android.widget.TextView" clickable="true"> Chengdu (CTUA) Beijing (BEIA) </p> +<p id="com.traveloka.android.flight:id/text_subtitle" class="android.widget.TextView" clickable="true"> Wed, 29 Nov • 1 pax • Economy </p> +<div id="com.traveloka.android.flight:id/recycler_date" class="androidx.recyclerview.widget.RecyclerView" clickable="true" scrollable="true" bounds="[0,215][954,387]"> </div> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Mon, 27 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Tue, 28 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Wed, 29 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> USD 81.49 </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Thu, 30 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Fri, 1 Dec </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<div id="com.traveloka.android.flight:id/recycler" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,387][1080,1857]"> </div> +<p id="com.traveloka.android.flight:id/quick_filter_item_name" class="android.widget.TextView" clickable="true"> Smart Combo </p> +<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_departure_time" class="android.widget.TextView" clickable="true"> 20:30 </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 45m </p> +<p id="com.traveloka.android.flight:id/text_reduced_price" class="android.widget.TextView" clickable="true"> USD 81.49 </p> +<p id="com.traveloka.android.flight:id/text_real_price" class="android.widget.TextView" clickable="true"> USD 84.05/pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_time" class="android.widget.TextView" clickable="true"> 23:15 </p> +<p id="com.traveloka.android.flight:id/text_departure_airport_code" class="android.widget.TextView" clickable="true"> CTU </p> +<p id="com.traveloka.android.flight:id/text_number_of_transit" class="android.widget.TextView" clickable="true"> Direct </p> +<p id="com.traveloka.android.flight:id/text_reduced_price_per_pax" class="android.widget.TextView" clickable="true"> /pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_airport_code" class="android.widget.TextView" clickable="true"> PKX </p> +<p id="com.traveloka.android:id/promo_name" class="android.widget.TextView" clickable="true"> Smart Combo </p> +<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_departure_time" class="android.widget.TextView" clickable="true"> 07:20 </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 40m </p> +<p id="com.traveloka.android.flight:id/text_reduced_price" class="android.widget.TextView" clickable="true"> USD 102.53 </p> +<p id="com.traveloka.android.flight:id/text_real_price" class="android.widget.TextView" clickable="true"> USD 104.47/pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_time" class="android.widget.TextView" clickable="true"> 10:00 </p> +<p id="com.traveloka.android.flight:id/text_departure_airport_code" class="android.widget.TextView" clickable="true"> CTU </p> +<p id="com.traveloka.android.flight:id/text_number_of_transit" class="android.widget.TextView" clickable="true"> Direct </p> +<p id="com.traveloka.android.flight:id/text_reduced_price_per_pax" class="android.widget.TextView" clickable="true"> /pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_airport_code" class="android.widget.TextView" clickable="true"> PKX </p> +<p id="com.traveloka.android:id/promo_name" class="android.widget.TextView" clickable="true"> Smart Combo </p> +<p id="com.traveloka.android.flight:id/text_title" class="android.widget.TextView" clickable="true"> Be the first to know when prices drop! </p> +<p id="com.traveloka.android.flight:id/text_description" class="android.widget.TextView" clickable="true"> Create a price alert and we’ll let you know as soon as prices have dropped significantly. </p> +<p id="com.traveloka.android.flight:id/text_button_action" class="android.widget.TextView" clickable="true"> Create Price Alert </p> +<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 25m </p> +<p id="com.traveloka.android.flight:id/text_real_price" class="android.widget.TextView" clickable="true"> USD 118.11/pax </p> +<div id="com.traveloka.android.flight:id/container_pill" class="android.widget.HorizontalScrollView" clickable="true" scrollable="true" bounds="[0,1709][950,1857]"> </div> +<p id="com.traveloka.android.flight:id/pill_title" class="android.widget.TextView" clickable="true"> Stops </p> +<p id="com.traveloka.android.flight:id/pill_title" class="android.widget.TextView" clickable="true"> Airlines </p> +<p id="com.traveloka.android.flight:id/pill_title" class="android.widget.TextView" clickable="true"> Time </p> +<p id="com.traveloka.android.flight:id/pill_sort_title" class="android.widget.TextView" clickable="true"> Cheapest </p> +<p id="com.traveloka.android:id/button_text" class="android.widget.TextView" clickable="true"> Filter </p> + +[Action History]: +{'[Action]': 'click(<p class="android.widget.TextView" description="Traveloka" clickable="true"> Traveloka </p>)'} +{'[Action]': 'click(<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Flights </p>)'} +{'[Action]': 'click(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Thursday, 23 Nov 2023 </input>)'} +{'[Action]': 'click(<div id="com.traveloka.android:id/calendar_date_text" class="android.view.View" description="19" clickable="true"> </div>)'} +{'[Action]': 'click(<div id="com.traveloka.android:id/calendar_date_text" class="android.view.View" description="26" clickable="true"> </div>)'} +{'[Action]': 'click(<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button>)'} + +[Current Action]: {'[Action]': 'click(<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button>)'} + +[Answer]: +Changes: I clicked "Search" button. The page changes from the flight search page to the flight search results page. The page contains two flight information from Chengdu to Beijing. +Actions Complete: I have opened traveloka app, clicked "flight" button, filled the form and clicked the "search" button. +Task progress: The current mission progress is check flight from chengdu to beijing. +One next action: Click on the cheapest flight to see more detailed information. + +Example 2: +[Task description]: I'm going to travel from chengdu to Beijing next week. Please help me determine the flight and specific time. +[Planning]: Open the travel APP, check flight from chengdu to beijing, sort by price, take a screenshot, then open Google search, search and check the weather conditions in Beijing next week. + +[Previous UI information]: +<button id="com.traveloka.android:id/toolbar_left" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android:id/text_view_toolbar_title" class="android.widget.TextView" clickable="false"> Flights </p> +<button id="com.traveloka.android:id/toolbar_right" class="android.widget.ImageButton" clickable="true"> </button> +<div id="com.traveloka.android.flight:id/layout_scroll" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,210][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/text_owrt" class="android.widget.TextView" clickable="true"> One-way / Round-trip </p> +<p id="com.traveloka.android.flight:id/text_mc" class="android.widget.TextView" clickable="true"> Multi-city </p> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> From </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> To </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Beijing (BEIA) </input> +<button id="com.traveloka.android.flight:id/btn_swap" class="android.widget.ImageButton" description="flight_searchform_button_swap" clickable="true"> </button> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Departure Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android.flight:id/text_rt" class="android.widget.TextView" clickable="false"> Round-trip? </p> +<div id="com.traveloka.android.flight:id/switch_rt" class="android.widget.Switch" description="flight_searchform_button_roundtrip" clickable="true"> </div> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Return Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Passengers </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> 1 passenger </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Seat Class </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Economy </input> +<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button> +<p id="com.traveloka.android.flight:id/flight_searchform_textview_recent_search" class="android.widget.TextView" clickable="false"> Your Recent Searches </p> +<div id="com.traveloka.android.flight:id/flight_searchform_recyclerview_recent_search" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,1711][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/textview_search" class="android.widget.TextView" clickable="true"> Search </p> +<p id="com.traveloka.android.flight:id/textview_discover" class="android.widget.TextView" clickable="true"> Discover </p> + +[Now UI information]: +<button id="com.traveloka.android:id/toolbar_left" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android:id/text_view_toolbar_title" class="android.widget.TextView" clickable="false"> Flights </p> +<button id="com.traveloka.android:id/toolbar_right" class="android.widget.ImageButton" clickable="true"> </button> +<div id="com.traveloka.android.flight:id/layout_scroll" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,210][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/text_owrt" class="android.widget.TextView" clickable="true"> One-way / Round-trip </p> +<p id="com.traveloka.android.flight:id/text_mc" class="android.widget.TextView" clickable="true"> Multi-city </p> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> From </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> To </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Beijing (BEIA) </input> +<button id="com.traveloka.android.flight:id/btn_swap" class="android.widget.ImageButton" description="flight_searchform_button_swap" clickable="true"> </button> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Departure Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android.flight:id/text_rt" class="android.widget.TextView" clickable="false"> Round-trip? </p> +<div id="com.traveloka.android.flight:id/switch_rt" class="android.widget.Switch" description="flight_searchform_button_roundtrip" clickable="true"> </div> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Return Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Passengers </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> 1 passenger </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Seat Class </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Economy </input> +<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button> +<p id="com.traveloka.android.flight:id/flight_searchform_textview_recent_search" class="android.widget.TextView" clickable="false"> Your Recent Searches </p> +<div id="com.traveloka.android.flight:id/flight_searchform_recyclerview_recent_search" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,1711][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/textview_search" class="android.widget.TextView" clickable="true"> Search </p> +<p id="com.traveloka.android.flight:id/textview_discover" class="android.widget.TextView" clickable="true"> Discover </p> + +[Action History]: +{'[Action]': 'click(<p class="android.widget.TextView" description="Traveloka" clickable="true"> Traveloka </p>)'} +{'[Action]': 'click(<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Flights </p>)'} +{'[Fail]: InvalidElementStateException action': 'input(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input>, Chengdu (CTUA))'} + +[Current action]:{'[Action]': 'input(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input>, Chengdu (CTUA))'} + +[Answer]: +Changes: The current page is the flight search form page in the Traveloka app. And There is no change between two pages. +Task progress: From the current action and action history, I am currently on the flight search form page, ready to search for flights from Chengdu to Beijing. +Actions completed: From the current action and action history, I have opened the traveloka app and clicked the flight button to search for flights +One next action: Because the operation of inputting information in Chengdu (CTUA) failed, I will try other operations, such as clicking Chengdu (CTUA) first. The one next action I will do is click "Chengdu (CTUA)" button to select departure city. +''' + +''' + +Example 3: +Task description: Help me set an alarm clock for five o'clock. +Planning: Open the clock, create a new alarm clock, and set the time to five o'clock. +Previous UI information: +<button id="android:id/button1" class="android.widget.Button" description="取消" clickable="true"> </button> +<p id="android:id/title" class="android.widget.TextView" clickable="false"> 添加闹钟 </p> +<p id="com.android.deskclock:id/alarm_in_future" class="android.widget.TextView" clickable="false"> 23小时56分钟后响铃 </p> +<button id="android:id/button2" class="android.widget.Button" description="确定" clickable="true"> </button> +<div id="com.android.deskclock:id/amPm" class="com.android.deskclock.widget.NumberPicker" descript ion="下午" clickable="true" scrollable="true" bounds="[31,319][369,1036]"> 1.0 </div> +<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" descript ion="12时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 12.0 </div> +<div id="com.android.deskclock:id/minute" class="com.android.deskclock.widget.NumberPicker" descript ion="11分" clickable="true" scrollable="true" bounds="[710,319][1049,1036]"> 11.0 </div> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 铃声 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 元素动态铃声 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 重复 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 只响一次 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃时振动 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃后删除此闹钟 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 备注 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 请输入 </p> +[Action]: +Action: click(<img id="com.miui.home:id/icon_icon" class="android.widget.ImageView" description="时钟" clickable="true"> </img>) +Action: click(<img id="com.android.deskclock:id/end_btn2" class="android.widget.ImageButton" description="添加闹钟" clickable="true"> </img>) +Action: click(<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" description="11时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 11.0 </div>) +[Answer]: I need to set the hour to five. In the last step, I tried to click on the eleven hours, but it seems that the element can't be click, now I will try to scroll the element to set the hour to five. +''' + +passrate_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, a system logcat. +You need to judge whether the task is completed based on the system logcat. +Task: {task} +Logcat: {logcat} +Ans: +''' + +action_type_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, a plan to accomplish the task, a next action thought, and actions finished history. +Your task is to determine whether the task is finished based on the action history, and if the task is not finished, you need to consider the next action type based on thought. +The main reference you need is thought. If it is clearly stated that click, enter, scroll, then you should not select adb as the next action category. +You have two action categories to choose from, adb or ui action. + 1. adb: If there is an ADB API that can accomplish the action specified in thought + 2. ui action: If you judge that you are already inside an app, you should select ui action to interact with the app. +Remember, your answer should including be one of the following three: "task is finished", "task is not ended, the next action type is adb" or "task is not finished, the next action type is ui action". + +------Below are examples: +{action_type_example} +------examples ended + +[Task description]: {task_description} +[Planning]: {planning} +[Thought]: {thought} +[ADB API]: {adb_api} +[Action History]: {action_history} +[Answer]: +''' + + +action_type_example = ''' +Example 1: +[Task description]: Help me set an alarm clock for five o'clock. +[Planning]: Open the clock, create a new alarm clock, and set the time to five o'clock. +[Thought]: +I need to set the hour to five. In the last step, I tried to click on the eleven hours, but it seems that the element can't be click, now I will try to scroll the element to set the hour to five. +[ADB API]: +{ + "ADB Command": "adb shell am start -a android.intent.action.SET_ALARM --ei android.intent.extra.alarm.HOUR <x> --ei android.intent.extra.alarm.MINUTES <y>", + "Function Description": "Triggers an intent to open the alarm clock application with a pre-filled time for setting a new alarm.", + "Parameter Information": "Replace <x> with the hour and <y> with the minutes for the alarm time. For example, for an alarm set at 7:15, <x> would be 7 and <y> would be 15." + }, + { + "ADB Command": "adb shell am start -n com.android.deskclock/.DeskClockTabActivity\n", + "Function Description": "启动时钟到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.EDIT -d deskclock://details/edit", + "Function Description": "编辑世界时钟", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d deskclock://deskclock.android.com/main/SettingsActivity", + "Function Description": "打开时钟设置,铃声、音量、响铃时长", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.android.deskclock.shortcut.START_TIMER", + "Function Description": "启动计时器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.android.deskclock.shortcut.STOP_WATCH", + "Function Description": "启动秒表", + "Parameter Information": "No additional parameters required." + } +[Action history]: +Action: click(<img id="com.miui.home:id/icon_icon" class="android.widget.ImageView" description="时钟" clickable="true"> </img>) +Action: click(<img id="com.android.deskclock:id/end_btn2" class="android.widget.ImageButton" description="添加闹钟" clickable="true"> </img>) +Action: click(<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" description="11时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 11.0 </div>) +[Answer]: The task is not finished, There is no action in the API that can handle click on the eleven hours, so the next action category is UI action + +Example 2: +[Task description]: Calculate 9×5+2 +[Planning]: I should turn on my computer and click key by key. +[Thought]: I have already calculate 9×5+2 = 47, there is no need for any further action. +[ADB API]: +{ + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } +[Action history]: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +Action: click(<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p>) +Action: click(<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img>) +[Answer]: Yes, in history i have already click 9*5+2= ,the task is ended. + +Example 3: +[Task description]: Read the latest message. +[Planning]: I should open Messages before I can view recent text messages, then using this one application should be enough. +[Thought]: +I am on the home page and I should open Messages first. +[ADB API]: +{ + "ADB Command": "adb shell am start -n com.android.mms/.ui.MmsTabActivity\n", + "Function Description": "短信打开主界面", + "Parameter Information": "无额外参数要求" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -n com.android.mms/.ui.ComposeMessageRouterActivity --es sms_body \"消息内容\"", + "Function Description": "此命令仅用于发送纯文本消息", + "Parameter Information": "消息内容 替换为要发送的消息内容" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.mms/.ui.ComposeMessageRouterActivity -d \"sms://\" --es address \"电话号码\"", + "Function Description": "此命令用于查看或发送SMS消息", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a miui.intent.action.APP_SETTINGS -n com.android.mms/.ui.MessagingPreferenceActivity", + "Function Description": "此命令打开短信应用的设置界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.mms/.ui.ManageSimMessages", + "Function Description": "此命令用于管理SIM卡上的短信", + "Parameter Information": "No additional parameters required." + } +[Action history]: There is no action yet. +[Answer]: The task is just begin, I can use adb shell am start -n com.android.mms/.ui.MmsTabActivity to open the SMS main interface, So the next action type is adb. +''' + +generate_commands = ''' +假设你是最优秀的手机智能助手,我需要你协助我完成以下任务。 +你将会被提供一组用户动作交互历史,每个交互描述中包含动作和当前页面信息; +根据历史你需要猜测用户在完成的任务是什么?告诉我任务描述。 +你的回答需要满足以下两个要求: + 1. 任务描述不要过于冗长,请尽可能包含动作历史中的信息,尽可能考虑每个动作的必要性。 + 2. 不要回答和任务无关的其他内容。 +------下面是一组例子: +{command_example} +------例子结束 + +------以下是你需要回答的任务: +[历史动作]: {action_history} +[任务指令]: +''' + + +command_example = ''' +例子1: +[历史动作]: +1. 用户在电子商务平台的首页浏览,通过滚动屏幕查看不同的商品分类和推荐商品。 +2. 继续滚动屏幕,用户专注于“运动”类别,查看相关的商品和促销信息。 +3. 用户在浏览过程中,注意到特定的产品推荐,如“干性肌肤粉底液”和相关的促销广告。 +4. 最后,用户点击“首页”按钮,可能是为了重新定位到应用的主界面或刷新页面以查看新的促销和商品推荐。 +[任务指令]: +查看“运动”和“女装”中包含的商品,查看结束后请确保返回首页。 + +例子2: +[历史动作]: +1. 用户点击“运动休闲鞋”分类,表明他们对购买此类鞋子感兴趣。 +2. 用户进一步细化搜索,点击“女童”选项,显示出对特定人群(女童)的运动休闲鞋感兴趣。 +3. 用户关注商品的特定功能,点击“减震”选项,表明他们在寻找具有减震功能的运动鞋。 +[任务指令]: +为女童寻找具有减震功能的运动休闲鞋。 + +例子3: +[历史动作]: +1. 用户选择点击“面膜”类别,进入相关产品页面。 +2. 在面膜产品页面,用户看到不同功效的分类标签,选择点击“淡纹紧致”标签,以筛选出具有该特定功效的面膜产品。 +3. 在“淡纹紧致”面膜的搜索结果中,用户浏览了不同品牌和价格的面膜,选择点击“睡眠免洗面膜榜”进入该类别的热销榜页面。 +4. 在“睡眠免洗面膜榜”页面,用户查看了根据销量和销售指标综合排序的热销产品,界面设计使用户能够快速了解热门商品和推荐产品。 +[任务指令]: +给我推荐具有淡纹紧致功能的睡眠面膜,此外,参考排行榜是必要的。 +''' +template = ''' +假设你是最优秀的手机智能助手,我需要你协助我完成以下任务。 +输入格式是: +你将会被提供一组用户交互历史,每个交互描述中包含当前页面caption和一个动作action; +您的任务是: +分析每个action分别在对应的页面上做了什么动作,把这些动作序列总结成一个任务描述,请注意任务描述应该是一个要求,例如:我想要看VIP的特权有哪些;帮我看看正在打折的裤子;告诉我当前购物车里有什么东西。 +请注意!任务描述和动作序列之间应该有对应的逻辑关系。 +输出格式: +“分步描述”:“提供了一组交互历史,其中每个条目对应一个当前手机截图的caption和对该页面的动作action。” +“简洁任务”:“根据分步描述,生成一个符合这个动作顺序的任务” +下面是一个例子: +输入: +Caption 1: +这张图片显示的是一个手机屏幕截图,具体是一个购物应用的界面。 +Action 1: +click(护肤套装) +Caption 2: +这张图片显示的是一个手机屏幕截图。在顶部,有一个搜索栏,上面写着“护肤套装”。此外,在页面底部还有一个导航栏,上面有“全部商品”、“新货上架”、“保湿”、“干性肌肤”、“烟酰胺”和“玻尿酸”等选项,当前状态是“全部商品” +Action 2: +click(新货) +Caption 3: +这张图片显示的是一个手机屏幕截图,具体是一个购物应用的界面。在顶部,有一个搜索栏,上面写着“护肤套装”。此外,在页面底部还有一个导航栏,上面有“全部商品”、“新货上架”、“保湿”、“干性肌肤”、“烟酰胺”和“玻尿酸”等选项,当前状态是“新货上架”。下面有多个商品推荐。 +Action 3: +click(广告) +Caption 4: +这张图片显示的是一个商品详情页面。页面顶部有一个粉色背景的横幅,上面写着“买一套带走13件”,并配有一张产品照片。 +输出: +分步描述: +1. 在购物应用的“推荐”类别下的“美妆”子类别中,点击“护肤套装”商品。 +2. 在护肤套装的搜索结果页面,继续点击带有“新货”标签的商品。 +3. 在商品详情页面点击“广告”标签。 +简洁任务: +帮我找到一个最新的护肤套装,需要是正在进行促销活动的。 +这是你需要回答的: +输入: + +{chain_description} + +请生成“分步描述”和“简洁任务”: + +输出: +''' \ No newline at end of file diff --git a/agent_for_ui/agent_html_prompt_thought.py b/agent_for_ui/agent_html_prompt_thought.py new file mode 100644 index 0000000000000000000000000000000000000000..3b7bf5b05c4c40f5c22da3d186ec50c50180ff52 --- /dev/null +++ b/agent_for_ui/agent_html_prompt_thought.py @@ -0,0 +1,617 @@ +# maybe we can use the guidance format +# DengSHIHAN write this prompt for test. +actions_making_prompt = ''' +You are a large language model agent stored on a mobile phone, You need to give the current one-step action that needs to be taken to complete the task. +Below I will provide you with a task, a plan, the environment of the current mobile phone interface(UI information), action history. +You need to select the most suitable one element and give the corresponding one action based on the UI information. +You need to first judge based on the UI information and action history whether the planned action has been completed. +Your selection should also consider action history, and have the courage to try new buttons instead of the same buttons from history. +Action can only be the following three functions: + 1.click(element) # click a element, only when clickable="true", the element can be clicked. + 2.input(element, text) # When you decide to enter, you first need to select the unit by clicking + 3.scroll[x_start,y_start][x_end,y_end] # scroll the screen from [x_start,y_start] to [x_end,y_end]. + 3.1 The four parameters you fill in cannot be directly the same as x_min, y_min, x_max, y_max. x cannot exceed (x_min, x_max), and y can exceed (y_min, y_max). + 3.2 When you have not opened the target APP, you can scroll left and right to find the APP; when you have opened the APP, you can scroll up and down to browse the in-app information. + +------Below is examples: +{actions_making_example} +------examples ended + +REMEMBER: +1.Click and input have higher priority than scrolling. Scrolling is only considered when all elements of the current interface are indeed irrelevant to the task. +2.When you fail to try repeatedly in one interface, maybe you can try to turn back to select other options. +3.When you need to switch apps, you need to return to the HOME page first. +4.When you find that the current page does not have the APP you want, you need to scroll left and right to find more APPs. + +Let's Begin! +[Task description]: {task_description} +[Planning]: {planning} +[UI information]: {ui_information} +[Actions history]: {memory} +[Answer]: The only action that should be taken below is: +''' + +''' +The content filled in by element belongs to the current mobile phone interface(UI information). + Scrolling can only be performed within the bounds=[x_min, y_min][x_max, y_max] of the element of scrollable="true". + Usually, you can try scrolling the screen horizontally, such as: [x_min+(x_max-x_min)/5,(y_min+y_max)/2][x_max-(x_max-x_min)/5,(y_min + y_max)/2], [x_max-(x_max-x_min)/5,(y_min + y_max)/2][x_min+(x_max-x_min)/5,(y_min + y_max)/2]. + or sliding the screen vertically, such as:[(x_min+x_max)/2,y_max-(y_max-y_min)/5][(x_min+x_max)/2,y_min+(y_max-y_min)/5], [(x_min+x_max)/2,y_min+(y_max-y_min)/5][(x_min+x_max)/2,y_max-(y_max-y_min)/5]. +''' + + +actions_making_example = ''' +Example 1: +[Task description]: Calculate 9.5×5+2 +[Planning]: Open a computing-related application and click the buttons one by one. +[UI information]: +<img class="android.widget.ImageView" description="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算 </p> +<p class="android.widget.TextView" clickable="true"> 换算 </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" description="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/view_pager" class="androidx.viewpager.widget.OriginalViewPager" clickable="false" scrollable="true" bounds="[0,275][1080,2400]"> </div> +<div id="com.miui.calculator:id/expression" class="android.view.View" description="9.5×5" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" description="= 47.5" clickable="true"> = 47.5 </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" description="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7 </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4 </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1 </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" description="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" description="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8 </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5 </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2 </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0 </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" description="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9 </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6 </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3 </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true"> . </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" description="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" description="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" description="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" description="等于" clickable="true"> </img> +[Actions history]: +adb shell am start -n com.cleveni.app.calculator/com.cleveni.app.calculator.MainActivity +click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +click(<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true"> . </p>) +click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true"> </img>) +[Answer]: The only action that should be taken below is: click(click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>)) + +Example 2: +[Task description]: Write a note for me, title: Sunday, content: Complete the work and finish the file +[Planning]: Open the calendar, create a new event, fill in the title: Sunday, fill in the content: Complete the work and finish the file. +[UI information]: +<img id="com.miui.notes:id/home" class="android.widget.ImageView" description="返回" clickable="true"> </img> +<img id="com.miui.notes:id/undo" class="android.widget.ImageView" description="撤销" clickable="true"> </img> +<img id="com.miui.notes:id/redo" class="android.widget.ImageView" description="恢复" clickable="true"> </img> +<img id="com.miui.notes:id/done" class="android.widget.ImageView" description="完成编辑" clickable="true"> </img> +<div class="android.webkit.WebView" clickable="false" scrollable="true" bounds="[0,275][1080,2108]"> 小米笔记 </div> +<input class="android.widget.EditText" clickable="true"> 标题 </input> +<p class="android.widget.TextView" clickable="true"> 11月11日 上午11:23 </p> +<p class="android.widget.TextView" clickable="true"> 0字 </p> +<p class="android.widget.TextView" clickable="true"> 开始书写或 </p> +<img class="android.widget.Image" clickable="true"> mind_map </img> +<p class="android.widget.TextView" clickable="true"> 创建思维笔记 </p> +<p class="android.widget.TextView" clickable="true"> </p> +<img id="com.miui.notes:id/audio" class="android.widget.ImageView" description="录音" clickable="true"> </img> +<img id="com.miui.notes:id/gallery" class="android.widget.ImageView" description="添加图片" clickable="true"> </img> +<img id="com.miui.notes:id/edit_image" class="android.widget.ImageView" description="涂鸦" clickable="true"> </img> +<img id="com.miui.notes:id/check" class="android.widget.ImageView" description="任务列表" clickable="true"> </img> +<img id="com.miui.notes:id/rich_text_switch" class="android.widget.ImageView" description="收起富文本编辑" clickable="true"> </img> +[Actions history]: +click(<img id="com.miui.home:id/icon_icon" class="android.widget.ImageView" description="笔记" clickable="true"> </img>) +click(<img id="com.miui.notes:id/content_add" class="android.widget.ImageView" description="点击创建文字,长按录入语音,松手完成录音并创建,手指上滑取消录音" clickable="true"> </img>) +click(<input class="android.widget.EditText" clickable="true"> 标题 </input>) +[Answer]: The only action that should be taken below is: input(<input class="android.widget.EditText" clickable="true"> 标题 </input>, Sunday) + +Example 3: +[Task description]: Help me set an Write a memorandum for me on November 23, title: work, content: Complete the work and finish the file. +[Planning]: Open the calendar, create a new event, fill in the title: work, fill in the content: Complete the work and finish the file. +<div id="com.google.android.apps.nexuslauncher:id/workspace" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,0][1080,1857]"> </div> +<p id="com.google.android.apps.nexuslauncher:id/date" class="android.widget.TextView" description="Mon, Nov 20" clickable="true"> Mon, Nov 20 </p> +<div class="android.view.View" description="Home" clickable="false"> </div> +<p class="android.widget.TextView" description="Phone" clickable="true"> Phone </p> +<p class="android.widget.TextView" description="Messages" clickable="true"> Messages </p> +<p class="android.widget.TextView" description="Play Store" clickable="true"> Play Store </p> +<p class="android.widget.TextView" description="Chrome" clickable="true"> Chrome </p> +<p class="android.widget.TextView" description="Camera" clickable="true"> Camera </p> +<img id="com.google.android.apps.nexuslauncher:id/g_icon" class="android.widget.ImageView" description="Google app" clickable="true"> </img> +<img id="com.google.android.apps.nexuslauncher:id/mic_icon" class="android.widget.ImageView" description="Voice search" clickable="true"> </img> +<img id="com.google.android.apps.nexuslauncher:id/lens_icon" class="android.widget.ImageButton" description="Google Lens" clickable="true"> </img> +[Actions history]: None +[Answer]: The only action that should be taken below is: scroll([540, 1486], [540, 371]) +''' + +''' +Example 3: +[Task description]: Help me set an alarm clock for five o'clock. +[Planning]: Turn on the clock, set an alarm, and adjust the time to five o'clock. +[UI information]: +<button id="android:id/button1" class="android.widget.Button" description="取消" clickable="true"> </button> +<p id="android:id/title" class="android.widget.TextView" clickable="false"> 添加闹钟 </p> +<p id="com.android.deskclock:id/alarm_in_future" class="android.widget.TextView" clickable="false"> 23小时56分钟后响铃 </p> +<button id="android:id/button2" class="android.widget.Button" description="确定" clickable="true"> </button> +<div id="com.android.deskclock:id/amPm" class="com.android.deskclock.widget.NumberPicker" descript ion="下午" clickable="true" scrollable="true" bounds="[31,319][369,1036]"> 1.0 </div> +<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" descript ion="12时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 12.0 </div> +<div id="com.android.deskclock:id/minute" class="com.android.deskclock.widget.NumberPicker" descript ion="11分" clickable="true" scrollable="true" bounds="[710,319][1049,1036]"> 11.0 </div> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 铃声 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 元素动态铃声 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 重复 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 只响一次 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃时振动 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃后删除此闹钟 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 备注 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 请输入 </p> +[Actions history]: +click(<img id="com.miui.home:id/icon_icon" class="android.widget.ImageView" description="时钟" clickable="true"> </img>) +click(<img id="com.android.deskclock:id/end_btn2" class="android.widget.ImageButton" description="添加闹钟" clickable="true"> </img>) +click(<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" description="11时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 11.0 </div>) +[Answer]: scroll([359,558][359,797]) + +Example: +Task description: Calculate 9×5+2 +UI information: +<img class="android.widget.ImageView" description="小窗" clickable="true" scrollable="false" bounds="[55,143][165,253]"> </img> +<p class="android.widget.TextView" clickable="true" scrollable="false" bounds="[398,158][508,238]"> 计算 </p> +<p class="android.widget.TextView" clickable="true" scrollable="false" bounds="[572,158][682,238]"> 换算 </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" description="更多选项" clickable="true" scrollable="false" bounds="[926,143][1036,253]"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" description="0" clickable="true" scrollable="false" bounds="[58,887][1022,1083]"> </div> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" description="清除" clickable="true" scrollable="false" bounds="[76,1149][275,1347]"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[76,1391][275,1589]"> 7 </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[76,1633][275,1832]"> 4 </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[76,1876][275,2075]"> 1 </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" description="切换" clickable="true" scrollable="false" bounds="[76,2119][275,2318]"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" description="退格" clickable="true" scrollable="false" bounds="[319,1149][518,1347]"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,1391][518,1589]"> 8 </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,1633][518,1832]"> 5 </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,1876][518,2075]"> 2 </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[319,2119][518,2318]"> 0 </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" description="百分号" clickable="true" scrollable="false" bounds="[562,1149][761,1347]"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1391][761,1589]"> 9 </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1633][761,1832]"> 6 </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1876][761,2075]"> 3 </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" description="小数点" clickable="true" scrollable="false" bounds="[562,2119][761,2318]"> . </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" description="除" clickable="true" scrollable="false" bounds="[805,1149][1004,1347]"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" description="乘" clickable="true" scrollable="false" bounds="[805,1391][1004,1589]"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" description="减" clickable="true" scrollable="false" bounds="[805,1633][1004,1832]"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" description="加" clickable="true" scrollable="false" bounds="[805,1876][1004,2075]"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" description="等于" clickable="true" scrollable="false" bounds="[805,2119][1004,2318]"> </img> + +Actions history: none +Answer: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true" scrollable="false" bounds="[562,1391][761,1589]"> 9 </p>) + +Example 3: +Task description: Calculate 9×5+2 +UI information: +<img class="android.widget.ImageView" alt="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算, </p> +<p class="android.widget.TextView" clickable="true"> 换算, </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" alt="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" alt="9.5×5" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" alt="= 47.5" clickable="true"> = 47.5, </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" alt="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7, </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4, </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1, </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" alt="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" alt="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8, </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0, </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" alt="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6, </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3, </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" alt="小数点" clickable="true"> ., </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" alt="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" alt="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img> +Actions history: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Answer: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +''' +''' +Example 4: +Task description: Write a note for me, title: Sunday, content: Complete the work and finish the file +UI information: +<div class="android.widget.FrameLayout" clickable="false"> </div> +<img id="com.miui.notes:id/home" class="android.widget.ImageView" alt="返回" clickable="true"> </img> +<div class="android.view.View" clickable="false"> </div> +<img id="com.miui.notes:id/undo" class="android.widget.ImageView" alt="撤销" clickable="true"> </img> +<img id="com.miui.notes:id/redo" class="android.widget.ImageView" alt="恢复" clickable="true"> </img> +<img id="com.miui.notes:id/done" class="android.widget.ImageView" alt="完成编辑" clickable="true"> </img> +<input class="android.widget.EditText" clickable="true"> Sunday </input> +<p class="android.widget.TextView" clickable="true"> 11月10日 上午9:35 </p> +<p class="android.widget.TextView" clickable="true"> 0字 </p> +<p class="android.widget.TextView" clickable="true"> 开始书写或 </p> +<img class="android.widget.Image" clickable="true"> mind_map </img> +<p class="android.widget.TextView" clickable="true"> 创建思维笔记 </p> +<p class="android.widget.TextView" clickable="true"> </p> +<div id="com.miui.notes:id/mix_view" class="android.view.View" clickable="true"> </div> +<img id="com.miui.notes:id/audio" class="android.widget.ImageView" alt="录音" clickable="true"> </img> +<img id="com.miui.notes:id/gallery" class="android.widget.ImageView" alt="添加图片" clickable="true"> </img> +<img id="com.miui.notes:id/edit_image" class="android.widget.ImageView" alt="涂鸦" clickable="true"> </img> +<img id="com.miui.notes:id/check" class="android.widget.ImageView" alt="任务列表" clickable="true"> </img> +<img id="com.miui.notes:id/rich_text_switch" class="android.widget.ImageView" alt="展开富文本编辑" clickable="true"> </img> +<div id="com.miui.notes:id/panel_divide" class="android.view.View" clickable="true"> </div> +<div id="com.miui.notes:id/navi_placeholder" class="android.view.View" clickable="true"> </div> +Actions history: +Action: {'click(<img id="com.miui.notes:id/content_add" class="android.widget.ImageView" alt="点击创建文字,长按录入语音,松手完成录音并创建,手指上滑取消录音" clickable="true"> </img>)'} +Action: {'action': 'input(<input class="android.widget.EditText" clickable="true"> 标题 </input>, Sunday)'} +Answer: input(<p class="android.widget.TextView" clickable="true"> 开始书写或 </p>, Complete the work and finish the file) +''' + +html_ui_understanding = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with an environment of the current mobile phone interface. +Please tell me the information contained in this html interface. +''' +html_ui_examples = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with an environment of the current mobile phone interface. +<img id=17 class="com.miui.calculator:id/btn_c_s" alt="清除" clickable="true"> </img> +<button id=17 class="com.miui.calculator:id/digit_7" clickable="true"> 7 </button> +<button id=17 class="com.miui.calculator:id/digit_4" clickable="true"> 4 </button> +Please tell me the information contained in this html interface. +Answer: There is a picture that says "Clear" and two buttons representing 4 and 7. +''' + +# ------------------------------------------------------------------------------------------------------- +app_selection_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, the environment of the current mobile phone interface(Apps information). +Please help me choose the correct app to perform the task based on the Apps information. +On this basis, you should make a simple plan for completing the task. +[Apps information]: +{apps_information} + +----Below are some examples: +{app_selection_example} +----examples ended + +[Task description]: {task_description} +[Answer]: +''' +app_selection_example = ''' +Example 1: +[Task description]: Read the latest message. +[Answer]: I should open Messages before I can view recent text messages, then using this one application should be enough. + +Example 2: +[Task description]: Calculate 7*2.2/4+1 +[Answer]: I should open ClevCalc because this is an application directly related to the calculator and since the task only involves calculations, then using this one application should be enough. + +Example 3: +[Task description]: I want to go to Wuhan next week. Please help me determine the specific travel time and method. The information you collect can be saved on my phone for easy review by me. +[Answer]: To determine the time and mode of travel, I should at least check the air tickets or train tickets and hotel conditions on Traveloka, and check the weather conditions for the next few days on Weather. Because the collected information needs to be stored on the mobile phone, I will take screenshots of the necessary air and train ticket information and write the most recommended solution in a memo. +''' + +# Base passrate +# ------------------------------------------------------------------------------------------------------- +Task_finish_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, +the environment of the current mobile phone interface(UI information), historical action information. +You need to judge whether the current task has been completed based on the current environment and action history. + +----Below are the examples: +{task_finish_example} +----examples ended + +[Task description]: {task_description} +[UI information]: {ui_information} +[Actions history]: {memory} +[Question]: Is the task completed? +[Answer]: +''' +Task_finish_example = ''' +Example 1: +[Task description]: Calculate 9×5+2 +[UI information]: +<img class="android.widget.ImageView" alt="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算, </p> +<p class="android.widget.TextView" clickable="true"> 换算, </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" alt="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" alt="9×5+2" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" alt="= 47" clickable="true"> = 47, </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" alt="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7, </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4, </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1, </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" alt="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" alt="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8, </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0, </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" alt="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6, </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3, </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" alt="小数点" clickable="true"> ., </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" alt="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" alt="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img> +[Actions history]: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +Action: click(<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p>) +Action: click(<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img>) +[Question]: Is the task completed? +[Answer]: Yes, the task is completed. + +Example 2: +[Task description]: Calculate 9×5+2 +[UI information]: +<img class="android.widget.ImageView" alt="小窗" clickable="true"> </img> +<p class="android.widget.TextView" clickable="true"> 计算, </p> +<p class="android.widget.TextView" clickable="true"> 换算, </p> +<img id="com.miui.calculator:id/more" class="android.widget.ImageView" alt="更多选项" clickable="true"> </img> +<div id="com.miui.calculator:id/expression" class="android.view.View" alt="9×5" clickable="true"> </div> +<p id="com.miui.calculator:id/result" class="android.widget.TextView" alt="= 45" clickable="true"> = 47, </p> +<img id="com.miui.calculator:id/btn_c_s" class="android.widget.ImageView" alt="清除" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_7" class="android.widget.TextView" clickable="true"> 7, </p> +<p id="com.miui.calculator:id/digit_4" class="android.widget.TextView" clickable="true"> 4, </p> +<p id="com.miui.calculator:id/digit_1" class="android.widget.TextView" clickable="true"> 1, </p> +<img id="com.miui.calculator:id/btn_switch" class="android.widget.ImageView" alt="切换" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_del_s" class="android.widget.ImageView" alt="退格" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_8" class="android.widget.TextView" clickable="true"> 8, </p> +<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p> +<p id="com.miui.calculator:id/digit_2" class="android.widget.TextView" clickable="true"> 2, </p> +<p id="com.miui.calculator:id/digit_0" class="android.widget.TextView" clickable="true"> 0, </p> +<img id="com.miui.calculator:id/op_pct" class="android.widget.ImageView" alt="百分号" clickable="true"> </img> +<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p> +<p id="com.miui.calculator:id/digit_6" class="android.widget.TextView" clickable="true"> 6, </p> +<p id="com.miui.calculator:id/digit_3" class="android.widget.TextView" clickable="true"> 3, </p> +<p id="com.miui.calculator:id/dec_point" class="android.widget.TextView" alt="小数点" clickable="true"> ., </p> +<img id="com.miui.calculator:id/op_div" class="android.widget.ImageView" alt="除" clickable="true"> </img> +<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img> +<img id="com.miui.calculator:id/op_sub" class="android.widget.ImageView" alt="减" clickable="true"> </img> +<img id="com.miui.calculator:id/op_add" class="android.widget.ImageView" alt="加" clickable="true"> </img> +<img id="com.miui.calculator:id/btn_equal_s" class="android.widget.ImageView" alt="等于" clickable="true"> </img> +[Actions history]: +Action: click(<p id="com.miui.calculator:id/digit_9" class="android.widget.TextView" clickable="true"> 9, </p>) +Action: click(<img id="com.miui.calculator:id/op_mul" class="android.widget.ImageView" alt="乘" clickable="true"> </img>) +Action: click(<p id="com.miui.calculator:id/digit_5" class="android.widget.TextView" clickable="true"> 5, </p>) +[Question]: Is the task completed? +Answer: No, the task is not completed. +''' + +# ------------------------------------------------------------------------------------------------------- +Thought_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, a plan, +the environment of the current mobile phone interface before action (Previous UI information), action history, the environment of the current mobile phone interface(Now UI information). +Action history records completed operations, including click, input, scroll and api_call. +You need to summarize these four aspects: changes in the UI page, task progress, actions that have been completed, one next action based on UI information and action history. +[Action History] are all previous historical actions, and [current action] is the current action that causes the UI page to change. +[task progress] Where in the plan is the current page? +[One next action] You need to choose one among click, input, scroll and one api as the next action, and give one and only one operation object. +[One next action] Strictly refer to [current action] and [action history] result to do the next action. + +------Below are examples: +{thought_example} +------examples ended + +Let's Begin! +[Task description]: {task_description} +[Planning]: {planning} +[Previous UI information]: {ui_information} +[Now UI information]: {now_ui_information} +[Action History]: {action_history} +[Current Action]:{action} +[Answer]: +''' +Thought_example = ''' +Example 1: +[Task description]: I'm going to travel from chengdu to Beijing next week. Please help me determine the flight and specific time. +[Planning]: Open the travel APP, check flight from chengdu to beijing, sort by price, take a screenshot, then open Google search, search and check the weather conditions in Beijing next week. + +[Previous UI information]: <button id="com.traveloka.android:id/toolbar_left" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android:id/text_view_toolbar_title" class="android.widget.TextView" clickable="false"> Flights </p> +<button id="com.traveloka.android:id/toolbar_right" class="android.widget.ImageButton" clickable="true"> </button> +<div id="com.traveloka.android.flight:id/layout_scroll" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,210][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/text_owrt" class="android.widget.TextView" clickable="true"> One-way / Round-trip </p> +<p id="com.traveloka.android.flight:id/text_mc" class="android.widget.TextView" clickable="true"> Multi-city </p> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> From </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> To </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Beijing (BEIA) </input> +<button id="com.traveloka.android.flight:id/btn_swap" class="android.widget.ImageButton" description="flight_searchform_button_swap" clickable="true"> </button> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Departure Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Wednesday, 29 Nov 2023 </input> +<p id="com.traveloka.android.flight:id/text_rt" class="android.widget.TextView" clickable="false"> Round-trip? </p> +<div id="com.traveloka.android.flight:id/switch_rt" class="android.widget.Switch" description="flight_searchform_button_roundtrip" clickable="true"> </div> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Return Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Passengers </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> 1 passenger </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Seat Class </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Economy </input> +<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button> +<p id="com.traveloka.android.flight:id/flight_searchform_textview_recent_search" class="android.widget.TextView" clickable="false"> Your Recent Searches </p> +<div id="com.traveloka.android.flight:id/flight_searchform_recyclerview_recent_search" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,1711][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/textview_search" class="android.widget.TextView" clickable="true"> Search </p> +<p id="com.traveloka.android.flight:id/textview_discover" class="android.widget.TextView" clickable="true"> Discover </p> + +[Now UI information]: <button id="com.traveloka.android.flight:id/image_arrow_back" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android.flight:id/text_title" class="android.widget.TextView" clickable="true"> Chengdu (CTUA) Beijing (BEIA) </p> +<p id="com.traveloka.android.flight:id/text_subtitle" class="android.widget.TextView" clickable="true"> Wed, 29 Nov • 1 pax • Economy </p> +<div id="com.traveloka.android.flight:id/recycler_date" class="androidx.recyclerview.widget.RecyclerView" clickable="true" scrollable="true" bounds="[0,215][954,387]"> </div> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Mon, 27 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Tue, 28 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Wed, 29 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> USD 81.49 </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Thu, 30 Nov </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<p id="com.traveloka.android.flight:id/text_date" class="android.widget.TextView" clickable="true"> Fri, 1 Dec </p> +<p id="com.traveloka.android.flight:id/text_price" class="android.widget.TextView" clickable="true"> See Price </p> +<div id="com.traveloka.android.flight:id/recycler" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,387][1080,1857]"> </div> +<p id="com.traveloka.android.flight:id/quick_filter_item_name" class="android.widget.TextView" clickable="true"> Smart Combo </p> +<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_departure_time" class="android.widget.TextView" clickable="true"> 20:30 </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 45m </p> +<p id="com.traveloka.android.flight:id/text_reduced_price" class="android.widget.TextView" clickable="true"> USD 81.49 </p> +<p id="com.traveloka.android.flight:id/text_real_price" class="android.widget.TextView" clickable="true"> USD 84.05/pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_time" class="android.widget.TextView" clickable="true"> 23:15 </p> +<p id="com.traveloka.android.flight:id/text_departure_airport_code" class="android.widget.TextView" clickable="true"> CTU </p> +<p id="com.traveloka.android.flight:id/text_number_of_transit" class="android.widget.TextView" clickable="true"> Direct </p> +<p id="com.traveloka.android.flight:id/text_reduced_price_per_pax" class="android.widget.TextView" clickable="true"> /pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_airport_code" class="android.widget.TextView" clickable="true"> PKX </p> +<p id="com.traveloka.android:id/promo_name" class="android.widget.TextView" clickable="true"> Smart Combo </p> +<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_departure_time" class="android.widget.TextView" clickable="true"> 07:20 </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 40m </p> +<p id="com.traveloka.android.flight:id/text_reduced_price" class="android.widget.TextView" clickable="true"> USD 102.53 </p> +<p id="com.traveloka.android.flight:id/text_real_price" class="android.widget.TextView" clickable="true"> USD 104.47/pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_time" class="android.widget.TextView" clickable="true"> 10:00 </p> +<p id="com.traveloka.android.flight:id/text_departure_airport_code" class="android.widget.TextView" clickable="true"> CTU </p> +<p id="com.traveloka.android.flight:id/text_number_of_transit" class="android.widget.TextView" clickable="true"> Direct </p> +<p id="com.traveloka.android.flight:id/text_reduced_price_per_pax" class="android.widget.TextView" clickable="true"> /pax </p> +<p id="com.traveloka.android.flight:id/text_arrival_airport_code" class="android.widget.TextView" clickable="true"> PKX </p> +<p id="com.traveloka.android:id/promo_name" class="android.widget.TextView" clickable="true"> Smart Combo </p> +<p id="com.traveloka.android.flight:id/text_title" class="android.widget.TextView" clickable="true"> Be the first to know when prices drop! </p> +<p id="com.traveloka.android.flight:id/text_description" class="android.widget.TextView" clickable="true"> Create a price alert and we’ll let you know as soon as prices have dropped significantly. </p> +<p id="com.traveloka.android.flight:id/text_button_action" class="android.widget.TextView" clickable="true"> Create Price Alert </p> +<p id="com.traveloka.android.flight:id/text_flight_name" class="android.widget.TextView" description="text_view_flight_name " clickable="true"> China Eastern Airlines </p> +<p id="com.traveloka.android.flight:id/text_flight_duration" class="android.widget.TextView" clickable="true"> 2h 25m </p> +<p id="com.traveloka.android.flight:id/text_real_price" class="android.widget.TextView" clickable="true"> USD 118.11/pax </p> +<div id="com.traveloka.android.flight:id/container_pill" class="android.widget.HorizontalScrollView" clickable="true" scrollable="true" bounds="[0,1709][950,1857]"> </div> +<p id="com.traveloka.android.flight:id/pill_title" class="android.widget.TextView" clickable="true"> Stops </p> +<p id="com.traveloka.android.flight:id/pill_title" class="android.widget.TextView" clickable="true"> Airlines </p> +<p id="com.traveloka.android.flight:id/pill_title" class="android.widget.TextView" clickable="true"> Time </p> +<p id="com.traveloka.android.flight:id/pill_sort_title" class="android.widget.TextView" clickable="true"> Cheapest </p> +<p id="com.traveloka.android:id/button_text" class="android.widget.TextView" clickable="true"> Filter </p> + +[Action History]: +{'[Action]': 'click(<p class="android.widget.TextView" description="Traveloka" clickable="true"> Traveloka </p>)'} +{'[Action]': 'click(<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Flights </p>)'} +{'[Action]': 'click(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Thursday, 23 Nov 2023 </input>)'} +{'[Action]': 'click(<div id="com.traveloka.android:id/calendar_date_text" class="android.view.View" description="19" clickable="true"> </div>)'} +{'[Action]': 'click(<div id="com.traveloka.android:id/calendar_date_text" class="android.view.View" description="26" clickable="true"> </div>)'} +{'[Action]': 'click(<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button>)'} + +[Current Action]: {'[Action]': 'click(<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button>)'} + +[Answer]: +Changes: I clicked "Search" button. The page changes from the flight search page to the flight search results page. The page contains two flight information from Chengdu to Beijing. +Actions Complete: I have opened traveloka app, clicked "flight" button, filled the form and clicked the "search" button. +Task progress: The current mission progress is check flight from chengdu to beijing. +One next action: Click on the cheapest flight to see more detailed information. + +Example 2: +[Task description]: I'm going to travel from chengdu to Beijing next week. Please help me determine the flight and specific time. +[Planning]: Open the travel APP, check flight from chengdu to beijing, sort by price, take a screenshot, then open Google search, search and check the weather conditions in Beijing next week. + +[Previous UI information]: +<button id="com.traveloka.android:id/toolbar_left" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android:id/text_view_toolbar_title" class="android.widget.TextView" clickable="false"> Flights </p> +<button id="com.traveloka.android:id/toolbar_right" class="android.widget.ImageButton" clickable="true"> </button> +<div id="com.traveloka.android.flight:id/layout_scroll" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,210][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/text_owrt" class="android.widget.TextView" clickable="true"> One-way / Round-trip </p> +<p id="com.traveloka.android.flight:id/text_mc" class="android.widget.TextView" clickable="true"> Multi-city </p> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> From </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> To </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Beijing (BEIA) </input> +<button id="com.traveloka.android.flight:id/btn_swap" class="android.widget.ImageButton" description="flight_searchform_button_swap" clickable="true"> </button> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Departure Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android.flight:id/text_rt" class="android.widget.TextView" clickable="false"> Round-trip? </p> +<div id="com.traveloka.android.flight:id/switch_rt" class="android.widget.Switch" description="flight_searchform_button_roundtrip" clickable="true"> </div> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Return Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Passengers </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> 1 passenger </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Seat Class </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Economy </input> +<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button> +<p id="com.traveloka.android.flight:id/flight_searchform_textview_recent_search" class="android.widget.TextView" clickable="false"> Your Recent Searches </p> +<div id="com.traveloka.android.flight:id/flight_searchform_recyclerview_recent_search" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,1711][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/textview_search" class="android.widget.TextView" clickable="true"> Search </p> +<p id="com.traveloka.android.flight:id/textview_discover" class="android.widget.TextView" clickable="true"> Discover </p> + +[Now UI information]: +<button id="com.traveloka.android:id/toolbar_left" class="android.widget.ImageButton" clickable="true"> </button> +<p id="com.traveloka.android:id/text_view_toolbar_title" class="android.widget.TextView" clickable="false"> Flights </p> +<button id="com.traveloka.android:id/toolbar_right" class="android.widget.ImageButton" clickable="true"> </button> +<div id="com.traveloka.android.flight:id/layout_scroll" class="android.widget.ScrollView" clickable="false" scrollable="true" bounds="[0,210][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/text_owrt" class="android.widget.TextView" clickable="true"> One-way / Round-trip </p> +<p id="com.traveloka.android.flight:id/text_mc" class="android.widget.TextView" clickable="true"> Multi-city </p> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> From </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> To </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Beijing (BEIA) </input> +<button id="com.traveloka.android.flight:id/btn_swap" class="android.widget.ImageButton" description="flight_searchform_button_swap" clickable="true"> </button> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Departure Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android.flight:id/text_rt" class="android.widget.TextView" clickable="false"> Round-trip? </p> +<div id="com.traveloka.android.flight:id/switch_rt" class="android.widget.Switch" description="flight_searchform_button_roundtrip" clickable="true"> </div> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Return Date </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Saturday, 2 Dec 2023 </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Passengers </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> 1 passenger </input> +<p id="com.traveloka.android:id/label_text_view" class="android.widget.TextView" clickable="false"> Seat Class </p> +<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Economy </input> +<button id="com.traveloka.android.flight:id/btn_search" class="android.widget.Button" description="flight_searchform_button_search" clickable="true"> Search </button> +<p id="com.traveloka.android.flight:id/flight_searchform_textview_recent_search" class="android.widget.TextView" clickable="false"> Your Recent Searches </p> +<div id="com.traveloka.android.flight:id/flight_searchform_recyclerview_recent_search" class="androidx.recyclerview.widget.RecyclerView" clickable="false" scrollable="true" bounds="[0,1711][1080,1717]"> </div> +<p id="com.traveloka.android.flight:id/textview_search" class="android.widget.TextView" clickable="true"> Search </p> +<p id="com.traveloka.android.flight:id/textview_discover" class="android.widget.TextView" clickable="true"> Discover </p> + +[Action History]: +{'[Action]': 'click(<p class="android.widget.TextView" description="Traveloka" clickable="true"> Traveloka </p>)'} +{'[Action]': 'click(<p id="com.traveloka.android:id/text_view_product_text" class="android.widget.TextView" clickable="true"> Flights </p>)'} +{'[Fail]: InvalidElementStateException action': 'input(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input>, Chengdu (CTUA))'} + +[Current action]:{'[Action]': 'input(<input id="com.traveloka.android:id/edit_text_field" class="android.widget.EditText" clickable="true"> Chengdu (CTUA) </input>, Chengdu (CTUA))'} + +[Answer]: +Changes: The current page is the flight search form page in the Traveloka app. And There is no change between two pages. +Task progress: From the current action and action history, I am currently on the flight search form page, ready to search for flights from Chengdu to Beijing. +Actions completed: From the current action and action history, I have opened the traveloka app and clicked the flight button to search for flights +One next action: Because the operation of inputting information in Chengdu (CTUA) failed, I will try other operations, such as clicking Chengdu (CTUA) first. The one next action I will do is click "Chengdu (CTUA)" button to select departure city. +''' + +''' + +Example 3: +Task description: Help me set an alarm clock for five o'clock. +Planning: Open the clock, create a new alarm clock, and set the time to five o'clock. +Previous UI information: +<button id="android:id/button1" class="android.widget.Button" description="取消" clickable="true"> </button> +<p id="android:id/title" class="android.widget.TextView" clickable="false"> 添加闹钟 </p> +<p id="com.android.deskclock:id/alarm_in_future" class="android.widget.TextView" clickable="false"> 23小时56分钟后响铃 </p> +<button id="android:id/button2" class="android.widget.Button" description="确定" clickable="true"> </button> +<div id="com.android.deskclock:id/amPm" class="com.android.deskclock.widget.NumberPicker" descript ion="下午" clickable="true" scrollable="true" bounds="[31,319][369,1036]"> 1.0 </div> +<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" descript ion="12时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 12.0 </div> +<div id="com.android.deskclock:id/minute" class="com.android.deskclock.widget.NumberPicker" descript ion="11分" clickable="true" scrollable="true" bounds="[710,319][1049,1036]"> 11.0 </div> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 铃声 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 元素动态铃声 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 重复 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 只响一次 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃时振动 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 响铃后删除此闹钟 </p> +<p id="com.android.deskclock:id/title" class="android.widget.TextView" clickable="true"> 备注 </p> +<p id="com.android.deskclock:id/summary" class="android.widget.TextView" clickable="true"> 请输入 </p> +[Action]: +Action: click(<img id="com.miui.home:id/icon_icon" class="android.widget.ImageView" description="时钟" clickable="true"> </img>) +Action: click(<img id="com.android.deskclock:id/end_btn2" class="android.widget.ImageButton" description="添加闹钟" clickable="true"> </img>) +Action: click(<div id="com.android.deskclock:id/hour" class="com.android.deskclock.widget.NumberPicker" description="11时" clickable="true" scrollable="true" bounds="[370,319][709,1036]"> 11.0 </div>) +[Answer]: I need to set the hour to five. In the last step, I tried to click on the eleven hours, but it seems that the element can't be click, now I will try to scroll the element to set the hour to five. +''' + +passrate_prompt = ''' +You are a large language model agent stored on a mobile phone, below I will provide you with a task, a system logcat. +You need to judge whether the task is completed based on the system logcat. +Task: {task} +Logcat: {logcat} +Ans: +''' \ No newline at end of file diff --git a/agent_for_ui/app_list_MIUI.json b/agent_for_ui/app_list_MIUI.json new file mode 100644 index 0000000000000000000000000000000000000000..fb7ac6af19bf39eb454af9e1bf5f177f7be5ce5e --- /dev/null +++ b/agent_for_ui/app_list_MIUI.json @@ -0,0 +1,721 @@ +[ + { + "name_ch": "携程旅游", + "name_en": "ctrip", + "package": "ctrip.android.view", + "category": "旅行交通", + "function_description": "作为业界权威的在线旅行服务公司,携程旅行酒店预订平台覆盖了全球约1400000家酒店;机票产品覆盖300多家国际航空公司;这些航空公司运营着全球各大城市的航班,提供了超过200万条航线,连接了大约200个国家和地区的5000多个城市;在出境游服务上,与约12000个合作伙伴一起为客户提供综合的旅行服务;提供了中国大陆及港澳台地区、欧日韩等境外地区火车票预订;提供国内/国际汽车票预订及城际用车服务,其中国内覆盖3000家以上的车站,提供国内超过410个城市、国外200个国家、80000家门店、700万车辆的自驾服务;提供超实惠的景点门票等预订服务;更有旅游度假、主题高铁游、景点门票优惠、旅游攻略、旅行购物指南、旅行WiFi等一站式旅行服务,助你实现说走就走的旅行梦想。", + "api": [] + }, + { + "name_ch": "喜马拉雅", + "name_en": "ximalaya", + "package": "com.ximalaya.ting.android", + "category": "影音视听", + "function_description": "喜马拉雅(Ximalaya)是一款中国知名的在线音频平台,提供广泛的音频内容,包括有声读物、广播剧、相声、音乐、知识类节目等。以下是喜马拉雅App的一些主要特点和功能:\n\n多样化的内容: 喜马拉雅拥有丰富多彩的音频内容,涵盖了众多主题,满足不同用户的兴趣需求。用户可以在平台上找到各种各样的节目,包括小说、情感、历史、科技、教育等。\n\n有声读物: 提供丰富的有声读物资源,包括小说、杂志、经典文学等,用户可以在喜马拉雅上收听到优质的声音表演,使阅读更富有趣味性。\n\n广播剧和相声: 喜马拉雅提供了许多高质量的广播剧和相声节目,让用户在任何时间都能欣赏到精彩的表演。\n\n音乐: 除了有声内容,喜马拉雅还提供了音乐播放功能,用户可以在平台上欣赏到各种音乐风格的歌曲。\n\n知识付费服务: 喜马拉雅也提供了一些知识类付费内容,用户可以通过购买付费课程获取专业的知识和技能。\n\n社交功能: 用户可以在平台上关注自己喜欢的创作者,互动评论,分享喜欢的节目给朋友,形成社区。\n\n个性化推荐: 喜马拉雅通过算法分析用户的听取历史和兴趣,为用户推荐个性化的音频内容,提高用户体验。\n\n离线收听: 用户可以下载自己喜欢的节目,随时随地离线收听,方便在无网络的情况下享受音频内容。", + "api": [ + { + "ADB Command": "adb shell am start -n com.ximalaya.ting.android/.host.activity.MainActivity\n", + "Function Description": "启动喜马拉雅主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d file:///path/to/your/audio.mp3 -t audio/* com.ximalaya.ting.android/.host.activity.MainActivity", + "Function Description": "处理音频文件", + "Parameter Information": "替换 /path/to/your/audio.mp3 为音频文件路径。" + } + ] + }, + { + "name_ch": "QQ", + "name_en": "QQ", + "package": "com.tencent.mobileqq", + "category": "聊天社交", + "function_description": "QQ是一款由中国科技公司腾讯推出的即时通讯软件,具有丰富的功能,广泛应用于社交、娱乐和工作等方面。以下是QQ主要的功能和特点:\n\n即时通讯: QQ最初是一款即时通讯软件,允许用户通过文本、语音、图片和视频等多种方式进行实时沟通。用户可以与好友、同事以及群组进行聊天。\n\n语音通话和视频通话: QQ支持高质量的语音通话和视频通话功能,用户可以通过网络与其他QQ用户进行语音和视频通讯,无论是个人之间的通话还是群组通话。\n\nQQ空间: QQ空间是用户个人的社交主页,用户可以在空间中发布动态、分享照片、记录生活,同时与好友互动。QQ空间也支持个性化设置,让用户自定义空间的外观和风格。\n\n朋友圈: 类似于社交媒体的朋友圈功能,用户可以在自己的朋友圈中分享文字、图片、链接等内容,与好友分享生活点滴。\n\nQQ邮箱: QQ集成了邮箱服务,用户可以通过QQ邮箱发送和接收电子邮件,并管理邮件联系人。\n\nQQ音乐: QQ音乐是腾讯推出的在线音乐服务,与QQ账号关联,用户可以通过QQ音乐平台听取音乐、创建歌单、分享音乐等。\n\nQQ游戏: QQ游戏是腾讯推出的在线游戏平台,用户可以在QQ上玩各种游戏,并通过QQ账号进行游戏社交。\n\nQQ群组: 用户可以创建和加入各种群组,与群成员进行交流,分享兴趣和信息。QQ群组可以是公开的或私密的,适用于不同的社交需求。\n\nQQ支付: QQ支付是腾讯推出的支付服务,用户可以在QQ中进行在线支付、转账等金融交易。\n\nQQ云: QQ云存储服务允许用户存储和分享文件,还支持文件的同步和备份功能。\n\n总体而言,QQ作为一款多功能的即时通讯软件,涵盖了社交、娱乐、工作等多个方面的需求,成为中国用户日常生活中不可或缺的工具之一。", + "api": [ + { + "ADB Command": "adb shell am start -n com.tencent.mobileqq/.activity.SplashActivity\n", + "Function Description": "启动 QQ 主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.tencent.mobileqq/.activity.ChatActivity --es uin \"联系人QQ号码\"\n", + "Function Description": "启动聊天界面", + "Parameter Information": "联系人QQ号码替换为具体的QQ号码" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -t text/plain -e android.intent.extra.TEXT \"要发送的文本\" com.tencent.mobileqq\n", + "Function Description": "建立发送文件意图,但并没指定联系人", + "Parameter Information": "将<要发送的文本>替换为具体文本" + } + ] + }, + { + "name_ch": "拼多多", + "name_en": "pinduoduo", + "package": "com.xunmeng.pinduoduo", + "category": "时尚购物", + "function_description": "拼多多(Pinduoduo)是一家中国电商平台,成立于2015年,总部位于上海。它的特色在于通过社交电商模式,通过团购和拼团的方式,帮助用户以更低的价格购买商品。以下是拼多多的主要特点和功能:\n\n社交电商: 拼多多以社交电商为特色,用户可以通过拼团的形式,邀请朋友一起购买商品,以获得更大的优惠。这种社交化的购物模式增加了用户的参与感和互动性。\n\n拼团购买: 用户可以在拼多多平台上发起或参与拼团活动。通过集结多人购买同一商品,用户可以享受到更低的价格,因为商家会给予相应的团购折扣。\n\n农产品直采: 拼多多推动了农产品直采模式,将农产品直接从生产者采购,缩短了供应链,降低了产品价格,同时也帮助了农民增加销售渠道。\n\n低价商品: 拼多多注重销售价格的低廉,吸引了大量追求实惠的用户。平台上有许多价格相对较低的商品,涵盖了各个品类,包括服装、食品、电子产品等。\n\nAPP优化体验: 拼多多一开始主要通过手机应用提供服务,其APP在用户体验和交互方面进行了优化,使得用户可以方便快捷地进行商品浏览、下单和支付等操作。\n\n农村市场: 拼多多在一定程度上注重农村市场,通过线上平台为农村用户提供了更便捷的购物方式,也帮助了一些农村小商家拓展销售渠道。\n\n限时秒杀和特价商品: 拼多多常常推出限时秒杀和特价商品,吸引用户在特定时间内抓住低价优惠。\n\n需要注意的是,拼多多的商业模式在一些方面受到了一些争议,包括一些商品质量的问题和品牌授权的争议。因此,在使用拼多多时,用户需要注意选择可靠的商家和商品,确保购物体验的质量。\n\n\n\n\n\n", + "api": [ + { + "ADB Command": "adb shell am start -n com.xunmeng.pinduoduo/.ui.activity.MainFrameActivity", + "Function Description": "启动拼多多主界面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "爱奇艺", + "name_en": "iqiyi", + "package": "com.qiyi.video", + "category": "影音视听", + "function_description": "爱奇艺(iQiyi)是中国领先的在线视频平台之一,成立于2010年,总部位于北京。作为中国最大的视频播放平台之一,爱奇艺提供了丰富的视频内容,包括电影、电视剧、综艺节目、动漫、纪录片等,覆盖了广泛的观众群体。以下是爱奇艺的一些主要特点和功能:\n\n视频内容丰富: 爱奇艺拥有大量的正版视频内容,包括热门电影、热播电视剧、各类综艺节目、动画片、纪录片等。用户可以在平台上找到各种各样的节目满足不同的观看需求。\n\n自制内容: 爱奇艺积极投入自制内容的制作,推出了一系列备受关注的自制剧集、综艺节目和独播影片,为用户提供了更多高质量的独家内容。\n\nVIP会员服务: 爱奇艺提供VIP会员服务,VIP会员可以享受到更多的会员专属内容,同时在观看广告时可以获得更好的观看体验。VIP会员还可以提前观看一些热播剧集和综艺节目。\n\n高清播放: 爱奇艺支持高清播放,用户可以在平台上流畅观看高质量的视频内容,无论是在电脑上、手机上还是智能电视上。\n\n离线下载: 用户可以通过爱奇艺的离线下载功能,在有网络的情况下将喜欢的视频下载到本地,随时随地离线观看。\n\n智能推荐: 爱奇艺通过智能算法分析用户的观看历史和喜好,为用户提供个性化的推荐内容,提高用户发现感兴趣节目的几率。\n\n活动和奖励: 爱奇艺经常推出各种活动和奖励机制,例如签到领积分、抽奖等,为用户提供更多的互动和参与机会。\n\n全球覆盖: 爱奇艺不仅在中国市场拥有庞大的用户群体,还致力于拓展国际市场,提供多语言的服务,为全球用户提供优质的视频内容。", + "api": [ + { + "ADB Command": "adb shell am start -n com.qiyi.video/.WelcomeActivity", + "Function Description": "启动爱奇艺主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "Function Description": "打开爱奇艺播放器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d file:///path/to/your/video.mp4 -t video/mp4 com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "Function Description": "播放本地存储的 MP4 文件", + "Parameter Information": "替换 /path/to/your/video.mp4 为视频文件路径" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d http://[视频流URL] com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "Function Description": "打开网络视频流", + "Parameter Information": "替换 视频流URL 为实际的视频流网址" + } + ] + }, + { + "name_ch": "QQ音乐", + "name_en": "QQmusic", + "package": "com.tencent.qqmusic", + "category": "影音视听", + "function_description": "QQ音乐是由中国科技公司腾讯推出的音乐平台,提供丰富的在线音乐服务。以下是QQ音乐的主要特点和功能:\n\n多样的音乐内容: QQ音乐拥有广泛的音乐库,覆盖了各种音乐风格,包括流行、摇滚、电子、古典等,用户可以随时随地欣赏到丰富多彩的音乐。\n\n在线音乐播放: 用户可以通过QQ音乐平台在线播放各种音乐,包括最新的热门歌曲、经典老歌、专辑等。平台支持高品质音乐的在线流媒体播放,提供良好的音频体验。\n\n个性化推荐: QQ音乐通过智能算法分析用户的听歌历史和喜好,向用户推荐个性化的歌曲、专辑和歌手,帮助用户发现新的音乐。\n\n歌单和电台: 用户可以创建自己的歌单,收藏喜欢的歌曲,也可以关注其他用户的歌单。此外,QQ音乐还提供各种风格的电台,用户可以根据自己的喜好选择不同类型的音乐电台。\n\nK歌功能: QQ音乐内置了K歌功能,用户可以录制自己的歌曲并分享给好友,还可以加入其他用户的合唱活动,体验社交K歌的乐趣。\n\n付费会员服务: QQ音乐提供付费会员服务,VIP会员可以享受去广告、离线下载、高品质音乐等特权。付费会员还有机会提前听到一些独家音乐内容。\n\n歌词和MV: 在播放音乐时,QQ音乐会显示歌词,用户可以跟着歌词一同唱歌。对于一些歌曲,还可以观看相关的MV(音乐视频)。\n\n社交互动: QQ音乐与QQ社交平台相互关联,用户可以在QQ音乐上分享自己喜欢的音乐,与好友互动,了解彼此的音乐口味。\n\n总的来说,QQ音乐以其丰富的音乐内容、个性化推荐和社交互动等特点,为用户提供了全面的音乐体验,是中国领先的在线音乐平台之一。", + "api": [ + { + "ADB Command": "adb shell am start -n com.tencent.qqmusic/.third.DispacherActivityForThird", + "Function Description": "Open QQ音乐", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d <file:///path/to/your/music.mp3> -t audio/mp3 com.tencent.qqmusic/.activity.AppStarterActivity", + "Function Description": "播放本地的MP3文件", + "Parameter Information": "替换 /path/to/your/music.mp3 为实际文件路径。" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d http://[音乐流URL] com.tencent.qqmusic/.activity.AppStarterActivity\n", + "Function Description": "打开指定的网页音乐流", + "Parameter Information": "替换 [音乐流URL] 为实际音乐流的网址" + } + ] + }, + { + "name_ch": "微博", + "name_en": "weibo", + "package": "com.sina.weibo", + "category": "新闻资讯", + "function_description": "微博是一种社交媒体平台,提供了用户分享、关注、互动的功能。微博的独特之处在于用户可以发布短文、图片、视频等多媒体内容,并通过关注其他用户建立社交网络。以下是微博的主要特点和功能:\n\n微博发布: 用户可以通过微博平台发布文字、图片、视频等内容,每条微博的字数通常有限,这使得信息传递更为简洁和直接。\n\n关注和粉丝: 用户可以关注其他用户,也可以被其他用户关注。关注的用户的微博动态会出现在自己的首页,形成个性化的信息流。粉丝则是关注自己的其他用户。\n\n话题和热搜: 微博支持用户为自己发布的内容添加话题,用户可以点击话题查看相关的微博内容。同时,微博平台会显示热门话题和热门搜索,方便用户了解当前社会热点和热议话题。\n\n转发和评论: 用户可以对其他用户的微博进行转发和评论,形成互动。这种互动机制使得信息在用户之间更广泛传播,也促进了用户之间的交流。\n\n认证和大V: 微博上一些具有影响力的用户或机构可以进行认证,称为“大V”(V即“认证”),表示其身份的真实性。大V通常有更多的粉丝,并且其言论和动态更容易引起关注。\n\n直播: 微博支持用户进行实时直播,用户可以通过直播与粉丝互动,分享自己的生活、技能或观点。\n\n微博支付: 微博还提供了微博支付功能,用户可以通过微博平台进行购物、转账等金融交易。\n\n个人主页: 每个用户都有自己的个人主页,展示个人信息、发布的微博、关注和粉丝等。用户可以通过个人主页展示自己的兴趣爱好和生活状态。\n\n隐私设置: 微博提供了一系列隐私设置,用户可以控制自己的微博内容对外可见的程度,保护个人隐私。\n\n微博是中国社交媒体领域的重要平台之一,通过其开放的信息传播和社交互动机制,吸引了大量用户,成为用户获取新闻、参与讨论、分享生活的重要工具。", + "api": [ + { + "ADB Command": "adb shell am start -n com.sina.weibo/.SplashActivity\n", + "Function Description": "启动微博主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d sinaweibo://user?uid=用户UID com.sina.weibo\n", + "Function Description": "打开特定用户的微博页面", + "Parameter Information": "替换 用户UID 为实际用户的UID。" + }, + { + "ADB Command": "adb shell am start -n com.sina.weibo/.MainTabActivity --es extra_show_tab \"MESSAGE\"\n", + "Function Description": "打开微博消息界面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "抖音", + "name_en": "douyin", + "package": "com.ss.android.ugc.aweme", + "category": "影音视听", + "function_description": "抖音是一款由字节跳动(TikTok)推出的短视频分享应用。它允许用户通过手机摄像头录制15秒到60秒的短视频,然后可以添加音乐、特效、滤镜等,最终分享给其他用户。以下是抖音的主要特点和功能:\n\n短视频创作: 抖音主打短视频创作,用户可以录制15秒到60秒的短视频,展示自己的才艺、创意或生活日常。这种短时视频格式使得内容更为精炼、生动。\n\n音乐配音: 抖音内置了丰富的音乐库,用户可以在录制视频时选择并添加自己喜欢的音乐,从而增添视频的节奏感和趣味性。\n\n特效和滤镜: 抖音提供各种特效和滤镜,用户可以在录制或后期编辑时使用,使视频更富创意和艺术效果。\n\n挑战活动: 抖音定期推出各种挑战活动,用户可以参与这些挑战,制作符合主题的短视频,与其他用户互动,促进用户创作和参与度。\n\n用户互动: 用户可以互相关注,点赞、评论和分享其他用户的视频,形成社交网络。这种互动机制使得用户之间能够更紧密地连接,并促使更多的用户参与创作和分享。\n\n个性化推荐: 抖音通过智能算法分析用户的观看历史和行为,为用户推荐个性化的短视频内容,提高用户在平台上的留存和参与度。\n\n直播功能: 抖音还提供了直播功能,用户可以在实时直播中与粉丝互动,接收礼物,实现实时互动和变现。\n\n商业合作: 抖音平台吸引了许多品牌和明星,他们通过在抖音上发布宣传内容,与用户进行互动,推动品牌营销和推广。\n\n国际化: 抖音是一款在全球范围内广受欢迎的应用,根据用户所在地区,提供相应语言的内容和服务,因此在国际社交媒体市场上也占有一席之地。", + "api": [ + { + "ADB Command": "adb shell am start -n com.ss.android.ugc.aweme/.main.MainActivity\n", + "Function Description": "打开抖音到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.ss.android.ugc.aweme/.share.OpenPlatformShareRealActivity\n", + "Function Description": "打开分享活动", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -c android.intent.category.DEFAULT -d \"taobao://detail.aweme.sdk.com\"\n", + "Function Description": "处理淘宝链接", + "Parameter Information": "taobao://detail.aweme.sdk.com 替换为任何和淘宝相关的链接" + } + ] + }, + { + "name_ch": "小米视频", + "name_en": "xiaomivedio", + "package": "com.miui.video", + "category": "影音视听", + "function_description": "小米视频是小米公司推出的一款在线视频播放应用。以下是小米视频的一些主要特点和功能:\n\n丰富的视频内容: 小米视频提供了大量的视频内容,包括电影、电视剧、综艺、动漫、纪录片等,涵盖了多种不同类型的娱乐内容。\n\n高清播放: 小米视频支持高清视频播放,用户可以在平台上观看高质量的影片,享受更良好的视听体验。\n\n离线缓存: 用户可以通过小米视频的离线缓存功能,将喜欢的视频下载到本地,方便在无网络的情况下观看。\n\n个性化推荐: 小米视频通过算法分析用户的观看历史和喜好,向用户推荐个性化的视频内容,提高用户发现感兴趣节目的几率。\n\n追剧提醒: 用户可以关注自己喜欢的电视剧,小米视频会提供更新提醒,确保用户不会错过最新的剧集。\n\n跨平台同步: 小米视频支持跨平台同步观看进度,用户可以在不同的设备上切换,继续观看之前的视频。\n\n付费会员服务: 小米视频提供了付费会员服务,会员可以享受更多的专属权益,如独家内容、先行观看等。\n\n与小米生态产品的整合: 小米视频可以与小米生态链中的其他产品进行整合,例如小米电视、小米盒子等,以提供更全面的视频娱乐体验。", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.SEARCH -n com.miui.video/.feature.mine.setting.SettingActivity", + "Function Description": "此命令在小米视频应用内执行搜索操作", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.video/.Launcher1", + "Function Description": "启动小米视频主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.video/.localvideoplayer.LocalPlayerActivity -a duokan.intent.action.VIDEO_PLAY -d content://path/to/video", + "Function Description": "播放本地视频文件", + "Parameter Information": "//path/to/video 替换为本地视频文件的路径" + } + ] + }, + { + "name_ch": "小米商城", + "name_en": "xiaomishop", + "package": "com.xiaomi.shop", + "category": "时尚购物", + "function_description": "在小米商城,你可以随时随地购买小米官方正品、了解最新鲜的新品信息、参与享受各类活动优惠、查看即时物流、评价和分享喜欢的商品、查询附近的小米之家。小米商城同时为米粉们提供高品质客户服务及售后支持。\n", + "api": [ + { + "ADB Command": "adb shell am start -n com.xiaomi.shop/.activity.MainTabActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "游戏中心", + "name_en": "gamecenter", + "package": "com.xiaomi.gamecenter", + "category": "实用工具", + "function_description": "小米游戏中心——为米粉打造的专属手游社区\n 【新】最新鲜的首发、预约、内测好游随时体验,最及时游戏动态尽在掌握。\n 【热】热门游戏、热门礼包、热门资讯、热门话题,打造最热手游平台。\n 【全】全方位收录各种游戏,一定能找到你爱的那款;全面丰富的各种攻略,无论是新手还是老司机,都能自由畅玩。\n ※首页推荐\n 个性化推荐,与你的梦中情游不期而遇;分类清晰,帮你找到真爱好游。\n ※云游戏\n 不用下载就能玩!省电省内存,每天赠送90分钟时长。\n ※社区\n 囊括玩家交流、游戏攻略、福利活动的多功能论坛。\n ※攻略站\n 汇集专业攻略组各路大神,提供海量原创优质攻略。\n ※福利\n 尽享大额充值返利和优惠券,专属礼包领不停,更有机会赢小米明星产品。" + }, + { + "name_ch": "米家", + "name_en": "smarthome", + "package": "com.xiaomi.smarthome", + "category": "居家生活", + "function_description": "米家APP是你家里的智能硬件管理平台,不仅连接小米及生态链公司的智能产品,同时也开放接入第三方智能硬件,还有精品生活电商及新鲜酷玩资讯,为用户提供智能生活整体解决方案。你可以简单便捷地通过手机与智能硬件交互,并实现智能硬件之间的互联互通。一键实现个性化定制的智能场景,与家人朋友分享智能设备,在这里变得非常简单。你与智能生活,只差一个米家APP的距离。\n 应用特点:\n  联动操控,轻松易用\n 可快速掌握的设备添加与操作,实现智能设备间互联互通\n  个性定制,随你喜好\n 按照自己的使用习惯,设置个性化的智能场景\n  设备分享,乐趣传递\n 把设备分享给家人朋友,共同感受科技乐趣\n  小米有品,精品商城\n 小米旗下精品生活电商,也可下载“小米有品”独立APP", + "api": [ + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.SmartHomeMainActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.device.DeviceListActivity", + "Function Description": "启动设备列表", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.device.control.DeviceControlActivity", + "Function Description": "打开设备控制界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.xiaomi.smarthome/.smartscene.SmartSceneActivity", + "Function Description": "打开智能场景设置", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb logcat | grep com.xiaomi.smarthome", + "Function Description": "查看设备日志", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "多看", + "name_en": "duokan", + "package": "com.duokan.reader", + "category": "图书阅读", + "function_description": "多看阅读,小米官方出品,国内优秀的移动阅读平台,以优质的内容与排版广受好评,获得用户青睐!\n 【天天免费】\n 精品好书天天免费看;每日签到奖励拿不停\n 【买贵不怕】\n 读者保障计划:7天内降价自动退差价\n 【超全书库】\n 正版精品图书、网文神作,供你选择\n 【酷炫功能】\n 支持TXT、PDF阅读,导入阅读更方便;分页、笔记、书摘、注释、字典……提供多种阅读功能\n 【精品体验】\n 每位编辑用工匠精神打造每本书,图文并茂,给你精品阅读体验", + "api": [ + { + "ADB Command": "adb shell am start -n com.duokan.reader/.DkReaderActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d <filepath> -t application/epub+zip com.duokan.reader/.DkReaderActivity", + "Function Description": "打开特定格式的文件", + "Parameter Information": "<filepath>替换为文件地址,例如file:///path/to/your/book.epub" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEARCH -n com.duokan.reader/.DkReaderActivity --es query \"<搜索关键词>\"", + "Function Description": "搜索小说", + "Parameter Information": "<搜索关键词>替换为实际的搜索词" + } + ] + }, + { + "name_ch": "小米有品", + "name_en": "Xiaomiyoupin", + "package": "com.xiaomi.youpin", + "category": "时尚购物", + "function_description": "【小米有品】是【小米】旗下新生活方式电商,致力于成为新中产优选的精品电商平台,于2018年5月独立上线。在2022年,秉承小米有品人与小米有品用户群体“热爱生活、乐于发现”的共同精神,将[小米有品 发现好东西」作为全新品牌理念。\n \n 小米有品坚持依从小米产品观选品及育品,为用户提供具备高品质、高颜值、科技感的好产品,为生活提供全场景解决方案。\n \n 目前,小米有品中共有智能家居、餐厨器具、日用清洁、宠物生活等18大品类,10000+款商品在售,涵盖生生活的方方面面。\n \n 【小米新品全在售】小米手机、小米电视、小米音箱、小米空调、净化器、洗衣机、平衡车、电动车、摄像头、小米电脑、路由器等全系小米商品货品充足,官方渠道,正价保真!\n 【科技新品众筹尝鲜】前沿炫酷的科技智能商品精彩纷呈,大小家电、厨电、卫浴、…脑洞大开,创意无限!\n 【优选科技生活好物】小小指甲刀、超软乎毛巾、透气吸汗袜、…优选日用商品,科技感好物款款贴心!", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.youpin/.activity.SplashActivity -d \"youpin://\"", + "Function Description": "打开小米有品的主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.youpin/.activity.SplashActivity -d \"http://app.youpin.mi.com\"", + "Function Description": "在小米有品应用内打开指定的HTTP链接", + "Parameter Information": "将http://app.youpin.mi.com替换为目标页面的链接" + } + ] + }, + { + "name_ch": "高德地图", + "name_en": "minimap", + "package": "com.autonavi.minimap", + "category": "旅行交通", + "function_description": "高德地图是一款由中国科技公司高德软件推出的地图及导航应用程序。以下是高德地图的一些主要特点和功能:\n\n导航服务: 高德地图提供实时导航服务,包括驾车导航、步行导航和骑行导航。用户可以输入目的地,获得详细的导航路线和语音引导,帮助用户安全、便捷地到达目的地。\n\n实时交通信息: 高德地图整合了实时的交通信息,包括路况、拥堵情况、交通事故等。这有助于用户选择最佳的出行路线,避免拥堵和延误。\n\n公共交通查询: 用户可以使用高德地图查询公共交通线路和站点信息,包括地铁、公交车、轻轨等,以便更方便地规划乘车路线。\n\n位置共享: 用户可以通过高德地图实时共享自己的位置信息,方便朋友或家人了解到用户的实时位置,实现实时的位置共享服务。\n\n地图搜索: 高德地图提供强大的地图搜索功能,用户可以搜索感兴趣的地点、商家、景点等,并获得详细的信息,包括地址、联系方式、评价等。\n\n周边服务: 高德地图可以帮助用户发现周边的餐厅、酒店、购物中心等各类生活服务设施,提供详细的信息和评价。\n\n室内地图: 高德地图提供一些大型商场、机场、火车站等室内地图,方便用户在室内快速定位和导航。\n\n城市出行服务: 在一些大城市,高德地图还提供共享单车、共享汽车、打车服务等,方便用户选择多种交通工具。\n\n地图数据更新: 高德地图会定期更新地图数据,包括道路变更、新建筑物等,以确保用户获取到准确的地图信息。\n\n全球服务: 虽然在中国市场使用较为广泛,高德地图也在国际范围内提供服务,支持多国语言,方便国际用户使用。", + "api": [ + { + "ADB Command": "adb shell am start -n com.autonavi.minimap/com.autonavi.map.activity.SplashActivity", + "Function Description": "启动主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d amapuri://route/plan/?dname=<目的地> com.autonavi.minimap", + "Function Description": "搜索从当前位置到目的地位置的路线导航", + "Parameter Information": "替换 <目的地> 为您想搜索的位置的名称" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d geo:纬度,经度?z=缩放级别&q=搜索关键词 com.autonavi.minimap", + "Function Description": "附近推荐搜索", + "Parameter Information": "替换 纬度 和 经度 为您当前位置的坐标。\n缩放级别 可以根据您的需求调整。\n搜索关键词 可以替换为您想搜索的内容,如“餐厅”、“咖啡馆”等" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d geo:纬度,经度 com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity", + "Function Description": "使用地理位置打开地图", + "Parameter Information": "替换 纬度 和 经度 为实际的坐标值。" + } + ] + }, + { + "name_ch": "今日头条", + "name_en": "articlenews", + "package": "com.ss.android.article.news", + "category": "新闻资讯", + "function_description": "今日头条(Toutiao)是一家由字节跳动(ByteDance)推出的短视频和新闻资讯平台,以其个性化推荐和算法驱动的内容分发而著称。以下是今日头条的一些主要特点和功能:\n\n个性化推荐: 今日头条利用先进的算法技术,分析用户的浏览历史、点赞、分享等行为,为用户提供个性化的新闻资讯和短视频内容,致力于满足用户的个性化阅读和观看需求。\n\n新闻资讯: 今日头条汇聚了丰富的新闻内容,涵盖了国际、国内、科技、娱乐、体育、财经等多个领域。用户可以通过头条浏览最新、热门的新闻资讯。\n\n短视频平台: 今日头条拥有短视频平台,用户可以浏览、上传和分享15秒到60秒的短视频内容。这使得用户可以通过轻松、生动的方式获取和分享有趣的视频内容。\n\n社交互动: 用户可以在今日头条上进行社交互动,点赞、评论、分享喜欢的内容。此外,今日头条还提供了用户关注、粉丝等社交关系的构建,形成了一个社交化的新闻和娱乐平台。\n\n小说阅读: 今日头条还提供了小说阅读服务,用户可以在平台上阅读小说、连载小说等。\n\n广告和变现: 作为一家商业化平台,今日头条通过广告变现,向广告主提供了在平台上推广品牌和产品的机会。\n\n直播服务: 今日头条还提供了直播服务,允许用户通过平台进行实时的视频直播,包括游戏直播、生活分享等。\n\n全球服务: 尽管总部位于中国,但今日头条已经开始在国际市场上推广,推出了海外版的应用,为全球用户提供了多语言支持的服务。\n\n知识付费: 今日头条推出了知识付费服务,用户可以通过购买付费内容获取专业知识、技能培训等高质量内容。", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.ss.android.article.news/com.bytedance.news.schema.AdsAppActivity -d \"snssdk141://特定内容\"", + "Function Description": "此命令用于打开头条新闻应用并查看特定Scheme的内容", + "Parameter Information": "将特定内容换为你感兴趣的主题" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -n com.ss.android.article.news/com.bytedance.ug.diversion.DyNewSearchActivity", + "Function Description": "进入搜索页面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "小米天气", + "name_en": "weather", + "package": "com.miui.weather2", + "category": "实用工具", + "function_description": "亲近自然,不必只在窗前\n\n 感受真实的力量\n -将自然、极具生命力的气候元素融入App,在指尖即可感受气候变化,欣赏阴晴雨雪之美。\n -将自然、极具生命力的气候元素融入应用程序,在指尖即可感受气候变化,欣赏阴晴雨雪之美。\n\n 瞬时动人,久久倾心\n -我们通过模拟生态,演绎自然。让你只需轻轻按住屏幕,就能感受时间凝固于指尖的美丽,悬停的雨滴,变化的霞光.\n\n 全面贴心服务\n -15天天气气预报:提供未来15天的天气现象、温度、空气质量、风况等信息。\n -24小时天气预报:逐小时展示未来24小时的天气现象、温度、空气质量、风况等信息.\n -空气质量:提供未来24小时、15天的空气质量预报、空气中污染物浓度的高低.\n -2小时降水概率:及时、精准预测所在街道未来2小时每分钟降雨变化。\n -生活指数:提供未来3天的穿衣建议、防晒建议、运动、限行等实用生活信息.\n -城市管理:查询天气更快捷,管理城市更方便。", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d weather://weather2.miui.com/main com.miui.weather2/.ActivityWeatherMain\n", + "Function Description": "打开天气APP的主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.EDIT -d weather://details com.miui.weather2/.view.EditDeeplinkActivity\n", + "Function Description": "编辑天气详情页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.weather.widget_city_manager com.miui.weather2/.ActivitySearchCity", + "Function Description": "搜索城市,添加新城市的天气", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d weather://weather2.miui.com/dailyforcast/detail com.miui.weather2/.ActivityDailyForecastDetail", + "Function Description": "查看当前城市的天气详情", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a miui.intent.action.weather -d weather://weather2.miui.com/dailyforcast/detail com.miui.weather2/.ActivityDailyForecastDetail", + "Function Description": "查看特定日期的天气预报", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "计算器", + "name_en": "Calculator", + "package": "com.miui.calculator", + "category": "实用工具", + "function_description": "好用的全能计算器\n 小米计算器,操作简单,集普通计算、科学计算、汇率计算及单位换算等为一体,帮你解决生活中的各种计算难题。\n 1.普通计算:算式编辑、历史结果查看、结果转中文大写;\n 2.科学计算:三角函数、对数等,角度弧度切换;3.汇率计算:汇率实时更新、币种之间任意切换;\n 4.房贷计算:支持商业贷款、公积金贷款、组合贷款,支持查看贷款明细;\n 5.个税计算:工资计算、公积金计算;\n 6.单位换算:长度、面积、体积、温度、速度、时间、重量转换;\n 7.亲戚称呼计算:七大姑八大姨都知道,三姑六婆都能算,过年必备。", + "api": [ + { + "ADB Command": "adb shell am start -n com.miui.calculator/.cal.CalculatorActivity", + "Function Description": "启动计算器主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.SCIENTIFIC_MODE", + "Function Description": "启动科学计算器模式", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.miui.calculator/.convert.CurrencyActivity", + "Function Description": "打开货币转换功能", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.TAX", + "Function Description": "打开房贷计算器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.miui.calculator.action.MORTGAGE", + "Function Description": "打开税务计算器", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "时钟", + "name_en": "Clock", + "package": "com.android.deskclock", + "category": "实用工具", + "function_description": "系统官方时钟\n 1.主要功能:支持快速新建闹钟、查看世界时间、设置秒表、倒计时等功能\n ⒉.特色功能:支持关机闹钟、设置动态铃声等特色功能", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.SET_ALARM --ei android.intent.extra.alarm.HOUR <x> --ei android.intent.extra.alarm.MINUTES <y>", + "Function Description": "Triggers an intent to open the alarm clock application with a pre-filled time for setting a new alarm.", + "Parameter Information": "Replace <x> with the hour and <y> with the minutes for the alarm time. For example, for an alarm set at 7:15, <x> would be 7 and <y> would be 15." + }, + { + "ADB Command": "adb shell am start -n com.android.deskclock/.DeskClockTabActivity\n", + "Function Description": "启动时钟到主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.EDIT -d deskclock://details/edit", + "Function Description": "编辑世界时钟", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d deskclock://deskclock.android.com/main/SettingsActivity", + "Function Description": "打开时钟设置,铃声、音量、响铃时长", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.android.deskclock.shortcut.START_TIMER", + "Function Description": "启动计时器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a com.android.deskclock.shortcut.STOP_WATCH", + "Function Description": "启动秒表", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "应用商店", + "name_en": "Appmarket", + "package": "com.xiaomi.market", + "category": "实用工具", + "function_description": "小米应用商店是由小米推出的手机软件商店合集,致力于成为全面、优质的手机游戏应用商店,在这里用户可以找到最新最好玩的手机app和游戏应用,并提供软件商店app下载。", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.ui.MarketTabActivity -d \"mimarket://home\"", + "Function Description": "打开应用商城主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.SEARCH -n com.xiaomi.market/.ui.MarketPreferenceActivity", + "Function Description": "打开应用商店设置页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.ui.JoinActivity -d \"mimarket://search\"", + "Function Description": "打开商城搜索页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.xiaomi.market/.business_ui.useragreement.basicmode.BasicModeAgreementActivity -d \"mimarket://agreement/basicmode\"", + "Function Description": "进入商城模式选择页面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "日历", + "name_en": "Calendar", + "package": "com.android.calendar", + "category": "实用工具", + "function_description": "日历全新改版,界面清爽简洁\n 日历全新改版,界面清爽简洁,助您更方便地查看日历和管理日程。\n 【功能简介】\n 全面覆盖农历、节日和班休信息;\n 你可以创建日程、生日、纪念日、倒数日等事件,所有安排一目了然,重要日子不再错过\n 支持登陆同一小米账号的手机、pad实时同步。【产品特点】\n 支持月视图、周视图、年视图随意切换,满足不同需求;界面清爽、操作简便,最大限度提高您的使用效率;持续聆听米粉的声音,不断优化日历功能及服务。\n", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.item/event -e \"title\" <x> --es \"beginTime\" \"<startTimestamp>\" --es \"endTime\" \"<endtimestamp>\"", + "Function Description": "Create a new calendar event with pre-populated title", + "Parameter Information": "Replace <x> with the event title, <start timestamp> and <end timestamp> are replaced with the timestamps of the event's start and end times respectively" + } + ] + }, + { + "name_ch": "文件管理", + "name_en": "Fileexplorer", + "package": "com.android.fileexplorer", + "category": "实用工具", + "function_description": "小米澎湃OS文件管理产品优势:\n ★分类直观:极速扫描文件,文件自动整理\n ★智能搜索:自动提示关键词,搜索结果即刻呈现\n ★功能丰富:FTP远程管理,大文件清理,支持所有基础文件操作\n 功能特点∶\n 一应用来源:文件按照应用自动分类,扫一眼就知道文件身份!\n 文件搜索:智能关键词更懂你,秒现搜索结果\n 轻松操作:支持文件多选,直接安装应用程序,复制、剪切、重命名文件等操作更简单\n ~压缩/解压:支持创建ZIP压缩包,解压加密的ZIP和RAR", + "api": [ + { + "ADB Command": "adb shell am start -n com.android.fileexplorer/.FileExplorerTabActivity", + "Function Description": "启动文件管理器", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d <file path> -t <file type>", + "Function Description": "打开特定文件类型", + "Parameter Information": "将<file path>替换为目标文件的绝对路径, 例如file:///path/to/your/file.pdf <file type>替换为目标文件的类型,例如:application/pdf" + }, + { + "ADB Command": "adb shell am start -a com.android.fileexplorer.search -d content://com.android.fileexplorer.myprovider/search_suggest_query?query=<YourSearchQuery>", + "Function Description": "搜索文件", + "Parameter Information": "将<YourSearchQuery>替换为匹配条件" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.GET_CONTENT -t */*", + "Function Description": "启动一个内容选择器,允许用户在设备上选择任何类型的文件。", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "大众点评", + "name_en": "Dianping", + "package": "com.dianping.v1", + "category": "", + "function_description": "大众点评是中国一家知名的本地生活服务平台,为用户提供丰富的商家信息、用户评价和优惠信息。以下是大众点评的一些主要特点和功能:\n\n商家信息: 大众点评汇聚了各类本地商家的信息,包括餐厅、酒店、美容美发、电影院、购物商场等。用户可以在平台上查找商家的详细信息,包括地址、电话、营业时间等。\n\n用户评价: 用户可以在大众点评上对自己在商家消费的体验进行评价,包括对服务、环境、菜品等方面的评分和文字评价。这为其他用户提供了参考,帮助他们做出更明智的消费决策。\n\n照片和晒单: 用户可以上传照片,展示他们在商家消费时的实际情况,包括菜品、环境等。同时,用户还可以发布晒单,分享自己的消费心得,进一步丰富了用户之间的信息交流。\n\n优惠券和团购: 大众点评经常推出各类优惠券和团购活动,用户可以在平台上购买优惠券或参与团购,享受折扣和特价服务。\n\n线上预订和点餐: 部分商家支持在大众点评平台上进行线上预订或点餐,提高了用户的便捷体验,尤其在高峰时段避免等待。\n\n定位和导航: 大众点评支持使用手机的定位功能,帮助用户找到附近的商家,并提供导航服务,方便用户到达目的地。\n\n会员服务: 大众点评推出了会员服务,会员用户可以享受一些专属优惠和权益,例如积分兑换、生日特权等。\n\n广告推广: 商家可以通过在大众点评上购买广告推广服务,提高他们的曝光度和客流量,吸引更多用户关注。\n\n城市服务: 大众点评覆盖了全国各大城市,用户可以在不同城市查找当地的商家信息和服务。\n\nApp和网页平台: 大众点评提供了手机App和网页两种平台,用户可以根据自己的喜好选择不同的访问方式。\n\n总体来说,大众点评通过整合商家信息、用户评价和优惠信息,为用户提供了一个便捷的本地生活服务平台,帮助用户更好地选择和享受周围的各类服务。", + "api": [ + { + "ADB Command": "adb shell am start -n com.dianping.v1/.NovaMainActivity -d \"dianping://home\"", + "Function Description": "打开主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.dianping.v1/.NovaMainActivity -d \"dianping://me\"", + "Function Description": "打开个人中心页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.dianping.v1/com.meituan.android.trafficayers.webview.TrafficKNBWebViewActivity -d \"dianping://www.dianping.com\"", + "Function Description": "此命令尝试在大众点评应用内打开一个特定的网页。", + "Parameter Information": "替换dianping://www.dianping.com,为要打开的目标网页" + } + ] + }, + { + "name_ch": "去哪儿", + "name_en": "Qunar", + "package": "com.Qunar", + "category": "", + "function_description": "去哪儿网(Qunar.com),它是中国一家知名的在线旅行服务平台。以下是去哪儿网的一些主要特点和功能:\n\n机票预订: 去哪儿网提供国际国内机票的查询和预订服务。用户可以在平台上搜索各种航班信息,比较价格,选择适合自己的机票。\n\n酒店预订: 用户可以通过去哪儿网搜索并预订全球范围内的酒店。平台提供了各种类型和档次的酒店选择,用户可以根据需求筛选。\n\n火车票预订: 在中国境内,去哪儿网也提供火车票查询和预订服务。用户可以查询火车票余票、价格,然后在线购票。\n\n度假产品: 去哪儿网还提供度假产品的预订服务,包括旅游套餐、签证服务、邮轮旅行等。\n\n旅游攻略: 用户可以在去哪儿网上获取旅游目的地的攻略信息,了解景点介绍、当地美食、交通指南等。\n\n自由行服务: 去哪儿网为用户提供自由行的服务,包括机票、酒店、当地交通等的组合预订,方便用户自主安排行程。\n\n特价活动: 平台经常推出各种机票、酒店、度假产品的特价活动,用户可以通过去哪儿网获取优惠价格。\n\nAPP和网页平台: 去哪儿网提供了手机App和网页两个平台,用户可以选择不同的方式访问和使用服务。\n\n在线客服: 去哪儿网提供在线客服服务,用户可以通过平台内的客服渠道获取帮助和解答问题。\n\n支付方式: 去哪儿网支持多种支付方式,包括信用卡、支付宝、微信支付等,方便用户完成交易。", + "api": [ + { + "ADB Command": "adb shell monkey -p com.Qunar -c android.intent.category.LAUNCHER 1", + "Function Description": "启动去哪儿旅行到主界面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "笔记", + "name_en": "notes", + "package": "com.miui.notes", + "category": "", + "function_description": "笔记是一种用于记录、保存个人信息、想法、任务清单等简短文本的应用程序。基本特点和功能:\n\n文本记录: 便签应用通常允许用户输入文本,记录各种信息,如备忘录、灵感、任务等。\n\n简单编辑功能: 用户可以对文本进行简单的编辑,包括文字样式、颜色、列表格式等。\n\n分类和标签: 为了更好地组织和查找便签,应用通常提供分类和标签功能,使用户可以根据主题或类型整理便签。\n\n提醒和闹钟: 一些便签应用允许用户设置提醒和闹钟,以确保不会错过重要的任务或事件。\n\n云同步: 为了跨设备使用和备份,许多便签应用支持云同步功能,使用户可以在不同设备之间同步便签内容。\n\n插图和附件: 一些便签应用允许用户插入图片、声音录音或其他附件,以增强便签的信息表达能力。\n\n搜索功能: 为了方便用户查找特定的便签,应用通常提供搜索功能,使用户能够快速找到需要的信息。\n\n安全性: 一些便签应用提供安全性选项,例如密码保护或指纹识别,以确保敏感信息的隐私安全。\n\n分享和导出: 用户可以通过便签应用分享便签内容,也可以导出为文本文件或其他格式,以便在其他应用中使用。\n\n手写或绘图: 一些便签应用支持手写输入或绘图功能,使用户可以以更直观的方式记录信息。\n\n即时同步: 当用户进行编辑或添加便签时,一些应用支持即时同步,确保在不同设备上看到最新的便签内容。\n\n提供小工具: 一些操作系统还支持将便签应用的小工具添加到主屏幕,以便用户快速查看和编辑重要的便签。", + "api": [ + { + "ADB Command": "adb shell am start -a com.miui.todo.shortcut.action.INSERT_OR_EDIT -n com.miui.notes/.ui.NotesListActivity", + "Function Description": "此命令用于添加或编辑文本或音频便签", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.INSERT_OR_EDIT -n com.miui.notes/.ui.activity.CreateDoodleNoteBridgeActivity", + "Function Description": "此命令用于创建涂鸦类型的便签", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.miui.notes/.ui.NotesListActivity", + "Function Description": "此命令用于查看文本或电话便签", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "照片", + "name_en": "gallery", + "package": "com.miui.gallery", + "category": "", + "function_description": "照片编辑: 照片应用通常提供基本的照片编辑功能,如裁剪、旋转、调整亮度、对比度和色彩等。一些应用还提供滤镜、贴纸、涂鸦等更高级的编辑选项。\n\n相册组织: 照片应用允许用户创建相册或文件夹,以更好地组织和管理他们的照片。这可以是按照时间、地点或主题进行组织。\n\n分享功能: 用户可以通过照片应用分享照片到社交媒体、聊天应用或云存储服务。一些应用还提供直接共享到特定平台的选项。\n\n云同步: 为了防止照片丢失,很多照片应用支持云同步功能,将照片备份到云端存储服务中,以便在不同设备上同步和访问。", + "api": [ + { + "ADB Command": "adb shell am start -n com.miui.gallery/.activity.HomePageActivity", + "Function Description": "启动小米相册应用的主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -d [file_uri] -t [mime_type] com.miui.gallery", + "Function Description": "查看相册中的特定图片或视频", + "Parameter Information": "替换[file_uri]为图片或视频的文件URI,替换[mime_type]为相应的MIME类型,如image/jpeg或video/mp4。" + }, + { + "ADB Command": "adb push /path/to/your/image.jpg /sdcard/DCIM/Camera/\n", + "Function Description": "导入照片到默认相册", + "Parameter Information": "/path/to/your/image.jpg /sdcard/DCIM/Camera/ 分别为源和目标路径" + }, + { + "ADB Command": "adb pull /sdcard/DCIM/Camera/your_image.jpg /path/to/destination/\n", + "Function Description": "导出照片到设备", + "Parameter Information": "/sdcard/DCIM/Camera/your_image.jpg 替换为照片路径 /path/to/destination/ 为目标路径" + } + ] + }, + { + "name_ch": "短信", + "name_en": "mms", + "package": "com.android.mms", + "category": "", + "function_description": "手机上的短信应用(短信APP)是用于发送和接收短信消息的应用程序。以下是一般情况下短信应用的一些基本功能:\n\n发送和接收短信: 短信应用的主要功能是允许用户发送和接收短信消息。用户可以通过输入文字、表情符号等方式撰写消息,并选择联系人发送。\n\n群发短信: 一些短信应用支持群发功能,允许用户同时向多个联系人发送相同的消息。\n\n多媒体消息: 短信应用通常支持发送包括图片、音频、视频等在内的多媒体消息,而不仅限于纯文本。\n\n彩信: 彩信是一种富媒体短信,可以包含图片、声音、文本等。短信应用通常支持发送和接收彩信。\n\n查看消息状态: 用户可以查看消息的发送状态,包括是否已送达、是否已读等。通常,未读消息会在通知栏中显示提醒。\n\n短信备份和还原: 一些短信应用支持将短信消息备份到云端或本地存储,以防止意外数据丢失,并且在需要时可以还原。\n\n垃圾短信过滤: 为了减少垃圾信息的干扰,一些短信应用提供垃圾短信过滤功能,可以自动屏蔽或移动垃圾短信到专门的文件夹中。\n\n主题和定制: 一些短信应用允许用户自定义短信主题、背景、字体颜色等,以个性化用户的消息体验。\n\n短信搜索: 用户可以通过短信应用搜索关键词,以方便查找和定位特定的消息记录。\n\n兼容性: 短信应用通常与手机操作系统兼容,可以与其他通信应用(如电话、联系人)集成使用。\n\n阅读回执: 一些短信应用支持阅读回执功能,即在接收方阅读短信后,发送方可以收到通知。\n\n语音输入: 除了手动输入文字,一些短信应用还支持语音输入,用户可以通过语音录入消息。", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.SEND -n com.android.mms/.ui.ComposeMessageRouterActivity --es sms_body \"消息内容\"", + "Function Description": "此命令仅用于发送纯文本消息", + "Parameter Information": "消息内容 替换为要发送的消息内容" + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.mms/.ui.ComposeMessageRouterActivity -d \"sms://\" --es address \"电话号码\"", + "Function Description": "此命令用于查看或发送SMS消息", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a miui.intent.action.APP_SETTINGS -n com.android.mms/.ui.MessagingPreferenceActivity", + "Function Description": "此命令打开短信应用的设置界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.mms/.ui.ManageSimMessages", + "Function Description": "此命令用于管理SIM卡上的短信", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "联系人", + "name_en": "contacts", + "package": "com.android.contacts", + "category": "", + "function_description": "手机联系人应用(通常称为“通讯录”或“联系人”应用)是用于管理和存储用户联系人信息的应用程序。以下是一般情况下联系人应用的一些基本功能:\n\n添加和编辑联系人: 用户可以通过联系人应用添加新的联系人,并编辑现有联系人的信息。这包括姓名、电话号码、电子邮件地址、生日等。\n\n分组和标签: 联系人应用通常支持将联系人分组或打上标签,以便更好地组织和管理联系人列表。这有助于用户快速找到特定群体的联系人。\n\n搜索功能: 为了方便用户查找特定联系人,联系人应用通常提供搜索功能。用户可以通过姓名、公司、电话号码等关键词来快速找到目标联系人。\n\n联系人同步: 联系人应用通常支持将联系人同步到云端服务,以确保用户在不同设备上使用相同的联系人列表。这使得在更换设备或丢失手机时能够轻松恢复联系人。\n\n头像和个性化: 用户可以为每个联系人添加头像,以使联系人列表更加直观。一些联系人应用还允许用户添加个性化的铃声或提醒设置。\n\n快速拨号: 联系人应用通常与电话应用集成,使用户能够通过联系人应用快速拨打电话。一些应用还支持快捷键或手势,以便更便捷地拨号。\n\n通话记录: 联系人应用通常会显示与每个联系人的通话记录,包括拨入、拨出和未接来电。这有助于用户追踪与联系人的通话历史。\n\n联系人导入和导出: 用户可以通过联系人应用导入和导出联系人,以便从其他设备或服务中导入联系人数据,或将联系人备份到本地或云端存储。\n\n生日提醒: 一些联系人应用提供生日提醒功能,用户可以设置提醒以便在联系人生日到来时发送祝福或提醒。\n\n联系人分享: 用户可以通过联系人应用分享联系人的信息,例如通过短信、邮件或社交媒体。", + "api": [ + { + "ADB Command": "adb shell am start -a android.intent.action.INSERT -n com.android.contacts/.activities.ContactEditorActivity", + "Function Description": "此命令用于插入新的联系人", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.DIAL -n com.android.contacts/.activities.TwelveKeyDialer", + "Function Description": "此命令用于拨打电话号码", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.GET_CONTENT -n com.android.contacts/.activities.ContactPhonePickerActivity --ei type 1", + "Function Description": "此命令用于获取联系人的内容", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -a android.intent.action.VIEW -n com.android.contacts/.activities.NonPhoneActivity", + "Function Description": "此命令用于查看电话记录", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "主题壁纸", + "name_en": "thememanager", + "package": "com.android.thememanager", + "category": "", + "function_description": "小米个性主题,旨在为亿万米粉的小米手机,提供更酷更好玩的视觉和使用体验,让你的手机充满个性与众不同!这里有丰富有趣的主题、壁纸、字体、铃声、彩铃等资源,并有上万名设计师活跃在平台上,持续提供优质内容。\n主题:基于系统深度定制的个性化视觉服务,让你的手机翻天覆地大变样~\n壁纸:海量高清美图,打造手机美术馆~铃声:最新最酷的铃声资源这里都有~\n字体:方正汉仪文鼎等优质字库,总有一款字体适合你~\n", + "api": [ + { + "ADB Command": "adb shell am start -n com.android.thememanager/.ThemeResourceProxyTabActivity", + "Function Description": "打开主界面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.android.thememanager/.search.ThemeSearchActivity", + "Function Description": "打开搜索页面", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell am start -n com.android.thememanager/.activity.ComponentActivity -d theme://customize", + "Function Description": "启动小米主题管理器中的组件活动界面", + "Parameter Information": "No additional parameters required." + } + ] + }, + { + "name_ch": "通用按键", + "name_en": "", + "api": [ + { + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } + ] + } +] \ No newline at end of file diff --git a/agent_for_ui/app_list_MIUI.py b/agent_for_ui/app_list_MIUI.py new file mode 100644 index 0000000000000000000000000000000000000000..7c1926964bc209ae1732805a93d6d9435d11e726 --- /dev/null +++ b/agent_for_ui/app_list_MIUI.py @@ -0,0 +1,181 @@ +app_list = ''' +The following app list will be listed in this format: App Name(ch&en) PackageName Category Function description +-------------- +app list: +[ + { + "name_ch": "携程旅游", + "name_en": "ctrip", + "function_description": "作为业界权威的在线旅行服务公司,携程旅行酒店预订平台覆盖了全球约1400000家酒店;机票产品覆盖300多家国际航空公司;这些航空公司运营着全球各大城市的航班,提供了超过200万条航线,连接了大约200个国家和地区的5000多个城市;在出境游服务上,与约12000个合作伙伴一起为客户提供综合的旅行服务;提供了中国大陆及港澳台地区、欧日韩等境外地区火车票预订;提供国内/国际汽车票预订及城际用车服务,其中国内覆盖3000家以上的车站,提供国内超过410个城市、国外200个国家、80000家门店、700万车辆的自驾服务;提供超实惠的景点门票等预订服务;更有旅游度假、主题高铁游、景点门票优惠、旅游攻略、旅行购物指南、旅行WiFi等一站式旅行服务,助你实现说走就走的旅行梦想。" + }, + { + "name_ch": "喜马拉雅", + "name_en": "ximalaya", + "function_description": "喜马拉雅(Ximalaya)是一款中国知名的在线音频平台,提供广泛的音频内容,包括有声读物、广播剧、相声、音乐、知识类节目等。以下是喜马拉雅App的一些主要特点和功能:\n\n多样化的内容: 喜马拉雅拥有丰富多彩的音频内容,涵盖了众多主题,满足不同用户的兴趣需求。用户可以在平台上找到各种各样的节目,包括小说、情感、历史、科技、教育等。\n\n有声读物: 提供丰富的有声读物资源,包括小说、杂志、经典文学等,用户可以在喜马拉雅上收听到优质的声音表演,使阅读更富有趣味性。\n\n广播剧和相声: 喜马拉雅提供了许多高质量的广播剧和相声节目,让用户在任何时间都能欣赏到精彩的表演。\n\n音乐: 除了有声内容,喜马拉雅还提供了音乐播放功能,用户可以在平台上欣赏到各种音乐风格的歌曲。\n\n知识付费服务: 喜马拉雅也提供了一些知识类付费内容,用户可以通过购买付费课程获取专业的知识和技能。\n\n社交功能: 用户可以在平台上关注自己喜欢的创作者,互动评论,分享喜欢的节目给朋友,形成社区。\n\n个性化推荐: 喜马拉雅通过算法分析用户的听取历史和兴趣,为用户推荐个性化的音频内容,提高用户体验。\n\n离线收听: 用户可以下载自己喜欢的节目,随时随地离线收听,方便在无网络的情况下享受音频内容。" + }, + { + "name_ch": "QQ", + "name_en": "QQ", + "function_description": "QQ是一款由中国科技公司腾讯推出的即时通讯软件,具有丰富的功能,广泛应用于社交、娱乐和工作等方面。以下是QQ主要的功能和特点:\n\n即时通讯: QQ最初是一款即时通讯软件,允许用户通过文本、语音、图片和视频等多种方式进行实时沟通。用户可以与好友、同事以及群组进行聊天。\n\n语音通话和视频通话: QQ支持高质量的语音通话和视频通话功能,用户可以通过网络与其他QQ用户进行语音和视频通讯,无论是个人之间的通话还是群组通话。\n\nQQ空间: QQ空间是用户个人的社交主页,用户可以在空间中发布动态、分享照片、记录生活,同时与好友互动。QQ空间也支持个性化设置,让用户自定义空间的外观和风格。\n\n朋友圈: 类似于社交媒体的朋友圈功能,用户可以在自己的朋友圈中分享文字、图片、链接等内容,与好友分享生活点滴。\n\nQQ邮箱: QQ集成了邮箱服务,用户可以通过QQ邮箱发送和接收电子邮件,并管理邮件联系人。\n\nQQ音乐: QQ音乐是腾讯推出的在线音乐服务,与QQ账号关联,用户可以通过QQ音乐平台听取音乐、创建歌单、分享音乐等。\n\nQQ游戏: QQ游戏是腾讯推出的在线游戏平台,用户可以在QQ上玩各种游戏,并通过QQ账号进行游戏社交。\n\nQQ群组: 用户可以创建和加入各种群组,与群成员进行交流,分享兴趣和信息。QQ群组可以是公开的或私密的,适用于不同的社交需求。\n\nQQ支付: QQ支付是腾讯推出的支付服务,用户可以在QQ中进行在线支付、转账等金融交易。\n\nQQ云: QQ云存储服务允许用户存储和分享文件,还支持文件的同步和备份功能。\n\n总体而言,QQ作为一款多功能的即时通讯软件,涵盖了社交、娱乐、工作等多个方面的需求,成为中国用户日常生活中不可或缺的工具之一。" + }, + { + "name_ch": "拼多多", + "name_en": "pinduoduo", + "function_description": "拼多多(Pinduoduo)是一家中国电商平台,成立于2015年,总部位于上海。它的特色在于通过社交电商模式,通过团购和拼团的方式,帮助用户以更低的价格购买商品。以下是拼多多的主要特点和功能:\n\n社交电商: 拼多多以社交电商为特色,用户可以通过拼团的形式,邀请朋友一起购买商品,以获得更大的优惠。这种社交化的购物模式增加了用户的参与感和互动性。\n\n拼团购买: 用户可以在拼多多平台上发起或参与拼团活动。通过集结多人购买同一商品,用户可以享受到更低的价格,因为商家会给予相应的团购折扣。\n\n农产品直采: 拼多多推动了农产品直采模式,将农产品直接从生产者采购,缩短了供应链,降低了产品价格,同时也帮助了农民增加销售渠道。\n\n低价商品: 拼多多注重销售价格的低廉,吸引了大量追求实惠的用户。平台上有许多价格相对较低的商品,涵盖了各个品类,包括服装、食品、电子产品等。\n\nAPP优化体验: 拼多多一开始主要通过手机应用提供服务,其APP在用户体验和交互方面进行了优化,使得用户可以方便快捷地进行商品浏览、下单和支付等操作。\n\n农村市场: 拼多多在一定程度上注重农村市场,通过线上平台为农村用户提供了更便捷的购物方式,也帮助了一些农村小商家拓展销售渠道。\n\n限时秒杀和特价商品: 拼多多常常推出限时秒杀和特价商品,吸引用户在特定时间内抓住低价优惠。\n\n需要注意的是,拼多多的商业模式在一些方面受到了一些争议,包括一些商品质量的问题和品牌授权的争议。因此,在使用拼多多时,用户需要注意选择可靠的商家和商品,确保购物体验的质量。\n\n\n\n\n\n" + }, + { + "name_ch": "爱奇艺", + "name_en": "iqiyi", + "function_description": "爱奇艺(iQiyi)是中国领先的在线视频平台之一,成立于2010年,总部位于北京。作为中国最大的视频播放平台之一,爱奇艺提供了丰富的视频内容,包括电影、电视剧、综艺节目、动漫、纪录片等,覆盖了广泛的观众群体。以下是爱奇艺的一些主要特点和功能:\n\n视频内容丰富: 爱奇艺拥有大量的正版视频内容,包括热门电影、热播电视剧、各类综艺节目、动画片、纪录片等。用户可以在平台上找到各种各样的节目满足不同的观看需求。\n\n自制内容: 爱奇艺积极投入自制内容的制作,推出了一系列备受关注的自制剧集、综艺节目和独播影片,为用户提供了更多高质量的独家内容。\n\nVIP会员服务: 爱奇艺提供VIP会员服务,VIP会员可以享受到更多的会员专属内容,同时在观看广告时可以获得更好的观看体验。VIP会员还可以提前观看一些热播剧集和综艺节目。\n\n高清播放: 爱奇艺支持高清播放,用户可以在平台上流畅观看高质量的视频内容,无论是在电脑上、手机上还是智能电视上。\n\n离线下载: 用户可以通过爱奇艺的离线下载功能,在有网络的情况下将喜欢的视频下载到本地,随时随地离线观看。\n\n智能推荐: 爱奇艺通过智能算法分析用户的观看历史和喜好,为用户提供个性化的推荐内容,提高用户发现感兴趣节目的几率。\n\n活动和奖励: 爱奇艺经常推出各种活动和奖励机制,例如签到领积分、抽奖等,为用户提供更多的互动和参与机会。\n\n全球覆盖: 爱奇艺不仅在中国市场拥有庞大的用户群体,还致力于拓展国际市场,提供多语言的服务,为全球用户提供优质的视频内容。" + }, + { + "name_ch": "QQ音乐", + "name_en": "QQmusic", + "function_description": "QQ音乐是由中国科技公司腾讯推出的音乐平台,提供丰富的在线音乐服务。以下是QQ音乐的主要特点和功能:\n\n多样的音乐内容: QQ音乐拥有广泛的音乐库,覆盖了各种音乐风格,包括流行、摇滚、电子、古典等,用户可以随时随地欣赏到丰富多彩的音乐。\n\n在线音乐播放: 用户可以通过QQ音乐平台在线播放各种音乐,包括最新的热门歌曲、经典老歌、专辑等。平台支持高品质音乐的在线流媒体播放,提供良好的音频体验。\n\n个性化推荐: QQ音乐通过智能算法分析用户的听歌历史和喜好,向用户推荐个性化的歌曲、专辑和歌手,帮助用户发现新的音乐。\n\n歌单和电台: 用户可以创建自己的歌单,收藏喜欢的歌曲,也可以关注其他用户的歌单。此外,QQ音乐还提供各种风格的电台,用户可以根据自己的喜好选择不同类型的音乐电台。\n\nK歌功能: QQ音乐内置了K歌功能,用户可以录制自己的歌曲并分享给好友,还可以加入其他用户的合唱活动,体验社交K歌的乐趣。\n\n付费会员服务: QQ音乐提供付费会员服务,VIP会员可以享受去广告、离线下载、高品质音乐等特权。付费会员还有机会提前听到一些独家音乐内容。\n\n歌词和MV: 在播放音乐时,QQ音乐会显示歌词,用户可以跟着歌词一同唱歌。对于一些歌曲,还可以观看相关的MV(音乐视频)。\n\n社交互动: QQ音乐与QQ社交平台相互关联,用户可以在QQ音乐上分享自己喜欢的音乐,与好友互动,了解彼此的音乐口味。\n\n总的来说,QQ音乐以其丰富的音乐内容、个性化推荐和社交互动等特点,为用户提供了全面的音乐体验,是中国领先的在线音乐平台之一。" + }, + { + "name_ch": "微博", + "name_en": "weibo", + "function_description": "微博是一种社交媒体平台,提供了用户分享、关注、互动的功能。微博的独特之处在于用户可以发布短文、图片、视频等多媒体内容,并通过关注其他用户建立社交网络。以下是微博的主要特点和功能:\n\n微博发布: 用户可以通过微博平台发布文字、图片、视频等内容,每条微博的字数通常有限,这使得信息传递更为简洁和直接。\n\n关注和粉丝: 用户可以关注其他用户,也可以被其他用户关注。关注的用户的微博动态会出现在自己的首页,形成个性化的信息流。粉丝则是关注自己的其他用户。\n\n话题和热搜: 微博支持用户为自己发布的内容添加话题,用户可以点击话题查看相关的微博内容。同时,微博平台会显示热门话题和热门搜索,方便用户了解当前社会热点和热议话题。\n\n转发和评论: 用户可以对其他用户的微博进行转发和评论,形成互动。这种互动机制使得信息在用户之间更广泛传播,也促进了用户之间的交流。\n\n认证和大V: 微博上一些具有影响力的用户或机构可以进行认证,称为“大V”(V即“认证”),表示其身份的真实性。大V通常有更多的粉丝,并且其言论和动态更容易引起关注。\n\n直播: 微博支持用户进行实时直播,用户可以通过直播与粉丝互动,分享自己的生活、技能或观点。\n\n微博支付: 微博还提供了微博支付功能,用户可以通过微博平台进行购物、转账等金融交易。\n\n个人主页: 每个用户都有自己的个人主页,展示个人信息、发布的微博、关注和粉丝等。用户可以通过个人主页展示自己的兴趣爱好和生活状态。\n\n隐私设置: 微博提供了一系列隐私设置,用户可以控制自己的微博内容对外可见的程度,保护个人隐私。\n\n微博是中国社交媒体领域的重要平台之一,通过其开放的信息传播和社交互动机制,吸引了大量用户,成为用户获取新闻、参与讨论、分享生活的重要工具。" + }, + { + "name_ch": "抖音", + "name_en": "douyin", + "function_description": "抖音是一款由字节跳动(TikTok)推出的短视频分享应用。它允许用户通过手机摄像头录制15秒到60秒的短视频,然后可以添加音乐、特效、滤镜等,最终分享给其他用户。以下是抖音的主要特点和功能:\n\n短视频创作: 抖音主打短视频创作,用户可以录制15秒到60秒的短视频,展示自己的才艺、创意或生活日常。这种短时视频格式使得内容更为精炼、生动。\n\n音乐配音: 抖音内置了丰富的音乐库,用户可以在录制视频时选择并添加自己喜欢的音乐,从而增添视频的节奏感和趣味性。\n\n特效和滤镜: 抖音提供各种特效和滤镜,用户可以在录制或后期编辑时使用,使视频更富创意和艺术效果。\n\n挑战活动: 抖音定期推出各种挑战活动,用户可以参与这些挑战,制作符合主题的短视频,与其他用户互动,促进用户创作和参与度。\n\n用户互动: 用户可以互相关注,点赞、评论和分享其他用户的视频,形成社交网络。这种互动机制使得用户之间能够更紧密地连接,并促使更多的用户参与创作和分享。\n\n个性化推荐: 抖音通过智能算法分析用户的观看历史和行为,为用户推荐个性化的短视频内容,提高用户在平台上的留存和参与度。\n\n直播功能: 抖音还提供了直播功能,用户可以在实时直播中与粉丝互动,接收礼物,实现实时互动和变现。\n\n商业合作: 抖音平台吸引了许多品牌和明星,他们通过在抖音上发布宣传内容,与用户进行互动,推动品牌营销和推广。\n\n国际化: 抖音是一款在全球范围内广受欢迎的应用,根据用户所在地区,提供相应语言的内容和服务,因此在国际社交媒体市场上也占有一席之地。" + }, + { + "name_ch": "小米视频", + "name_en": "xiaomivedio", + "function_description": "小米视频是小米公司推出的一款在线视频播放应用。以下是小米视频的一些主要特点和功能:\n\n丰富的视频内容: 小米视频提供了大量的视频内容,包括电影、电视剧、综艺、动漫、纪录片等,涵盖了多种不同类型的娱乐内容。\n\n高清播放: 小米视频支持高清视频播放,用户可以在平台上观看高质量的影片,享受更良好的视听体验。\n\n离线缓存: 用户可以通过小米视频的离线缓存功能,将喜欢的视频下载到本地,方便在无网络的情况下观看。\n\n个性化推荐: 小米视频通过算法分析用户的观看历史和喜好,向用户推荐个性化的视频内容,提高用户发现感兴趣节目的几率。\n\n追剧提醒: 用户可以关注自己喜欢的电视剧,小米视频会提供更新提醒,确保用户不会错过最新的剧集。\n\n跨平台同步: 小米视频支持跨平台同步观看进度,用户可以在不同的设备上切换,继续观看之前的视频。\n\n付费会员服务: 小米视频提供了付费会员服务,会员可以享受更多的专属权益,如独家内容、先行观看等。\n\n与小米生态产品的整合: 小米视频可以与小米生态链中的其他产品进行整合,例如小米电视、小米盒子等,以提供更全面的视频娱乐体验。" + }, + { + "name_ch": "小米商城", + "name_en": "xiaomishop", + "function_description": "在小米商城,你可以随时随地购买小米官方正品、了解最新鲜的新品信息、参与享受各类活动优惠、查看即时物流、评价和分享喜欢的商品、查询附近的小米之家。小米商城同时为米粉们提供高品质客户服务及售后支持。\n" + }, + { + "name_ch": "游戏中心", + "name_en": "gamecenter", + "function_description": "小米游戏中心——为米粉打造的专属手游社区\n 【新】最新鲜的首发、预约、内测好游随时体验,最及时游戏动态尽在掌握。\n 【热】热门游戏、热门礼包、热门资讯、热门话题,打造最热手游平台。\n 【全】全方位收录各种游戏,一定能找到你爱的那款;全面丰富的各种攻略,无论是新手还是老司机,都能自由畅玩。\n ※首页推荐\n 个性化推荐,与你的梦中情游不期而遇;分类清晰,帮你找到真爱好游。\n ※云游戏\n 不用下载就能玩!省电省内存,每天赠送90分钟时长。\n ※社区\n 囊括玩家交流、游戏攻略、福利活动的多功能论坛。\n ※攻略站\n 汇集专业攻略组各路大神,提供海量原创优质攻略。\n ※福利\n 尽享大额充值返利和优惠券,专属礼包领不停,更有机会赢小米明星产品。" + }, + { + "name_ch": "米家", + "name_en": "smarthome", + "function_description": "米家APP是你家里的智能硬件管理平台,不仅连接小米及生态链公司的智能产品,同时也开放接入第三方智能硬件,还有精品生活电商及新鲜酷玩资讯,为用户提供智能生活整体解决方案。你可以简单便捷地通过手机与智能硬件交互,并实现智能硬件之间的互联互通。一键实现个性化定制的智能场景,与家人朋友分享智能设备,在这里变得非常简单。你与智能生活,只差一个米家APP的距离。\n 应用特点:\n  联动操控,轻松易用\n 可快速掌握的设备添加与操作,实现智能设备间互联互通\n  个性定制,随你喜好\n 按照自己的使用习惯,设置个性化的智能场景\n  设备分享,乐趣传递\n 把设备分享给家人朋友,共同感受科技乐趣\n  小米有品,精品商城\n 小米旗下精品生活电商,也可下载“小米有品”独立APP" + }, + { + "name_ch": "多看", + "name_en": "duokan", + "function_description": "多看阅读,小米官方出品,国内优秀的移动阅读平台,以优质的内容与排版广受好评,获得用户青睐!\n 【天天免费】\n 精品好书天天免费看;每日签到奖励拿不停\n 【买贵不怕】\n 读者保障计划:7天内降价自动退差价\n 【超全书库】\n 正版精品图书、网文神作,供你选择\n 【酷炫功能】\n 支持TXT、PDF阅读,导入阅读更方便;分页、笔记、书摘、注释、字典……提供多种阅读功能\n 【精品体验】\n 每位编辑用工匠精神打造每本书,图文并茂,给你精品阅读体验" + }, + { + "name_ch": "小米有品", + "name_en": "Xiaomiyoupin", + "function_description": "【小米有品】是【小米】旗下新生活方式电商,致力于成为新中产优选的精品电商平台,于2018年5月独立上线。在2022年,秉承小米有品人与小米有品用户群体“热爱生活、乐于发现”的共同精神,将[小米有品 发现好东西」作为全新品牌理念。\n \n 小米有品坚持依从小米产品观选品及育品,为用户提供具备高品质、高颜值、科技感的好产品,为生活提供全场景解决方案。\n \n 目前,小米有品中共有智能家居、餐厨器具、日用清洁、宠物生活等18大品类,10000+款商品在售,涵盖生生活的方方面面。\n \n 【小米新品全在售】小米手机、小米电视、小米音箱、小米空调、净化器、洗衣机、平衡车、电动车、摄像头、小米电脑、路由器等全系小米商品货品充足,官方渠道,正价保真!\n 【科技新品众筹尝鲜】前沿炫酷的科技智能商品精彩纷呈,大小家电、厨电、卫浴、…脑洞大开,创意无限!\n 【优选科技生活好物】小小指甲刀、超软乎毛巾、透气吸汗袜、…优选日用商品,科技感好物款款贴心!" + }, + { + "name_ch": "高德地图", + "name_en": "minimap", + "function_description": "高德地图是一款由中国科技公司高德软件推出的地图及导航应用程序。以下是高德地图的一些主要特点和功能:\n\n导航服务: 高德地图提供实时导航服务,包括驾车导航、步行导航和骑行导航。用户可以输入目的地,获得详细的导航路线和语音引导,帮助用户安全、便捷地到达目的地。\n\n实时交通信息: 高德地图整合了实时的交通信息,包括路况、拥堵情况、交通事故等。这有助于用户选择最佳的出行路线,避免拥堵和延误。\n\n公共交通查询: 用户可以使用高德地图查询公共交通线路和站点信息,包括地铁、公交车、轻轨等,以便更方便地规划乘车路线。\n\n位置共享: 用户可以通过高德地图实时共享自己的位置信息,方便朋友或家人了解到用户的实时位置,实现实时的位置共享服务。\n\n地图搜索: 高德地图提供强大的地图搜索功能,用户可以搜索感兴趣的地点、商家、景点等,并获得详细的信息,包括地址、联系方式、评价等。\n\n周边服务: 高德地图可以帮助用户发现周边的餐厅、酒店、购物中心等各类生活服务设施,提供详细的信息和评价。\n\n室内地图: 高德地图提供一些大型商场、机场、火车站等室内地图,方便用户在室内快速定位和导航。\n\n城市出行服务: 在一些大城市,高德地图还提供共享单车、共享汽车、打车服务等,方便用户选择多种交通工具。\n\n地图数据更新: 高德地图会定期更新地图数据,包括道路变更、新建筑物等,以确保用户获取到准确的地图信息。\n\n全球服务: 虽然在中国市场使用较为广泛,高德地图也在国际范围内提供服务,支持多国语言,方便国际用户使用。" + }, + { + "name_ch": "今日头条", + "name_en": "articlenews", + "function_description": "今日头条(Toutiao)是一家由字节跳动(ByteDance)推出的短视频和新闻资讯平台,以其个性化推荐和算法驱动的内容分发而著称。以下是今日头条的一些主要特点和功能:\n\n个性化推荐: 今日头条利用先进的算法技术,分析用户的浏览历史、点赞、分享等行为,为用户提供个性化的新闻资讯和短视频内容,致力于满足用户的个性化阅读和观看需求。\n\n新闻资讯: 今日头条汇聚了丰富的新闻内容,涵盖了国际、国内、科技、娱乐、体育、财经等多个领域。用户可以通过头条浏览最新、热门的新闻资讯。\n\n短视频平台: 今日头条拥有短视频平台,用户可以浏览、上传和分享15秒到60秒的短视频内容。这使得用户可以通过轻松、生动的方式获取和分享有趣的视频内容。\n\n社交互动: 用户可以在今日头条上进行社交互动,点赞、评论、分享喜欢的内容。此外,今日头条还提供了用户关注、粉丝等社交关系的构建,形成了一个社交化的新闻和娱乐平台。\n\n小说阅读: 今日头条还提供了小说阅读服务,用户可以在平台上阅读小说、连载小说等。\n\n广告和变现: 作为一家商业化平台,今日头条通过广告变现,向广告主提供了在平台上推广品牌和产品的机会。\n\n直播服务: 今日头条还提供了直播服务,允许用户通过平台进行实时的视频直播,包括游戏直播、生活分享等。\n\n全球服务: 尽管总部位于中国,但今日头条已经开始在国际市场上推广,推出了海外版的应用,为全球用户提供了多语言支持的服务。\n\n知识付费: 今日头条推出了知识付费服务,用户可以通过购买付费内容获取专业知识、技能培训等高质量内容。" + }, + { + "name_ch": "小米天气", + "name_en": "weather", + "function_description": "亲近自然,不必只在窗前\n\n 感受真实的力量\n -将自然、极具生命力的气候元素融入App,在指尖即可感受气候变化,欣赏阴晴雨雪之美。\n -将自然、极具生命力的气候元素融入应用程序,在指尖即可感受气候变化,欣赏阴晴雨雪之美。\n\n 瞬时动人,久久倾心\n -我们通过模拟生态,演绎自然。让你只需轻轻按住屏幕,就能感受时间凝固于指尖的美丽,悬停的雨滴,变化的霞光.\n\n 全面贴心服务\n -15天天气气预报:提供未来15天的天气现象、温度、空气质量、风况等信息。\n -24小时天气预报:逐小时展示未来24小时的天气现象、温度、空气质量、风况等信息.\n -空气质量:提供未来24小时、15天的空气质量预报、空气中污染物浓度的高低.\n -2小时降水概率:及时、精准预测所在街道未来2小时每分钟降雨变化。\n -生活指数:提供未来3天的穿衣建议、防晒建议、运动、限行等实用生活信息.\n -城市管理:查询天气更快捷,管理城市更方便。" + }, + { + "name_ch": "计算器", + "name_en": "Calculator", + "function_description": "好用的全能计算器\n 小米计算器,操作简单,集普通计算、科学计算、汇率计算及单位换算等为一体,帮你解决生活中的各种计算难题。\n 1.普通计算:算式编辑、历史结果查看、结果转中文大写;\n 2.科学计算:三角函数、对数等,角度弧度切换;3.汇率计算:汇率实时更新、币种之间任意切换;\n 4.房贷计算:支持商业贷款、公积金贷款、组合贷款,支持查看贷款明细;\n 5.个税计算:工资计算、公积金计算;\n 6.单位换算:长度、面积、体积、温度、速度、时间、重量转换;\n 7.亲戚称呼计算:七大姑八大姨都知道,三姑六婆都能算,过年必备。" + }, + { + "name_ch": "时钟", + "name_en": "Clock", + "function_description": "系统官方时钟\n 1.主要功能:支持快速新建闹钟、查看世界时间、设置秒表、倒计时等功能\n ⒉.特色功能:支持关机闹钟、设置动态铃声等特色功能" + }, + { + "name_ch": "应用商店", + "name_en": "Appmarket", + "function_description": "小米应用商店是由小米推出的手机软件商店合集,致力于成为全面、优质的手机游戏应用商店,在这里用户可以找到最新最好玩的手机app和游戏应用,并提供软件商店app下载。" + }, + { + "name_ch": "日历", + "name_en": "Calendar", + "function_description": "日历全新改版,界面清爽简洁\n 日历全新改版,界面清爽简洁,助您更方便地查看日历和管理日程。\n 【功能简介】\n 全面覆盖农历、节日和班休信息;\n 你可以创建日程、生日、纪念日、倒数日等事件,所有安排一目了然,重要日子不再错过\n 支持登陆同一小米账号的手机、pad实时同步。【产品特点】\n 支持月视图、周视图、年视图随意切换,满足不同需求;界面清爽、操作简便,最大限度提高您的使用效率;持续聆听米粉的声音,不断优化日历功能及服务。\n" + }, + { + "name_ch": "文件管理", + "name_en": "Fileexplorer", + "function_description": "小米澎湃OS文件管理产品优势:\n ★分类直观:极速扫描文件,文件自动整理\n ★智能搜索:自动提示关键词,搜索结果即刻呈现\n ★功能丰富:FTP远程管理,大文件清理,支持所有基础文件操作\n 功能特点∶\n 一应用来源:文件按照应用自动分类,扫一眼就知道文件身份!\n 文件搜索:智能关键词更懂你,秒现搜索结果\n 轻松操作:支持文件多选,直接安装应用程序,复制、剪切、重命名文件等操作更简单\n ~压缩/解压:支持创建ZIP压缩包,解压加密的ZIP和RAR" + }, + { + "name_ch": "大众点评", + "name_en": "Dianping", + "function_description": "大众点评是中国一家知名的本地生活服务平台,为用户提供丰富的商家信息、用户评价和优惠信息。以下是大众点评的一些主要特点和功能:\n\n商家信息: 大众点评汇聚了各类本地商家的信息,包括餐厅、酒店、美容美发、电影院、购物商场等。用户可以在平台上查找商家的详细信息,包括地址、电话、营业时间等。\n\n用户评价: 用户可以在大众点评上对自己在商家消费的体验进行评价,包括对服务、环境、菜品等方面的评分和文字评价。这为其他用户提供了参考,帮助他们做出更明智的消费决策。\n\n照片和晒单: 用户可以上传照片,展示他们在商家消费时的实际情况,包括菜品、环境等。同时,用户还可以发布晒单,分享自己的消费心得,进一步丰富了用户之间的信息交流。\n\n优惠券和团购: 大众点评经常推出各类优惠券和团购活动,用户可以在平台上购买优惠券或参与团购,享受折扣和特价服务。\n\n线上预订和点餐: 部分商家支持在大众点评平台上进行线上预订或点餐,提高了用户的便捷体验,尤其在高峰时段避免等待。\n\n定位和导航: 大众点评支持使用手机的定位功能,帮助用户找到附近的商家,并提供导航服务,方便用户到达目的地。\n\n会员服务: 大众点评推出了会员服务,会员用户可以享受一些专属优惠和权益,例如积分兑换、生日特权等。\n\n广告推广: 商家可以通过在大众点评上购买广告推广服务,提高他们的曝光度和客流量,吸引更多用户关注。\n\n城市服务: 大众点评覆盖了全国各大城市,用户可以在不同城市查找当地的商家信息和服务。\n\nApp和网页平台: 大众点评提供了手机App和网页两种平台,用户可以根据自己的喜好选择不同的访问方式。\n\n总体来说,大众点评通过整合商家信息、用户评价和优惠信息,为用户提供了一个便捷的本地生活服务平台,帮助用户更好地选择和享受周围的各类服务。" + }, + { + "name_ch": "去哪儿", + "name_en": "Qunar", + "function_description": "去哪儿网(Qunar.com),它是中国一家知名的在线旅行服务平台。以下是去哪儿网的一些主要特点和功能:\n\n机票预订: 去哪儿网提供国际国内机票的查询和预订服务。用户可以在平台上搜索各种航班信息,比较价格,选择适合自己的机票。\n\n酒店预订: 用户可以通过去哪儿网搜索并预订全球范围内的酒店。平台提供了各种类型和档次的酒店选择,用户可以根据需求筛选。\n\n火车票预订: 在中国境内,去哪儿网也提供火车票查询和预订服务。用户可以查询火车票余票、价格,然后在线购票。\n\n度假产品: 去哪儿网还提供度假产品的预订服务,包括旅游套餐、签证服务、邮轮旅行等。\n\n旅游攻略: 用户可以在去哪儿网上获取旅游目的地的攻略信息,了解景点介绍、当地美食、交通指南等。\n\n自由行服务: 去哪儿网为用户提供自由行的服务,包括机票、酒店、当地交通等的组合预订,方便用户自主安排行程。\n\n特价活动: 平台经常推出各种机票、酒店、度假产品的特价活动,用户可以通过去哪儿网获取优惠价格。\n\nAPP和网页平台: 去哪儿网提供了手机App和网页两个平台,用户可以选择不同的方式访问和使用服务。\n\n在线客服: 去哪儿网提供在线客服服务,用户可以通过平台内的客服渠道获取帮助和解答问题。\n\n支付方式: 去哪儿网支持多种支付方式,包括信用卡、支付宝、微信支付等,方便用户完成交易。" + }, + { + "name_ch": "笔记", + "name_en": "notes", + "function_description": "笔记是一种用于记录、保存个人信息、想法、任务清单等简短文本的应用程序。基本特点和功能:\n\n文本记录: 便签应用通常允许用户输入文本,记录各种信息,如备忘录、灵感、任务等。\n\n简单编辑功能: 用户可以对文本进行简单的编辑,包括文字样式、颜色、列表格式等。\n\n分类和标签: 为了更好地组织和查找便签,应用通常提供分类和标签功能,使用户可以根据主题或类型整理便签。\n\n提醒和闹钟: 一些便签应用允许用户设置提醒和闹钟,以确保不会错过重要的任务或事件。\n\n云同步: 为了跨设备使用和备份,许多便签应用支持云同步功能,使用户可以在不同设备之间同步便签内容。\n\n插图和附件: 一些便签应用允许用户插入图片、声音录音或其他附件,以增强便签的信息表达能力。\n\n搜索功能: 为了方便用户查找特定的便签,应用通常提供搜索功能,使用户能够快速找到需要的信息。\n\n安全性: 一些便签应用提供安全性选项,例如密码保护或指纹识别,以确保敏感信息的隐私安全。\n\n分享和导出: 用户可以通过便签应用分享便签内容,也可以导出为文本文件或其他格式,以便在其他应用中使用。\n\n手写或绘图: 一些便签应用支持手写输入或绘图功能,使用户可以以更直观的方式记录信息。\n\n即时同步: 当用户进行编辑或添加便签时,一些应用支持即时同步,确保在不同设备上看到最新的便签内容。\n\n提供小工具: 一些操作系统还支持将便签应用的小工具添加到主屏幕,以便用户快速查看和编辑重要的便签。" + }, + { + "name_ch": "照片", + "name_en": "gallery", + "function_description": "照片编辑: 照片应用通常提供基本的照片编辑功能,如裁剪、旋转、调整亮度、对比度和色彩等。一些应用还提供滤镜、贴纸、涂鸦等更高级的编辑选项。\n\n相册组织: 照片应用允许用户创建相册或文件夹,以更好地组织和管理他们的照片。这可以是按照时间、地点或主题进行组织。\n\n分享功能: 用户可以通过照片应用分享照片到社交媒体、聊天应用或云存储服务。一些应用还提供直接共享到特定平台的选项。\n\n云同步: 为了防止照片丢失,很多照片应用支持云同步功能,将照片备份到云端存储服务中,以便在不同设备上同步和访问。" + }, + { + "name_ch": "短信", + "name_en": "mms", + "function_description": "手机上的短信应用(短信APP)是用于发送和接收短信消息的应用程序。以下是一般情况下短信应用的一些基本功能:\n\n发送和接收短信: 短信应用的主要功能是允许用户发送和接收短信消息。用户可以通过输入文字、表情符号等方式撰写消息,并选择联系人发送。\n\n群发短信: 一些短信应用支持群发功能,允许用户同时向多个联系人发送相同的消息。\n\n多媒体消息: 短信应用通常支持发送包括图片、音频、视频等在内的多媒体消息,而不仅限于纯文本。\n\n彩信: 彩信是一种富媒体短信,可以包含图片、声音、文本等。短信应用通常支持发送和接收彩信。\n\n查看消息状态: 用户可以查看消息的发送状态,包括是否已送达、是否已读等。通常,未读消息会在通知栏中显示提醒。\n\n短信备份和还原: 一些短信应用支持将短信消息备份到云端或本地存储,以防止意外数据丢失,并且在需要时可以还原。\n\n垃圾短信过滤: 为了减少垃圾信息的干扰,一些短信应用提供垃圾短信过滤功能,可以自动屏蔽或移动垃圾短信到专门的文件夹中。\n\n主题和定制: 一些短信应用允许用户自定义短信主题、背景、字体颜色等,以个性化用户的消息体验。\n\n短信搜索: 用户可以通过短信应用搜索关键词,以方便查找和定位特定的消息记录。\n\n兼容性: 短信应用通常与手机操作系统兼容,可以与其他通信应用(如电话、联系人)集成使用。\n\n阅读回执: 一些短信应用支持阅读回执功能,即在接收方阅读短信后,发送方可以收到通知。\n\n语音输入: 除了手动输入文字,一些短信应用还支持语音输入,用户可以通过语音录入消息。" + }, + { + "name_ch": "联系人", + "name_en": "contacts", + "function_description": "手机联系人应用(通常称为“通讯录”或“联系人”应用)是用于管理和存储用户联系人信息的应用程序。以下是一般情况下联系人应用的一些基本功能:\n\n添加和编辑联系人: 用户可以通过联系人应用添加新的联系人,并编辑现有联系人的信息。这包括姓名、电话号码、电子邮件地址、生日等。\n\n分组和标签: 联系人应用通常支持将联系人分组或打上标签,以便更好地组织和管理联系人列表。这有助于用户快速找到特定群体的联系人。\n\n搜索功能: 为了方便用户查找特定联系人,联系人应用通常提供搜索功能。用户可以通过姓名、公司、电话号码等关键词来快速找到目标联系人。\n\n联系人同步: 联系人应用通常支持将联系人同步到云端服务,以确保用户在不同设备上使用相同的联系人列表。这使得在更换设备或丢失手机时能够轻松恢复联系人。\n\n头像和个性化: 用户可以为每个联系人添加头像,以使联系人列表更加直观。一些联系人应用还允许用户添加个性化的铃声或提醒设置。\n\n快速拨号: 联系人应用通常与电话应用集成,使用户能够通过联系人应用快速拨打电话。一些应用还支持快捷键或手势,以便更便捷地拨号。\n\n通话记录: 联系人应用通常会显示与每个联系人的通话记录,包括拨入、拨出和未接来电。这有助于用户追踪与联系人的通话历史。\n\n联系人导入和导出: 用户可以通过联系人应用导入和导出联系人,以便从其他设备或服务中导入联系人数据,或将联系人备份到本地或云端存储。\n\n生日提醒: 一些联系人应用提供生日提醒功能,用户可以设置提醒以便在联系人生日到来时发送祝福或提醒。\n\n联系人分享: 用户可以通过联系人应用分享联系人的信息,例如通过短信、邮件或社交媒体。" + }, + { + "name_ch": "主题壁纸", + "name_en": "thememanager", + "function_description": "小米个性主题,旨在为亿万米粉的小米手机,提供更酷更好玩的视觉和使用体验,让你的手机充满个性与众不同!这里有丰富有趣的主题、壁纸、字体、铃声、彩铃等资源,并有上万名设计师活跃在平台上,持续提供优质内容。\n主题:基于系统深度定制的个性化视觉服务,让你的手机翻天覆地大变样~\n壁纸:海量高清美图,打造手机美术馆~铃声:最新最酷的铃声资源这里都有~\n字体:方正汉仪文鼎等优质字库,总有一款字体适合你~\n" + }, + { + "name_ch": "通用按键", + "name_en": "button", + "function_description": "" + } +] +''' +# import json +# +# # Reload the uploaded JSON file to apply the new filtering criteria +# file_path = 'app_list_MIUI.json' +# +# with open(file_path, 'r', encoding='utf-8') as file: +# data = json.load(file) +# +# # Extract only the required fields: name_ch, name_en, and function description +# new_filtered_data = [] +# for app in data: +# new_filtered_app = { +# 'name_ch': app.get('name_ch', ''), # Using get to handle missing keys +# 'name_en': app.get('name_en', ''), +# 'function_description': app.get('function_description', '') +# } +# new_filtered_data.append(new_filtered_app) +# +# # Save the newly filtered data as a new JSON file +# new_file_path_2 = 'new_filtered_app_list_MIUI.json' +# with open(new_file_path_2, 'w', encoding='utf-8') as new_file: +# json.dump(new_filtered_data, new_file, ensure_ascii=False, indent=4) +# + diff --git a/agent_for_ui/chatgpt.py b/agent_for_ui/chatgpt.py new file mode 100644 index 0000000000000000000000000000000000000000..c6541dd019a72bb2ec519bffb3b1a21f6b1c492a --- /dev/null +++ b/agent_for_ui/chatgpt.py @@ -0,0 +1,168 @@ +import requests +import os +import openai +import backoff +import requests +import time +import json +completion_tokens = prompt_tokens = 0 + +# api_key = "sk-cTJqhJUkALz7qQbQ7a027280A1Df499883A2116bD8F1765d" +# if api_key != "": +# openai.api_key = api_key +# else: +# print("Warning: OPENAI_API_KEY is not set") +# +# api_base = os.getenv("OPENAI_API_BASE", "https://api.aiguoguo199.com/v1") +# if api_base != "": +# print("Warning: OPENAI_API_BASE is set to {}".format(api_base)) +# openai.api_base = api_base +# +# +# # @backoff.on_exception(backoff.expo) +# # def completions_with_backoff(**kwargs): +# # return openai.ChatCompletion.create(**kwargs) +# def chatgpt(prompt): +# """ +# +# """ +# response = openai.ChatCompletion.create( +# model="gpt-3.5-turbo", +# messages=[ +# # {'role': 'system', 'content': persona}, +# {'role': 'user', 'content': prompt} +# ], +# temperature=0.1, +# max_tokens=1000, +# n=1, +# stop=None, +# top_p=0.95 +# ) +# print("response: ", response) +# return response + +# def gpt(prompt, model="gpt-3.5-turbo", temperature=0.7, max_tokens=1000, n=1, stop=None) -> list: +# # 使用GPT模型生成对话,返回生成的消息列表 +# messages = [{"role": "user", "content": prompt}] +# return chatgpt(messages, model=model, temperature=temperature, max_tokens=max_tokens, n=n, stop=stop) + + +# def chatgpt(messages, model="gpt-3.5-turbo", temperature=0.7, max_tokens=1000, n=1, stop=None) -> list: +# global completion_tokens, prompt_tokens +# outputs = [] +# while n > 0: +# # 限制每次请求的数量,以避免出现请求过多的情况 +# cnt = min(n, 20) +# n -= cnt +# # 使用backoff算法重试生成对话请求,返回生成的消息列表 +# res = completions_with_backoff(model=model, messages=messages, temperature=temperature, max_tokens=max_tokens, +# n=cnt, stop=stop) +# ''' +# res是一个字典,包含从GPT模型返回的响应信息。res["choices"]是一个列表,其中包含GPT模型生成的若干个响应。每个响应是一个字典,包含以下键: +# "text":一个字符串,表示GPT模型生成的响应文本。 +# "finish_reason":一个字符串,表示GPT模型停止生成响应的原因。 +# "index":一个整数,表示GPT模型生成响应的索引。 +# "logprobs":一个字典,表示GPT模型生成响应时的对数概率。 +# "tokens":一个列表,表示GPT模型生成响应时使用的令牌(标记)序列。 +# "message":一个字典,包含以下键: +# "content":一个字符串,表示GPT模型生成的响应文本。 +# "metadata":一个字典,包含与响应相关的元数据。 +# ''' +# outputs.extend([choice["message"]["content"] for choice in res["choices"]]) +# # log completion tokens +# # 记录使用的生成响应和接受提示使用的token数。 +# completion_tokens += res["usage"]["completion_tokens"] +# prompt_tokens += res["usage"]["prompt_tokens"] +# return outputs + +# ####################### Xiaomi API接口 ########################## +# def chatgpt(prompt, model="gpt-4-turbo-2024-04-09", temperature=0.1, max_tokens=1000, n=1, stop=None) -> list: +# headers = {'Content-Type': 'application/json'} +# url = 'http://10.221.105.108:19005' # gpt-4/3.5 for ChatCompletion +# outputs = [] +# cnt = min(n, 20) +# while n > 0: +# if model == "gpt-4-turbo-2024-04-09": +# data = {"uid": "xx9ty", "prompt": prompt, "history": [], "model": "gpt-4-0314", +# "max_tokens": max_tokens, "n": cnt, "temperature": temperature, "stop": stop} # if n>1, response of data is a List. +# elif model == "gpt-3.5-turbo": +# data = {"uid": "xx9ty", "prompt": prompt, "history": [], +# "max_tokens": max_tokens, "n": cnt, "temperature": temperature, "stop": stop} +# response = requests.post(url, json=data, headers=headers) +# try: +# res = response.json() +# if isinstance(res['response'], list): +# assert cnt > 1 +# outputs.extend(res['response']) +# elif isinstance(res['response'], str): +# assert cnt == 1 +# outputs.append(res['response']) +# else: +# print("None of outputs!") +# n -= cnt +# cnt = min(n, 20) +# except Exception as e: +# # print(e) +# pass +# # print(len(outputs)) +# # for i, output in enumerate(outputs): +# # print(i, output) +# # print("data", data) +# return outputs + +def get_model_response(self, prompt, images=None): + if images is None: + images = [] + url = f"http://preview-general-llm.api.ai.srv/api/{self.model}/{self.user_name}" + if self.model == 'gpt-4-turbo-2024-04-09': + content = [ + { + "type": 'text', + "text": prompt + } + ] + messages = [ + { + "role": 'user', + "content": content + } + ] + else: + print(f"Unsupported Model: {self.model}") + assert False + try_cnt = 0 + while try_cnt < 5: + try_cnt += 1 + resp = requests.post( + url=url, + json={ + "messages": messages, + "max_tokens": 1000, + "temperature": 0.1, + "seed": 1234, + # "model": self.model, + # "user_name": self.user_name + }) + try: + res = resp.json() + if 'Error code' in res['response']: + print("[API ERROR]!!! API Request Error!!!") + # print_with_color(json.dumps(res), "red") + time.sleep(20) + continue + return res['response'] + except Exception as e: + print("[API ERROR]!!! Json Decode Error!!!") + # print_with_color(resp.text, "red") + time.sleep(20) + continue + return "API ERROR" + +def gpt_usage(backend="gpt-4"): + # 根据使用的GPT模型计算使用的completion_tokens和prompt_tokens,并计算出费用 + global completion_tokens, prompt_tokens + if backend == "gpt-4": + cost = completion_tokens / 1000 * 0.06 + prompt_tokens / 1000 * 0.03 + elif backend == "gpt-3.5-turbo": + cost = (completion_tokens + prompt_tokens) / 1000 * 0.0002 + return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost} \ No newline at end of file diff --git a/agent_for_ui/data_count.py b/agent_for_ui/data_count.py new file mode 100644 index 0000000000000000000000000000000000000000..2971fc100a6689c233cf7f1644dc98a43ed2b5b4 --- /dev/null +++ b/agent_for_ui/data_count.py @@ -0,0 +1,1054 @@ +# coding: utf-8 +import argparse +import subprocess +import sys +import time +import os + +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from appium import webdriver +from appium.webdriver.common.touch_action import TouchAction +# from appium.webdriver.common.mobileby import MobileBy +from selenium.webdriver.common.by import By +from appium.webdriver.common.mobileby import MobileBy +from tqdm import tqdm +from agent_for_api.API_list import usr_api_list +from agent_for_api.agent_api_prompt import select_api_prompt, select_api_example +from agent_for_api.main_for_api import get_api_list +from agent_for_ui.agent_html_prompt import * +from selenium.common.exceptions import WebDriverException, InvalidElementStateException, NoSuchElementException +import json +from agent_for_ui.xml_to_html import any_tree_to_html +from chatgpt import chatgpt +import re +from app_list_MIUI import app_list +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from selenium.common.exceptions import TimeoutException +import os +import random +import copy +from appium.webdriver.common.touch_action import TouchAction +from appium.webdriver.common.multi_action import MultiAction + +max_attempts = 5 # Set the maximum number of retry attempts + +# currently tasks are all defined on single-app +''' +How does the entire demo work? +Use appium to obtain the xml information of the interface -> convert the local algorithm into html format -> +package and send the task (task description + env_html) -> agent (planning + action) -> +action is converted into appium's action and acts on the environment -> (task Description+env_html+action_history)-> +The new action acts on the environment. (loop construction completed) +''' +# How to agent make decision?: +''' +planning action reward memory? +''' + +import xml.etree.ElementTree as ET +from anytree import Node + + +def parse_xml_to_anytree(xml_code): + root = ET.fromstring(xml_code) + + def build_anytree(node, element, child_index, seen_elements, counter): + element_type = element.tag + # print(element_type) + # Generate a unique key for the element based on its attributes + element_key = ( + element_type, + element.get('resource-id', ''), + # content-desc, text兼容问题 + element.get('content-desc', ''), + element.get('text', ''), + element.get('clickable', ''), + element.get('scrollable', ''), + element.get('package', ''), ## + element.get('class', ''), + element.get('displayed', ''), + element.get('bounds', ''), + ) + seen_elements.add(element_key) + + # 检查是否有儿子节点 + is_leaf = not bool(list(element)) + + # 检查 text 和 content-desc 是否至少有一个为真 + has_text = bool(element.get('text')) + has_content_desc = bool(element.get('content-desc')) + visible = has_text or has_content_desc or 'button' in element_type.lower() + + leaf_id = counter[0] # 使用计数器作为 leaf_id + counter[0] += 1 # 递增计数器 + + anytree_node = Node(element_type, parent=node, type=element_type, visible=visible, leaf_id=leaf_id, + resource_id=element.get('resource-id'), content_desc=element.get('content-desc'), + text=element.get('text'), clickable=element.get('clickable'), is_leaf=is_leaf, + scrollable=element.get('scrollable'), package=element.get('package'), + class_label=element.get('class'), displayed=element.get('displayed'), + bounds=element.get('bounds')) + + for idx, child in enumerate(element): + # print(idx) + build_anytree(anytree_node, child, idx, seen_elements, counter) + + is_root_leaf = not bool(list(root)) + + anytree_root = Node(root.tag, type=root.tag, visible=True, leaf_id=0, # 初始计数器为 0 + resource_id=root.get('resource-id'), content_desc=root.get('content-desc'), + text=root.get('text'), clickable=root.get('clickable'), + is_leaf=is_root_leaf, scrollable=root.get('scrollable'), package=root.get('package'), + class_label=root.get('class'), displayed=root.get('displayed'), bounds=root.get('bounds')) + + seen_elements = set() + counter = [1] # 使用列表来存储计数器的值,以便在递归中共享 + + for idx, child in enumerate(root): + # print("out",idx) + build_anytree(anytree_root, child, idx, seen_elements, counter) + + return anytree_root + + +# actions define +def screen_click(element_id): + element = driver.find_element(By.ID, element_id) # use id to locate the element + element.click() + + +def screen_text_input(element_id, input_text): + element = driver.find_element(By.ID, element_id) # use id to locate the element + element.send_keys(input_text) + + +def screen_swipe(driver, start_x, start_y, end_x, end_y, duration=1000): + # use duration to control the speed of swipe + success = False + while not success: + try: + driver.swipe(start_x, start_y, end_x, end_y, duration) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + + +def get_memory(history_actions): + memory_list = [] + # print(history_actions) + for round_number, action_info in enumerate(history_actions, 1): + key = None + if 'action' in action_info: + key = 'action' + # round_number += 1 # 仅当键是 'action' 时增加 round_number + elif 'thought' in action_info: + key = 'thought' + elif 'API call' in action_info: + key = 'API call' + # round_number += 1 # 仅当键是 'API call' 时增加 round_number + else: + key = 'unknown' + # round_number += 1 # 对于其他未知类型也增加 round_number + detail = action_info.get(key, 'No detail') + # print(f"{key}: {detail}") + memory_list.append(f"{action_info}") + # memory_list.append(f"{key}: {detail}") + + if memory_list != []: + # memory_list = memory_list[-10:] # 记忆压缩。 + memory = "\n".join(memory_list) + else: + memory = "No action has been completed yet" + return memory + + +def find_element(element, driver): + id_match = re.search(r'id="([^"]+)"', element) + text_match = re.search(r'>\s*([^<>]+)\s*<', element) + alt_match = re.search(r'description="([^"]+)"', element) + class_match = re.search(r'class="([^"]+)"', element) + if id_match: + id_value = id_match.group(1).strip() + # print("-----------------------------------------", id_value) + if text_match: + text_value = text_match.group(1).strip() + if text_value.isspace() or not text_value: + text_match = False + # print("-----------------------------------------", text_match) + + if alt_match: + alt_value = alt_match.group(1).strip() + # print("-----------------------------------------", alt_value) + if class_match: + class_value = class_match.group(1).strip() + + find = False + if text_match and alt_match and id_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}").description("{alt_value}").resourceId("{id_value}")') + success = True # 如果页面源获取成功,设置success为True以退出循环 + except WebDriverException as e: + attempt_count += 1 + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) # 重试前等待5秒 + if not success: + print("服务器端错误") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text_value\description\id的元素,这可能导致错误!") + if find: + return list + + if text_match and alt_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}").description("{alt_value}")') + success = True # 如果页面源获取成功,设置success为True以退出循环 + except WebDriverException as e: + attempt_count += 1 + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) # 重试前等待5秒 + if not success: + print("服务器端错误") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text_value\description的元素,这可能导致错误!") + if find: + return list + + if id_match and text_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{id_value}").text("{text_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text_value\id的元素,这可能导致错误!") + if find: + return list + + if id_match and alt_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{id_value}").description("{alt_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同description\id的元素,这可能导致错误!") + if find: + return list + + if id_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{id_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同id的元素,这可能导致错误!") + if find: + return list + + if class_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{class_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同class的元素,这可能导致错误!") + if find: + return list + + print("没有定位到对应的元素") + return None + + +def actions(res, history_actions, driver): + if 'click(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + else: + try: + list[0].click() + history_actions.append({"Action": f"click({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful click click({text})"}) + + elif 'press(' in res: + action = TouchAction(driver) + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element press({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element press({text})"}) + else: + try: + action.press(list[0]).wait(1000).release().perform() + history_actions.append({"Action": f"press({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful press({text})"}) + + elif 'zoom(' in res: + action1 = TouchAction(driver) + action2 = TouchAction(driver) + zoom_action = MultiAction(driver) + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element Zoom({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element Zoom({text})"}) + else: + try: + action1.press(list[0]).move_to(x=0, y=-100) # 向上移动 + action2.press(list[0]).move_to(x=0, y=100) # 向下移动 + zoom_action.add(action1, action2) + zoom_action.perform() + history_actions.append({"Action": f"Zoom({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful zoom({text})"}) + + elif 'pinch(' in res: + action1 = TouchAction(driver) + action2 = TouchAction(driver) + + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element pinch({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element pinch({text})"}) + else: + try: + action1.press(x=list[0].location['x'], y=list[0].location['y'] - 100).move_to(list[0]) + action2.press(x=list[0].location['x'], y=list[0].location['y'] + 100).move_to(list[0]) + + pinch_action = MultiAction(driver) + pinch_action.add(action1, action2) + pinch_action.perform() + history_actions.append({"Action": f"pinch({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful pinch({text})"}) + + elif 'input(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + element = res[first_angle_bracket:second_angle_bracket + 1] + input_context = res[second_angle_bracket + 2:-1].strip() + input_context = input_context.strip('\'\"') + # print(element) + # print(input_context) + list = find_element(element, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + else: + try: + # 点击元素 + list[0].click() + history_actions.append({"Action": f"click({element})"}) + try: + WebDriverWait(driver, 1).until( + EC.staleness_of(list[0]) + ) + # 等待刷新 + + except TimeoutException: + # 如果元素不存在或不可见,不执行input操作 + list[0].send_keys(input_context) + history_actions.append({"Action": f"input({element}, {input_context})"}) + + except InvalidElementStateException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append( + {"Action": f"[Fail]: InvalidElementStateException input({element}, {input_context})"}) + except NoSuchElementException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: NoSuchElementException input({element}, {input_context})"}) + + + + elif 'scroll(' in res or 'swipe(' in res: + action = TouchAction(driver) + + numbers = re.findall(r'\d+', res) + # 将找到的数字转换成整数并分配给相应的变量 + x1, y1, x2, y2 = map(int, numbers[:4]) + max_value = max(x1, y1, x2, y2) + # 对滑动操作的参数进行调整,以免超出边界。 + if x1 == max_value: + x1 -= 50 + if y1 == max_value: + y1 -= 50 + if x2 == max_value: + x2 -= 50 + if y2 == max_value: + y2 -= 50 + + # 如果某个数等于0,则加50 + if x1 == 0: + x1 += 50 + if y1 == 0: + y1 += 50 + if x2 == 0: + x2 += 50 + if y2 == 0: + y2 += 50 + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + action.press(x=x1, y=y1).wait(ms=1000).move_to(x=x2, y=y2).release().perform() + # driver.swipe(x1, y1, x2, y2, duration=1000) # swipe的效果不够好。 + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success: + history_actions.append({"Action": f"scroll([{x1},{y1}][{x2},{y2}])"}) + else: + print("[Fail]: unsucess scroll.") + history_actions.append({"Action": f"[Fail]: unsuccessful scroll scroll([{x1},{y1}][{x2},{y2}])"}) + + +def get_page_source(driver): + attempt_count = 0 + success = False + xml_source = None + while not success and attempt_count < max_attempts: + try: + xml_source = driver.page_source + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(3) # Wait for 5 seconds before retrying + # driver.quit() + # driver = open_driver() + return xml_source, driver + + +def run_command(command): + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + stderr = result.stderr + if not stderr: + return "API execution successful" + else: + return "API execution failed" + + +def api(res, history_actions): + matches = re.findall(r'\[(.*)\]', res) + success = False + for match in matches: + adb_command = match + print("[API CALL]: ", adb_command) + result = run_command(adb_command) + print("[APi Function Call Result]: \033[34m" + result + "\033[0m") + if 'success' in result: + success = True + # 有待商榷,执行失败的信息是否应该放在记录里,这样可以避免重复生成错误的API + if "successful" in result: + history_actions.append({f"API call": f"{adb_command}. [Call result]:{result}"}) + # history_actions.append({f"[API call]": f"{adb_command}. [Call result]:{result}"}) + return success + + +def get_success_memory(history_actions): + memory_list = [] + counter = 0 # Initialize a counter + for action_info in history_actions: + key = None + # 检查动作类型 + if 'action' in action_info or 'thought' in action_info: + if 'action' in action_info: + key = 'action' + elif 'thought' in action_info: + key = 'thought' + + # 当遇到 'action' 或 'thought' 时,每两次迭代增加一次计数 + if counter % 2 == 0: + round_number = counter // 2 + 1 + counter += 1 + + elif 'API call' in action_info: + key = 'API call' + round_number = counter // 2 + 1 # 保持当前的 round_number + + elif 'App Select and Plan' in action_info: + key = 'App Select and Plan' + round_number = counter // 2 + 1 # 保持当前的 round_number + + else: + key = 'unknown' + round_number = counter // 2 + 1 # 保持当前的 round_number + + detail = action_info.get(key, 'No detail') + memory_list.append(f"Step {round_number}: {key}: {detail}") + + memory = "\n".join(memory_list) + return memory + + +def open_driver(): + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) + success = True + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if not success: + print(f"Failed to connect after {max_attempts} attempts. Exiting program.") + driver.quit() + sys.exit() # Exit the program if connection is not successful + else: + print("[Device connected successfully!]") + return driver + + +def read_json_file(file_path): + with open(file_path, 'r') as file: + data = json.load(file) + + # Extracting only id, app, packagename, query, and check_point information + extracted_data = [] + for item in data: + id = item.get('id') + app = item.get('app') + package_name = item['check_point'].get('package', []) + query = item.get('query') + check_point = item.get('check_point') + extracted_data.append({ + 'id': id, + 'app': app, + 'packagename': package_name, + 'query': query, + 'check_point': check_point + }) + + return extracted_data + + +def calculate_package_coverage(data_item, action_history): + # 初始化覆盖数量 + coverage_count = 0 + if 'check_point' in data_item and 'package' in data_item['check_point']: + package_names = data_item['check_point']['package'] + # 遍历 package_names 中的每个元素 + for package_name in package_names: + # 检查元素是否出现在 action_history 的任何动作中 + if any(package_name in action for action in action_history): + coverage_count += 1 + + return coverage_count / len(package_names) + else: + return 0 + + +def check_point_passed(check_point_value, action_history): + if '|' in check_point_value: + # 如果列表中有 '|', 那么任何一个 action_history 中的动作包含至少一个元素即通过 + return any(cp_elem in action for cp_elem in check_point_value if cp_elem != '|' for action in action_history), 1 + elif '&' in check_point_value: + # 如果列表中有 '&', 那么 action_history 中的动作需要包含所有元素 + return all(cp_elem in action for cp_elem in check_point_value if cp_elem != '&' for action in action_history), 1 + else: + if isinstance(check_point_value, list): + total_elems = len(check_point_value) + passed_elems = sum(any(cp_elem in action for action in action_history) for cp_elem in check_point_value) + return passed_elems, total_elems + else: + return any(check_point_value in action for action in action_history), 1 + + +# check point scores +def check_points(data_item, action_history): + checkpoints = ['activity', 'resource-id', 'text', 'package', 'api'] + total_checkpoints = 0 + passed_checkpoints = 0 + + for cp in checkpoints: + if cp in data_item['check_point'] and data_item['check_point'][cp]: # check existence + check_point_value = data_item['check_point'][cp] + if isinstance(check_point_value, list): + passed, total = check_point_passed(check_point_value, action_history) + passed_checkpoints += passed + total_checkpoints += total + else: + # 直接比较 + total_checkpoints += 1 + if any(check_point_value in action for action in action_history): + passed_checkpoints += 1 + + return passed_checkpoints / total_checkpoints if total_checkpoints > 0 else 0 + + +def format_api_info_as_text(text, data): + """ + Format the API information as text in the specified format if the name_ch or name_en of an app is found in the text. + :param text: The string in which to search for app names. + :param data: The JSON data containing app information. + :return: A string formatted as a dictionary with app names as keys and their API information as values. + """ + formatted_info = {} + general_keys_api = [ + { + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } + ] + formatted_info["通用按键"] = general_keys_api + + for app in data: + # if re.search(r'\b' + re.escape(app['name_ch']) + r'\b', text) or re.search( + # r'\b' + re.escape(app['name_en']) + r'\b', text): + if app['name_en'] in text or app['name_ch'] in text: + api_info = app['api'] + if api_info: + formatted_info[app['name_ch']] = api_info + + # Convert the dictionary to a string formatted as a dictionary + formatted_text = json.dumps(formatted_info, indent=2, ensure_ascii=False) + return formatted_text + + +def map_and_reverse_complete_interactive_elements(html_content): # 建立元素和数值的映射关系; + lines = html_content.split('\n') + interactive_elements = {} + counter = 1 # Start numbering from 1 + + for line in lines: + # Check if the line contains a clickable, scrollable or input element + if 'clickable="true"' in line or 'scrollable="true"' in line or 'input' in line: + # Map the entire line (HTML tag) to the number + interactive_elements[counter] = line.strip() + counter += 1 # Increment the counter for the next interactive element + + return interactive_elements + + +def calculate_scroll_parameters(window_size, html, direction, scroll_type): + width = window_size['width'] + height = window_size['height'] + safe_margin = 10 # 安全边界距离 + match = re.search(r'bounds="\[([0-9]+,[0-9]+)\]\[([0-9]+,[0-9]+)\]"', html) + bounds = [match.group(1), match.group(2)] + # 解析bounds字符串"[x1,y1][x2,y2]" + x1, y1 = map(int, bounds[0].split(',')) + x2, y2 = map(int, bounds[1].split(',')) + + # 计算中点坐标 + mid_x = (x1 + x2) // 2 + mid_y = (y1 + y2) // 2 + + if scroll_type == 'short': + # 短距离滚动 + offset_x = (x2 - x1) // 4 + offset_y = (y2 - y1) // 4 + scroll_coordinates = { + 'up': ([mid_x, mid_y + offset_y], [mid_x, mid_y - offset_y]), + 'down': ([mid_x, mid_y - offset_y], [mid_x, mid_y + offset_y]), + 'left': ([mid_x + offset_x, mid_y], [mid_x - offset_x, mid_y]), + 'right': ([mid_x - offset_x, mid_y], [mid_x + offset_x, mid_y]) + } + elif scroll_type == 'long': + # 长距离滚动 + if direction == 'up': + start_x = end_x = mid_x + start_y = y2 - safe_margin + end_y = safe_margin + elif direction == 'down': + start_x = end_x = mid_x + start_y = y1 + safe_margin + end_y = height - safe_margin + elif direction == 'left': + start_y = end_y = mid_y + start_x = x2 - safe_margin + end_x = safe_margin + elif direction == 'right': + start_y = end_y = mid_y + start_x = x1 + safe_margin + end_x = width - safe_margin + else: + return None # 无效方向 + scroll_coordinates = { + direction: ([start_x, start_y], [end_x, end_y]) + } + else: + return None # 无效的滚动类型 + + return scroll_coordinates[direction] + + # # 定义滚动偏移量 + # offset_x = (x2 - x1) // 4 + # offset_y = (y2 - y1) // 4 + # + # # 根据方向计算滚动起始和结束坐标 + # scroll_directions = { + # 'up': ([mid_x, mid_y + offset_y], [mid_x, mid_y - offset_y]), + # 'down': ([mid_x, mid_y - offset_y], [mid_x, mid_y + offset_y]), + # 'left': ([mid_x + offset_x, mid_y], [mid_x - offset_x, mid_y]), + # 'right': ([mid_x - offset_x, mid_y], [mid_x + offset_x, mid_y]) + # } + # + # return scroll_directions[direction] + + +def process_user_input(window_size, user_input, elements_map): # 将用户的输入转化为实际的执行指令 + # Splitting the input for action and parameters + parts = user_input.split('(', 1) + action = parts[0].strip().lower() # Action: click, scroll, input + params = parts[1].rstrip(')').split(',') if len(parts) > 1 else [] # Parameters in the parentheses + + # Defining the action command and parameters + action_command = '' + params_command = '' + + # Determine the action and construct corresponding command + if action == 'click': + action_command = 'click' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'press': + action_command = 'press' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'zoom': + action_command = 'zoom' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'pinch': + action_command = 'pinch' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'scroll': + action_command = 'scroll' + # Defining scroll directions as start and end coordinates + if params and params[0].isdigit() and int(params[0]) in elements_map: + html_element = elements_map[int(params[0])] + direction = str(params[1]) + if len(params) > 2: + scroll_type = 'long' + else: + scroll_type = 'short' + params_command = calculate_scroll_parameters(window_size, html_element, direction, scroll_type) + elif action == 'input': + action_command = 'input' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + if len(params) > 1: + params_command += f", '{params[1]}'" + + # Construct the final command + final_command = f"{action_command}({params_command})" + + return final_command + + +def display_html_and_mapping(html_content, elements_map): + # Outputting the entire HTML content + print("[HTML Content]:") + print(html_content) + print("[Interactive Elements Mapping]:") + # Iterating through the elements map and printing the index and description + # Initialize categories + clickables = {} + scrollables = {} + inputs = {} # Assuming we could identify input elements somehow + + # Iterating through the elements map to categorize + for index, html in elements_map.items(): + if 'input' in html: + inputs[index] = html + elif 'scrollable="true"' in html: + scrollables[index] = html + elif 'clickable="true"' in html: + clickables[index] = html + + action_space = {} + + # Outputting categorized elements + categories = [("Clickables", clickables), ("Scrollables", scrollables), ("Inputs", inputs)] + for category_name, category_map in categories: + if category_map: # Only print if category has items + print(f"[{category_name}]:") + max_index_length = len(str(max(category_map.keys()))) if category_map else 0 + for index, html in category_map.items(): + # Attempting to extract a brief description + if 'description="' in html: + description = html.split('description="')[1].split('"')[0] + else: + text_content = html.split('>')[1].split('<')[0] if '>' in html and '<' in html else "" + description = text_content.strip() + # Adding bounds if the element is scrollable + if 'scrollable="true"' in html and 'bounds="' in html: + bounds = html.split('bounds="')[1].split('"')[0] + description += f" ({bounds})" if bounds else "" + if description: # Only print if there's a description or text content + print(f"{index:{max_index_length}}: {description}") + + action_space[index] = category_name + return action_space + + +def gen_action_list(action_space, window_size): + action_tobe = [] + for index in action_space: + category_name = action_space[index] + + action_list = [] + if category_name == "Clickables": + action_res = "click(" + str(index) + ")" + action_list.append(action_res) + + elif category_name == "Scrollables": + action_res = "scroll(" + str(index) + ",up)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",up, long)" + # action_list.append(action_res) + action_res = "scroll(" + str(index) + ",down)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",down, long)" + # action_list.append(action_res) + action_res = "scroll(" + str(index) + ",left)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",left, long)" + # action_list.append(action_res) + action_res = "scroll(" + str(index) + ",right)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",right, long)" + # action_list.append(action_res) + elif category_name == "Inputs": + action_res = "click(" + str(index) + ")" + action_list.append(action_res) + random.shuffle(current_text_list) + action_res = "input(" + str(index) + "," + current_text_list[0] + ")" + action_list.append(action_res) + + # window_size = driver.get_window_size() + for action_res in action_list: + action_res = process_user_input(window_size, action_res, mapping) + if action_res not in action_tobe: + action_tobe.append(action_res) + return action_tobe + + +def compare_html_acc(html_code_save, html_code): + html_code_save_list = html_code_save.strip().split("\n") + html_code_list = html_code.strip().split("\n") + index = 0 + correct = [] + for code_ in html_code_list: + if code_ in html_code_save_list: + index += 1 + correct.append(1) + else: + correct.append(0) + if float(index) / len(html_code_list) < 0.9: + print("###############html_code_save##############") + print(html_code_save) + print("###############html_code##############") + print(html_code) + print(correct) + return float(index) / len(html_code_list), index, len(html_code_list) + + +def restart_from_homepage(start_APP_command, history_list, driver): + history_actions = [] + for temp_command in start_APP_command: + result = api(temp_command, history_actions) + if "adb" in temp_command.lower(): + time.sleep(10) + else: + time.sleep(5) + + for temp_command in history_list: + actions(temp_command, history_actions, driver) + print(temp_command) + if "adb" in temp_command.lower(): + time.sleep(10) + else: + time.sleep(10) + + +def get_filelist(dir, Filelist): + newDir = dir + if os.path.isfile(dir): + Filelist.append(dir) + # # 若只是要返回文件文,使用这个 + # Filelist.append(os.path.basename(dir)) + elif os.path.isdir(dir): + for s in os.listdir(dir): + # 如果需要忽略某些文件夹,使用以下代码 + # if s == "xxx": + # continue + newDir = os.path.join(dir, s) + get_filelist(newDir, Filelist) + return Filelist + + +def get_parser(): + parser = argparse.ArgumentParser(description="Agent for mobile phone") + parser.add_argument('--temperature', type=float, default=0.1, help='temperature') + parser.add_argument('--model', type=str, default='gpt-4', help='model to use') + parser.add_argument('--dataset', type=str, default='data/s_app_m_step_utf8.json', help='dataset to use') + parser.add_argument('--max_steps', type=int, choices=range(0, 50), default=20, help='numbers of steps') + parser.add_argument('--start_index', type=int, default=0, help='start_index') + return parser + + +parser = get_parser() +args = parser.parse_args() +# Press the green button in the gutter to run the script. +if __name__ == '__main__': + current_APP=["xiaomishop"] + current_adb=["[adb shell am start -n com.xiaomi.shop/.activity.MainTabActivity]"] + current_text_list=["新款手机","小米手机","小米电视","红色小米T恤","蓝色的小米手机","小米耳机","小米手机和配件","小米11手机"] + # reboot_command = f"adb shell input keyevent KEYCODE_HOME" + # 执行命令 + # subprocess.run(reboot_command) + # subprocess.run(reboot_command,shell=True) + # print("[reboot_command]") + + name_en=current_APP[0] + #name_ch=app_name_en_data[name_en]["name_ch"] + data_output_path="C:/Users/mi/PycharmProjects/Agent_base_appium/agent_for_ui/corpus/random_walk/"+name_en+"/" + all_data = {"num": 0, "data": []} + curr_path = name_en + "0" + all_data_list = get_filelist(data_output_path, []) + count_num = 0 + for name in all_data_list: + if name.endswith("html.txt"): + count_num += 1 + print("count_num", count_num) + print("len all_data_list", len(all_data_list)) + diff --git a/agent_for_ui/episode.proto b/agent_for_ui/episode.proto new file mode 100644 index 0000000000000000000000000000000000000000..ba3d3f8e8438b80e72d1e69fefa959790d97074e --- /dev/null +++ b/agent_for_ui/episode.proto @@ -0,0 +1,193 @@ +// Copyright 2023 The Google Research Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package llm4mobile.proto; + +option java_multiple_files = true; + +// Types of the different UI objects. +enum ObjectType { + UNKNOWN_TYPE = 0; + BUTTON = 1; + CHECKBOX = 2; + CHECKEDTEXTVIEW = 3; + EDITTEXT = 4; + IMAGEBUTTON = 5; + IMAGEVIEW = 6; + RADIOBUTTON = 7; + SLIDINGDRAWER = 8; + SPINNER = 9; + SWITCH = 10; + TABWIDGET = 11; + TEXTVIEW = 12; + TOGGLEBUTTON = 13; + VIDEOVIEW = 14; + + APPWIDGETHOSTVIEW = 15; // android.appwidget.AppWidgetHostView + VIEW = 16; // android.view.View + WEBVIEW = 17; // android.webkit.WebView + FRAMELAYOUT = 18; // android.widget.FrameLayout + HORIZONTALSCROLLVIEW = 19; // android.widget.HorizontalScrollView + LINEARLAYOUT = 20; // android.widget.LinearLayout + LISTVIEW = 21; // android.widget.ListView + MULTIAUTOCOMPLETETEXTVIEW = 22; // android.widget.MultiAutoCompleteTextView + PROGRESSBAR = 23; // android.widget.ProgressBar + RELATIVELAYOUT = 24; // android.widget.RelativeLayout + SCROLLVIEW = 25; // android.widget.ScrollView + TABHOST = 26; // android.widget.TabHost + VIEWSWITCHER = 27; // android.widget.ViewSwitcher + + SEEKBAR = 28; // android.widget.SeekBar +} + +// The on-screen grid location (3x3 grid) of an UI object. +enum GridLocation { + UNKNOWN_LOCATION = 0; + TOP_LEFT = 1; + TOP_CENTER = 2; + TOP_RIGHT = 3; + LEFT = 4; + CENTER = 5; + RIGHT = 6; + BOTTOM_LEFT = 7; + BOTTOM_CENTER = 8; + BOTTOM_RIGHT = 9; +} + +// A simulation episode as output from the simulation pipeline. +message Episode { + // A list of time steps from simulation. + repeated TimeStep time_steps = 4; +} + +// Environment output after taking an action. +message TimeStep { + // Step index. + int32 index = 1; + + // Current observation available to the agent. + Observation observation = 2; +} + +// Observation for the agent. +message Observation { + // List of objects on the screen. + repeated Object objects = 1; + + // Raw bytes of the screenshot. + bytes screenshot = 3; + + // Id of image. + string image_id = 13; + + // Raw bytes of the view hierarchy XML or Json + oneof view_hierarchy_format { + bytes xml = 4; + bytes json = 9; + } + + // Width of the screenshot. + int32 screen_width = 5; + + // Height of the screenshot. + int32 screen_height = 6; + + // Absolute path of screenshot file. + string debug_screenshot_filepath = 10; + + // Absolute path of vew_hierarchy file. + string debug_vh_filepath = 11; +} + +// Screen object proto. +message Object { + // Object id defined and used by each pipeline. + string id = 100; + + // Object index in the observation object list. + int32 index = 1; + + // The id of parent object. + string parent_id = 101; + + // The index of parent object in the objects list. + int32 parent_index = 102; + + // Object name. + string name = 2; + + // Object type. + ObjectType type = 3; + + // Android class of the object, e.g., android.widget.LinearLayout. + string android_class = 4; + + // Android package of the object, e.g., com.google.android.gms. + string android_package = 5; + + // Text from content-desc, text and resource-id attribute. + string text = 6; + string content_desc = 7; + string resource_id = 8; + + // Boolean attribuets. + bool clickable = 9; + bool visible = 10; + bool enabled = 11; + bool focusable = 12; + bool focused = 13; + bool scrollable = 14; + bool long_clickable = 15; + bool selected = 16; + bool checkable = 17; + bool checked = 18; + + // Bounding box of the object. + BoundingBox bbox = 19; + + // Multiple types of the object based on its ancestors. + repeated ObjectType multi_types = 20; + + // Below are computed attributes from view hierarchy. + // Grid location of the object. + GridLocation grid_location = 30; + + // Dom position of the object. + DomPosition dom_position = 31; + + // Whether it's a leaf node. + bool is_leaf = 32; + + // Whether it's an actionable object for RL policy. + bool is_actionable = 33; + + string text_hint = 34; +} + +// A bounding box on the screen. +message BoundingBox { + int32 left = 1; + int32 right = 2; + int32 top = 3; + int32 bottom = 4; +} + +// Dom position of the object. +message DomPosition { + int32 depth = 1; + int32 pre_order_id = 2; + int32 post_order_id = 3; +} diff --git a/agent_for_ui/episode_pb2.py b/agent_for_ui/episode_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..22b282d25e102f94bced1374637ba20befe9c0d1 --- /dev/null +++ b/agent_for_ui/episode_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: episode.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\repisode.proto\x12\x10llm4mobile.proto\"9\n\x07\x45pisode\x12.\n\ntime_steps\x18\x04 \x03(\x0b\x32\x1a.llm4mobile.proto.TimeStep\"M\n\x08TimeStep\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x32\n\x0bobservation\x18\x02 \x01(\x0b\x32\x1d.llm4mobile.proto.Observation\"\x81\x02\n\x0bObservation\x12)\n\x07objects\x18\x01 \x03(\x0b\x32\x18.llm4mobile.proto.Object\x12\x12\n\nscreenshot\x18\x03 \x01(\x0c\x12\x10\n\x08image_id\x18\r \x01(\t\x12\r\n\x03xml\x18\x04 \x01(\x0cH\x00\x12\x0e\n\x04json\x18\t \x01(\x0cH\x00\x12\x14\n\x0cscreen_width\x18\x05 \x01(\x05\x12\x15\n\rscreen_height\x18\x06 \x01(\x05\x12!\n\x19\x64\x65\x62ug_screenshot_filepath\x18\n \x01(\t\x12\x19\n\x11\x64\x65\x62ug_vh_filepath\x18\x0b \x01(\tB\x17\n\x15view_hierarchy_format\"\xb1\x05\n\x06Object\x12\n\n\x02id\x18\x64 \x01(\t\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x11\n\tparent_id\x18\x65 \x01(\t\x12\x14\n\x0cparent_index\x18\x66 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12*\n\x04type\x18\x03 \x01(\x0e\x32\x1c.llm4mobile.proto.ObjectType\x12\x15\n\randroid_class\x18\x04 \x01(\t\x12\x17\n\x0f\x61ndroid_package\x18\x05 \x01(\t\x12\x0c\n\x04text\x18\x06 \x01(\t\x12\x14\n\x0c\x63ontent_desc\x18\x07 \x01(\t\x12\x13\n\x0bresource_id\x18\x08 \x01(\t\x12\x11\n\tclickable\x18\t \x01(\x08\x12\x0f\n\x07visible\x18\n \x01(\x08\x12\x0f\n\x07\x65nabled\x18\x0b \x01(\x08\x12\x11\n\tfocusable\x18\x0c \x01(\x08\x12\x0f\n\x07\x66ocused\x18\r \x01(\x08\x12\x12\n\nscrollable\x18\x0e \x01(\x08\x12\x16\n\x0elong_clickable\x18\x0f \x01(\x08\x12\x10\n\x08selected\x18\x10 \x01(\x08\x12\x11\n\tcheckable\x18\x11 \x01(\x08\x12\x0f\n\x07\x63hecked\x18\x12 \x01(\x08\x12+\n\x04\x62\x62ox\x18\x13 \x01(\x0b\x32\x1d.llm4mobile.proto.BoundingBox\x12\x31\n\x0bmulti_types\x18\x14 \x03(\x0e\x32\x1c.llm4mobile.proto.ObjectType\x12\x35\n\rgrid_location\x18\x1e \x01(\x0e\x32\x1e.llm4mobile.proto.GridLocation\x12\x33\n\x0c\x64om_position\x18\x1f \x01(\x0b\x32\x1d.llm4mobile.proto.DomPosition\x12\x0f\n\x07is_leaf\x18 \x01(\x08\x12\x15\n\ris_actionable\x18! \x01(\x08\x12\x11\n\ttext_hint\x18\" \x01(\t\"G\n\x0b\x42oundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x05\x12\r\n\x05right\x18\x02 \x01(\x05\x12\x0b\n\x03top\x18\x03 \x01(\x05\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x05\"I\n\x0b\x44omPosition\x12\r\n\x05\x64\x65pth\x18\x01 \x01(\x05\x12\x14\n\x0cpre_order_id\x18\x02 \x01(\x05\x12\x15\n\rpost_order_id\x18\x03 \x01(\x05*\xef\x03\n\nObjectType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x42UTTON\x10\x01\x12\x0c\n\x08\x43HECKBOX\x10\x02\x12\x13\n\x0f\x43HECKEDTEXTVIEW\x10\x03\x12\x0c\n\x08\x45\x44ITTEXT\x10\x04\x12\x0f\n\x0bIMAGEBUTTON\x10\x05\x12\r\n\tIMAGEVIEW\x10\x06\x12\x0f\n\x0bRADIOBUTTON\x10\x07\x12\x11\n\rSLIDINGDRAWER\x10\x08\x12\x0b\n\x07SPINNER\x10\t\x12\n\n\x06SWITCH\x10\n\x12\r\n\tTABWIDGET\x10\x0b\x12\x0c\n\x08TEXTVIEW\x10\x0c\x12\x10\n\x0cTOGGLEBUTTON\x10\r\x12\r\n\tVIDEOVIEW\x10\x0e\x12\x15\n\x11\x41PPWIDGETHOSTVIEW\x10\x0f\x12\x08\n\x04VIEW\x10\x10\x12\x0b\n\x07WEBVIEW\x10\x11\x12\x0f\n\x0b\x46RAMELAYOUT\x10\x12\x12\x18\n\x14HORIZONTALSCROLLVIEW\x10\x13\x12\x10\n\x0cLINEARLAYOUT\x10\x14\x12\x0c\n\x08LISTVIEW\x10\x15\x12\x1d\n\x19MULTIAUTOCOMPLETETEXTVIEW\x10\x16\x12\x0f\n\x0bPROGRESSBAR\x10\x17\x12\x12\n\x0eRELATIVELAYOUT\x10\x18\x12\x0e\n\nSCROLLVIEW\x10\x19\x12\x0b\n\x07TABHOST\x10\x1a\x12\x10\n\x0cVIEWSWITCHER\x10\x1b\x12\x0b\n\x07SEEKBAR\x10\x1c*\xa8\x01\n\x0cGridLocation\x12\x14\n\x10UNKNOWN_LOCATION\x10\x00\x12\x0c\n\x08TOP_LEFT\x10\x01\x12\x0e\n\nTOP_CENTER\x10\x02\x12\r\n\tTOP_RIGHT\x10\x03\x12\x08\n\x04LEFT\x10\x04\x12\n\n\x06\x43\x45NTER\x10\x05\x12\t\n\x05RIGHT\x10\x06\x12\x0f\n\x0b\x42OTTOM_LEFT\x10\x07\x12\x11\n\rBOTTOM_CENTER\x10\x08\x12\x10\n\x0c\x42OTTOM_RIGHT\x10\tB\x02P\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'episode_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'P\001' + _OBJECTTYPE._serialized_start=1274 + _OBJECTTYPE._serialized_end=1769 + _GRIDLOCATION._serialized_start=1772 + _GRIDLOCATION._serialized_end=1940 + _EPISODE._serialized_start=35 + _EPISODE._serialized_end=92 + _TIMESTEP._serialized_start=94 + _TIMESTEP._serialized_end=171 + _OBSERVATION._serialized_start=174 + _OBSERVATION._serialized_end=431 + _OBJECT._serialized_start=434 + _OBJECT._serialized_end=1123 + _BOUNDINGBOX._serialized_start=1125 + _BOUNDINGBOX._serialized_end=1196 + _DOMPOSITION._serialized_start=1198 + _DOMPOSITION._serialized_end=1271 +# @@protoc_insertion_point(module_scope) diff --git a/agent_for_ui/html.txt b/agent_for_ui/html.txt new file mode 100644 index 0000000000000000000000000000000000000000..02d6d45d87916afae5f4a2b70a8bf732c8863983 --- /dev/null +++ b/agent_for_ui/html.txt @@ -0,0 +1,59 @@ +<div id="com.miui.home:id/workspace" class="com.miui.home.launcher.ScreenView" clickable="false" scrollable="true" bounds="[0,0][1080,2400]"> </div> +<div class="com.miui.home.launcher.ScreenView" clickable="false" scrollable="true" bounds="[0,1911][1080,1964]"> </div> +<img package="com.miui.home" class="android.widget.ImageView" description="智能助理" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="第1屏" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="第2屏" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="第3屏" clickable="true"> </img> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="米家" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 米家 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="多看" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 多看 </p> +<p id="com.miui.player:id/title" package="com.miui.player" class="android.widget.TextView" clickable="true"> 来听歌吧! </p> +<p id="com.miui.player:id/album" package="com.miui.player" class="android.widget.TextView" clickable="true"> 点击进入音乐 </p> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 音乐 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="小米社区" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 小米社区 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="主题壁纸" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 主题壁纸 </p> +<p id="com.mi.health:id/tv_value" package="com.mi.health" class="android.widget.TextView" clickable="true"> 0 </p> +<p id="com.mi.health:id/tv_label" package="com.mi.health" class="android.widget.TextView" clickable="true"> 目标6000步 </p> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 小米运动健康 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="钱包" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 钱包 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="小米有品" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 小米有品 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="热门" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 热门 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="短信" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 短信 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="系统工具" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="计算器" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="文件管理" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="日历" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="电子邮件" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="时钟" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="小米换机" clickable="true"> </img> +<img package="com.miui.home" class="android.widget.ImageView" description="录音机" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 系统工具 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="QQ" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> QQ </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="京东" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 京东 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="高德地图" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 高德地图 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="爱奇艺" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 爱奇艺 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="喜马拉雅" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 喜马拉雅 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="今日头条" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 今日头条 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="拼多多" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 拼多多 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="携程旅行" clickable="true"> </img> +<p id="com.miui.home:id/icon_title" package="com.miui.home" class="android.widget.TextView" clickable="true"> 携程旅行 </p> +<div id="com.miui.home:id/hotseat_content_screen" class="com.miui.home.launcher.ScreenView" clickable="false" scrollable="true" bounds="[11,1974][1069,2156]"> </div> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="电话" clickable="true"> </img> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="短信" clickable="true"> </img> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="浏览器" clickable="true"> </img> +<p id="com.miui.home:id/icon_msg" package="com.miui.home" class="android.widget.TextView" clickable="true"> 1 </p> +<img id="com.miui.home:id/icon_icon" package="com.miui.home" class="android.widget.ImageView" description="相机" clickable="true"> </img> diff --git a/agent_for_ui/logcat_output.txt b/agent_for_ui/logcat_output.txt new file mode 100644 index 0000000000000000000000000000000000000000..822763ea1507355ff2c826b72aa085d24c3d8d89 --- /dev/null +++ b/agent_for_ui/logcat_output.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d82f87099dd7e505321579e3ab371592986f4287d112e8384addf6d3d28f04ab +size 51597656 diff --git a/agent_for_ui/logcat_output_cleaned.txt b/agent_for_ui/logcat_output_cleaned.txt new file mode 100644 index 0000000000000000000000000000000000000000..61502c248d740c91e6d93479809aaea20697244f --- /dev/null +++ b/agent_for_ui/logcat_output_cleaned.txt @@ -0,0 +1,939 @@ +11-29 09:59:50.405 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:50.405 4751 4780 I appium : Source command +11-29 09:59:50.406 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 09:59:50.498 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:56.038 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 09:59:56.039 4751 4780 I appium : FindElements command +11-29 09:59:56.046 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Clock")', contextId: '' +11-29 09:59:56.049 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 09:59:56.103 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"d5953a75-1450-40f9-af6c-b06d8e3d5949","element-6066-11e4-a52e-4f735466cecf":"d5953a75-1450-40f9-af6c-b06d8e3d5949"}]} +11-29 09:59:56.123 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/d5953a75-1450-40f9-af6c-b06d8e3d5949/click +11-29 09:59:56.125 4751 4780 I appium : Click command +11-29 09:59:56.421 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 09:59:58.224 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:03.249 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:03.249 4751 4780 I appium : Source command +11-29 10:00:03.249 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:03.379 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:07.211 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:07.212 4751 4780 I appium : Source command +11-29 10:00:07.212 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:07.354 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:10.694 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:10.695 4751 4780 I appium : FindElements command +11-29 10:00:10.699 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Add alarm")', contextId: '' +11-29 10:00:10.699 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:10.746 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"1f56b595-98c4-40c3-86c2-d927b69e4843","element-6066-11e4-a52e-4f735466cecf":"1f56b595-98c4-40c3-86c2-d927b69e4843"}]} +11-29 10:00:10.764 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/1f56b595-98c4-40c3-86c2-d927b69e4843/click +11-29 10:00:10.766 4751 4780 I appium : Click command +11-29 10:00:11.219 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:12.200 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:17.226 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:17.228 4751 4780 I appium : Source command +11-29 10:00:17.229 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:17.281 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:20.410 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:20.411 4751 4780 I appium : Source command +11-29 10:00:20.411 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:20.464 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:30.286 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:30.287 4751 4780 I appium : FindElements command +11-29 10:00:30.288 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("11 o'clock")', contextId: '' +11-29 10:00:30.288 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:30.319 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"6578c635-784d-4ef7-b668-3ba5de00e876","element-6066-11e4-a52e-4f735466cecf":"6578c635-784d-4ef7-b668-3ba5de00e876"},{"ELEMENT":"2d3c93aa-0926-4cbf-8df7-f089069d8baa","element-6066-11e4-a52e-4f735466cecf":"2d3c93aa-0926-4cbf-8df… +11-29 10:00:30.334 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/6578c635-784d-4ef7-b668-3ba5de00e876/click +11-29 10:00:30.335 4751 4780 I appium : Click command +11-29 10:00:30.573 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:31.072 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:36.103 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:36.104 4751 4780 I appium : Source command +11-29 10:00:36.105 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:36.157 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:39.387 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:39.387 4751 4780 I appium : Source command +11-29 10:00:39.387 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:39.445 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:42.666 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:42.667 4751 4780 I appium : FindElements command +11-29 10:00:42.669 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5 o'clock")', contextId: '' +11-29 10:00:42.670 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:42.715 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce","element-6066-11e4-a52e-4f735466cecf":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce"}]} +11-29 10:00:42.733 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/50fbec0a-5b96-47e0-95f9-a46226ebc3ce/click +11-29 10:00:42.734 4751 4780 I appium : Click command +11-29 10:00:42.901 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:43.687 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:48.701 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:48.702 4751 4780 I appium : Source command +11-29 10:00:48.702 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:48.755 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:56.479 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:56.479 4751 4780 I appium : Source command +11-29 10:00:56.479 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:00:56.532 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:01.923 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:01.923 4751 4780 I appium : FindElements command +11-29 10:01:01.925 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:01.925 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:01.959 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27","element-6066-11e4-a52e-4f735466cecf":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27"}]} +11-29 10:01:01.977 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/09fcd9d1-cad7-4af3-8169-d1d94ed9fc27/click +11-29 10:01:01.979 4751 4780 I appium : Click command +11-29 10:01:02.270 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:03.453 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:08.465 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:08.465 4751 4780 I appium : Source command +11-29 10:01:08.465 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:08.591 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:12.871 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:12.871 4751 4780 I appium : Source command +11-29 10:01:12.872 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:13.009 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:16.142 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:16.143 4751 4780 I appium : FindElements command +11-29 10:01:16.144 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5:00 AM")', contextId: '' +11-29 10:01:16.144 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:16.201 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"656d2911-7e29-44ec-a945-bf9cdcf52e8a","element-6066-11e4-a52e-4f735466cecf":"656d2911-7e29-44ec-a945-bf9cdcf52e8a"},{"ELEMENT":"175ec87a-09ba-4a3b-a7ea-7a44a22d6137","element-6066-11e4-a52e-4f735466cecf":"175ec87a-09ba-4a3b-a7e… +11-29 10:01:16.219 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/656d2911-7e29-44ec-a945-bf9cdcf52e8a/click +11-29 10:01:16.221 4751 4780 I appium : Click command +11-29 10:01:16.504 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:17.623 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:22.635 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:22.635 4751 4780 I appium : Source command +11-29 10:01:22.636 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:22.692 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:26.284 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:26.284 4751 4780 I appium : Source command +11-29 10:01:26.284 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:26.336 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:29.377 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:29.378 4751 4780 I appium : FindElements command +11-29 10:01:29.379 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:29.379 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:29.400 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"4b375985-3f6d-42f7-9192-14af15e5c249","element-6066-11e4-a52e-4f735466cecf":"4b375985-3f6d-42f7-9192-14af15e5c249"}]} +11-29 10:01:29.417 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/4b375985-3f6d-42f7-9192-14af15e5c249/click +11-29 10:01:29.418 4751 4780 I appium : Click command +11-29 10:01:29.603 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:30.140 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:35.159 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:35.159 4751 4780 I appium : Source command +11-29 10:01:35.160 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:35.318 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:38.396 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:38.396 4751 4780 I appium : Source command +11-29 10:01:38.397 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:38.524 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:41.103 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:41.104 4751 4780 I appium : FindElements command +11-29 10:01:41.106 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:41.107 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:41.142 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:01:46.159 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:46.160 4751 4780 I appium : Source command +11-29 10:01:46.161 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:46.302 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:56.094 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:56.095 4751 4780 I appium : Source command +11-29 10:01:56.096 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:01:56.237 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:02.211 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:02.211 4751 4780 I appium : FindElements command +11-29 10:02:02.213 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:02.213 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:02:02.261 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"fede33fb-1b8e-4847-9292-8d4391280284","element-6066-11e4-a52e-4f735466cecf":"fede33fb-1b8e-4847-9292-8d4391280284"}]} +11-29 10:02:02.279 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/fede33fb-1b8e-4847-9292-8d4391280284/click +11-29 10:02:02.280 4751 4780 I appium : Click command +11-29 10:02:02.482 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:02:03.286 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:02:08.318 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:08.320 4751 4780 I appium : Source command +11-29 10:02:08.321 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:02:08.456 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:15.468 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:15.469 4751 4780 I appium : Source command +11-29 10:02:15.469 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:02:15.606 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:22.245 4751 4780 I appium : channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:22.246 4751 4780 I appium : FindElements command +11-29 10:02:22.247 4751 4780 I appium : method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:22.247 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:02:22.286 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:02:27.300 4751 4780 I appium : channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:27.300 4751 4780 I appium : Source command +11-29 10:02:27.301 4751 4780 I appium : Waiting up to 10000ms for the device to idle +11-29 10:02:27.423 4751 4780 I appium : AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/appium/device/pixel_ratio +11-29 09:59:42.788 I/appium ( 4751): GetDevicePixelRatio command +11-29 09:59:42.789 I/appium ( 4751): Get device pixel ratio +11-29 09:59:42.790 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":2.625} +11-29 09:59:42.800 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/appium/device/system_bars +11-29 09:59:42.801 I/appium ( 4751): GetSystemBars command +11-29 09:59:42.802 I/appium ( 4751): Get status bar height of the device +11-29 09:59:42.805 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":{"statusBar":63}} +11-29 09:59:42.815 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/window/current/size +11-29 09:59:42.816 I/appium ( 4751): GetDeviceSize command +11-29 09:59:42.817 I/appium ( 4751): Get window size of the device +11-29 09:59:42.820 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":{"height":1857,"width":1080}} +11-29 09:59:42.883 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:42.883 I/appium ( 4751): Source command +11-29 09:59:42.891 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:43.003 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:50.405 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:50.405 I/appium ( 4751): Source command +11-29 09:59:50.406 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:50.498 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:56.038 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 09:59:56.039 I/appium ( 4751): FindElements command +11-29 09:59:56.046 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Clock")', contextId: '' +11-29 09:59:56.049 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:56.103 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"d5953a75-1450-40f9-af6c-b06d8e3d5949","element-6066-11e4-a52e-4f735466cecf":"d5953a75-1450-40f9-af6c-b06d8e3d5949"}]} +11-29 09:59:56.123 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/d5953a75-1450-40f9-af6c-b06d8e3d5949/click +11-29 09:59:56.125 I/appium ( 4751): Click command +11-29 09:59:56.421 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:58.224 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:03.249 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:03.249 I/appium ( 4751): Source command +11-29 10:00:03.249 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:03.379 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:07.211 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:07.212 I/appium ( 4751): Source command +11-29 10:00:07.212 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:07.354 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:10.694 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:10.695 I/appium ( 4751): FindElements command +11-29 10:00:10.699 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Add alarm")', contextId: '' +11-29 10:00:10.699 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:10.746 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"1f56b595-98c4-40c3-86c2-d927b69e4843","element-6066-11e4-a52e-4f735466cecf":"1f56b595-98c4-40c3-86c2-d927b69e4843"}]} +11-29 10:00:10.764 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/1f56b595-98c4-40c3-86c2-d927b69e4843/click +11-29 10:00:10.766 I/appium ( 4751): Click command +11-29 10:00:11.219 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:12.200 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:17.226 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:17.228 I/appium ( 4751): Source command +11-29 10:00:17.229 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:17.281 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:20.410 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:20.411 I/appium ( 4751): Source command +11-29 10:00:20.411 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:20.464 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:30.286 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:30.287 I/appium ( 4751): FindElements command +11-29 10:00:30.288 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("11 o'clock")', contextId: '' +11-29 10:00:30.288 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:30.319 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"6578c635-784d-4ef7-b668-3ba5de00e876","element-6066-11e4-a52e-4f735466cecf":"6578c635-784d-4ef7-b668-3ba5de00e876"},{"ELEMENT":"2d3c93aa-0926-4cbf-8df7-f089069d8baa","element-6066-11e4-a52e-4f735466cecf":"2d3c93aa-0926-4cbf-8df… +11-29 10:00:30.334 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/6578c635-784d-4ef7-b668-3ba5de00e876/click +11-29 10:00:30.335 I/appium ( 4751): Click command +11-29 10:00:30.573 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:31.072 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:36.103 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:36.104 I/appium ( 4751): Source command +11-29 10:00:36.105 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:36.157 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:39.387 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:39.387 I/appium ( 4751): Source command +11-29 10:00:39.387 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:39.445 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:42.666 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:42.667 I/appium ( 4751): FindElements command +11-29 10:00:42.669 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5 o'clock")', contextId: '' +11-29 10:00:42.670 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:42.715 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce","element-6066-11e4-a52e-4f735466cecf":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce"}]} +11-29 10:00:42.733 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/50fbec0a-5b96-47e0-95f9-a46226ebc3ce/click +11-29 10:00:42.734 I/appium ( 4751): Click command +11-29 10:00:42.901 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:43.687 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:48.701 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:48.702 I/appium ( 4751): Source command +11-29 10:00:48.702 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:48.755 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:56.479 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:56.479 I/appium ( 4751): Source command +11-29 10:00:56.479 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:56.532 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:01.923 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:01.923 I/appium ( 4751): FindElements command +11-29 10:01:01.925 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:01.925 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:01.959 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27","element-6066-11e4-a52e-4f735466cecf":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27"}]} +11-29 10:01:01.977 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/09fcd9d1-cad7-4af3-8169-d1d94ed9fc27/click +11-29 10:01:01.979 I/appium ( 4751): Click command +11-29 10:01:02.270 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:03.453 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:08.465 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:08.465 I/appium ( 4751): Source command +11-29 10:01:08.465 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:08.591 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:12.871 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:12.871 I/appium ( 4751): Source command +11-29 10:01:12.872 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:13.009 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:16.142 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:16.143 I/appium ( 4751): FindElements command +11-29 10:01:16.144 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5:00 AM")', contextId: '' +11-29 10:01:16.144 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:16.201 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"656d2911-7e29-44ec-a945-bf9cdcf52e8a","element-6066-11e4-a52e-4f735466cecf":"656d2911-7e29-44ec-a945-bf9cdcf52e8a"},{"ELEMENT":"175ec87a-09ba-4a3b-a7ea-7a44a22d6137","element-6066-11e4-a52e-4f735466cecf":"175ec87a-09ba-4a3b-a7e… +11-29 10:01:16.219 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/656d2911-7e29-44ec-a945-bf9cdcf52e8a/click +11-29 10:01:16.221 I/appium ( 4751): Click command +11-29 10:01:16.504 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:17.623 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:22.635 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:22.635 I/appium ( 4751): Source command +11-29 10:01:22.636 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:22.692 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:26.284 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:26.284 I/appium ( 4751): Source command +11-29 10:01:26.284 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:26.336 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\751): io.appium.uiautomator2.server started: +11-29 09:59:42.321 I/appium ( 4751): Started UiAutomator2 io.appium.uiautomator2.http io.appium.uiautomator2.server on port 6790 +11-29 09:59:42.444 W/Thread-5( 4751): type=1400 audit(0.0:66714): avc: denied { read } for name="somaxconn" dev="proc" ino=1055109 scontext=u:r:untrusted_app_27:s0:c193,c256,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 app=io.appium.uiautomator2.server +11-29 09:59:42.587 I/appium ( 4751): channel read: GET /wd/hub/status +11-29 09:59:42.588 I/appium ( 4751): Status command +11-29 09:59:42.619 I/appium ( 4751): AppiumResponse: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}} +11-29 09:59:42.632 I/appium ( 4751): channel read: POST /wd/hub/session +11-29 09:59:42.634 I/appium ( 4751): NewSession command +11-29 09:59:42.646 I/appium ( 4751): Created the new session with SessionID: 5bbf778a-384a-4d18-9303-0394a968ea88 +11-29 09:59:42.654 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"pl… +11-29 09:59:42.673 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/appium/device/info +11-29 09:59:42.674 I/appium ( 4751): GetDeviceInfo command +11-29 09:59:42.699 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":{"androidId":"a9646cbb77708c3a","apiVersion":"34","bluetooth":{"state":"ON"},"brand":"google","carrierName":"T-Mobile","displayDensity":420,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone64_x86_64","networks":[{"capabilities":{… +11-29 09:59:42.787 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/appium/device/pixel_ratio +11-29 09:59:42.788 I/appium ( 4751): GetDevicePixelRatio command +11-29 09:59:42.789 I/appium ( 4751): Get device pixel ratio +11-29 09:59:42.790 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":2.625} +11-29 09:59:42.800 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/appium/device/system_bars +11-29 09:59:42.801 I/appium ( 4751): GetSystemBars command +11-29 09:59:42.802 I/appium ( 4751): Get status bar height of the device +11-29 09:59:42.805 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":{"statusBar":63}} +11-29 09:59:42.815 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/window/current/size +11-29 09:59:42.816 I/appium ( 4751): GetDeviceSize command +11-29 09:59:42.817 I/appium ( 4751): Get window size of the device +11-29 09:59:42.820 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":{"height":1857,"width":1080}} +11-29 09:59:42.883 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:42.883 I/appium ( 4751): Source command +11-29 09:59:42.891 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:43.003 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:50.405 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:50.405 I/appium ( 4751): Source command +11-29 09:59:50.406 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:50.498 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:56.038 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 09:59:56.039 I/appium ( 4751): FindElements command +11-29 09:59:56.046 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Clock")', contextId: '' +11-29 09:59:56.049 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:56.103 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"d5953a75-1450-40f9-af6c-b06d8e3d5949","element-6066-11e4-a52e-4f735466cecf":"d5953a75-1450-40f9-af6c-b06d8e3d5949"}]} +11-29 09:59:56.123 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/d5953a75-1450-40f9-af6c-b06d8e3d5949/click +11-29 09:59:56.125 I/appium ( 4751): Click command +11-29 09:59:56.421 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:58.224 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:03.249 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:03.249 I/appium ( 4751): Source command +11-29 10:00:03.249 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:03.379 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:07.211 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:07.212 I/appium ( 4751): Source command +11-29 10:00:07.212 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:07.354 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:10.694 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:10.695 I/appium ( 4751): FindElements command +11-29 10:00:10.699 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Add alarm")', contextId: '' +11-29 10:00:10.699 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:10.746 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"1f56b595-98c4-40c3-86c2-d927b69e4843","element-6066-11e4-a52e-4f735466cecf":"1f56b595-98c4-40c3-86c2-d927b69e4843"}]} +11-29 10:00:10.764 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/1f56b595-98c4-40c3-86c2-d927b69e4843/click +11-29 10:00:10.766 I/appium ( 4751): Click command +11-29 10:00:11.219 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:12.200 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:17.226 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:17.228 I/appium ( 4751): Source command +11-29 10:00:17.229 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:17.281 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:20.410 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:20.411 I/appium ( 4751): Source command +11-29 10:00:20.411 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:20.464 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:30.286 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:30.287 I/appium ( 4751): FindElements command +11-29 10:00:30.288 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("11 o'clock")', contextId: '' +11-29 10:00:30.288 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:30.319 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"6578c635-784d-4ef7-b668-3ba5de00e876","element-6066-11e4-a52e-4f735466cecf":"6578c635-784d-4ef7-b668-3ba5de00e876"},{"ELEMENT":"2d3c93aa-0926-4cbf-8df7-f089069d8baa","element-6066-11e4-a52e-4f735466cecf":"2d3c93aa-0926-4cbf-8df… +11-29 10:00:30.334 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/6578c635-784d-4ef7-b668-3ba5de00e876/click +11-29 10:00:30.335 I/appium ( 4751): Click command +11-29 10:00:30.573 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:31.072 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:36.103 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:36.104 I/appium ( 4751): Source command +11-29 10:00:36.105 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:36.157 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:39.387 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:39.387 I/appium ( 4751): Source command +11-29 10:00:39.387 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:39.445 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:42.666 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:42.667 I/appium ( 4751): FindElements command +11-29 10:00:42.669 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5 o'clock")', contextId: '' +11-29 10:00:42.670 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:42.715 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce","element-6066-11e4-a52e-4f735466cecf":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce"}]} +11-29 10:00:42.733 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/50fbec0a-5b96-47e0-95f9-a46226ebc3ce/click +11-29 10:00:42.734 I/appium ( 4751): Click command +11-29 10:00:42.901 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:43.687 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:48.701 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:48.702 I/appium ( 4751): Source command +11-29 10:00:48.702 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:48.755 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:56.479 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:56.479 I/appium ( 4751): Source command +11-29 10:00:56.479 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:56.532 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:01.923 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:01.923 I/appium ( 4751): FindElements command +11-29 10:01:01.925 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:01.925 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:01.959 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27","element-6066-11e4-a52e-4f735466cecf":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27"}]} +11-29 10:01:01.977 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/09fcd9d1-cad7-4af3-8169-d1d94ed9fc27/click +11-29 10:01:01.979 I/appium ( 4751): Click command +11-29 10:01:02.270 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:03.453 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:08.465 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:08.465 I/appium ( 4751): Source command +11-29 10:01:08.465 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:08.591 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:12.871 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:12.871 I/appium ( 4751): Source command +11-29 10:01:12.872 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:13.009 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:16.142 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:16.143 I/appium ( 4751): FindElements command +11-29 10:01:16.144 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5:00 AM")', contextId: '' +11-29 10:01:16.144 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:16.201 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"656d2911-7e29-44ec-a945-bf9cdcf52e8a","element-6066-11e4-a52e-4f735466cecf":"656d2911-7e29-44ec-a945-bf9cdcf52e8a"},{"ELEMENT":"175ec87a-09ba-4a3b-a7ea-7a44a22d6137","element-6066-11e4-a52e-4f735466cecf":"175ec87a-09ba-4a3b-a7e… +11-29 10:01:16.219 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/656d2911-7e29-44ec-a945-bf9cdcf52e8a/click +11-29 10:01:16.221 I/appium ( 4751): Click command +11-29 10:01:16.504 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:17.623 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:22.635 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:22.635 I/appium ( 4751): Source command +11-29 10:01:22.636 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:22.692 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:26.284 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:26.284 I/appium ( 4751): Source command +11-29 10:01:26.284 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:26.336 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:29.377 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:29.378 I/appium ( 4751): FindElements command +11-29 10:01:29.379 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:29.379 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:29.400 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"4b375985-3f6d-42f7-9192-14af15e5c249","element-6066-11e4-a52e-4f735466cecf":"4b375985-3f6d-42f7-9192-14af15e5c249"}]} +11-29 10:01:29.417 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/4b375985-3f6d-42f7-9192-14af15e5c249/click +11-29 10:01:29.418 I/appium ( 4751): Click command +11-29 10:01:29.603 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:30.140 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:35.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:35.159 I/appium ( 4751): Source command +11-29 10:01:35.160 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:35.318 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:38.396 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:38.396 I/appium ( 4751): Source command +11-29 10:01:38.397 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:38.524 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:41.103 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:41.104 I/appium ( 4751): FindElements command +11-29 10:01:41.106 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:41.107 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:41.142 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:01:46.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:46.160 I/appium ( 4751): Source command +11-29 10:01:46.161 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:46.302 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:56.094 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:56.095 I/appium ( 4751): Source command +11-29 10:01:56.096 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:56.237 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:02.211 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:02.211 I/appium ( 4751): FindElements command +11-29 10:02:02.213 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:02.213 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:02.261 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"fede33fb-1b8e-4847-9292-8d4391280284","element-6066-11e4-a52e-4f735466cecf":"fede33fb-1b8e-4847-9292-8d4391280284"}]} +11-29 10:02:02.279 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/fede33fb-1b8e-4847-9292-8d4391280284/click +11-29 10:02:02.280 I/appium ( 4751): Click command +11-29 10:02:02.482 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:03.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:02:08.318 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:08.320 I/appium ( 4751): Source command +11-29 10:02:08.321 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:08.456 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:15.468 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:15.469 I/appium ( 4751): Source command +11-29 10:02:15.469 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:15.606 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation11-29 09:59:50.405 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:50.405 I/appium ( 4751): Source command +11-29 09:59:50.406 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:50.498 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:56.038 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 09:59:56.039 I/appium ( 4751): FindElements command +11-29 09:59:56.046 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Clock")', contextId: '' +11-29 09:59:56.049 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:56.103 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"d5953a75-1450-40f9-af6c-b06d8e3d5949","element-6066-11e4-a52e-4f735466cecf":"d5953a75-1450-40f9-af6c-b06d8e3d5949"}]} +11-29 09:59:56.123 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/d5953a75-1450-40f9-af6c-b06d8e3d5949/click +11-29 09:59:56.125 I/appium ( 4751): Click command +11-29 09:59:56.421 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:58.224 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:03.249 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:03.249 I/appium ( 4751): Source command +11-29 10:00:03.249 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:03.379 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:07.211 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:07.212 I/appium ( 4751): Source command +11-29 10:00:07.212 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:07.354 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:10.694 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:10.695 I/appium ( 4751): FindElements command +11-29 10:00:10.699 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Add alarm")', contextId: '' +11-29 10:00:10.699 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:10.746 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"1f56b595-98c4-40c3-86c2-d927b69e4843","element-6066-11e4-a52e-4f735466cecf":"1f56b595-98c4-40c3-86c2-d927b69e4843"}]} +11-29 10:00:10.764 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/1f56b595-98c4-40c3-86c2-d927b69e4843/click +11-29 10:00:10.766 I/appium ( 4751): Click command +11-29 10:00:11.219 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:12.200 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:17.226 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:17.228 I/appium ( 4751): Source command +11-29 10:00:17.229 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:17.281 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:20.410 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:20.411 I/appium ( 4751): Source command +11-29 10:00:20.411 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:20.464 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:30.286 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:30.287 I/appium ( 4751): FindElements command +11-29 10:00:30.288 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("11 o'clock")', contextId: '' +11-29 10:00:30.288 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:30.319 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"6578c635-784d-4ef7-b668-3ba5de00e876","element-6066-11e4-a52e-4f735466cecf":"6578c635-784d-4ef7-b668-3ba5de00e876"},{"ELEMENT":"2d3c93aa-0926-4cbf-8df7-f089069d8baa","element-6066-11e4-a52e-4f735466cecf":"2d3c93aa-0926-4cbf-8df… +11-29 10:00:30.334 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/6578c635-784d-4ef7-b668-3ba5de00e876/click +11-29 10:00:30.335 I/appium ( 4751): Click command +11-29 10:00:30.573 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:31.072 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:36.103 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:36.104 I/appium ( 4751): Source command +11-29 10:00:36.105 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:36.157 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:39.387 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:39.387 I/appium ( 4751): Source command +11-29 10:00:39.387 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:39.445 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:42.666 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:42.667 I/appium ( 4751): FindElements command +11-29 10:00:42.669 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5 o'clock")', contextId: '' +11-29 10:00:42.670 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:42.715 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce","element-6066-11e4-a52e-4f735466cecf":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce"}]} +11-29 10:00:42.733 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/50fbec0a-5b96-47e0-95f9-a46226ebc3ce/click +11-29 10:00:42.734 I/appium ( 4751): Click command +11-29 10:00:42.901 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:43.687 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:48.701 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:48.702 I/appium ( 4751): Source command +11-29 10:00:48.702 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:48.755 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:56.479 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:56.479 I/appium ( 4751): Source command +11-29 10:00:56.479 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:56.532 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:01.923 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:01.923 I/appium ( 4751): FindElements command +11-29 10:01:01.925 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:01.925 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:01.959 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27","element-6066-11e4-a52e-4f735466cecf":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27"}]} +11-29 10:01:01.977 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/09fcd9d1-cad7-4af3-8169-d1d94ed9fc27/click +11-29 10:01:01.979 I/appium ( 4751): Click command +11-29 10:01:02.270 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:03.453 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:08.465 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:08.465 I/appium ( 4751): Source command +11-29 10:01:08.465 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:08.591 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:12.871 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:12.871 I/appium ( 4751): Source command +11-29 10:01:12.872 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:13.009 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:16.142 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:16.143 I/appium ( 4751): FindElements command +11-29 10:01:16.144 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5:00 AM")', contextId: '' +11-29 10:01:16.144 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:16.201 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"656d2911-7e29-44ec-a945-bf9cdcf52e8a","element-6066-11e4-a52e-4f735466cecf":"656d2911-7e29-44ec-a945-bf9cdcf52e8a"},{"ELEMENT":"175ec87a-09ba-4a3b-a7ea-7a44a22d6137","element-6066-11e4-a52e-4f735466cecf":"175ec87a-09ba-4a3b-a7e… +11-29 10:01:16.219 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/656d2911-7e29-44ec-a945-bf9cdcf52e8a/click +11-29 10:01:16.221 I/appium ( 4751): Click command +11-29 10:01:16.504 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:17.623 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:22.635 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:22.635 I/appium ( 4751): Source command +11-29 10:01:22.636 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:22.692 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:26.284 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:26.284 I/appium ( 4751): Source command +11-29 10:01:26.284 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:26.336 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:29.377 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:29.378 I/appium ( 4751): FindElements command +11-29 10:01:29.379 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:29.379 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:29.400 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"4b375985-3f6d-42f7-9192-14af15e5c249","element-6066-11e4-a52e-4f735466cecf":"4b375985-3f6d-42f7-9192-14af15e5c249"}]} +11-29 10:01:29.417 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/4b375985-3f6d-42f7-9192-14af15e5c249/click +11-29 10:01:29.418 I/appium ( 4751): Click command +11-29 10:01:29.603 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:30.140 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:35.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:35.159 I/appium ( 4751): Source command +11-29 10:01:35.160 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:35.318 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:38.396 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:38.396 I/appium ( 4751): Source command +11-29 10:01:38.397 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:38.524 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:41.103 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:41.104 I/appium ( 4751): FindElements command +11-29 10:01:41.106 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:41.107 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:41.142 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:01:46.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:46.160 I/appium ( 4751): Source command +11-29 10:01:46.161 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:46.302 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:56.094 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:56.095 I/appium ( 4751): Source command +11-29 10:01:56.096 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:56.237 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:02.211 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:02.211 I/appium ( 4751): FindElements command +11-29 10:02:02.213 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:02.213 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:02.261 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"fede33fb-1b8e-4847-9292-8d4391280284","element-6066-11e4-a52e-4f735466cecf":"fede33fb-1b8e-4847-9292-8d4391280284"}]} +11-29 10:02:02.279 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/fede33fb-1b8e-4847-9292-8d4391280284/click +11-29 10:02:02.280 I/appium ( 4751): Click command +11-29 10:02:02.482 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:03.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:02:08.318 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:08.320 I/appium ( 4751): Source command +11-29 10:02:08.321 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:08.456 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:15.468 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:15.469 I/appium ( 4751): Source command +11-29 10:02:15.469 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:15.606 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:22.245 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:22.246 I/appium ( 4751): FindElements command +11-29 10:02:22.247 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:22.247 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:22.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:02:27.300 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:27.300 I/appium ( 4751): Source command +11-29 10:02:27.301 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:27.423 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 09:59:50.405 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 09:59:50.405 I/appium ( 4751): Source command +11-29 09:59:50.406 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:50.498 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.apps.nexuslaunc… +11-29 09:59:56.038 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 09:59:56.039 I/appium ( 4751): FindElements command +11-29 09:59:56.046 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Clock")', contextId: '' +11-29 09:59:56.049 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:56.103 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"d5953a75-1450-40f9-af6c-b06d8e3d5949","element-6066-11e4-a52e-4f735466cecf":"d5953a75-1450-40f9-af6c-b06d8e3d5949"}]} +11-29 09:59:56.123 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/d5953a75-1450-40f9-af6c-b06d8e3d5949/click +11-29 09:59:56.125 I/appium ( 4751): Click command +11-29 09:59:56.421 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:58.224 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:03.249 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:03.249 I/appium ( 4751): Source command +11-29 10:00:03.249 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:03.379 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:07.211 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:07.212 I/appium ( 4751): Source command +11-29 10:00:07.212 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:07.354 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:10.694 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:10.695 I/appium ( 4751): FindElements command +11-29 10:00:10.699 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Add alarm")', contextId: '' +11-29 10:00:10.699 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:10.746 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"1f56b595-98c4-40c3-86c2-d927b69e4843","element-6066-11e4-a52e-4f735466cecf":"1f56b595-98c4-40c3-86c2-d927b69e4843"}]} +11-29 10:00:10.764 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/1f56b595-98c4-40c3-86c2-d927b69e4843/click +11-29 10:00:10.766 I/appium ( 4751): Click command +11-29 10:00:11.219 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:12.200 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:17.226 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:17.228 I/appium ( 4751): Source command +11-29 10:00:17.229 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:17.281 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:20.410 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:20.411 I/appium ( 4751): Source command +11-29 10:00:20.411 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:20.464 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:30.286 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:30.287 I/appium ( 4751): FindElements command +11-29 10:00:30.288 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("11 o'clock")', contextId: '' +11-29 10:00:30.288 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:30.319 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"6578c635-784d-4ef7-b668-3ba5de00e876","element-6066-11e4-a52e-4f735466cecf":"6578c635-784d-4ef7-b668-3ba5de00e876"},{"ELEMENT":"2d3c93aa-0926-4cbf-8df7-f089069d8baa","element-6066-11e4-a52e-4f735466cecf":"2d3c93aa-0926-4cbf-8df… +11-29 10:00:30.334 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/6578c635-784d-4ef7-b668-3ba5de00e876/click +11-29 10:00:30.335 I/appium ( 4751): Click command +11-29 10:00:30.573 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:31.072 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:36.103 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:36.104 I/appium ( 4751): Source command +11-29 10:00:36.105 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:36.157 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:39.387 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:39.387 I/appium ( 4751): Source command +11-29 10:00:39.387 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:39.445 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:42.666 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:42.667 I/appium ( 4751): FindElements command +11-29 10:00:42.669 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5 o'clock")', contextId: '' +11-29 10:00:42.670 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:42.715 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce","element-6066-11e4-a52e-4f735466cecf":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce"}]} +11-29 10:00:42.733 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/50fbec0a-5b96-47e0-95f9-a46226ebc3ce/click +11-29 10:00:42.734 I/appium ( 4751): Click command +11-29 10:00:42.901 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:43.687 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:48.701 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:48.702 I/appium ( 4751): Source command +11-29 10:00:48.702 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:48.755 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:56.479 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:56.479 I/appium ( 4751): Source command +11-29 10:00:56.479 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:56.532 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:01.923 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:01.923 I/appium ( 4751): FindElements command +11-29 10:01:01.925 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:01.925 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:01.959 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27","element-6066-11e4-a52e-4f735466cecf":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27"}]} +11-29 10:01:01.977 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/09fcd9d1-cad7-4af3-8169-d1d94ed9fc27/click +11-29 10:01:01.979 I/appium ( 4751): Click command +11-29 10:01:02.270 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:03.453 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:08.465 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:08.465 I/appium ( 4751): Source command +11-29 10:01:08.465 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:08.591 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:12.871 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:12.871 I/appium ( 4751): Source command +11-29 10:01:12.872 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:13.009 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:16.142 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:16.143 I/appium ( 4751): FindElements command +11-29 10:01:16.144 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5:00 AM")', contextId: '' +11-29 10:01:16.144 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:16.201 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"656d2911-7e29-44ec-a945-bf9cdcf52e8a","element-6066-11e4-a52e-4f735466cecf":"656d2911-7e29-44ec-a945-bf9cdcf52e8a"},{"ELEMENT":"175ec87a-09ba-4a3b-a7ea-7a44a22d6137","element-6066-11e4-a52e-4f735466cecf":"175ec87a-09ba-4a3b-a7e… +11-29 10:01:16.219 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/656d2911-7e29-44ec-a945-bf9cdcf52e8a/click +11-29 10:01:16.221 I/appium ( 4751): Click command +11-29 10:01:16.504 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:17.623 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:22.635 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:22.635 I/appium ( 4751): Source command +11-29 10:01:22.636 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:22.692 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:26.284 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:26.284 I/appium ( 4751): Source command +11-29 10:01:26.284 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:26.336 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:29.377 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:29.378 I/appium ( 4751): FindElements command +11-29 10:01:29.379 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:29.379 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:29.400 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"4b375985-3f6d-42f7-9192-14af15e5c249","element-6066-11e4-a52e-4f735466cecf":"4b375985-3f6d-42f7-9192-14af15e5c249"}]} +11-29 10:01:29.417 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/4b375985-3f6d-42f7-9192-14af15e5c249/click +11-29 10:01:29.418 I/appium ( 4751): Click command +11-29 10:01:29.603 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:30.140 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:35.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:35.159 I/appium ( 4751): Source command +11-29 10:01:35.160 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:35.318 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:38.396 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:38.396 I/appium ( 4751): Source command +11-29 10:01:38.397 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:38.524 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:41.103 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:41.104 I/appium ( 4751): FindElements command +11-29 10:01:41.106 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:41.107 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:41.142 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:01:46.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:46.160 I/appium ( 4751): Source command +11-29 10:01:46.161 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:46.302 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:56.094 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:56.095 I/appium ( 4751): Source command +11-29 10:01:56.096 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:56.237 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:02.211 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:02.211 I/appium ( 4751): FindElements command +11-29 10:02:02.213 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:02.213 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:02.261 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"fede33fb-1b8e-4847-9292-8d4391280284","element-6066-11e4-a52e-4f735466cecf":"fede33fb-1b8e-4847-9292-8d4391280284"}]} +11-29 10:02:02.279 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/fede33fb-1b8e-4847-9292-8d4391280284/click +11-29 10:02:02.280 I/appium ( 4751): Click command +11-29 10:02:02.482 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:03.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:02:08.318 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:08.320 I/appium ( 4751): Source command +11-29 10:02:08.321 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:08.456 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:15.468 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:15.469 I/appium ( 4751): Source command +11-29 10:02:15.469 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:15.606 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:22.245 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:22.246 I/appium ( 4751): FindElements command +11-29 10:02:22.247 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:22.247 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:22.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:02:27.300 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:27.300 I/appium ( 4751): Source command +11-29 10:02:27.301 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:27.423 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 09:59:56.421 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 09:59:58.224 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:03.249 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:03.249 I/appium ( 4751): Source command +11-29 10:00:03.249 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:03.379 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:07.211 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:07.212 I/appium ( 4751): Source command +11-29 10:00:07.212 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:07.354 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:10.694 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:10.695 I/appium ( 4751): FindElements command +11-29 10:00:10.699 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Add alarm")', contextId: '' +11-29 10:00:10.699 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:10.746 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"1f56b595-98c4-40c3-86c2-d927b69e4843","element-6066-11e4-a52e-4f735466cecf":"1f56b595-98c4-40c3-86c2-d927b69e4843"}]} +11-29 10:00:10.764 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/1f56b595-98c4-40c3-86c2-d927b69e4843/click +11-29 10:00:10.766 I/appium ( 4751): Click command +11-29 10:00:11.219 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:12.200 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:17.226 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:17.228 I/appium ( 4751): Source command +11-29 10:00:17.229 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:17.281 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:20.410 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:20.411 I/appium ( 4751): Source command +11-29 10:00:20.411 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:20.464 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:30.286 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:30.287 I/appium ( 4751): FindElements command +11-29 10:00:30.288 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("11 o'clock")', contextId: '' +11-29 10:00:30.288 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:30.319 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"6578c635-784d-4ef7-b668-3ba5de00e876","element-6066-11e4-a52e-4f735466cecf":"6578c635-784d-4ef7-b668-3ba5de00e876"},{"ELEMENT":"2d3c93aa-0926-4cbf-8df7-f089069d8baa","element-6066-11e4-a52e-4f735466cecf":"2d3c93aa-0926-4cbf-8df… +11-29 10:00:30.334 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/6578c635-784d-4ef7-b668-3ba5de00e876/click +11-29 10:00:30.335 I/appium ( 4751): Click command +11-29 10:00:30.573 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:31.072 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:36.103 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:36.104 I/appium ( 4751): Source command +11-29 10:00:36.105 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:36.157 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:39.387 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:39.387 I/appium ( 4751): Source command +11-29 10:00:39.387 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:39.445 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:42.666 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:00:42.667 I/appium ( 4751): FindElements command +11-29 10:00:42.669 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5 o'clock")', contextId: '' +11-29 10:00:42.670 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:42.715 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce","element-6066-11e4-a52e-4f735466cecf":"50fbec0a-5b96-47e0-95f9-a46226ebc3ce"}]} +11-29 10:00:42.733 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/50fbec0a-5b96-47e0-95f9-a46226ebc3ce/click +11-29 10:00:42.734 I/appium ( 4751): Click command +11-29 10:00:42.901 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:43.687 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:00:48.701 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:48.702 I/appium ( 4751): Source command +11-29 10:00:48.702 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:48.755 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:00:56.479 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:00:56.479 I/appium ( 4751): Source command +11-29 10:00:56.479 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:00:56.532 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:01.923 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:01.923 I/appium ( 4751): FindElements command +11-29 10:01:01.925 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:01.925 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:01.959 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27","element-6066-11e4-a52e-4f735466cecf":"09fcd9d1-cad7-4af3-8169-d1d94ed9fc27"}]} +11-29 10:01:01.977 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/09fcd9d1-cad7-4af3-8169-d1d94ed9fc27/click +11-29 10:01:01.979 I/appium ( 4751): Click command +11-29 10:01:02.270 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:03.453 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:08.465 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:08.465 I/appium ( 4751): Source command +11-29 10:01:08.465 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:08.591 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:12.871 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:12.871 I/appium ( 4751): Source command +11-29 10:01:12.872 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:13.009 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:16.142 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:16.143 I/appium ( 4751): FindElements command +11-29 10:01:16.144 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("5:00 AM")', contextId: '' +11-29 10:01:16.144 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:16.201 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"656d2911-7e29-44ec-a945-bf9cdcf52e8a","element-6066-11e4-a52e-4f735466cecf":"656d2911-7e29-44ec-a945-bf9cdcf52e8a"},{"ELEMENT":"175ec87a-09ba-4a3b-a7ea-7a44a22d6137","element-6066-11e4-a52e-4f735466cecf":"175ec87a-09ba-4a3b-a7e… +11-29 10:01:16.219 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/656d2911-7e29-44ec-a945-bf9cdcf52e8a/click +11-29 10:01:16.221 I/appium ( 4751): Click command +11-29 10:01:16.504 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:17.623 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:22.635 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:22.635 I/appium ( 4751): Source command +11-29 10:01:22.636 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:22.692 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:26.284 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:26.284 I/appium ( 4751): Source command +11-29 10:01:26.284 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:26.336 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:29.377 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:29.378 I/appium ( 4751): FindElements command +11-29 10:01:29.379 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:29.379 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:29.400 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"4b375985-3f6d-42f7-9192-14af15e5c249","element-6066-11e4-a52e-4f735466cecf":"4b375985-3f6d-42f7-9192-14af15e5c249"}]} +11-29 10:01:29.417 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/4b375985-3f6d-42f7-9192-14af15e5c249/click +11-29 10:01:29.418 I/appium ( 4751): Click command +11-29 10:01:29.603 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:30.140 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:01:35.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:35.159 I/appium ( 4751): Source command +11-29 10:01:35.160 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:35.318 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:38.396 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:38.396 I/appium ( 4751): Source command +11-29 10:01:38.397 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:38.524 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:41.103 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:01:41.104 I/appium ( 4751): FindElements command +11-29 10:01:41.106 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().textContains("OK")', contextId: '' +11-29 10:01:41.107 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:41.142 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:01:46.159 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:46.160 I/appium ( 4751): Source command +11-29 10:01:46.161 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:46.302 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:01:56.094 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:01:56.095 I/appium ( 4751): Source command +11-29 10:01:56.096 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:01:56.237 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:02.211 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:02.211 I/appium ( 4751): FindElements command +11-29 10:02:02.213 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:02.213 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:02.261 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[{"ELEMENT":"fede33fb-1b8e-4847-9292-8d4391280284","element-6066-11e4-a52e-4f735466cecf":"fede33fb-1b8e-4847-9292-8d4391280284"}]} +11-29 10:02:02.279 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/element/fede33fb-1b8e-4847-9292-8d4391280284/click +11-29 10:02:02.280 I/appium ( 4751): Click command +11-29 10:02:02.482 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:03.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":null} +11-29 10:02:08.318 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:08.320 I/appium ( 4751): Source command +11-29 10:02:08.321 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:08.456 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:15.468 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:15.469 I/appium ( 4751): Source command +11-29 10:02:15.469 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:15.606 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… +11-29 10:02:22.245 I/appium ( 4751): channel read: POST /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/elements +11-29 10:02:22.246 I/appium ( 4751): FindElements command +11-29 10:02:22.247 I/appium ( 4751): method: '-android uiautomator', selector: 'new UiSelector().descriptionContains("Tomorrow")', contextId: '' +11-29 10:02:22.247 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:22.286 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":[]} +11-29 10:02:27.300 I/appium ( 4751): channel read: GET /wd/hub/session/5bbf778a-384a-4d18-9303-0394a968ea88/source +11-29 10:02:27.300 I/appium ( 4751): Source command +11-29 10:02:27.301 I/appium ( 4751): Waiting up to 10000ms for the device to idle +11-29 10:02:27.423 I/appium ( 4751): AppiumResponse: {"sessionId":"5bbf778a-384a-4d18-9303-0394a968ea88","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n<hierarchy index=\"0\" class=\"hierarchy\" rotation=\"0\" width=\"1080\" height=\"1857\">\r\n <android.widget.FrameLayout index=\"0\" package=\"com.google.android.deskclock\" cla… diff --git a/agent_for_ui/main_for_ui.py b/agent_for_ui/main_for_ui.py new file mode 100644 index 0000000000000000000000000000000000000000..e2fdc812ec0236fe05ff9520696c6345784411a4 --- /dev/null +++ b/agent_for_ui/main_for_ui.py @@ -0,0 +1,1533 @@ +# coding: utf-8 +import argparse +import subprocess +import sys +import signal +import time +from appium.webdriver.common.touch_action import TouchAction +from appium.webdriver.common.multi_action import MultiAction +# from appium.webdriver.common.mobileby import MobileBy +from selenium.webdriver.common.by import By +from appium.webdriver.common.mobileby import MobileBy +from appium import webdriver +from tqdm import tqdm +from agent_for_api.API_list import usr_api_list +from agent_for_api.agent_api_prompt import select_api_prompt, select_api_example +from agent_for_api.main_for_api import get_api_list +from agent_html_prompt import * +from selenium.common.exceptions import WebDriverException, InvalidElementStateException, NoSuchElementException, \ + InvalidArgumentException, StaleElementReferenceException +import json +from xml_to_html import any_tree_to_html +from chatgpt import * +import re +from app_list_MIUI import app_list +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from selenium.common.exceptions import TimeoutException +from PIL import Image +import numpy as np +from io import StringIO + +max_attempts = 5 # Set the maximum number of retry attempts +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +# currently tasks are all defined on single-app +''' +How does the entire demo work? +Use appium to obtain the xml information of the interface -> convert the local algorithm into html format -> +package and send the task (task description + env_html) -> agent (planning + action) -> +action is converted into appium's action and acts on the environment -> (task Description+env_html+action_history)-> +The new action acts on the environment. (loop construction completed) +''' +# How to agent make decision?: +''' +planning action reward memory? +''' + +import xml.etree.ElementTree as ET +from anytree import Node + +def parse_xml_to_anytree(xml_code): + root = ET.fromstring(xml_code) + + def build_anytree(node, element, child_index, seen_elements, counter): + element_type = element.tag + # print(element_type) + # Generate a unique key for the element based on its attributes + element_key = ( + element_type, + element.get('resource-id', ''), + # content-desc, text兼容问题 + element.get('content-desc', ''), + element.get('text', ''), + element.get('clickable', ''), + element.get('scrollable', ''), + element.get('package', ''), ## + element.get('class', ''), + element.get('displayed', ''), + element.get('bounds', ''), + ) + seen_elements.add(element_key) + + # 检查是否有儿子节点 + is_leaf = not bool(list(element)) + + # 检查 text 和 content-desc 是否至少有一个为真 + has_text = bool(element.get('text')) + has_content_desc = bool(element.get('content-desc')) + + visible = has_text or has_content_desc or 'button' in element_type.lower() or 'edittext' in element.tag.lower() + + leaf_id = counter[0] # 使用计数器作为 leaf_id + counter[0] += 1 # 递增计数器 + + anytree_node = Node(element_type, parent=node, type=element_type, visible=visible, leaf_id=leaf_id, + resource_id=element.get('resource-id'), content_desc=element.get('content-desc'), + text=element.get('text'), clickable=element.get('clickable'), is_leaf=is_leaf, + scrollable=element.get('scrollable'), package=element.get('package'), + class_label=element.get('class'), displayed=element.get('displayed'), + bounds=element.get('bounds')) + + for idx, child in enumerate(element): + # print(idx) + build_anytree(anytree_node, child, idx, seen_elements, counter) + + is_root_leaf = not bool(list(root)) + + anytree_root = Node(root.tag, type=root.tag, visible=True, leaf_id=0, # 初始计数器为 0 + resource_id=root.get('resource-id'), content_desc=root.get('content-desc'), + text=root.get('text'), clickable=root.get('clickable'), + is_leaf=is_root_leaf, scrollable=root.get('scrollable'), package=root.get('package'), + class_label=root.get('class'), displayed=root.get('displayed'), bounds=root.get('bounds')) + + seen_elements = set() + counter = [1] # 使用列表来存储计数器的值,以便在递归中共享 + + for idx, child in enumerate(root): + # print("out",idx) + build_anytree(anytree_root, child, idx, seen_elements, counter) + + return anytree_root + + +def screen_swipe(driver, start_x, start_y, end_x, end_y, duration=1000): + # use duration to control the speed of swipe + success = False + while not success: + try: + driver.swipe(start_x, start_y, end_x, end_y, duration) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + + +def get_memory(history_actions): + memory_list = [] + # print(history_actions) + for round_number, action_info in enumerate(history_actions, 1): + key = None + if 'action' in action_info: + key = 'action' + # round_number += 1 # 仅当键是 'action' 时增加 round_number + elif 'thought' in action_info: + key = 'thought' + elif 'API call' in action_info: + key = 'API call' + # round_number += 1 # 仅当键是 'API call' 时增加 round_number + else: + key = 'unknown' + # round_number += 1 # 对于其他未知类型也增加 round_number + detail = action_info.get(key, 'No detail') + # print(f"{key}: {detail}") + memory_list.append(f"{action_info}") + # memory_list.append(f"{key}: {detail}") + + if memory_list != []: + # memory_list = memory_list[-10:] # 记忆压缩。 + memory = "\n".join(memory_list) + else: + memory = "No action has been completed yet" + return memory + + +from selenium.common.exceptions import WebDriverException +import re, time + +def find_element1(element, driver): + id_match = re.search(r'id="([^"]+)"', element) + text_match = re.search(r'>\s*([^<>]+)\s*<', element) + alt_match = re.search(r'description="([^"]+)"', element) + class_match = re.search(r'class="([^"]+)"', element) + if id_match: + id_value = id_match.group(1).strip() + # print("-----------------------------------------", id_value) + if text_match: + text_value = text_match.group(1).strip() + # print(text_value) + if text_value.isspace() or not text_value: + text_match = False + # print("-----------------------------------------", text_match) + + if alt_match: + alt_value = alt_match.group(1).strip() + # print("-----------------------------------------", alt_value) + if class_match: + class_value = class_match.group(1).strip() + + find = False + if text_match and alt_match and id_match : + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}").description("{alt_value}").resourceId("{id_value}")') + success = True # 如果页面源获取成功,设置success为True以退出循环 + except WebDriverException as e: + attempt_count += 1 + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) # 重试前等待5秒 + if not success: + print("服务器端错误") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print(r"警告: 存在多个具有相同text_value\description\id的元素,这可能导致错误!") + if find: + return list + + if text_match and alt_match : + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}").description("{alt_value}")') + success = True # 如果页面源获取成功,设置success为True以退出循环 + except WebDriverException as e: + attempt_count += 1 + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) # 重试前等待5秒 + if not success: + print("服务器端错误") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print(r"警告: 存在多个具有相同text_value\description的元素,这可能导致错误!") + if find: + return list + + if id_match and text_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}").text("{text_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print(r"警告: 存在多个具有相同text_value\id的元素,这可能导致错误!") + if find: + return list + + if id_match and alt_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}").description("{alt_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print(r"警告: 存在多个具有相同description\id的元素,这可能导致错误!") + if find: + return list + + if text_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text的元素,这可能导致错误!") + if find: + return list + + if alt_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().description("{alt_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同description的元素,这可能导致错误!") + if find: + return list + + if class_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().className("{class_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同class的元素,这可能导致错误!") + if find: + return list + + if id_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{id_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同id的元素,这可能导致错误!") + if find: + return list + + + + print("没有定位到对应的元素") + return None + + +def find_elements_by_criteria(driver, max_attempts=3, **criteria): + selectors = [] + if 'id' in criteria: + selectors.append(f'resourceId("{criteria["id"]}")') + if 'text' in criteria: + selectors.append(f'text("{criteria["text"]}")') + if 'alt' in criteria: + selectors.append(f'description("{criteria["alt"]}")') + if 'class' in criteria: + selectors.append(f'className("{criteria["class"]}")') + + if not selectors: + print("没有定位到对应的元素") + return None + + ui_selector = f'new UiSelector().' + '.'.join(selectors) + attempt_count = 0 + while attempt_count < max_attempts: + try: + elements = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, ui_selector) + if len(elements) > 0: + if len(elements) > 1: + print(f"警告: 存在多个具有相同属性的元素,这可能导致错误!") + return elements + attempt_count += 1 + except WebDriverException as e: + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) + attempt_count += 1 + + print("服务器端错误或超过最大尝试次数") + return None + + +def find_element(element, driver, max_attempts=3): + id_match = re.search(r'id="([^"]+)"', element) + text_match = re.search(r'>\s*([^<>]+)\s*<', element) + alt_match = re.search(r'description="([^"]+)"', element) + class_match = re.search(r'class="([^"]+)"', element) + + criteria = {} + if id_match: + criteria['id'] = id_match.group(1).strip() + if text_match and not text_match.group(1).isspace(): + criteria['text'] = text_match.group(1).strip() + if alt_match: + criteria['alt'] = alt_match.group(1).strip() + if class_match: + criteria['class'] = class_match.group(1).strip() + + return find_elements_by_criteria(driver, max_attempts, **criteria) + + +def actions(res, history_actions, driver): + if 'click(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + else: + try: + list[0].click() + history_actions.append({"Action": f"click({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful click click({text})"}) + + elif 'press(' in res: + action = TouchAction(driver) + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element press({text})"}) + else: + try: + action.press(list[0]).wait(1000).release().perform() + history_actions.append({"Action": f"press({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful press({text})"}) + + elif 'zoom(' in res: + action1 = TouchAction(driver) + action2 = TouchAction(driver) + zoom_action = MultiAction(driver) + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element Zoom({text})"}) + else: + try: + action1.press(list[0]).move_to(x=0, y=-100) # 向上移动 + action2.press(list[0]).move_to(x=0, y=100) # 向下移动 + zoom_action.add(action1, action2) + zoom_action.perform() + history_actions.append({"Action": f"Zoom({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful zoom({text})"}) + + elif 'pinch(' in res: + action1 = TouchAction(driver) + action2 = TouchAction(driver) + + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element pinch({text})"}) + else: + try: + action1.press(x=list[0].location['x'], y=list[0].location['y'] - 100).move_to(list[0]) + action2.press(x=list[0].location['x'], y=list[0].location['y'] + 100).move_to(list[0]) + + pinch_action = MultiAction(driver) + pinch_action.add(action1, action2) + pinch_action.perform() + history_actions.append({"Action": f"pinch({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful pinch({text})"}) + + elif 'input(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + element = res[first_angle_bracket:second_angle_bracket + 1] + input_context = res[second_angle_bracket + 2:-1].strip() + input_context = input_context.strip('\'\"') + # print(element) + # print(input_context) + list = find_element(element, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + else: + try: + # 点击元素 + list[0].click() + history_actions.append({"Action": f"click({element})"}) + try: + WebDriverWait(driver, 1).until( + EC.staleness_of(list[0]) + ) + # 等待刷新 + + except TimeoutException: + # 如果元素不存在或不可见,不执行input操作 + list[0].send_keys(input_context) + history_actions.append({"Action": f"input({element}, {input_context})"}) + + except InvalidElementStateException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append( + {"Action": f"[Fail]: InvalidElementStateException input({element}, {input_context})"}) + except NoSuchElementException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: NoSuchElementException input({element}, {input_context})"}) + except InvalidArgumentException as e: + print(f"Encountered an error: {e}. Input value might be invalid for the element.") + history_actions.append( + {"Action": f"[Fail]: InvalidArgumentException input({element}, {input_context})"}) + except StaleElementReferenceException as e: + print(f"Encountered an error: {e}. The element might have been detached from the DOM.") + history_actions.append( + {"Action": f"[Fail]: StaleElementReferenceException input({element}, {input_context})"}) + + elif 'scroll(' in res or 'swipe(' in res: + action = TouchAction(driver) + + numbers = re.findall(r'\d+', res) + # 将找到的数字转换成整数并分配给相应的变量 + x1, y1, x2, y2 = map(int, numbers[:4]) + max_value = max(x1, y1, x2, y2) + # 对滑动操作的参数进行调整,以免超出边界。 + if x1 == max_value: + x1 -= 50 + if y1 == max_value: + y1 -= 50 + if x2 == max_value: + x2 -= 50 + if y2 == max_value: + y2 -= 50 + + # 如果某个数等于0,则加50 + if x1 == 0: + x1 += 50 + if y1 == 0: + y1 += 50 + if x2 == 0: + x2 += 50 + if y2 == 0: + y2 += 50 + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + action.press(x=x1, y=y1).wait(ms=1000).move_to(x=x2, y=y2).release().perform() + # driver.swipe(x1, y1, x2, y2, duration=1000) # swipe的效果不够好。 + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success: + history_actions.append({"Action": f"scroll([{x1},{y1}][{x2},{y2}])"}) + else: + print("[Fail]: unsucess scroll.") + history_actions.append({"Action": f"[Fail]: unsuccessful scroll scroll([{x1},{y1}][{x2},{y2}])"}) + + +def get_page_source(driver): + attempt_count = 0 + success = False + xml_source = None + while not success and attempt_count < max_attempts: + try: + xml_source = driver.page_source + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # driver.quit() + # driver = open_driver() + return xml_source, driver + + +def run_command(command): + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + if result.returncode == 0: + return "API execution successful" + else: + return f"API execution failed with error: {result.stderr}" + + +def api(res, history_actions): + matches = re.findall(r'\[(.*)\]', res) + success = False + for match in matches: + adb_command = match + print("[API CALL]: ", adb_command) + result = run_command(adb_command) + print("[APi Function Call Result]: \033[34m" + result + "\033[0m") + if 'success' in result: + success = True + # 有待商榷,执行失败的信息是否应该放在记录里,这样可以避免重复生成错误的API + if "successful" in result: + history_actions.append({f"API call": f"{adb_command}. [Call result]:{result}"}) + # history_actions.append({f"[API call]": f"{adb_command}. [Call result]:{result}"}) + return success + + +def get_success_memory(history_actions): + memory_list = [] + counter = 0 # Initialize a counter + for action_info in history_actions: + key = None + # 检查动作类型 + if 'action' in action_info or 'thought' in action_info: + if 'action' in action_info: + key = 'action' + elif 'thought' in action_info: + key = 'thought' + + # 当遇到 'action' 或 'thought' 时,每两次迭代增加一次计数 + if counter % 2 == 0: + round_number = counter // 2 + 1 + counter += 1 + + elif 'API call' in action_info: + key = 'API call' + round_number = counter // 2 + 1 # 保持当前的 round_number + + elif 'App Select and Plan' in action_info: + key = 'App Select and Plan' + round_number = counter // 2 + 1 # 保持当前的 round_number + + else: + key = 'unknown' + round_number = counter // 2 + 1 # 保持当前的 round_number + + detail = action_info.get(key, 'No detail') + memory_list.append(f"Step {round_number}: {key}: {detail}") + + memory = "\n".join(memory_list) + return memory + + +def read_json_file(file_path): + with open(file_path, 'r', encoding='utf-8') as file: + data = json.load(file) + + # Extracting only id, app, packagename, query, and check_point information + extracted_data = [] + for item in data: + id = item.get('id') + app = item.get('app') + package_name = item['check_point'].get('package', []) + query = item.get('query') + check_point = item.get('check_point') + extracted_data.append({ + 'id': id, + 'app': app, + 'packagename': package_name, + 'query': query, + 'check_point': check_point + }) + + return extracted_data + + +def calculate_package_coverage(data_item, action_history): + # 初始化覆盖数量 + coverage_count = 0 + if 'check_point' in data_item and 'package' in data_item['check_point']: + package_names = data_item['check_point']['package'] + # 遍历 package_names 中的每个元素 + for package_name in package_names: + # 检查元素是否出现在 action_history 的任何动作中 + if any(package_name in action for action in action_history): + coverage_count += 1 + + return coverage_count / len(package_names) + else: + return 0 + + +def check_point_passed(check_point_value, action_history): + if '|' in check_point_value: + # 如果列表中有 '|', 那么任何一个 action_history 中的动作包含至少一个元素即通过 + return any(cp_elem in action for cp_elem in check_point_value if cp_elem != '|' for action in action_history), 1 + elif '&' in check_point_value: + # 如果列表中有 '&', 那么 action_history 中的动作需要包含所有元素 + return all(cp_elem in action for cp_elem in check_point_value if cp_elem != '&' for action in action_history), 1 + else: + if isinstance(check_point_value, list): + total_elems = len(check_point_value) + passed_elems = sum(any(cp_elem in action for action in action_history) for cp_elem in check_point_value) + return passed_elems, total_elems + else: + return any(check_point_value in action for action in action_history), 1 + + +# check point scores +def check_points(data_item, action_history): + checkpoints = ['activity', 'resource-id', 'text', 'package', 'api'] + total_checkpoints = 0 + passed_checkpoints = 0 + + for cp in checkpoints: + if cp in data_item['check_point'] and data_item['check_point'][cp]: # check existence + check_point_value = data_item['check_point'][cp] + if isinstance(check_point_value, list): + passed, total = check_point_passed(check_point_value, action_history) + passed_checkpoints += passed + total_checkpoints += total + else: + # 直接比较 + total_checkpoints += 1 + if any(check_point_value in action for action in action_history): + passed_checkpoints += 1 + + return passed_checkpoints / total_checkpoints if total_checkpoints > 0 else 0 + + +def format_api_info_as_text(text, data): + """ + Format the API information as text in the specified format if the name_ch or name_en of an app is found in the text. + :param text: The string in which to search for app names. + :param data: The JSON data containing app information. + :return: A string formatted as a dictionary with app names as keys and their API information as values. + """ + formatted_info = {} + general_keys_api = [ + { + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } + ] + formatted_info["通用按键"] = general_keys_api + # 如果text是中文,则应该直接匹配, \b带有词边界。 + # if app['name_ch'] in text or app['name_en'] in text + for app in data: + # if re.search(r'\b' + re.escape(app['name_ch']) + r'\b', text) or re.search( + # r'\b' + re.escape(app['name_en']) + r'\b', text): + if app['name_ch'] in text or app['name_en'] in text: + api_info = app['api'] + if api_info: + formatted_info[app['name_ch']] = api_info + + # Convert the dictionary to a string formatted as a dictionary + formatted_text = json.dumps(formatted_info, indent=2, ensure_ascii=False) + return formatted_text + + +def map_and_reverse_complete_interactive_elements(html_content): # 建立元素和数值的映射关系; + lines = html_content.split('\n') + interactive_elements = {} + counter = 1 # Start numbering from 1 + + for line in lines: + # Check if the line contains a clickable, scrollable or input element + if 'clickable="true"' in line or 'scrollable="true"' in line or 'input' in line: + # Map the entire line (HTML tag) to the number + interactive_elements[counter] = line.strip() + counter += 1 # Increment the counter for the next interactive element + + return interactive_elements + + +def calculate_scroll_parameters(window_size, html, direction, scroll_type='short'): + width = window_size['width'] + height = window_size['height'] + safe_margin = 10 # 安全边界距离 + match = re.search(r'bounds="\[([0-9]+,[0-9]+)\]\[([0-9]+,[0-9]+)\]"', html) + bounds = [match.group(1), match.group(2)] + # 解析bounds字符串"[x1,y1][x2,y2]" + x1, y1 = map(int, bounds[0].split(',')) + x2, y2 = map(int, bounds[1].split(',')) + + # 计算中点坐标 + mid_x = (x1 + x2) // 2 + mid_y = (y1 + y2) // 2 + + if scroll_type == 'short': + # 短距离滚动 + offset_x = (x2 - x1) // 4 + offset_y = (y2 - y1) // 4 + scroll_coordinates = { + 'up': ([mid_x, mid_y + offset_y], [mid_x, mid_y - offset_y]), + 'down': ([mid_x, mid_y - offset_y], [mid_x, mid_y + offset_y]), + 'left': ([mid_x + offset_x, mid_y], [mid_x - offset_x, mid_y]), + 'right': ([mid_x - offset_x, mid_y], [mid_x + offset_x, mid_y]) + } + elif scroll_type == 'long': + # 长距离滚动 + if direction == 'up': + start_x = end_x = mid_x + start_y = y2 - safe_margin + end_y = safe_margin + elif direction == 'down': + start_x = end_x = mid_x + start_y = y1 + safe_margin + end_y = height - safe_margin + elif direction == 'left': + start_y = end_y = mid_y + start_x = x2 - safe_margin + end_x = safe_margin + elif direction == 'right': + start_y = end_y = mid_y + start_x = x1 + safe_margin + end_x = width - safe_margin + else: + return None # 无效方向 + scroll_coordinates = { + direction: ([start_x, start_y], [end_x, end_y]) + } + else: + return None # 无效的滚动类型 + + return scroll_coordinates[direction] + + # # 定义滚动偏移量 + # offset_x = (x2 - x1) // 4 + # offset_y = (y2 - y1) // 4 + # + # # 根据方向计算滚动起始和结束坐标 + # scroll_directions = { + # 'up': ([mid_x, mid_y + offset_y], [mid_x, mid_y - offset_y]), + # 'down': ([mid_x, mid_y - offset_y], [mid_x, mid_y + offset_y]), + # 'left': ([mid_x + offset_x, mid_y], [mid_x - offset_x, mid_y]), + # 'right': ([mid_x - offset_x, mid_y], [mid_x + offset_x, mid_y]) + # } + + # return scroll_directions[direction] + + +def process_user_input(window_size, user_input, elements_map): # 将用户的输入转化为实际的执行指令 + # Splitting the input for action and parameters + parts = user_input.split('(', 1) + action = parts[0].strip().lower() # Action: click, scroll, input + params = parts[1].rstrip(')').split(',') if len(parts) > 1 else [] # Parameters in the parentheses + + # Defining the action command and parameters + action_command = '' + params_command = '' + + # Determine the action and construct corresponding command + if action == 'click': + action_command = 'click' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'press': + action_command = 'press' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'zoom': + action_command = 'zoom' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'pinch': + action_command = 'pinch' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'scroll': + action_command = 'scroll' + # Defining scroll directions as start and end coordinates + if params and params[0].isdigit() and int(params[0]) in elements_map: + html_element = elements_map[int(params[0])] + direction = str(params[1]).strip() + if len(params) > 2: + scroll_type = 'long' + else: + scroll_type = 'short' + params_command = calculate_scroll_parameters(window_size, html_element, direction, scroll_type) + elif action == 'input': + action_command = 'input' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + if len(params) > 1: + params_command += f", '{params[1]}'" + + # Construct the final command + final_command = f"{action_command}({params_command})" + + return final_command + + +# def display_html_and_mapping(html_content, elements_map): +# # Outputting the entire HTML content +# print("[HTML Content]:") +# print(html_content) +# print("[Interactive Elements Mapping]:") +# # Iterating through the elements map and printing the index and description +# # Initialize categories +# clickables = {} +# scrollables = {} +# inputs = {} # Assuming we could identify input elements somehow +# +# # Iterating through the elements map to categorize +# for index, html in elements_map.items(): +# if 'input' in html: +# inputs[index] = html +# elif 'scrollable="true"' in html: +# scrollables[index] = html +# elif 'clickable="true"' in html: +# clickables[index] = html +# +# +# # Outputting categorized elements +# categories = [("Clickables", clickables), ("Scrollables", scrollables), ("Inputs", inputs)] +# for category_name, category_map in categories: +# if category_map: # Only print if category has items +# print(f"[{category_name}]:") +# max_index_length = len(str(max(category_map.keys()))) if category_map else 0 +# for index, html in category_map.items(): +# # Attempting to extract a brief description +# if 'description="' in html: +# description = html.split('description="')[1].split('"')[0] +# else: +# text_content = html.split('>')[1].split('<')[0] if '>' in html and '<' in html else "" +# description = text_content.strip() +# # Adding bounds if the element is scrollable +# if 'scrollable="true"' in html and 'bounds="' in html: +# bounds = html.split('bounds="')[1].split('"')[0] +# description += f" ({bounds})" if bounds else "" +# if description: # Only print if there's a description or text content +# print(f"{index:{max_index_length}}: {description}") + +def display_html_and_mapping(html_content, elements_map): + from io import StringIO + + # Initialize categories + clickables = {} + scrollables = {} + inputs = {} # Assuming we could identify input elements somehow + + # Iterating through the elements map to categorize + for index, html in elements_map.items(): + if 'input' in html: + inputs[index] = html + elif 'EditText' in html: + inputs[index] = html + elif 'scrollable="true"' in html: + scrollables[index] = html + elif 'clickable="true"' in html: + clickables[index] = html + + # Using StringIO to capture output + output = StringIO() + + # Outputting categorized elements + categories = [("Clickables", clickables), ("Scrollables", scrollables), ("Inputs", inputs)] + for category_name, category_map in categories: + if category_map: # Only print if category has items + output.write(f"[{category_name}]:\n") + max_index_length = len(str(max(category_map.keys()))) if category_map else 0 + for index, html in category_map.items(): + description = "" + # Extracting a brief description + if 'description="' in html: + description = html.split('description="')[1].split('"')[0] + elif 'class="' in html: + class_name = html.split('class="')[1].split('"')[0] + # Check if there is visible text inside the element + inner_text = html.split('>')[1].split('<')[0] if '>' in html and '<' in html else "" + if not inner_text.strip(): + description = f"Empty {class_name}" + else: + description = inner_text.strip() + + # Adding bounds if the element is scrollable + if 'scrollable="true"' in html and 'bounds="' in html: + bounds = html.split('bounds="')[1].split('"')[0] + description += f" ({bounds})" if bounds else "" + + if description: # Only print if there's a description or text content + output.write(f"{index:{max_index_length}}: {description}\n") + + # Return the output as a string + return output.getvalue() +def display_html_and_mapping_1(html_content, elements_map): + # Outputting the entire HTML content + # Initialize categories + clickables = {} + scrollables = {} + inputs = {} # Assuming we could identify input elements somehow + + # Iterating through the elements map to categorize + for index, html in elements_map.items(): + if 'input' in html: + inputs[index] = html + elif 'EditText' in html: + inputs[index] = html + elif 'scrollable="true"' in html: + scrollables[index] = html + elif 'clickable="true"' in html: + clickables[index] = html + + # Outputting categorized elements + categories = [("Clickables", clickables), ("Scrollables", scrollables), ("Inputs", inputs)] + for category_name, category_map in categories: + if category_map: # Only print if category has items + print(f"[{category_name}]:") + max_index_length = len(str(max(category_map.keys()))) if category_map else 0 + for index, html in category_map.items(): + description = "" + # Extracting a brief description + if 'description="' in html: + description = html.split('description="')[1].split('"')[0] + elif 'class="' in html: + class_name = html.split('class="')[1].split('"')[0] + # Check if there is visible text inside the element + inner_text = html.split('>')[1].split('<')[0] if '>' in html and '<' in html else "" + if not inner_text.strip(): + description = f"Empty {class_name}" + else: + description = inner_text.strip() + + # Adding bounds if the element is scrollable + if 'scrollable="true"' in html and 'bounds="' in html: + bounds = html.split('bounds="')[1].split('"')[0] + description += f" ({bounds})" if bounds else "" + + if description: # Only print if there's a description or text content + print(f"{index:{max_index_length}}: {description}") + +def click_cancel(driver): + # cancel_button = driver.find_element_by_id("com.miui.systemAdSolution:id/cancel_dialog") + # if cancel_button: + # cancel_button.click() + cancel_button = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().text("取消")') + if cancel_button: + cancel_button[0].click() + + +def open_driver(command_executor, desired_caps): + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + driver = webdriver.Remote(command_executor, desired_caps) + success = True + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if not success: + print(f"Failed to connect after {max_attempts} attempts. Exiting program.") + driver.quit() + sys.exit() # Exit the program if connection is not successful + else: + print("[Device connected successfully!]") + return driver + + +def compare_images(img_path1, img_path2, threshold): + """ + Compare two images and determine if they are the same based on pixel values. + + :param img_path1: Path to the first image. + :param img_path2: Path to the second image. + :param threshold: The threshold for considering the images as the same. + This is the percentage of pixels that must be the same. + :return: True if the images are the same based on the given threshold, False otherwise. + """ + # Open the images + try: + img1 = Image.open(img_path1) + img2 = Image.open(img_path2) + except IOError: + print("Error in opening one of the images.") + return False + + # Convert images to numpy arrays + img1_array = np.array(img1) + img2_array = np.array(img2) + + # Check if dimensions are the same + if img1_array.shape != img2_array.shape: + print("Images have different dimensions.") + return False + + # Calculate the number of equal pixels + equal_pixels = np.sum(img1_array == img2_array) + + # Total number of pixels + total_pixels = img1_array.size + + # Calculate the ratio of equal pixels + similarity_ratio = equal_pixels / total_pixels + dif_ratio = 1 - similarity_ratio + + + return dif_ratio > threshold + + +def get_parser(): + parser = argparse.ArgumentParser(description="Agent for mobile phone") + parser.add_argument('--temperature', type=float, default=0.3, help='temperature') + parser.add_argument('--model', type=str, default='gpt-4-turbo-2024-04-09', help='model to use') + parser.add_argument('--user_name', type=str, default='xuweikai', help='user name') + parser.add_argument('--dataset', type=str, default='s_app_s_step.json', help='dataset to use') + parser.add_argument('--max_steps', type=int, choices=range(0, 50), default=10, help='numbers of steps') + parser.add_argument('--start_index', type=int, default=4, help='start_index') + parser.add_argument('--device_name', type=str, default='YD7HAEKB49Q4PZOJ', help='device to use') + parser.add_argument('--systemPort', type=int, default=8201, help='appium client port') + parser.add_argument('--command_executor', type=str, default='http://127.0.0.1:4723/wd/hub', help='appium server port') + parser.add_argument('--appPackage', type=str, default='ctrip.android.view', + help='which app to randomly walk') + return parser + + +parser = get_parser() +args = parser.parse_args() +should_continue = True +# STOP_SIGNAL_FILE = "../html/stop_signal.txt" + + +def main(): + global should_continue + t = time.localtime() + model_name = args.model.replace('/', '-') + logfilename = '../result/results-' + model_name + '--t' + str( + args.temperature) + '--' + time.strftime("%Y-%m-%d-%H-%M-%S", t) + '.jsonl' + # with open(logfilename, 'w', encoding='utf-8') as f: + # f.write(time.strftime("%Y-%m-%d %H:%M:%S", t) + '\n') # write each result as a new line + # f.write('model: ' + str(args.model) + '\n') + # f.write('max_steps: ' + str(args.max_steps) + '\n') + # f.write("--------------------------------\n") + + # read data + # data = read_json_file(args.dataset) + data = [ + {"ori": {"名称": "椰香可芮朵", "杯型": "小杯", "浓缩咖啡": "金烘浓缩(浅烘)", "星巴克门店": "星巴克松江文汇路店"}, "query": "请在星巴克松江文汇路店为我点一杯小杯椰香可芮朵,使用金烘浓缩(浅烘)咖啡,浓缩份数为1份。"}, + {"ori": {"名称": "浓缩康保蓝", "杯型": "双份", "浓缩咖啡": "经典浓缩(深烘)", "温度": "热", "浓缩份数": "浓缩份数", "星巴克门店": "星巴克Z18广场店"}, "query": "请在星巴克Z18广场店为我点一杯热的浓缩康保蓝,使用经典浓缩(深烘)咖啡,浓缩份数为2份。"}, + {"ori": {"名称": "馥芮白", "饮品主体": "稀奶油", "温度": "微热", "浓缩份数": "浓缩份数", "添加或更换风味糖浆": "大溪地香草风味糖浆", "添加更换牛奶": "燕麦奶", "浓缩咖啡": "经典浓缩(深烘)", "星巴克门店": "星巴克常州万都广场店"}, "query": "请在星巴克常州万都广场店为我点一杯馥芮白,使用经典浓缩(深烘)咖啡,浓缩份数为标准量。饮品中添加大溪地香草风味糖浆,使用燕麦奶替代标准牛奶,顶部覆盖微热的稀奶油。"}, + {"ori": {"名称": "芒果西番莲果茶星冰乐", "杯型": "中杯", "添加或更换风味糖浆": "原味糖浆", "饮品主体": "椰浆", "星巴克门店": "星巴克虹梅路店"}, "query": "请在星巴克虹梅路店为我点一杯中杯芒果西番莲果茶星冰乐,使用椰浆作为饮品主体,并添加原味糖浆。"} + ] + # read APP list + with open('app_list_MIUI.json', 'r', encoding='utf-8') as file: + all_app_list = json.load(file) + + print("***[TEST BEGIN]***") + + cnt = 0 + total_steps = 0 + pass_cnt = 0 + check_result_1 = 0 + check_result_2 = 0 + app_Packagename = "com.starbucks.cn" + device_name = args.device_name + systemPort = args.systemPort + command_executor = args.command_executor + desired_caps = { + "platformName": "Android", + "deviceName": device_name, + "udid": device_name, + "platformVersion": "13.0", + 'automationName': 'uiautomator2', + 'noReset': True, + 'newCommandTimeout': 6000, + 'uiautomator2ServerLaunchTimeout': 60000, + 'systemPort': systemPort + } + print(desired_caps) + print("[start connected]") + # driver to connect to the emulator + global driver + driver = open_driver(command_executor, desired_caps) + + start_index = args.start_index # Change this to the index you want to start testing from + # screenshot_path = f"C:/Users/mi/PycharmProjects/Agent_base_appium/result/screenshot/screenshot_{systemPort}_0.png" + # adb_command = f"adb exec-out screencap -p > {screenshot_path}" + # result = subprocess.run(adb_command, shell=True) + # result 用于对ADB的指令测试。 + # for data_item in tqdm(data[start_index:], desc="Automatic Testing"): + for data_item in tqdm(data, desc="Automatic Testing"): + # for data_item in tqdm(data, desc="Automatic Testing"): + driver.close_app() + # 清理正在前台的app + history_actions = [] + cnt += 1 + task = ''.join(data_item['query']) + print(task) + stop_command = ["adb", "-s", device_name, "shell", "am", "force-stop", app_Packagename] + subprocess.run(stop_command) + # if cnt == 1: + # adb_command = + stop_command = ["adb", "-s", device_name, "shell", "am", "force-stop", app_Packagename] + subprocess.run(stop_command) + # click_cancel(driver) + # + + # 这个方式会导致 socket hang up 目前尚未解决。 + # open switch app + # switch_command = f"adb shell input keyevent KEYCODE_APP_SWITCH" + # subprocess.run(switch_command) + # time.sleep(3) + # # 清理所有正在后台运行的程序 + # id_value = "com.miui.home:id/clearAnimView" + # try: + # x = driver.find_element(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}")') + # x.click() + # print("[All apps delete.]") + # except NoSuchElementException: + # print(f"[No app is running.]") + # 保证在主界面 + # reboot_command = f"adb shell input keyevent KEYCODE_HOME" + # # 执行命令 + # subprocess.run(reboot_command) + # print("\n[Go back to Home page]") + + # start_command = f"./emulator -avd miui_emulator_phone_34 -snapshot reset-env-3 -sysdir ~/.miui/system-images/android-34/miui_emulator_phone_34/xiaomi/x86_64" + # # start device and load the snapshot. + # avd_name = "emulator-5554" + # snapshot_name = "reset-env-3" + # emulator_path = r"emulator" + # + # print("[ReSet The Environment]: ", start_command) + # try: + # # 执行命令 + # subprocess.run(start_command, shell=True, check=True) + # + # except subprocess.CalledProcessError as e: + # print(f"命令执行失败: {e}") + # except FileNotFoundError: + # print("找不到'emulator'命令,请确保已将其添加到您的 PATH 环境变量中。") + # except Exception as e: + # print(f"发生了未知错误: {e}") + + # select the app + xml_source, driver = get_page_source(driver) + # print(xml_source) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code = any_tree_to_html(anytree_root, 0, None) + # folder_path = '' + # print("[HTML UI]:", html_code) + print(time.strftime("%Y-%m-%d-%H-%M-%S", t)) + prompt = app_selection_prompt.format(app_selection_example=app_selection_example, + task_description=task, apps_information=app_list) + # res = get_model_response(args, prompt) + res = ('This is a overall plan. ') + print("[Task]: ", task) + print("[App Select and Plan]: \033[34m" + res + "\033[0m") + plan = res + api_list = format_api_info_as_text(plan, all_app_list) + + # # agent with environment + round_number = 0 + task_continue = True + thought = "I have just specified the plan. Now I should execute it according to the plan and take the first step of the plan." + # 每一轮决策中,api和ui只能调用一个。 + # screenshot_path = f"C:/Users/mi/PycharmProjects/Agent_base_appium/result/screenshot_{device_name}/screenshot{device_name}_0.png" + # adb_command = f"adb exec-out screencap -p > {screenshot_path}" + # subprocess.run(adb_command, shell=True) + + while round_number < args.max_steps: + print(r"------------Round {round}------------".format(round=round_number)) + api_use = False + round_number += 1 + + xml_source, driver = get_page_source(driver) + if xml_source == None: + print("error") + sys.exit() + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code = any_tree_to_html(anytree_root, 0, None) + print("[thought]: \033[34m" + thought + "\033[0m") + # is there api could use?? # 先检查api的调用,再做ui操作。 + # api_prompt = select_api_prompt.format(select_api_example=select_api_example, api_list=api_list, task=task, + # memory=get_memory(history_actions), + # planning=plan, thought=thought, ui_information=html_code) + # api_res = get_model_response(args, api_prompt) + # print("[API]: \033[34m" + api_res + "\033[0m") + # if 'ERROR' in api_res: + # time.sleep(8) + # api_use = False + # continue + # elif 'sorry' not in api_res.lower(): + # if re.search(r'\[(.*)\]', api_res): + # result = api(api_res, history_actions) + # if result: + # api_use = True + # else: + # api_use = False + # else: + # print("[Wrong API command format]") + # api_use = False + # else: + # print("[No API Use]") + # api_use = False + # multi action making to finish a task. + # if not api_use: + # print("[HTML UI]:", html_code) + # previous_history_actions = history_actions + # # gpt4/3.5 API call + # actions_prompt = actions_making_prompt.format(actions_making_example=actions_making_example, + # task_description=task, + # ui_information=html_code, + # memory=get_memory(history_actions), + # planning=plan, thought=thought) + # print("[Prompt]: ", prompt) + # action_res = chatgpt(actions_prompt)[0] + # 保存动作前的页面信息 + + # finish\adb\ui actions decision making + type_prompt = action_type_prompt.format(action_type_example=action_type_example, task_description=task, + adb_api=api_list, action_history=get_memory(history_actions), + thought=thought, planning=plan) + # action_type = get_model_response(args, type_prompt) + # action_type = input("[Has the task been completed? If it is not completed, what type of action do we need to do?]: ") + action_type = 'ui action' + print("[Action Type]: \033[34m" + action_type + "\033[0m") + action_res = None + if "task is finished" in action_type.lower(): + task_continue = False + break + elif "adb" in action_type.lower() and "not finished" in action_type.lower(): + api_prompt = select_api_prompt.format(select_api_example=select_api_example, api_list=api_list, task=task, + memory=get_memory(history_actions), + planning=plan, thought=thought, ui_information=html_code) + action_res = get_model_response(args, api_prompt) + print("[API Action]: \033[34m" + action_res + "\033[0m") + # print("[API List]: ", api_list) + # action_res = input("[Which ADB command do we need?]: ") + result = api(action_res, history_actions) + if result: + api_use = True + else: + api_use = False + elif "ui action" in action_type.lower(): + mapping = map_and_reverse_complete_interactive_elements(html_code) + print(mapping) + action_space = display_html_and_mapping(html_code, mapping) + # actions_prompt = actions_making_prompt.format(actions_making_example=actions_making_example, + # task_description=task, + # action=action_space, + # memory=get_memory(history_actions), + # planning=plan, thought=thought) + # action_res = get_model_response(args, actions_prompt) + # print("[UI Action]: \033[34m" + action_res + "\033[0m") + # USER input + action_res = input("[Which UI action do we need to do? click/scroll/input]: ") + window_size = driver.get_window_size() + action_res = process_user_input(window_size, action_res, mapping) + print("[Actual Action]: \033[34m" + action_res + "\033[0m") + actions(action_res, history_actions, driver) + else: + print("[no usful action in this round!]") + continue + # if the request reach the limit; + time.sleep(1) + + xml_source, driver = get_page_source(driver) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + new_html_code = any_tree_to_html(anytree_root, 0, None) + print("New HTML code:", new_html_code) + # planning 放在最后面的原因是我们希望thought代表的是对当前动作的反思和对未来动作的思考。 + print("[Action History]: ", get_memory(history_actions)) + thought_prompt = Thought_prompt.format(thought_example=Thought_example, task_description=task, + planning=plan, action=action_res, + ui_information=html_code, + action_history=get_memory(history_actions), + now_ui_information=new_html_code, + api_list=usr_api_list) + + round_result = { + "round_number": round_number, + "old_html": html_code, + "new_html": new_html_code, + "action": action_res + } + # with open(logfilename, 'a', encoding='utf-8') as f: + # # Use json.dump() with indent=4 to write with indentation + # json.dump(round_result, f, indent=4) + # f.write('\n') # Add a newline to separate each result + # # save the screenshot + # 在设备上保存截图 + remote_path = f"/sdcard/screenshot_{systemPort}_{round_number}-screen.png" + screencap_command = f"adb shell screencap -p {remote_path}" + subprocess.run(screencap_command, shell=True) + local_path = f"C:/Users/mi/PycharmProjects/Agent_base_appium/result/screenshot/{systemPort}_{round_number}-screen.png" + xml_path = f"C:/Users/mi/PycharmProjects/Agent_base_appium/result/screenshot/{systemPort}_{round_number}-xml.txt" + html_path = f"C:/Users/mi/PycharmProjects/Agent_base_appium/result/screenshot/{systemPort}_{round_number}-html.txt" + + with open(xml_path, 'w', encoding='utf-8') as f: + f.write(xml_source) + f.write('\n') + f.close() + with open(html_path, 'w', encoding='utf-8') as f: + f.write(new_html_code) + f.write('\n') + f.close() + # 将截图文件拉取到本地 + # local_path = os.path.join(data_output_path, temp_save_path, f"{filename}-screen.png") + pull_command = f"adb pull {remote_path} {local_path}" + subprocess.run(pull_command, shell=True) + # 删除设备上的截图文件(可选) + delete_command = f"adb -s {device_name} shell rm {remote_path}" + subprocess.run(delete_command, shell=True) + + # adb_command = f"adb exec-out screencap -p > {screenshot_path}" + # result = subprocess.run(adb_command, shell=True) + # if result.returncode == 0: + # print("截图成功!") + # else: + # print("截图失败。") + # print("错误信息:", result.stderr) + # thought_res = get_model_response(args, thought_prompt) + # thought_res = input("what is your thought?") + thought_res = "This is a test." + # print("Thought Prompt:", thought_prompt) + print("[thought]: \033[34m" + thought_res + "\033[0m") + thought = thought_res # 更新对下一步动作的思考。 + # history_actions.append({"thought": f"{res}"}) + + + + # Task_description_example + total_steps += round_number + if task_continue: + result = "Task failed" + else: + result = "Task finished successfully" + pass_cnt += 1 + successful_actions_action = [action['Action'] for action in history_actions if + action.get('Action', '') and 'Fail' not in action['Action']] + successful_actions_api_call = [action['API call'] for action in history_actions if + action.get('API call', '') and 'failed' not in action['API call']] + successful_actions = successful_actions_action + successful_actions_api_call + + # check point + check_result_1 += calculate_package_coverage(data_item, successful_actions) + check_result_2 += check_points(data_item, successful_actions) + + result = { + "id": data_item["id"], + "app": data_item["app"], + 'query': data_item["query"], + 'action history': ' '.join(successful_actions), + 'check_point': data_item["check_point"], + "result": result, + "passrate": pass_cnt / cnt, + "steps": round_number, + "average steps": total_steps / cnt, + "level1_check_result": check_result_1 / cnt, + "level2_check_result": check_result_2 / cnt, + } + print("[passrate]: ", pass_cnt / cnt) + print("[level1_check_result]: ", check_result_1 / cnt) + print("[level2_check_result]: ", check_result_2 / cnt) + + # with open(logfilename, 'a', encoding='utf-8') as f: + # # Use json.dump() with indent=4 to write with indentation + # json.dump(result, f, indent=4) + # f.write('\n') # Add a newline to separate each result + + # task finished + driver.quit() + + +def signal_handler(sig, frame): + driver.quit() + print("driver cleaned") + sys.exit(0) + + +signal.signal(signal.SIGTERM, signal_handler) +signal.signal(signal.SIGINT, signal_handler) + +if __name__ == '__main__': + main() diff --git a/agent_for_ui/main_for_ui_wo_thought.py b/agent_for_ui/main_for_ui_wo_thought.py new file mode 100644 index 0000000000000000000000000000000000000000..1da79b9515e974604f2b826e24cee4fade5570a8 --- /dev/null +++ b/agent_for_ui/main_for_ui_wo_thought.py @@ -0,0 +1,936 @@ +# coding: utf-8 +import argparse +import subprocess +import os, sys +sys.path.append(os.getcwd()) +print(sys.path) +import time +from appium.webdriver.common.touch_action import TouchAction +# from appium.webdriver.common.mobileby import MobileBy +from selenium.webdriver.common.by import By +from appium.webdriver.common.mobileby import MobileBy +from appium import webdriver +from tqdm import tqdm +# import PIL.Image + +from agent_for_api.API_list import usr_api_list +from agent_for_api.agent_api_prompt import select_api_prompt, select_api_example +from agent_for_api.main_for_api import get_api_list +# from agent_for_ui.agent_html_prompt import * +from agent_html_prompt_thought import * +from selenium.common.exceptions import WebDriverException, InvalidElementStateException, NoSuchElementException +import json +from xml_to_html import any_tree_to_html +from chatgpt import chatgpt +# from gemini import gemini, gemini_img +import re +from app_list_MIUI import app_list +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from selenium.common.exceptions import TimeoutException + +max_attempts = 5 # Set the maximum number of retry attempts + +# currently tasks are all defined on single-app +''' +How does the entire demo work? +Use appium to obtain the xml information of the interface -> convert the local algorithm into html format -> +package and send the task (task description + env_html) -> agent (planning + action) -> +action is converted into appium's action and acts on the environment -> (task Description+env_html+action_history)-> +The new action acts on the environment. (loop construction completed) +''' +# How to agent make decision?: +''' +planning action reward memory? +''' + +import xml.etree.ElementTree as ET +from anytree import Node + +LLM_type = 'gpt' +#'gpt' +# def LLM(prompt): +# img = loadscreen() +# # input(prompt) +# if LLM_type == 'gpt': +# return chatgpt(prompt)[0] +# if LLM_type == 'gemini': +# return gemini(prompt) +# if LLM_type == 'gemini_img': +# return gemini_img(prompt, img) + +def parse_xml_to_anytree(xml_code): + root = ET.fromstring(xml_code) + + def build_anytree(node, element, child_index, seen_elements, counter): + element_type = element.tag + # print(element_type) + # Generate a unique key for the element based on its attributes + element_key = ( + element_type, + element.get('resource-id', ''), + # content-desc, text兼容问题 + element.get('content-desc', ''), + element.get('text', ''), + element.get('clickable', ''), + element.get('scrollable', ''), + element.get('package', ''), ## + element.get('class', ''), + element.get('displayed', ''), + element.get('bounds', ''), + ) + seen_elements.add(element_key) + + # 检查是否有儿子节点 + is_leaf = not bool(list(element)) + + # 检查 text 和 content-desc 是否至少有一个为真 + has_text = bool(element.get('text')) + has_content_desc = bool(element.get('content-desc')) + visible = has_text or has_content_desc or 'button' in element_type.lower() + + leaf_id = counter[0] # 使用计数器作为 leaf_id + counter[0] += 1 # 递增计数器 + + anytree_node = Node(element_type, parent=node, type=element_type, visible=visible, leaf_id=leaf_id, + resource_id=element.get('resource-id'), content_desc=element.get('content-desc'), + text=element.get('text'), clickable=element.get('clickable'), is_leaf=is_leaf, + scrollable=element.get('scrollable'), package=element.get('package'), + class_label=element.get('class'), displayed=element.get('displayed'), + bounds=element.get('bounds')) + + for idx, child in enumerate(element): + # print(idx) + build_anytree(anytree_node, child, idx, seen_elements, counter) + + is_root_leaf = not bool(list(root)) + + anytree_root = Node(root.tag, type=root.tag, visible=True, leaf_id=0, # 初始计数器为 0 + resource_id=root.get('resource-id'), content_desc=root.get('content-desc'), + text=root.get('text'), clickable=root.get('clickable'), + is_leaf=is_root_leaf, scrollable=root.get('scrollable'), package=root.get('package'), + class_label=root.get('class'), displayed=root.get('displayed'), bounds=root.get('bounds')) + + seen_elements = set() + counter = [1] # 使用列表来存储计数器的值,以便在递归中共享 + + for idx, child in enumerate(root): + # print("out",idx) + build_anytree(anytree_root, child, idx, seen_elements, counter) + + return anytree_root + + +def screen_swipe(driver, start_x, start_y, end_x, end_y, duration=1000): + # use duration to control the speed of swipe + success = False + while not success: + try: + driver.swipe(start_x, start_y, end_x, end_y, duration) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + + +def get_memory(history_actions): + memory_list = [] + # print(history_actions) + for round_number, action_info in enumerate(history_actions, 1): + key = None + if 'action' in action_info: + key = 'action' + # round_number += 1 # 仅当键是 'action' 时增加 round_number + elif 'thought' in action_info: + key = 'thought' + elif 'API call' in action_info: + key = 'API call' + # round_number += 1 # 仅当键是 'API call' 时增加 round_number + else: + key = 'unknown' + # round_number += 1 # 对于其他未知类型也增加 round_number + detail = action_info.get(key, 'No detail') + # print(f"{key}: {detail}") + memory_list.append(f"{action_info}") + # memory_list.append(f"{key}: {detail}") + + if memory_list != []: + # memory_list = memory_list[-10:] # 记忆压缩。 + memory = "\n".join(memory_list) + else: + memory = "No action has been completed yet" + return memory + + +def find_element(element, driver): + id_match = re.search(r'id="([^"]+)"', element) + text_match = re.search(r'>\s*([^<>]+)\s*<', element) + desc_match = re.search(r'description="([^"]+)"', element) + class_match = re.search(r'class="([^"]+)"', element) + if id_match: + id_value = id_match.group(1).strip() + # print("-----------------------------------------", id_value) + if text_match: + text_value = text_match.group(1).strip() + if text_value.isspace() or not text_value: + text_match = False + # print("-----------------------------------------", text_match) + + if desc_match: + desc_value = desc_match.group(1).strip() + if class_match: + class_value = class_match.group(1).strip() + + if desc_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().descriptionContains("{desc_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying\ + if success == False: + print("serve side error") + return None + if len(list) != 1: + print("Warning: There are multiple elements with the same desc_value, which may lead to errors!") + return list + if text_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().textContains("{text_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success == False: + print("serve side error") + return None + if len(list) != 1: + print("Warning: There are multiple elements with the same text_value, which may lead to errors!") + return list + if id_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) != 1: + print("Warning: There are multiple elements with the same resourceId, which may lead to errors!") + return list + + if class_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{class_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) != 1: + print("Warning: There are multiple elements with the same resourceId, which may lead to errors!") + return list + return None + + +def actions(res, history_actions, driver): + if 'click(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + else: + try: + list[0].click() + history_actions.append({"Action": f"click({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful click click({text})"}) + + elif 'input(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + element = res[first_angle_bracket:second_angle_bracket + 1] + input_context = res[second_angle_bracket + 2:-1].strip() + input_context = input_context.strip('\'\"') + # print(element) + # print(input_context) + list = find_element(element, driver) + print(list) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + else: + try: + # 点击元素 + list[0].click() + history_actions.append({"Action": f"click({element})"}) + try: + WebDriverWait(driver, 1).until( + EC.staleness_of(list[0]) + ) + # 等待刷新 + + except TimeoutException: + # 如果元素不存在或不可见,不执行input操作 + list[0].send_keys(input_context) + history_actions.append({"Action": f"input({element}, {input_context})"}) + + except InvalidElementStateException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append( + {"Action": f"[Fail]: InvalidElementStateException input({element}, {input_context})"}) + except NoSuchElementException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: NoSuchElementException input({element}, {input_context})"}) + + + + elif 'scroll(' in res or 'swipe(' in res: + action = TouchAction(driver) + numbers = re.findall(r'\d+', res) + # 将找到的数字转换成整数并分配给相应的变量 + x1, y1, x2, y2 = map(int, numbers[:4]) + max_value = max(x1, y1, x2, y2) + # 对滑动操作的参数进行调整,以免超出边界。 + if x1 == max_value: + x1 -= 50 + if y1 == max_value: + y1 -= 50 + if x2 == max_value: + x2 -= 50 + if y2 == max_value: + y2 -= 50 + + # 如果某个数等于0,则加50 + if x1 == 0: + x1 += 50 + if y1 == 0: + y1 += 50 + if x2 == 0: + x2 += 50 + if y2 == 0: + y2 += 50 + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + action.press(x=x1, y=y1).wait(ms=1000).move_to(x=x2, y=y2).release().perform() + # driver.swipe(x1, y1, x2, y1, duration=1000) # swipe的效果不够好。 + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success: + history_actions.append({"Action": f"scroll([{x1},{y1}][{x2},{y2}])"}) + else: + print("[Fail]: unsucess scroll.") + history_actions.append({"Action": f"[Fail]: unsuccessful scroll scroll([{x1},{y1}][{x2},{y2}])"}) + + +def get_page_source(driver): + attempt_count = 0 + success = False + xml_source = None + while not success and attempt_count < max_attempts: + try: + xml_source = driver.page_source + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # driver.quit() + # driver = open_driver() + return xml_source, driver + + +def run_command(command): + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + stderr = result.stderr + if not stderr: + return "API execution successful" + else: + return "API execution failed" + + +def api(res, history_actions): + matches = re.findall(r'\[(.*)\]', res) + success = False + for match in matches: + adb_command = match + print("[API CALL]: ", adb_command) + result = run_command(adb_command) + print("[APi Function Call Result]: \033[34m" + result + "\033[0m") + if 'success' in result: + success = True + # 有待商榷,执行失败的信息是否应该放在记录里,这样可以避免重复生成错误的API + if "successful" in result: + history_actions.append({f"API call": f"{adb_command}. [Call result]:{result}"}) + # history_actions.append({f"[API call]": f"{adb_command}. [Call result]:{result}"}) + return success + + +def get_success_memory(history_actions): + memory_list = [] + counter = 0 # Initialize a counter + for action_info in history_actions: + key = None + # 检查动作类型 + if 'action' in action_info or 'thought' in action_info: + if 'action' in action_info: + key = 'action' + elif 'thought' in action_info: + key = 'thought' + + # 当遇到 'action' 或 'thought' 时,每两次迭代增加一次计数 + if counter % 2 == 0: + round_number = counter // 2 + 1 + counter += 1 + + elif 'API call' in action_info: + key = 'API call' + round_number = counter // 2 + 1 # 保持当前的 round_number + + elif 'App Select and Plan' in action_info: + key = 'App Select and Plan' + round_number = counter // 2 + 1 # 保持当前的 round_number + + else: + key = 'unknown' + round_number = counter // 2 + 1 # 保持当前的 round_number + + detail = action_info.get(key, 'No detail') + memory_list.append(f"Step {round_number}: {key}: {detail}") + + memory = "\n".join(memory_list) + return memory + + +def open_driver(desired_caps): + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) + success = True + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if not success: + print(f"Failed to connect after {max_attempts} attempts. Exiting program.") + driver.quit() + sys.exit() # Exit the program if connection is not successful + else: + print("[Device connected successfully!]") + return driver + + +def read_json_file(file_path): + with open(file_path, 'r', encoding='utf-8') as file: + data = json.load(file) + + # Extracting only id, app, packagename, query, and check_point information + extracted_data = [] + for item in data: + id = item.get('id') + app = item.get('app') + package_name = item['check_point'].get('package', []) + query = item.get('query') + check_point = item.get('check_point') + extracted_data.append({ + 'id': id, + 'app': app, + 'packagename': package_name, + 'query': query, + 'check_point': check_point + }) + + return extracted_data + + +def calculate_package_coverage(data_item, action_history): + # 初始化覆盖数量 + coverage_count = 0 + if 'check_point' in data_item and 'package' in data_item['check_point']: + package_names = data_item['check_point']['package'] + # 遍历 package_names 中的每个元素 + for package_name in package_names: + # 检查元素是否出现在 action_history 的任何动作中 + if any(package_name in action for action in action_history): + coverage_count += 1 + + return coverage_count / len(package_names) + else: + return 0 + + +def check_point_passed(check_point_value, action_history): + if '|' in check_point_value: + # 如果列表中有 '|', 那么任何一个 action_history 中的动作包含至少一个元素即通过 + return any(cp_elem in action for cp_elem in check_point_value if cp_elem != '|' for action in action_history), 1 + elif '&' in check_point_value: + # 如果列表中有 '&', 那么 action_history 中的动作需要包含所有元素 + return all(cp_elem in action for cp_elem in check_point_value if cp_elem != '&' for action in action_history), 1 + else: + if isinstance(check_point_value, list): + total_elems = len(check_point_value) + passed_elems = sum(any(cp_elem in action for action in action_history) for cp_elem in check_point_value) + return passed_elems, total_elems + else: + return any(check_point_value in action for action in action_history), 1 + + +# check point scores +def check_points(data_item, action_history): + checkpoints = ['activity', 'resource-id', 'text', 'package', 'api'] + total_checkpoints = 0 + passed_checkpoints = 0 + + for cp in checkpoints: + if cp in data_item['check_point'] and data_item['check_point'][cp]: # check existence + check_point_value = data_item['check_point'][cp] + if isinstance(check_point_value, list): + passed, total = check_point_passed(check_point_value, action_history) + passed_checkpoints += passed + total_checkpoints += total + else: + # 直接比较 + total_checkpoints += 1 + if any(check_point_value in action for action in action_history): + passed_checkpoints += 1 + + return passed_checkpoints / total_checkpoints if total_checkpoints > 0 else 0 + + +def format_api_info_as_text(text, data): + """ + Format the API information as text in the specified format if the name_ch or name_en of an app is found in the text. + :param text: The string in which to search for app names. + :param data: The JSON data containing app information. + :return: A string formatted as a dictionary with app names as keys and their API information as values. + """ + formatted_info = {} + general_keys_api = [ + { + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } + ] + formatted_info["通用按键"] = general_keys_api + + for app in data: + if re.search(r'\b' + re.escape(app['name_ch']) + r'\b', text) or re.search( + r'\b' + re.escape(app['name_en']) + r'\b', text): + api_info = app['api'] + if api_info: + formatted_info[app['name_ch']] = api_info + + # Convert the dictionary to a string formatted as a dictionary + formatted_text = json.dumps(formatted_info, indent=2, ensure_ascii=False) + return formatted_text + + +def get_parser(): + parser = argparse.ArgumentParser(description="Agent for mobile phone") + parser.add_argument('--temperature', type=float, default=0.1, help='temperature') + parser.add_argument('--model', type=str, default='gpt-4', help='model to use') + parser.add_argument('--dataset', type=str, default='../data/s_app_s_step.json', help='dataset to use') + parser.add_argument('--max_steps', type=int, choices=range(0, 50), default=10, help='numbers of steps') + parser.add_argument('--start_index', type=int, default=50, help='start_index') + return parser + + +parser = get_parser() +args = parser.parse_args() +should_continue = True +STOP_SIGNAL_FILE = "../html/stop_signal.txt" + +def check_reset(driver): + with open('../html/static/reset_signal.txt', 'r') as file: + if file.read() == "reset": + reset_action(driver) + print("\033[30;47m Reset the emulator!"+ "\033[0m") + + # 清空文件内容 + with open('../html/static/reset_signal.txt', 'w', encoding='utf-8') as file: + file.truncate(0) + + +def reset_action(driver): + # for data_item in tqdm(data, desc="Automatic Testing"): + driver.close_app() + + + # open switch app + switch_command = f"adb shell input keyevent KEYCODE_APP_SWITCH" + subprocess.run(switch_command) + time.sleep(3) + # 清理所有正在后台运行的程序 + id_value = "com.miui.home:id/clearAnimView" + try: + x = driver.find_element(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}")') + x.click() + print("[All apps delete.]") + except NoSuchElementException: + print(f"[No app is running.]") + # 保证在主界面 + reboot_command = f"adb shell input keyevent KEYCODE_HOME" + # 执行命令 + subprocess.run(reboot_command) + +def getscreenshot(driver): + screenshot_filename = '../html/static/screenshot.jpg' + driver.get_screenshot_as_file(screenshot_filename) + print(f"截图已保存为:{screenshot_filename}") + +# def loadscreen(): +# img = PIL.Image.open('../html/static/screenshot.jpg') +# return img + +# def save(prompt, res): +# file_name = "../html/static/prompt.txt" +# +# # # 使用 'with' 语句打开文件,确保正确地关闭文件 +# # with open(file_name, 'w', encoding='utf-8') as file: +# # # 将 prompt 写入文件 +# # file.write(prompt) +# +# file_name = "../html/static/res.txt" +# +# # # 使用 'with' 语句打开文件,确保正确地关闭文件 +# # with open(file_name, 'w', encoding='utf-8') as file: +# # # 将 prompt 写入文件 +# # file.write(res) + +def savehtml(html_code): + print("[HTML UI]:", html_code) + file_name = "html.txt" + + # 使用 'with' 语句打开文件,确保正确地关闭文件 + with open(file_name, 'w', encoding='utf-8') as file: + # 将 prompt 写入文件 + file.write(html_code) + +def main(): + global should_continue + t = time.localtime() + model_name = args.model.replace('/', '-') + logfilename = '../result/results-' + model_name + '--t' + str( + args.temperature) + '--' + time.strftime("%Y-%m-%d-%H-%M-%S", t) + '.jsonl' + with open(logfilename, 'w', encoding='utf-8') as f: + f.write(time.strftime("%Y-%m-%d %H:%M:%S", t) + '\n') # write each result as a new line + f.write('model: ' + str(args.model) + '\n') + f.write('max_steps: ' + str(args.max_steps) + '\n') + f.write("--------------------------------\n") + + # read data + data = read_json_file(args.dataset) + # read APP list + with open('../app_list_MIUI.json', 'r', encoding='utf-8') as file: + all_app_list = json.load(file) + + print("***[TEST BEGIN]***") + + cnt = 0 + total_steps = 0 + pass_cnt = 0 + check_result_1 = 0 + check_result_2 = 0 + desired_caps = { + "platformName": "Android", + "deviceName": "emulator-5554", + "platformVersion": "14.0", + 'automationName': 'uiautomator2', + 'noReset': True, + # 'unicodeKeyboard': True, + # 'resetKeyboard': False, + 'newCommandTimeout': 6000, + 'uiautomator2ServerLaunchTimeout': 60000 + # 'skipServerInstallation': 'false', + } + print("[start connected]") + # driver to connect to the emulator + + driver = open_driver(desired_caps) + getscreenshot(driver) + start_index = args.start_index # Change this to the index you want to start testing from + for data_item in tqdm(data[start_index:], desc="Automatic Testing"): + # getscreenshot(driver) + # reset_action(driver) + # -------------------------------------------------------------------------------------------------------------------- + # getscreenshot(driver) + + # 清理正在前台的app + history_actions = [] + cnt += 1 + task = ''.join(data_item['query']) + + # file_name = "../html/static/query.txt" + # + # # 使用 'with' 语句打开文件,确保正确地关闭文件 + # with open(file_name, 'w', encoding='utf-8') as file: + # # 将 prompt 写入文件 + # file.write(task) + + # start_command = f"./emulator -avd miui_emulator_phone_34 -snapshot reset-env-3 -sysdir ~/.miui/system-images/android-34/miui_emulator_phone_34/xiaomi/x86_64" + # # start device and load the snapshot. + # avd_name = "emulator-5554" + # snapshot_name = "reset-env-3" + # emulator_path = r"emulator" + # + # print("[ReSet The Environment]: ", start_command) + # try: + # # 执行命令 + # subprocess.run(start_command, shell=True, check=True) + # + # except subprocess.CalledProcessError as e: + # print(f"命令执行失败: {e}") + # except FileNotFoundError: + # print("找不到'emulator'命令,请确保已将其添加到您的 PATH 环境变量中。") + # except Exception as e: + # print(f"发生了未知错误: {e}") + + # select the app + xml_source, driver = get_page_source(driver) + # print(xml_source) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code = any_tree_to_html(anytree_root, 0, None) + # print("[HTML UI]:", html_code[:400]) #[:400] + # savehtml(html_code) + prompt = app_selection_prompt.format(app_selection_example=app_selection_example, + task_description=task, apps_information=app_list) + + # getscreenshot(driver) + res = chatgpt(prompt)[0] + # save(prompt, res) + print("[Task]: ", task) + print("[App Select and Plan]: \033[34m" + res + "\033[0m") + # history_actions.append({"App Select and Plan": f"{res}"}) + plan = res + api_list = format_api_info_as_text(plan, all_app_list) + + # # agent with environment + round_number = 0 + task_continue = True + # thought = "I have just specified the plan. Now I should execute it according to the plan and take the first step of the plan." + # subprocess.run(["adb", "logcat", "-c"]) + # with open("logcat_output.txt", "w") as outfile: + # process = subprocess.Popen(['adb', 'logcat', 'appium:*', '*:S'], stdout=outfile, text=True, shell=False) + # 每一轮决策中,api和ui只能调用一个。 + while task_continue and round_number < args.max_steps: + # check_reset(driver) + getscreenshot(driver) + + with open(STOP_SIGNAL_FILE, 'r') as file: + if file.read() == "STOP": + driver.quit() + return + + print(r"------------Round {round}------------".format(round=round_number)) + api_use = False + round_number += 1 + + xml_source, driver = get_page_source(driver) + if xml_source == None: + print("error") + sys.exit() + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code = any_tree_to_html(anytree_root, 0, None) + # print("[HTML UI]:", html_code[:400]) + # savehtml(html_code) + + previous_history_actions = history_actions + + # print("[thought]: \033[34m" + thought + "\033[0m") + # is there api could use?? # 先检查api的调用,再做ui操作。 + api_prompt = select_api_prompt.format(select_api_example=select_api_example, api_list=api_list, task=task, + memory=get_memory(history_actions), + planning=plan, ui_information=html_code) + api_res = chatgpt(api_prompt)[0] + # save(api_prompt, api_res) + + print("[API]: \033[34m" + api_res + "\033[0m") + if 'ERROR' in api_res: + time.sleep(8) + api_use = False + continue + elif 'sorry' not in api_res.lower(): + if re.search(r'\[(.*)\]', api_res): + result = api(api_res, history_actions) + if result: + api_use = True + else: + api_use = False + else: + print("[Wrong API command format]") + api_use = False + else: + print("[No API Use]") + api_use = False + # multi action making to finish a task. + if not api_use: + # print("[HTML UI]:", html_code) + previous_history_actions = history_actions + + actions_prompt = actions_making_prompt.format(actions_making_example=actions_making_example, + task_description=task, + ui_information=html_code, + memory=get_memory(history_actions), + planning=plan) + # print("[Prompt]: ", prompt) + action_res = chatgpt(actions_prompt)[0] + # save(actions_prompt, action_res) + print("[Action]: \033[34m" + action_res + "\033[0m") + # if the request reach the limit; + if 'ERROR' in action_res: + time.sleep(8) + continue + else: + actions(action_res, history_actions, driver) + time.sleep(5) + + xml_source, driver = get_page_source(driver) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + new_html_code = any_tree_to_html(anytree_root, 0, None) + # print("New HTML code:", new_html_code) + # planning 放在最后面的原因是我们希望thought代表的是对当前动作的反思和对未来动作的思考。 + print("[Action History]: ", get_memory(history_actions)) + # if not api_use: + # thought_prompt = Thought_prompt.format(thought_example=Thought_example, task_description=task, + # planning=plan, action=action_res, + # ui_information=html_code, + # action_history=get_memory(history_actions), + # now_ui_information=new_html_code, + # api_list=usr_api_list) + # else: + # thought_prompt = Thought_prompt.format(thought_example=Thought_example, task_description=task, + # planning=plan, action=api_res, + # ui_information=html_code, + # action_history=get_memory(history_actions), + # now_ui_information=new_html_code, api_list=usr_api_list) + # thought_res = LLM(thought_prompt) + # save(thought_prompt,thought_res ) + # print("Thought Prompt:", thought_prompt) + # print("[thought]: \033[34m" + thought_res + "\033[0m") + # thought = thought_res # 更新对下一步动作的思考。 + # history_actions.append({"thought": f"{res}"}) + + # loop judgement + finish_prompt = Task_finish_prompt.format(task_finish_example=Task_finish_example, task_description=task, + ui_information=html_code, memory=get_memory(history_actions), + ) + finish_res = chatgpt(finish_prompt)[0] + # save(finish_prompt, finish_res) + if "yes" in finish_res.lower(): + task_continue = False + print("[Finish]: \033[34m" + finish_res + "\033[0m") + + # Task_description_example + total_steps += round_number + if task_continue: + result = "Task failed" + else: + result = "Task finished successfully" + pass_cnt += 1 + successful_actions_action = [action['Action'] for action in history_actions if + action.get('Action', '') and 'Fail' not in action['Action']] + successful_actions_api_call = [action['API call'] for action in history_actions if + action.get('API call', '') and 'failed' not in action['API call']] + successful_actions = successful_actions_action + successful_actions_api_call + + # check point + check_result_1 += calculate_package_coverage(data_item, successful_actions) + check_result_2 += check_points(data_item, successful_actions) + + result = { + "id": data_item["id"], + "app": data_item["app"], + 'query': data_item["query"], + 'action history': ' '.join(successful_actions), + 'check_point': data_item["check_point"], + "result": result, + "passrate": pass_cnt / cnt, + "steps": round_number, + "average steps": total_steps / cnt, + "level1_check_result": check_result_1 / cnt, + "level2_check_result": check_result_2 / cnt, + } + print("[passrate]: ", pass_cnt / cnt) + print("[level1_check_result]: ", check_result_1 / cnt) + print("[level2_check_result]: ", check_result_2 / cnt) + + with open(logfilename, 'a', encoding='utf-8') as f: + # Use json.dump() with indent=4 to write with indentation + json.dump(result, f, indent=4) + f.write('\n') # Add a newline to separate each result + + # task finished + driver.quit() + +if __name__ == '__main__': + main() diff --git a/agent_for_ui/random_walk_width.py b/agent_for_ui/random_walk_width.py new file mode 100644 index 0000000000000000000000000000000000000000..2a3124541178a83d298f242a4ae3c050d3fa612c --- /dev/null +++ b/agent_for_ui/random_walk_width.py @@ -0,0 +1,1518 @@ +# coding: utf-8 +import argparse +import subprocess +import sys +import time +import os +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from appium import webdriver +from appium.webdriver.common.touch_action import TouchAction +# from appium.webdriver.common.mobileby import MobileBy +from selenium.webdriver.common.by import By +from appium.webdriver.common.mobileby import MobileBy +from tqdm import tqdm +from agent_for_api.API_list import usr_api_list +from agent_for_api.agent_api_prompt import select_api_prompt, select_api_example +from agent_for_api.main_for_api import get_api_list +from agent_for_ui.agent_html_prompt import * +from selenium.common.exceptions import WebDriverException, InvalidElementStateException, NoSuchElementException +import json +from agent_for_ui.xml_to_html import any_tree_to_html +from chatgpt import chatgpt +import re +from app_list_MIUI import app_list +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from selenium.common.exceptions import TimeoutException +import os +import random +import copy +from appium.webdriver.common.touch_action import TouchAction +from appium.webdriver.common.multi_action import MultiAction + +max_attempts = 5 # Set the maximum number of retry attempts + + +# currently tasks are all defined on single-app +''' +How does the entire demo work? +Use appium to obtain the xml information of the interface -> convert the local algorithm into html format -> +package and send the task (task description + env_html) -> agent (planning + action) -> +action is converted into appium's action and acts on the environment -> (task Description+env_html+action_history)-> +The new action acts on the environment. (loop construction completed) +''' +# How to agent make decision?: +''' +planning action reward memory? +''' + +import xml.etree.ElementTree as ET +from anytree import Node + +def parse_xml_to_anytree(xml_code): + root = ET.fromstring(xml_code) + + def build_anytree(node, element, child_index, seen_elements, counter): + element_type = element.tag + # print(element_type) + # Generate a unique key for the element based on its attributes + element_key = ( + element_type, + element.get('resource-id', ''), + # content-desc, text兼容问题 + element.get('content-desc', ''), + element.get('text', ''), + element.get('clickable', ''), + element.get('scrollable', ''), + element.get('package', ''), ## + element.get('class', ''), + element.get('displayed', ''), + element.get('bounds', ''), + ) + seen_elements.add(element_key) + + # 检查是否有儿子节点 + is_leaf = not bool(list(element)) + + # 检查 text 和 content-desc 是否至少有一个为真 + has_text = bool(element.get('text')) + has_content_desc = bool(element.get('content-desc')) + visible = has_text or has_content_desc or 'button' in element_type.lower() + + leaf_id = counter[0] # 使用计数器作为 leaf_id + counter[0] += 1 # 递增计数器 + + anytree_node = Node(element_type, parent=node, type=element_type, visible=visible, leaf_id=leaf_id, + resource_id=element.get('resource-id'), content_desc=element.get('content-desc'), + text=element.get('text'), clickable=element.get('clickable'), is_leaf=is_leaf, + scrollable=element.get('scrollable'), package=element.get('package'), + class_label=element.get('class'), displayed=element.get('displayed'), bounds=element.get('bounds')) + + for idx, child in enumerate(element): + # print(idx) + build_anytree(anytree_node, child, idx, seen_elements, counter) + + is_root_leaf = not bool(list(root)) + + anytree_root = Node(root.tag, type=root.tag, visible=True, leaf_id=0, # 初始计数器为 0 + resource_id=root.get('resource-id'), content_desc=root.get('content-desc'), + text=root.get('text'), clickable=root.get('clickable'), + is_leaf=is_root_leaf, scrollable=root.get('scrollable'), package=root.get('package'), + class_label=root.get('class'), displayed=root.get('displayed'), bounds=root.get('bounds')) + + + seen_elements = set() + counter = [1] # 使用列表来存储计数器的值,以便在递归中共享 + + for idx, child in enumerate(root): + # print("out",idx) + build_anytree(anytree_root, child, idx, seen_elements, counter) + + return anytree_root + + + +# actions define +def screen_click(element_id): + element = driver.find_element(By.ID, element_id) # use id to locate the element + element.click() + +def screen_text_input(element_id, input_text): + element = driver.find_element(By.ID, element_id) # use id to locate the element + element.send_keys(input_text) + +def screen_swipe(driver, start_x, start_y, end_x, end_y, duration=1000): + # use duration to control the speed of swipe + success = False + while not success: + try: + driver.swipe(start_x, start_y, end_x, end_y, duration) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + + + + +def get_memory(history_actions): + memory_list = [] + # print(history_actions) + for round_number, action_info in enumerate(history_actions, 1): + key = None + if 'action' in action_info: + key = 'action' + # round_number += 1 # 仅当键是 'action' 时增加 round_number + elif 'thought' in action_info: + key = 'thought' + elif 'API call' in action_info: + key = 'API call' + # round_number += 1 # 仅当键是 'API call' 时增加 round_number + else: + key = 'unknown' + # round_number += 1 # 对于其他未知类型也增加 round_number + detail = action_info.get(key, 'No detail') + # print(f"{key}: {detail}") + memory_list.append(f"{action_info}") + # memory_list.append(f"{key}: {detail}") + + if memory_list != []: + # memory_list = memory_list[-10:] # 记忆压缩。 + memory = "\n".join(memory_list) + else: + memory = "No action has been completed yet" + return memory + +def find_element(element, driver): + id_match = re.search(r'id="([^"]+)"', element) + text_match = re.search(r'>\s*([^<>]+)\s*<', element) + alt_match = re.search(r'description="([^"]+)"', element) + class_match = re.search(r'class="([^"]+)"', element) + if id_match: + id_value = id_match.group(1).strip() + # print("-----------------------------------------", id_value) + if text_match: + text_value = text_match.group(1).strip() + if text_value.isspace() or not text_value: + text_match = False + # print("-----------------------------------------", text_match) + + if alt_match: + alt_value = alt_match.group(1).strip() + # print("-----------------------------------------", alt_value) + if class_match: + class_value = class_match.group(1).strip() + + find = False + if text_match and alt_match and id_match : + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}").description("{alt_value}").resourceId("{id_value}")') + success = True # 如果页面源获取成功,设置success为True以退出循环 + except WebDriverException as e: + attempt_count += 1 + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) # 重试前等待5秒 + if not success: + print("服务器端错误") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text_value\description\id的元素,这可能导致错误!") + if find: + return list + + if text_match and alt_match : + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().text("{text_value}").description("{alt_value}")') + success = True # 如果页面源获取成功,设置success为True以退出循环 + except WebDriverException as e: + attempt_count += 1 + print(f"遇到错误: {e}. 重试中...") + time.sleep(5) # 重试前等待5秒 + if not success: + print("服务器端错误") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text_value\description的元素,这可能导致错误!") + if find: + return list + + if id_match and text_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}").text("{text_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同text_value\id的元素,这可能导致错误!") + if find: + return list + + if id_match and alt_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().resourceId("{id_value}").description("{alt_value}")') + # print("------------------------",list) + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同description\id的元素,这可能导致错误!") + if find: + return list + + if id_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{id_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同id的元素,这可能导致错误!") + if find: + return list + + if class_match: + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + list = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, + f'new UiSelector().resourceId("{class_value}")') + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + # list = driver.find_elements(By.ID, id_value) + if success == False: + print("serve side error") + return None + if len(list) > 0: + find = True + if len(list) > 1: + print("警告: 存在多个具有相同class的元素,这可能导致错误!") + if find: + return list + + + + print("没有定位到对应的元素") + return None + +def actions(res, history_actions, driver): + if 'click(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element click({text})"}) + else: + try: + list[0].click() + history_actions.append({"Action": f"click({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful click click({text})"}) + + elif 'press(' in res: + action = TouchAction(driver) + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element press({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element press({text})"}) + else: + try: + action.press(list[0]).wait(1000).release().perform() + history_actions.append({"Action": f"press({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful press({text})"}) + + elif 'zoom(' in res: + action1 = TouchAction(driver) + action2 = TouchAction(driver) + zoom_action = MultiAction(driver) + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element Zoom({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element Zoom({text})"}) + else: + try: + action1.press(list[0]).move_to(x=0, y=-100) # 向上移动 + action2.press(list[0]).move_to(x=0, y=100) # 向下移动 + zoom_action.add(action1, action2) + zoom_action.perform() + history_actions.append({"Action": f"Zoom({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful zoom({text})"}) + + elif 'pinch(' in res: + action1 = TouchAction(driver) + action2 = TouchAction(driver) + + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + text = res[first_angle_bracket:second_angle_bracket + 1] + list = find_element(text, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element pinch({text})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element pinch({text})"}) + else: + try: + action1.press(x=list[0].location['x'], y=list[0].location['y'] - 100).move_to(list[0]) + action2.press(x=list[0].location['x'], y=list[0].location['y'] + 100).move_to(list[0]) + + pinch_action = MultiAction(driver) + pinch_action.add(action1, action2) + pinch_action.perform() + history_actions.append({"Action": f"pinch({text})"}) + except WebDriverException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: Unsuccessful pinch({text})"}) + + elif 'input(' in res: + first_angle_bracket = res.find('<') + first_reangle_bracket = res.find('>') + second_angle_bracket = res.find('>', first_reangle_bracket + 1) + # Extract the element from between these positions + element = res[first_angle_bracket:second_angle_bracket + 1] + input_context = res[second_angle_bracket + 2:-1].strip() + input_context = input_context.strip('\'\"') + # print(element) + # print(input_context) + list = find_element(element, driver) + if list == None: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + elif len(list) == 0: + print("Warning: Invalid element") + history_actions.append({"Action": f"[Fail]: Invalid element. input({element}, {input_context})"}) + else: + try: + # 点击元素 + list[0].click() + history_actions.append({"Action": f"click({element})"}) + try: + WebDriverWait(driver, 1).until( + EC.staleness_of(list[0]) + ) + # 等待刷新 + + except TimeoutException: + # 如果元素不存在或不可见,不执行input操作 + list[0].send_keys(input_context) + history_actions.append({"Action": f"input({element}, {input_context})"}) + + except InvalidElementStateException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append( + {"Action": f"[Fail]: InvalidElementStateException input({element}, {input_context})"}) + except NoSuchElementException as e: + print(f"Encountered an error: {e}. Retrying...") + history_actions.append({"Action": f"[Fail]: NoSuchElementException input({element}, {input_context})"}) + + + + elif 'scroll(' in res or 'swipe(' in res: + action = TouchAction(driver) + + numbers = re.findall(r'\d+', res) + # 将找到的数字转换成整数并分配给相应的变量 + x1, y1, x2, y2 = map(int, numbers[:4]) + max_value = max(x1, y1, x2, y2) + # 对滑动操作的参数进行调整,以免超出边界。 + if x1 == max_value: + x1 -= 50 + if y1 == max_value: + y1 -= 50 + if x2 == max_value: + x2 -= 50 + if y2 == max_value: + y2 -= 50 + + # 如果某个数等于0,则加50 + if x1 == 0: + x1 += 50 + if y1 == 0: + y1 += 50 + if x2 == 0: + x2 += 50 + if y2 == 0: + y2 += 50 + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + action.press(x=x1, y=y1).wait(ms=1000).move_to(x=x2, y=y2).release().perform() + # driver.swipe(x1, y1, x2, y2, duration=1000) # swipe的效果不够好。 + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if success: + history_actions.append({"Action": f"scroll([{x1},{y1}][{x2},{y2}])"}) + else: + print("[Fail]: unsucess scroll.") + history_actions.append({"Action": f"[Fail]: unsuccessful scroll scroll([{x1},{y1}][{x2},{y2}])"}) + +def get_page_source(driver): + attempt_count = 0 + success = False + xml_source = None + while not success and attempt_count < max_attempts: + try: + xml_source = driver.page_source + success = True # If the page source is acquired, set success to True to exit the loop + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(3) # Wait for 5 seconds before retrying + # driver.quit() + # driver = open_driver() + return xml_source, driver + + +def run_command(command): + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + stderr = result.stderr + if not stderr: + return "API execution successful" + else: + return "API execution failed" + +def api(res, history_actions): + matches = re.findall(r'\[(.*)\]', res) + success = False + for match in matches: + adb_command = match + print("[API CALL]: ", adb_command) + result = run_command(adb_command) + print("[APi Function Call Result]: \033[34m" + result + "\033[0m") + if 'success' in result: + success = True + # 有待商榷,执行失败的信息是否应该放在记录里,这样可以避免重复生成错误的API + if "successful" in result: + history_actions.append({f"API call": f"{adb_command}. [Call result]:{result}"}) + # history_actions.append({f"[API call]": f"{adb_command}. [Call result]:{result}"}) + return success + + +def get_success_memory(history_actions): + memory_list = [] + counter = 0 # Initialize a counter + for action_info in history_actions: + key = None + # 检查动作类型 + if 'action' in action_info or 'thought' in action_info: + if 'action' in action_info: + key = 'action' + elif 'thought' in action_info: + key = 'thought' + + # 当遇到 'action' 或 'thought' 时,每两次迭代增加一次计数 + if counter % 2 == 0: + round_number = counter // 2 + 1 + counter += 1 + + elif 'API call' in action_info: + key = 'API call' + round_number = counter // 2 + 1 # 保持当前的 round_number + + elif 'App Select and Plan' in action_info: + key = 'App Select and Plan' + round_number = counter // 2 + 1 # 保持当前的 round_number + + else: + key = 'unknown' + round_number = counter // 2 + 1 # 保持当前的 round_number + + detail = action_info.get(key, 'No detail') + memory_list.append(f"Step {round_number}: {key}: {detail}") + + memory = "\n".join(memory_list) + return memory + +def open_driver(): + success = False + attempt_count = 0 + while not success and attempt_count < max_attempts: + try: + driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) + success = True + except WebDriverException as e: + attempt_count += 1 + print(f"Encountered an error: {e}. Retrying...") + time.sleep(5) # Wait for 5 seconds before retrying + if not success: + print(f"Failed to connect after {max_attempts} attempts. Exiting program.") + driver.quit() + sys.exit() # Exit the program if connection is not successful + else: + print("[Device connected successfully!]") + return driver + +def read_json_file(file_path): + with open(file_path, 'r') as file: + data = json.load(file) + + # Extracting only id, app, packagename, query, and check_point information + extracted_data = [] + for item in data: + id = item.get('id') + app = item.get('app') + package_name = item['check_point'].get('package', []) + query = item.get('query') + check_point = item.get('check_point') + extracted_data.append({ + 'id': id, + 'app': app, + 'packagename': package_name, + 'query': query, + 'check_point': check_point + }) + + return extracted_data + +def calculate_package_coverage(data_item, action_history): + # 初始化覆盖数量 + coverage_count = 0 + if 'check_point' in data_item and 'package' in data_item['check_point']: + package_names = data_item['check_point']['package'] + # 遍历 package_names 中的每个元素 + for package_name in package_names: + # 检查元素是否出现在 action_history 的任何动作中 + if any(package_name in action for action in action_history): + coverage_count += 1 + + return coverage_count / len(package_names) + else: + return 0 + +def check_point_passed(check_point_value, action_history): + if '|' in check_point_value: + # 如果列表中有 '|', 那么任何一个 action_history 中的动作包含至少一个元素即通过 + return any(cp_elem in action for cp_elem in check_point_value if cp_elem != '|' for action in action_history), 1 + elif '&' in check_point_value: + # 如果列表中有 '&', 那么 action_history 中的动作需要包含所有元素 + return all(cp_elem in action for cp_elem in check_point_value if cp_elem != '&' for action in action_history), 1 + else: + if isinstance(check_point_value, list): + total_elems = len(check_point_value) + passed_elems = sum(any(cp_elem in action for action in action_history) for cp_elem in check_point_value) + return passed_elems, total_elems + else: + return any(check_point_value in action for action in action_history), 1 + +# check point scores +def check_points(data_item, action_history): + checkpoints = ['activity', 'resource-id', 'text', 'package', 'api'] + total_checkpoints = 0 + passed_checkpoints = 0 + + for cp in checkpoints: + if cp in data_item['check_point'] and data_item['check_point'][cp]: # check existence + check_point_value = data_item['check_point'][cp] + if isinstance(check_point_value, list): + passed, total = check_point_passed(check_point_value, action_history) + passed_checkpoints += passed + total_checkpoints += total + else: + # 直接比较 + total_checkpoints += 1 + if any(check_point_value in action for action in action_history): + passed_checkpoints += 1 + + return passed_checkpoints / total_checkpoints if total_checkpoints > 0 else 0 + +def format_api_info_as_text(text, data): + """ + Format the API information as text in the specified format if the name_ch or name_en of an app is found in the text. + :param text: The string in which to search for app names. + :param data: The JSON data containing app information. + :return: A string formatted as a dictionary with app names as keys and their API information as values. + """ + formatted_info = {} + general_keys_api = [ + { + "ADB Command": "adb shell input keyevent KEYCODE_BACK", + "Function Description": "Return to previous page", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_HOME", + "Function Description": "go to home page, which is equal to click the home button", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_SLEEP", + "Function Description": "Set the device to sleep", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell screencap -p /sdcard/screenshot.png", + "Function Description": "Takes a screenshot and saves it.", + "Parameter Information": "No additional parameters required." + }, + { + "ADB Command": "adb shell input keyevent KEYCODE_WAKEUP", + "Function Description": "Wake up the device", + "Parameter Information": "No additional parameters required." + } + ] + formatted_info["通用按键"] = general_keys_api + + for app in data: + #if re.search(r'\b' + re.escape(app['name_ch']) + r'\b', text) or re.search( + # r'\b' + re.escape(app['name_en']) + r'\b', text): + if app['name_en'] in text or app['name_ch'] in text: + api_info = app['api'] + if api_info: + formatted_info[app['name_ch']] = api_info + + # Convert the dictionary to a string formatted as a dictionary + formatted_text = json.dumps(formatted_info, indent=2, ensure_ascii=False) + return formatted_text + + +def map_and_reverse_complete_interactive_elements(html_content): # 建立元素和数值的映射关系; + lines = html_content.split('\n') + interactive_elements = {} + counter = 1 # Start numbering from 1 + + for line in lines: + # Check if the line contains a clickable, scrollable or input element + if 'clickable="true"' in line or 'scrollable="true"' in line or 'input' in line: + # Map the entire line (HTML tag) to the number + interactive_elements[counter] = line.strip() + counter += 1 # Increment the counter for the next interactive element + + return interactive_elements +def calculate_scroll_parameters(window_size, html, direction, scroll_type): + width = window_size['width'] + height = window_size['height'] + safe_margin = 10 # 安全边界距离 + match = re.search(r'bounds="\[([0-9]+,[0-9]+)\]\[([0-9]+,[0-9]+)\]"', html) + bounds = [match.group(1), match.group(2)] + # 解析bounds字符串"[x1,y1][x2,y2]" + x1, y1 = map(int, bounds[0].split(',')) + x2, y2 = map(int, bounds[1].split(',')) + + # 计算中点坐标 + mid_x = (x1 + x2) // 2 + mid_y = (y1 + y2) // 2 + + if scroll_type == 'short': + # 短距离滚动 + offset_x = (x2 - x1) // 4 + offset_y = (y2 - y1) // 4 + scroll_coordinates = { + 'up': ([mid_x, mid_y + offset_y], [mid_x, mid_y - offset_y]), + 'down': ([mid_x, mid_y - offset_y], [mid_x, mid_y + offset_y]), + 'left': ([mid_x + offset_x, mid_y], [mid_x - offset_x, mid_y]), + 'right': ([mid_x - offset_x, mid_y], [mid_x + offset_x, mid_y]) + } + elif scroll_type == 'long': + # 长距离滚动 + if direction == 'up': + start_x = end_x = mid_x + start_y = y2 - safe_margin + end_y = safe_margin + elif direction == 'down': + start_x = end_x = mid_x + start_y = y1 + safe_margin + end_y = height - safe_margin + elif direction == 'left': + start_y = end_y = mid_y + start_x = x2 - safe_margin + end_x = safe_margin + elif direction == 'right': + start_y = end_y = mid_y + start_x = x1 + safe_margin + end_x = width - safe_margin + else: + return None # 无效方向 + scroll_coordinates = { + direction: ([start_x, start_y], [end_x, end_y]) + } + else: + return None # 无效的滚动类型 + + return scroll_coordinates[direction] + + # # 定义滚动偏移量 + # offset_x = (x2 - x1) // 4 + # offset_y = (y2 - y1) // 4 + # + # # 根据方向计算滚动起始和结束坐标 + # scroll_directions = { + # 'up': ([mid_x, mid_y + offset_y], [mid_x, mid_y - offset_y]), + # 'down': ([mid_x, mid_y - offset_y], [mid_x, mid_y + offset_y]), + # 'left': ([mid_x + offset_x, mid_y], [mid_x - offset_x, mid_y]), + # 'right': ([mid_x - offset_x, mid_y], [mid_x + offset_x, mid_y]) + # } + # + # return scroll_directions[direction] + +def process_user_input(window_size, user_input, elements_map): # 将用户的输入转化为实际的执行指令 + # Splitting the input for action and parameters + parts = user_input.split('(', 1) + action = parts[0].strip().lower() # Action: click, scroll, input + params = parts[1].rstrip(')').split(',') if len(parts) > 1 else [] # Parameters in the parentheses + + # Defining the action command and parameters + action_command = '' + params_command = '' + + # Determine the action and construct corresponding command + if action == 'click': + action_command = 'click' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'press': + action_command = 'press' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'zoom': + action_command = 'zoom' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'pinch': + action_command = 'pinch' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + elif action == 'scroll': + action_command = 'scroll' + # Defining scroll directions as start and end coordinates + if params and params[0].isdigit() and int(params[0]) in elements_map: + html_element = elements_map[int(params[0])] + direction = str(params[1]) + if len(params) > 2: + scroll_type = 'long' + else: + scroll_type = 'short' + params_command = calculate_scroll_parameters(window_size, html_element, direction, scroll_type) + elif action == 'input': + action_command = 'input' + if params and params[0].isdigit() and int(params[0]) in elements_map: + params_command = elements_map[int(params[0])] + if len(params) > 1: + params_command += f", '{params[1]}'" + + # Construct the final command + final_command = f"{action_command}({params_command})" + + return final_command +def display_html_and_mapping(html_content, elements_map): + # Outputting the entire HTML content + print("[HTML Content]:") + print(html_content) + print("[Interactive Elements Mapping]:") + # Iterating through the elements map and printing the index and description + # Initialize categories + clickables = {} + scrollables = {} + inputs = {} # Assuming we could identify input elements somehow + + # Iterating through the elements map to categorize + for index, html in elements_map.items(): + if 'input' in html: + inputs[index] = html + elif 'scrollable="true"' in html: + scrollables[index] = html + elif 'clickable="true"' in html: + clickables[index] = html + + action_space={} + + # Outputting categorized elements + categories = [("Clickables", clickables), ("Scrollables", scrollables), ("Inputs", inputs)] + for category_name, category_map in categories: + if category_map: # Only print if category has items + print(f"[{category_name}]:") + max_index_length = len(str(max(category_map.keys()))) if category_map else 0 + for index, html in category_map.items(): + description = "" + # Extracting a brief description + if 'description="' in html: + description = html.split('description="')[1].split('"')[0] + elif 'class="' in html: + class_name = html.split('class="')[1].split('"')[0] + # Check if there is visible text inside the element + inner_text = html.split('>')[1].split('<')[0] if '>' in html and '<' in html else "" + if not inner_text.strip(): + description = f"Empty {class_name}" + else: + description = inner_text.strip() + # Adding bounds if the element is scrollable + if 'scrollable="true"' in html and 'bounds="' in html: + bounds = html.split('bounds="')[1].split('"')[0] + description += f" ({bounds})" if bounds else "" + + if description: # Only print if there's a description or text content + print(f"{index:{max_index_length}}: {description}") + action_space[index]=category_name + + ''' + for category_name, category_map in categories: + if category_map: # Only print if category has items + print(f"[{category_name}]:") + max_index_length = len(str(max(category_map.keys()))) if category_map else 0 + for index, html in category_map.items(): + # Attempting to extract a brief description + if 'description="' in html: + description = html.split('description="')[1].split('"')[0] + else: + text_content = html.split('>')[1].split('<')[0] if '>' in html and '<' in html else "" + description = text_content.strip() + # Adding bounds if the element is scrollable + if 'scrollable="true"' in html and 'bounds="' in html: + bounds = html.split('bounds="')[1].split('"')[0] + description += f" ({bounds})" if bounds else "" + if description: # Only print if there's a description or text content + print(f"{index:{max_index_length}}: {description}") + + action_space[index]=category_name + ''' + return action_space + + +def gen_action_list(action_space, window_size): + action_tobe = [] + for index in action_space: + category_name = action_space[index] + + action_list = [] + if category_name == "Clickables": + action_res = "click(" + str(index) + ")" + action_list.append(action_res) + + elif category_name == "Scrollables": + action_res = "scroll(" + str(index) + ",up)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",up, long)" + # action_list.append(action_res) + action_res = "scroll(" + str(index) + ",down)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",down, long)" + # action_list.append(action_res) + action_res = "scroll(" + str(index) + ",left)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",left, long)" + # action_list.append(action_res) + action_res = "scroll(" + str(index) + ",right)" + action_list.append(action_res) + # action_res="scroll("+str(index)+",right, long)" + # action_list.append(action_res) + elif category_name == "Inputs": + action_res = "click(" + str(index) + ")" + action_list.append(action_res) + random.shuffle(current_text_list) + action_res = "input(" + str(index) + "," + current_text_list[0] + ")" + action_list.append(action_res) + + # window_size = driver.get_window_size() + for action_res in action_list: + action_res = process_user_input(window_size, action_res, mapping) + if action_res not in action_tobe: + action_tobe.append(action_res) + return action_tobe + +def compare_html_acc(html_code_save,html_code): + html_code_save_list=html_code_save.strip().split("\n") + html_code_list=html_code.strip().split("\n") + index=0 + correct=[] + for code_ in html_code_list: + if code_ in html_code_save_list: + index+=1 + correct.append(1) + else: + correct.append(0) + if float(index)/len(html_code_list)<0.9: + print("###############html_code_save##############") + print(html_code_save) + print("###############html_code##############") + print(html_code) + print(correct) + return float(index)/len(html_code_list), index, len(html_code_list) + +def restart_from_homepage(start_APP_command,history_list,driver): + history_actions=[] + for temp_command in start_APP_command: + result = api(temp_command, history_actions) + if "adb" in temp_command.lower(): + time.sleep(10) + else: + time.sleep(5) + + history_actions = [] + for temp_command in history_list: + actions(temp_command, history_actions, driver) + print(temp_command) + if "adb" in temp_command.lower(): + time.sleep(10) + else: + time.sleep(5) + return history_actions + +def get_filelist(dir, Filelist): + newDir = dir + if os.path.isfile(dir): + Filelist.append(dir) + # # 若只是要返回文件文,使用这个 + # Filelist.append(os.path.basename(dir)) + elif os.path.isdir(dir): + for s in os.listdir(dir): + # 如果需要忽略某些文件夹,使用以下代码 + #if s == "xxx": + #continue + newDir=os.path.join(dir,s) + get_filelist(newDir, Filelist) + return Filelist + + +def click_cancel(driver): + # cancel_button = driver.find_element_by_id("com.miui.systemAdSolution:id/cancel_dialog") + # if cancel_button: + # cancel_button.click() + cancel_button = driver.find_elements(MobileBy.ANDROID_UIAUTOMATOR, f'new UiSelector().text("取消")') + if cancel_button: + cancel_button[0].click() + + +def get_parser(): + parser = argparse.ArgumentParser(description="Agent for mobile phone") + parser.add_argument('--temperature', type=float, default=0.1, help='temperature') + parser.add_argument('--model', type=str, default='gpt-4', help='model to use') + parser.add_argument('--dataset', type=str, default='data/s_app_m_step_utf8.json', help='dataset to use') + parser.add_argument('--max_steps', type=int, choices=range(0, 50), default=20, help='numbers of steps') + parser.add_argument('--start_index', type=int, default=0, help='start_index') + return parser + +parser = get_parser() +args = parser.parse_args() +# Press the green button in the gutter to run the script. +if __name__ == '__main__': + t = time.localtime() + model_name = args.model.replace('/', '-') + + # # read data + # with open("corpus/human_anno_data_tobe.json", 'r') as file: + # data = json.load(file) + # human_anno_data_done=[] + + if os.path.exists("corpus/human_anno_data_tobe.json"): + with open("corpus/human_anno_data_tobe.json", 'r') as file: + human_anno_data_done = json.load(file) + #data = read_json_file("corpus/instruct_data_APP2query2id.json") + # read APP list + with open('../app_list_MIUI.json', 'r', encoding='utf-8') as file: + all_app_list = json.load(file) + + app_name_en_data={} + app_package_data={} + for index in range(len(all_app_list)): + item=all_app_list[index] + item["app_id"]=index + if "name_en" in item: + app_name_en_data[item["name_en"]]=item + else: + print(item) + if "package" in item: + app_package_data[item["package"]]=item + else: + print(item) + + + print("***[TEST BEGIN]***") + # print("total_data_num: ",len(data)) + print("total_app_num: ",len(all_app_list)) + + cnt = 0 + total_steps = 0 + pass_cnt = 0 + check_result_1 = 0 + check_result_2 = 0 + + + start_index = args.start_index # Change this to the index you want to start testing from + + appPackage = "com.xiaomi.shop" + appActivity = ".activity.MainTabActivity" + desired_caps = { + "platformName": "Android", # 操作系统 + "deviceName": "emulator-5554", + "platformVersion": "14.0", + 'automationName': 'uiautomator2', + 'noReset': True, + # 'unicodeKeyboard': True, + # 'resetKeyboard': False, + "newCommandTimeout": 6000, + "uiautomator2ServerLaunchTimeout": 60000, + # 'skipServerInstallation': 'false', + } + print("[start connected]") + # driver to connect to the emulator + driver = open_driver() + + #for app_item in tqdm(data, desc="Automatic Testing"): + # name_en=app_item["name_en"] + # query_id_list=app_item["query_id"] + #小米商城,计算器 + #current_APP=["小米商城"]#日历,"短信",,"日历"喜马拉雅,小米视频,照片.短信 + current_APP=["xiaomishop"] + current_adb=["[adb shell am start -n com.xiaomi.shop/.activity.MainTabActivity]"] + current_text_list=["新款手机","小米手机","小米电视","红色小米T恤","蓝色的小米手机","小米耳机","小米手机和配件","小米11手机"] + #reboot_command = f"adb shell input keyevent KEYCODE_HOME" + # 执行命令 + #subprocess.run(reboot_command) + #subprocess.run(reboot_command,shell=True) + #print("[reboot_command]") + + name_en=current_APP[0] + name_ch=app_name_en_data[name_en]["name_ch"] + data_output_path="C:/Users/mi/PycharmProjects/Agent_base_appium/agent_for_ui/corpus/random_walk/"+name_en+"/" + + os.makedirs(data_output_path,mode=511,exist_ok=True) + round_number=1 + if not os.path.exists(data_output_path+name_en+"0.json"): + curr_path=name_en+"0" + start_APP_command=current_adb + history_actions=[] + for temp_command in start_APP_command: + result = api(temp_command, history_actions) + if "adb" in temp_command.lower(): + time.sleep(5) + else: + time.sleep(1) + xml_source, driver = get_page_source(driver) + if xml_source == None: + xml_source, driver = get_page_source(driver) + #print(xml_source) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code = any_tree_to_html(anytree_root, 0, None) + + mapping = map_and_reverse_complete_interactive_elements(html_code) + action_space = display_html_and_mapping(html_code, mapping) + + window_size = driver.get_window_size() + action_list= gen_action_list(action_space,window_size) + + #action_res = input("[Is this page main page?]: ") + ''' + if action_res == "No": + xml_source, driver = get_page_source(driver) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code = any_tree_to_html(anytree_root, 0, None) + + mapping = map_and_reverse_complete_interactive_elements(html_code) + action_space = display_html_and_mapping(html_code, mapping) + + window_size = driver.get_window_size() + action_list= gen_action_list(action_space,window_size) + ''' + + screencap_command = f"adb exec-out screencap -p > {data_output_path}{curr_path}-screen.png" + print(screencap_command) + subprocess.run(screencap_command,shell=True) + with open(data_output_path+curr_path+"-html.txt", 'w', encoding='utf-8') as f: + f.write(html_code) + f.write("\n") + f.close() + with open(data_output_path+curr_path+".json", 'w', encoding='utf-8') as f: + data_json_before={"round":round_number, "name":curr_path,"html_path":curr_path+"-html.txt","valid":True,\ + "screen_path":curr_path+"-screen.png","start_APP_main_page":start_APP_command,"history_actions":[],\ + "action_valid":[], "action_invalid":[],"action_name_list":action_list,"action_checked":[False for _ in range(len(action_list))]} + json.dump(data_json_before, f, indent=4,ensure_ascii=False) + f.write('\n') + f.close() + with open(data_output_path+"all_data.json",'w', encoding='utf-8') as f: + all_data={"num":0, "data":[]} + all_data["data"].append({"round":round_number,"name":curr_path,"history_actions":[],"done":False}) + all_data["num"]=len(all_data["data"]) + json.dump(all_data, f, indent=4,ensure_ascii=False) + f.write('\n') + f.close() + + + + task_continue=True + max_steps=5 + + close_command = ["adb", "shell", "am", "force-stop", appPackage] + history_actions=[] + subprocess.run(close_command) + + with open(data_output_path+"all_data.json", 'r', encoding='utf-8') as file: + all_data = json.load(file) + ''' + temp_file=file.readlines() + if len(temp_file)<1: + file_list=get_filelist(data_output_path,[]) + print(file_list) + if os.path.exists(data_output_path+name_en+"0.json"): + curr_path=name_en+"0" + + else: + ''' + ''' + if not os.path.exists(data_output_path+name_en+"0.json"): + with open(data_output_path+level_path+name_after+".json", 'w', encoding='utf-8') as f: + data_json_after={"round":round_number+1, "name":name_after,"html_path":name_after+"-html.txt","valid":True,\ + "screen_path":name_after+"-screen.png","start_APP_main_page":data_json_before["start_APP_main_page"],"history_actions":history_list,\ + "action_valid":[], "action_invalid":[],"action_name_list":action_list_after,"action_checked":[False for _ in range(len(action_list_after))]} + json.dump(data_json_after, f, indent=4,ensure_ascii=False) + f.write('\n') + with open(data_output_path+"all_data_temp.json",'w', encoding='utf-8') as f: + temp_data={"round":round_number+1,"name":name_after,"history_actions":history_list,"done":False} + if temp_data not in all_data["data"]: + all_data["data"].append({"round":round_number+1,"name":name_after,"history_actions":history_list,"done":False}) + all_data["num"]=len(all_data["data"]) + json.dump(all_data, f, indent=4,ensure_ascii=False) + f.write('\n') + ''' + + + + all_data_index=0 + while all_data_index<len(all_data["data"]): + before_data_key=[] + if all_data["data"][all_data_index]["done"]==True: + all_data_index+=1 + continue + else: + before_data_key=all_data["data"][all_data_index] + name_before=all_data["data"][all_data_index]["name"] + if all_data["data"][all_data_index]["round"]>max_steps: + all_data_index+=1 + continue + + level_path = "/".join(name_before.split("_")[:-1]) + "/" + os.makedirs(data_output_path + level_path, mode=511, exist_ok=True) + with open(data_output_path + level_path + name_before + ".json", 'r', encoding='utf-8') as file: + data_json_before = json.load(file) + + html_code = [] + print("level_path", level_path) + print("name_before", name_before) + with open(data_output_path + level_path + name_before + "-html.txt", 'r', encoding='utf-8') as f: + html_code = f.read() + + if appPackage not in html_code and len(html_code) > 10: + all_data["data"][all_data_index]["done"] = True + + start_APP_command = data_json_before["start_APP_main_page"] + history_list = data_json_before["history_actions"] + round_number = data_json_before["round"] + print("history_list", history_list) + + temp_actions=restart_from_homepage(start_APP_command,history_list,driver) + + for temp_action in temp_actions: + print(temp_action) + if "[Fail]:" in temp_action["Action"]: + print(history_list) + print("has wrong command") + #temp_res = input("[wrong command]") + all_data["data"][all_data_index]["done"]=True + + if all_data["data"][all_data_index]["done"]==True: + all_data_index+=1 + continue + if data_json_before["valid"]==False: + all_data_index+=1 + continue + + + + while data_json_before["valid"]==True and round_number<=max_steps and all_data["data"][all_data_index]["done"]==False: + action_name_list =data_json_before["action_name_list"] + action_checked = data_json_before["action_checked"] + for action_index in range(len(action_checked)): + if action_checked[action_index]==False: + xml_source, driver = get_page_source(driver) + anytree_root = parse_xml_to_anytree(xml_source) + html_code_before = any_tree_to_html(anytree_root, 0, None) + + compare_acc,correct_num,html_code_num=compare_html_acc(html_code,html_code_before) + if compare_acc<0.9: + print("!!!!!!!!!!!!!!!!!!!!!!!") + print("compare_acc",compare_acc) + + start_APP_command=data_json_before["start_APP_main_page"] + history_list_before=data_json_before["history_actions"] + round_number_before=data_json_before["round"] + + + close_command = ["adb", "shell", "am", "force-stop", appPackage] + subprocess.run(close_command) + click_cancel(driver) + restart_from_homepage(start_APP_command,history_list_before,driver) + + xml_source, driver = get_page_source(driver) + anytree_root = parse_xml_to_anytree(xml_source) + html_code_before = any_tree_to_html(anytree_root, 0, None) + + compare_acc1,correct_num,html_code_num=compare_html_acc(html_code,html_code_before) + + mapping = map_and_reverse_complete_interactive_elements(html_code_before) + action_space=display_html_and_mapping(html_code_before, mapping) + + window_size = driver.get_window_size() + action_list = gen_action_list(action_space,window_size) + print("!!!!!!!!!!!!!!!!!!!!!!!") + print("compare_acc",compare_acc) + print("compare_acc1",compare_acc1) + print(data_json_before["name"]) + #action_res = input("[not correct page]") + ''' + if compare_acc1<0.9: + level_path="/".join(name_before.split("_")[:-1])+"/" + os.makedirs(data_output_path+level_path,mode=511,exist_ok=True) + + screencap_command = f"adb exec-out screencap -p > {data_output_path}{level_path}{name_before}-screen.png" + subprocess.run(screencap_command,shell=True) + with open(data_output_path+level_path+name_before+"-html.txt", 'w', encoding='utf-8') as f: + f.write(html_code_before) + with open(data_output_path+level_path+name_before+".json", 'w', encoding='utf-8') as f: + data_json_before["action_valid"]=[] + data_json_before["action_invalid"]=[] + data_json_before["action_name_list"]=action_list + data_json_before["action_checked"]=[False for _ in range(len(action_list))] + json.dump(data_json_before, f, indent=4,ensure_ascii=False) + f.write('\n') + ''' + action_name_list =data_json_before["action_name_list"] + action_res=action_name_list[action_index] + history_list=data_json_before["history_actions"] + history_actions=[] + print(action_index) + print(action_res) + #temp_res = input("[what is this command]") + actions(action_res, history_actions, driver) + time.sleep(5) + + last_action_result=history_actions[-1]["Action"] + if "[Fail]:" in last_action_result: + action_checked[action_index]=True + data_json_before["action_checked"]=action_checked + temp_action_valid={"action_id":action_index,"action":action_res,"action_res":last_action_result} + data_json_before["action_invalid"].append(temp_action_valid) + level_path="/".join(name_before.split("_")[:-1])+"/" + os.makedirs(data_output_path+level_path,mode=511,exist_ok=True) + with open(data_output_path+level_path+name_before+".json", 'w', encoding='utf-8') as f: + json.dump(data_json_before, f, indent=4,ensure_ascii=False) + f.write('\n') + continue + + xml_source, driver = get_page_source(driver) + if xml_source == None: + xml_source, driver = get_page_source(driver) + #print(xml_source) + anytree_root = parse_xml_to_anytree(xml_source) + # translate xml to html + html_code_after = any_tree_to_html(anytree_root, 0, None) + if len(html_code_after)<10: + xml_source, driver = get_page_source(driver) + anytree_root = parse_xml_to_anytree(xml_source) + html_code_after = any_tree_to_html(anytree_root, 0, None) + + + mapping = map_and_reverse_complete_interactive_elements(html_code_after) + action_space_after=display_html_and_mapping(html_code_after, mapping) + + window_size = driver.get_window_size() + action_list_after = gen_action_list(action_space_after,window_size) + + compare_acc,correct_num,html_code_num=compare_html_acc(html_code_after,html_code_before) + scroll_notchange=False + if action_res.startswith("scroll"): + if html_code_num-correct_num<3 and html_code_num-correct_num<correct_num: + scroll_notchange=True + print(compare_acc) + print(correct_num) + print(html_code_num) + print(action_res) + print(scroll_notchange) + #temp_res = input("[scroll is change or not]") + + #if compare_acc>0.99: + if action_name_list==action_list_after or scroll_notchange==True: + action_checked[action_index]=True + data_json_before["action_checked"]=action_checked + name_after=name_before+"_"+str(action_index)+action_res[0] + temp_action_valid={"action_id":action_index,"action":action_res,"next_name":name_after,"change":False} + if temp_action_valid not in data_json_before["action_valid"]: + data_json_before["action_valid"].append(temp_action_valid) + #history_list.append(action_res) + + level_path="/".join(name_after.split("_")[:-1])+"/" + os.makedirs(data_output_path+level_path,mode=511,exist_ok=True) + screencap_command = f"adb exec-out screencap -p > {data_output_path}{level_path}{name_after}-screen.png" + print(screencap_command) + subprocess.run(screencap_command,shell=True) + with open(data_output_path+level_path+name_after+"-html.txt", 'w', encoding='utf-8') as f: + f.write(html_code_after) + f.write("\n") + with open(data_output_path+level_path+name_after+".json", 'w', encoding='utf-8') as f: + data_json_after={"round":round_number, "name":name_after,"html_path":name_after+"-html.txt","valid":False,\ + "screen_path":name_after+"-screen.png","start_APP_main_page":data_json_before["start_APP_main_page"],"history_actions":history_list,\ + "action_valid":[], "action_invalid":[],"action_name_list":action_list_after,"action_checked":[False for _ in range(len(action_list_after))]} + + json.dump(data_json_after, f, indent=4,ensure_ascii=False) + f.write('\n') + level_path_before="/".join(name_before.split("_")[:-1])+"/" + os.makedirs(data_output_path+level_path_before,mode=511,exist_ok=True) + with open(data_output_path+level_path_before+name_before+".json", 'w', encoding='utf-8') as f: + json.dump(data_json_before, f, indent=4,ensure_ascii=False) + f.write('\n') + time.sleep(2) + else: + action_checked[action_index]=True + data_json_before["action_checked"]=action_checked + name_after=name_before+"_"+str(action_index)+action_res[0] + temp_action_valid={"action_id":action_index,"action":action_res,"next_name":name_after,"change":True} + data_json_before["action_valid"].append(temp_action_valid) + history_list=data_json_before["history_actions"][:] + history_list.append(action_res) + + + level_path="/".join(name_after.split("_")[:-1])+"/" + os.makedirs(data_output_path+level_path,mode=511,exist_ok=True) + + screencap_command = f"adb exec-out screencap -p > {data_output_path}{level_path}{name_after}-screen.png" + subprocess.run(screencap_command,shell=True) + with open(data_output_path+level_path+name_after+"-html.txt", 'w', encoding='utf-8') as f: + f.write(html_code_after) + f.write("\n") + f.close() + with open(data_output_path+level_path+name_after+".json", 'w', encoding='utf-8') as f: + data_json_after={"round":round_number+1, "name":name_after,"html_path":name_after+"-html.txt","valid":True,\ + "screen_path":name_after+"-screen.png","start_APP_main_page":data_json_before["start_APP_main_page"],"history_actions":history_list,\ + "action_valid":[], "action_invalid":[],"action_name_list":action_list_after,"action_checked":[False for _ in range(len(action_list_after))]} + + if appPackage not in html_code_after: + data_json_after["valid"]=False + + json.dump(data_json_after, f, indent=4,ensure_ascii=False) + f.write('\n') + with open(data_output_path+"all_data.json",'w', encoding='utf-8') as f: + temp_data={"round":round_number+1,"name":name_after,"history_actions":history_list,"done":False} + if appPackage not in html_code_after: + temp_data["done"]=True + if temp_data not in all_data["data"]: + all_data["data"].append(temp_data) + all_data["num"]=len(all_data["data"]) + json.dump(all_data, f, indent=4,ensure_ascii=False) + f.write('\n') + if False not in action_checked: + all_data["data"][all_data_index]["done"]=True + all_data["num"]=len(all_data["data"]) + with open(data_output_path+"all_data.json",'w', encoding='utf-8') as f: + json.dump(all_data, f, indent=4,ensure_ascii=False) + f.write('\n') + level_path_before="/".join(name_before.split("_")[:-1])+"/" + os.makedirs(data_output_path+level_path_before,mode=511,exist_ok=True) + with open(data_output_path+level_path_before+name_before+".json", 'w', encoding='utf-8') as f: + json.dump(data_json_before, f, indent=4,ensure_ascii=False) + f.write('\n') + time.sleep(2) + + close_command = ["adb", "shell", "am", "force-stop", appPackage] + subprocess.run(close_command) + click_cancel(driver) + start_APP_command=data_json_before["start_APP_main_page"] + history_list=data_json_before["history_actions"] + round_number=data_json_before["round"] + print("history_list",history_list) + + restart_from_homepage(start_APP_command,history_list,driver) + + + + if False not in action_checked: + all_data["data"][all_data_index]["done"]=True + all_data["num"]=len(all_data["data"]) + with open(data_output_path+"all_data.json",'w', encoding='utf-8') as f: + json.dump(all_data, f, indent=4,ensure_ascii=False) + f.write('\n') + with open(data_output_path+"all_data_temp.json",'w', encoding='utf-8') as f: + json.dump(all_data, f, indent=4,ensure_ascii=False) + f.write('\n') + #action_res = input("[this_page_all_done]") + else: + print(data_json_before) + print(action_checked) + #action_res = input("[action_checked should be all true]") + + + #action_res = input("[need to restart to main page]") + + + close_command = ["adb", "shell", "am", "force-stop", appPackage] + subprocess.run(close_command) + click_cancel(driver) + + driver.quit() + # task finished + + diff --git a/agent_for_ui/s_app_s_step.json b/agent_for_ui/s_app_s_step.json new file mode 100644 index 0000000000000000000000000000000000000000..e1f7c0efd13a3a24b02bd7d37da28f2e2b863646 --- /dev/null +++ b/agent_for_ui/s_app_s_step.json @@ -0,0 +1,5551 @@ +[ + { + "id": 1, + "query": [ + "我想用喜马拉雅听口语天天练" + ], + "check_point": { + "activity": [ + "&", + "com.ximalaya.ting.android/.host.activity.MainActivity", + "com.ximalaya.ting.android.host.activity.MainActivity" + ], + "text": "口语天天练", + "package": "com.ximalaya.ting.android" + }, + "domain": "smartApp/Ximalaya" + }, + { + "id": 2, + "query": [ + "用喜马拉雅播放历史记录" + ], + "check_point": { + "activity": [ + "&", + "com.ximalaya.ting.android/.host.activity.MainActivity", + "com.ximalaya.ting.android.host.activity.MainActivity" + ], + "text": [ + "|", + "播放历史", + "历史" + ], + "package": "com.ximalaya.ting.android" + }, + "domain": "smartApp/Ximalaya" + }, + { + "id": 3, + "query": [ + "打开便签" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "备忘", + "to_speak": "" + }, + "domain": "smartApp/other" + }, + { + "id": 4, + "query": [ + "我要看照片" + ], + "check_point": { + "activity": "com.miui.gallery/.activity.HomePageActivity", + "resource-id": "", + "text": "照片", + "to_speak": "" + }, + "domain": "smartApp/other" + }, + { + "id": 5, + "query": [ + "搜索北京市的照片" + ], + "check_point": { + "activity": "com.miui.gallery", + "resource-id": "", + "text": [ + "|", + "北京市", + "截屏" + ], + "to_speak": "" + }, + "domain": "smartApp/other" + }, + { + "id": 6, + "query": [ + "搜索昨天的照片" + ], + "check_point": { + "activity": [ + "|", + "com.miui.gallery/.search.SearchActivity", + "com.miui.gallery/.search.resultpage.SearchResultActivity" + ], + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.miui.gallery" + }, + "domain": "smartApp/other" + }, + { + "id": 7, + "query": [ + "打开携程旅行" + ], + "check_point": { + "activity": "ctrip.android.view", + "resource-id": "", + "text": "携程", + "to_speak": "" + }, + "domain": "smartApp/other", + "app": "携程旅行" + }, + { + "id": 8, + "query": [ + "卸载高德地图" + ], + "check_point": { + "activity": "com.xiaomi.market/.ui.LocalAppsActivity", + "resource-id": "", + "text": "", + "to_speak": "" + }, + "domain": "smartApp/other" + }, + { + "id": 9, + "query": [ + "卸载高德地图" + ], + "check_point": { + "activity": "com.xiaomi.market/.ui.LocalAppsActivity", + "resource-id": "", + "text": "", + "to_speak": "" + }, + "domain": "smartApp/other" + }, + { + "id": 10, + "query": [ + "查看QQ好友动态" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "好友动态", + "to_speak": "", + "package": "com.tencent.mobileqq" + }, + "domain": "smartApp/QQ", + "app": "QQ" + }, + { + "id": 11, + "query": [ + "我想发QQ信息" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "取消" + ], + "to_speak": "", + "package": "com.tencent.mobileqq" + }, + "domain": "smartApp/QQ", + "app": "QQ" + }, + { + "id": 12, + "query": [ + "我想发条QQ信息给小爱" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "小爱", + "发送" + ], + "to_speak": "", + "package": "com.tencent.mobileqq" + }, + "domain": "smartApp/QQ", + "app": "QQ" + }, + { + "id": 13, + "query": [ + "打开大众点评" + ], + "check_point": { + "activity": [ + "|", + "com.dianping.v1/com.dianping.v1.NovaMainActivity", + "com.miui.home/.launcher.Launcher", + "com.dianping.v1" + ], + "resource-id": "", + "text": [ + "|", + "还没有", + "安装", + "推荐" + ], + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping" + }, + { + "id": 14, + "query": [ + "用大众点评搜索美食" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "排序", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 15, + "query": [ + "附近有什么好吃的" + ], + "check_point": { + "activity": "com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity", + "resource-id": "", + "text": "美食", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 16, + "query": [ + "用大众点评搜附近的火锅|我想用大众点评找一下附近的火锅店" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "火锅", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 17, + "query": [ + "用大众点评查找知春路附近的美食" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "知春路", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 18, + "query": [ + "打开大众点评收藏" + ], + "check_point": { + "activity": [ + "|", + "com.dianping.main.login.picassologin.LoginLiteActivity", + "com.miui.home/.launcher.Launcher", + "com.dianping.v1" + ], + "resource-id": "", + "text": [ + "|", + "登录", + "相关收藏", + "还没有", + "安装" + ], + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 19, + "query": [ + "用大众点评搜索周边游" + ], + "check_point": { + "activity": "com.dianping.v1/com.meituan.android.travel.homepage.TripHomepageActivity", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 20, + "query": [ + "用大众点评搜索酒店" + ], + "check_point": { + "activity": "com.dianping.v1/com.dianping.hotel.home.HotelHomeActivity", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 21, + "query": [ + "用大众点评搜索休闲娱乐" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "休闲", + "综合" + ], + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 22, + "query": [ + " 打开大众点评亲子榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": "儿童", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 23, + "query": [ + " 打开大众点评酒店榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": "酒店", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 24, + "query": [ + " 打开大众点评丽人榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": "美发", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 25, + "query": [ + " 打开大众点评购物榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": [ + "|", + "购物", + "商场" + ], + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 26, + "query": [ + " 打开大众点评休娱榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": [ + "|", + "吃喝玩乐", + "酒吧", + "洗浴" + ], + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 27, + "query": [ + " 打开大众点评景点榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": "景点", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 28, + "query": [ + " 打开大众点评美食榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": "美食", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 29, + "query": [ + " 打开大众点评网红店榜" + ], + "check_point": { + "activity": "com.dianping.v1", + "resource-id": "", + "text": "网红", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 30, + "query": [ + "附近有什么好玩的" + ], + "check_point": { + "activity": "com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity", + "text": "休闲玩乐", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping" + }, + { + "id": 31, + "query": [ + "用大众点评搜索KTV" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "排序", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 32, + "query": [ + "用大众点评搜索美发" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "排序", + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 33, + "query": [ + "用大众点评打开附近的火锅" + ], + "check_point": { + "activity": "", + "text": [ + "火锅", + "搜索" + ], + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping" + }, + { + "id": 34, + "query": [ + "用大众点评搜索电影" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "|", + "电影", + "影院" + ], + "to_speak": "", + "package": "com.dianping.v1" + }, + "domain": "smartApp/Dianping", + "app": "大众点评" + }, + { + "id": 35, + "query": [ + "打开拼多多充值中心|拼多多充话费" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "充值中心" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 36, + "query": [ + "拼多多客服" + ], + "check_point": { + "activity": [ + "&", + "com.xunmeng.pinduoduo/.activity.NewPageActivity|com.xunmeng.pinduoduo/.login.LoginActivity", + "com.xunmeng.pinduoduo.login.LoginActivity" + ], + "resource-id": "", + "text": [ + "拼多多官方客服|微信登录" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 37, + "query": [ + "拼多多收金币|打开拼多多金猪赚大钱" + ], + "check_point": { + "activity": "com.xunmeng.pinduoduo", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 38, + "query": [ + "打开拼多多断码清仓" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "断码清仓" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 39, + "query": [ + "打开拼多多限时秒杀" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "限时秒杀" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 40, + "query": [ + "打开拼多多" + ], + "check_point": { + "activity": [ + "&", + "com.xunmeng.pinduoduo/.login.LoginActivity", + "com.xunmeng.pinduoduo.login.LoginActivity|com.xunmeng.pinduoduo/.ui.activity.HomeActivity", + "com.xunmeng.pinduoduo.ui.activity.HomeActivity" + ], + "resource-id": "", + "text": [], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 41, + "query": [ + "拼多多现金签到|拼多多签到|打开拼多多现金签到" + ], + "check_point": { + "activity": [ + "&", + "com.xunmeng.pinduoduo/.activity.NewPageActivity", + "com.xunmeng.pinduoduo.activity.NewPageActivity|com.xunmeng.pinduoduo/com.xunmeng.pinduoduo.login.LoginActivity|com.xunmeng.pinduoduo/.login.LoginActivity", + "com.xunmeng.pinduoduo.login.LoginActivity" + ], + "resource-id": "", + "text": [ + "现金|微信登录|红包" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 42, + "query": [ + "打开拼多多搜索纸巾" + ], + "check_point": { + "activity": "com.xunmeng.pinduoduo/.activity.NewPageActivity", + "resource-id": "", + "text": [ + "纸巾" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 43, + "query": [ + "拼多多种树|拼多多浇水|打开拼多多多多果园|打开拼多多农场|微信登录" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "多多果园|开始种植" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 44, + "query": [ + "打开拼多多搜索" + ], + "check_point": { + "activity": "com.xunmeng.pinduoduo", + "resource-id": "", + "text": [ + "搜索" + ], + "to_speak": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo", + "app": "拼多多" + }, + { + "id": 45, + "query": [ + "拼多多快递" + ], + "check_point": { + "activity": [ + "&", + "com.xunmeng.pinduoduo/.activity.NewPageActivity", + "com.xunmeng.pinduoduo.activity.NewPageActivity|com.xunmeng.pinduoduo/.login.LoginActivity", + "com.xunmeng.pinduoduo.login.LoginActivity" + ], + "text": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo" + }, + { + "id": 46, + "query": [ + "查看拼多多订单" + ], + "check_point": { + "activity": [ + "&", + "com.miui.home/.launcher.Launcher", + "com.miui.home.launcher.Launcher|com.xunmeng.pinduoduo/.login.LoginActivity", + "com.xunmeng.pinduoduo.login.LoginActivity" + ], + "text": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo" + }, + { + "id": 47, + "query": [ + "拼多多物流" + ], + "check_point": { + "activity": [ + "&", + "com.miui.home/.launcher.Launcher", + "com.miui.home.launcher.Launcher|com.xunmeng.pinduoduo/.login.LoginActivity", + "com.xunmeng.pinduoduo.login.LoginActivity" + ], + "text": "", + "package": "com.xunmeng.pinduoduo" + }, + "domain": "smartApp/pinDuoDuo" + }, + { + "id": 48, + "query": [ + "播放爱奇艺离线视频|打开爱奇艺播放离线视频" + ], + "check_point": { + "activity": "com.qiyi.video/org.qiyi.android.video.ui.phone.download.PhoneDownloadVideoActivity", + "resource-id": "", + "text": [ + "|", + "本地视频", + "下载" + ], + "to_speak": "", + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI", + "app": "爱奇艺" + }, + { + "id": 49, + "query": [ + "打开爱奇艺会员页面" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "VIP会员", + "to_speak": "", + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI", + "app": "爱奇艺" + }, + { + "id": 50, + "query": [ + "打开爱奇艺我的" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "|", + "登录", + "观看历史" + ], + "to_speak": "", + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI", + "app": "爱奇艺" + }, + { + "id": 51, + "query": [ + "打开爱奇艺随刻视频" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "随刻视频", + "to_speak": "", + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI", + "app": "爱奇艺" + }, + { + "id": 52, + "query": [ + "打开爱奇艺播放战狼二" + ], + "check_point": { + "activity": "com.qiyi.video/org.iqiyi.video.activity.PlayerActivity", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI", + "app": "爱奇艺" + }, + { + "id": 53, + "query": [ + "爱奇艺风云榜" + ], + "check_point": { + "activity": "com.qiyi.video/org.qiyi.android.video.activitys.RankActivity", + "resource-id": "", + "text": [ + "|", + "总榜", + "热度" + ], + "to_speak": "", + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI", + "app": "爱奇艺" + }, + { + "id": 54, + "query": [ + "打开爱奇艺扫一扫" + ], + "check_point": { + "activity": "com.qiyi.video/org.qiyi.pluginlibrary.component.InstrActivityProxy1", + "text": [ + "|", + "明星识别", + "找片搜据", + "识别" + ], + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI" + }, + { + "id": 55, + "query": [ + "打开爱奇艺我的收藏" + ], + "check_point": { + "activity": "", + "text": [ + "|", + "收藏", + "登录" + ], + "package": "com.qiyi.video" + }, + "domain": "smartApp/IQIYI" + }, + { + "id": 56, + "query": [ + "打开QQ音乐" + ], + "check_point": { + "activity": "com.tencent.qqmusic", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 57, + "query": [ + "打开QQ音乐搜索" + ], + "check_point": { + "activity": "com.tencent.qqmusic/.activity.AppStarterActivity", + "or": "true", + "resource-id": "com.miui.voiceassist:id/rtl_music_info", + "text": "", + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 58, + "query": [ + "打开QQ音乐放一首歌" + ], + "check_point": { + "activity": "", + "or": "true", + "resource-id": "com.miui.voiceassist:id/rtl_music_info", + "teardown": [ + "音量调到最小" + ], + "text": [ + "|", + "音乐", + "音乐推荐", + "微信登录", + "歌单" + ], + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 59, + "query": [ + "播放QQ音乐" + ], + "check_point": { + "activity": "com.tencent.qqmusic", + "or": "true", + "resource-id": "com.miui.voiceassist:id/rtl_music_info", + "text": "", + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 60, + "query": [ + "用QQ音乐播放摇滚乐" + ], + "check_point": { + "activity": "", + "resource-id": "com.miui.voiceassist:id/persist_card_layout", + "text": [ + "QQ音乐" + ], + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 61, + "query": [ + "打开QQ音乐播放张碧晨和杨宗纬的歌" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "QQ音乐", + "张碧晨", + "杨宗纬" + ], + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 62, + "query": [ + "打开QQ音乐流行指数榜" + ], + "check_point": { + "activity": "com.tencent.qqmusic", + "resource-id": "", + "text": [ + "|", + "流行指数", + "更新" + ], + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 63, + "query": [ + "播放QQ音乐我喜欢的音乐" + ], + "check_point": { + "activity": "", + "text": [ + "|", + "QQ音乐", + "我喜欢", + "微信登录", + "正在播放" + ], + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 64, + "query": [ + "播放QQ音乐新歌推荐" + ], + "check_point": { + "activity": "", + "resource-id": "com.miui.voiceassist:id/voice_bar_right_layout|com.miui.voiceassist:id/miui_music_content", + "text": [ + "新歌|新碟|最新" + ], + "to_speak": "", + "package": "com.tencent.qqmusic" + }, + "domain": "smartApp/QQmusic", + "app": "QQ音乐" + }, + { + "id": 65, + "query": [ + "打开微博查看艾特我的内容" + ], + "check_point": { + "text": [ + "所有微博|登录" + ], + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 66, + "query": [ + "打开微博查看我的评论|打开微博查看评论" + ], + "check_point": { + "text": "所有评论", + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 67, + "query": [ + "打开微博查看点赞" + ], + "check_point": { + "text": [ + "赞", + "设置" + ], + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 68, + "query": [ + "打开微博看新闻" + ], + "check_point": { + "activity": [ + "&", + "com.sina.weibo/.MainTabActivity", + "com.sina.weibo.MainTabActivity|com.sina.weibo/.VisitorMainTabActivity", + "com.sina.weibo.VisitorMainTabActivity" + ], + "text": [ + "热门" + ], + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 69, + "query": [ + "打开微博看榜单" + ], + "check_point": { + "text": [ + "热门微博" + ], + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 70, + "query": [ + "打开微博看热搜" + ], + "check_point": { + "text": [ + "热搜" + ], + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 71, + "query": [ + "发微博说今天天气很好" + ], + "check_point": { + "activity": "com.sina.weibo", + "text": [ + "|", + "今天天气很好", + "登录" + ], + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 72, + "query": [ + "打开微博看一下视频" + ], + "check_point": { + "activity": "com.sina.weibo", + "text": "视频", + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 73, + "query": [ + "打开微博查看艾特我的内容|打开微博查看@我的内容" + ], + "check_point": { + "activity": "com.sina.weibo", + "text": "所有微博", + "to_speak": "", + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo", + "app": "微博" + }, + { + "id": 74, + "query": [ + "打开微博查看好友圈" + ], + "check_point": { + "activity": [ + "&", + "com.sina.weibo/.MainTabActivity", + "com.sina.weibo.MainTabActivity" + ], + "text": [ + "关注", + "推荐" + ], + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo" + }, + { + "id": 75, + "query": [ + { + "uri": "sinaweibo://searchall?q=武汉解封&luicode=10000493&lfid=xiaomi_search_gengduo_170317&open_direct=1&finish=true" + } + ], + "check_point": { + "activity": [ + "&", + "com.sina.weibo/.page.SearchResultActivity", + "com.sina.weibo.page.SearchResultActivity|com.sina.weibo/com.sina.weibo.page.SearchResultActivity" + ], + "text": [ + "|", + "武汉解封", + "武汉" + ], + "package": "com.sina.weibo" + }, + "domain": "smartApp/weibo" + }, + { + "id": 76, + "query": [ + "打开抖音首页" + ], + "check_point": { + "activity": "com.ss.android.ugc.aweme", + "text": [ + "推荐", + "首页" + ], + "package": "com.ss.android.ugc.aweme" + }, + "domain": "smartApp/douyin" + }, + { + "id": 77, + "query": [ + "打开抖音热搜榜|打开抖音热搜" + ], + "check_point": { + "activity": "", + "text": [ + "|", + "热门", + "更新" + ], + "package": "com.ss.android.ugc.aweme" + }, + "domain": "smartApp/douyin" + }, + { + "id": 78, + "query": [ + "打开抖音关注" + ], + "check_point": { + "activity": "com.ss.android.ugc.aweme", + "text": [ + "好友|登录|关注" + ], + "package": "com.ss.android.ugc.aweme" + }, + "domain": "smartApp/douyin" + }, + { + "id": 79, + "query": [ + "打开抖音消息" + ], + "check_point": { + "activity": "", + "text": [ + "互动消息|登录" + ], + "package": "com.ss.android.ugc.aweme" + }, + "domain": "smartApp/douyin" + }, + { + "id": 80, + "query": [ + "打开抖音看视频" + ], + "check_point": { + "activity": "", + "text": "推荐", + "package": "com.ss.android.ugc.aweme" + }, + "domain": "smartApp/douyin" + }, + { + "id": 81, + "query": [ + "打开抖音搜索搞笑视频" + ], + "check_point": { + "activity": [ + "&", + "com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.search.activity.SearchResultActivity|com.ss.android.ugc.aweme/.search.activity.SearchResultActivity", + "com.ss.android.ugc.aweme.search.activity.SearchResultActivity|com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.search.activity.SearchResultActivity" + ], + "text": [ + "搞笑视频" + ], + "package": "com.ss.android.ugc.aweme" + }, + "domain": "smartApp/douyin", + "app": "douyin" + }, + { + "id": 82, + "query": [ + "帮我记一下明天要和小明开会" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "明天要和小明开会", + "查询最新记忆|备忘录" + ], + "to_speak": "", + "package": "com.miui.notes" + }, + "domain": "todoList" + }, + { + "id": 83, + "query": [ + "在便签中搜索开会" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "开会", + "笔记|待办" + ], + "to_speak": "", + "package": "com.miui.notes" + }, + "domain": "todoList" + }, + { + "id": 84, + "query": [ + "新建便签" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "|", + "标题", + "开始书写或" + ], + "to_speak": "", + "package": "com.miui.notes" + }, + "domain": "todoList" + }, + { + "id": 85, + "query": [ + "打开笔记" + ], + "check_point": { + "activity": [ + "&", + "com.miui.notes/.ui.NotesListActivity", + "com.miui.notes.ui.NotesListActivity" + ], + "text": [ + "笔记", + "待办" + ], + "package": "com.miui.notes" + }, + "domain": "todoList" + }, + { + "id": 86, + "query": [ + "在便签中搜索买菜" + ], + "check_point": { + "activity": [ + "&", + "com.miui.notes/.ui.NotesListActivity", + "com.miui.notes.ui.NotesListActivity" + ], + "text": [ + "笔记|买菜" + ], + "package": "com.miui.notes" + }, + "domain": "todoList" + }, + { + "id": 87, + "query": [ + { + "uri": "intent:#Intent;action=com.miui.notes.action.SEARCH;S.com.miui.text.search=${我的想法};end" + } + ], + "check_point": { + "activity": "", + "text": "我的想法", + "package": "com.miui.notes" + }, + "domain": "todoList" + }, + { + "id": 88, + "query": [ + "打开录音机" + ], + "check_point": { + "activity": [ + "&", + "com.android.soundrecorder/.SoundRecorder", + "com.android.soundrecorder.SoundRecorder" + ], + "text": "高品质音质", + "package": "com.android.soundrecorder" + }, + "domain": "recorder" + }, + { + "id": 89, + "query": [ + "打开录音文件" + ], + "check_point": { + "activity": [ + "&", + "com.android.soundrecorder/.RecordPreviewActivity", + "com.android.soundrecorder.RecordPreviewActivity" + ], + "text": "录音列表", + "package": "com.android.soundrecorder" + }, + "domain": "recorder" + }, + { + "id": 90, + "query": [ + "打开录音设置" + ], + "check_point": { + "activity": [ + "&", + "com.android.soundrecorder/.SoundRecorderSettings", + "com.android.soundrecorder.SoundRecorderSettings" + ], + "text": [ + "|", + "录音机", + "听筒模式" + ], + "package": "com.android.soundrecorder" + }, + "domain": "recorder" + }, + { + "id": 91, + "query": [ + "打开小米视频会员页面" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "会员精选", + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 92, + "query": [ + "打开小米视频我的收藏|用小米视频打开我的收藏" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "我的收藏", + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 93, + "query": [ + "打开小米视频影视页面" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "|", + "剧集", + "正在热播", + "动漫", + "全网热播" + ], + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 94, + "query": [ + "打开小米视频我的视频|打开小米视频我的" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "本地视频", + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 95, + "query": [ + "打开小米视频播放历史|打开小米视频历史记录" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "播放历史", + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 96, + "query": [ + "打开小米视频我的离线" + ], + "check_point": { + "activity": "com.miui.video/.feature.mine.offline.MyOfflineActivity", + "resource-id": "", + "text": [ + "|", + "我的离线", + "我的下载" + ], + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 97, + "query": [ + "打开小米视频搜索暗战" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": "暗战", + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 98, + "query": [ + "打开小米视频搜索熊出没" + ], + "check_point": { + "activity": "com.miui.video/.feature.search", + "resource-id": "", + "text": "", + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 99, + "query": [ + "打开小米视频军事频道" + ], + "check_point": { + "activity": "com.miui.video", + "resource-id": "", + "text": [ + "军事" + ], + "to_speak": "" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 100, + "query": [ + "打开小米视频直播" + ], + "check_point": { + "activity": [ + "&", + "com.miui.video/.feature.main.MainTabActivity", + "com.miui.video.feature.main.MainTabActivity" + ], + "text": "影视", + "package": "com.miui.video" + }, + "domain": "smartApp/XiaomiVideo" + }, + { + "id": 101, + "query": [ + "美术的特点是什么" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "包括", + "以下", + "个", + "1", + "表达", + "通过", + "不" + ], + "to_speak": "" + }, + "domain": "QAbot" + }, + { + "id": 102, + "query": [ + "五氧化二磷会不会跟盐酸反应" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "会", + "酸碱中和" + ], + "to_speak": "" + }, + "domain": "QAbot" + }, + { + "id": 103, + "query": [ + "麻雀飞得快还是老鹰飞得快" + ], + "check_point": { + "activity": "", + "nd": "", + "or": "ture", + "resource-id": "", + "text": "比", + "to_speak": "老鹰飞得快" + }, + "domain": "QAbot" + }, + { + "id": 104, + "query": [ + "辽宁的211大学" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "两所", + "是", + "大连理工大学", + "东北大学" + ], + "to_speak": "" + }, + "domain": "QAbot" + }, + { + "id": 105, + "query": [ + "清明节是几号" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "月|日", + "农历" + ], + "to_speak": "" + }, + "domain": "Time" + }, + { + "id": 106, + "query": [ + "今天是几号" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "月", + "周", + "农历" + ], + "to_speak": "" + }, + "domain": "Time" + }, + { + "id": 107, + "query": [ + "今天是几号|今天几号了" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "teardown": [ + "打开静音模式" + ], + "text": [ + "周" + ], + "to_speak": "" + }, + "domain": "Time" + }, + { + "id": 108, + "query": [ + "今天几月几号" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/flt_float_board", + "teardown": [], + "text": [ + "|", + "年", + "月", + "日" + ] + }, + "domain": "Time" + }, + { + "id": 109, + "query": [ + "中元节是农历几月几号" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/flt_float_board", + "teardown": [], + "text": [ + "|", + "农历", + "年", + "月", + "日" + ] + }, + "domain": "Time" + }, + { + "id": 110, + "query": [ + "7月1日是什么节日" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/flt_float_board", + "teardown": [], + "text": [ + "|", + "建党节", + "香港回归纪念日", + "国际建筑日和加拿大全国共假日", + "农历", + "年", + "月", + "日" + ] + }, + "domain": "Time" + }, + { + "id": 111, + "query": [ + "7月15日是什么节日" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/flt_float_board", + "teardown": [], + "text": "7月15日不是任何节日" + }, + "domain": "Time" + }, + { + "id": 112, + "query": [ + "明天早上0点叫我起床" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "status": { + "checked": "true" + }, + "text": [ + "00:00", + "上午", + "起床", + "com.miui.voiceassist:id/sbtn_switch", + "com.miui.voiceassist:id/nrcv_list" + ], + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 113, + "query": [ + "每周一早上八点叫我早点起床" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "08:00", + "上午", + "起床" + ], + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 114, + "query": [ + "工作日早上八点叫我起床" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "起床", + "08:00" + ], + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 115, + "query": [ + "打开闹钟" + ], + "check_point": { + "activity": [ + "&", + "com.android.deskclock/.DeskClocKTabActivity", + "com.android.deskclock.DeskClocKTabActivity|com.miui.home/.launcher.Launcher", + "com.miui.home.launcher.Launcher" + ], + "nd": "", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 116, + "query": [ + "查询倒计时" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/imv_pause", + "text": "", + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 117, + "query": [ + "修改倒计时" + ], + "check_point": { + "activity": ".DeskClockTabActivity", + "nd": "", + "resource-id": "", + "text": "计时", + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 118, + "query": [ + "打开小爱实验室" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "小爱闹铃", + "智能输入" + ], + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "alarm" + }, + { + "id": 119, + "query": [ + "145乘1加2等于多少" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "答案", + "复制结果", + "147", + "计算器" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 120, + "query": [ + "一百九十九元打八点八折" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "金额是", + "175.12", + "计算器" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 121, + "query": [ + "一盎司有多重" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "等于", + "千克" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 122, + "query": [ + "妈妈的妈妈的儿子叫?" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": "计算器", + "to_speak": "舅舅", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 123, + "query": [ + "3分之一加2分之一等于多少" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "复制结果", + "结果转小数" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 124, + "query": [ + "根号3等于多少" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "1.732", + "答案" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 125, + "query": [ + "2的自然对数" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "答案", + "0.69" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 126, + "query": [ + "10的阶乘" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "答案" + ], + "to_speak": "", + "package": "com.miui.calculator" + }, + "domain": "arith" + }, + { + "id": 127, + "query": [ + "今天大盘走势如何" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "股市行情", + "指数", + "上涨" + ], + "to_speak": "" + }, + "domain": "stock" + }, + { + "id": 128, + "query": [ + "今天沪市大盘走势如何" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": "上证指数", + "to_speak": "" + }, + "domain": "stock" + }, + { + "id": 129, + "query": [ + "现在农业银行股价多少" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "农业银", + "收盘价|交易日|价格|元|当前价|同花顺" + ], + "to_speak": "" + }, + "domain": "stock" + }, + { + "id": 130, + "query": [ + "今天招商银行涨了吗" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "招商银行", + "收盘价|最高价|交易日|价格|元|当前价|600036" + ], + "to_speak": "" + }, + "domain": "stock" + }, + { + "id": 131, + "query": [ + "香蕉多少钱这句话用英语怎么说" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "How much|How Much", + "香蕉多少钱", + "翻译" + ], + "to_speak": "" + }, + "domain": "translation" + }, + { + "id": 132, + "query": [ + "筷子用英语怎么说?" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "筷子", + "翻译" + ], + "to_speak": "" + }, + "domain": "translation" + }, + { + "id": 133, + "query": [ + "每日英语" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "翻译|扇贝" + ], + "to_speak": "" + }, + "domain": "translation" + }, + { + "id": 134, + "query": [ + "我想飞起来英语怎么说" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/cp_content_layout", + "text": [ + "翻译", + "英语", + "复制" + ], + "to_speak": "" + }, + "domain": "translation" + }, + { + "id": 135, + "query": [ + "对话翻译" + ], + "check_point": { + "activity": "com.xiaomi.voiceassistant.instruction.card.translation.TranslationChatActivity", + "nd": "", + "resource-id": "", + "text": [], + "to_speak": "" + }, + "domain": "translation" + }, + { + "id": 136, + "query": [ + "你好的粤语" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "粤语", + "翻译" + ], + "to_speak": "" + }, + "domain": "translation" + }, + { + "id": 137, + "query": [ + "打开翻译" + ], + "check_point": { + "resource-id": "com.xiaomi.aiasst.vision:id/menu_mic|com.xiaomi.aiasst.vision:id/window_title_view|com.xiaomi.aiasst.vision:id/setting_view", + "teardown": [], + "text": [ + "小爱翻译", + "输入单词或句子", + "AI字幕", + "屏幕翻译", + "同声传译" + ] + }, + "domain": "translation" + }, + { + "id": 138, + "query": [ + "打开AI字幕" + ], + "check_point": { + "resource-id": "com.xiaomi.aiasst.vision:id/play_translate", + "teardown": [], + "text": [ + "英-中", + "正在聆听系统声音...|未识别到声音,收音已暂停" + ] + }, + "domain": "translation" + }, + { + "id": 139, + "query": [ + "" + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "text": [ + "|", + "粤语", + "粤语功能" + ], + "package": "com.android.browser" + }, + "domain": "translation" + }, + { + "id": 140, + "query": [ + "" + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "text": [ + "|", + "AI翻译", + "AI翻译" + ], + "package": "com.android.browser" + }, + "domain": "translation" + }, + { + "id": 141, + "query": [ + "同声传译" + ], + "check_point": { + "activity": "", + "image": 73, + "resource-id": "com.miui.voiceassist:id/iv_translation_float_tts", + "teardown": [], + "text": [ + "" + ] + }, + "domain": "translation" + }, + { + "id": 142, + "query": [ + "百科一下熊大" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "百科", + "熊大" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 143, + "query": [ + "食人花" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "食人花", + "百科|问答" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 144, + "query": [ + "食人花" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "食人花", + "百科|问答" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 145, + "query": [ + "地震最多的国家" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "日本", + "地震最多" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 146, + "query": [ + "陆地上奔跑最快的动物" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "猎豹" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 147, + "query": [ + "历史上的今天" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "今天是" + ], + "to_speak": "历史上的今天" + }, + "domain": "baike" + }, + { + "id": 148, + "query": [ + "习近平是怎么样的人" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "主席" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 149, + "query": [ + { + "uri": "intent://i.ai.mi.com/h5/ai-ak-fe/#/topic-detail-new?id=22#Intent;scheme=https;component=com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity;launchFlags=0x10000000;S.statusBarTextBlack=false;S.webFullScreen=true;B.useCommonBg=true;B.showVoiceBall=true;end" + } + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity", + "text": "珍稀动物" + }, + "domain": "baike" + }, + { + "id": 150, + "query": [ + { + "uri": "intent://home?query=\"本草纲目\"&appid=com.xiaomi&engine=baidu&miref=newsout_voiceassistant_searchmusic#Intent;scheme=mibrowser;launchFlags=0x10000000;end" + } + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "text": "本草纲目", + "package": "com.android.browser" + }, + "domain": "baike" + }, + { + "id": 151, + "query": [ + "百科一下狐狸" + ], + "check_point": { + "image": "76", + "resource-id": "", + "teardown": [], + "text": "狐狸", + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 152, + "query": [ + "吴京是什么梗" + ], + "check_point": { + "activity": "", + "resource-id": "", + "teardown": [], + "text": [ + "吴京", + "相关图片", + "更多图片", + "保存" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 153, + "query": [ + "在逃未婚妻" + ], + "check_point": { + "activity": "", + "resource-id": "", + "teardown": [], + "text": [ + "未婚夫" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 154, + "query": [ + "和赛车手谈恋爱" + ], + "check_point": { + "activity": "", + "resource-id": "", + "teardown": [], + "text": [ + "你的赛车手在赛道终点等你|赛车手" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 155, + "query": [ + "天降竹马永远的神" + ], + "check_point": { + "activity": "", + "resource-id": "", + "teardown": [], + "text": [ + "青梅竹马|竹马" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 156, + "query": [ + "齐司礼的心里话" + ], + "check_point": { + "activity": "", + "resource-id": "", + "teardown": [], + "text": [ + "齐司礼" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 157, + "query": [ + "陆沉的兔子小姐" + ], + "check_point": { + "activity": "", + "resource-id": "", + "teardown": [], + "text": [ + "你的温柔总裁已上线|陆沉" + ], + "to_speak": "" + }, + "domain": "baike" + }, + { + "id": 158, + "query": [ + "25小时后提醒我" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "日程提醒", + "闹钟提醒" + ], + "to_speak": "", + "package": "com.android.calendar" + }, + "domain": "calendar", + "app": "日历" + }, + { + "id": 159, + "query": [ + "明天上午七点提醒我做早餐" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "07:00", + "闹钟提醒|日历", + "com.miui.voiceassist:id/sbtn_switch" + ], + "to_speak": "", + "package": "com.android.calendar" + }, + "domain": "calendar", + "app": "日历" + }, + { + "id": 160, + "query": [ + "后天上午8点提醒我开会" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "08:00", + "闹钟提醒" + ], + "to_speak": "", + "package": "com.android.calendar" + }, + "domain": "calendar", + "app": "日历" + }, + { + "id": 161, + "query": [ + "修改日历" + ], + "check_point": { + "activity": "com.android.calendar", + "nd": "", + "resource-id": "", + "text": "", + "to_speak": "", + "package": "com.android.calendar" + }, + "domain": "calendar" + }, + { + "id": 162, + "query": [ + { + "uri": "https://cnbj1.fds.api.xiaomi.com/aife/et/land/5o76j90q.html" + } + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "text": [ + "|", + "立即体验", + "日程跨端查询", + "日程" + ], + "package": "com.android.calendar" + }, + "domain": "calendar" + }, + { + "id": 163, + "query": [ + { + "uri": "intent://com.android.calendar/time/1652083541769#Intent;scheme=content;launchFlags=0x10000000;component=com.android.calendar/.AllInOneActivity;end" + } + ], + "check_point": { + "activity": [ + "&", + "com.android.calendar/.AllInOneActivity", + "com.android.calendar.AllInOneActivity" + ], + "text": [ + "年", + "月" + ], + "package": "com.android.calendar" + }, + "domain": "calendar" + }, + { + "id": 164, + "query": [ + "今天有什么课|周五的课程表|今天有体育课吗" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "上午课程" + ] + }, + "domain": "classschedule" + }, + { + "id": 165, + "query": [ + "今天有体育课吗" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "上午课程" + ] + }, + "domain": "classschedule" + }, + { + "id": 166, + "query": [ + "打开课程表设置" + ], + "check_point": { + "activity": "com.miui.voiceassist", + "nd": "", + "resource-id": "", + "text": [ + "基本设置", + "周数" + ] + }, + "domain": "classschedule" + }, + { + "id": 167, + "query": [ + { + "uri": "https://cnbj1.fds.api.xiaomi.com/aife/et/land/wim9fq7b.html" + } + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "text": [ + "|", + "立即体验", + "小爱课程表", + "课程表" + ], + "package": "com.android.browser" + }, + "domain": "classschedule" + }, + { + "id": 168, + "query": [ + { + "uri": "intent://aiweb?url=https%3A%2F%2Fi.ai.mi.com%2Fh5%2Fprecache%2Fai-schedule%2F%23%2Fhome&flag=805339136&noBack=false&statusBarColor=FFFFFF&statusBarTextBlack=true&navigationBarColor=FFFFFF#Intent;scheme=voiceassist;package=com.miui.voiceassist;end" + } + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.web.container.AiWebActivity", + "text": [ + "第", + "周" + ] + }, + "domain": "classschedule" + }, + { + "id": 169, + "query": [ + "现在几点" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/time_time|com.miui.voiceassist:id/lyt_icon", + "text": "时钟", + "to_speak": "现在|当前", + "package": "com.android.deskclock" + }, + "domain": "clock" + }, + { + "id": 170, + "query": [ + "今天是几号" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/txv_query", + "text": [ + "年", + "月", + "日" + ], + "package": "com.android.deskclock" + }, + "domain": "clock" + }, + { + "id": 171, + "query": [ + "今日农历" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/template_time_root_layout", + "text": [ + "今日|农历" + ], + "to_speak": "", + "package": "com.android.deskclock" + }, + "domain": "clock" + }, + { + "id": 172, + "query": [ + "纽约现在几号啦" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/txv_query", + "text": [ + "年", + "月", + "日" + ], + "package": "com.android.deskclock" + }, + "domain": "clock" + }, + { + "id": 173, + "query": [ + "国庆节怎么放假" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/date_date|com.miui.voiceassist:id/template_time_root_layout", + "text": "", + "to_speak": "国庆节", + "package": "com.android.deskclock" + }, + "domain": "clock", + "app": "日历" + }, + { + "id": 174, + "query": [ + "愚人节是什么时候" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/template_time_root_layout", + "text": [ + "年", + "月", + "日", + "愚人节" + ], + "package": "com.android.deskclock" + }, + "domain": "clock", + "app": "日历" + }, + { + "id": 175, + "query": [ + "正月初一是几号" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/txv_query", + "text": [ + "年", + "月", + "日", + "初一" + ], + "package": "com.android.deskclock" + }, + "domain": "clock", + "app": "日历" + }, + { + "id": 176, + "query": [ + "距离春节还有多少天|离春节还有多久" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/date_date|com.miui.voiceassist:id/lyt_icon|com.miui.voiceassist:id/template_time_root_layout", + "text": [], + "to_speak": "春节", + "package": "com.android.deskclock" + }, + "domain": "clock" + }, + { + "id": 177, + "query": [ + { + "uri": "intent://deskclock.android.com/main#Intent;scheme=deskclock;launchFlags=0x10000000;i.navigation_tab=1;end" + } + ], + "check_point": { + "activity": [ + "&", + "com.android.deskclock/.DeskClockTabActivity", + "com.android.deskclock.DeskClockTabActivity" + ], + "text": "时钟", + "package": "com.android.deskclock" + }, + "domain": "clock" + }, + { + "id": 178, + "query": [ + "打开腾讯视频|下载腾讯视频" + ], + "check_point": { + "activity": "com.tencent.qqlive", + "nd": "", + "or": "true", + "text": "", + "to_speak": "正在打开|下载|安装" + }, + "domain": "mobileApp" + }, + { + "id": 179, + "query": [ + "打开美团" + ], + "check_point": { + "activity": "", + "nd": "", + "text": "下载", + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 180, + "query": [ + "打开QQ音乐" + ], + "check_point": { + "activity": "com.tencent.qqmusic", + "nd": "", + "or": "true", + "text": "", + "to_speak": "你还没有|点击安装|下载" + }, + "domain": "mobileApp" + }, + { + "id": 181, + "query": [ + "打开喜马拉雅" + ], + "check_point": { + "activity": "com.ximalaya.ting.android", + "nd": "", + "or": "true", + "text": "", + "to_speak": "你还没有|点击安装|下载" + }, + "domain": "mobileApp" + }, + { + "id": 182, + "query": [ + "打开优酷视频" + ], + "check_point": { + "activity": "com.youku.phone", + "nd": "", + "or": "true", + "text": "", + "to_speak": "你还没有|点击安装|下载" + }, + "domain": "mobileApp" + }, + { + "id": 183, + "query": [ + "打开QQ" + ], + "check_point": { + "activity": "com.tencent.mobileqq", + "nd": "", + "or": "true", + "text": "", + "to_speak": "你还没有|点击安装|下载" + }, + "domain": "mobileApp" + }, + { + "id": 184, + "query": [ + "打开指南针" + ], + "check_point": { + "activity": "com.miui.compass", + "nd": "", + "text": "", + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 185, + "query": [ + "打开抖音" + ], + "check_point": { + "activity": [ + "|", + "com.ss.android.ugc.aweme", + "com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.splash.SplashActivity" + ], + "nd": "", + "or": "true", + "text": "", + "to_speak": "你还没有抖音|点击安装|下载|推荐", + "package": "com.ss.android.ugc.aweme" + }, + "domain": "mobileApp" + }, + { + "id": 186, + "query": [ + "打开快手" + ], + "check_point": { + "activity": "com.smile.gifmaker", + "nd": "", + "or": "true", + "text": "", + "to_speak": "你还没有快手|安装|下载" + }, + "domain": "mobileApp" + }, + { + "id": 187, + "query": [ + "小米扫一扫" + ], + "check_point": { + "activity": "com.xiaomi.scanner/.app.ScanActivity", + "nd": "", + "text": "", + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 188, + "query": [ + "打开滴滴" + ], + "check_point": { + "activity": [ + "|", + "com.lbe.security.miui/com.android.packageinstaller.permission.ui.GrantPermissionsActivity", + "com.sdu.didi.psnger" + ], + "nd": "", + "or": "true", + "text": [ + "|", + "你还没有", + "安装", + "下载" + ], + "to_speak": "", + "package": "com.lbe.security.miui" + }, + "domain": "mobileApp" + }, + { + "id": 189, + "query": [ + "打开计时器" + ], + "check_point": { + "activity": "com.android.deskclock", + "nd": "", + "text": "", + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 190, + "query": [ + "打开新浪网" + ], + "check_point": { + "activity": "", + "nd": "", + "text": [ + "|", + "百度", + "新浪网" + ], + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 191, + "query": [ + "打开应用至尊蓝月" + ], + "check_point": { + "activity": "com.zzlywgl.h5.zzly2", + "nd": "", + "text": "", + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 192, + "query": [ + "打开QQ扫一扫" + ], + "check_point": { + "activity": "com.tencent.mobileqq", + "nd": "", + "or": "true", + "text": "", + "to_speak": "" + }, + "domain": "mobileApp" + }, + { + "id": 193, + "query": [ + "打开QQ游戏" + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "nd": "", + "or": "true", + "text": "", + "to_speak": "", + "package": "com.android.browser" + }, + "domain": "mobileApp" + }, + { + "id": 194, + "query": [ + "打开QQ微视" + ], + "check_point": { + "activity": [ + "&", + "com.tencent.mobileqq/.activity.SplashActivity", + "com.tencent.mobileqq.activity.SplashActivity" + ], + "nd": "", + "or": "true", + "text": "", + "to_speak": "", + "package": "com.tencent.mobileqq" + }, + "domain": "mobileApp" + }, + { + "id": 195, + "query": [ + "打开QQ坦白说" + ], + "check_point": { + "activity": [ + "&", + "com.tencent.mobileqq/.search.activity.UniteSearchActivity", + "com.tecent.mobileqq.search.activity.UniteSearchActivity" + ], + "nd": "", + "or": "true", + "text": "坦白说", + "to_speak": "", + "package": "com.tencent.mobileqq" + }, + "domain": "mobileApp" + }, + { + "id": 196, + "query": [ + "用百度地图骑车去朝阳大悦城" + ], + "check_point": { + "activity": "", + "nd": "", + "text": [ + "朝阳大悦城" + ], + "package": "com.baidu.BaiduMap" + }, + "domain": "mapApp", + "app": "百度地图" + }, + { + "id": 197, + "query": [ + "查一下五彩城在哪" + ], + "check_point": { + "activity": "com.baidu.BaiduMap", + "nd": "", + "resource-id": "", + "text": "五彩城", + "package": "com.baidu.BaiduMap" + }, + "domain": "mapApp", + "app": "百度地图" + }, + { + "id": 198, + "query": [ + "我要导航北京大学" + ], + "check_point": { + "activity": "com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity", + "nd": "", + "resource-id": "", + "txt": "北京大学", + "package": "com.autonavi.minimap" + }, + "domain": "mapApp", + "app": "高德地图" + }, + { + "id": 199, + "query": [ + "用腾讯地图帮我导航回家" + ], + "check_point": { + "activity": "com.tencent.map", + "nd": "", + "resource-id": "", + "text": [ + "米", + "进入", + "路" + ], + "package": "com.tencent.map" + }, + "domain": "mapApp", + "app": "腾讯地图" + }, + { + "id": 200, + "query": [ + "我的位置|我在哪里" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.autonavi.minimap:id/slidecontainer_header", + "text": [ + "" + ], + "to_speak": "" + }, + "domain": "mapApp" + }, + { + "id": 201, + "query": [ + "333路到哪了" + ], + "check_point": { + "resource-id": "", + "text": [ + "|", + "分钟", + "方向", + "到站" + ], + "package": "com.autonavi.minimap" + }, + "domain": "mapApp", + "app": "高德地图" + }, + { + "id": 202, + "query": [ + { + "uri": "intent://i.ai.mi.com/h5/ai-ak-fe/#/topic-detail-new?id=6#Intent;scheme=https;component=com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity;launchFlags=0x10000000;S.statusBarTextBlack=false;S.webFullScreen=true;B.useCommonBg=true;B.showVoiceBall=true;end" + } + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity", + "text": [ + "疫情|新增" + ] + }, + "domain": "mapApp" + }, + { + "id": 203, + "query": [ + "出发去公司" + ], + "check_point": { + "activity": [ + "&", + "com.baidu.BaiduMap/com.baidu.baidumaps.MapsActivity|com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity|com.tencent.map/.WelcomeActivity", + "com.tencent.map.WelcomeActivity" + ], + "text": [ + "公里", + "分", + "米" + ], + "package": "com.baidu.BaiduMap" + }, + "domain": "mapApp" + }, + { + "id": 204, + "query": [ + "打开导航" + ], + "check_point": { + "activity": [ + "|", + "com.baidu.BaiduMap", + "com.tencent.map", + "com.autonavi.minimap" + ], + "text": "" + }, + "domain": "mapApp" + }, + { + "id": 205, + "query": [ + "上班导航" + ], + "check_point": { + "activity": [ + "|", + "com.baidu.BaiduMap", + "com.tencent.map", + "com.autonavi.minimap" + ], + "text": [ + "米", + "分" + ] + }, + "domain": "mapApp" + }, + { + "id": 206, + "query": [ + "使用百度地图打车" + ], + "check_point": { + "activity": "com.baidu.BaiduMap/com.baidu.baidumaps.MapsActivity", + "text": [ + "|", + "位置", + "路线" + ] + }, + "domain": "mapApp" + }, + { + "id": 207, + "query": [ + { + "uri": "amapuri://drive/takeTaxi?sourceApplication=AmapPush&slat=${slat}&slon=${slon}&sname=${sname}&dlat=${dlat}&dlon=${dlon}&dname=${dname}" + } + ], + "check_point": { + "activity": "com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity", + "text": "打车" + }, + "domain": "mapApp" + }, + { + "id": 208, + "query": [ + { + "negscreen": "" + } + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.personalassistant:id/container|com.miui.personalassistant:id/shrink_layout", + "text": "" + }, + "domain": "mobileControl" + }, + { + "id": 209, + "query": [ + "屏幕亮度增加30%" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_source|com.miui.voiceassist:id/lyt_icon|com.miui.voiceassist:id/mobile_control_content_parent", + "text": "", + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 210, + "query": [ + "屏幕亮度调到80" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_source|com.miui.voiceassist:id/lyt_icon|com.miui.voiceassist:id/mobile_control_content_parent", + "text": "", + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 211, + "query": [ + "屏幕暗一点" + ], + "check_point": { + "activity": "", + "nd": "", + "or": "true", + "resource-id": "com.miui.voiceassist:id/voice_result_head_source|com.miui.voiceassist:id/mobile_control_content_parent", + "text": [ + "亮度" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 212, + "query": [ + "音量调到零" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/middle_seekbar", + "text": [], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 213, + "query": [ + "打开蓝牙|帮我打开蓝牙|开启蓝牙" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "text": [ + "蓝牙" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 214, + "query": [ + "关闭蓝牙" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "text": [ + "蓝牙" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 215, + "query": [ + "打开热点|打开个人热点|打开手机热点" + ], + "check_point": { + "activity": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "teardown": [ + "关闭手机热点", + { + "wait": 2 + }, + "打开wifi", + { + "wifi": "on" + } + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 216, + "query": [ + "打开wifi设置" + ], + "check_point": { + "activity": "", + "resource-id": "com.android.settings", + "text": [ + "WLAN" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 217, + "query": [ + "关闭个人热点|关闭热点" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "text": [ + "热点" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 218, + "query": [ + "打开WIFI|连接网络|连接WIFI|打开无线网络|打开WIFI" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "text": [ + "WIFI|无线网络" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 219, + "query": [ + "关闭飞行模式" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "text": [ + "飞行模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 220, + "query": [ + "打开NFC|设置NFC" + ], + "check_point": { + "activity": "", + "nd": "", + "or": "true", + "resource-id": "", + "text": "NFC", + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 221, + "query": [ + "勿扰模式" + ], + "check_point": { + "nd": "", + "resource-id": "", + "text": [ + "勿扰模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 222, + "query": [ + "关闭gps|打开定位|关闭位置服务|打开gps|打开GPS" + ], + "check_point": { + "resource-id": "", + "teardown": [ + "打开gps" + ], + "text": [ + "GPS|位置服务" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 223, + "query": [ + "关闭流量|关闭数据流量|关闭数据网络|关闭移动数据|关闭数据" + ], + "check_point": { + "nd": "", + "or": "true", + "resource-id": "", + "text": [ + "数据" + ], + "to_speak": "未检测到电话卡" + }, + "domain": "mobileControl" + }, + { + "id": 224, + "query": [ + "打开勿扰模式|开启勿扰模式" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "text": [ + "勿扰模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 225, + "query": [ + "关闭勿扰模式" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "text": [ + "勿扰模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 226, + "query": [ + "打开静音" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "text": [ + "静音" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 227, + "query": [ + "关闭静音模式|取消静音|关闭静音" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "teardown": [ + "打开静音模式" + ], + "text": [ + "静音" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 228, + "query": [ + "方向锁定" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/tv_main_title", + "text": "方向锁定" + }, + "domain": "mobileControl" + }, + { + "id": 229, + "query": [ + "手电筒" + ], + "check_point": { + "resource-id": "", + "teardown": [ + "关闭手电筒" + ], + "text": [ + "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "手电筒" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 230, + "query": [ + "手电筒" + ], + "check_point": { + "resource-id": "", + "teardown": [ + "关闭手电筒" + ], + "text": [ + "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "手电筒" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 231, + "query": [ + "打开省电模式|开启省电模式" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "text": [ + "省电模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 232, + "query": [ + "关闭省电模式|关掉省电模式" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "text": [ + "省电模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 233, + "query": [ + "打开talkback|开启屏幕阅读器" + ], + "check_point": { + "text": [ + "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 234, + "query": [ + "关闭talkback" + ], + "check_point": { + "resource-id": "", + "text": [ + "TALKBACK已关闭", + "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 235, + "query": [ + "打开单手模式" + ], + "check_point": { + "resource-id": "", + "text": [ + "启用单手模式|单手模式" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 236, + "query": [ + "打开颜色反转|颜色反转" + ], + "check_point": { + "resource-id": "", + "text": [ + "颜色反转", + "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 237, + "query": [ + "关闭颜色反转" + ], + "check_point": { + "resource-id": "", + "text": [ + "颜色反转", + "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 238, + "query": [ + "设置音乐播放源|音乐播放源|更改音乐源" + ], + "check_point": { + "activity": [ + "|", + "com.miui.voiceassist/com.xiaomi.voiceassistant.MusicSettingActivity", + "com.miui.voiceassist/com.xiaomi.voiceassistant.settings.MusicSettingActivity" + ], + "resource-id": "", + "text": [ + "音乐播放源", + "智能选择" + ], + "to_speak": "", + "package": "com.miui.voiceassist" + }, + "domain": "mobileControl" + }, + { + "id": 239, + "query": [ + "将QQ音乐设置为音乐源" + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.settings.MusicSettingActivity", + "or": "true", + "resource-id": "", + "text": [], + "to_speak": "设置成功" + }, + "domain": "mobileControl" + }, + { + "id": 240, + "query": [ + "将小米音乐设置为默认音乐播放源" + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.settings.MusicSettingActivity", + "resource-id": "", + "text": "", + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 241, + "query": [ + "将网易云音乐设置为我的播放源|将网易云音乐设置为音乐源|设置网易云音乐为播放源|设置网易云音乐为音乐默认播放源|将网易云音乐变更为默认音乐源" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "" + ], + "to_speak": "暂不支持|设置成功|安装|你还没有" + }, + "domain": "mobileControl" + }, + { + "id": 242, + "query": [ + "设置音乐播放源" + ], + "check_point": { + "activity": [ + "|", + "com.miui.voiceassist/com.xiaomi.voiceassistant.MusicSettingActivity", + "com.miui.voiceassist/com.xiaomi.voiceassistant.settings.MusicSettingActivity" + ], + "resource-id": "", + "text": [ + "智能选择" + ], + "to_speak": "", + "package": "com.miui.voiceassist" + }, + "domain": "mobileControl" + }, + { + "id": 243, + "query": [ + "明天上午10点提醒我买菜" + ], + "check_point": { + "activity": "", + "resource-id": "", + "text": [ + "10:00", + "买菜" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 244, + "query": [ + "打开振动模式" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "true" + }, + "text": [ + "振动" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 245, + "query": [ + "关闭振动模式" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/sliding_btn|com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "text": [ + "振动" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 246, + "query": [ + "打开桌面设置页面" + ], + "check_point": { + "activity": "HomeSettingActivity", + "text": [ + "默认桌面" + ], + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 247, + "query": [ + "关闭同步" + ], + "check_point": { + "activity": "", + "resource-id": "com.miui.voiceassist:id/sbtn_switch", + "status": { + "checked": "false" + }, + "to_speak": "" + }, + "domain": "mobileControl" + }, + { + "id": 248, + "query": [ + "关闭语音唤醒" + ], + "check_point": { + "resource-id": "android:id/checkbox", + "status": { + "checked": "false" + }, + "text": [ + "语音唤醒" + ] + }, + "domain": "mobileControl" + }, + { + "id": 249, + "query": [ + "打开语音唤醒" + ], + "check_point": { + "resource-id": "", + "text": [ + "录制语音唤醒词|去录制唤醒词|重新录制唤醒词|语音唤醒" + ] + }, + "domain": "mobileControl" + }, + { + "id": 250, + "query": [ + "打开地震报警" + ], + "check_point": { + "text": "地震预警" + }, + "domain": "mobileControl" + }, + { + "id": 251, + "query": [ + "打开5G网络" + ], + "check_point": { + "activity": [ + "&", + "MobileNetworkSettings|com.android.phone/settings.MiuiFivwGNetworkSetting", + "com.android.phone.settings.MiuiFivwGNetworkSetting" + ], + "or": "true", + "text": [ + "不支持|启用5G网络" + ], + "package": "MobileNetworkSettings|com.android.phone" + }, + "domain": "mobileControl" + }, + { + "id": 252, + "query": [ + "关闭5G" + ], + "check_point": { + "activity": [ + "&", + "MobileNetworkSettings|com.android.phone/settings.MiuiFivwGNetworkSetting", + "com.android.phone.settings.MiuiFivwGNetworkSetting" + ], + "or": "true", + "text": [ + "不支持|启用5G网络|5G网络" + ], + "package": "MobileNetworkSettings|com.android.phone" + }, + "domain": "mobileControl" + }, + { + "id": 253, + "query": [ + "打开热点" + ], + "check_point": { + "teardown": [ + "关闭热点" + ], + "text": [ + "个人热点已打开|个人热点已开启" + ] + }, + "domain": "mobileControl" + }, + { + "id": 254, + "query": [ + "把闹钟音量调大一点" + ], + "check_point": { + "image": 24, + "resource-id": "com.miui.voiceassist:id/iv_start_icon", + "text": "" + }, + "domain": "mobileControl" + }, + { + "id": 255, + "query": [ + "图标变大" + ], + "check_point": { + "text": [ + "|", + "图标大小", + "图标风格" + ] + }, + "domain": "mobileControl" + }, + { + "id": 256, + "query": [ + "设置通话录音" + ], + "check_point": { + "text": [ + "|", + "通话录音", + "电话" + ] + }, + "domain": "mobileControl" + }, + { + "id": 257, + "query": [ + "关闭单手模式" + ], + "check_point": { + "text": [ + "|", + "启用单手模式", + "单手模式" + ] + }, + "domain": "mobileControl" + }, + { + "id": 258, + "query": [ + "流量设置" + ], + "check_point": { + "activity": "com.miui.securitycenter/com.miui.networkassistant.ui.NetworkAssistantActivity", + "text": [ + "网络助手|统计应用的流量使用信息" + ] + }, + "domain": "mobileControl" + }, + { + "id": 259, + "query": [ + "打开USB网络共享" + ], + "check_point": { + "activity": [ + "&", + "com.android.settings/.SubSettings", + "com.android.settings.SubSettings" + ], + "text": [ + "蓝牙网络共享", + "设置", + "单次热点流量限额" + ], + "package": "com.android.settings" + }, + "domain": "mobileControl" + }, + { + "id": 260, + "query": [ + "录制屏幕" + ], + "check_point": { + "activity": [ + "&", + "com.miui.home/.launcher.Launcher", + "com.miui.home.launcher.Launcher" + ], + "image": 70, + "package": "com.miui.home" + }, + "domain": "mobileControl" + }, + { + "id": 261, + "query": [ + "关闭桌面设置" + ], + "check_point": { + "activity": [ + "&", + "com.miui.home/.settings.MiuiHomeSettingActivity", + "com.miui.home.settings.MiuiHomeSettingActivity" + ], + "text": "桌面", + "package": "com.miui.home" + }, + "domain": "mobileControl" + }, + { + "id": 262, + "query": [ + "连接热点" + ], + "check_point": { + "text": "个人热点已打开" + }, + "domain": "mobileControl" + }, + { + "id": 263, + "query": [ + "公交卡" + ], + "check_point": { + "activity": [ + "&", + "com.miui.tsmclient/.ui.quick.DoubleClickActivity", + "com.miui.tsmclient.ui.quick.DoubleClickActivity" + ], + "text": "手机就是交通卡", + "package": "com.miui.tsmclient" + }, + "domain": "mobileControl" + }, + { + "id": 264, + "query": [ + "门禁卡" + ], + "check_point": { + "activity": [ + "&", + "com.miui.tsmclient/.ui.quick.DoubleClickActivity", + "com.miui.tsmclient.ui.quick.DoubleClickActivity" + ], + "text": "门卡", + "package": "com.miui.tsmclient" + }, + "domain": "mobileControl" + }, + { + "id": 265, + "query": [ + "流量" + ], + "check_point": { + "text": [ + "|", + "未检测到电话卡", + "已切换数据网络状态" + ] + }, + "domain": "mobileControl" + }, + { + "id": 266, + "query": [ + "快速充电" + ], + "check_point": { + "activity": "MobileNetworkSettings", + "or": "true", + "to_speak": "不支持" + }, + "domain": "mobileControl" + }, + { + "id": 267, + "query": [ + "设置勿扰模式" + ], + "check_point": { + "activity": [ + "&", + "com.android.settings/.SubSettings", + "com.android.settings.SubSettings" + ], + "text": [ + "|", + "铃声", + "勿扰" + ], + "package": "com.android.settings" + }, + "domain": "mobileControl" + }, + { + "id": 268, + "query": [ + "高级WIFI选择打开" + ], + "check_point": { + "activity": "", + "text": "已打开" + }, + "domain": "mobileControl" + }, + { + "id": 269, + "query": [ + "打电话给10086" + ], + "check_point": { + "activity": [ + "|", + "com.android.incallui/.InCallActivity", + "com.android.server.telecom/.components.ErrorDialogActivity" + ], + "resource-id": "", + "teardown": [ + { + "shell": "input keyevent KEYCODE_ENDCALL" + } + ], + "text": "", + "to_speak": "", + "package": "com.android.incallui" + }, + "domain": "phonecall" + }, + { + "id": 270, + "query": [ + "用卡一打电话给15131137957" + ], + "check_point": { + "activity": "com.android.incallui/.InCallActivity", + "resource-id": "", + "teardown": [ + { + "shell": "input keyevent KEYCODE_ENDCALL" + } + ], + "text": "", + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 271, + "query": [ + "用卡二打电话给15131137957" + ], + "check_point": { + "activity": "com.android.incallui/.InCallActivity", + "resource-id": "", + "teardown": [ + { + "shell": "input keyevent KEYCODE_ENDCALL" + } + ], + "text": "", + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 272, + "query": [ + "给妹妹打电话" + ], + "check_point": { + "activity": "com.android.incallui/.InCallActivity", + "resource-id": "", + "teardown": [ + { + "shell": "input keyevent KEYCODE_ENDCALL" + } + ], + "text": "", + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 273, + "query": [ + "重拨电话|重新呼叫" + ], + "check_point": { + "activity": "com.android.incallui/.InCallActivity", + "or": "true", + "resource-id": "", + "teardown": [ + { + "shell": "input keyevent KEYCODE_ENDCALL" + } + ], + "text": "网络", + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 274, + "query": [ + "查询张若涵的号码" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/action_image", + "text": [ + "张若涵" + ], + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 275, + "query": [ + "查询小明的号码" + ], + "check_point": { + "resource-id": "com.miui.voiceassist:id/core_list_item_layout", + "status": { + "index": 1, + "resource-id": "com.miui.voiceassist:id/core_list_item_layout" + }, + "text": "小明", + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 276, + "query": [ + "查询张若涵的号码" + ], + "check_point": { + "activity": "com.miui.home", + "resource-id": "", + "text": "", + "to_speak": "" + }, + "domain": "phonecall" + }, + { + "id": 277, + "query": [ + "关闭一键呼叫" + ], + "check_point": { + "activity": [ + "&", + "com.android.contacts/.quickdial.QuickDialSettingActivity", + "com.android.contacts.quickdial.QuickDialSettingActivity" + ], + "text": "一键拨号", + "package": "com.android.contacts" + }, + "domain": "phonecall" + }, + { + "id": 278, + "query": [ + "我要抢票" + ], + "check_point": { + "activity": [ + "|", + "com.mqunar.react.base.stack.container.QReactNativeActivity1", + "com.Qunar" + ], + "nd": "", + "resource-id": "", + "text": [ + "|", + "选择日期", + "票信息", + "火车票", + "乘客信息", + "立即参与", + "出发地", + "出行日期", + "点我抢票", + "下一步", + "联系手机" + ], + "to_speak": "", + "package": "com.Qunar" + }, + "domain": "transportTicket", + "app": "去哪儿" + }, + { + "id": 279, + "query": [ + "帮我抢明天从北京到天津的火车票" + ], + "check_point": { + "activity": "com.Qunar", + "nd": "", + "resource-id": "", + "text": [ + "北京", + "天津" + ], + "to_speak": "", + "package": "com.Qunar" + }, + "domain": "transportTicket", + "app": "去哪儿" + }, + { + "id": 280, + "query": [ + "订火车票" + ], + "check_point": { + "activity": [ + "|", + "com.Qunar", + "com.miui.hybrid" + ], + "nd": "", + "resource-id": "", + "text": [ + "" + ], + "to_speak": "", + "package": "com.Qunar" + }, + "domain": "transportTicket", + "app": "去哪儿" + }, + { + "id": 281, + "query": [ + "帮我抢1月31号北京到上海的火车票" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "北京", + "上海", + "1月31日" + ], + "to_speak": "", + "package": "com.Qunar" + }, + "domain": "transportTicket", + "app": "去哪儿" + }, + { + "id": 282, + "query": [ + "查询抢票进度" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "填写抢票信息", + "购票信息" + ], + "to_speak": "", + "package": "com.Qunar" + }, + "domain": "transportTicket", + "app": "去哪儿" + }, + { + "id": 283, + "query": [ + "春运抢票" + ], + "check_point": { + "activity": "com.Qunar/com.mqunar.react.base.stack.container.QReactNativeActivity1", + "nd": "", + "resource-id": "", + "text": "抢票信息", + "to_speak": "", + "package": "com.Qunar" + }, + "domain": "transportTicket", + "app": "去哪儿" + }, + { + "id": 284, + "query": [ + "今天的天气" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": "天气", + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 285, + "query": [ + "现在的天气" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "小米天气|天气" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 286, + "query": [ + "现在的天气" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "度", + "°" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 287, + "query": [ + "空气质量" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "天气", + "明天", + "预报" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 288, + "query": [ + "下周二天气怎么样" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "小米天气", + "天气" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 289, + "query": [ + "未来一周的温度" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "小米天气|天气", + "天天气" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 290, + "query": [ + "今天有雨吗?空气质量怎么样?温度怎么样?" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "天气|明天|预报", + "度" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 291, + "query": [ + "上海的天气怎么样" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "小米天气", + "天气" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 292, + "query": [ + "这周末上海的天气怎么样|周末的天气" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "天气", + "小米天气" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 293, + "query": [ + "纽约天气怎么样" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "天气", + "小米天气" + ], + "to_speak": "纽约", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 294, + "query": [ + "泰国天气怎么样" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "天气", + "小米天气" + ], + "to_speak": "泰国", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 295, + "query": [ + "明天的空气质量|今天的空气质量" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "|", + "天气", + "明天", + "预报" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 296, + "query": [ + "广东天气" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "广州", + "天气" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 297, + "query": [ + "明天下雨吗?" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "海淀|武汉" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 298, + "query": [ + "现在天气" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "天气", + "北京|武汉|海淀" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 299, + "query": [ + "现在紫外线" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "紫外线指数" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 300, + "query": [ + "现在外面多少度" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "现在", + "度" + ], + "to_speak": "", + "package": "com.miui.weather2" + }, + "domain": "weather" + }, + { + "id": 301, + "query": [ + "我想看机器人争霸" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "我想看机器人争霸" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 302, + "query": [ + "我想看电影极限特工" + ], + "check_point": { + "nd": "", + "ocr": { + "text": [ + "极限特工|极限特工 2|播放源" + ] + }, + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 303, + "query": [ + "我想看电视剧延禧攻略" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "没问题|好的|好呢|好啊|好呀|为您推荐|小爱为您找到" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 304, + "query": [ + "我想看吐槽大会" + ], + "check_point": { + "activity": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "第五季|第四季" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 305, + "query": [ + "我想看三生三世十里桃花" + ], + "check_point": { + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more|com.miui.voiceassist:id/large_card_more1", + "text": [ + "十里桃花" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 306, + "query": [ + "我想看这就是街舞第二季" + ], + "check_point": { + "nd": "", + "resource-id": "", + "text": [ + "街舞|视频搜索" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 307, + "query": [ + "小猪佩奇" + ], + "check_point": { + "activity": "", + "nd": "", + "text": [ + "小猪佩奇", + "分" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 308, + "query": [ + "正在上映的电影|最近有什么电影要上映" + ], + "check_point": { + "activity": "", + "nd": "", + "text": [ + "院线|猫眼" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 309, + "query": [ + "开心麻花的电影" + ], + "check_point": { + "activity": "", + "nd": "", + "text": [ + "喜剧" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 310, + "query": [ + "我想看央视综合频道" + ], + "check_point": { + "activity": [ + "&", + "com.android.browser/.BrowserActivity", + "com.android.browser.BrowserActivity" + ], + "nd": "", + "ocr": { + "text": [ + "CCTV-1综合|选台|cctv-1|综合频道|CCTV" + ] + }, + "to_speak": "", + "package": "com.android.browser" + }, + "domain": "mobileVideo" + }, + { + "id": 311, + "query": [ + "最新电视剧" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "没问题|好的|好呢|好啊|好呀" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 312, + "query": [ + "最新电影|豆瓣高分电影|即将上映的电影|经典电影" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "电影" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 313, + "query": [ + "新番动漫|漫改动漫|日本动漫|完结动漫|中国动漫|游戏改编的动漫|轻小说改编的动漫|轻改动漫|经典动漫" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "没问题|好的|好呢|好啊|好呀|动漫" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 314, + "query": [ + "热门电影" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "没问题|好的|好呢|好啊|好呀" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 315, + "query": [ + "我要看电视剧" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more|com.miui.voiceassist:id/large_card_more1", + "teardown": [ + "音量调到最小" + ], + "text": [ + "电视剧|卿卿日常|视频|狂飙" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 316, + "query": [ + "我要看枪战片" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more|com.miui.voiceassist:id/large_card_more1", + "text": [ + "速度与激情|代号|碟中谍" + ], + "to_speak": "" + }, + "domain": "mobileVideo" + }, + { + "id": 317, + "query": [ + { + "uri": "intent://i.ai.mi.com/h5/ai-ak-fe/#/topic-detail-new?id=31#Intent;scheme=https;component=com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity;launchFlags=0x10000000;S.statusBarTextBlack=false;S.webFullScreen=true;B.useCommonBg=true;B.showVoiceBall=true;end" + } + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity", + "text": [ + "剧集", + "综艺", + "动漫" + ] + }, + "domain": "mobileVideo" + }, + { + "id": 318, + "query": [ + "播放静夜思" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/imv_play|com.miui.voiceassist:id/imv_pause", + "text": [ + "静夜思", + "床", + "com.miui.voiceassist:id/imv_play|com.miui.voiceassist:id/imv_pause" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 319, + "query": [ + "静夜思的作者是谁" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "李白" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 320, + "query": [ + "疑是地上霜是什么意思" + ], + "check_point": { + "nd": "", + "resource-id": "", + "text": [ + "好像地上泛起了一层" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 321, + "query": [ + "疑是地上霜的上一句是什么" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "床|光|静|李白" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 322, + "query": [ + "低头思故乡" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "静夜思" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 323, + "query": [ + "静夜思是什么朝代的诗" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "", + "text": [ + "唐", + "静夜思" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 324, + "query": [ + "床前明月光出自哪首诗" + ], + "check_point": { + "nd": "", + "resource-id": "", + "text": [ + "静夜思" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 325, + "query": [ + "李白的诗" + ], + "check_point": { + "nd": "", + "resource-id": "", + "text": [ + "李白", + "唐" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 326, + "query": [ + "播放唐诗" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/imv_play|com.miui.voiceassist:id/imv_pause", + "text": [ + "唐", + "com.miui.voiceassist:id/imv_pause" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 327, + "query": [ + "背诵古诗" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/imv_play|com.miui.voiceassist:id/imv_pause", + "text": [ + "唐|明|宋" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 328, + "query": [ + "静夜思" + ], + "check_point": { + "activity": "", + "or": "true", + "resource-id": "com.miui.voiceassist:id/char_pinyin", + "text": [ + "chuánɡ" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 329, + "query": [ + "千字文" + ], + "check_point": { + "activity": "", + "nd": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": [ + "诗词" + ], + "to_speak": "" + }, + "domain": "ancientPoem" + }, + { + "id": 330, + "query": [ + "古诗凤求凰的释义" + ], + "check_point": { + "activity": "", + "resource-id": "com.miui.voiceassist:id/voice_result_head_more", + "text": "古诗凤求凰的释义" + }, + "domain": "ancientPoem" + }, + { + "id": 331, + "query": [ + "迟日江山丽的迟日是什么意思" + ], + "check_point": { + "text": "春天日渐长,所以说迟日" + }, + "domain": "ancientPoem" + }, + { + "id": 332, + "query": [ + { + "uri": "intent://i.ai.mi.com/h5/ai-ak-fe/#/topic-detail-new?id=26#Intent;scheme=https;component=com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity;launchFlags=0x10000000;S.statusBarTextBlack=false;S.webFullScreen=true;B.useCommonBg=true;B.showVoiceBall=true;end" + } + ], + "check_point": { + "activity": "com.miui.voiceassist/com.xiaomi.voiceassistant.webview.AiWebActivity", + "text": "古诗" + }, + "domain": "ancientPoem" + } +] \ No newline at end of file diff --git a/agent_for_ui/search_app.py b/agent_for_ui/search_app.py new file mode 100644 index 0000000000000000000000000000000000000000..a4766a0192e35238c291b1c6e88740c368bf4f66 --- /dev/null +++ b/agent_for_ui/search_app.py @@ -0,0 +1,35 @@ +import pandas as pd + +def get_app_info(csv_file, app_name): + # 读取CSV文件 + df = pd.read_csv(csv_file, delimiter=',') # 请根据实际情况修改分隔符 + + # 根据app_name查询行 + app_row = df[df['app_name'] == app_name] + + # 如果找到匹配的行,返回对应的信息 + if not app_row.empty: + info = { + 'package_name': app_row.iloc[0]['package_name'], + 'level1_category_name': app_row.iloc[0]['level1_category_name'], + 'key_words': app_row.iloc[0]['key_words'], + 'introduction': app_row.iloc[0]['introduction'], + # 'change_log': app_row.iloc[0]['change_log'], + # 'date': app_row.iloc[0]['date'] + } + return info + else: + return None + + +csv_file_path = 'adhoc.csv' +app_name_to_search = 'Slots 2019 Casino' +app_info = get_app_info(csv_file_path, app_name_to_search) + +if app_info: + print(f"App Info for {app_name_to_search}:") + for key, value in app_info.items(): + print(f"{key}: {value}") +else: + print(f"No information found for {app_name_to_search}.") + diff --git a/agent_for_ui/xml_to_html.py b/agent_for_ui/xml_to_html.py new file mode 100644 index 0000000000000000000000000000000000000000..ac927708a433c0e028b41c9669f3e1aab6743ad1 --- /dev/null +++ b/agent_for_ui/xml_to_html.py @@ -0,0 +1,231 @@ +# coding=utf-8 +"""Common functions for data processing.""" + +from anytree import AnyNode +# import episode_pb2 + + +def any_tree_to_html(node, layer, clickable_label): + """Turns an AnyTree representation of view hierarchy into HTML. + Args: + node: an AnyTree node. + layer: which layer is the node in. + + Returns: + results: output HTML. + """ + results = '' + if 'ImageView' in node.type: + node_type = 'img' + elif 'IconView' in node.type: + node_type = 'img' + elif 'Button' in node.type: + node_type = 'button' + elif 'Image' in node.type: + node_type = 'img' + elif 'MenuItemView' in node.type: + node_type = 'button' + elif 'EditText' in node.type: + node_type = 'input' + elif 'TextView' in node.type: + node_type = 'p' + else: + node_type = 'div' + + if node.clickable == "true": + clickable_label = "true" + elif clickable_label == "true": + node.clickable = "true" + if node.text: + node.text = node.text.replace('\n', '') + if node.content_desc: + node.content_desc = node.content_desc.replace('\n', '') + + # or node.class_label == 'android.widget.EditText' + if node.is_leaf and node.visible: + html_close_tag = node_type + if node.scrollable == "true": + html_close_tag = node_type + results = '<{}{}{}{}{}{}{}{}> {} </{}>\n'.format( + node_type, + ' id="{}"'.format(node.resource_id) + if node.resource_id + else '', + ' package="{}"'.format(node.package) + if node.package + else '', + + ' class="{}"'.format(''.join(node.class_label)) + if node.class_label + else '', + ' description="{}"'.format(node.content_desc) if node.content_desc else '', + ' clickable="{}"'.format(node.clickable) if node.clickable else '', + ' scrollable="{}"'.format(node.scrollable) if node.scrollable else '', + ' bounds="{}"'.format(node.bounds) if node.bounds else '', + '{}'.format(node.text) if node.text else '', + html_close_tag, + ) + else: + results = '<{}{}{}{}{}{}> {} </{}>\n'.format( + node_type, + ' id="{}"'.format(node.resource_id) + if node.resource_id + else '', + ' package="{}"'.format(node.package) + if node.package + else '', + + ' class="{}"'.format(''.join(node.class_label)) + if node.class_label + else '', + + ' description="{}"'.format(node.content_desc) if node.content_desc else '', + ' clickable="{}"'.format(node.clickable) if node.clickable else '', + + '{}'.format(node.text) if node.text else '', + html_close_tag, + ) + + else: + if node.scrollable == "true": + html_close_tag = node_type + results = '<{}{}{}{}{}{}{}> {} </{}>\n'.format( + node_type, + ' id="{}"'.format(node.resource_id) + if node.resource_id + else '', + + ' class="{}"'.format(''.join(node.class_label)) + if node.class_label + else '', + + ' descript ion="{}"'.format(node.content_desc) if node.content_desc else '', + ' clickable="{}"'.format(node.clickable) if node.clickable else '', + ' scrollable="{}"'.format(node.scrollable) if node.scrollable else '', + ' bounds="{}"'.format(node.bounds) if node.bounds else '', + + '{}'.format(node.text) if node.text else '', + html_close_tag, + ) + for child in node.children: + results += any_tree_to_html(child, layer + 1, clickable_label) + + return results + + +# def parse_episode_proto(episode_proto_string): +# """Parses an episode proto string. +# +# Args: +# episode_proto_string: the episode proto string. +# +# Returns: +# screen_html_list: html representation of the screen sequence in the episode. +# node_list: AnyNode representation of the screen sequence in the episode. +# id_to_leaf_id: mapping element indexes to leaf id. Used for grounding eval. +# """ +# screen_html_list = [] +# screen_node_list = [] +# screen_id_map = [] +# screen_action_list = [] +# package_list = [] +# episode = episode_pb2.Episode() +# episode.ParseFromString(episode_proto_string) +# +# for t in episode.time_steps: +# id_to_leaf_id = {} +# objects = t.observation.objects +# node_list = [] +# leaf_count = 0 +# for obj in objects: +# package = obj.android_package +# bbox = obj.bbox +# dom = obj.dom_position +# +# if '/' in obj.resource_id: +# resource_id = obj.resource_id.split('/')[1].split('_') +# else: +# resource_id = obj.resource_id +# +# if obj.is_leaf and obj.visible: +# leaf_id = leaf_count +# leaf_count += 1 +# else: +# leaf_id = -1 +# +# a = AnyNode( +# id=obj.index, +# type=episode_pb2.ObjectType.Name(obj.type), +# bbox=[bbox.left, bbox.top, bbox.right, bbox.bottom], +# grid_location=episode_pb2.GridLocation.Name(obj.grid_location), +# dom_position=[dom.depth, dom.pre_order_id, dom.post_order_id], +# parent_id=obj.parent_index, +# text=obj.text, +# content_desc=obj.content_desc, +# resource_id=resource_id, +# selected=obj.selected, +# clickable=obj.clickable, +# visible=obj.visible, +# enabled=obj.enabled, +# is_leaf=obj.is_leaf, +# leaf_id=leaf_id, +# scrollable=obj.scrollable, +# checkable=obj.checkable, +# checked=obj.checked, +# focusable=obj.focusable, +# focused=obj.focused, +# ) +# id_to_leaf_id[obj.index] = leaf_id +# if a.parent_id != -1: +# a.parent = node_list[a.parent_id] +# node_list.append(a) +# screen_action_list.append(id_to_leaf_id[t.action.object.index]) +# screen_html_list.append(any_tree_to_html(node_list[0], 0)) +# screen_node_list.append(node_list) +# screen_id_map.append(id_to_leaf_id) +# package_list.append(package) +# return ( +# screen_html_list, +# screen_node_list, +# screen_action_list, +# screen_id_map, +# package_list, +# ) +# +# def build_proto_object(screen_info): +# # 解析Appium XML格式的屏幕信息并存储在screen_info变量中 +# +# # 创建Episode Proto对象 +# episode = episode_pb2.Episode() +# +# # 遍历屏幕信息节点 +# for node in screen_info: +# # 创建TimeStep Proto对象 +# time_step = episode_pb2.TimeStep() +# +# # 根据节点类型设置node_type +# if '' in node.type: +# node_type = 'img' +# elif 'BUTTON' in node.type: +# node_type = 'button' +# elif 'EDITTEXT' in node.type: +# node_type = 'input' +# elif 'TEXTVIEW' in node.type: +# node_type = 'p' +# else: +# node_type = 'div' +# +# # 创建Element Proto对象 +# element = episode_pb2.Element() +# element.node_type = node_type +# element.node_text = node.text +# element.node_id = node.id +# +# # 将Element Proto对象添加到TimeStep Proto对象 +# time_step.elements.append(element) +# +# # 将TimeStep Proto对象添加到Episode Proto对象 +# episode.time_steps.append(time_step) +# +# # 将Episode Proto对象序列化为字符串 +# episode_proto_string = episode.SerializeToString() \ No newline at end of file