G33K-TRICKS: android
Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Saturday, March 19, 2016

How to get an "apk" file of installed app in Android phone



Pull Android Apk from phones


Consider this scenario,
You have installed any app on your android phone now all of a sudden you feel, I should have that apk on my PC so whenever I want I can re install it again offline in-case I removed it from my phone.
Just a wild guess for scenario :)
So , this is what you need to do,
to get the APK file from the already installed application.
(Please note that you will need "adb" android utility to perform below steps)

adb shell pm list packages

 From the list of Packages get the name of that package which is similar to the one which
you want to get.
Say, you need Airbnb app to pull out of your phone, type,

 adb shell pm path com.airbnb.android  

To pull the apk from phone

adb pull /data/app/com.aibnb.android-1.apk .

(in the above command the "."(dot) denotes the current directory where adb binary is kept)

Sunday, February 21, 2016

[Solved] Opera Mini "Font Data Calculation"


How to disable "Font Data Calculation" screen on Opera Mini.


Few days back I installed Opera Mini on my Android Mobile and just after launching the app displays an annoying screen "Font Data Calculation" 
What I know is that , this screen comes when your android phone is having some different Fonts and non-stock fonts,

Here is a simple g33ktrick for you.

1. Open Opera Mini app
2. Type "about:config"  and tap on Enter
3. Scroll down to "Use bitmap fonts for Complex scripts" and Select "Yes" option
4. Save the settings.
5. Now, close and Relaunch your Opera Mini without "font data calculation" screen.

Also, above setting can be used to Solve issues when you are not able to see some fonts at some websites.

This g33ktrick would work on Apple and Windows OS phones as well.

Sunday, February 14, 2016

Simple steps to Set / Mock / Change Android phone's Battery Level (No Root Permission Required)


Change Battery Level using command

How to change the Android Battery percentage


Mobile app developers must ensure that their applications function properly in low battery conditions. But how can you test app behavior when you don't have a low battery on hand? 
Sometimes , we need to check the low battery scenario over our Android Phones under certain conditions. Either you can put the low battery into your phone for which you need to have a battery of same phone or you can reduce the battery by keeping the WIFI, GPS, BT to On, keeping the brightness level to 100% and then keeping the camera for recording a video with Flash light in On state. Doing this will easily consume more time and everyone hates it.
In this guide, we'll show you how to simulate low battery conditions on an Android phone using ADB commands.

Steps to follow for mocking the Battery level

So, here is a simple solution to change level as per need.
Install ADB on your PC/Laptop. There are easy tutorial available all over the internet.
From command prompt / terminal type below set of commands.

To find the current battery level
C:\>adb shell dumpsys battery

Next run, 

C:\>adb shell dumpsys battery set usb 0
C:\>adb shell dumpsys battery unplug

OR you can run

C:\>adb shell dumpsys battery set status 3

Above command would set the battery to discharging status even though USB cable is connected to the mobile device.
And then run the below command to set the battery percentage as required.

C:\>adb shell dumpsys battery set level x 

   x indicates the percentage of battery to be set

 For Example,  

C:\>adb shell dumpsys battery set level 55 


To Reset the Battery status back, you can use: 

adb shell dumpsys battery reset

With Above steps will help in mocking the Low Battery scenario, in-case you want to test an android app behaviour with low battery.
If you could not reset the battery, just reboot the mobile phone and battery level would get reset to actual value.