Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,633 Members 37,742 Now Online
XDA Developers Android and Mobile Development Forum

[How to] Gmail and the Android Market

Tip us?
 
Mistar Muffin
Old
(Last edited by Mistar Muffin; 13th December 2010 at 06:45 PM.)
#1  
Senior Member - OP
Thanks Meter 377
Posts: 262
Join Date: Aug 2009

 
DONATE TO ME
Default [How to] Gmail and the Android Market

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://forum.xda-developers.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.

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:
Quote:
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:
Quote:
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:
Quote:
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:
Quote:
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:

Quote:
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.
Quote:
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
The Following 28 Users Say Thank You to Mistar Muffin For This Useful Post: [ Click to Expand ]
 
feisty_noodle
Old
#2  
Senior Member
Thanks Meter 80
Posts: 220
Join Date: Jan 2010
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
Old
#3  
Senior Member
Thanks Meter 10
Posts: 119
Join Date: Jul 2010
Location: 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!!!
 
bazzly
Old
(Last edited by bazzly; 11th December 2010 at 11:23 PM.)
#4  
Member
Thanks Meter 0
Posts: 33
Join Date: Dec 2010
Never mind...
 
Xhorder
Old
(Last edited by Xhorder; 11th December 2010 at 11:32 PM.) Reason: add info
#5  
Member
Thanks Meter 10
Posts: 66
Join Date: Dec 2010
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
 
Mistar Muffin
Old
#6  
Senior Member - OP
Thanks Meter 377
Posts: 262
Join Date: Aug 2009

 
DONATE TO ME
Quote:
Originally Posted by bazzly View Post
I'm confused....

"Using Root Explorer:
1) copy etc, framework, and lib folders into /system."

Those files are already in the /media/system directory....ohh...you talking the root /system not media/system....correct...?
Yes, that is correct.
 
Mistar Muffin
Old
#7  
Senior Member - OP
Thanks Meter 377
Posts: 262
Join Date: Aug 2009

 
DONATE TO ME
Quote:
Originally Posted by bbtheory View Post
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
Old
#8  
norkoastal's Avatar
Senior Member
Thanks Meter 15
Posts: 619
Join Date: Dec 2007
Location: Bay Area
Quote:
Originally Posted by Xhorder View Post
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...
Device: 3vo - Shootem! | ROM: Stock
Nook Color | ROM: Full Root Running CM7
The Following User Says Thank You to norkoastal For This Useful Post: [ Click to Expand ]
 
pulser_g2
Old
#9  
pulser_g2's Avatar
Developer Admin / Senior Recognized Developer
Thanks Meter 10775
Posts: 19,275
Join Date: Nov 2009
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


Having trouble getting an answer? | What is XDA about? | How to ask for help?

if [ $PM.incoming.type = $type.question.ROM.how_to_use ] || [ $PM.incoming.type = $type.question.ROM.silly_question ]; then mv $PM.incoming /.trash; PM.response($responsetype.ignore); $PM.sender.ignore_in_future=true; init.sequence($boy_who_cried_wolf); fi;

BTC: 1K2fpDsRHkirWmk3PKiqtzhVHKUJCWPWnN
PGP: 0x260F4FDEF258E3C4
 
bbtheory
Old
#10  
Senior Member
Thanks Meter 10
Posts: 119
Join Date: Jul 2010
Location: 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???

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes