For example, I want to start Gmail in code/command line, but I don't know its main activity name.
am start -n com.google.android.gm/.XXXXX
It's available through decompiling the apk, but it's difficult.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…