How to find Package Name And Launcher Activity Name from android APK file for Appium in Ubuntu

Android aapt stands for Android Asset Packaging Tool. This tool is part of the SDK (and build system) and allows you to view, create, and update Zip-compatible archives (zip, jar, apk). It can also compile resources into binary assets.
Android Asset Packaging Tool installation:
Open terminal (Ctrl+Alt+T) and run the below command to install aapt
sudo apt-get install aapt

aapt is a generic Android asset package tool that be used as:
"aapt list" - Listing contents of a ZIP, JAR or APK file.
"aapt dump" - Dumping specific information from an APK file.
"aapt package" - Packaging Android resources.
"aapt remove" - Removing files from a ZIP, JAR or APK file.
"aapt add" - Adding files to a ZIP, JAR or APK file.
"aapt crunch" - Crunching PNG files.
Please go to below url and follow mention steps to download an android apk file from Google Play Store
https://hiromia.blogspot.com/2017/02/how-to-download-android-apk-file-from.html

Find Package Name And Launcher Activity Name from android APK file:
Command: aapt dump badging <path-to-apk>
Example Command: aapt dump badging /home/jannat/Downloads/com.andatsoft.myapk.fwa.apk
OR
Find Package Name:
Command: aapt dump badging <path-to-apk> | grep package:\ name
Example Command: aapt dump badging /home/jannat/Downloads/com.andatsoft.myapk.fwa.apk | grep package:\ name
Find Launcher Activity Name:
Command: aapt dump badging <path-to-apk> | grep launchable-activity:\ name
Example Command: aapt dump badging /home/jannat/Downloads/com.andatsoft.myapk.fwa.apk | grep launchable-activity:\ name

2 comments:

  1. while installing aapt using sudo apt-get install aapt
    command, I am getting following error: Unable to locate package aapt.
    Can you help me in resolving this

    ReplyDelete
    Replies
    1. http://askubuntu.com/questions/378558/unable-to-locate-package-while-trying-to-install-packages-with-apt

      Delete