我使用Galaxy Note 3在ADB中丢弃并记录了一些内容.Logcat给了我以下行:
#party pause( 870): onReceive android.intent.action.ACTIVITY_STATE/th.in.siamgame.ggplay.mwcasia/resume另一个dumpfile告诉我包名是:
th.in.siamgame.ggplay.mwcasia我尝试了一些ADB Start命令的变体。
adb shell am start -n th.in.siamgame.ggplay.mwcasia/th.in.siamgame.ggplay.mwcasia.resume adb shell am start -n th.in.siamgame.ggplay.mwcasia/.resume在这两个命令上也有
-a android.intent.action.ACTIVITY_STATE我希望你们能帮助我通过亚行启动该应用程序。
I dumped and logged a few things in ADB with my Galaxy Note 3. Logcat gave me following line:
#party pause( 870): onReceive android.intent.action.ACTIVITY_STATE/th.in.siamgame.ggplay.mwcasia/resumeAnd another dumpfile told me that the package name is :
th.in.siamgame.ggplay.mwcasiaI tried a few variations of my ADB Start command.
adb shell am start -n th.in.siamgame.ggplay.mwcasia/th.in.siamgame.ggplay.mwcasia.resume adb shell am start -n th.in.siamgame.ggplay.mwcasia/.resumeOn both of those commands also with
-a android.intent.action.ACTIVITY_STATEI hope you guys can help me with starting that app via ADB.
最满意答案
该命令的正确语法是:
adb shell am start -n package/.activity例如:
adb shell am start -n com.example/.ActivityName似乎resume不是活动的名称。 您可以在AndroidManifest.xml找到主要活动名称(如果您有源代码)。 它是具有intent过滤器属性的那个:
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />如果你没有源代码,但有apk文件,你仍然可以使用aapt工具找到它。 aapt位于<android-sdk-path>/build-tools/<version>/aapt 。 用命令aapt l -a filename.apk启动它,你会得到如下输出:
N: android=http://schemas.android.com/apk/res/android E: manifest (line=2) A: android:versionCode(0x0101021b)=(type 0x10)0xc A: android:versionName(0x0101021c)="1.0.1" (Raw: "1.0.1") A: package="com.example" (Raw: "com.example") E: application (line=8) A: android:theme(0x01010000)=@0x7f0d0022 A: android:label(0x01010001)=@0x7f0b0000 A: android:icon(0x01010002)=@0x7f020002 A: android:name(0x01010003)="AppName" (Raw: "AppName") A: android:debuggable(0x0101000f)=(type 0x12)0x0 E: activity (line=15) A: android:label(0x01010001)=@0x7f0b0000 A: android:name(0x01010003)=".MainActivity" (Raw: ".MainActivity") A: android:launchMode(0x0101001d)=(type 0x10)0x2 A: android:configChanges(0x0101001f)=(type 0x11)0xb0 E: intent-filter (line=21) E: action (line=22) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") E: category (line=25) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") ... etc ...而且你需要"android.intent.action.MAIN"和"android.intent.category.LAUNCHER" 。 在示例中是.MainActivity 。
Proper syntax of the command is:
adb shell am start -n package/.activityFor example:
adb shell am start -n com.example/.ActivityNameIt seems resume isn't the name of activity. You can find main activity name in the AndroidManifest.xml (if you have source code of course). It's the one with the attributes in intent filter:
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />If you don't have source code, but have apk file, you still can find it with the aapt tool. aapt located in the <android-sdk-path>/build-tools/<version>/aapt. Start it with command aapt l -a filename.apk and you will get output like this:
N: android=http://schemas.android.com/apk/res/android E: manifest (line=2) A: android:versionCode(0x0101021b)=(type 0x10)0xc A: android:versionName(0x0101021c)="1.0.1" (Raw: "1.0.1") A: package="com.example" (Raw: "com.example") E: application (line=8) A: android:theme(0x01010000)=@0x7f0d0022 A: android:label(0x01010001)=@0x7f0b0000 A: android:icon(0x01010002)=@0x7f020002 A: android:name(0x01010003)="AppName" (Raw: "AppName") A: android:debuggable(0x0101000f)=(type 0x12)0x0 E: activity (line=15) A: android:label(0x01010001)=@0x7f0b0000 A: android:name(0x01010003)=".MainActivity" (Raw: ".MainActivity") A: android:launchMode(0x0101001d)=(type 0x10)0x2 A: android:configChanges(0x0101001f)=(type 0x11)0xb0 E: intent-filter (line=21) E: action (line=22) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") E: category (line=25) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") ... etc ...And again you need "android.intent.action.MAIN" and "android.intent.category.LAUNCHER". It is .MainActivity in the example.
更多推荐
ADB,mwcasia,ggplay,siamgame,电脑培训,计算机培训,IT培训"/> <meta name="d
发布评论