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

Saturday, September 5, 2015

How to remove an Application (apk) from an Android Phone using command


Simple steps to Remove APK using Command line


Have you ever want to remove an android app from your own android device and that stubborn thing  just don't want to leave your device.
Yeah!!! its simple to Remove right, you can just  go to Settings > Apps and Uninstall

What if you can 
First you need to have and Rooted Phone. If its not rooted, then you are in little deep trouble.

Connect you phone to your PC/Laptop
If your PC  already have phone's drivers, you can see your Phone getting mounted in My Computer

Next you need an adb utility. If you don't have get it from here.

Once connected,
Open CMD prompt and goto the path where you have kept the adb utility.

Now type, adb devices and hit enter
e.g
C:\My Downloads> adb devices

This command will return the serial number of your phone. If it does not return anything in that case, you need to enable the USB Debugging from the "Developer Settings" .
[ And again, if you dont have Developer option not available in your Settings, goto Settings > About Phone> tap 5/7 times on "Build Number" and it will be available under Settings ] 

After getting assured that the phone is connected via adb.
type , adb root

C:\My Downloads> adb root

On rooted phone, an pop up will appear asking for root permission. It depends on which app you have used to permit ownership as "Super User".
Grant the permission from the phone.

Now type, adb shell

This will take you to the android shell (which is ofcourse linux based, and if you have busybox binary installed in your phone , you can do much more with this tool)

Now from the shell prompt type, cd /data/app
This will take you to user apps folder.
the path would look like,















Screen-shot  (In my case, I went to adb shell first and then ran "su" command to get the root permission.)

Now type,
root@xyz: ls | grep -i "<appname_to_remove>"

Say, the app name is "whatsapp"

root@xyz: ls | grep -i "whatsapp"

This will result in getting, the list of app(s) with the app you want to remove.
If you have given a proper apk name. The ls command will list it.

Then just remove that app, thats all

 root@xyz: rm com.<appname_to_remove>.apk


Remove apk usng command line









You have to remove only the app which is shown in the list after ls | grep -i <> and please make sure the app name which you are removing is correct. Coz, once gone is gone when you remove it using rm command.

After this, just reboot the phone using Power key or type, adb reboot




Search Queries:
How to remove app using command
app not getting removed from android phone

Monday, June 30, 2014

How to Bypass Android Unlock Pattern / Password / Face / PI on Android Phones


Android Unlock Pattern

How to Bypass Unlock Pattern / Password / Face/ PI on Android Phones



Forgetting things is Human Tendency!!! So as to say, To Err is human.
The most difficult thing that you would have to remember is Passwords and adding to all these we have so called "Patterns" in our Android Mobiles.
#Android Many a times we do change that Unlock Pattern  to secure our mobile and there are chances we may forget it as well.
So, what to do, when you forget your Unlock Pattern of your Android Mobile.


Here it goes, one more simple g33k-trick to help you out.
1. First and foremost thing you need is a utility called "adb" (android debug bridge). For more details about Android Adb and how to do its setup click here. (if you have any questions on setup, post it in comments, I will be glad to answer them as well :) )

Android Unlock Pattern2. Once Adb is set, open a command prompt and make sure you run command prompt as "Admin" mode.
Press Windows key 
type cmd
Right click on cmd application
Click on "Run as administrator"



To confirm devices is detected on your pc, type  in cmd prompt:
adb devices
This will give you  a device ID connected to your PC. If its listed move ahead with below steps. 
If no device is shown, Check whether you have enabled "USB Debugging" option from the "Developers Option".

3. Type the below lines as it is one by one and  press enter after every line.

METHOD 1:

adb shell 
cd /data/system/
rm gesture.key


METHOD 2:

adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name=’lock_pattern_autolock’;
update system set value=0 where name=’lockscreen.lockedoutpermanently’;
.quit
Android Unlock Pattern






















4. Once finished with above task, Reboot your android device.

5. After reboot, you will notice that the phone wont be asking for any pattern lock to unlock .
And Pattern is asked, just connect any 4 dots and phone will get unlock :)

Now you can set a new Pattern and make sure you remember it this time .

P.S:  For connecting the device to the PC you should be having respective USB drivers installed on your host pc. Without drivers, mobile
will not be recognized 

Wednesday, August 21, 2013

HOW TO's with AT commands


How to check To which COM port MODEM is connected

A: 
Right Click On MY Computer Icon
Select "Manage" option
From the new window, select "Device Manager" 
From here, you can check for the Ports and Modems 
Double clicking , will display the properties

For Windows system you need to have "Hyperterminal" application
Windows 7 , they have removed the application (Don't know why)
but there are many free available Applications like Hyperterminal 
over the internet.

For Linux users, "minicom" is the best
To install, sudo apt-get install minicom



Q: How To Send SMS From Computer Using  AT Commands

A:
1. Plug In Your GSM/GPRS modem
2. Check to which COM port the modem is connected  
3. Start-> Accessories-> Communication-> Hyperterminal
4. Open new connection
5. "Connect using:" the correct COM port, you will see a
windows->change Bits per second to "9600" (for GSM) "115200" (for GPRS) 
6. Type "AT" and press Enter (it'll show "ok")
7. Type "AT+CMGF=1" and press Enter (it'll show "ok". It is to set the GSM / GPRS modem to operate in SMS text mode. )
8. Type " AT+CMGW="+91723456789"" and press Enter (it'll show ">"."+91" is country code, "723456789" is recipient's number) 
9. Start typing SMS. When finished, press Ctrl + Z (it'll show "+CMGW:1", it means the message is 
stored as index:1 in the message storage) 
10. Type "AT+CMSS=1" and press Enter (It'll show something like "+CMSS: 219". "219" is the reference no of the sent message) 
11. If it shows "OK" at the end, it means the message is successfully sent.


Q: How To Receive SMS Using Computer 
A:
1. Plug In Your GSM/GPRS modem
2. Find out which COM Port the modem is connecting 
3. Start-> Accessories-> Communication-> Hyperterminal
4. Open new connection
5. "Connect using:" the correct COM port, you will see a
windows->change Bits per second to "9600" (for GSM) "115200" (for GPRS) 
6. Type "AT" and press Enter (it'll show "ok")
7. Type "AT+CMGF=1" and press Enter (it'll show "ok". It is to set the GSM / GPRS modem to operate in SMS text mode. )
8. Type "AT+CMGL="ALL" " and press Enter (there is message received, it'll show 
" +CMGL: 1,"REC READ", "+651234567",,"01/08/13,11:26:20+12
Hi, Love You !!! " ) 



Q: How To Check SMS Delivery Status Report & Newly Received Message
A:
1. Follow the Step 1 To 6 as  mentioned above 
2. At The Hyper Terminal, Type The Following AT Command

AT+CSMP=49,167,0,0 
OK
AT+CNMI=2,2,0,1,0 
OK
AT+CMGS="Mobile Number" 
> Message content displayed (Ctrl+Z)
+CMGS: 72
OK
+CDS: 6,228,"Mobile Number",129,"08/10/22,10:08:35+32","13/08/22,12:55:38+32",0
+CMT: "Mobile Number",,"13/10/22,12:56:17+32"
testing



Q: How To Change the Baud Rate of the Modem using AT Commands

A: 
To Change Baud Rate from xxxx to yyyyyy
1. Start-> Accessories-> Communication-> Hyperterminal
2. Open new connection
3. "Connect using:" the correct COM port, you will see a
windows->change Bits per second to "xxxx"
4. Type "ATE1" and press Enter (it'll show "ok")
5. Type "AT+IPR=yyyyyy" and press Enter (it'll show "ok")
6. Click on "disconnect" icon
7. Go to Properties and change the Bits per second to "yyyyyy"
8. Type "AT&W" and press Enter (it'll show "ok")
Then it'll be changed to yyyyyy


here : xxxx can be 5600 and  yyyyy : 115200

Saturday, December 29, 2012

How to Save your Mobile Battery


Save your Battery life


You must be worrying about the drainage of your mobile battery and must be thinking..what is wrong with this battery and why it does not last longer.
 I can provide few simple extra tricks or rather Tips to save your mobile battery
 Here they are:
How to Save your Mobile Battery


1. First would be "Switching off your Mobile" ..LOL
 This would definitely save your battery. Dont take this in other way, what I meant is, switch off your mobile when you know that you are not going to make / answer any call or you dont want to use your mobile. When you know you will be in "No network" coverage area, there is no point keeping to mobile phone ON. Your phone will continue to search for network and loose all of its power in searching a Network coverage.


2. Do not Vibrate: 
When someone calls to you, your phone will Ring as well as Vibrate. Here your Phone's Speaker as well as the Phones Vibrating motor will consume the battery together. So to save some battery life, you can turn off the vibration mode of the mobile and if possible keeping the Ring Volume low so that you can listen the ring if someone calls.

3.  Turn off the Bluetooth and Wifi: 
If your phone supports Bluetooth or Wifi or Both, switch them Off. If any of these services are running that will loose huge amount of battery power. There are other features like GPS, Infrared (though Obsolete :) ) should also be turned off to save power.

4. If the mobile phone support Brightness feature, keep it too the lowest possible. Because your screen is also a huge consumer of battery.

5. If you have Screen saver or animated image as a wallpaper, change it some dark colored image. Animated background can also drain your battery faster

6. Remember the Golden Rule: Full Charge and Full Discharge
Dont put your mobile on charging when its having some power enough to last for next few hours (do this when your charger is handy)
And when it is charging let it charge it too full.
NOTE: Avoid full discharging of a lithium-ion battery
Unlike Ni-Cd batteries, lithium-ion batteries' life is shortened when you fully discharge them. Instead, charge them when the battery meter shows one bar left. Lithium-ion batteries, like most rechargeable batteries, have a set number of charges in them.

7. To make your battery last longer, always keep it in cool place.

8. And Remember, do not use faulty Chargers, if the charger is faulty or broken, it may lead to make your battery faulty as well.


You Would Also Like:
Apple Iphone secret key codes