问题
I am involved in reverse engineering android apps (using apktool and androguard). I wish to find out all the packages included in an apk. The package may include the main application code, ad library (such as ad sense, inmobi, mobclix etc.), social SDK (such as facebook, Google etc.), Analytics (flurry, Google analytics etc.) or any other support lib. Please let me know if there is any tool/ anyway to do this. If tools are not currently available, I intend to develop one, please help me by advising on this.
EDIT: I have used dex2jar, ded and dare decompilers. All of these will produce the folder structure, but, they wont give information regarding pkg names (or pkg types like ad lib, social sdk etc.). I am analysing more than 300 apps, so, I can not parse the folder structure to navigate and find all packages. Hence, I wish to hear about an automated mechanism (if not available, tips/ ideas to develop one)
回答1:
You can extract your apk to see whats inside it ,by just renaming it to "apkname.zip".After renaming you can extract it like normal zip files.I guess this is what you wana see.Replace ".apk" with ".zip".Then extract it like normal zip.Then you will get "classe.dex",you can convert this into "classes-dex2jar" using dex2jar converter.And,after this using jui compiler you can view all the classes and packages.
回答2:
The best way to do this will be to do reversing using dex2jar and jd-gui.
Run
./d2j-dex2jar.sh yourapk.apk
which will result in aclasses_dex2jar.jar
file.Open the JAR file, in any Java file viewer. One of the most popular one is JD-GUI.
Both the tools are free. Once you open the jar file in JD-GUI you'll be able to see all the packages it uses, such as admob, analytics and so on.
回答3:
I wish to find out all the packages included in an apk. ... Please let me know if there is any tool/ anyway to do this.
I managed to find a tool called dexter, that offered this exact feature. Also they present a package dependency graph.
来源:https://stackoverflow.com/questions/18717248/how-to-find-all-the-packages-included-in-an-apk