目录

How do I start a UIAbility using the hdc command?

Run the following command to start the specified UIAbility:

hdc shell aa start -a <UIAbility Name> -b <Bundle Name>

If the ability is started, "start ability successfully." is returned; otherwise, the error message "error: failed to start ability." and the corresponding error information are returned.

Refer to the sample code below.

hdc shell aa start -a EntryAbility -b com.example.myapplication

Reference

Ability Assistant