[How to] Gmail and the Android Market

Search This thread

Mistar Muffin

Senior Member
Aug 11, 2009
291
413
THIS METHOD IS NOW OUTDATED.
For everyone that is starting from scratch with a wiped NookColor, I have made a linux script available that will do everything for you. This includes enabling apk installs on the device, live wallpapers, multitouch, etc. It will also download and install YouTube, Gmail, and the Market. It also changes the Market fingerprint to that of a Droid Eris on Verizon so you can see protected apps. It does not require use of the Android Emulator to generate an AndroidId as this is done automatically thanks to clockworx. All it does require is that you be nootered and have working Superuser.

Thread here:

http://xdaforums.com/showthread.php?t=871210


DISCLAIMER:
These steps are what worked for me and some may not even be required. If this guide needs any clarification, post a reply and I will do my best to update it. I'm 99% certain all the steps are here. :D

If you have already tried to get the Market or other Gapps working, etc then it is very likely you will have to do a full factory reset before this will work for you. I have no idea why, but if these steps don't work I would try that first.
In my experience the factory reset is two steps:

8 failed boots restores the /system partition. You can easily trigger this reset without 8 failed boots by running this command from a Linux or Mac OSX command line:
echo -n -e "\008\000\000\000" > /tmp/foo; adb push /tmp/foo /rom/devconf/BootCnt; adb reboot
Afterwards:

Booting while holding power+volumeup+nook button restores /data

I had to do both of these steps in this order to get a full reset on the device.

Required:
nc_gapps.zip
system.img for AVD
Youtube for Eclaire

Optional:
Root Explorer really speeds this up. If you have it, I recommend using it as this tutorial is written with it in mind.

* Copy nc_gapps.zip onto the 4gb internal partition of the NC, /media/
* Unmount both the internal partition and the SD card (if applicable) from within your OS but leave the USB cable connected.
* Using a command prompt on your OS, navigate to android-sdk/tools (or platform-tools in newer SDK) and type the following:
adb shell
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system <-----This can be also done by going to /system/ in Root Explorer and clicking "Mount R/W" at the top
cd /media
miniunz -x nc_gapps.zip -d /system/ <-----Overwrite [A]ll if prompted!
echo "ro.config.nocheckin=no" >> /system/build.prop
exit
* Leave this command prompt open, we will need it in a minute!

* Install Youtube App. If you have a previous version installed it's best to use Titanium Backup to wipe it's data then uninstall.
* Run Youtube. Press Menu->My Channel. Log in with Gmail account. If you get the authentication error here you can try rebooting and wiping Youtube data again with Titanium Backup.
* Reboot NC

After reboot:
* Using the command prompt on your OS from before, type:
adb pull /data/system/packages.xml

*In this file find the string "uid.system". You should find a line that looks like:

<shared-user name="android.uid.system" userId="1000">

Remove the 3 lines beneath this one. They should look similar to:
<sigs count="n">
<cert index="n" />
</sigs>

n is an integer that may be different for everyone. After removing these lines, the line immediately after "<shared-user...>" should be "<perms>"

Save.

* Using the command prompt on your OS:
adb push packages.xml /data/system/

Reboot NC and disconnect USB.

Gmail should work but running the Market should load the TOS after which you will get a server error. This is caused by our device not having a valid androidId. Let's generate a valid androidId using the AVD emulator.

Create a new AVD for Android 2.1-API Level 7 using these settings:

SD Card Size: 100M
Skin: Built-in: Default (HVGA)
Hardware Properties:
Abstracted LCD Density: 160
Touch-screen support: yes
Device RAM size: 1024

Once the AVD is in your list, click on it and then click Details on the right hand side. Note the path and move the system.img you downloaded in that directory.

Start the AVD. When prompted, sign in with your existing Gmail credentials. Use CTRL+F11 to slide the keyboard in and out when prompted.

Run this command to get the androidId from the emulator:

adb shell sqlite3 /data/data/com.google.android.googleapps/databases/accounts.db "select * from meta";

It's the long number after androidId|, SAVE IT!

Now, connect your NC back to USB.

On the third command below, be sure to replace ANDROID_ID_FROM_EMULATOR with the number I just told you to save.
adb pull /data/data/com.google.android.googleapps/databases/gls.db
sqlite3 gls.db
update meta set intvalue='ANDROID_ID_FROM_EMULATOR' where name='androidId';
.q
adb push gls.db /data/data/com.google.android.googleapps/databases/

Reboot NC
 
Last edited:

feisty_noodle

Senior Member
Jan 16, 2010
220
81
Wow, that was quite a bit of work to figure out, to be sure.
Thanks, will give it a try!

Does this also provide the Google account setup capability (Reader, Listen, etc.)?
 

bbtheory

Senior Member
Jul 31, 2010
121
7
Washington, D.C.
Thanks for the fix first of all!!!

I used root explorer and copied over all of the files recommended, then installed the youtube app you linked to, but when I tried to go to menu/my channel it flashes a message that there was a problem authenticating.

Any ideas?

Thanks!!!
 

Xhorder

Senior Member
Dec 1, 2010
71
10
Before doing the androidID stuff, Gmail is supposed to work? It doesn't. Just flashed for a sec and goes back to home screen

Also, there is no Market icon available. Am I supposed to install Vending.apk after putting it in /system/app?

EDIT: Youtube now doesn't work either...

EDIT2: Youtube works after an uninstall/reinstall, and I can sign in. Gmail still doesn't work and no market icon
 
Last edited:

Mistar Muffin

Senior Member
Aug 11, 2009
291
413
Thanks for the fix first of all!!!

I used root explorer and copied over all of the files recommended, then installed the youtube app you linked to, but when I tried to go to menu/my channel it flashes a message that there was a problem authenticating.

Any ideas?

Thanks!!!

Try rebooting first. If that does not fix it then try clearing the data for the youtube app. If all else fails do a complete factory reset and start this from scratch. The youtube authentication issue was my biggest hurdle and I ended up doing a factory reset myself.
 

norkoastal

Senior Member
Dec 7, 2007
620
15
Bay Area
Before doing the androidID stuff, Gmail is supposed to work? It doesn't. Just flashed for a sec and goes back to home screen

Also, there is no Market icon available. Am I supposed to install Vending.apk after putting it in /system/app?

EDIT: Youtube now doesn't work either...

EDIT2: Youtube works after an uninstall/reinstall, and I can sign in. Gmail still doesn't work and no market icon
Same here...
 
  • Like
Reactions: Novarider

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,544
11,630
Does the build.prop contain a valid version string which allows market access?

Also, there's a new version of the market going about too :)
 

bbtheory

Senior Member
Jul 31, 2010
121
7
Washington, D.C.
Ok so I got past the youtube and now gmail works and the market gets the server error. However, I cant seem to get started with AVD to get the android ID... are there some more detailed instructions for an AVD noob???
 

norkoastal

Senior Member
Dec 7, 2007
620
15
Bay Area
Ok so I got past the youtube and now gmail works and the market gets the server error. However, I cant seem to get started with AVD to get the android ID... are there some more detailed instructions for an AVD noob???

Were there any variations from the steps above that you made to get gmail working? Not sure why mine is flashing then closing.
 

thinkpol

New member
Jul 16, 2010
1
0
Managed to get Gmail, Reader, and Market working. However, every download on the market fails. When I run a logcat i get "authentication failed"

I did replace androidId using the emulator.

Any ideas?
 

cookme

New member
Dec 10, 2010
3
0
Nice! this works great! just tested out couple free apps from Market and both installed and worked fine. Thanks for figuring this out! finally I don't have to hunt for apk files :)

-----------

buy the way, AppBrain works fine with Market too.
 
Last edited:

william1853

Member
Nov 5, 2010
19
2
From my pandigital days I have this question: does enabling google market and other apps prevent your nook color from staying in deep SLEEP?

Sent from my LogicPD Zoom2 using Tapatalk
 

msid

Member
Dec 1, 2010
40
8
I had an issue because I had not ever logged into youtube with my gmail account. I went to youtube.com and logged in, then was able to log in using the YouTube app.
 

msid

Member
Dec 1, 2010
40
8
For avd, you have to have the Android SDK installed. Then you can run (sdk folder)/tools/android to start the avd manager.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 28
    THIS METHOD IS NOW OUTDATED.
    For everyone that is starting from scratch with a wiped NookColor, I have made a linux script available that will do everything for you. This includes enabling apk installs on the device, live wallpapers, multitouch, etc. It will also download and install YouTube, Gmail, and the Market. It also changes the Market fingerprint to that of a Droid Eris on Verizon so you can see protected apps. It does not require use of the Android Emulator to generate an AndroidId as this is done automatically thanks to clockworx. All it does require is that you be nootered and have working Superuser.

    Thread here:

    http://xdaforums.com/showthread.php?t=871210


    DISCLAIMER:
    These steps are what worked for me and some may not even be required. If this guide needs any clarification, post a reply and I will do my best to update it. I'm 99% certain all the steps are here. :D

    If you have already tried to get the Market or other Gapps working, etc then it is very likely you will have to do a full factory reset before this will work for you. I have no idea why, but if these steps don't work I would try that first.
    In my experience the factory reset is two steps:

    8 failed boots restores the /system partition. You can easily trigger this reset without 8 failed boots by running this command from a Linux or Mac OSX command line:
    echo -n -e "\008\000\000\000" > /tmp/foo; adb push /tmp/foo /rom/devconf/BootCnt; adb reboot
    Afterwards:

    Booting while holding power+volumeup+nook button restores /data

    I had to do both of these steps in this order to get a full reset on the device.

    Required:
    nc_gapps.zip
    system.img for AVD
    Youtube for Eclaire

    Optional:
    Root Explorer really speeds this up. If you have it, I recommend using it as this tutorial is written with it in mind.

    * Copy nc_gapps.zip onto the 4gb internal partition of the NC, /media/
    * Unmount both the internal partition and the SD card (if applicable) from within your OS but leave the USB cable connected.
    * Using a command prompt on your OS, navigate to android-sdk/tools (or platform-tools in newer SDK) and type the following:
    adb shell
    mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system <-----This can be also done by going to /system/ in Root Explorer and clicking "Mount R/W" at the top
    cd /media
    miniunz -x nc_gapps.zip -d /system/ <-----Overwrite [A]ll if prompted!
    echo "ro.config.nocheckin=no" >> /system/build.prop
    exit
    * Leave this command prompt open, we will need it in a minute!

    * Install Youtube App. If you have a previous version installed it's best to use Titanium Backup to wipe it's data then uninstall.
    * Run Youtube. Press Menu->My Channel. Log in with Gmail account. If you get the authentication error here you can try rebooting and wiping Youtube data again with Titanium Backup.
    * Reboot NC

    After reboot:
    * Using the command prompt on your OS from before, type:
    adb pull /data/system/packages.xml

    *In this file find the string "uid.system". You should find a line that looks like:

    <shared-user name="android.uid.system" userId="1000">

    Remove the 3 lines beneath this one. They should look similar to:
    <sigs count="n">
    <cert index="n" />
    </sigs>

    n is an integer that may be different for everyone. After removing these lines, the line immediately after "<shared-user...>" should be "<perms>"

    Save.

    * Using the command prompt on your OS:
    adb push packages.xml /data/system/

    Reboot NC and disconnect USB.

    Gmail should work but running the Market should load the TOS after which you will get a server error. This is caused by our device not having a valid androidId. Let's generate a valid androidId using the AVD emulator.

    Create a new AVD for Android 2.1-API Level 7 using these settings:

    SD Card Size: 100M
    Skin: Built-in: Default (HVGA)
    Hardware Properties:
    Abstracted LCD Density: 160
    Touch-screen support: yes
    Device RAM size: 1024

    Once the AVD is in your list, click on it and then click Details on the right hand side. Note the path and move the system.img you downloaded in that directory.

    Start the AVD. When prompted, sign in with your existing Gmail credentials. Use CTRL+F11 to slide the keyboard in and out when prompted.

    Run this command to get the androidId from the emulator:

    adb shell sqlite3 /data/data/com.google.android.googleapps/databases/accounts.db "select * from meta";

    It's the long number after androidId|, SAVE IT!

    Now, connect your NC back to USB.

    On the third command below, be sure to replace ANDROID_ID_FROM_EMULATOR with the number I just told you to save.
    adb pull /data/data/com.google.android.googleapps/databases/gls.db
    sqlite3 gls.db
    update meta set intvalue='ANDROID_ID_FROM_EMULATOR' where name='androidId';
    .q
    adb push gls.db /data/data/com.google.android.googleapps/databases/

    Reboot NC
    2
    Well, that was easy :p

    Here's a link to my Non-ugly market hack for the WPDN, ported over to the Nook. It will allow you to get an Android ID on your own, no need for an emulator. Tested and working.

    To install, just drop this framework.jar into the /framework folder that you copy over with the Google Apps. (or manually push over to /system/framework/ if you wish.

    http://www.mediafire.com/download.php?1wb78ollpb1bd78
    1
    Before doing the androidID stuff, Gmail is supposed to work? It doesn't. Just flashed for a sec and goes back to home screen

    Also, there is no Market icon available. Am I supposed to install Vending.apk after putting it in /system/app?

    EDIT: Youtube now doesn't work either...

    EDIT2: Youtube works after an uninstall/reinstall, and I can sign in. Gmail still doesn't work and no market icon
    Same here...
    1
    When I do this it tells me:

    You cannot paste here because the file system is read only

    You have to select mount button at the top of the page in root explorer. This makes the folder data writable.
    1
    I have tried several times using the nookdev instruction set as well as the one posted on this forum on page 1 and I have had similar problems to ones described. One problem is that after logging into Youtube, I get a half a page of videos and 401 error. Gmail shows an account but fails to show email saying that it needs to be synced but this fails. Later in the process, when starting Market, it gives me the "Server error...". Tonight I decided to try to login into Youtube via my computer (something that I have never done despite have a Google account) and I am unable to log into Youtube as it brings up a screen saying that I have no such account (gmail, googledocs all works fine). Is this possibly contributing to these errors? Anyone else confirm this?
    The Nook devs instructions are pretty sound as I was pretty much following line by line last night and got gmail and the market to work.. Are you making sure to edit the XML in a program other than notepad? That tripped me up initially on the first MM post. Once you log into Youtube there will be a bunch of garbled code and the server message should appear. This should be a good sign to proceed to the next step. Also, make sure to select (all) during the CMD code sections of the steps.. I selected yes on the first go around and just re-pasted the code a second time. Good luck!