Jelajahi Sumber

Merge branch 'flipperdevices:dev' into feature_wifi_marauder_app

0xchocolate 2 tahun lalu
induk
melakukan
ce2e15d468
100 mengubah file dengan 1219 tambahan dan 258 penghapusan
  1. 2 2
      .github/CODEOWNERS
  2. 13 3
      .github/workflows/build.yml
  3. 28 6
      .github/workflows/lint_and_submodule_check.yml
  4. 0 47
      .github/workflows/lint_c.yml
  5. 0 33
      .github/workflows/lint_python.yml
  6. 1 1
      .github/workflows/merge_report.yml
  7. 1 1
      .github/workflows/pvs_studio.yml
  8. 2 2
      .github/workflows/unit_tests.yml
  9. 5 4
      .github/workflows/updater_test.yml
  10. 1 0
      .gitignore
  11. 2 2
      .gitmodules
  12. 3 0
      .pvsconfig
  13. 1 1
      .pvsoptions
  14. 3 2
      .vscode/example/launch.json
  15. 13 14
      SConstruct
  16. 10 5
      applications/ReadMe.md
  17. 28 26
      applications/debug/keypad_test/keypad_test.c
  18. 16 14
      applications/debug/text_box_test/text_box_test.c
  19. 0 6
      applications/debug/unit_tests/furi/furi_test.c
  20. 0 41
      applications/debug/unit_tests/furi/furi_valuemutex_test.c
  21. 34 27
      applications/debug/unit_tests/power/power_test.c
  22. 4 5
      applications/debug/unit_tests/rpc/rpc_test.c
  23. 4 4
      applications/debug/unit_tests/storage/dirwalk_test.c
  24. 291 1
      applications/debug/unit_tests/storage/storage_test.c
  25. 1 0
      applications/examples/application.fam
  26. 58 0
      applications/examples/example_apps_assets/README.md
  27. 10 0
      applications/examples/example_apps_assets/application.fam
  28. 48 0
      applications/examples/example_apps_assets/example_apps_assets.c
  29. 24 0
      applications/examples/example_apps_assets/files/poems/a jelly-fish.txt
  30. 23 0
      applications/examples/example_apps_assets/files/poems/my shadow.txt
  31. 19 0
      applications/examples/example_apps_assets/files/poems/theme in yellow.txt
  32. 1 0
      applications/examples/example_apps_assets/files/test_asset.txt
  33. 24 0
      applications/examples/example_apps_data/README.md
  34. 9 0
      applications/examples/example_apps_data/application.fam
  35. 40 0
      applications/examples/example_apps_data/example_apps_data.c
  36. 31 0
      applications/examples/example_plugins/application.fam
  37. 70 0
      applications/examples/example_plugins/example_plugins.c
  38. 43 0
      applications/examples/example_plugins/example_plugins_multi.c
  39. 32 0
      applications/examples/example_plugins/plugin1.c
  40. 32 0
      applications/examples/example_plugins/plugin2.c
  41. 12 0
      applications/examples/example_plugins/plugin_interface.h
  42. 25 0
      applications/examples/example_plugins_advanced/app_api.c
  43. 25 0
      applications/examples/example_plugins_advanced/app_api.h
  44. 9 0
      applications/examples/example_plugins_advanced/app_api_interface.h
  45. 27 0
      applications/examples/example_plugins_advanced/app_api_table.cpp
  46. 13 0
      applications/examples/example_plugins_advanced/app_api_table_i.h
  47. 24 0
      applications/examples/example_plugins_advanced/application.fam
  48. 48 0
      applications/examples/example_plugins_advanced/example_advanced_plugins.c
  49. 40 0
      applications/examples/example_plugins_advanced/plugin1.c
  50. 40 0
      applications/examples/example_plugins_advanced/plugin2.c
  51. 12 0
      applications/examples/example_plugins_advanced/plugin_interface.h
  52. 6 0
      applications/external/application.fam
  53. 1 1
      applications/external/clock/application.fam
  54. 0 0
      applications/external/clock/clock.png
  55. 2 2
      applications/external/clock/clock_app.c
  56. 0 0
      applications/external/dap_link/README.md
  57. 2 2
      applications/external/dap_link/application.fam
  58. 0 0
      applications/external/dap_link/dap_config.h
  59. 0 0
      applications/external/dap_link/dap_link.c
  60. 0 0
      applications/external/dap_link/dap_link.h
  61. 0 0
      applications/external/dap_link/dap_link.png
  62. 0 0
      applications/external/dap_link/gui/dap_gui.c
  63. 0 0
      applications/external/dap_link/gui/dap_gui.h
  64. 0 0
      applications/external/dap_link/gui/dap_gui_custom_event.h
  65. 0 0
      applications/external/dap_link/gui/dap_gui_i.h
  66. 0 0
      applications/external/dap_link/gui/scenes/config/dap_scene.c
  67. 0 0
      applications/external/dap_link/gui/scenes/config/dap_scene.h
  68. 0 0
      applications/external/dap_link/gui/scenes/config/dap_scene_config.h
  69. 0 0
      applications/external/dap_link/gui/scenes/dap_scene_about.c
  70. 0 0
      applications/external/dap_link/gui/scenes/dap_scene_config.c
  71. 0 0
      applications/external/dap_link/gui/scenes/dap_scene_help.c
  72. 0 0
      applications/external/dap_link/gui/scenes/dap_scene_main.c
  73. 0 0
      applications/external/dap_link/gui/views/dap_main_view.c
  74. 0 0
      applications/external/dap_link/gui/views/dap_main_view.h
  75. 0 0
      applications/external/dap_link/icons/ActiveConnection_50x64.png
  76. 0 0
      applications/external/dap_link/icons/ArrowDownEmpty_12x18.png
  77. 0 0
      applications/external/dap_link/icons/ArrowDownFilled_12x18.png
  78. 0 0
      applications/external/dap_link/icons/ArrowUpEmpty_12x18.png
  79. 0 0
      applications/external/dap_link/icons/ArrowUpFilled_12x18.png
  80. 0 0
      applications/external/dap_link/lib/free-dap
  81. 0 0
      applications/external/dap_link/usb/dap_v2_usb.c
  82. 0 0
      applications/external/dap_link/usb/dap_v2_usb.h
  83. 0 0
      applications/external/dap_link/usb/usb_winusb.h
  84. 6 6
      applications/external/hid_app/application.fam
  85. 0 0
      applications/external/hid_app/assets/Arr_dwn_7x9.png
  86. 0 0
      applications/external/hid_app/assets/Arr_up_7x9.png
  87. 0 0
      applications/external/hid_app/assets/Ble_connected_15x15.png
  88. 0 0
      applications/external/hid_app/assets/Ble_disconnected_15x15.png
  89. 0 0
      applications/external/hid_app/assets/ButtonDown_7x4.png
  90. 0 0
      applications/external/hid_app/assets/ButtonF10_5x8.png
  91. 0 0
      applications/external/hid_app/assets/ButtonF11_5x8.png
  92. 0 0
      applications/external/hid_app/assets/ButtonF12_5x8.png
  93. 0 0
      applications/external/hid_app/assets/ButtonF1_5x8.png
  94. 0 0
      applications/external/hid_app/assets/ButtonF2_5x8.png
  95. 0 0
      applications/external/hid_app/assets/ButtonF3_5x8.png
  96. 0 0
      applications/external/hid_app/assets/ButtonF4_5x8.png
  97. 0 0
      applications/external/hid_app/assets/ButtonF5_5x8.png
  98. 0 0
      applications/external/hid_app/assets/ButtonF6_5x8.png
  99. 0 0
      applications/external/hid_app/assets/ButtonF7_5x8.png
  100. 0 0
      applications/external/hid_app/assets/ButtonF8_5x8.png

+ 2 - 2
.github/CODEOWNERS

@@ -22,8 +22,8 @@
 /applications/main/subghz/ @skotopes @DrZlo13 @hedger @Skorpionm
 /applications/main/u2f/ @skotopes @DrZlo13 @hedger @nminaylov
 
-/applications/plugins/bt_hid_app/ @skotopes @DrZlo13 @hedger @gornekich
-/applications/plugins/picopass/ @skotopes @DrZlo13 @hedger @gornekich
+/applications/external/bt_hid_app/ @skotopes @DrZlo13 @hedger @gornekich
+/applications/external/picopass/ @skotopes @DrZlo13 @hedger @gornekich
 
 /applications/services/bt/ @skotopes @DrZlo13 @hedger @gornekich
 /applications/services/cli/ @skotopes @DrZlo13 @hedger @nminaylov

+ 13 - 3
.github/workflows/build.yml

@@ -27,7 +27,7 @@ jobs:
       - name: 'Checkout code'
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
+          fetch-depth: 1
           ref: ${{ github.event.pull_request.head.sha }}
 
       - name: 'Get commit details'
@@ -44,6 +44,16 @@ jobs:
           echo random_hash=$(openssl rand -base64 40 | shasum -a 256 | awk '{print $1}') >> $GITHUB_OUTPUT
           echo "event_type=$TYPE" >> $GITHUB_OUTPUT
 
+      - name: 'Check API versions'
+        run: |
+          set -e
+          N_API_HEADER_SIGNATURES=`ls -1 firmware/targets/f*/api_symbols.csv | xargs -I {} sh -c "head -n2 {} | md5sum" | sort -u | wc -l`
+          if [ $N_API_HEADER_SIGNATURES != 1 ] ; then
+            echo API versions aren\'t matching for available targets. Please update!
+            head -n2 firmware/targets/f*/api_symbols.csv
+            exit 1
+          fi
+
       - name: 'Make artifacts directory'
         run: |
           rm -rf artifacts
@@ -167,8 +177,8 @@ jobs:
       - name: 'Checkout code'
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
-          submodules: true
+          fetch-depth: 1
+          submodules: false
           ref: ${{ github.event.pull_request.head.sha }}
 
       - name: 'Get commit details'

+ 28 - 6
.github/workflows/check_submodules.yml → .github/workflows/lint_and_submodule_check.yml

@@ -1,4 +1,4 @@
-name: 'Check submodules branch'
+name: 'Lint sources & check submodule integrity'
 
 on:
   push:
@@ -9,9 +9,14 @@ on:
       - '*'
   pull_request:
 
+env:
+  TARGETS: f7
+  FBT_TOOLCHAIN_PATH: /runner/_work
+  SET_GH_OUTPUT: 1
+
 jobs:
-  check_protobuf:
-    runs-on: [self-hosted, FlipperZeroShell]
+  lint_sources_check_submodules:
+    runs-on: [self-hosted,FlipperZeroShell]
     steps:
       - name: 'Decontaminate previous build leftovers'
         run: |
@@ -22,9 +27,10 @@ jobs:
       - name: 'Checkout code'
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
+          fetch-depth: 1
           ref: ${{ github.event.pull_request.head.sha }}
 
+
       - name: 'Check protobuf branch'
         run: |
           git submodule update --init
@@ -36,12 +42,28 @@ jobs:
           BRANCHES=$(git branch -r --contains "$SUBMODULE_HASH");
           COMMITS_IN_BRANCH="$(git rev-list --count dev)";
           if [ $COMMITS_IN_BRANCH -lt $SUB_COMMITS_MIN ]; then
-            echo "name=fails::error" >> $GITHUB_OUTPUT
+            echo "name=fails::error" >> $GITHUB_OUTPUT;
             echo "::error::Error: Too low commits in $SUB_BRANCH of submodule $SUB_PATH: $COMMITS_IN_BRANCH(expected $SUB_COMMITS_MIN+)";
             exit 1;
           fi
           if ! grep -q "/$SUB_BRANCH" <<< "$BRANCHES"; then
-            echo "name=fails::error" >> $GITHUB_OUTPUT
+            echo "name=fails::error" >> $GITHUB_OUTPUT;
             echo "::error::Error: Submodule $SUB_PATH is not on branch $SUB_BRANCH";
             exit 1;
           fi
+
+      - name: 'Check Python code formatting'
+        id: syntax_check_py
+        run: ./fbt lint_py 2>&1 >/dev/null || echo "errors=1" >> $GITHUB_OUTPUT
+
+      - name: 'Check C++ code formatting'
+        if: always()
+        id: syntax_check_cpp
+        run: ./fbt lint 2>&1 >/dev/null || echo "errors=1" >> $GITHUB_OUTPUT
+
+      - name: Report code formatting errors
+        if: ( steps.syntax_check_py.outputs.errors || steps.syntax_check_cpp.outputs.errors ) && github.event.pull_request
+        run: |
+          echo "Code formatting errors found";
+          echo "Please run './fbt format' or './fbt format_py' to fix them";
+          exit 1;

+ 0 - 47
.github/workflows/lint_c.yml

@@ -1,47 +0,0 @@
-name: 'Lint C/C++ with clang-format'
-
-on:
-  push:
-    branches:
-      - dev
-      - "release*"
-    tags:
-      - '*'
-  pull_request:
-
-env:
-  TARGETS: f7
-  FBT_TOOLCHAIN_PATH: /runner/_work
-  SET_GH_OUTPUT: 1
-
-jobs:
-  lint_c_cpp:
-    runs-on: [self-hosted,FlipperZeroShell]
-    steps:
-      - name: 'Decontaminate previous build leftovers'
-        run: |
-          if [ -d .git ]; then
-            git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
-          fi
-
-      - name: 'Checkout code'
-        uses: actions/checkout@v3
-        with:
-          fetch-depth: 0
-          ref: ${{ github.event.pull_request.head.sha }}
-
-      - name: 'Check code formatting'
-        id: syntax_check
-        run: ./fbt lint
-
-      - name: Report code formatting errors
-        if: failure() && steps.syntax_check.outputs.errors && github.event.pull_request
-        uses: peter-evans/create-or-update-comment@v1
-        with:
-          issue-number: ${{ github.event.pull_request.number }}
-          body: |
-            Please fix following code formatting errors:
-            ```
-            ${{ steps.syntax_check.outputs.errors }}
-            ```
-            You might want to run `./fbt format` for an auto-fix.

+ 0 - 33
.github/workflows/lint_python.yml

@@ -1,33 +0,0 @@
-name: 'Python Lint'
-
-on:
-  push:
-    branches:
-      - dev
-      - "release*"
-    tags:
-      - '*'
-  pull_request:
-
-env:
-    FBT_TOOLCHAIN_PATH: /runner/_work
-    SET_GH_OUTPUT: 1
-
-jobs:
-  lint_python:
-    runs-on: [self-hosted,FlipperZeroShell]
-    steps:
-      - name: 'Decontaminate previous build leftovers'
-        run: |
-          if [ -d .git ]; then
-            git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
-          fi
-
-      - name: 'Checkout code'
-        uses: actions/checkout@v3
-        with:
-          fetch-depth: 0
-          ref: ${{ github.event.pull_request.head.sha }}
-
-      - name: 'Check code formatting'
-        run: ./fbt lint_py

+ 1 - 1
.github/workflows/merge_report.yml

@@ -21,7 +21,7 @@ jobs:
       - name: 'Checkout code'
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
+          fetch-depth: 1
           ref: ${{ github.event.pull_request.head.sha }}
 
       - name: 'Get commit details'

+ 1 - 1
.github/workflows/pvs_studio.yml

@@ -28,7 +28,7 @@ jobs:
       - name: 'Checkout code'
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
+          fetch-depth: 1
           ref: ${{ github.event.pull_request.head.sha }}
 
       - name: 'Get commit details'

+ 2 - 2
.github/workflows/unit_tests.yml

@@ -10,7 +10,7 @@ env:
 
 jobs:
   run_units_on_bench:
-    runs-on: [self-hosted, FlipperZeroTest]
+    runs-on: [self-hosted, FlipperZeroUnitTest]
     steps:
       - name: 'Decontaminate previous build leftovers'
         run: |
@@ -21,7 +21,7 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
+          fetch-depth: 1
           ref: ${{ github.event.pull_request.head.sha }}
 
       - name: 'Get flipper from device manager (mock)'

+ 5 - 4
.github/workflows/updater_test.yml

@@ -10,7 +10,7 @@ env:
 
 jobs:
   test_updater_on_bench:
-    runs-on: [self-hosted, FlipperZeroTestMac1]
+    runs-on: [self-hosted, FlipperZeroUpdaterTest]
     steps:
       - name: 'Decontaminate previous build leftovers'
         run: |
@@ -21,13 +21,14 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
         with:
-          fetch-depth: 0
+          fetch-depth: 1
+          submodules: false          
           ref: ${{ github.event.pull_request.head.sha }}
 
       - name: 'Get flipper from device manager (mock)'
         id: device
         run: |
-          echo "flipper=/dev/tty.usbmodemflip_Rekigyn1" >> $GITHUB_OUTPUT
+          echo "flipper=Rekigyn" >> $GITHUB_OUTPUT
           echo "stlink=0F020D026415303030303032" >> $GITHUB_OUTPUT
 
       - name: 'Flashing target firmware'
@@ -62,7 +63,7 @@ jobs:
         uses: actions/checkout@v3
         if: failure()
         with:
-          fetch-depth: 0
+          fetch-depth: 1
           ref: ${{ steps.release_tag.outputs.tag }}
 
       - name: 'Flash last release'

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
+*~
 *.swp
 *.swo
 *.gdb_history

+ 2 - 2
.gitmodules

@@ -28,6 +28,6 @@
 [submodule "lib/cxxheaderparser"]
 	path = lib/cxxheaderparser
 	url = https://github.com/robotpy/cxxheaderparser.git
-[submodule "applications/plugins/dap_link/lib/free-dap"]
-	path = applications/plugins/dap_link/lib/free-dap
+[submodule "applications/external/dap_link/lib/free-dap"]
+	path = applications/external/dap_link/lib/free-dap
 	url = https://github.com/ataradov/free-dap.git

+ 3 - 0
.pvsconfig

@@ -44,3 +44,6 @@
 
 # Functions that always return the same error code
 //-V:picopass_device_decrypt:1048
+
+# Examples
+//V_EXCLUDE_PATH applications/examples/

+ 1 - 1
.pvsoptions

@@ -1 +1 @@
---ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/plugins/dap_link/lib/free-dap
+--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/external/dap_link/lib/free-dap

+ 3 - 2
.vscode/example/launch.json

@@ -11,9 +11,10 @@
             "args": {
                 "useSingleResult": true,
                 "env": {
-                    "PATH": "${workspaceFolder};${env:PATH}"
+                    "PATH": "${workspaceFolder};${env:PATH}",
+                    "FBT_QUIET": 1
                 },
-                "command": "./fbt get_blackmagic",
+                "command": "fbt get_blackmagic",
                 "description": "Get Blackmagic device",
             }
         }

+ 13 - 14
SConstruct

@@ -139,34 +139,33 @@ if GetOption("fullenv") or any(
 basic_dist = distenv.DistCommand("fw_dist", distenv["DIST_DEPENDS"])
 distenv.Default(basic_dist)
 
-dist_dir = distenv.GetProjetDirName()
+dist_dir_name = distenv.GetProjetDirName()
+dist_dir = distenv.Dir(f"#/dist/{dist_dir_name}")
+external_apps_artifacts = firmware_env["FW_EXTAPPS"]
+external_app_list = external_apps_artifacts.application_map.values()
+
 fap_dist = [
     distenv.Install(
-        distenv.Dir(f"#/dist/{dist_dir}/apps/debug_elf"),
-        list(
-            app_artifact.debug
-            for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
-        ),
+        dist_dir.Dir("debug_elf"),
+        list(app_artifact.debug for app_artifact in external_app_list),
     ),
     *(
         distenv.Install(
-            f"#/dist/{dist_dir}/apps/{app_artifact.app.fap_category}",
-            app_artifact.compact[0],
+            dist_dir.File(dist_entry[1]).dir,
+            app_artifact.compact,
         )
-        for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
+        for app_artifact in external_app_list
+        for dist_entry in app_artifact.dist_entries
     ),
 ]
 Depends(
     fap_dist,
-    list(
-        app_artifact.validator
-        for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
-    ),
+    list(app_artifact.validator for app_artifact in external_app_list),
 )
 Alias("fap_dist", fap_dist)
 # distenv.Default(fap_dist)
 
-distenv.Depends(firmware_env["FW_RESOURCES"], firmware_env["FW_EXTAPPS"].resources_dist)
+distenv.Depends(firmware_env["FW_RESOURCES"], external_apps_artifacts.resources_dist)
 
 # Copy all faps to device
 

+ 10 - 5
applications/ReadMe.md

@@ -36,15 +36,20 @@ Applications for main Flipper menu.
 - `u2f`                 - U2F Application
 
 
-## plugins
+## External
 
-Extra apps for Plugins & App Loader menus.
+External applications deployed to SD Card
 
-- `bt_hid_app`          - BT Remote controller
+- `clock`               - Clock application
+- `dap_link`            - DAP Link OnChip debugger
+- `hid_app`             - USB/BT Remote controller
 - `music_player`        - Music player app (demo)
-- `picopass`            - Picopass tool
+- `nfc_magic`           - NFC MFC Magic card application
+- `picopass`            - Picopass reader / writer
+- `signal_generator`    - Signal generator app: PWM and clock generator
 - `snake_game`          - Snake game application
-
+- `spi_mem_manager`     - SPI Memory reader / flasher
+- `weather_station`     - SubGHz weather station
 
 ## services
 

+ 28 - 26
applications/debug/keypad_test/keypad_test.c

@@ -11,6 +11,7 @@ typedef struct {
     uint16_t left;
     uint16_t right;
     uint16_t ok;
+    FuriMutex* mutex;
 } KeypadTestState;
 
 static void keypad_test_reset_state(KeypadTestState* state) {
@@ -22,7 +23,8 @@ static void keypad_test_reset_state(KeypadTestState* state) {
 }
 
 static void keypad_test_render_callback(Canvas* canvas, void* ctx) {
-    KeypadTestState* state = (KeypadTestState*)acquire_mutex((ValueMutex*)ctx, 25);
+    KeypadTestState* state = ctx;
+    furi_mutex_acquire(state->mutex, FuriWaitForever);
     canvas_clear(canvas);
     char strings[5][20];
 
@@ -51,7 +53,7 @@ static void keypad_test_render_callback(Canvas* canvas, void* ctx) {
 
     canvas_draw_str(canvas, 10, 63, "[back] - reset, hold to exit");
 
-    release_mutex((ValueMutex*)ctx, state);
+    furi_mutex_release(state->mutex);
 }
 
 static void keypad_test_input_callback(InputEvent* input_event, void* ctx) {
@@ -64,17 +66,17 @@ int32_t keypad_test_app(void* p) {
     FuriMessageQueue* event_queue = furi_message_queue_alloc(32, sizeof(InputEvent));
     furi_check(event_queue);
 
-    KeypadTestState _state = {{false, false, false, false, false}, 0, 0, 0, 0, 0};
+    KeypadTestState state = {{false, false, false, false, false}, 0, 0, 0, 0, 0, NULL};
+    state.mutex = furi_mutex_alloc(FuriMutexTypeNormal);
 
-    ValueMutex state_mutex;
-    if(!init_mutex(&state_mutex, &_state, sizeof(KeypadTestState))) {
+    if(!state.mutex) {
         FURI_LOG_E(TAG, "cannot create mutex");
         return 0;
     }
 
     ViewPort* view_port = view_port_alloc();
 
-    view_port_draw_callback_set(view_port, keypad_test_render_callback, &state_mutex);
+    view_port_draw_callback_set(view_port, keypad_test_render_callback, &state);
     view_port_input_callback_set(view_port, keypad_test_input_callback, event_queue);
 
     // Open GUI and register view_port
@@ -83,7 +85,7 @@ int32_t keypad_test_app(void* p) {
 
     InputEvent event;
     while(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk) {
-        KeypadTestState* state = (KeypadTestState*)acquire_mutex_block(&state_mutex);
+        furi_mutex_acquire(state.mutex, FuriWaitForever);
         FURI_LOG_I(
             TAG,
             "key: %s type: %s",
@@ -92,54 +94,54 @@ int32_t keypad_test_app(void* p) {
 
         if(event.key == InputKeyRight) {
             if(event.type == InputTypePress) {
-                state->press[0] = true;
+                state.press[0] = true;
             } else if(event.type == InputTypeRelease) {
-                state->press[0] = false;
+                state.press[0] = false;
             } else if(event.type == InputTypeShort) {
-                ++state->right;
+                ++state.right;
             }
         } else if(event.key == InputKeyLeft) {
             if(event.type == InputTypePress) {
-                state->press[1] = true;
+                state.press[1] = true;
             } else if(event.type == InputTypeRelease) {
-                state->press[1] = false;
+                state.press[1] = false;
             } else if(event.type == InputTypeShort) {
-                ++state->left;
+                ++state.left;
             }
         } else if(event.key == InputKeyUp) {
             if(event.type == InputTypePress) {
-                state->press[2] = true;
+                state.press[2] = true;
             } else if(event.type == InputTypeRelease) {
-                state->press[2] = false;
+                state.press[2] = false;
             } else if(event.type == InputTypeShort) {
-                ++state->up;
+                ++state.up;
             }
         } else if(event.key == InputKeyDown) {
             if(event.type == InputTypePress) {
-                state->press[3] = true;
+                state.press[3] = true;
             } else if(event.type == InputTypeRelease) {
-                state->press[3] = false;
+                state.press[3] = false;
             } else if(event.type == InputTypeShort) {
-                ++state->down;
+                ++state.down;
             }
         } else if(event.key == InputKeyOk) {
             if(event.type == InputTypePress) {
-                state->press[4] = true;
+                state.press[4] = true;
             } else if(event.type == InputTypeRelease) {
-                state->press[4] = false;
+                state.press[4] = false;
             } else if(event.type == InputTypeShort) {
-                ++state->ok;
+                ++state.ok;
             }
         } else if(event.key == InputKeyBack) {
             if(event.type == InputTypeLong) {
-                release_mutex(&state_mutex, state);
+                furi_mutex_release(state.mutex);
                 break;
             } else if(event.type == InputTypeShort) {
-                keypad_test_reset_state(state);
+                keypad_test_reset_state(&state);
             }
         }
 
-        release_mutex(&state_mutex, state);
+        furi_mutex_release(state.mutex);
         view_port_update(view_port);
     }
 
@@ -147,7 +149,7 @@ int32_t keypad_test_app(void* p) {
     gui_remove_view_port(gui, view_port);
     view_port_free(view_port);
     furi_message_queue_free(event_queue);
-    delete_mutex(&state_mutex);
+    furi_mutex_free(state.mutex);
 
     furi_record_close(RECORD_GUI);
 

+ 16 - 14
applications/debug/text_box_test/text_box_test.c

@@ -53,15 +53,17 @@ static void (*text_box_test_render[])(Canvas* canvas) = {
 
 typedef struct {
     uint32_t idx;
+    FuriMutex* mutex;
 } TextBoxTestState;
 
 static void text_box_test_render_callback(Canvas* canvas, void* ctx) {
-    TextBoxTestState* state = acquire_mutex((ValueMutex*)ctx, 25);
+    TextBoxTestState* state = ctx;
+    furi_mutex_acquire(state->mutex, FuriWaitForever);
     canvas_clear(canvas);
 
     text_box_test_render[state->idx](canvas);
 
-    release_mutex((ValueMutex*)ctx, state);
+    furi_mutex_release(state->mutex);
 }
 
 static void text_box_test_input_callback(InputEvent* input_event, void* ctx) {
@@ -74,17 +76,17 @@ int32_t text_box_test_app(void* p) {
     FuriMessageQueue* event_queue = furi_message_queue_alloc(32, sizeof(InputEvent));
     furi_check(event_queue);
 
-    TextBoxTestState _state = {.idx = 0};
+    TextBoxTestState state = {.idx = 0, .mutex = NULL};
+    state.mutex = furi_mutex_alloc(FuriMutexTypeNormal);
 
-    ValueMutex state_mutex;
-    if(!init_mutex(&state_mutex, &_state, sizeof(TextBoxTestState))) {
+    if(!state.mutex) {
         FURI_LOG_E(TAG, "Cannot create mutex");
         return 0;
     }
 
     ViewPort* view_port = view_port_alloc();
 
-    view_port_draw_callback_set(view_port, text_box_test_render_callback, &state_mutex);
+    view_port_draw_callback_set(view_port, text_box_test_render_callback, &state);
     view_port_input_callback_set(view_port, text_box_test_input_callback, event_queue);
 
     // Open GUI and register view_port
@@ -94,24 +96,24 @@ int32_t text_box_test_app(void* p) {
     uint32_t test_renders_num = COUNT_OF(text_box_test_render);
     InputEvent event;
     while(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk) {
-        TextBoxTestState* state = acquire_mutex_block(&state_mutex);
+        furi_mutex_acquire(state.mutex, FuriWaitForever);
 
         if(event.type == InputTypeShort) {
             if(event.key == InputKeyRight) {
-                if(state->idx < test_renders_num - 1) {
-                    state->idx++;
+                if(state.idx < test_renders_num - 1) {
+                    state.idx++;
                 }
             } else if(event.key == InputKeyLeft) {
-                if(state->idx > 0) {
-                    state->idx--;
+                if(state.idx > 0) {
+                    state.idx--;
                 }
             } else if(event.key == InputKeyBack) {
-                release_mutex(&state_mutex, state);
+                furi_mutex_release(state.mutex);
                 break;
             }
         }
 
-        release_mutex(&state_mutex, state);
+        furi_mutex_release(state.mutex);
         view_port_update(view_port);
     }
 
@@ -119,7 +121,7 @@ int32_t text_box_test_app(void* p) {
     gui_remove_view_port(gui, view_port);
     view_port_free(view_port);
     furi_message_queue_free(event_queue);
-    delete_mutex(&state_mutex);
+    furi_mutex_free(state.mutex);
 
     furi_record_close(RECORD_GUI);
 

+ 0 - 6
applications/debug/unit_tests/furi/furi_test.c

@@ -5,7 +5,6 @@
 
 // v2 tests
 void test_furi_create_open();
-void test_furi_valuemutex();
 void test_furi_concurrent_access();
 void test_furi_pubsub();
 
@@ -30,10 +29,6 @@ MU_TEST(mu_test_furi_create_open) {
     test_furi_create_open();
 }
 
-MU_TEST(mu_test_furi_valuemutex) {
-    test_furi_valuemutex();
-}
-
 MU_TEST(mu_test_furi_pubsub) {
     test_furi_pubsub();
 }
@@ -51,7 +46,6 @@ MU_TEST_SUITE(test_suite) {
 
     // v2 tests
     MU_RUN_TEST(mu_test_furi_create_open);
-    MU_RUN_TEST(mu_test_furi_valuemutex);
     MU_RUN_TEST(mu_test_furi_pubsub);
     MU_RUN_TEST(mu_test_furi_memmgr);
 }

+ 0 - 41
applications/debug/unit_tests/furi/furi_valuemutex_test.c

@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <furi.h>
-
-#include "../minunit.h"
-
-void test_furi_valuemutex() {
-    const int init_value = 0xdeadbeef;
-    const int changed_value = 0x12345678;
-
-    int value = init_value;
-    bool result;
-    ValueMutex valuemutex;
-
-    // init mutex case
-    result = init_mutex(&valuemutex, &value, sizeof(value));
-    mu_assert(result, "init mutex failed");
-
-    // acquire mutex case
-    int* value_pointer = acquire_mutex(&valuemutex, 100);
-    mu_assert_pointers_eq(value_pointer, &value);
-
-    // second acquire mutex case
-    int* value_pointer_second = acquire_mutex(&valuemutex, 100);
-    mu_assert_pointers_eq(value_pointer_second, NULL);
-
-    // change value case
-    *value_pointer = changed_value;
-    mu_assert_int_eq(value, changed_value);
-
-    // release mutex case
-    result = release_mutex(&valuemutex, &value);
-    mu_assert(result, "release mutex failed");
-
-    // TODO
-    //acquire mutex blocking case
-    //write mutex blocking case
-    //read mutex blocking case
-
-    mu_check(delete_mutex(&valuemutex));
-}

+ 34 - 27
applications/debug/unit_tests/power/power_test.c

@@ -3,56 +3,63 @@
 #include "../minunit.h"
 
 static void power_test_deinit(void) {
-    // Try to reset to default charging voltage
-    furi_hal_power_set_battery_charging_voltage(4.208f);
+    // Try to reset to default charge voltage limit
+    furi_hal_power_set_battery_charge_voltage_limit(4.208f);
 }
 
-MU_TEST(test_power_charge_voltage_exact) {
-    // Power of 16mV charge voltages get applied exactly
+MU_TEST(test_power_charge_voltage_limit_exact) {
+    // Power of 16mV charge voltage limits get applied exactly
     // (bq25896 charge controller works in 16mV increments)
     //
     // This test may need adapted if other charge controllers are used in the future.
     for(uint16_t charge_mv = 3840; charge_mv <= 4208; charge_mv += 16) {
         float charge_volt = (float)charge_mv / 1000.0f;
-        furi_hal_power_set_battery_charging_voltage(charge_volt);
-        mu_assert_double_eq(charge_volt, furi_hal_power_get_battery_charging_voltage());
+        furi_hal_power_set_battery_charge_voltage_limit(charge_volt);
+        mu_assert_double_eq(charge_volt, furi_hal_power_get_battery_charge_voltage_limit());
     }
 }
 
-MU_TEST(test_power_charge_voltage_floating_imprecision) {
+MU_TEST(test_power_charge_voltage_limit_floating_imprecision) {
     // 4.016f should act as 4.016 V, even with floating point imprecision
-    furi_hal_power_set_battery_charging_voltage(4.016f);
-    mu_assert_double_eq(4.016f, furi_hal_power_get_battery_charging_voltage());
+    furi_hal_power_set_battery_charge_voltage_limit(4.016f);
+    mu_assert_double_eq(4.016f, furi_hal_power_get_battery_charge_voltage_limit());
 }
 
-MU_TEST(test_power_charge_voltage_inexact) {
-    // Charge voltages that are not power of 16mV get truncated down
-    furi_hal_power_set_battery_charging_voltage(3.841f);
-    mu_assert_double_eq(3.840, furi_hal_power_get_battery_charging_voltage());
+MU_TEST(test_power_charge_voltage_limit_inexact) {
+    // Charge voltage limits that are not power of 16mV get truncated down
+    furi_hal_power_set_battery_charge_voltage_limit(3.841f);
+    mu_assert_double_eq(3.840, furi_hal_power_get_battery_charge_voltage_limit());
 
-    furi_hal_power_set_battery_charging_voltage(3.900f);
-    mu_assert_double_eq(3.888, furi_hal_power_get_battery_charging_voltage());
+    furi_hal_power_set_battery_charge_voltage_limit(3.900f);
+    mu_assert_double_eq(3.888, furi_hal_power_get_battery_charge_voltage_limit());
 
-    furi_hal_power_set_battery_charging_voltage(4.200f);
-    mu_assert_double_eq(4.192, furi_hal_power_get_battery_charging_voltage());
+    furi_hal_power_set_battery_charge_voltage_limit(4.200f);
+    mu_assert_double_eq(4.192, furi_hal_power_get_battery_charge_voltage_limit());
 }
 
-MU_TEST(test_power_charge_voltage_invalid_clamped) {
-    // Out-of-range charge voltages get clamped to 3.840 V and 4.208 V
-    furi_hal_power_set_battery_charging_voltage(3.808f);
-    mu_assert_double_eq(3.840, furi_hal_power_get_battery_charging_voltage());
+MU_TEST(test_power_charge_voltage_limit_invalid_clamped) {
+    // Out-of-range charge voltage limits get clamped to 3.840 V and 4.208 V
+    furi_hal_power_set_battery_charge_voltage_limit(3.808f);
+    mu_assert_double_eq(3.840, furi_hal_power_get_battery_charge_voltage_limit());
+    furi_hal_power_set_battery_charge_voltage_limit(1.0f);
+    mu_assert_double_eq(3.840, furi_hal_power_get_battery_charge_voltage_limit());
 
     // NOTE: Intentionally picking a small increment above 4.208 V to reduce the risk of an
     // unhappy battery if this fails.
-    furi_hal_power_set_battery_charging_voltage(4.240f);
-    mu_assert_double_eq(4.208, furi_hal_power_get_battery_charging_voltage());
+    furi_hal_power_set_battery_charge_voltage_limit(4.240f);
+    mu_assert_double_eq(4.208, furi_hal_power_get_battery_charge_voltage_limit());
+    // Likewise, picking a number that the uint8_t wraparound in the driver would result in a
+    // VREG value under 23 if this test fails.
+    // E.g. (uint8_t)((8105-3840)/16) -> 10
+    furi_hal_power_set_battery_charge_voltage_limit(8.105f);
+    mu_assert_double_eq(4.208, furi_hal_power_get_battery_charge_voltage_limit());
 }
 
 MU_TEST_SUITE(test_power_suite) {
-    MU_RUN_TEST(test_power_charge_voltage_exact);
-    MU_RUN_TEST(test_power_charge_voltage_floating_imprecision);
-    MU_RUN_TEST(test_power_charge_voltage_inexact);
-    MU_RUN_TEST(test_power_charge_voltage_invalid_clamped);
+    MU_RUN_TEST(test_power_charge_voltage_limit_exact);
+    MU_RUN_TEST(test_power_charge_voltage_limit_floating_imprecision);
+    MU_RUN_TEST(test_power_charge_voltage_limit_inexact);
+    MU_RUN_TEST(test_power_charge_voltage_limit_invalid_clamped);
     power_test_deinit();
 }
 

+ 4 - 5
applications/debug/unit_tests/rpc/rpc_test.c

@@ -191,7 +191,7 @@ static void clean_directory(Storage* fs_api, const char* clean_dir) {
             size_t size = strlen(clean_dir) + strlen(name) + 1 + 1;
             char* fullname = malloc(size);
             snprintf(fullname, size, "%s/%s", clean_dir, name);
-            if(fileinfo.flags & FSF_DIRECTORY) {
+            if(file_info_is_dir(&fileinfo)) {
                 clean_directory(fs_api, fullname);
             }
             FS_Error error = storage_common_remove(fs_api, fullname);
@@ -608,9 +608,8 @@ static void test_rpc_storage_list_create_expected_list(
             }
 
             if(path_contains_only_ascii(name)) {
-                list->file[i].type = (fileinfo.flags & FSF_DIRECTORY) ?
-                                         PB_Storage_File_FileType_DIR :
-                                         PB_Storage_File_FileType_FILE;
+                list->file[i].type = file_info_is_dir(&fileinfo) ? PB_Storage_File_FileType_DIR :
+                                                                   PB_Storage_File_FileType_FILE;
                 list->file[i].size = fileinfo.size;
                 list->file[i].data = NULL;
                 /* memory free inside rpc_encode_and_send() -> pb_release() */
@@ -873,7 +872,7 @@ static void test_rpc_storage_stat_run(const char* path, uint32_t command_id) {
     if(error == FSE_OK) {
         response->which_content = PB_Main_storage_stat_response_tag;
         response->content.storage_stat_response.has_file = true;
-        response->content.storage_stat_response.file.type = (fileinfo.flags & FSF_DIRECTORY) ?
+        response->content.storage_stat_response.file.type = file_info_is_dir(&fileinfo) ?
                                                                 PB_Storage_File_FileType_DIR :
                                                                 PB_Storage_File_FileType_FILE;
         response->content.storage_stat_response.file.size = fileinfo.size;

+ 4 - 4
applications/debug/unit_tests/storage/dirwalk_test.c

@@ -179,7 +179,7 @@ MU_TEST_1(test_dirwalk_full, Storage* storage) {
 
     while(dir_walk_read(dir_walk, path, &fileinfo) == DirWalkOK) {
         furi_string_right(path, strlen(EXT_PATH("dirwalk/")));
-        mu_check(storage_test_paths_mark(paths, path, (fileinfo.flags & FSF_DIRECTORY)));
+        mu_check(storage_test_paths_mark(paths, path, file_info_is_dir(&fileinfo)));
     }
 
     dir_walk_free(dir_walk);
@@ -204,7 +204,7 @@ MU_TEST_1(test_dirwalk_no_recursive, Storage* storage) {
 
     while(dir_walk_read(dir_walk, path, &fileinfo) == DirWalkOK) {
         furi_string_right(path, strlen(EXT_PATH("dirwalk/")));
-        mu_check(storage_test_paths_mark(paths, path, (fileinfo.flags & FSF_DIRECTORY)));
+        mu_check(storage_test_paths_mark(paths, path, file_info_is_dir(&fileinfo)));
     }
 
     dir_walk_free(dir_walk);
@@ -219,7 +219,7 @@ static bool test_dirwalk_filter_no_folder_ext(const char* name, FileInfo* filein
     UNUSED(ctx);
 
     // only files
-    if(!(fileinfo->flags & FSF_DIRECTORY)) {
+    if(!file_info_is_dir(fileinfo)) {
         // with ".test" in name
         if(strstr(name, ".test") != NULL) {
             return true;
@@ -243,7 +243,7 @@ MU_TEST_1(test_dirwalk_filter, Storage* storage) {
 
     while(dir_walk_read(dir_walk, path, &fileinfo) == DirWalkOK) {
         furi_string_right(path, strlen(EXT_PATH("dirwalk/")));
-        mu_check(storage_test_paths_mark(paths, path, (fileinfo.flags & FSF_DIRECTORY)));
+        mu_check(storage_test_paths_mark(paths, path, file_info_is_dir(&fileinfo)));
     }
 
     dir_walk_free(dir_walk);

+ 291 - 1
applications/debug/unit_tests/storage/storage_test.c

@@ -2,9 +2,40 @@
 #include <furi.h>
 #include <storage/storage.h>
 
+// DO NOT USE THIS IN PRODUCTION CODE
+// This is a hack to access internal storage functions and definitions
+#include <storage/storage_i.h>
+
+#define UNIT_TESTS_PATH(path) EXT_PATH("unit_tests/" path)
+
 #define STORAGE_LOCKED_FILE EXT_PATH("locked_file.test")
 #define STORAGE_LOCKED_DIR STORAGE_INT_PATH_PREFIX
 
+#define STORAGE_TEST_DIR UNIT_TESTS_PATH("test_dir")
+
+static bool storage_file_create(Storage* storage, const char* path, const char* data) {
+    File* file = storage_file_alloc(storage);
+    bool result = false;
+    do {
+        if(!storage_file_open(file, path, FSAM_WRITE, FSOM_CREATE_NEW)) {
+            break;
+        }
+
+        if(storage_file_write(file, data, strlen(data)) != strlen(data)) {
+            break;
+        }
+
+        if(!storage_file_close(file)) {
+            break;
+        }
+
+        result = true;
+    } while(0);
+
+    storage_file_free(file);
+    return result;
+}
+
 static void storage_file_open_lock_setup() {
     Storage* storage = furi_record_open(RECORD_STORAGE);
     File* file = storage_file_alloc(storage);
@@ -115,7 +146,7 @@ static int32_t storage_dir_locker(void* ctx) {
     File* file = storage_file_alloc(storage);
     furi_check(storage_dir_open(file, STORAGE_LOCKED_DIR));
     furi_semaphore_release(semaphore);
-    furi_delay_ms(1000);
+    furi_delay_ms(100);
 
     furi_check(storage_dir_close(file));
     furi_record_close(RECORD_STORAGE);
@@ -152,9 +183,21 @@ MU_TEST(storage_dir_open_lock) {
     mu_assert(result, "cannot open locked dir");
 }
 
+MU_TEST(storage_dir_exists_test) {
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+
+    mu_check(!storage_dir_exists(storage, STORAGE_TEST_DIR));
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, STORAGE_TEST_DIR));
+    mu_check(storage_dir_exists(storage, STORAGE_TEST_DIR));
+    mu_assert_int_eq(FSE_OK, storage_common_remove(storage, STORAGE_TEST_DIR));
+
+    furi_record_close(RECORD_STORAGE);
+}
+
 MU_TEST_SUITE(storage_dir) {
     MU_RUN_TEST(storage_dir_open_close);
     MU_RUN_TEST(storage_dir_open_lock);
+    MU_RUN_TEST(storage_dir_exists_test);
 }
 
 static const char* const storage_copy_test_paths[] = {
@@ -303,9 +346,256 @@ MU_TEST_SUITE(storage_rename) {
     furi_record_close(RECORD_STORAGE);
 }
 
+#define APPSDATA_APP_PATH(path) APPS_DATA_PATH "/" path
+
+static const char* storage_test_apps[] = {
+    "-_twilight_-",
+    "-_rainbow_-",
+    "-_pinkie_-",
+    "-_apple_-",
+    "-_flutter_-",
+    "-_rare_-",
+};
+
+static size_t storage_test_apps_count = COUNT_OF(storage_test_apps);
+
+static int32_t storage_test_app(void* arg) {
+    UNUSED(arg);
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+    storage_common_remove(storage, "/data/test");
+    int32_t ret = storage_file_create(storage, "/data/test", "test");
+    furi_record_close(RECORD_STORAGE);
+    return ret;
+}
+
+MU_TEST(test_storage_data_path_apps) {
+    for(size_t i = 0; i < storage_test_apps_count; i++) {
+        FuriThread* thread =
+            furi_thread_alloc_ex(storage_test_apps[i], 1024, storage_test_app, NULL);
+        furi_thread_set_appid(thread, storage_test_apps[i]);
+        furi_thread_start(thread);
+        furi_thread_join(thread);
+
+        mu_assert_int_eq(true, furi_thread_get_return_code(thread));
+
+        // Check if app data dir and file exists
+        Storage* storage = furi_record_open(RECORD_STORAGE);
+        FuriString* expected = furi_string_alloc();
+        furi_string_printf(expected, APPSDATA_APP_PATH("%s"), storage_test_apps[i]);
+
+        mu_check(storage_dir_exists(storage, furi_string_get_cstr(expected)));
+        furi_string_cat(expected, "/test");
+        mu_check(storage_file_exists(storage, furi_string_get_cstr(expected)));
+
+        furi_string_printf(expected, APPSDATA_APP_PATH("%s"), storage_test_apps[i]);
+        storage_simply_remove_recursive(storage, furi_string_get_cstr(expected));
+
+        furi_record_close(RECORD_STORAGE);
+
+        furi_string_free(expected);
+        furi_thread_free(thread);
+    }
+}
+
+MU_TEST(test_storage_data_path) {
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+
+    File* file = storage_file_alloc(storage);
+    mu_check(storage_dir_open(file, "/data"));
+    mu_check(storage_dir_close(file));
+    storage_file_free(file);
+
+    // check that appsdata folder exists
+    mu_check(storage_dir_exists(storage, APPS_DATA_PATH));
+
+    // check that cli folder exists
+    mu_check(storage_dir_exists(storage, APPSDATA_APP_PATH("cli")));
+
+    storage_simply_remove(storage, APPSDATA_APP_PATH("cli"));
+
+    furi_record_close(RECORD_STORAGE);
+}
+
+MU_TEST(test_storage_common_migrate) {
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+
+    // Setup test folders
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+
+    // Test migration from non existing
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    // Test migration from existing folder to non existing
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, UNIT_TESTS_PATH("migrate_old")));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old/file1"), "test1"));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old/file2.ext"), "test2"));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old/file3.ext.ext"), "test3"));
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file1")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file2.ext")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file3.ext.ext")));
+    mu_check(storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+
+    // Test migration from existing folder to existing folder
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, UNIT_TESTS_PATH("migrate_old")));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old/file1"), "test1"));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old/file2.ext"), "test2"));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old/file3.ext.ext"), "test3"));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file1")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file2.ext")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file3.ext.ext")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file11")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file21.ext")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new/file3.ext1.ext")));
+    mu_check(storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+
+    // Test migration from empty folder to existing file
+    // Expected result: FSE_OK, folder removed, file untouched
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, UNIT_TESTS_PATH("migrate_old")));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_new"), "test1"));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+
+    // Test migration from empty folder to existing folder
+    // Expected result: FSE_OK, old folder removed, new folder untouched
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, UNIT_TESTS_PATH("migrate_old")));
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, UNIT_TESTS_PATH("migrate_new")));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+
+    // Test migration from existing file to non existing, no extension
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old"), "test1"));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_file_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+
+    // Test migration from existing file to non existing, with extension
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old.file"), "test1"));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old.file"), UNIT_TESTS_PATH("migrate_new.file")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new.file")));
+    mu_check(!storage_file_exists(storage, UNIT_TESTS_PATH("migrate_old.file")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old.file"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new.file"));
+
+    // Test migration from existing file to existing file, no extension
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old"), "test1"));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_new"), "test2"));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_file_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new1")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new1"));
+
+    // Test migration from existing file to existing file, with extension
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old.file"), "test1"));
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_new.file"), "test2"));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old.file"), UNIT_TESTS_PATH("migrate_new.file")));
+
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new.file")));
+    mu_check(!storage_file_exists(storage, UNIT_TESTS_PATH("migrate_old.file")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new1.file")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old.file"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new.file"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new1.file"));
+
+    // Test migration from existing file to existing folder
+    mu_check(storage_file_create(storage, UNIT_TESTS_PATH("migrate_old"), "test1"));
+    mu_assert_int_eq(FSE_OK, storage_common_mkdir(storage, UNIT_TESTS_PATH("migrate_new")));
+
+    mu_assert_int_eq(
+        FSE_OK,
+        storage_common_migrate(
+            storage, UNIT_TESTS_PATH("migrate_old"), UNIT_TESTS_PATH("migrate_new")));
+
+    mu_check(storage_dir_exists(storage, UNIT_TESTS_PATH("migrate_new")));
+    mu_check(!storage_file_exists(storage, UNIT_TESTS_PATH("migrate_old")));
+    mu_check(storage_file_exists(storage, UNIT_TESTS_PATH("migrate_new1")));
+
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_old"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new"));
+    storage_simply_remove_recursive(storage, UNIT_TESTS_PATH("migrate_new1"));
+
+    furi_record_close(RECORD_STORAGE);
+}
+
+MU_TEST_SUITE(test_data_path) {
+    MU_RUN_TEST(test_storage_data_path);
+    MU_RUN_TEST(test_storage_data_path_apps);
+}
+
+MU_TEST_SUITE(test_storage_common) {
+    MU_RUN_TEST(test_storage_common_migrate);
+}
+
 int run_minunit_test_storage() {
     MU_RUN_SUITE(storage_file);
     MU_RUN_SUITE(storage_dir);
     MU_RUN_SUITE(storage_rename);
+    MU_RUN_SUITE(test_data_path);
+    MU_RUN_SUITE(test_storage_common);
     return MU_EXIT_CODE;
 }

+ 1 - 0
applications/examples/application.fam

@@ -1,3 +1,4 @@
+# Placeholder
 App(
     appid="example_apps",
     name="Example apps bundle",

+ 58 - 0
applications/examples/example_apps_assets/README.md

@@ -0,0 +1,58 @@
+# Apps Assets folder Example
+
+This example shows how to use the Apps Assets folder to store data that is not part of the application itself, but is required for its operation, and that data is provided with the application.
+
+## What is the Apps Assets Folder?
+
+The **Apps Assets** folder is a folder where external applications unpack their assets.
+
+The path to the current application folder is related to the `appid` of the app. The `appid` is used to identify the app in the app store and is stored in the `application.fam` file. 
+The Apps Assets folder is located only on the external storage, the SD card.
+
+For example, if the `appid` of the app is `snake_game`, the path to the Apps Assets folder will be `/ext/apps_assets/snake_game`. But using raw paths is not recommended, because the path to the Apps Assets folder can change in the future. Use the `/assets` alias instead.
+
+## How to get the path to the Apps Assets folder?
+
+You can use `/assets` alias to get the path to the current application data folder. For example, if you want to open a file `database.txt` in the Apps Assets folder, you can use the next path: `/data/database.txt`. But this way is not recommended, because even the `/assets` alias can change in the future.
+
+We recommend to use the `APP_ASSETS_PATH` macro to get the path to the Apps Assets folder. For example, if you want to open a file `database.txt` in the Apps Assets folder, you can use the next path: `APP_ASSETS_PATH("database.txt")`.
+
+## What is the difference between the Apps Assets folder and the Apps Data folder?
+
+The Apps Assets folder is used to store the data <u>provided</u> with the application. For example, if you want to create a game, you can store game levels (contant data) in the Apps Assets folder.
+
+The Apps Data folder is used to store data <u>generated</u> by the application. For example, if you want to create a game, you can save the progress of the game (user-generated data) in the Apps Data folder.
+
+## How to provide the data with the app?
+
+To provide data with an application, you need to create a folder inside your application folder (eg "files") and place the data in it. After that, you need to add `fap_file_assets="files"` to your application.fam file.
+
+For example, if you want to provide game levels with the application, you need to create a "levels" folder inside the "files" folder and put the game levels in it. After that, you need to add `fap_file_assets="files"` to your application.fam file. The final application folder structure will look like this:
+
+```
+snake_game
+├── application.fam
+├── snake_game.c
+└── files
+    └── levels
+        ├── level1.txt
+        ├── level2.txt
+        └── level3.txt
+```
+
+When app is launched, the `files` folder will be unpacked to the Apps Assets folder. The final structure of the Apps Assets folder will look like this:
+
+```
+/assets
+├── .assets.signature
+└── levels
+    ├── level1.txt
+    ├── level2.txt
+    └── level3.txt
+```
+
+## When will the data be unpacked?
+
+The data is unpacked when the application starts, if the application is launched for the first time, or if the data within the application is updated.
+
+When an application is compiled, the contents of the "files" folder are hashed and stored within the application itself. When the application starts, this hash is compared to the hash stored in the `.assets.signature` file. If the hashes differ or the `.assets.signature` file does not exist, the application folder is deleted and the new data is unpacked.

+ 10 - 0
applications/examples/example_apps_assets/application.fam

@@ -0,0 +1,10 @@
+App(
+    appid="example_apps_assets",
+    name="Example: Apps Assets",
+    apptype=FlipperAppType.EXTERNAL,
+    entry_point="example_apps_assets_main",
+    requires=["gui"],
+    stack_size=4 * 1024,
+    fap_category="Examples",
+    fap_file_assets="files",
+)

+ 48 - 0
applications/examples/example_apps_assets/example_apps_assets.c

@@ -0,0 +1,48 @@
+#include <furi.h>
+#include <storage/storage.h>
+#include <toolbox/stream/stream.h>
+#include <toolbox/stream/file_stream.h>
+
+// Define log tag
+#define TAG "example_apps_assets"
+
+static void example_apps_data_print_file_content(Storage* storage, const char* path) {
+    Stream* stream = file_stream_alloc(storage);
+    FuriString* line = furi_string_alloc();
+
+    FURI_LOG_I(TAG, "----------------------------------------");
+    FURI_LOG_I(TAG, "File \"%s\" content:", path);
+    if(file_stream_open(stream, path, FSAM_READ, FSOM_OPEN_EXISTING)) {
+        while(stream_read_line(stream, line)) {
+            furi_string_replace_all(line, "\r", "");
+            furi_string_replace_all(line, "\n", "");
+            FURI_LOG_I(TAG, "%s", furi_string_get_cstr(line));
+        }
+    } else {
+        FURI_LOG_E(TAG, "Failed to open file");
+    }
+    FURI_LOG_I(TAG, "----------------------------------------");
+
+    furi_string_free(line);
+    file_stream_close(stream);
+    stream_free(stream);
+}
+
+// Application entry point
+int32_t example_apps_assets_main(void* p) {
+    // Mark argument as unused
+    UNUSED(p);
+
+    // Open storage
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+
+    example_apps_data_print_file_content(storage, APP_ASSETS_PATH("test_asset.txt"));
+    example_apps_data_print_file_content(storage, APP_ASSETS_PATH("poems/a jelly-fish.txt"));
+    example_apps_data_print_file_content(storage, APP_ASSETS_PATH("poems/theme in yellow.txt"));
+    example_apps_data_print_file_content(storage, APP_ASSETS_PATH("poems/my shadow.txt"));
+
+    // Close storage
+    furi_record_close(RECORD_STORAGE);
+
+    return 0;
+}

+ 24 - 0
applications/examples/example_apps_assets/files/poems/a jelly-fish.txt

@@ -0,0 +1,24 @@
+A Jelly-Fish by Marianne Moore
+
+Visible, invisible,
+A fluctuating charm,
+An amber-colored amethyst
+Inhabits it; your arm
+Approaches, and
+It opens and
+It closes;
+You have meant
+To catch it,
+And it shrivels;
+You abandon
+Your intent—
+It opens, and it
+Closes and you
+Reach for it—
+The blue
+Surrounding it
+Grows cloudy, and
+It floats away
+From you.
+
+source: "https://poets.org/anthology/poems-your-poetry-project-public-domain"

+ 23 - 0
applications/examples/example_apps_assets/files/poems/my shadow.txt

@@ -0,0 +1,23 @@
+My Shadow by Robert Louis Stevenson
+
+I have a little shadow that goes in and out with me,
+And what can be the use of him is more than I can see.
+He is very, very like me from the heels up to the head;
+And I see him jump before me, when I jump into my bed.
+
+The funniest thing about him is the way he likes to grow—
+Not at all like proper children, which is always very slow;
+For he sometimes shoots up taller like an India-rubber ball,
+And he sometimes gets so little that there’s none of him at all.
+
+He hasn’t got a notion of how children ought to play,
+And can only make a fool of me in every sort of way.
+He stays so close beside me, he’s a coward you can see;
+I’d think shame to stick to nursie as that shadow sticks to me!
+
+One morning, very early, before the sun was up,
+I rose and found the shining dew on every buttercup;
+But my lazy little shadow, like an arrant sleepy-head,
+Had stayed at home behind me and was fast asleep in bed.
+
+source: "https://poets.org/anthology/poems-your-poetry-project-public-domain"

+ 19 - 0
applications/examples/example_apps_assets/files/poems/theme in yellow.txt

@@ -0,0 +1,19 @@
+Theme in Yellow by Carl Sandburg
+
+I spot the hills 
+With yellow balls in autumn. 
+I light the prairie cornfields 
+Orange and tawny gold clusters 
+And I am called pumpkins. 
+On the last of October 
+When dusk is fallen 
+Children join hands 
+And circle round me 
+Singing ghost songs 
+And love to the harvest moon; 
+I am a jack-o'-lantern 
+With terrible teeth 
+And the children know 
+I am fooling.
+
+source: "https://poets.org/anthology/poems-your-poetry-project-public-domain"

+ 1 - 0
applications/examples/example_apps_assets/files/test_asset.txt

@@ -0,0 +1 @@
+## This is test file content

+ 24 - 0
applications/examples/example_apps_data/README.md

@@ -0,0 +1,24 @@
+# Apps Data folder Example
+
+This example demonstrates how to utilize the Apps Data folder to store data that is not part of the app itself, such as user data, configuration files, and so forth.
+
+## What is the Apps Data Folder?
+
+The **Apps Data** folder is a folder used to store data for external apps that are not part of the main firmware. 
+
+The path to the current application folder is related to the `appid` of the app. The `appid` is used to identify the app in the app store and is stored in the `application.fam` file. 
+The Apps Data folder is located only on the external storage, the SD card.
+
+For example, if the `appid` of the app is `snake_game`, the path to the Apps Data folder will be `/ext/apps_data/snake_game`. But using raw paths is not recommended, because the path to the Apps Data folder can change in the future. Use the `/data` alias instead.
+
+## How to get the path to the Apps Data folder?
+
+You can use `/data` alias to get the path to the current application data folder. For example, if you want to open a file `config.txt` in the Apps Data folder, you can use the next path: `/data/config.txt`. But this way is not recommended, because even the `/data` alias can change in the future.
+
+We recommend to use the `APP_DATA_PATH` macro to get the path to the Apps Data folder. For example, if you want to open a file `config.txt` in the Apps Data folder, you can use the next path: `APP_DATA_PATH("config.txt")`.
+
+## What is the difference between the Apps Assets folder and the Apps Data folder?
+
+The Apps Assets folder is used to store the data <u>provided</u> with the application. For example, if you want to create a game, you can store game levels (contant data) in the Apps Assets folder.
+
+The Apps Data folder is used to store data <u>generated</u> by the application. For example, if you want to create a game, you can save the progress of the game (user-generated data) in the Apps Data folder.

+ 9 - 0
applications/examples/example_apps_data/application.fam

@@ -0,0 +1,9 @@
+App(
+    appid="example_apps_data",
+    name="Example: Apps Data",
+    apptype=FlipperAppType.EXTERNAL,
+    entry_point="example_apps_data_main",
+    requires=["gui"],
+    stack_size=1 * 1024,
+    fap_category="Examples",
+)

+ 40 - 0
applications/examples/example_apps_data/example_apps_data.c

@@ -0,0 +1,40 @@
+#include <furi.h>
+#include <storage/storage.h>
+
+// Define log tag
+#define TAG "example_apps_data"
+
+// Application entry point
+int32_t example_apps_data_main(void* p) {
+    // Mark argument as unused
+    UNUSED(p);
+
+    // Open storage
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+
+    // Allocate file
+    File* file = storage_file_alloc(storage);
+
+    // Get the path to the current application data folder
+    // That is: /ext/apps_data/<app_name>
+    // And it will create folders in the path if they don't exist
+    // In this example it will create /ext/apps_data/example_apps_data
+    // And file will be /ext/apps_data/example_apps_data/test.txt
+
+    // Open file, write data and close it
+    if(!storage_file_open(file, APP_DATA_PATH("test.txt"), FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
+        FURI_LOG_E(TAG, "Failed to open file");
+    }
+    if(!storage_file_write(file, "Hello World!", strlen("Hello World!"))) {
+        FURI_LOG_E(TAG, "Failed to write to file");
+    }
+    storage_file_close(file);
+
+    // Deallocate file
+    storage_file_free(file);
+
+    // Close storage
+    furi_record_close(RECORD_STORAGE);
+
+    return 0;
+}

+ 31 - 0
applications/examples/example_plugins/application.fam

@@ -0,0 +1,31 @@
+App(
+    appid="example_plugins",
+    name="Example: App w/plugin",
+    apptype=FlipperAppType.EXTERNAL,
+    entry_point="example_plugins_app",
+    stack_size=2 * 1024,
+    fap_category="Examples",
+)
+
+App(
+    appid="example_plugins_multi",
+    name="Example: App w/plugins",
+    apptype=FlipperAppType.EXTERNAL,
+    entry_point="example_plugins_multi_app",
+    stack_size=2 * 1024,
+    fap_category="Examples",
+)
+
+App(
+    appid="example_plugin1",
+    apptype=FlipperAppType.PLUGIN,
+    entry_point="example_plugin1_ep",
+    requires=["example_plugins", "example_plugins_multi"],
+)
+
+App(
+    appid="example_plugin2",
+    apptype=FlipperAppType.PLUGIN,
+    entry_point="example_plugin2_ep",
+    requires=["example_plugins_multi"],
+)

+ 70 - 0
applications/examples/example_plugins/example_plugins.c

@@ -0,0 +1,70 @@
+/* 
+ * An example of a plugin host application.
+ * Loads a single plugin and calls its methods.
+ */
+
+#include "plugin_interface.h"
+
+#include <furi.h>
+
+#include <flipper_application/flipper_application.h>
+#include <loader/firmware_api/firmware_api.h>
+#include <storage/storage.h>
+
+#define TAG "example_plugins"
+
+int32_t example_plugins_app(void* p) {
+    UNUSED(p);
+
+    FURI_LOG_I(TAG, "Starting");
+
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+
+    FlipperApplication* app = flipper_application_alloc(storage, firmware_api_interface);
+
+    do {
+        FlipperApplicationPreloadStatus preload_res =
+            flipper_application_preload(app, APP_DATA_PATH("plugins/example_plugin1.fal"));
+
+        if(preload_res != FlipperApplicationPreloadStatusSuccess) {
+            FURI_LOG_E(TAG, "Failed to preload plugin");
+            break;
+        }
+
+        if(!flipper_application_is_plugin(app)) {
+            FURI_LOG_E(TAG, "Plugin file is not a library");
+            break;
+        }
+
+        FlipperApplicationLoadStatus load_status = flipper_application_map_to_memory(app);
+        if(load_status != FlipperApplicationLoadStatusSuccess) {
+            FURI_LOG_E(TAG, "Failed to load plugin file");
+            break;
+        }
+
+        const FlipperAppPluginDescriptor* app_descriptor =
+            flipper_application_plugin_get_descriptor(app);
+
+        FURI_LOG_I(
+            TAG,
+            "Loaded plugin for appid '%s', API %lu",
+            app_descriptor->appid,
+            app_descriptor->ep_api_version);
+
+        furi_check(app_descriptor->ep_api_version == PLUGIN_API_VERSION);
+        furi_check(strcmp(app_descriptor->appid, PLUGIN_APP_ID) == 0);
+
+        const ExamplePlugin* plugin = app_descriptor->entry_point;
+
+        FURI_LOG_I(TAG, "Plugin name: %s", plugin->name);
+        FURI_LOG_I(TAG, "Plugin method1: %d", plugin->method1());
+        FURI_LOG_I(TAG, "Plugin method2(7,8): %d", plugin->method2(7, 8));
+        FURI_LOG_I(TAG, "Plugin method2(1337,228): %d", plugin->method2(1337, 228));
+    } while(false);
+    flipper_application_free(app);
+
+    furi_record_close(RECORD_STORAGE);
+    FURI_LOG_I(TAG, "Goodbye!");
+
+    return 0;
+}

+ 43 - 0
applications/examples/example_plugins/example_plugins_multi.c

@@ -0,0 +1,43 @@
+/*
+ * An example of an advanced plugin host application.
+ * It uses PluginManager to load all plugins from a directory
+ */
+
+#include "plugin_interface.h"
+
+#include <flipper_application/flipper_application.h>
+#include <flipper_application/plugins/plugin_manager.h>
+#include <loader/firmware_api/firmware_api.h>
+
+#include <furi.h>
+
+#define TAG "example_plugins"
+
+int32_t example_plugins_multi_app(void* p) {
+    UNUSED(p);
+
+    FURI_LOG_I(TAG, "Starting");
+
+    PluginManager* manager =
+        plugin_manager_alloc(PLUGIN_APP_ID, PLUGIN_API_VERSION, firmware_api_interface);
+
+    if(plugin_manager_load_all(manager, APP_DATA_PATH("plugins")) != PluginManagerErrorNone) {
+        FURI_LOG_E(TAG, "Failed to load all libs");
+        return 0;
+    }
+
+    uint32_t plugin_count = plugin_manager_get_count(manager);
+    FURI_LOG_I(TAG, "Loaded %lu plugin(s)", plugin_count);
+
+    for(uint32_t i = 0; i < plugin_count; i++) {
+        const ExamplePlugin* plugin = plugin_manager_get_ep(manager, i);
+        FURI_LOG_I(TAG, "plugin name: %s", plugin->name);
+        FURI_LOG_I(TAG, "plugin method1: %d", plugin->method1());
+        FURI_LOG_I(TAG, "plugin method2(7,8): %d", plugin->method2(7, 8));
+    }
+
+    plugin_manager_free(manager);
+    FURI_LOG_I(TAG, "Goodbye!");
+
+    return 0;
+}

+ 32 - 0
applications/examples/example_plugins/plugin1.c

@@ -0,0 +1,32 @@
+/* A simple plugin implementing example_plugins application's plugin interface */
+
+#include "plugin_interface.h"
+
+#include <flipper_application/flipper_application.h>
+
+static int example_plugin1_method1() {
+    return 42;
+}
+
+static int example_plugin1_method2(int arg1, int arg2) {
+    return arg1 + arg2;
+}
+
+/* Actual implementation of app<>plugin interface */
+static const ExamplePlugin example_plugin1 = {
+    .name = "Demo App Plugin 1",
+    .method1 = &example_plugin1_method1,
+    .method2 = &example_plugin1_method2,
+};
+
+/* Plugin descriptor to comply with basic plugin specification */
+static const FlipperAppPluginDescriptor example_plugin1_descriptor = {
+    .appid = PLUGIN_APP_ID,
+    .ep_api_version = PLUGIN_API_VERSION,
+    .entry_point = &example_plugin1,
+};
+
+/* Plugin entry point - must return a pointer to const descriptor  */
+const FlipperAppPluginDescriptor* example_plugin1_ep() {
+    return &example_plugin1_descriptor;
+}

+ 32 - 0
applications/examples/example_plugins/plugin2.c

@@ -0,0 +1,32 @@
+/* Second plugin implementing example_plugins application's plugin interface */
+
+#include "plugin_interface.h"
+
+#include <flipper_application/flipper_application.h>
+
+static int example_plugin2_method1() {
+    return 1337;
+}
+
+static int example_plugin2_method2(int arg1, int arg2) {
+    return arg1 - arg2;
+}
+
+/* Actual implementation of app<>plugin interface */
+static const ExamplePlugin example_plugin2 = {
+    .name = "Demo App Plugin 2",
+    .method1 = &example_plugin2_method1,
+    .method2 = &example_plugin2_method2,
+};
+
+/* Plugin descriptor to comply with basic plugin specification */
+static const FlipperAppPluginDescriptor example_plugin2_descriptor = {
+    .appid = PLUGIN_APP_ID,
+    .ep_api_version = PLUGIN_API_VERSION,
+    .entry_point = &example_plugin2,
+};
+
+/* Plugin entry point - must return a pointer to const descriptor */
+const FlipperAppPluginDescriptor* example_plugin2_ep() {
+    return &example_plugin2_descriptor;
+}

+ 12 - 0
applications/examples/example_plugins/plugin_interface.h

@@ -0,0 +1,12 @@
+#pragma once
+
+/* Common interface between a plugin and host applicaion */
+
+#define PLUGIN_APP_ID "example_plugins"
+#define PLUGIN_API_VERSION 1
+
+typedef struct {
+    const char* name;
+    int (*method1)();
+    int (*method2)(int, int);
+} ExamplePlugin;

+ 25 - 0
applications/examples/example_plugins_advanced/app_api.c

@@ -0,0 +1,25 @@
+#include "app_api.h"
+
+/* Actual implementation of app's API and its private state */
+
+static uint32_t accumulator = 0;
+
+void app_api_accumulator_set(uint32_t value) {
+    accumulator = value;
+}
+
+uint32_t app_api_accumulator_get() {
+    return accumulator;
+}
+
+void app_api_accumulator_add(uint32_t value) {
+    accumulator += value;
+}
+
+void app_api_accumulator_sub(uint32_t value) {
+    accumulator -= value;
+}
+
+void app_api_accumulator_mul(uint32_t value) {
+    accumulator *= value;
+}

+ 25 - 0
applications/examples/example_plugins_advanced/app_api.h

@@ -0,0 +1,25 @@
+#pragma once
+
+/* 
+ * This file contains an API that is internally implemented by the application
+ * It is also exposed to plugins to allow them to use the application's API.
+ */
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void app_api_accumulator_set(uint32_t value);
+
+uint32_t app_api_accumulator_get();
+
+void app_api_accumulator_add(uint32_t value);
+
+void app_api_accumulator_sub(uint32_t value);
+
+void app_api_accumulator_mul(uint32_t value);
+
+#ifdef __cplusplus
+}
+#endif

+ 9 - 0
applications/examples/example_plugins_advanced/app_api_interface.h

@@ -0,0 +1,9 @@
+#pragma once
+
+#include <flipper_application/api_hashtable/api_hashtable.h>
+
+/* 
+ * Resolver interface with private application's symbols. 
+ * Implementation is contained in app_api_table.c
+ */
+extern const ElfApiInterface* const application_api_interface;

+ 27 - 0
applications/examples/example_plugins_advanced/app_api_table.cpp

@@ -0,0 +1,27 @@
+#include <flipper_application/api_hashtable/api_hashtable.h>
+#include <flipper_application/api_hashtable/compilesort.hpp>
+
+/* 
+ * This file contains an implementation of a symbol table 
+ * with private app's symbols. It is used by composite API resolver
+ * to load plugins that use internal application's APIs.
+ */
+#include "app_api_table_i.h"
+
+static_assert(!has_hash_collisions(app_api_table), "Detected API method hash collision!");
+
+constexpr HashtableApiInterface applicaton_hashtable_api_interface{
+    {
+        .api_version_major = 0,
+        .api_version_minor = 0,
+        /* generic resolver using pre-sorted array */
+        .resolver_callback = &elf_resolve_from_hashtable,
+    },
+    /* pointers to application's API table boundaries */
+    .table_cbegin = app_api_table.cbegin(),
+    .table_cend = app_api_table.cend(),
+};
+
+/* Casting to generic resolver to use in Composite API resolver */
+extern "C" const ElfApiInterface* const application_api_interface =
+    &applicaton_hashtable_api_interface;

+ 13 - 0
applications/examples/example_plugins_advanced/app_api_table_i.h

@@ -0,0 +1,13 @@
+#include "app_api.h"
+
+/* 
+ * A list of app's private functions and objects to expose for plugins.
+ * It is used to generate a table of symbols for import resolver to use.
+ * TBD: automatically generate this table from app's header files
+ */
+static constexpr auto app_api_table = sort(create_array_t<sym_entry>(
+    API_METHOD(app_api_accumulator_set, void, (uint32_t)),
+    API_METHOD(app_api_accumulator_get, uint32_t, ()),
+    API_METHOD(app_api_accumulator_add, void, (uint32_t)),
+    API_METHOD(app_api_accumulator_sub, void, (uint32_t)),
+    API_METHOD(app_api_accumulator_mul, void, (uint32_t))));

+ 24 - 0
applications/examples/example_plugins_advanced/application.fam

@@ -0,0 +1,24 @@
+App(
+    appid="example_advanced_plugins",
+    name="Example: advanced plugins",
+    apptype=FlipperAppType.EXTERNAL,
+    entry_point="example_advanced_plugins_app",
+    stack_size=2 * 1024,
+    fap_category="Examples",
+)
+
+App(
+    appid="advanced_plugin1",
+    apptype=FlipperAppType.PLUGIN,
+    entry_point="advanced_plugin1_ep",
+    requires=["example_advanced_plugins"],
+    sources=["plugin1.c"],
+)
+
+App(
+    appid="advanced_plugin2",
+    apptype=FlipperAppType.PLUGIN,
+    entry_point="advanced_plugin2_ep",
+    requires=["example_advanced_plugins"],
+    sources=["plugin2.c"],
+)

+ 48 - 0
applications/examples/example_plugins_advanced/example_advanced_plugins.c

@@ -0,0 +1,48 @@
+#include "app_api.h"
+#include "plugin_interface.h"
+#include "app_api_interface.h"
+
+#include <flipper_application/flipper_application.h>
+#include <flipper_application/plugins/plugin_manager.h>
+#include <flipper_application/plugins/composite_resolver.h>
+
+#include <loader/firmware_api/firmware_api.h>
+
+#define TAG "example_advanced_plugins"
+
+int32_t example_advanced_plugins_app(void* p) {
+    UNUSED(p);
+
+    FURI_LOG_I(TAG, "Starting");
+
+    CompositeApiResolver* resolver = composite_api_resolver_alloc();
+    composite_api_resolver_add(resolver, firmware_api_interface);
+    composite_api_resolver_add(resolver, application_api_interface);
+
+    PluginManager* manager = plugin_manager_alloc(
+        PLUGIN_APP_ID, PLUGIN_API_VERSION, composite_api_resolver_get(resolver));
+
+    do {
+        if(plugin_manager_load_all(manager, APP_DATA_PATH("plugins")) != PluginManagerErrorNone) {
+            FURI_LOG_E(TAG, "Failed to load all libs");
+            break;
+        }
+
+        uint32_t plugin_count = plugin_manager_get_count(manager);
+        FURI_LOG_I(TAG, "Loaded libs: %lu", plugin_count);
+
+        for(uint32_t i = 0; i < plugin_count; i++) {
+            const AdvancedPlugin* plugin = plugin_manager_get_ep(manager, i);
+            FURI_LOG_I(TAG, "plugin name: %s. Calling methods", plugin->name);
+            plugin->method1(228);
+            plugin->method2();
+            FURI_LOG_I(TAG, "Accumulator: %lu", app_api_accumulator_get());
+        }
+    } while(0);
+
+    plugin_manager_free(manager);
+    composite_api_resolver_free(resolver);
+    FURI_LOG_I(TAG, "Goodbye!");
+
+    return 0;
+}

+ 40 - 0
applications/examples/example_plugins_advanced/plugin1.c

@@ -0,0 +1,40 @@
+/*
+ * This plugin uses both firmware's API interface and private application headers.
+ * It can be loaded by a plugin manager that uses CompoundApiInterface,
+ * which combines both interfaces.
+ */
+
+#include "app_api.h"
+#include "plugin_interface.h"
+
+#include <flipper_application/flipper_application.h>
+#include <furi.h>
+
+static void advanced_plugin1_method1(int arg1) {
+    /* This function is implemented inside host application */
+    app_api_accumulator_add(arg1);
+}
+
+static void advanced_plugin1_method2() {
+    /* Accumulator value is stored inside host application */
+    FURI_LOG_I("TEST", "Plugin 1, accumulator: %lu", app_api_accumulator_get());
+}
+
+/* Actual implementation of app<>plugin interface */
+static const AdvancedPlugin advanced_plugin1 = {
+    .name = "Advanced Plugin 1",
+    .method1 = &advanced_plugin1_method1,
+    .method2 = &advanced_plugin1_method2,
+};
+
+/* Plugin descriptor to comply with basic plugin specification */
+static const FlipperAppPluginDescriptor advanced_plugin1_descriptor = {
+    .appid = PLUGIN_APP_ID,
+    .ep_api_version = PLUGIN_API_VERSION,
+    .entry_point = &advanced_plugin1,
+};
+
+/* Plugin entry point - must return a pointer to const descriptor */
+const FlipperAppPluginDescriptor* advanced_plugin1_ep() {
+    return &advanced_plugin1_descriptor;
+}

+ 40 - 0
applications/examples/example_plugins_advanced/plugin2.c

@@ -0,0 +1,40 @@
+/*
+ * This plugin uses both firmware's API interface and private application headers.
+ * It can be loaded by a plugin manager that uses CompoundApiInterface,
+ * which combines both interfaces.
+ */
+
+#include "app_api.h"
+#include "plugin_interface.h"
+
+#include <flipper_application/flipper_application.h>
+#include <furi.h>
+
+static void advanced_plugin2_method1(int arg1) {
+    /* This function is implemented inside host application */
+    app_api_accumulator_mul(arg1);
+}
+
+static void advanced_plugin2_method2() {
+    /* Accumulator value is stored inside host application */
+    FURI_LOG_I("TEST", "Plugin 2, accumulator: %lu", app_api_accumulator_get());
+}
+
+/* Actual implementation of app<>plugin interface */
+static const AdvancedPlugin advanced_plugin2 = {
+    .name = "Advanced Plugin 2",
+    .method1 = &advanced_plugin2_method1,
+    .method2 = &advanced_plugin2_method2,
+};
+
+/* Plugin descriptor to comply with basic plugin specification */
+static const FlipperAppPluginDescriptor advanced_plugin2_descriptor = {
+    .appid = PLUGIN_APP_ID,
+    .ep_api_version = PLUGIN_API_VERSION,
+    .entry_point = &advanced_plugin2,
+};
+
+/* Plugin entry point - must return a pointer to const descriptor */
+const FlipperAppPluginDescriptor* advanced_plugin2_ep() {
+    return &advanced_plugin2_descriptor;
+}

+ 12 - 0
applications/examples/example_plugins_advanced/plugin_interface.h

@@ -0,0 +1,12 @@
+#pragma once
+
+/* Common interface between a plugin and host applicaion */
+
+#define PLUGIN_APP_ID "example_plugins_advanced"
+#define PLUGIN_API_VERSION 1
+
+typedef struct {
+    const char* name;
+    void (*method1)(int);
+    void (*method2)();
+} AdvancedPlugin;

+ 6 - 0
applications/external/application.fam

@@ -0,0 +1,6 @@
+# Placeholder
+App(
+    appid="external_apps",
+    name="External apps bundle",
+    apptype=FlipperAppType.METAPACKAGE,
+)

+ 1 - 1
applications/plugins/clock/application.fam → applications/external/clock/application.fam

@@ -1,7 +1,7 @@
 App(
     appid="clock",
     name="Clock",
-    apptype=FlipperAppType.PLUGIN,
+    apptype=FlipperAppType.EXTERNAL,
     entry_point="clock_app",
     requires=["gui"],
     stack_size=2 * 1024,

+ 0 - 0
applications/plugins/clock/clock.png → applications/external/clock/clock.png


+ 2 - 2
applications/plugins/clock/clock_app.c → applications/external/clock/clock_app.c

@@ -56,7 +56,7 @@ static void clock_render_callback(Canvas* canvas, void* ctx) {
             31,
             AlignLeft,
             AlignCenter,
-            (data->datetime.hour > 12) ? "PM" : "AM");
+            (data->datetime.hour > 11) ? "PM" : "AM");
     }
 
     canvas_set_font(canvas, FontSecondary);
@@ -133,4 +133,4 @@ int32_t clock_app(void* p) {
     free(clock);
 
     return 0;
-}
+}

+ 0 - 0
applications/plugins/dap_link/README.md → applications/external/dap_link/README.md


+ 2 - 2
applications/plugins/dap_link/application.fam → applications/external/dap_link/application.fam

@@ -1,7 +1,7 @@
 App(
     appid="dap_link",
     name="DAP Link",
-    apptype=FlipperAppType.PLUGIN,
+    apptype=FlipperAppType.EXTERNAL,
     entry_point="dap_link_app",
     requires=[
         "gui",
@@ -10,7 +10,7 @@ App(
     stack_size=4 * 1024,
     order=20,
     fap_icon="dap_link.png",
-    fap_category="Tools",
+    fap_category="GPIO",
     fap_private_libs=[
         Lib(
             name="free-dap",

+ 0 - 0
applications/plugins/dap_link/dap_config.h → applications/external/dap_link/dap_config.h


+ 0 - 0
applications/plugins/dap_link/dap_link.c → applications/external/dap_link/dap_link.c


+ 0 - 0
applications/plugins/dap_link/dap_link.h → applications/external/dap_link/dap_link.h


+ 0 - 0
applications/plugins/dap_link/dap_link.png → applications/external/dap_link/dap_link.png


+ 0 - 0
applications/plugins/dap_link/gui/dap_gui.c → applications/external/dap_link/gui/dap_gui.c


+ 0 - 0
applications/plugins/dap_link/gui/dap_gui.h → applications/external/dap_link/gui/dap_gui.h


+ 0 - 0
applications/plugins/dap_link/gui/dap_gui_custom_event.h → applications/external/dap_link/gui/dap_gui_custom_event.h


+ 0 - 0
applications/plugins/dap_link/gui/dap_gui_i.h → applications/external/dap_link/gui/dap_gui_i.h


+ 0 - 0
applications/plugins/dap_link/gui/scenes/config/dap_scene.c → applications/external/dap_link/gui/scenes/config/dap_scene.c


+ 0 - 0
applications/plugins/dap_link/gui/scenes/config/dap_scene.h → applications/external/dap_link/gui/scenes/config/dap_scene.h


+ 0 - 0
applications/plugins/dap_link/gui/scenes/config/dap_scene_config.h → applications/external/dap_link/gui/scenes/config/dap_scene_config.h


+ 0 - 0
applications/plugins/dap_link/gui/scenes/dap_scene_about.c → applications/external/dap_link/gui/scenes/dap_scene_about.c


+ 0 - 0
applications/plugins/dap_link/gui/scenes/dap_scene_config.c → applications/external/dap_link/gui/scenes/dap_scene_config.c


+ 0 - 0
applications/plugins/dap_link/gui/scenes/dap_scene_help.c → applications/external/dap_link/gui/scenes/dap_scene_help.c


+ 0 - 0
applications/plugins/dap_link/gui/scenes/dap_scene_main.c → applications/external/dap_link/gui/scenes/dap_scene_main.c


+ 0 - 0
applications/plugins/dap_link/gui/views/dap_main_view.c → applications/external/dap_link/gui/views/dap_main_view.c


+ 0 - 0
applications/plugins/dap_link/gui/views/dap_main_view.h → applications/external/dap_link/gui/views/dap_main_view.h


+ 0 - 0
applications/plugins/dap_link/icons/ActiveConnection_50x64.png → applications/external/dap_link/icons/ActiveConnection_50x64.png


+ 0 - 0
applications/plugins/dap_link/icons/ArrowDownEmpty_12x18.png → applications/external/dap_link/icons/ArrowDownEmpty_12x18.png


+ 0 - 0
applications/plugins/dap_link/icons/ArrowDownFilled_12x18.png → applications/external/dap_link/icons/ArrowDownFilled_12x18.png


+ 0 - 0
applications/plugins/dap_link/icons/ArrowUpEmpty_12x18.png → applications/external/dap_link/icons/ArrowUpEmpty_12x18.png


+ 0 - 0
applications/plugins/dap_link/icons/ArrowUpFilled_12x18.png → applications/external/dap_link/icons/ArrowUpFilled_12x18.png


+ 0 - 0
applications/plugins/dap_link/lib/free-dap → applications/external/dap_link/lib/free-dap


+ 0 - 0
applications/plugins/dap_link/usb/dap_v2_usb.c → applications/external/dap_link/usb/dap_v2_usb.c


+ 0 - 0
applications/plugins/dap_link/usb/dap_v2_usb.h → applications/external/dap_link/usb/dap_v2_usb.h


+ 0 - 0
applications/plugins/dap_link/usb/usb_winusb.h → applications/external/dap_link/usb/usb_winusb.h


+ 6 - 6
applications/plugins/hid_app/application.fam → applications/external/hid_app/application.fam

@@ -1,10 +1,10 @@
 App(
     appid="hid_usb",
-    name="USB Remote",
-    apptype=FlipperAppType.PLUGIN,
+    name="Remote",
+    apptype=FlipperAppType.EXTERNAL,
     entry_point="hid_usb_app",
     stack_size=1 * 1024,
-    fap_category="Tools",
+    fap_category="USB",
     fap_icon="hid_usb_10px.png",
     fap_icon_assets="assets",
     fap_icon_assets_symbol="hid",
@@ -13,11 +13,11 @@ App(
 
 App(
     appid="hid_ble",
-    name="Bluetooth Remote",
-    apptype=FlipperAppType.PLUGIN,
+    name="Remote",
+    apptype=FlipperAppType.EXTERNAL,
     entry_point="hid_ble_app",
     stack_size=1 * 1024,
-    fap_category="Tools",
+    fap_category="Bluetooth",
     fap_icon="hid_ble_10px.png",
     fap_icon_assets="assets",
     fap_icon_assets_symbol="hid",

+ 0 - 0
applications/plugins/hid_app/assets/Arr_dwn_7x9.png → applications/external/hid_app/assets/Arr_dwn_7x9.png


+ 0 - 0
applications/plugins/hid_app/assets/Arr_up_7x9.png → applications/external/hid_app/assets/Arr_up_7x9.png


+ 0 - 0
applications/plugins/hid_app/assets/Ble_connected_15x15.png → applications/external/hid_app/assets/Ble_connected_15x15.png


+ 0 - 0
applications/plugins/hid_app/assets/Ble_disconnected_15x15.png → applications/external/hid_app/assets/Ble_disconnected_15x15.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonDown_7x4.png → applications/external/hid_app/assets/ButtonDown_7x4.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF10_5x8.png → applications/external/hid_app/assets/ButtonF10_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF11_5x8.png → applications/external/hid_app/assets/ButtonF11_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF12_5x8.png → applications/external/hid_app/assets/ButtonF12_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF1_5x8.png → applications/external/hid_app/assets/ButtonF1_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF2_5x8.png → applications/external/hid_app/assets/ButtonF2_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF3_5x8.png → applications/external/hid_app/assets/ButtonF3_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF4_5x8.png → applications/external/hid_app/assets/ButtonF4_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF5_5x8.png → applications/external/hid_app/assets/ButtonF5_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF6_5x8.png → applications/external/hid_app/assets/ButtonF6_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF7_5x8.png → applications/external/hid_app/assets/ButtonF7_5x8.png


+ 0 - 0
applications/plugins/hid_app/assets/ButtonF8_5x8.png → applications/external/hid_app/assets/ButtonF8_5x8.png


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini