From 9e11182c5f20028089aa2c1e29a32a6bdf40dcc6 Mon Sep 17 00:00:00 2001 From: maminjie Date: Tue, 26 Aug 2025 19:24:04 +0800 Subject: [PATCH] demo: smartband: fix and perfect steps Issue: https://gitee.com/open-vela/docs/issues/IBCOTG If the directory is not created manually, the following error will occur: ``` adb: error: target '/data/font/' is not a directory ``` If xxx/image/assets is pushed to /data/image/, the bandx runtime will have the following error: ``` ... fs_open: Could not open file: /data/image/icon_bluetooth.png ... ``` Tested on WSL + Ubuntu-20.04 Signed-off-by: maminjie --- en/demo/Smart_Band_Example.md | 12 ++++++++++-- zh-cn/demo/Smart_Band_Example_zh-cn.md | 13 +++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/en/demo/Smart_Band_Example.md b/en/demo/Smart_Band_Example.md index 88c2d7f..6a85c8d 100644 --- a/en/demo/Smart_Band_Example.md +++ b/en/demo/Smart_Band_Example.md @@ -91,8 +91,16 @@ The font and image resources used in Bandx are located in ‘apps/packages/demos ```bash ./emulator.sh vela ``` +2. Enter the /data directory to create the font and image subdirectories: -2. Push resources to the device by using emulator-supported ADB. Open a new terminal in the root directory of openvela repository, type “adb push” followed by the file path to transfer the resources to the appropriate location. + ```bash + cd /data + mkdir font + mkdir image + cd + ``` + +3. Push resources to the device by using emulator-supported ADB. Open a new terminal in the root directory of openvela repository, type “adb push” followed by the file path to transfer the resources to the appropriate location. ```bash # Install adb @@ -100,7 +108,7 @@ The font and image resources used in Bandx are located in ‘apps/packages/demos # Push resources adb push apps/packages/demos/bandx/resource/font/assets/* /data/font/ - adb push apps/packages/demos/bandx/resource/image/assets /data/image/ + adb push apps/packages/demos/bandx/resource/image/assets/* /data/image/ ``` **Note**: If “BANDX_BASE_PATH” is changed to a non-default value like “/tmp”, the resource files must also be moved to the “/tmp/font/” and “/tmp/image/” directories.Otherwise, a “resource not found” error will occur. diff --git a/zh-cn/demo/Smart_Band_Example_zh-cn.md b/zh-cn/demo/Smart_Band_Example_zh-cn.md index 6299dab..bb6193c 100644 --- a/zh-cn/demo/Smart_Band_Example_zh-cn.md +++ b/zh-cn/demo/Smart_Band_Example_zh-cn.md @@ -92,7 +92,16 @@ Bandx 中使用的字体和图像资源位于 `apps/packages/demos/bandx/resourc ./emulator.sh vela ``` -2. 使用模拟器支持的 `ADB` 将资源推送到设备,在 openvela 仓库的根目录下打开一个新的终端,输入 `adb push` 后跟文件路径,即可将资源传输到相应位置。 +2. 进入 /data 目录创建 font 和 image 子目录: + + ```bash + cd /data + mkdir font + mkdir image + cd + ``` + +3. 使用模拟器支持的 `ADB` 将资源推送到设备,在 openvela 仓库的根目录下打开一个新的终端,输入 `adb push` 后跟文件路径,即可将资源传输到相应位置。 ```bash # 安装adb @@ -100,7 +109,7 @@ Bandx 中使用的字体和图像资源位于 `apps/packages/demos/bandx/resourc # 推送资源 adb push apps/packages/demos/bandx/resource/font/assets/* /data/font/ - adb push apps/packages/demos/bandx/resource/image/assets /data/image/ + adb push apps/packages/demos/bandx/resource/image/assets/* /data/image/ ``` 如果将 `BANDX_BASE_PATH` 更改为非默认值,如 `/tmp`,则资源文件也必须传输到 `/tmp/font/` 和 `/tmp/image/` 目录。否则将出现找不到资源的错误。 -- Gitee