diff --git a/ArkTS/JSVMAPI/JsvmDebug/.gitignore b/ArkTS/JSVMAPI/JsvmDebug/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..d2ff20141ceed86d87c0ea5d99481973005bab2b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/.gitignore
@@ -0,0 +1,12 @@
+/node_modules
+/oh_modules
+/local.properties
+/.idea
+**/build
+/.hvigor
+.cxx
+/.clangd
+/.clang-format
+/.clang-tidy
+**/.test
+/.appanalyzer
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/AppScope/app.json5 b/ArkTS/JSVMAPI/JsvmDebug/AppScope/app.json5
new file mode 100644
index 0000000000000000000000000000000000000000..703f9ed9bab50236b5a0f0982d22ba17a60e41dd
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/AppScope/app.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "app": {
+ "bundleName": "com.samples.jsvmdebug",
+ "vendor": "example",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:app_icon",
+ "label": "$string:app_name"
+ }
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/AppScope/resources/base/element/string.json b/ArkTS/JSVMAPI/JsvmDebug/AppScope/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..f9ac3bc9d51b0f741aea48407a3c035fe191091f
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/AppScope/resources/base/element/string.json
@@ -0,0 +1,8 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "JsvmDebug"
+ }
+ ]
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/AppScope/resources/base/media/app_icon.png b/ArkTS/JSVMAPI/JsvmDebug/AppScope/resources/base/media/app_icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..a39445dc87828b76fed6d2ec470dd455c45319e3
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/AppScope/resources/base/media/app_icon.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/README.md b/ArkTS/JSVMAPI/JsvmDebug/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..9fd86a5dbd2a30c2d93927ed8a21f40e6ea4ea5b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/README.md
@@ -0,0 +1,135 @@
+# ArkTS JSVM-API典型使用场景指导
+
+### 介绍
+
+使用JSVM-API实现跨语言交互,首先需要按照JSVM-API的机制实现模块的注册和加载等相关动作。
+
+- ArkTS/JS侧:实现C++方法的调用。代码比较简单,import一个对应的so库后,即可调用C++方法。
+- Native侧:.cpp文件,实现模块的注册。需要提供注册lib库的名称,并在注册回调方法中定义接口的映射关系,即Native方法及对应的JS/ArkTS接口名称等。
+
+该工程中展示的代码详细描述可查如下链接:
+
+- [JSVM-API调试&定位](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/napi/jsvm-debugger-cpuprofiler-heapsnapshot.md)
+- [使用 code cache 加速编译](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/napi/use-jsvm-about-code-cache.md)
+- [使用JSVM-API接口创建多个引擎执行JS代码并销毁](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/napi/use-jsvm-runtime-task.md)
+
+### 效果预览
+
+| 首页 | 执行及结果即时反馈 |
+| :-----------------------------------------------------------: | :-----------------------------------------------------------: |
+|
|
|
+
+### 使用说明
+
+1. 在主界面,可以点击Hello World,开始执行。
+2. 执行结果会即时反馈在屏幕中央,并在控制台打印log。
+
+### 工程目录
+
+```
+aboutcodecache/src/
+ ├── main
+ │ ├── cpp
+ │ │ ├── types
+ │ │ │ ├── libaboutcodecache
+ │ │ │ │ ├── Index.d.ts // 提供JS侧的接口方法
+ │ │ │ │ ├── oh-package.json5 // 将index.d.ts与cpp文件关联
+ │ │ ├── CMakeLists.txt // 配置CMake打包参数
+ │ │ ├── hello.cpp // 实现Native侧的runTest接口
+ │ ├── ets
+ │ │ ├── aboutcodecacheability
+ │ │ ├── pages
+ │ │ ├── Index.ets // ArkTS侧调用C/C++方法实现
+ │ ├── module.json5
+ │ └── resources
+ ├── ohosTest
+ │ ├── ets
+ │ │ ├── test
+ │ │ ├── Ability.test.ets // 自动化测试代码
+openinspector/src/
+ ├── main
+ │ ├── cpp
+ │ │ ├── types
+ │ │ │ ├── libentry
+ │ │ │ │ ├── Index.d.ts // 提供JS侧的接口方法
+ │ │ │ │ ├── oh-package.json5 // 将index.d.ts与cpp文件关联
+ │ │ ├── CMakeLists.txt // 配置CMake打包参数
+ │ │ ├── hello.cpp // 实现Native侧的runTest接口
+ │ ├── ets
+ │ │ ├── entryability
+ │ │ ├── entrybackupability
+ │ │ ├── pages
+ │ │ ├── Index.ets // ArkTS侧调用C/C++方法实现
+ │ ├── module.json5
+ │ └── resources
+ ├── ohosTest
+ │ ├── ets
+ │ │ ├── test
+ │ │ ├── Ability.test.ets // 自动化测试代码
+snapshot/src/
+ ├── main
+ │ ├── cpp
+ │ │ ├── types
+ │ │ │ ├── libsnapshot
+ │ │ │ │ ├── Index.d.ts // 提供JS侧的接口方法
+ │ │ │ │ ├── oh-package.json5 // 将index.d.ts与cpp文件关
+ │ │ ├── CMakeLists.txt // 配置CMake打包参数
+ │ │ ├── hello.cpp // 实现Native侧的runTest接
+ │ ├── ets
+ │ │ ├── snapshotability
+ │ │ ├── pages
+ │ │ ├── Index.ets // ArkTS侧调用C/C++方法实现
+ │ ├── module.json5
+ │ └── resources
+ ├── ohosTest
+ │ ├── ets
+ │ │ ├── test
+ │ │ ├── Ability.test.ets // 自动化测试代码
+runtimetask/src/
+ ├── main
+ │ ├── cpp
+ │ │ ├── types
+ │ │ │ ├── libruntimetask
+ │ │ │ │ ├── Index.d.ts // 提供JS侧的接口方法
+ │ │ │ │ ├── oh-package.json5 // 将index.d.ts与cpp文件关
+ │ │ ├── CMakeLists.txt // 配置CMake打包参数
+ │ │ ├── hello.cpp // 实现Native侧的runTest接
+ │ ├── ets
+ │ │ ├── runtimetaskability
+ │ │ ├── pages
+ │ │ ├── Index.ets // ArkTS侧调用C/C++方法实现
+ │ ├── module.json5
+ │ └── resources
+ ├── ohosTest
+ │ ├── ets
+ │ │ ├── test
+ │ │ ├── Ability.test.ets // 自动化测试代码
+```
+
+### 相关权限
+
+[ohos.permission.INTERNET](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-all.md#ohospermissioninternet)
+
+### 依赖
+
+不涉及。
+
+### 约束与限制
+
+1.本示例仅支持标准系统上运行, 支持设备:Phone。
+
+2.本示例为Stage模型,支持API15版本SDK,版本号:5.0.3.135,镜像版本号:HarmonyOS NEXT_5.0.3.135。
+
+3.本示例需要使用DevEco Studio 5.0.3 Release (Build Version: 5.0.9.300, built on March 13, 2025)及以上版本才可编译运行。
+
+### 下载
+
+如需单独下载本工程,执行如下命令:
+
+```
+git init
+git config core.sparsecheckout true
+echo code/DocsSample/ArkTS/JSVMAPI/JsvmDebug > .git/info/sparse-checkout
+git remote add origin https://gitee.com/openharmony/applications_app_samples.git
+git pull origin master
+```
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/.gitignore b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/.gitignore
@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/build-profile.json5 b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..01bed8940ff6f2d5843f8d1d7e184725f59be699
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/build-profile.json5
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ "externalNativeOptions": {
+ "path": "./src/main/cpp/CMakeLists.txt",
+ "arguments": "",
+ "cppFlags": "",
+ }
+ },
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ },
+ "nativeLib": {
+ "debugSymbol": {
+ "strip": true,
+ "exclude": []
+ }
+ }
+ },
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/hvigorfile.ts b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e4f43d54667f8327c367c8096bd08bb8c75aff54
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/obfuscation-rules.txt b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/obfuscation-rules.txt
new file mode 100644
index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/obfuscation-rules.txt
@@ -0,0 +1,23 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope
+
+-enable-property-obfuscation
+-enable-toplevel-obfuscation
+-enable-filename-obfuscation
+-enable-export-obfuscation
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/oh-package.json5 b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..a1d266f456e36c0534d03d1ba57ca7ff2d8d8254
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/oh-package.json5
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "name": "aboutcodecache",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {
+ "libaboutcodecache.so": "file:./src/main/cpp/types/libaboutcodecache"
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/CMakeLists.txt b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..cc20c12512451f6ec9698b5dde44430b319ca941
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.4.1)
+project(JsvmDebug)
+
+set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+# 日志打印配置
+add_definitions( "-DLOG_DOMAIN=0xd0d0" )
+add_definitions( "-DLOG_TAG=\"testTag\"" )
+include_directories(${NATIVERENDER_ROOT_PATH}
+ ${NATIVERENDER_ROOT_PATH}/include)
+
+add_library(aboutcodecache SHARED hello.cpp)
+# 构建此可执行文件需要链接的库
+target_link_libraries(aboutcodecache PUBLIC libace_napi.z.so libjsvm.so libhilog_ndk.z.so)
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/hello.cpp b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/hello.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6cb5634570dfd40b1997ee22a4178416f81c6ab3
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/hello.cpp
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+// [Start jsvm_code_cache]
+#include "napi/native_api.h"
+#include "ark_runtime/jsvm.h"
+#include "hilog/log.h"
+#include
+// [StartExclude jsvm_code_cache]
+#define LOG_DOMAIN 0x3200
+#define LOG_TAG "APP"
+
+static int g_aa = 0;
+
+#define CHECK_RET(theCall) \
+ do { \
+ JSVM_Status cond = theCall; \
+ if ((cond) != JSVM_OK) { \
+ const JSVM_ExtendedErrorInfo *info; \
+ OH_JSVM_GetLastErrorInfo(env, &info); \
+ OH_LOG_ERROR(LOG_APP, "jsvm fail file: %{public}s line: %{public}d ret = %{public}d message = %{public}s", \
+ __FILE__, __LINE__, cond, info != nullptr ? info->errorMessage : ""); \
+ return -1; \
+ } \
+ } while (0)
+
+#define CHECK(theCall) \
+ do { \
+ JSVM_Status cond = theCall; \
+ if ((cond) != JSVM_OK) { \
+ OH_LOG_ERROR(LOG_APP, "jsvm fail file: %{public}s line: %{public}d ret = %{public}d", __FILE__, __LINE__, \
+ cond); \
+ return -1; \
+ } \
+ } while (0)
+
+// 用于调用theCall并检查其返回值是否为JSVM_OK。
+// 如果不是,则调用OH_JSVM_GetLastErrorInfo处理错误并返回retVal。
+#define JSVM_CALL_BASE(env, theCall, retVal) \
+ do { \
+ JSVM_Status cond = theCall; \
+ if (cond != JSVM_OK) { \
+ const JSVM_ExtendedErrorInfo *info; \
+ OH_JSVM_GetLastErrorInfo(env, &info); \
+ OH_LOG_ERROR(LOG_APP, "jsvm fail file: %{public}s line: %{public}d ret = %{public}d message = %{public}s", \
+ __FILE__, __LINE__, cond, info != nullptr ? info->errorMessage : ""); \
+ return retVal; \
+ } \
+ } while (0)
+
+// JSVM_CALL_BASE的简化版本,返回nullptr
+#define JSVM_CALL(theCall) JSVM_CALL_BASE(env, theCall, nullptr)
+// [EndExclude jsvm_code_cache]
+
+JSVM_Value UseCodeCache(JSVM_Env env, JSVM_CallbackInfo info)
+{
+ // 编译参数准备
+ JSVM_Value jsSrc;
+ JSVM_Script script;
+ JSVM_Value result;
+ size_t length = 0;
+ const uint8_t* dataPtr = nullptr;
+ bool cacheRejected = true;
+ static std::string src = R"JS(
+ a = 65536;
+ b = 32768;
+ c = a + b;
+ )JS";
+
+ // 生成 code cache
+ {
+ JSVM_HandleScope handleScope;
+ OH_JSVM_OpenHandleScope(env, &handleScope);
+
+ // 源码字符串转换为 js 字符串
+ OH_JSVM_CreateStringUtf8(env, src.c_str(), src.size(), &jsSrc);
+
+ // 编译js代码
+ OH_JSVM_CompileScript(env, jsSrc, nullptr, 0, true, nullptr, &script);
+
+ // 执行js代码
+ OH_JSVM_RunScript(env, script, &result);
+ int value = 0;
+ OH_JSVM_GetValueInt32(env, result, &value);
+ OH_LOG_INFO(LOG_APP, "first run result: %{public}d\n", value);
+
+ if (dataPtr == nullptr) {
+ // 将js源码编译出的脚本保存到 cache, 可以避免重复编译, 带来性能提升
+ OH_JSVM_CreateCodeCache(env, script, &dataPtr, &length);
+ }
+
+ OH_JSVM_CloseHandleScope(env, handleScope);
+ }
+
+ // 使用 code cache
+ {
+ JSVM_HandleScope handleScope;
+ OH_JSVM_OpenHandleScope(env, &handleScope);
+
+ // 源码字符串转换为 js 字符串
+ OH_JSVM_CreateStringUtf8(env, src.c_str(), src.size(), &jsSrc);
+
+ // 使用 code cache 编译js代码
+ OH_JSVM_CompileScript(env, jsSrc, dataPtr, length, true, &cacheRejected, &script);
+
+ // 执行js代码
+ OH_JSVM_RunScript(env, script, &result);
+ int value = 0;
+ OH_JSVM_GetValueInt32(env, result, &value);
+ OH_LOG_INFO(LOG_APP, "second run result: %{public}d\n", value);
+
+ OH_JSVM_CloseHandleScope(env, handleScope);
+ }
+ OH_LOG_INFO(LOG_APP, "cache rejected: %{public}d\n", cacheRejected);
+ return result;
+}
+
+// Register a callback.
+static JSVM_CallbackStruct param[] = {
+ {.data = nullptr, .callback = UseCodeCache}
+};
+static JSVM_CallbackStruct *method = param;
+// Register the C++ callback as a JSVM globalThis.UseCodeCache property for the JS to call.
+static JSVM_PropertyDescriptor descriptor[] = {
+ {"UseCodeCache", nullptr, method++, nullptr, nullptr, nullptr, JSVM_DEFAULT},
+};
+// [End jsvm_code_cache]
+
+// 样例测试JS
+const char *SRC_CALL_NATIVE = R"JS(UseCodeCache();)JS";
+
+static int32_t TestJSVM()
+{
+ JSVM_InitOptions initOptions = {0};
+ JSVM_VM vm;
+ JSVM_Env env = nullptr;
+ JSVM_VMScope vmScope;
+ JSVM_EnvScope envScope;
+ JSVM_HandleScope handleScope;
+ JSVM_Value result;
+ // 初始化JavaScript引擎实例
+ if (g_aa == 0) {
+ g_aa++;
+ CHECK(OH_JSVM_Init(&initOptions));
+ }
+ // 创建JSVM环境
+ CHECK(OH_JSVM_CreateVM(nullptr, &vm));
+ CHECK(OH_JSVM_CreateEnv(vm, sizeof(descriptor) / sizeof(descriptor[0]), descriptor, &env));
+ CHECK(OH_JSVM_OpenVMScope(vm, &vmScope));
+ CHECK_RET(OH_JSVM_OpenEnvScope(env, &envScope));
+ CHECK_RET(OH_JSVM_OpenHandleScope(env, &handleScope));
+
+ // 通过script调用测试函数
+ JSVM_Script script;
+ JSVM_Value jsSrc;
+ CHECK_RET(OH_JSVM_CreateStringUtf8(env, SRC_CALL_NATIVE, JSVM_AUTO_LENGTH, &jsSrc));
+ CHECK_RET(OH_JSVM_CompileScript(env, jsSrc, nullptr, 0, true, nullptr, &script));
+ CHECK_RET(OH_JSVM_RunScript(env, script, &result));
+
+ // 销毁JSVM环境
+ CHECK_RET(OH_JSVM_CloseHandleScope(env, handleScope));
+ CHECK_RET(OH_JSVM_CloseEnvScope(env, envScope));
+ CHECK(OH_JSVM_CloseVMScope(vm, vmScope));
+ CHECK(OH_JSVM_DestroyEnv(env));
+ CHECK(OH_JSVM_DestroyVM(vm));
+ return 0;
+}
+
+static napi_value RunTest(napi_env env, napi_callback_info info)
+{
+ TestJSVM();
+ return nullptr;
+}
+
+// 模块注册信息,供arkts侧调用
+EXTERN_C_START
+static napi_value Init(napi_env env, napi_value exports)
+{
+ napi_property_descriptor desc[] = {{"runTest", nullptr, RunTest, nullptr, nullptr, nullptr, napi_default, nullptr}};
+ napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
+ return exports;
+}
+EXTERN_C_END
+
+static napi_module demoModule = {
+ .nm_version = 1,
+ .nm_flags = 0,
+ .nm_filename = nullptr,
+ .nm_register_func = Init,
+ .nm_modname = "aboutcodecache",
+ .nm_priv = ((void *)0),
+ .reserved = {0},
+};
+
+extern "C" __attribute__((constructor)) void RegisterEntryModule(void) { napi_module_register(&demoModule); }
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/types/libaboutcodecache/Index.d.ts b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/types/libaboutcodecache/Index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..87c2a3033bf359f3f7b2e40f1280487aadaf4576
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/types/libaboutcodecache/Index.d.ts
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+export const runTest: () => void;
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/types/libaboutcodecache/oh-package.json5 b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/types/libaboutcodecache/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..864f45f378824770265d666f8818af231d042b3a
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/cpp/types/libaboutcodecache/oh-package.json5
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "name": "libaboutcodecache.so",
+ "types": "./Index.d.ts",
+ "version": "1.0.0",
+ "description": "Please describe the basic information."
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/ets/aboutcodecacheability/AboutcodecacheAbility.ets b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/ets/aboutcodecacheability/AboutcodecacheAbility.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6cd7641edcacea42d4168ca13b8a879e0c1eb726
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/ets/aboutcodecacheability/AboutcodecacheAbility.ets
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { window } from '@kit.ArkUI';
+
+export default class AboutcodecacheAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ windowStage.loadContent('pages/Index', (err) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+ });
+ }
+
+ onWindowStageDestroy(): void {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground(): void {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+};
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/ets/pages/Index.ets b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/ets/pages/Index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..51ba8ce9777190a2e5cd51e663c63433fb54358d
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/ets/pages/Index.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import napitest from 'libaboutcodecache.so';
+
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Hello World';
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(30)
+ .fontWeight(FontWeight.Bold)
+ .onClick(() => {
+ try {
+ napitest.runTest();
+ this.message = 'success';
+ } catch (error) {
+ console.error('An error occurred: ', error);
+ this.message = 'fail';
+ }
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/module.json5 b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..6e64e7c3a207a8f4a3311a1dc8508057991004e9
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/module.json5
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "module": {
+ "name": "aboutcodecache",
+ "type": "feature",
+ "description": "$string:module_desc",
+ "mainElement": "AboutcodecacheAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "AboutcodecacheAbility",
+ "srcEntry": "./ets/aboutcodecacheability/AboutcodecacheAbility.ets",
+ "description": "$string:AboutcodecacheAbility_desc",
+ "icon": "$media:layered_image",
+ "label": "$string:AboutcodecacheAbility_label",
+ "startWindowIcon": "$media:startIcon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/element/color.json b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/element/string.json b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..7466d16a61207d3ab7a78da766e5a9a445d4da81
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "AboutcodecacheAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "AboutcodecacheAbility_label",
+ "value": "JsvmDebug"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/background.png b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/background.png
new file mode 100644
index 0000000000000000000000000000000000000000..f939c9fa8cc8914832e602198745f592a0dfa34d
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/background.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/foreground.png b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..4483ddad1f079e1089d685bd204ee1cfe1d01902
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/foreground.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/layered_image.json b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/layered_image.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/layered_image.json
@@ -0,0 +1,7 @@
+{
+ "layered-image":
+ {
+ "background" : "$media:background",
+ "foreground" : "$media:foreground"
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/startIcon.png b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/startIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/media/startIcon.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/profile/main_pages.json b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "pages/Index"
+ ]
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/ets/test/Ability.test.ets b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..51e57c0df48c67804e7953f0f9a7b01f358b7d20
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { describe, it, expect } from '@ohos/hypium';
+import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
+import { UIAbility, Want } from '@kit.AbilityKit';
+
+const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator();
+const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
+
+export default function abilityTest() {
+ describe('ActsAbilityTest', () => {
+ /**
+ * 打开应用,点击Hello World执行
+ */
+ it('testcodecache', 0, async (done: Function) => {
+ console.log('uitest: Testcodecache begin');
+
+ const want: Want = {
+ bundleName: bundleName,
+ abilityName: 'AboutcodecacheAbility'
+ }
+ const driver = Driver.create();
+ await delegator.startAbility(want);
+ await driver.delayMs(1000);
+
+ const ability: UIAbility = await delegator.getCurrentTopAbility();
+ console.log('get top ability');
+ expect(ability.context.abilityInfo.name).assertEqual('AboutcodecacheAbility');
+
+ await driver.delayMs(1000);
+ const text = await driver.findComponent(ON.text('Hello World'));
+ await text.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.text('success'));
+ console.log('uitest: Testcodecache end');
+ done();
+ })
+ })
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/ets/test/List.test.ets b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/ets/test/List.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1eac52fcebe8958e19a7b8fed2e8f39c520a3e42
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/ets/test/List.test.ets
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+ abilityTest();
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/module.json5 b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..435ff848b637e47f5ed3383ec626d549086713dd
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/aboutcodecache/src/ohosTest/module.json5
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "module": {
+ "name": "aboutcodecache_test",
+ "type": "feature",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false
+ }
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/build-profile.json5 b/ArkTS/JSVMAPI/JsvmDebug/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..a6b507adb6dfa317b77ce37220b9f76924b59fd5
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/build-profile.json5
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compatibleSdkVersion": "5.0.3(15)",
+ "targetSdkVersion": "5.0.3(15)",
+ "runtimeOS": "HarmonyOS",
+ "buildOption": {
+ "strictMode": {
+ "caseSensitiveCheck": true,
+ "useNormalizedOHMUrl": true
+ }
+ }
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug",
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "openinspector",
+ "srcPath": "./openinspector",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "snapshot",
+ "srcPath": "./snapshot",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "aboutcodecache",
+ "srcPath": "./aboutcodecache",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "runtimetask",
+ "srcPath": "./runtimetask",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/code-linter.json5 b/ArkTS/JSVMAPI/JsvmDebug/code-linter.json5
new file mode 100644
index 0000000000000000000000000000000000000000..28586467ee7a761c737d8654a73aed6fddbc3c71
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/code-linter.json5
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "files": [
+ "**/*.ets"
+ ],
+ "ignore": [
+ "**/src/ohosTest/**/*",
+ "**/src/test/**/*",
+ "**/src/mock/**/*",
+ "**/node_modules/**/*",
+ "**/oh_modules/**/*",
+ "**/build/**/*",
+ "**/.preview/**/*"
+ ],
+ "ruleSet": [
+ "plugin:@performance/recommended",
+ "plugin:@typescript-eslint/recommended"
+ ],
+ "rules": {
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/hvigor/hvigor-config.json5 b/ArkTS/JSVMAPI/JsvmDebug/hvigor/hvigor-config.json5
new file mode 100644
index 0000000000000000000000000000000000000000..47b1a9ebd0480497eeb005badc6c3027428074e4
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/hvigor/hvigor-config.json5
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "modelVersion": "5.0.1",
+ "dependencies": {
+ },
+ "execution": {
+ // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */
+ // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
+ // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
+ // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
+ // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
+ },
+ "logging": {
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+ },
+ "debugging": {
+ // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
+ },
+ "nodeOptions": {
+ // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/
+ // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/hvigorfile.ts b/ArkTS/JSVMAPI/JsvmDebug/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..acb5922f467d4bc97cb88937f26e971dd4805ecc
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/hvigorfile.ts
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
+
diff --git a/ArkTS/JSVMAPI/JsvmDebug/oh-package.json5 b/ArkTS/JSVMAPI/JsvmDebug/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..e41bae026aab3b50d0abb42fece08ba43b4a772b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/oh-package.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "modelVersion": "5.0.1",
+ "description": "Please describe the basic information.",
+ "dependencies": {
+ },
+ "devDependencies": {
+ "@ohos/hypium": "1.0.19",
+ "@ohos/hamock": "1.0.0"
+ }
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/ohosTest.md b/ArkTS/JSVMAPI/JsvmDebug/ohosTest.md
new file mode 100644
index 0000000000000000000000000000000000000000..ff6638ce9050f0647f3ceee382ffe6841ae6dcfc
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/ohosTest.md
@@ -0,0 +1,10 @@
+# JsvmDebug 测试用例归档
+
+## 用例表
+
+| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
+| --------------------------------------------------- | ------------ | --------------- | ---------------------- | -------- | -------- |
+| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
+| 获取当前堆快照并将其输出到流 | 位于首页 | 点击Hello World | 1秒后页面显示“success” | 是 | Pass |
+| 使用 code cache 加速编译 | 位于首页 | 点击Hello World | 1秒后页面显示“success” | 是 | Pass |
+| JSVM-API接口创建多个引擎执行JS代码并销毁 | 位于首页 | 点击Hello World | 1秒后页面显示“success” | 是 | Pass |
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/.gitignore b/ArkTS/JSVMAPI/JsvmDebug/openinspector/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/.gitignore
@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/build-profile.json5 b/ArkTS/JSVMAPI/JsvmDebug/openinspector/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..01bed8940ff6f2d5843f8d1d7e184725f59be699
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/build-profile.json5
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ "externalNativeOptions": {
+ "path": "./src/main/cpp/CMakeLists.txt",
+ "arguments": "",
+ "cppFlags": "",
+ }
+ },
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ },
+ "nativeLib": {
+ "debugSymbol": {
+ "strip": true,
+ "exclude": []
+ }
+ }
+ },
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/hvigorfile.ts b/ArkTS/JSVMAPI/JsvmDebug/openinspector/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e4f43d54667f8327c367c8096bd08bb8c75aff54
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/obfuscation-rules.txt b/ArkTS/JSVMAPI/JsvmDebug/openinspector/obfuscation-rules.txt
new file mode 100644
index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/obfuscation-rules.txt
@@ -0,0 +1,23 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope
+
+-enable-property-obfuscation
+-enable-toplevel-obfuscation
+-enable-filename-obfuscation
+-enable-export-obfuscation
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/oh-package.json5 b/ArkTS/JSVMAPI/JsvmDebug/openinspector/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..d92ed452ae96fe6dfa75db591db4a7c70def7233
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/oh-package.json5
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "name": "openinspector",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {
+ "libopeninspector.so": "file:./src/main/cpp/types/libentry"
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/CMakeLists.txt b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..fafdfa0936b61c3089a717a66e1854df3efce13b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.4.1)
+project(JsvmDebug)
+
+set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+# 日志打印配置
+add_definitions( "-DLOG_DOMAIN=0xd0d0" )
+add_definitions( "-DLOG_TAG=\"testTag\"" )
+include_directories(${NATIVERENDER_ROOT_PATH}
+ ${NATIVERENDER_ROOT_PATH}/include)
+
+add_library(openinspector SHARED hello.cpp)
+# 构建此可执行文件需要链接的库
+target_link_libraries(openinspector PUBLIC libace_napi.z.so libjsvm.so libhilog_ndk.z.so)
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/hello.cpp b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/hello.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..665b23ced4cf269af5690413d9d5b7f54abfd615
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/hello.cpp
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+// [Start oh_jsvm_open_inspector]
+#include "napi/native_api.h"
+#include "hilog/log.h"
+#include "ark_runtime/jsvm.h"
+#include
+// [StartExclude oh_jsvm_open_inspector]
+#define LOG_DOMAIN 0x3200
+#define LOG_TAG "APP"
+
+static int g_aa = 0;
+
+#define CHECK_RET(theCall) \
+ do { \
+ JSVM_Status cond = theCall; \
+ if ((cond) != JSVM_OK) { \
+ const JSVM_ExtendedErrorInfo *info; \
+ OH_JSVM_GetLastErrorInfo(env, &info); \
+ OH_LOG_ERROR(LOG_APP, "jsvm fail file: %{public}s line: %{public}d ret = %{public}d message = %{public}s", \
+ __FILE__, __LINE__, cond, info != nullptr ? info->errorMessage : ""); \
+ return -1; \
+ } \
+ } while (0)
+
+#define CHECK(theCall) \
+ do { \
+ JSVM_Status cond = theCall; \
+ if ((cond) != JSVM_OK) { \
+ OH_LOG_ERROR(LOG_APP, "jsvm fail file: %{public}s line: %{public}d ret = %{public}d", __FILE__, __LINE__, \
+ cond); \
+ return -1; \
+ } \
+ } while (0)
+
+// 用于调用theCall并检查其返回值是否为JSVM_OK。
+// 如果不是,则调用OH_JSVM_GetLastErrorInfo处理错误并返回retVal。
+#define JSVM_CALL_BASE(env, theCall, retVal) \
+ do { \
+ JSVM_Status cond = theCall; \
+ if (cond != JSVM_OK) { \
+ const JSVM_ExtendedErrorInfo *info; \
+ OH_JSVM_GetLastErrorInfo(env, &info); \
+ OH_LOG_ERROR(LOG_APP, "jsvm fail file: %{public}s line: %{public}d ret = %{public}d message = %{public}s", \
+ __FILE__, __LINE__, cond, info != nullptr ? info->errorMessage : ""); \
+ return retVal; \
+ } \
+ } while (0)
+
+// JSVM_CALL_BASE的简化版本,返回nullptr
+#define JSVM_CALL(theCall) JSVM_CALL_BASE(env, theCall, nullptr)
+// [EndExclude oh_jsvm_open_inspector]
+
+// 待调试的JS源码
+static std::string g_srcDebugger = R"JS(
+const concat = (...args) => args.reduce((a, b) => a + b);
+var dialogue = concat('"What ', 'is ', 'your ', 'name ', '?"');
+dialogue = concat(dialogue, ' --', '"My ', 'name ', 'is ', 'Bob ', '."');
+)JS";
+
+// 开启debugger
+static const int INSPECTOR_PORT = 9225;
+static void EnableInspector(JSVM_Env env)
+{
+ // 在指定的主机和端口上激活inspector,创建socket。
+ OH_JSVM_OpenInspector(env, "localhost", INSPECTOR_PORT);
+ // 等待建立socket连接。
+ OH_JSVM_WaitForDebugger(env, true);
+}
+
+// 关闭debugger
+static void CloseInspector(JSVM_Env env)
+{
+ // 关闭inspector,结束socket连接。
+ OH_JSVM_CloseInspector(env);
+}
+
+static void RunScript(JSVM_Env env)
+{
+ JSVM_HandleScope handleScope;
+ OH_JSVM_OpenHandleScope(env, &handleScope);
+
+ JSVM_Value jsSrc;
+ OH_JSVM_CreateStringUtf8(env, g_srcDebugger.c_str(), g_srcDebugger.size(), &jsSrc);
+
+ JSVM_Script script;
+ OH_JSVM_CompileScript(env, jsSrc, nullptr, 0, true, nullptr, &script);
+
+ JSVM_Value result;
+ OH_JSVM_RunScript(env, script, &result);
+
+ OH_JSVM_CloseHandleScope(env, handleScope);
+}
+
+void TestJSVM()
+{
+ JSVM_InitOptions initOptions{};
+ OH_JSVM_Init(&initOptions);
+
+ JSVM_VM vm;
+ OH_JSVM_CreateVM(nullptr, &vm);
+ JSVM_VMScope vmScope;
+ OH_JSVM_OpenVMScope(vm, &vmScope);
+
+ JSVM_Env env;
+ OH_JSVM_CreateEnv(vm, 0, nullptr, &env);
+ // 执行JS代码之前打开debugger。
+ EnableInspector(env);
+ JSVM_EnvScope envScope;
+ OH_JSVM_OpenEnvScope(env, &envScope);
+
+ // 执行JS代码。
+ RunScript(env);
+
+ OH_JSVM_CloseEnvScope(env, envScope);
+ // 执行JS代码之后关闭debugger。
+ CloseInspector(env);
+ OH_JSVM_DestroyEnv(env);
+ OH_JSVM_CloseVMScope(vm, vmScope);
+ OH_JSVM_DestroyVM(vm);
+}
+// [End jsvm_open_inspector]
+
+static napi_value RunTest(napi_env env, napi_callback_info info)
+{
+ TestJSVM();
+ return nullptr;
+}
+
+// 模块注册信息,供arkts侧调用
+EXTERN_C_START
+static napi_value Init(napi_env env, napi_value exports)
+{
+ napi_property_descriptor desc[] = {{"runTest", nullptr, RunTest, nullptr, nullptr, nullptr, napi_default, nullptr}};
+ napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
+ return exports;
+}
+EXTERN_C_END
+
+static napi_module demoModule = {
+ .nm_version = 1,
+ .nm_flags = 0,
+ .nm_filename = nullptr,
+ .nm_register_func = Init,
+ .nm_modname = "openinspector",
+ .nm_priv = ((void *)0),
+ .reserved = {0},
+};
+
+extern "C" __attribute__((constructor)) void RegisterEntryModule(void) { napi_module_register(&demoModule); }
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/types/libentry/Index.d.ts b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/types/libentry/Index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..87c2a3033bf359f3f7b2e40f1280487aadaf4576
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/types/libentry/Index.d.ts
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+export const runTest: () => void;
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/types/libentry/oh-package.json5 b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/types/libentry/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..8547e3a114fd2d5bf4f9d61252bab1f77cb59991
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/cpp/types/libentry/oh-package.json5
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "name": "libopeninspector.so",
+ "types": "./Index.d.ts",
+ "version": "1.0.0",
+ "description": "Please describe the basic information."
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/entryability/EntryAbility.ets b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/entryability/EntryAbility.ets
new file mode 100644
index 0000000000000000000000000000000000000000..965554bb3a331e2418180b86da1993baf5e8d536
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/entryability/EntryAbility.ets
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { window } from '@kit.ArkUI';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ windowStage.loadContent('pages/Index', (err) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+ });
+ }
+
+ onWindowStageDestroy(): void {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground(): void {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+};
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/entrybackupability/EntryBackupAbility.ets b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/entrybackupability/EntryBackupAbility.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b1e212947256c5533c7b06285a597c94f840a6e3
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/entrybackupability/EntryBackupAbility.ets
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
+
+export default class EntryBackupAbility extends BackupExtensionAbility {
+ async onBackup() {
+ hilog.info(0x0000, 'testTag', 'onBackup ok');
+ }
+
+ async onRestore(bundleVersion: BundleVersion) {
+ hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/pages/Index.ets b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/pages/Index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a3c889cdea0fa1e4d7c8778843a2cee40306b295
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/ets/pages/Index.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import napitest from 'libopeninspector.so';
+
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Hello World';
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(30)
+ .fontWeight(FontWeight.Bold)
+ .onClick(() => {
+ try {
+ napitest.runTest();
+ this.message = 'success';
+ } catch (error) {
+ console.error('An error occurred: ', error);
+ this.message = 'fail';
+ }
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/module.json5 b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..71598eafd4f328515f880fcca1592cb66642b109
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/module.json5
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "module": {
+ "name": "openinspector",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ets",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:layered_image",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:startIcon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ],
+ "extensionAbilities": [
+ {
+ "name": "EntryBackupAbility",
+ "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets",
+ "type": "backup",
+ "exported": false,
+ "metadata": [
+ {
+ "name": "ohos.extension.backup",
+ "resource": "$profile:backup_config"
+ }
+ ]
+ }
+ ],
+ "requestPermissions": [
+ {
+ "name": "ohos.permission.INTERNET",
+ "reason": "$string:app_name",
+ "usedScene": {
+ "abilities": [
+ "FromAbility"
+ ],
+ "when": "inuse"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/element/color.json b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/element/string.json b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..e093041b1b2803be636046cf61a547d2da895f77
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "JsvmDebug"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/background.png b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/background.png
new file mode 100644
index 0000000000000000000000000000000000000000..f939c9fa8cc8914832e602198745f592a0dfa34d
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/background.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/foreground.png b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/foreground.png
new file mode 100644
index 0000000000000000000000000000000000000000..4483ddad1f079e1089d685bd204ee1cfe1d01902
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/foreground.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/layered_image.json b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/layered_image.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/layered_image.json
@@ -0,0 +1,7 @@
+{
+ "layered-image":
+ {
+ "background" : "$media:background",
+ "foreground" : "$media:foreground"
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/startIcon.png b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/startIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b
Binary files /dev/null and b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/media/startIcon.png differ
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/profile/backup_config.json b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/profile/backup_config.json
new file mode 100644
index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/profile/backup_config.json
@@ -0,0 +1,3 @@
+{
+ "allowToBackupRestore": true
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/profile/main_pages.json b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "pages/Index"
+ ]
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/dark/element/color.json b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/dark/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..79b11c2747aec33e710fd3a7b2b3c94dd9965499
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/main/resources/dark/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#000000"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/ets/test/Ability.test.ets b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0f8ce9a2c012f8fe36114cef65216ef0b6254f41
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function abilityTest() {
+ describe('ActsAbilityTest', () => {
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+ beforeAll(() => {
+ // Presets an action, which is performed only once before all test cases of the test suite start.
+ // This API supports only one parameter: preset action function.
+ })
+ beforeEach(() => {
+ // Presets an action, which is performed before each unit test case starts.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: preset action function.
+ })
+ afterEach(() => {
+ // Presets a clear action, which is performed after each unit test case ends.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: clear action function.
+ })
+ afterAll(() => {
+ // Presets a clear action, which is performed after all test cases of the test suite end.
+ // This API supports only one parameter: clear action function.
+ })
+ it('assertContain', 0, () => {
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+ hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
+ let a = 'abc';
+ let b = 'b';
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+ expect(a).assertContain(b);
+ expect(a).assertEqual(a);
+ })
+ })
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/ets/test/List.test.ets b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/ets/test/List.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1eac52fcebe8958e19a7b8fed2e8f39c520a3e42
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/ets/test/List.test.ets
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+ abilityTest();
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/module.json5 b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..d709d9cb6adc9753b540434ca6815a02478ba993
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/openinspector/src/ohosTest/module.json5
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "module": {
+ "name": "openinspector_test",
+ "type": "feature",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/.gitignore b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/.gitignore
@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/build-profile.json5 b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..01bed8940ff6f2d5843f8d1d7e184725f59be699
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/build-profile.json5
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ "externalNativeOptions": {
+ "path": "./src/main/cpp/CMakeLists.txt",
+ "arguments": "",
+ "cppFlags": "",
+ }
+ },
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": false,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ },
+ "nativeLib": {
+ "debugSymbol": {
+ "strip": true,
+ "exclude": []
+ }
+ }
+ },
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/hvigorfile.ts b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e4f43d54667f8327c367c8096bd08bb8c75aff54
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/obfuscation-rules.txt b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/obfuscation-rules.txt
new file mode 100644
index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/obfuscation-rules.txt
@@ -0,0 +1,23 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope
+
+-enable-property-obfuscation
+-enable-toplevel-obfuscation
+-enable-filename-obfuscation
+-enable-export-obfuscation
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/oh-package.json5 b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..52c578358ceef8673400a283f2dbf4714056cc45
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/oh-package.json5
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+{
+ "name": "runtimetask",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {
+ "libruntimetask.so": "file:./src/main/cpp/types/libruntimetask"
+ }
+}
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/src/main/cpp/CMakeLists.txt b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/src/main/cpp/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..196f881cee2734ff19b103339d9e26023a2be012
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.4.1)
+project(JsvmDebug)
+
+set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+# 日志打印配置
+add_definitions( "-DLOG_DOMAIN=0xd0d0" )
+add_definitions( "-DLOG_TAG=\"testTag\"" )
+include_directories(${NATIVERENDER_ROOT_PATH}
+ ${NATIVERENDER_ROOT_PATH}/include)
+
+add_library(runtimetask SHARED hello.cpp)
+# 构建此可执行文件需要链接的库
+target_link_libraries(runtimetask PUBLIC libace_napi.z.so libjsvm.so libhilog_ndk.z.so)
\ No newline at end of file
diff --git a/ArkTS/JSVMAPI/JsvmDebug/runtimetask/src/main/cpp/hello.cpp b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/src/main/cpp/hello.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..19b6619c27f42d81e512b99a3a0c891c08507214
--- /dev/null
+++ b/ArkTS/JSVMAPI/JsvmDebug/runtimetask/src/main/cpp/hello.cpp
@@ -0,0 +1,430 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * 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.
+ */
+
+#include "napi/native_api.h"
+#include "hilog/log.h"
+#include "ark_runtime/jsvm.h"
+
+// [Start runtime_task]
+#include