Thursday, 29 October 2015

How to fetch Android system apps (Apk installation files) or playstore installed files from Android device? 


How to fetch the Android apps (Apk files from Android Google playstore)?
1. Search for the app in Google Playstore > Open the app > Check out the URL >
https://play.google.com/store/apps/details?id=<<Package ID of the android app>>.

2. Use http://apps.evozi.com/apk-downloader/ website to download app. or else download this app directly on your device from google play-store.

How to fetch the system/playstore installed  apps which were already installed on Android device?
To run the below commands make sure that You have configured android sdk and correspanding path settings. And also enable usb debugging option on your device from devloper options (Device Settings).

Run the below command to fetch any System app or any installed app on your machine.

1. Command: adb shell pm list packages 










The above command will gives the list of apps bundle id's which are resided on your device. Choose the correspanding bundle ID which you want it.


2. Run the below command to get the path of the apk
Command: adb shell pm path <<bundle id>>

Here the apk path is /system/priv-app/Contacts.apk. by using adb pull command we can fetch the apk file from android phone.

Note: Instead of executing 1 & 2 command you use below command.
Command: Note: adb shell pm list packages -f 

3. Once you got the location of the apk file then use the below command to fetch the apk file.
Command: adb pull <<path>>


Finished!! Now you successfully downloaded the APK file, Go ahead and share the apk file. No need to download every time from playstore and avoid data usage charges!!.


Happy testing!!!







Friday, 6 March 2015

Is you Mobile app data base is encrypted? How to check on Non-Rooted devices?

Typically this feature will be validated on Security related applications like (BYOD Enterprise related applications, Emails...etc).

We always needs a rooted device to check wheather the saved files or the data base is encrypted or not. If you don't have a Rooted android device how you are going to validate this?
It's big challenge to the QA folks who involved in this kind of applications.

Yap!!! It's very easy to validate without having a Rooted device. There are 2 ways to achieve this.
1. Make your app in Debug mode.
2. Take the backup of your device or your application and validate it.



Monday, 27 October 2014

How a temp variable will cause bugs? 

Let say, An app is using a temp variable (let say block app after 10 failed attempts and each attempt is getting saved in a temporary variable).
In this case if the dev uses temp variable for no.of failed attempts.
After 10 failed attempts accessing to that app will be blocked. Here the magic starts...

  • Killing an app: Typically any app when we kill the app (OS will remove the allocated memory of that app so all the temp variables will be wiped out. Hence the last failed attenmpts will be reset to 0. And now launch the app - Where we can able to access the app. 


  • Restarting a device: If we restarts a device also will kill all the apps and allocated memory (Run time memory) as well. So Once after restarting the device where we can able to access the app. 

Tuesday, 30 September 2014

How to pull the Data base files of an app from android device?

Yes, Its possible in android if and only if its a rooted device. 

Requirements:
  • Android SDK should be available in your system.
  • Java should be available. 
  • SQLLite browser app should be available in your system,

Where all the app data resides on android device?
Typically, all android apps data will be resides in a system folder (root/data/data/package name).
For all apps like system bulit in app or installed apps from play store.

How to Pull the database of an application?

Open Tools folder of android sdk(Androidsdk/tools). Open the tools folder where you can find monitor.bat application.
Open the monitor.bat(android device Monitor) application.
Once You opened the app, if you are connected any device to your system, it should be listed under device list. Choose the device.
In this app you can find several tabs. Choose File Explorer. Open data/data/<Your package Id>/expand to see the list of files available under that package.
Refer below screen shot.



Select the folder a file the then choose Pull option from the right upper corner. Save the file into your system. Refer below screen shot.





Friday, 21 March 2014

Few QA tips for Mobile App Testers

Few areas that we need to concentrate while testing on Mobile Apps.
1. UI
2. Functional
3. Performance

1. UI
  • Testing on Different Devices like Tablets, Different devices which has different scale sizes.
  • UI changes based on the device Orientation
  • When app shows alerts at that time it self tries to Change the orientation of the device (most of the time it crashes).
  • Low battery/SMS alerts while working on the application and check if it affect your alerts/popups

2. Functional
  • Notification Testing (Disabling the Google account, without Google account, Changing the Google account password, Disable Google Account sync action).
  • Payloads validation (which refers to the notification to the app from your server). All the notifications should not have the license key or any secure information. It should always be a simple wake up call for that app to initiate a request to the server from your app.
  • Application logs should not contain the apps informations that has pass from your app to the server and vise versa.
  • Field validations
  • Interrupting communication of the app
  • Offline mode app access 
  • Database testing - Database should be encrypted if it is a security based app
  • Rooted device validations
  • Interrupting the app communication with the server by making a call to the device or turning of the wifi or Drop the Data network. Any way try to disturb the data network of the device
  • Auto start of the app (on device reboots). 
  • Check the app communication in different networks (WIFI, Data Network like 2G, 3G). 
  • If the app was developed by third party vendors like Kony/Work Light/Phone Gap then all these apps will be designed by HTML5. Most of the time if the apps are business related then these apps will maintain a session with the server. So the session ID should not visible any where. 
  • Test the App on different Android OS.
  • If your app uses camera then check disable the camera app from the application manger on the OS then check from your app. 
  • If your app uses GPS then check it should not allow Fake GPS kind of apps to fake the gps location. So your app should always fetch the current location of the app. 
  • Upgrading the app from existing app (Where it should upgrade the db of the existing app).
  • If  your app uses SD card storage to write some data then try to test the app without SD card, with a new SD card, SD Card without enough Space. While app using the SD Card pull out the card...etc.
Basic Performance testing:
1. Long run (Run the app for 1 day)
2. Battery usage of the app
3. Data usage by the app
4. Device speed after using the app, it should not lag the existing speed and performance of the app
5. Use different tools like Little eye to measure the performance of the app


Note: Few of the above tips are applicable for Blackberry/android devices only.



Please share your comments and valuable suggestion to make this blog useful for others/freshers.


How to resign the android apk files with your keystore file?

Hi All,

We can able to sign the apps by your own keystore files.
Todo this, make sure you should ready with your keystore file and apk file which you want to sign.

To Generate the Keystore, refer http://suramsridhar.blogspot.in/2014/03/how-to-create-android-debug-keystore.html


1. Change the APK file to zip file. (let say your file name is abc.apk then rename it to abc.zip).
2. Extract the abc.zip folder to abc folder.
3. Open the abc folder and delete the META-INF folder.
4. Now zip the abc folder to abc.zip
5. Rename the new abc.zip file to abc.apk file.
6. Now the APK file is ready to sign by your keystore file.
7. Run the below command to sign the above generated apk file.

jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore yourkeystore.keystore -storepass password abc.apk alias_name

8. After running the above command your abc.apk is ready with your own keystore file.


Note: If you face any problems while executing the above command then check whether your system is configured with Java. And also your system should be configured with all necessary Path variables

How to Create Keystore file and how to extract .cert from keystore?

Hi All,

Here is a simple way that we can create a android keystore file. The below commands are worked on the windows machine. Not sure will that works on Mac or not!!

To create android keystore file, Open the Run command and execute the below command.

keytool -genkey -v -keystore filename.keystore -alias yourname -keyalg RSA -keysize 2048 -validity 1000


Once after hitting the above command, it will ask for the user details and go ahead by entering all the details. Once it finished you are ready to use the Key store file!!!





Note: If you face any problems while executing the above command then check whether your system is configured with Java. And also your system should be configured with all necessary Path variables

How to extract .cer file from Keystore file?
Use the below command to get cer file from keystore file.


keytool -export -keystore <Path to .keystore file> -alias <alias name> -file <filename.cer>