Bundle manager is failing

​ Hello,

I am working on porting OpenHarmony v4.0 distro. The distro has been successfully ported and the system is able to boot. However, while running XTS tests, we are encountering issues with the bm command. The detailed observations and troubleshooting steps are provided below.

Environment:

  • Platform: openHarmony
  • OpenHarmony Version: 4.0

Issue: The bm command fails with: error: failed to execute your command

The below screenshot shows the bm command execution failure on the target platform.

Observation: We validated the same scenario on Raspberry Pi with OpenHarmony 4.0 and 4.1.

  • In OpenHarmony 4.0, bm is not working.
  • In OpenHarmony 4.1, bm works correctly.

Using the RPI v4.1 reference, we observed that bm works only when the foundation service is running. When the foundation service is manually stopped on RPI v4.1, bm also stops working.

Troubleshooting steps performed:

  1. Fixed dependent libraries used by bm.

  2. Verified System Ability Manager (samgr), which manages system service startup/shutdown.

  3. Replaced OpenHarmony Bundle Manager sources with RPI v4.1 foundation/Bundle Manager sources.

    • Build issues were resolved.
    • bm issue still persists on OpenHarmony 4.0.
  4. Replaced rich.json subsystem and related components with RPI sources.

    • No improvement observed.
  5. Tested headless service mode by disabling:

    • display
    • audio
    • power manager
    • battery
    • screen services bm still failed.
  6. Modified foundation.cfg to run only Bundle Manager through sa_main.

  7. Updated foundation.cfg further using RPI v4.1 reference configuration.

  8. Enabled kernel configs:

    • CONFIG_ASHMEM=y
    • CONFIG_ACCESS_TOKENID=y
    • CONFIG_STAGING=y bm issue still not resolved on OpenHarmony 4.0.
  9. Disabling the above kernel configs on RPI OpenHarmony 4.1 caused:

    • kernel panic
    • failure of all services during boot

Note: To resolve bm, Please suggest us with respective openharmony v4.0.10.13 sources.

As of now, we suspect follwoing area might have some issue.

  • required dependencies for bm in OpenHarmony 4.0.10.13
  • foundation service requirements for bm
  • missing service/kernel configuration differences between OH 4.0 and 4.1

Thanks in advance.