Start Android debugging using Android Debug Bridge (adb).


          This post is about how to use android debug bridge (adb) to debug or access android device. The adb is a toolkit included in the Android SDK package. It consists of both client and server-side programs that communicate with one another. The adb is typically accessed through the command-line interface. The adb is also a versatile tool that lets you communicate with an emulator instance or connected Android-powered device.

          Basic functions we can perform using the adb are:

  1. adb push/pull  (to copy data from or to android device)
  2. adb backup/restore (to take backup or restore)
  3. adb logcat (show live log of all processes running on device)
  4. adb shell (used for package manager, activity manager)
          To use this you need Android SDK package that can be downloaded from Here. You can find the adb tool in <sdk>/platform-tools/. Go to folder in which adb package is available and enter command
               "chmod +x adb"

NOTE: if you are using Linux then type './' before every command(if PATH is not set).

Connected using USB cable:

               "adb kill-server"

               "adb start-server"

               "adb devices"

          You will find serial number of device as connected by given commands. Now you are ready to perform following task.

ADB functions:


1)   adb push/pull
  • Copy file from computer to device:
               "adb push README.rst /mnt/sdcard"
  • Copy file from device to computer:
               "adb pull /mnt/sdcard/README.rst /tmp"
  • Copy folder from computer to device
               "adb push data /mnt/sdcard/data"
  • Copy folder from device to computer
               "adb pull /mnt/sdcard/data /tmp/data"

2)   adb backup/restore
  • Take backup:
               "adb backup -all -f /tmp/backup.ab"
               Now unlock your android device, and select "Backup up my data". You can optionally set a
               password too. This process doesn't has progress bar.
backup
  • Restore from previous backup:
               "adb restore /tmp/backup.ab"
               This will again ask for confirmation on android side, select "Restore my data" to start restore
               process. This process also doesn't has progress bar.

3)   adb logcat:

  • This will simply show live log of all processes running on device.
               "adb logcat -d"

4) adb shell:
  • This is to execute any shell command inside android environment. General syntax is
               "adb shell <command>"

  • package manager (pm)
               (pm) tool perform actions and queries on application packages installed on the device. Syntax to
               use
               "adb shell pm <command>"

               To retrieve package list of installed application
               "adb shell pm list packages"

               To uninstall package
               "adb shell pm uninstall com.example.my_app"

               To set install location for apk's, internal or external sdcard
               "adb shell pm set-install-location <code>"
                              0 : Auto—Let system decide the best location
                              1 : internal device storage
                              2 : external media

               To get current install location
               "adb shell pm get-install-location"

  • activity manager (am)

               Within an adb shell, one can issue commands with the activity manager (am) tool to perform
               various system actions, such as start an activity, force-stop a process etc.

               "adb shell am start -a android.intent.action.VIEW"
               This will open "Complete action using" menu.



               kill all background apps

               "adb shell am kill-all"



Hope this information will help you.
I would really appreciate your feedback, suggestions, requests and ideas.

Thank You.



How to use Ubuntu Desktop easily?


          This post is about how easily and efficiently we can work with Ubuntu operating system. Using Ubuntu is much much easier then normally people afraid of Linux environment. It is as easy as you are using windows environment. Every task you performs on windows environment that also can be performed using Ubuntu. There are many software available for Ubuntu to work comfortably as you work on windows operating system.

          You can take tour of using Ubuntu online 'Start tour'.


          Ubuntu is an operating system based on Linux kernel and the Linux distribution Debian. It is open source so no need to purchase license copy and most of software are also available freely. It also helps to stop piracy of software and lead towards new invention. List of few software available on Ubuntu vs Windows is shown below.


   Task to be performed        Available Software on different environment    
Windows Ubuntu
Text editor notepad, notepad++ gedit, vi-editor
Documentation MS-Word (purchase) LibreOffice Writer
Presentation MS-Power point (purchase) LibreOffice Impress
Spreadsheet MS-Excel (purchase) LibreOffice Calc
Image Editor Paint GIMP Editor
CD burner Nero (purchase) Brasero Disk Burner
Audio video player VLC VLC
Internet Browser Chrome, Firefox ... Chrome, Firefox(default)...
PDF reader Adobe Reader Document Viewer(default),
Adobe Reader
Resource Monitor Task Manager System Monitor
Anti virus Quick Heal, Norton (purchase) Not required


          Some of the software like Android-SDK will work more faster in Ubuntu. There are so many software available you can search and install it using 'Ubuntu Software Center'.



          As you search application and features in computer on windows OS by pressing 'Windows Button' or 'Super Button' similar thing is available by pressing same button. This is called 'Dashboard'. Just type what you want in computer and get as shown in image.

Dashboard of Ubuntu


Useful shortcuts and commands:

  • Open terminal by pressing    "Alt+Ctrl+T"  
  • Lock Screen by pressing    "Alt+Ctrl+L"
  • Minimize all tabs pressing "Ctrl+Super+D"
  • All shortcuts you can get by holding "Windows" or "Super" key
  • To update Ubuntu enter two commands in terminal
               1)  "sudo apt-get update" to get update software list
               2)  "sudo apt-get upgrade" to update software(s) i.e. apply updates
  • To install 'rar' file type enter command in terminal. It will added to "Archive Manager" application.
                    "sudo apt-get install rar"





Hope this information will help you.
I would really appreciate your feedback, suggestions, requests and ideas.

Thank You.




How to install Ubuntu alongside Windows 7 (safe dual boot)?


       In this post I will show you how to install Ubuntu without creating partition, deleting data and all this complex job. If you install this way then you can also easily remove (uninstall) without affecting windows OS and it's data.

       I will show this method by installing Ubuntu 12.04 LTS and this can be done also to (dual boot with windows 7) install Ubuntu 14.04 LTS. I am using wubi.exe which is inside image file of ubuntu 12.04 LTS. Follow the below steps to dual boot your computer safely. This may work on windows 8 Legacy mode.

This is also known as SAFE DUAL BOOT.

Install:

1.   Download image (*.ISO) of Ubuntu from it's official site. You can also directly
      download it from here. Then copy it in a drive in which you wanna to install
      ubuntu and also to C: drive.

2.   Open ubuntu-12.04-desktop-i386.iso with WinRAR software. Double click on wubi.exe
          you will see this window.
ubuntuRAR

3.   Select a drive in which you wanna to install Ubuntu. You can install it in
      C: drive that will not cause any problem.
wubi.exe window


4.   Do these steps in above window of wubi.exe
  • Select size from drop down list (minimum 10 GB recommended).
  • Enter user name
  • Enter password and re-type it.
  • Now click on install
5.   This will show two options one is Reboot now and other is Reboot manually
     later. Click to reboot now to install now and restart your computer.
reboot


6.   Now your computer restarts and installation will start. After installation it
      will again restart and display Windows Boot Manager. Select Ubuntu from that
      to start with Ubuntu.Now your job is done further process will done
      automatically.
      

Uninstall:

1.   Open Programs and Features in Windows from "Control Panel" > "Programs and
          Features". You will see Ubuntu as installed program.
Programs and Features

2.   By double click on Ubuntu a window will pop up for conformation of
     uninstall Ubuntu. Click on Uninstall and in a few second OS will be removed from
     your computer. 
Uninstall




Hope this information will help you.
I would really appreciate your feedback, suggestions, requests and ideas.

Thank You.