I have an apk file.
Now i need to fetch package-name as well as launcher activity from apk so that i can install apk and launch app from my test cases.
You can take a look at link
There are multiple ways in which we can obtain the package name of Android .apk file.
Here are the some quick ways to get the package name.
Step 1 : If its public app and available in https://play.google.com/store/apps , then search the app name and click on that particular app. you will get the package name as shown in below screenshot.
Step 2 : Install the app on your device and run the below command to get the list of packages and search for your app.
*(Make sure ADB configured in your path variable, click here to know how to configure adb)
-> adb shell pm list packages
Now the Step 3, where you can get the package name as well as launcher activity name - link
Step 3 : using the aapt command.
To get the aapt.exe , you have to navigate to android sdk folder then build-tools and goto some api version . for example(specific to my machine)
E:\Android\adt\sdk\build-tools\android-4.4W
open command prompt and run the below command
- aapt dump badging
for example : Let's take whatsapp application
- aapt dump badging E:\com.whatsapp.apk
output :
You can get the package name and launchable-activity with other details as highlighted in below :
Android Aapt provides this feature. Use below commands
a)package :
D:\Android\sdk\build-tools\23.0.2>aapt d badging Apk-path\apk-name.apk |grep package
b)launchable-activity:
aapt d badging Apk-path\apk-name.apk |grep launchable-activity
You can also use the following steps:
Connect device to your computer
Open any IDE Android studio or eclipse
Look at the logs of the device
Filter the logs by using your app name
open the app on your device and you would be able to see package name and launcher activity in the logs.
Related
I am not used to work with kony platform and I have created simple app but I want to export it and run it as native iOS .xcocdeproj.
Kony Visualizer gives you different ways of building and viewing your app, depending on your needs. In Kony Visualizer Enterprise, you can build your app either from the Product menu, or from a command line. And you can view your built app either by previewing it on a mobile device, or by using device emulators and simulators that you configure. Please refer to this docs link to build for iOS using Kony Visualizer.
Please do this below steps.
once Kar file was build. go to your visualizer installation folder and go to plugins and then you can find com.kony.ios_8.2.28.v201811051627.jar file if you are using 8.2.28 version just for example.
Copy above file and rename it as zip file and unzip it.
once unzip was done inside you can find another zip file please unzip. ( ex: 8.2.28.zip)
you can see folder called VMAppWithKonylib.
now go open command-line tool and go to VMAppWithKonylib location.
now go to gen folder location inside your commandline. gen folder will inside VMAppWithKonylib.
7.now run this command - perl extract.pl konyappiphone.KAR
once extract done now go to VMAppWithKonylib and open project in xcode.
let me know if you are facing any more issues.
I have just updated my AIR SDK from version 23 to 25.
When running the command mxmlc, the following error occurs:
Error: Unable to access jarfile /../lib/mxmlc-cli.jar
Solution 1:
Make sure you have downloaded the Flex SDK and not the AIR SDK.
In the download page, there's link specifying:
Flex users will need to download the original AIR SDK without the new compiler.
Solution 2:
When the Adobe AIR SDK is installed it is sometimes installing files with wrong permissions.
The mxmlc-cli.jar file your lib directory probably has a permissions issue.
Try giving this file full permission and making sure it's not read only and everything should work fine.
If you are using Windows, just right click the files and set up the proper permissions in the security tab, and make sure the file is not read only.
If you are using Unix / Linux, run the following:
$ su -
# cd [AIRSDK install directory]
# chmod -R go+rx *
If you are using Mac OS:
Click the mxmlc-cli.jar file or to select it.
From the File menu, select Get Info. One of the windows shown below
appears. Click the disclosure triangle next to Sharing & Permissions
to display the file's permissions.
Click the lock and authenticate with an administrator account. Use
the menus next to users and groups to change the permissions.
This is an old one, but I've faced this problem several times and the fix is really minor.
You have to edit mxmlc or compile.
In the file there is a row which should be changed to:
SCRIPT_HOME=`dirname "$0"`
The error comes from missing " " around the $0.
I am trying to simulate a project with ionic using the command ionic emulate ios. I have installed xcode last version on mac Sierra. But no work. this is the error:
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-SE, 10.2 simulator
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown
Error: ENOENT: no such file or directory, stat '/var/root/Library/Logs/CoreSimulator/4A052961-F773-4156-9D6C-76F137CC761B/system.log'
I found this solution(https://forums.developer.apple.com/thread/66665) but no work for me.
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
Open a Project within Xcode
Cordova for iOS projects can be opened in Xcode. This can be useful if you wish to use Xcode built in debugging/profiling tools or if you are developing iOS plugins. Please note that when opening your project in Xcode, it is recommended that you do NOT edit your code in the IDE. This will edit the code in the platforms folder of your project (not www), and changes are liable to be overwritten. Instead, edit the www folder and copy over your changes by running cordova build.
Plugin developers wishing to edit their native code in the IDE should use the --link flag when adding their plugin to the project via cordova plugin add. This will link the files so that changes to the plugin files in the platforms folder are reflected in your plugin's source folder (and vice versa).
Once the ios platform is added to your project and built using cordova build, you can open it from within Xcode. Double-click to open the ${PROJECT_NAME}/platforms/ios/${PROJECT_NAME}.xcodeproj file. The screen should look like this:
https://cordova.apache.org/static/img/guide/platforms/ios/helloworld_project.png
Then follow the instructions to deploy to a simulator:
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#deploying-to-simulator
You will be able to see errors more clearly.
In my case it was the problem of an unmatched resource file. I simply deleted it.
After this, I tried:
sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config
in terminal and was able to run the app in a simulator
I'm building an app with Cordova (Phonegap) and installed the Framework and build my project (for iOS and Android) with the command line tool.
When I want to open the newly created project with Xcode, I get plenty (like 9-10) of notifications that my project is locked and can't be changed. How (and why should I) can I change the rights for the project with the command line tool or something similar, because I'm also unable to archive my project because of that problem.
You need to change the owner of the project path to your user.
Example:
My user: dawson
My project path: /work/some_project
Run this:
sudo chown -R dawson /work/some_project
I imported the PaneManagerDemo sample project in my BB Eclipse workspace, and right-clicked on the project > Load Project(s) on Device. I get a Pane Manager Demo icon on my home screen - OK. It doesn't run, because I'm using a Curve 8330 (OS 4.5.0.138), and some of the classes used in the demo are not supported. How do I delete it from my handheld?
When I run:
javaloader dir
I see:
PaneManagerDemo 0.9 12232 Fri Apr 29 02:57:24 2011
The following commands:
javaloader info PaneManagerDemo
javaloader info PaneManagerDemo.cod
javaloader info PaneManagerDemo.jar
javaloader info PaneManagerDemo.jad
All produce the same output:
Name Version Size Created
--------------------------------------------- --------------- -------- ------------------------
PaneManagerDemo.jar unable to open file
--------------------------------------------- --------------- -------- ------------------------
The Pane Manager Demo app does not appear in my list of installed applications under Options > Advanced Options > Applications.
What can I do to get rid of the install of this demo and the associated home screen shortcut?
Have you tried using javaloader erase option e.g.
javaloader -usb erase -f [moduleName]
where [moduleName] is the name of the module (no extension) you want to delete from the list of installed Modules located at:
Options > Advanced Options > Applications > 'Modules' menu itemorOptions > Device > Application Management > 'Modules' menu item
Run "clean.bat" from the root simulator's installation directory. It will have effect of reinstalling the simulator from zero.
Arhimed's answer is great and will work. This can also be accomplished from within Eclipse: In Debug Configurations, select your simulator debug configuration, then go to the Memory tab and select "Reset the file system on startup" and "Reset NVRAM on startup." Then, next time you debug, the device will be wiped before re-installing your app(s) and debugging.
If you don't want to clean the device every single time you debug, make sure to go back into your Debug Configurations and clear those two checkboxes once you are happy with the state of the simulator.