Thursday, 4 December 2014

How to mount Moto-G/Moto-E on Ubuntu


How to mount Moto-G/Moto-E on Ubuntu and Debug through Eclipse

Moto G is an Android smartphone that does not have a microSD slot. So, the storage of the smartphone cannot be extended. If you want to transfer files between your Ubuntu computer and the Moto G, there are 3 possible ways to do that: FTP over wireless, PTP over USB and MTP over USB.

If your Ubuntu computer has wireless, I highly recommend using FTP over wireless. It is convenient (no wires!), offers good transfer speed and the entire /sdcard contents are available for read and write.

If your Ubuntu computer does not have wireless, then your next option is to use a micro-USB-to-USB cable. The choices here are PTP and MTP. You can enable and switch between the two after you connect Moto G to your computer using a USB cable. If you enable PTP, then Moto G is automatically mounted as a partition in Nautilus. However, you will only be able to see the /sdcard/DCIM and /sdcard/Pictures directories. If you are transferring photos, then this option offers good transfer speed.

If your Ubuntu computer does not have wireless and you still want to read and write to the contents of /sdcard then the option left to you is MTP.

There are many solutions offered online to mount the contents of /sdcard using MTP.
Install the MTP packages:
$ sudo apt-get install mtp-tools mtpfs

Connect Moto G using a USB cable to your computer. Make sure MTP is selected, and not PTP.
Find out the vendor ID and product ID of Moto G using mtp-detect.

$ sudo mtp-detect

You need to press Ctrl+C to stop the command. For the Moto G, you can see that the vendor ID is 22b8 and product ID is 2e82.
Open a new file /etc/udev/rules.d/51-android.rules using sudo and add this line:
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666"

Restart the USB service and create a directory to mount the Moto G:
$ sudo service udev restart
$ sudo mkdir /media/motog
$ sudo chmod a+rwx /media/motog
$ sudo adduser your-user-name fuse

Open the /etc/fuse.conf file as sudo and uncomment the line for user_allow_other
Restart your computer. Connect back the Moto G to the computer.
You can now mount the /sdcard of your Moto G using this command:
$ mtpfs -o allow_other /media/motog/

Note that the mounting operation is slow and might take about a minute.

You can find all the directories and files in /sdcard of Moto G in /media/motog. You can read and write to these directories.
To unmount use this command:

$ fusermount -u /media/motog/

Connect Your Device in Debugging Mode!! on UBUNTU(Nook,Moto-E,Moto-G,Samsung)

How to Connect Your Nook,Samsung,Motorola,Micromax Device in Debugging mode through eclipse??


Before Reading this tutorial, You must be sure, you have set-up Environment Variable in Ubuntu(To access android).

When you working on linux, so many person faces the problem: Access your device in debugging mode through eclipse.This is not so difficult after reading this contents:

1. When You trying to access your device as debug mode, first you enable debugging mode inside your phone/tablet.

2. To access debugging mode through eclipse, you must have to create a udev rule for the device.
So How You can find udev:
2a: Open your terminal(ctrl+alt+t).
2b: Then You must logged as root.(sudo -i)
2c: cd /etc -> cd udev
2d: Now list your files(ls)
2e: You can see one directory name as rules.d
2f: Inside this directory, you have to create one file 51-android.rules
    gedit 51-android.rules
   
   

3. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property.
To see all {idVendor} follow http://developer.android.com/tools/device.html#VendorIds

4. How to establish the permissions for Specific Device?
   Inside your console, type: lsusb

 
   

   You can see Device-id for every device.For example in above picture, motorola id :22b8,which is corrently connected in my computer. Only this id I need to add inside 51-android.rules file.
Add the following line to your file about Android devices(Inside->51-android.rules):
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
In this example, the vendor ID is for Motorola-E. The MODE assignment specifies read/write permissions.

   

After adding these line,now execute: chmod a+r /etc/udev/rules.d/51-android.rules

5.Exit from Root as well as terminal.


6. Now execute this inside your terminal:
   adb kill-server
   sudo adb start-server
   adb devices



Wednesday, 3 December 2014

Difference Between HVGA and Display QVGA in Android


Difference Between HVGA and QVGA Display.

All of you probably already know the mean of HVGA and QVGA screen. But may not know what the differentiates the screen display.

QVGA or Quick Video Graphics Adapter, is a screen that has a resolution of 240 x 320 Pixel. While HVGA or Hight Video Graphics Adapter is a screen that has a resolution of 320 x 480 px.

Well,from the size of the resolution HVGA screen size we can see if it is much larger than QVGA. not only that, no matter if HVGA resolution is sharper at HVGA appeal. But besides that, phones with HVGA screens tend to be more wasteful of energy because of the huge resolution.

Differences in screen resolution is also give impact on applications that can run, such as games. there is a different kinds of games for HVGA and QVGA screen. So if you want to install games on android, make sure the games are compatible with its resolution or not.