简体   繁体   中英

How to launch another application without knowing its class name or package name?

I have two questions.

  1. I have an .apk but I don't know anything about the class name or package name. Is there any possibility to find the class name and the package name?

  2. If I don't get the class name or the package name of the application, will I be able to launch the application from my current application?

No you won't be able to launch it without knowing the class name. You can use APKTool to disassemble the APK file. When you do this, it will show you the android manifest file for that apk. In the manifest XML, you will see declarations of the package name and specific process/activity names you can directly launch/reference. This answer also has references + more specifics on this process + what to look for in the manifest.

You could try to decompile the apk file and then the source code is quite readable. From there you should be able to detect the package and class name of the activity you want to start.

Actually, after installing the application, when i went into data/data folder i found the package name of the installed apk.

I found the class name by extracting the package and reading the manifest file. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM