Sunday, August 19, 2012

nexus7 android development

nexus7 android development 

I had problems with nexus7 and i don't found any useful article in the web. Hence thought of writing this blog for Android brothers and sister.

Here you go, if you are planning to deploy your applications in nexus7 for testing in Windows. The following is the process.

Setup the Nexus7 Settings

1. Unlock the main screen

2. Click on the View APPS Menu as highlighted below

3. Click on the settings in the APPS menu page (See the highlighted settings)



4. Click on the Device - Storage as highlighted below


5. Click on the view more options in the storage as highlighted in yellow below


6. Click on the USB Computer connection

7. Select the option Camera(PTP) option.
Your android device can be deducted only if this mode is selected.

Don't choose the option Media device (MTP) which is highly supported in Mac OS.


Enable Developer Option Settings

1. Unlock the main screen



2. Click on the View APPS Menu as highlighted below



3. Click on the settings in the APPS menu page (See the highlighted settings)



4. Select Developer Options


Note: If you are using Android 4.2.2 and not able to find Developer Options please check this link for more details http://zacktutorials.blogspot.ca/2013/03/enabling-developer-options-in-android.html

5. Select the following options


  1. Stay awake
  2. USB debugging
  3. Allow mock locations


Where is your USB driver for windows located

<Your Android SDK location>\extras\google\usb_driver

Ex: In my PC it is stored in the location below
C:\STRP\android-sdk-windows\extras\google\usb_driver


What to do if my extra usb_driver is not available 

In Eclipse open the Android SDK Manager  and check the Extras --> Google USB Driver.

Install the package and check in <Your Android SDK location>\extras\google\usb_driver






Windows7 USB Driver installation for nexus7

1. Device driver software was not successfully installed message will be seen as below,


2. Click Start -- Control Panel

3. Search for Device Manager


4. Check the Other devices and Nexus where it is missing driver
5.  Right Click Nexus and select Update Driver Software 


6. Click Browse my computer for driver software option



7.  Select the android driver location 

<Your Android SDK location>\extras\google\usb_driver

Ex: In my PC it is stored in the location below 
C:\Data\android-sdk-windows\extras\google\usb_driver


8. Check always trust software from "Google Inc". and Click Install


9. Your Android device is installed and message will be displayed as below,


10.  Use this option

adb kill-server
adb start-server
adb devices


Note: In case you get error 'adb' is not recognized as an internal or external command,
operable program or batch file. Please read the link http://zacktutorials.blogspot.ca/2013/04/adb-is-not-recognized-as-internal-or.html

11.  Make sure adb devices lists your device and your device is connected to USB




WindowsXP USB Driver installation for nexus7

1.  When you connect the nexus7 device the following screen will be prompted

2.  Select the option Yes, this time only and Click Next>

3.  Select the option Install from a list or specific location (Advanced)

4.  Select the Location and Click Next >


<Your Android SDK location>\extras\google\usb_driver

Ex: In my PC it is stored in the location below
C:\Data\android-sdk-windows\extras\google\usb_driver



5.  Wait for the ADB Interface driver is completely installed


6.  On Successfully Installation, you will see the screen below, 


7.  Open Command prompt and execute the adb commands as below 


adb kill-server
adb start-server
adb devices




8. If your driver is not installed. Go to Start --> My Computer --> Properties


9. Hardware --> Device Manager


10. Other --> Nexus --> Update Driver





Follow all the steps, for driver for Samsung Galaxy Nexus just download the driver below,


In case of any problem with you can download the driver directly from the link below,







52 comments:

  1. I too couldn't get my IDE to recognize the Nexus 7 and it was driving me nuts trying to figure out why.

    Good stuff, Zack, and thanks again.

    ReplyDelete
    Replies
    1. You are welcome. I will add more problems and solutions. Thanks for commenting.

      Delete
  2. Beautiful stuff! That resolved easily half-a-dozen problems in my setup. Many thanks!

    ReplyDelete
  3. Thanks. I forgot how to do this since I set up the last machine...

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Just my 0,02$:

    When I tried to sideload an update.zip on Win7 64bit with "adb sideload update.zip" (after entering recovery mode, of course) it said that the device wasn't found, and I had to install the USB driver AGAIN WHILE the N7 was waiting for me in recovery mode to sideload.

    ReplyDelete
  6. thankyou for such a detailed step-by-step instructions!

    ReplyDelete
  7. Thanks for a great guide. Most others I have seen talk about downloading drivers for phones etc. This has really helped.

    ReplyDelete
  8. My Nexus 7 does not have developers option in setting menu. Do I need to root it or what?

    thanks
    m

    ReplyDelete
    Replies
    1. Hi Wonglik,

      No need to root it. What is the version of Android you have in your nexus7 ? Is it Jelly Bean 4.0 or 4.0.1 or something else ?

      Delete
    2. This comment has been removed by the author.

      Delete
    3. Wonglik, I had the same issue. It's due to Android 4.2 hididng Dev options, read here how to fix it:

      http://howto.cnet.com/8301-11310_39-57549207-285/restore-the-developer-options-menu-in-android-4.2/

      Delete
  9. Thank you so much for the detailed information. There are so many places where things can go wrong - the screen shots are incredibly valuable. Great job!

    ReplyDelete
  10. Hi,
    You shared great informations but it doesn't help me connecting to my PC.I am trying to connect N7 to PC unfortunatly no luck since the beginning. I have never get any respond from PC when I plug in to the USB slot. I'm using Jelly Bean 4.2.1. updated yesterday. I'm using Windows7 64Bit. I have tryed developer options USB debugging, from MTP to PTP but nothing.PC never shows the N7. What is your opinion? My cable works with my SGS2 without problem. N7 even not shows charging when I plug in to the charger.

    ReplyDelete
    Replies
    1. Hi, Ufuk Mercan,

      Are you connecting from your own machine or Company's machine (Employer's machine) sometimes the firewall or USB could be blocked for these devices.

      Please let me know if you have USB enabled and working for other devices in your PC.

      Regards,
      Zack

      Delete
  11. Replies
    1. Thanks a lot sir.... Hope i will find more time to add more articles.

      Delete
  12. Thanks a Lot for this wonderful illustration

    ReplyDelete
  13. Thanks a million, that saved me a lot of time. Keep up the good work

    ReplyDelete
  14. It's an interesting information. Thanks for sharing.


    Android Development

    ReplyDelete
  15. Thank you for sharing this information. The driver not installing was driving me crazy... I had to follow every step you've described (plus enable developer settings in 4.2) to make it work.

    ReplyDelete
  16. Thank you very much! This was very useful for me :)

    ReplyDelete
  17. Thanks a lot, it saved my evening^^

    ReplyDelete
  18. Great many thanks! Works with Windows 8 as well.

    ReplyDelete
  19. I love you man! You saved me a lot of nerves. Great job on this one!

    ReplyDelete
  20. This is fantastic, thank you so much. You have done a brilliant job explaining exactly how to get this going.

    ReplyDelete
  21. Of course I like your web-site, however you need to test the spelling on quite a few of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell you. On the other hand I will certainly come back again!
    Goodcore Software

    ReplyDelete
    Replies
    1. Hi,

      Thanks a lot for your comments, i will improve in the time. However i think lot of people have understood the solution even it had typo.

      Thanks again, hope i will improve in the future posts.

      Regards,
      Zack

      Delete
  22. Fabulous post Zack, thanks so much.

    ReplyDelete
  23. Now my problem is that my device shows as "offline" on the device list

    ReplyDelete
    Replies
    1. Hi cdlink14,

      Please try this,

      adb kill-server

      adb start-server

      adb devices

      Disable and re-enable USB debugging on the phone

      Rebooting the phone if it still doesn't work.

      Please kindly let us know if it works and also if it doesnot work.

      Regards,
      Zack

      Delete
    2. Also perform this

      Settings -> Programs -> Development -> Stay Awake

      Delete
  24. Lots of thanks for this excellent tutorial. You saved many hours of me.

    ReplyDelete
  25. Nice post.Give it up. Thanks for share this article. For more visit:Web App Development

    ReplyDelete
  26. Hi. I'm using Win 7 and I managed to follow all your steps until 10. Use this option

    adb kill-server
    adb start-server
    adb devices

    When I typed in these into command prompt, I get the following:

    'adb' is not recognized as an internal or external command,operable program or batch file.

    ReplyDelete
    Replies
    1. Hi,

      The adb is the path \adt-bundle-windows-x86_64\sdk\platform-tools

      Please add this in the path and it should work. Let me know if you need more details.

      Regards,
      Zack

      Delete
    2. Hi,

      I am having the same problem that @Darren is facing

      ''adb' is not recognized as an internal or external command,operable program or batch file.'

      I tried to work it out on ur specified way and i think i am not executing it properly or there is any other problem.

      Please help me out in this as i am trying to root my Nexus 7 running on 4.2.2.

      I am using One Click Root to root my device and Rescue Root but they are showing ADB Error i have installed drivers but problem still persists.

      Please Help me out with this


      Thanx

      Umair

      Delete
    3. Hi Darren & Umair,

      Please check this link let me know if it helps for you.

      http://zacktutorials.blogspot.ca/2013/04/adb-is-not-recognized-as-internal-or.html

      i have created small tutorial for you both.

      Regards,
      Zack

      Delete
  27. Great tutorial. This tutorial worked for a Nexus 7 on Win64.

    In case people skipped the "official" instructions @ https://developers.google.com/chrome-developer-tools/docs/remote-debugging:

    Note the step about how to enable "Developer" mode on Android 4.2.

    You need to click a label 7 times in a row!

    (For those who remember the Muppet Show, it reminds me of Ernie and Bert' song about trying to pat your head and rub your tummy at the same time!)

    Anyway, thanks for the help Zack. Saved me a lot of time scratching my head (while also rubbing my tummy..).

    Sam.

    ReplyDelete
  28. Just amazing! Your instructions work like a charm. I have read 3 books on android development and frustratingly, nowhere I can find these instructions. I still had the problem of knowing how to enable 'developer option' and had to refer to different site. Just for the sake of making your instuctions complete please get it added (i.e. tap build number 7 times etc.) and then you have a perfect instructions set. THANKS

    -- Sanjay

    ReplyDelete
    Replies
    1. Hi Sanjay,

      Thanks.

      I got enabling developer option in this link.

      http://zacktutorials.blogspot.ca/2013/03/enabling-developer-options-in-android.html

      Regards,
      Zack

      Delete
  29. A few problems have occured since Android 4.2.2.

    "adb" might not be recognized now. So do this - http://zacktutorials.blogspot.ca/2013/04/adb-is-not-recognized-as-internal-or.html

    Now "adb" in cmd should work. It will say "1.0.29" at the top. When you do "adb devices" it will say "offline". This is because 4.2.2 needs some kind of new authentication with the host.

    Open Android SDK Manager from Android\android-sdk (RUN AS ADMINISTRATOR)

    Install any 4.1 packages that say "Update Available". "adb" should say "1.0.31" now.

    (You don't have to install 4.2.2 packages)

    Now you should get a message on your android device (if it's plugged in) asking "Allow USB debugging?" with a fingerprint RSA.

    Allow it.

    Now "adb devices" will say "string device" instead of "string offline".

    Now you can use Unity's Remote app. Just press play in the editor with the Remote app running, with Stay Awake/USB Debugging/Mock Locations and Camera(PTP) on your device.

    Now thank god, then return to not believing in him.

    ReplyDelete
  30. Thanks a lot for posting this post, Your post has always been an informative source for me.
    android training

    ReplyDelete
  31. Thank you for sharing such great information very useful to us.
    Android Training in Noida

    ReplyDelete