My Gmail database is locked. How can I unlock it ?


You surely get an update of the Gmail application (>= 2.3.5) from the market or after flashing a new ROM.
With this latest Gmail application, Google introduced a limitation: the access to the Gmail message database is granted only to phone pre-installed applications.

I found 3 solutions to avoid this problem.

1rst solution
Remove the Gmail update:
- uninstall Gmail update in the Market (Market -> My Applications -> Gmail -> uninstall updates)
- in the Market, disable automatic update for Gmail
- uninstall Pure messenger
- reboot your phone
- reinstall Pure messenger from the market
- insert a fresh new widget.

Nota: Don’t skip steps … Pure messenger uninstall is VERY important. Pure messenger ask only once the permission to Android for the gmail access… If the access is denied, only a full reinstall will restart permission the process. It’s not my choice, but the Android architecture.

2nd solution
Use ‘K9 For Pure’ and configure Gmail with IMAP access.

3rd solution
The only way to bypass this protection of the new Gmail application is to use a modified version of Gmail and install it as ‘system app’.
This modified version will be the same as the current market version but with ‘old permissions’ allowing Pure messenger to read it’s message database.
Now, the drawback: to move it, you need to be root… you can follow this guide to install it.
I think the operation will need to be done on each new release of Gmail … so, don’t update Gmail from the Market.
There is an additionnal guide here to learn how to create your own version of Gmail.

88 responses

29 07 2011
gui84

Hi,

I moved the org.koxx.pure_messenger-1.apk to /system/app but it isn’t working: I keep on getting the red error message about the locked database, and if I select “Enable gmail” it gets immediatelly unchecked.

I have uninstalled the app, rebooted, reinstalled it from the market, moved the app, rebooted and then added a widget. Same result.

Am I missing something?
Thanks

gmail 2.3.5
pure messenger 2.3.6
CM 7.1 RC1 on Nexus one

29 07 2011
koxx3

Currently, i doesn’t have any other solution than the 3 exposed in my blog. Try uninstalling gmail update.
I’ll try to create a ‘gmail connector’ during next days for rooted devices.

29 07 2011
shadax

I first tried method number 2 (and I checked pure messager is not listed under “Downloaded” apps, only under “All”). Even after rebooting it twice it still complains te database was locked.

While it was not working, I tried method nr 3 too. I downgraded gmail from 2.3.5.to 2.3.4.1 and rebooted. Pure messenger does allow me to enable gmail again, but it unfortunately doesn’t show any gmail messages.

gmail 2.3.4.1/2.3.5
Pure Messenger 2.3.7
HTC Desire + Oxygen 2.1.6 (Android v2.3.4)

Any clue what is wrong?

29 07 2011
koxx3

You forgot pure messenger uninstall/reinstall after gmail downgrade……..

29 07 2011
shadax

Oops, the downgrade option of gmail just works. While it’s kind of hard to uninstall the messenger app after method #1, I removed the widget, killed the pure messenger widget and deleted all application data. After rebooting I added the widget again and it works great again.

29 07 2011
koxx3

Yes, the uninstall is VERY important. Pure messenger ask only once the permission to Android for the gmail access… If the access is denied, only a full reinstall will restart the process.

29 07 2011
Knoxville

So does it look like we might get a fix without these workarounds eventually? Thank you

29 07 2011
koxx3

Without root: no. Totally impossible.

29 07 2011
shadax

The gmail update broke basically everything that uses gmail, except for the gmail app itself. See for example http://techcrunch.com/2011/07/29/latest-gmail-for-android-update-breaks-third-party-apps/

29 07 2011
koxx3

To be clear: don’t skip steps ! ;)

29 07 2011
agasconnio

this is terrible! Isn’t possible to reset database permissons as root?

29 07 2011
koxx3

No. You can’t reset any permissions.

29 07 2011
Amir

I used the converting the app to a system app for a cm7 2.3.5 rom and an htc sense 2.3.4 rom, both of which has gmail updated. It worked on htc sense but not on cm7. The problem seems to be that even after classifying the app as a system app in cm7, it still does not get access to the database. This might be because of a bug in cm7.

29 07 2011
koxx3

Weird… I had users success reports with CM7 …

29 07 2011
Knoxville Photographer

I got imap set up just fine now the only problem is my open in gmail link has disappeared and now it say open in email which takes you to imap version I still need the link that just launches Gmail normal interface when I just want to launch Gmail. Can you add this open back in please. I know if I edit the email from within pure messenger that its uses the K9 I just want my link back to launch the gmail app. Thank You

30 07 2011
Laure

1st method worked perfectly, thanks !

I am so pissed off at Google right now…

30 07 2011
Pete

Found the perfect solution. After upgrading to the latest Gmail version I found no way back to the previous version. I googled Gmail version 2.3.4 and found that version, and so I uploaded it to my phone. With everything erased I executed this version and guess what? We are back to normal. Life is good.

30 07 2011
David Wilson

I did exactly the same thing on Cyanogenmod 7. Downgraded Gmail to 2.3.4 after Google search for link. I am going to try thunderstick since easy and see if updated client works.

31 07 2011
Davis Wilson

Gmail 2.3.5 works w pm in thunderstick

2 08 2011
John Blyth

I used Option 3 as I found K9 for Pure didn’t reliably download my GMail mails.

Perfection would have been to have a little more information on the Mount command and what to expect. In my case, It seemed that my HTC Wildfire used /dev/block/mtdblock3 for ‘/system/’ mounted partition. I took a wild guess that that was the correct one – and it worked (as I am not all that familiar with Linux commands).

Now Pure Messenger is wonderfully back to normal…..

Thanks
John

2 08 2011
koxx3

Ok, I’ll try to complete the mount part ;)

2 08 2011
David

PM works on my Thunderbolt with Gmail 2.3.5 and das BAMF remix v2.1 and latest Thunderstick, but not Cyanogenmod 7 RC1.3 or RC 1.4. Again, downgrading Gmail to 2.3.4 works. I have the same issue with E-mail notifier that accesses th Gmail database to create a popup for new messages. Curious why this happens with some Android setups and not others.

2 08 2011
David

Tried option 3 using the pre-modified version of Gmail at http://pureapps.planethoster.org/applications/Gmail/gm2350.apk and it works! (Using CM 7 now).

3 08 2011
koxx3

Hehehe ;)
Yes, this option reallyworks fine on ALL devices.

18 08 2011
skeezicks

Anders, I notice in the widget “Executive Assistant” that one can configure it to “Get from Google”, and this seems to solve the problem you’re facing. Could you do something like that in Pure Messenger, or is there something I’m missing?

18 08 2011
koxx3

What does it means ? there is no standard API to get email from Google except IMAP … it would be VERY heavy, battery and CPU consuming. In that case, simply use K9FP : it does the same IMAP connexion.

1 10 2011
John

I somehow got Gmail 3.1.5 installed on my phone. I turned off the automatic update of Gmail so not sure how it happened. This version of Gmail no longer shows an uninstall? How can I downgrade Gmail to a version prior to 2.3.5?

2 10 2011
koxx3

Sorry, but I have no idea excepted rooting + APK removal like explained in my tutorial.

2 10 2011
David Wilson

If you are rooted, you can also uninstall through Titanium Backup. But I only have seen up toGmail v2.3.5.2, which just came out today. It is a security update which is still incompatible with PM.

4 10 2011
egal

2nd Solution works ferfectly for me…
thx

10 10 2011
thangnh

I am using Solution 2 and it works fine for the widget itself. However, I can’t use native gmail app, which I think is superior than K9. Can you please add the ability to open a mail in Native android app gmail instead of K-9.

10 10 2011
koxx3

Hi,
sorry, but I think this is not a good idea to mix 2 apps. So, I won’t add this option.
I strongly advise you to root your phone and use the modified version if you don’t like K9FP.

10 10 2011
[Pure messenger] new Gmail 2.5.3.2 « Android 'Pure' widgets series (calendar)

[...] My Gmail database is locked. How can I unlock it ? [...]

13 10 2011
Tetsuya Koshikawa

Good

13 10 2011
Mek

I found a fourth solution that worked really easily. It requires root as well. I have the pro version of Titanium Backup so im not sure if this works with the free version, but what I did with this:

With Titanium Backup: deleted my old gmail
Download new gmail apk
long press on the gmail app in titanium backup and select convert to system app.

It worked for me, although i did use your 3rd solution for my previous fix for my previous gmail. i figured i’d try my way, and it worked. If anyone else can confirm this, it is a bit easier.

13 10 2011
Mek

and when i say download, also install

13 10 2011
Mek

htc evo updated radios using cm7 nightly #222

6 11 2011
mahomaco

a

6 11 2011
koxx3

b ?

17 11 2011
Nico Posnien

Is there already a solution to this problem?

17 11 2011
koxx3

All solutions are on this page: Gmail 2.3.4 or latest Gmail mod or K9FP.

18 11 2011
Patrick

Hi,
I installed K9 and all eMails are displayed in this app, but Pure Messenger widget still shows no eMails. What settings do I have to change? Any solution?

18 11 2011
koxx3

Hi,
please email me for a deeper analysis (see ‘about’ page for my email).
thanks,
Francois

9 12 2011
XYZ1

Hi,
I have a Samsung Galaxy S2.
I tried to use the 1st solution, but it’s not working.
If I go into “Market” -> “My Applications” Gmail is not listed.
But Gmail 2.3.5 is definately installed…

Any idea?

Thanks!

10 12 2011
koxx3

Hi,
no, no idea :(
Sorry, but I don’t have any SGS2 to make the test.
Clearly, the best solution is to root and install the modded Gmail.
Francois

3 01 2012
Svenf83

Hi!
Ok, it seems i am a noob because nobody ask this, but which version of your great modified files i have to pick up? There are 3 times apk 4.0.1.
Thanks for your help! And just curious: Would it be possible to do this with a one step cwm version? Or is this a different process?

Thanks in advance!

4 01 2012
silentwinter85

hey koxx, i installed your modified gmail apk (4.0.3, the version was exactly the same that was installed on my system) and now i don’t see the warning whene i try to configure the widget but as soon as i try to check “Enable Gmail” the pop up alert came out and i can’t enable it.

I’m using cyanogen 9 alfa 18 (4.0.3) on nexus s

4 01 2012
koxx3

Hi, did you uninstall/reinstall pure messenger as requested ?

4 01 2012
koxx3

and what is the exact warning message you get ?

5 01 2012
Marcelo

Hi, I installed the modded gmail version on my galaxy nexus, and when I configure the widget it checks the enable gmail checkmark and put down my email address but when the widget appears no emails show up.
Also if I uncheck the enable gmail case and try to recheck it, the “this is not supported from 3.0 and higher”message appears.

5 01 2012
koxx3

Ahhh ! that is very interesting. It means I forgot to disable a protection ! I’ll publish a new version tonight.
EDIT: new version published ! can you try it please ?

8 01 2012
may

Hi,
I’ve Gmail.4.0.3-239410.mod-signed.apk ver of Gmail, and still no emails on the widget :(

8 01 2012
koxx3

Hi,
can you try the 2.5.1 version please ?
if it doesn’t works, please email me (see ‘about’ page for my email).
Thanks,
Francois

6 01 2012
Payam

Hello I have a rooted galaxy tablet 10.1 running honeycomb 3.2 do you think it will work
Thank you

6 01 2012
koxx3

Hi, No, it won’t. It would need a 3.2 modified versions… and I don’t have it. Sorry.

8 01 2012
Payam

Would you accept a 20 dollar donation for it?
Please email me your paypal address thanks

8 01 2012
Syphyr

The modified versions of Gmail 4.0.1 and 4.0.2 both work in Honeycomb. Android 3.2 never released the source code so there were never any Gapps published for it as well.

8 01 2012
Syphyr

Also, Gmail for Honeycomb has just been added to the modified Gmail thread on XDA.

http://forum.xda-developers.com/showthread.php?t=1199518

8 01 2012
koxx3

thanks for the feedback ?
does the latest Pure messenger works for you ?

8 01 2012
Syphyr

I have not tried Pure Messenger yet, but I plan on it. My mobile has not been updated for a while. :-) But good job with the ICS/Honeycomb support.

9 01 2012
hhh

aaa

9 01 2012
koxx3

bbb ?

4 02 2012
dudu

My gmail is lock

5 02 2012
koxx3

yes, and did you try on of those solution ?

24 02 2012
Juanka Contreras Wilcox

Thanks Koxx3,
The modify version of Gmail 4.0.4-255454 from Tsjoklat
works great in ICS (ICSX by x13thangel) on the DroidX.
with pure messenger version 2.5.2

25 02 2012
koxx3

thanks for the feedback ;)

8 03 2012
muhazani

ok

5 04 2012
Behcet Aydogdu

Hi,

I tried first solution but doesnt work. Before was working.
I have SGS, Kernel 2.6.35.7 XWJVZ, Darky ROM V.10.4.2

Behcet

15 04 2012
arielavi

I’ve downgraded gmail and stopped automatic updating, and it didn’t work.
So I’ve installed K9 and it still doesn’t work. The K9 itself works fine and syncs with my gmail account, and I configured the pure messenger widget to use it, but I still dont see my mails on the widget.

Please help me solve this kne out

19 04 2012
SAMUEL Ntiakoh

Hete i

6 07 2012
taketosiking

You forgot pure messenger uninstall/reinstall after gmail downgrade……..

26 07 2012
tzneken

I like it

20 12 2012
Istin

I have configured Gmail with imap access and instaled k9 but i don’t see any mail on the widget.

20 12 2012
koxx3

K9FP ? not K9.
Did you configure Pure messenger with K9FP config and account ?

21 12 2012
liquidavatar

my gmail is IMAP enabled and I’m using k9 for pure messenger but I can’t get it to work in the widget. anyone got step by step instructions? I can use pop to view my gmail but it displays as a pop email :( if I could change the icon Iwouldn’t care but I can’t.

21 12 2012
koxx3

step by step:
1- install K9FP
2- configure Gmail account in IMAP in K9FP
3- check you receieve email in K9FP
4- select K9FP as email provider AND select the K9FP account in Pure messenger, then save & exit
Done !

22 12 2012
liquidavatar

I knew how to do that (accidental found it). But it sure would be nice if I could select the Gmail icon along with it. There should be several different assignable icons anyway. I have several pop and Gmail accounts that would make it easy to visually tell which account they are from. JON.
Thanks for the detailed response.

25 12 2012
David Wilson

I have a HTC DNA. Rooted, but when you try to modify or even delete GMail, the system restores the original on reboot. Any answers you’ve heard of?

25 12 2012
David Wilson

DNA runs Jellybean 4.1

8 04 2013
htin kyaw

thank you

4 05 2013
hai

Currently, i doesn’t have any other solution than the 3 exposed in my blog. Try uninstalling gmail update.
I’ll try to create a ‘gmail connector’ during next days for rooted devices.

7 05 2013
koxx3

If you manage to create a gmail connector, it would be awesome ;)

11 06 2013
ari

Android app BlingBoard still accesses gmail acvount without any “hacking” or rooting. Maybe talk with the dev and see if they can help with gmail database locking issue?

19 06 2013
koxx3

They pool gmail with IMAP through internet … a very dirty solution :/

14 07 2013
fatgi

Hi, I would like to ask a question about the calender sync. It was found that I input the event directly at the widget, but it doesn’t sync with my Google email. Therefore when I open my tablet, I can’t see the event on calender like “S planner”. Could you please advise???

17 07 2013
koxx3

Hi, Try to select ‘android auto seletion’ for the ‘+’ widget button action in the widget config panel.

9 04 2014
lebohang

i want to unlock my phone if it is locked an wants a gmail?

21 04 2014
koxx3

I advise you to use AquaMail an acces Gmail with IMAP.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

Join 163 other followers

%d bloggers like this: