Install a modified version of Gmail to allow Pure messenger message database reading

You’ll need :
* a rooted phone
* Android SDK or simply ADB installed

How to get a Gmail modified version:
– you can use modded version available here
– you can create your own following this tutorial

Now, you’ll have to install it … let’s go:

- fully uninstall Pure messenger
- copy the gmail modified apk to your sdcard (let's call it 'your_modded_gmail_apk_file_name')
- 'adb shell'
- 'cd /data/app/'
- 'rm*.apk' (to remove the gmail update)
- 'su' (to pass root)
- 'mount -oremount,rw -t yaffs2 /dev/block/mtdblock4 /system' (remount the system-filesystem read/write)
*** be careful, the /dev/block/mtdblock4 may be different on your phone, and format can be something else (like ext4 instead of yaffs2). Tap 'mount' to check what is the '/system/' mounted partition.
- 'cd /system/app'
- 'mv Gmail.apk Gmail.apk.stock' (to backup the original Gmail application)
- 'cp /sdcard/your_modded_gmail_apk_file_name /system/app' (to install the Gmail modified version)
- 'reboot'
- reinstall Pure messenger

Now, you’ve got Gmail and Pure messenger working together !!!

Nota 1 : If Gmail application crash, I strongly advise you to clear the gmail application datas (android settings -> applications -> gmail -> clear datas).

Nota 2 : If you already have an older modified version of Gmail installed, the newer modified version of Gmail can be installed on top to perform the update. No need to remove the previously installed modified version of Gmail first.

65 thoughts on “Install a modified version of Gmail to allow Pure messenger message database reading

  1. i installed this, but whenever FriendCaster uses gmail push notifications, the Gmail apk will force close…😦

  2. The modded Gmail is the only gmail in /system/app. The original gmail became Gmail.apk.stock, as per the instructions above.

    Solution 1 works well though🙂

  3. and nothing remaining in /data/app which could be gmail ?
    What is the error ? any logcat ?
    and what is ‘FriendCaster’ ?
    Does Pure messenger works ?

    1. No, nothing in /data/app.
      Sorry, I was searching for a workaround for Gmail 2.3.5 and came across your blog. Friendcaster is a facebook app that also accesses Gmail app.

      Thanks for your help though – solution 1 was great🙂

      1. Yes, i use cynogenmod nightly 7. Android 2.3.4. The gmail fix works perfectly. However updates from facebook seem to have troubles now. The messenger widget disables FB automatically.

      2. Hi, I am not aware of such problem. Please, email me (see ‘about’ page for my email)

      1. Incorrect permissions were set so it was unable to run at boot. I changed the permissions with root explorer to the same thing every other file was set to in the system/app folder which was:

        Owner = read/write
        Group = read
        Others = read

        Before I changed it the permissions were:
        Owner = NONE
        Group = Read/Write/Execute
        Others = Read/Execute

        Which makes sense why it wouldn’t boot given that the OWNER is SYSTEM and it was given NO permissions.

        But changing it to the first things I listed made it work.

    1. Tried to get this to work for days but modifiing the persmissions with File Expert per your instructions Aroon did the jobs, thanks! And Thanks for the great apps and support Koxx3

  4. hi

    adb dosen’t find*.apk in /data/app/. Could that be that the app is named different? How can i find out?

  5. ok I searched and I only found my TitaniumBackup on sdcard named

    ‘’ .

    I tried to remove gmail (line 6 above) with this name and apk ending. Didn’t work…

  6. I tried with the root explorer and found a folder ‘’ in /data/data. There are following subfolders in it: app_sslcache; cache; databases; files; lib and shared_prefs. No file with apk ending.

  7. worked well. i didnt use if for your app, i used it for go launcher ex notifications. btw i bought your app and asked for a refund within one day and you completely ignored my email. poor customer service.

    1. Yes, it works with all apps needing Gmail…
      Refund policy is defined by Google in Android Market terms of usage.
      Now, if you don’t like one app, you just have to uninstall and ask refund though the market during the trial period defined by Google terms (15 minutes).
      If the period passed, I refund in 90% of cases when users email me and ask nicely…
      It’s a pain for my accouting to handle those manual refunds, but I do it.
      If you are not happy of my services, sorry, but I really do my best and most users are very happy with it.

      Nota: if you are not happy with 15 minutes refund policy imposed by Google, you can use alternative markets (AndroidPit market have 24h refund policy), or you can complain to Google Market support team.

  8. The fact that you didnt even reply to my request was the annoying part. A simple no even would have been better. I looked for the email that I sent, I was not rude in anyway, although i did request a refund 2 days after, not 1, i feel like i should have at least gotten a reply.

  9. eh, giving me the gmail fix in a way makes up for the headache. thanks for that and i at least appreciate a response here. did not mean to make a scene on this page. you seem like a developer who is trying, especially with this latest update from the google team that messed up every app in the market that depended on gmail notifications. it wasnt right for me to blast you on this forum for something unrelated.

    again, thank you a lot for the gmail fix and keep up the good work. after all it was only a couple of bucks

  10. ok, I am on 2.3.7 on a nexus s 4g (new google wallet release)
    I had the messaging showing gmail on 2.3.5 but now it’s not working,
    I uninstalled pure message
    I removed gmail.apk from system. checked data/app for an update but none there. decompiled apk changed permissions recompiled signed.
    rebooted to recovery wiped cache and dalvik cache. rebooted saw no gmail in apps. copied signed apk into system/app/ rebooted
    now see gmail and works. rebooted. installed pure message from market went through setup no luck. installed email connector still no luck
    email if you want logs

    1. Hi,
      ’email connector’ won’t help for Gmail.
      Please, send me a logcat just after pressing the ‘save & exit’ button from the widget config (see ‘about’ page for my email).

  11. I looked in the log and saw 0 keys for gmail and figured it was gmail not allowing access. I deleted all gmail from phone and apk manager. I downloaded gmail from the market copined to my computer deleted apk from computer. wiped cache and dalvik cache. rebooted. modified the permissions and compiled signed and copied it to system/app rebooted then reinstalled the widget. worked perfect. must have been something in one of the old files or folders I had

  12. Cheers there matey, have got it working using your modified app and root explorer.
    So good to have everything showing up in pure messenger again.

    1. Hi,
      Sorry, but I won’t publish all updates of Gmail. Everything is explained to create your own version of Gmail.
      If anybody give me this modified version, I’ll be happy to publish it.

  13. THERE IS A PROBLEM PARSING THE PACKAGE. That is the latest error that I get. I got that with my MIUI ROM in my samsung galaxy s2. I am running android version 2.3.7. Please let me know if this can be helped or not. This only happens if I try to install the special modified version of GMAIL in the system/apps folder. When I try to install it in any other folder, I do not get this error but it says it will not install. Please asdvise of a solution. Thanks.

  14. FIXED IT………….hardcore programming got it done……. thanks for the great APP DUDE!!!! whoever asks for a refund on this thing is a douche. I am an electrical and computer engineer and this thing is very well done! Keep it up bro!

  15. Thanks,, Great
    I have used root explorer. Clear the update if any, install , copy modded version with the same name on top of 2.3.5 the stock one. Gmail.apk in my case. Then reboot. Install pure again.

    Oxygen rom 2.3.5 on HTC desire.

  16. Anyone getting a problem with Gmail stealth updating even when told not to?

    Has Google been in touch with news of a future solution? Given that they dont have their own widget its a shame they have broken everyone elses.

    1. For updates, I don’t know. I don’t us the stock Gmail version anymore.
      For Google update, no. No feedback. They introduced their own Gmail widget in Android 3.x/4.x.

  17. hi koxx3,

    first of all: great work! i love you’re pure messenger. i’ve tried to install the cracked gmail-apk on my desire with running cyanogen. but on the /system/app partition it couldn’t be installed.
    for those of us who are using a2sd+ : you must install the apk on the /sd-ext/app partition. the it works as designed!

  18. Hey,

    ok i have some trouble with this and maybe it depends on my rom. I have a insertcoin 4.0.6 which mean i have a ics rom with sense 3.5. First trouble pop up during step 6, (deleting the update). Error: No such folder.
    So i delete gmail with the phone. Maybe this was a big failure because now there wasnt any gmail @ my phone.
    So i skip the steps and rebegin with step 7 (su). I get an error while trying to back up the original file. (sure, i already delete it ;-)).
    i get the next error by try to install the provided modified apk (i took the small one). The error was: cp: “can’t stat ‘/sdcard/your_modded_gmail_apk_file_name’: No such file or directory”.

    @ this point: What should i do? Any suggestions or a link to a forum which can help a noob?

  19. I’m running ICS, Cyanogen Mod 9 – I was able to install the modified gmail app fine, but no Gmail messages ever appear in the widget . The widget says Emails(Gmail) is enabled though, so it looks like the modified gmail was in fact installed correctly – any idea what could cause messages from not appearing?

  20. I also have an ICS rom 4.01 on HTC Sensation, and although Pure Messenger seems to work with basic functionality, I am unable to change skins (force closes) even though it says some updates for android v4.0.x. Also seems to FC a bit when hitting filter button and other buttons quickly.

    Also, went through a long process to attempt the modifying of Gmail.apk from signature to normal (the APK Manager tool is now APK Multi-tool, v4.01 of APK Multi-tool doesn’t work properly so had to combine the apktools.jar file from it and into the alpha-02 version!), and the Gmail app works fine with the modified version, and Pure Messenger now picks up that it can read the Gmail database, but it doesn’t show any emails in it’s list🙂

  21. Working like a champ so far with your modded gmail apk. I used your tutorial to guide me through the process using Root Explorer (instead of SDK or ADB), and Titanium Pro to convert Pure Messenger to system app.

    Thank you for all of your work!

    Koodo Galaxy Ace – 2.3.7 – CyanogenMod-7.2.0-RC0-GalaxyAce-KANG
    Baseband: S5830DTLKI4

  22. For all who has Problems with that Desricption…

    – Install the Root Explorer, navigate to System/apps change permission in the Top of the Picture there is a small Button.
    – Go to Gmail.apk rename it to Gmail.apk.bak
    – Reboot the Device
    – intall the mofified Gmail Version from this Site
    – Deinstall the Pure Messenger Widget
    – Reboot the Device
    – Install the Pure Messenger Widget and Voila, it runs !
    Have Fun !

      1. Merci F.D
        for your quickly answer yesterday (Monday)
        I have submitted the New Gmail 4.1.2 (only for ICS & JB)
        to Tsjoklat and he will make soon the modified version that will allow the App to works.
        Best Regards JCCW

    1. George, Yes to allow Pure messenger to read Gmail’s mails you must install this moded version of Android Gmail.
      Note: Actually the only download link that appear in OP (First Post) at XDA Forums is the version for Android Ice Cream Sandwich and up. If you have Android Gingerbread or less it will not work.
      We are waiting for the latest moded Gmail version which is Gmail 4.6-(836823)

Leave a Reply

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

You are commenting using your 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