2 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

Reverse Engineer

Reverse Engineer

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).

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

Читать еще:  Смартфоны какой фирмы лучше? ТОП 15 производителей!

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:

And for reference here’s the stock one:

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
Читать еще:  Если в кармане 600 рублей: выбираем новый смартфон

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?

Ссылка на основную публикацию
Статьи c упоминанием слов:
Adblock
detector