DEV Community

HarmonyOS
HarmonyOS

Posted on

RAM and disk space info with HDC command

Read the original article:RAM and disk space info with HDC command

Question

How can a user obtain RAM and disk space information from a Huawei Smartwatch using HDC commands?

Short Answer

By enabling Developer Options and HDC debugging on the smartwatch, then connecting it to a computer via HDC, users can run commands such as hdc shell cat /proc/meminfo to check RAM and hdc shell df -h to check storage usage.

Applicable Scenarios

  • Enable Developer Options on the Smartwatch
    1. Access Settings: On your Huawei smartwatch, swipe down to access the quick settings menu and tap on the Settings icon.
    2. About: Scroll down and tap on About.
    3. Software Information: Tap on Software Information.
    4. Build Number: Continuously tap on the Build Number until you see a message indicating that developer mode has been enabled.
  • Ensure hdc tool installed in your computer
  • Connect the Smartwatch to the Computer

    1. Enable HDC Debugging in the developer options on your wearable watch.
    2. Activate Debug via Wi-Fi in the developer options. Make a note of the IP address written here.
    3. Type the following command to connect to your smartwatch from the hdc console on your computer:hdc tconn <ip adress>
    4. Confirm the confirmation warning about trusting your computer that appears on your smartwatch. kbs--ddf47c98422f46dfb076cd165cb1be14-369f.png
    5. If you see “Connect OK”, the connection is successful.
  • Retrieve RAM Information
    To view the device's RAM information, execute:
    hdc shell cat /proc/meminfo
    cke_4306.png

  • Retrieve Storage Information
    To check the storage usage, execute:
    hdc shell df -h
    cke_5471.png

Written by Mucahid Kincir

Top comments (0)