10
Posted by alex on Oct 9th, 2014

As of 2016, this post is outdated and may no longer apply.

unnamed.png

Updating Chrome on Android is always a gamble. If I were to pick a game to best describe the experience I'd choose Russian roulette. Sometimes everything is fine, improved even. But too often things fall apart, up to the point you may reluctantly have to revert to the factory version. You may choose, like me, to preemptively remain on an older version. It works fine, if you can live with chrome prompting you to update to a "newer, greater version" at each start...

But you like your current version and you don't want to be prompted to update each time you tap the Chrome icon... There is no setting that I could find to disable this behavior.

Luckily if you are rooted you can manually edit one of Chrome's config file, the one concerning Omaha aka Google Update. You will need a root text editor or file manager, I use ES File Explorer
with root enabled (swipe the left pane).L93.png

Note: This will not disable the Play Store auto-update or manual update. It will only hide the annoying "Chrome just got better" prompts when you start Chrome.

 

Before starting make sure to swipe Chrome away from the activity view , it will avoid having Chrome overwriting your changes.

I've added a second (non-tested) method, scroll down to see it. It is actually much simpler, maybe it's worth trying first.

 

Editing the config file

The file to edit is:
/data/data/com.android.chrome/shared_prefs/com.google.android.apps.chrome.omaha.xml


You need to set the latest version to a number less than your current version and change a few timestamps:

  1. latestVersion => lower version than yours
  2. delay => just bump that number
  3. timestampForNextPostAttempt => set in the far future
  4. timestampForNewRequest => set in the far future
  5. timestampOfInstall => set in the far future

. Here's an example file with modifications highlighted:

   /data/data/com.android.chrome/shared_prefs/com.google.android.apps.chrome.omaha.xml

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
    <int name="backoffFailedAttempts" value="0" />
    <string name="latestVersion">32.0.2125.102</string>
    <string name="installSource">system_image</string>
    <string name="marketURL">market://details?id=com.android.chrome</string>
    <long name="delay" value="7200000000" />
    <long name="timestampOfInstall" value="2012905877353" />
    <long name="timestampForNextPostAttempt" value="2012905877353" />
    <long name="timestampOfRequest" value="-1" />
    <string name="persistedRequestID">invalid</string>
    <boolean name="sendInstallEvent" value="false" />
    <long name="timestampForNewRequest" value="2012920277663" />
</map>

 

And for reference here's the stock one:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
    <int name="backoffFailedAttempts" value="0" />
    <string name="installSource">system_image</string>
    <string name="latestVersion">38.0.2125.102</string>
    <string name="marketURL">market://details?id=com.android.chrome</string>
    <string name="persistedRequestID">invalid</string>
    <long name="timestampOfRequest" value="-1" />
    <long name="timestampForNextPostAttempt" value="1412907273247" />
    <long name="timestampOfInstall" value="1412903606751" />
    <long name="timestampForNewRequest" value="1412921673585" />
    <boolean name="sendInstallEvent" value="false" />
</map>

 

Changing Permissions

Once the changes are made you need to do some permission changes:

  1. Change the permissions to 444 (Read: User, Group, Global / Write: none)
  2. Change the owner and group of the file for any other user, root for example
  3. Set the sticky bit so that Chrome can't change back the permissions or delete and recreate the file

Recap: Change owner/group to group and set permissions to 1444 (sticky bit + read user + read group + read world). It may seem overzealous but trust me, Chrome is very tenacious when it comes to its config files.

 

If at this point Chrome still somehow fix the file, it's worth looking for very good alternatives such as lightning or tint!

 

I hope this post will be helpful to some people! :)

 

Edit, alternate method - NON TESTED:

Disabling the Omaha Service

This is a method I have not tested, I'm merely guesstimating it has a fair chance of working.

Disclaimer: I did test the procedure myself and Chrome still works fine afterward, what isn't tested is the anti-update/banner/prompt/annoyance itself (long story short I do not have access to old enough Chrome right now). Why am I posting untested root tricks? Because it is safe if you don't play around the app I'm linking too much (don't touch what you don't understand, although you can revert at any time) and someone might be desperate. Because seriously I didn't find anyone else trying to stop this Chrome behavior without (or even with, for that matter) patching chrome but I receive quite a bit of traffic from google search and even got a friendly commenter! So I assume there is some interest.

  1. Download Disable Service from the play store (or elsewhere).
  2. Open and go to Chrome
  3. Uncheck OmahaClient

My logic: Disable Service will stop the service from running, ever. OmahaClient is the name of Chrome's updater.

 

If this new attempt doesn't work then I guess... It's time to patch the apk or make an Xposed module! The module is likely a better option because it won't cause signature conflicts, should work across chrome versions, and be easier for people to install.

But at this point it's worth wondering if we really want Chrome that bad, don't you think?

10 comments
Comments
avatar

I apprciate the attempt, but it doesn't stay borked.. Chrome rewrites it every time

Not sure how to get 1444 permissions, I was only able to get 0444 or rrrT?

Stupid chrome... Why can't it just let me enjoy my prosophobia in peace

avatar
alex
Administrateur

Yeah I've been having issues as well with recent versions. You can try the following command in a terminal or adb after doing the changes:

chattr +i /data/data/com.android.chrome/shared_prefs/com.google.android.apps.chrome.omaha.xml

This makes the file immutable and for me it worked... for a few days then it was reset.

I think the only way to go would be to edit the apk and corrupt omaha entries in the dex file.

I do not know what involves resigning an apk after the changes but if I get around doing it I will update this post...

Sorry it didn't work for you!

avatar

All good man! As I said I apprecaite the attempt!

Its funny that I've been dealing with this for like a year (chrome beta)
But only got around to looking up a solution now, and you've only just posted this attempted fix last month
Btw yours was the only post I could find that related to fixing this problem
So I feel we are on the right track and thanks for the initiative!

avatar
alex
Administrateur

I think I may have found a new solution:

I've noticed a service named OmahaClient.

  1. Download "Disable Service" from the play store
  2. Uncheck "OmahaClient" under Chrome.

Chrome seems to work fine without it but I can't say if the update check is effectively blocked as I do not have an old chrome version to test, I'll try to dig up an old device this weekend.

Disable Service:
https://play.google.com/store/apps/details?id=cn.wq.disableservice&hl=en

avatar

I tried the second method and it didn't work for me, but after a small bit of time acclimating myself to ES File Explorer I managed to get the first suggestion to work. I know this post is old, but I use a blacked out version of chrome from before the material colors upgrade that allows the webpage to color your notification and address bar and the popup for update was annoying, but the primary colors making my hours of work blacking everything out was worse. There was no way I was going to update, so I need to get rid of the notification and this did the job. This information isn't anywhere else online as far as I can tell, and I looked for a few days. I'm bookmarking this for later just in case, or for when I update my rom. Thank for this, really heartfelt thanks!!

avatar

Thank you very much.
Using booth method is best.

avatar
Mister Owl

I tried to use the disable. Omaha service method, on stock chrome on LG K7, and no luck. It didn't work at all. I tried restarting the phone and still nothing. I have not tried the ES file Explorer method but will soon, and will post an update.

avatar

Can i do with Starbucks apk?

avatar
Herick Freitas

A bit of necroposting on my side but i managed to make this work here so i wanted to share it to anyone else that may have this problem in the future.
Here is a step by step of how i did it:

Force close chrome and don't open it again until you finish this process

Download app Service Disabler from playstore

Open Service Disabler

Click on Chrome and disable 'Omaha Client'

Using a root file exporer (ES File Explorer, Root Explorer), go to '/data/data/com.android.chrome/shared_prefs'

Open 'com.google.android.apps.chrome.omaha.xml'

Replace the 'latestVersion' value to the current version of the chrome you have installed (change only this value, nothing else)

Example: <string name="latestVersion">65.0.3325.109</string>

Double check that the file has been saved before leaving

Now change the permissions of the file 'com.google.android.apps.chrome.omaha.xml' to 1444 or r--r--r-T (both are the same thing)

Restart your phone before starting chrome again just to make sure

Done.

avatar

The xml file is updated by "the" (or separate) OmahaClient updater process that seems to refresh every 5 hours according to documentation while the browser is open/in memory. That is why as some noted the xml file gets rewritten - because there are two processes.

The latestVersion value is then read from the xml file by the browser whenever the browser is launched, ie. from boot where the browser is not already in memory. It then displays the notify if it sees that the latestVersion value is bigger than its known version number.

So, the solution for me is to 1) disable the OmahaClient update process, and 2) set latestVersion to my known version number. delay and the timestamps have no effect on the display of the notify. At most replace the timestamps with "-1" just to get rid of them.

Sign in or post as a guest :
Your Name Your Email


Anti-Bot : 5040
Go to Top