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

(How-to) prevent Android Market app from updating itself

Tip us?
 
lexelby
Old
(Last edited by lexelby; 16th January 2012 at 03:00 PM.)
#1  
Member - OP
Thanks Meter 49
Posts: 66
Join Date: Jan 2012
Default (How-to) prevent Android Market app from updating itself

BEFORE REPLYING: please know that I have tried all of the standard suggested solutions to prevent Market from updating, including freezing Market Updater, using pm disable on it, and turning off auto-updates for apps, and these do not work on Market versions >= 3.0.

On my Samsung Galaxy S2, the latest market app (3.4.4) randomly freezes my entire phone, causing me to have to hold the power button down to reboot. Happens nearly every time I browse for apps in that version. I can "uninstall updates" to get back to the version in /system, but it updates itself to 3.4.4 every time I run it. My goal: prevent the automatic updates.

Plenty of threads here and elsewhere have tips for preventing the updates. The problem is that none if them work for market versions beyond 3.0. I've discovered a method for preventing the updates even on more recent market versions.
  1. Do "uninstall updates" on the market app (in "manage applications").
  2. Open the terminal app.
  3. Run "su" to become root.
  4. Run: touch /data/app/com.android.vending-1.apk
  5. Run: chattr +i /data/app/com.android.vending-1.apk

This will put a bogus APK file in the way of where Android wants to put the new version. The chattr command makes the file "immutable", so that even root can't remove it. Just setting it read only with chmod isn't enough.

This will pin your market to the version included in your ROM. This trick might work if you want to pin a version that's already in /data/app, if you skip the "uninstall updates" and the "touch" command... Haven't tested this.
The Following 15 Users Say Thank You to lexelby For This Useful Post: [ Click to Expand ]
 
AeroToxin
Old
(Last edited by AeroToxin; 6th January 2012 at 10:24 PM.)
#2  
Member
Thanks Meter 2
Posts: 34
Join Date: Mar 2011
I tried it, but it said "chattr: command not found".
 
Kidd_Funkadelic
Old
#3  
Senior Member
Thanks Meter 23
Posts: 238
Join Date: Mar 2011
Quote:
Originally Posted by lexelby View Post
On my Samsung Galaxy S2, the latest market app (3.4.4) randomly freezes my entire phone, causing me to have to hold the power button down to reboot. Happens nearly every time I browse for apps in that version. I can "uninstall updates" to get back to the version in /system, but it updates itself to 3.4.4 every time I run it. My goal: prevent the automatic updates.

Plenty of threads here and elsewhere have tips for preventing the updates. The problem is that none if them work for market versions beyond 3.0. I've discovered a method for preventing the updates even on more recent market versions.
  1. Do "uninstall updates" on the market app (in "manage applications").
  2. Open the terminal app.
  3. Run "su" to become root.
  4. Run: touch /data/app/com.android.vending-1.apk
  5. Run: chattr +i /data/app/com.android.vending-1.apk

This will put a bogus APK file in the way of where Android wants to put the new version. The chattr command makes the file "immutable", so that even root can't remove it. Just setting it read only with chmod isn't enough.

This will pin your market to the version included in your ROM. This trick might work if you want to pin a version that's already in /data/app, if you skip the "uninstall updates" and the "touch" command... Haven't tested this.
I've had the same problem and this looks quite promising, but I have the same problem w/ chattr not found. What terminal app are you running?
 
lexelby
Old
(Last edited by lexelby; 9th January 2012 at 10:07 PM.)
#4  
Member - OP
Thanks Meter 49
Posts: 66
Join Date: Jan 2012
Oops, should have mentioned... You'll need busybox installed. It'll include the chattr command.
The Following User Says Thank You to lexelby For This Useful Post: [ Click to Expand ]
 
Donmeister85
Old
#5  
Donmeister85's Avatar
Senior Member
Thanks Meter 22
Posts: 194
Join Date: Jan 2011
Location: Pikeville, NC
Quote:
Originally Posted by lexelby View Post
On my Samsung Galaxy S2, the latest market app (3.4.4) randomly freezes my entire phone, causing me to have to hold the power button down to reboot. Happens nearly every time I browse for apps in that version. I can "uninstall updates" to get back to the version in /system, but it updates itself to 3.4.4 every time I run it. My goal: prevent the automatic updates.

Plenty of threads here and elsewhere have tips for preventing the updates. The problem is that none if them work for market versions beyond 3.0. I've discovered a method for preventing the updates even on more recent market versions.
  1. Do "uninstall updates" on the market app (in "manage applications").
  2. Open the terminal app.
  3. Run "su" to become root.
  4. Run: touch /data/app/com.android.vending-1.apk
  5. Run: chattr +i /data/app/com.android.vending-1.apk

This will put a bogus APK file in the way of where Android wants to put the new version. The chattr command makes the file "immutable", so that even root can't remove it. Just setting it read only with chmod isn't enough.

This will pin your market to the version included in your ROM. This trick might work if you want to pin a version that's already in /data/app, if you skip the "uninstall updates" and the "touch" command... Haven't tested this.
Ok, I'm back to version 3.1.3. I really hope this works! This market freeze problem has been driving me nuts. This has been the first time I've become overly frustrated with Android. If a version of the market isn't working correctly on our phones, we should be able to run whatever version of the market we want without it automatically updating and forcing you to use the latest version.
The Following User Says Thank You to Donmeister85 For This Useful Post: [ Click to Expand ]
 
lexelby
Old
#6  
Member - OP
Thanks Meter 49
Posts: 66
Join Date: Jan 2012
Oh!! You have the freezing too? I searched all over but I couldn't find anyone else describing the same freezes. What device/ROM are you on?
 
Donmeister85
Old
#7  
Donmeister85's Avatar
Senior Member
Thanks Meter 22
Posts: 194
Join Date: Jan 2011
Location: Pikeville, NC
Quote:
Originally Posted by lexelby View Post
Oh!! You have the freezing too? I searched all over but I couldn't find anyone else describing the same freezes. What device/ROM are you on?
I'm currently on CM7 using the AT&T Galaxy S2. I try MIUI from time to time to see if the issue has been resolved, but it hasn't. I had my first market lockup on CM7 today. It's been frustrating the living hell out of me. I tried your suggestion and the market still updated. Hasn't locked up yet, but I haven't spent a lot of time on my phone either.

Any other alternatives? Did the proposed solution work for you?
 
lexelby
Old
#8  
Member - OP
Thanks Meter 49
Posts: 66
Join Date: Jan 2012
Sounds like you and I have the exact same phone, carrier, and ROM. The fix did work for me... Hasn't updated since. Maybe try removing Market Updater with Titanium Backup too. Perhaps it falls back to that to update if the builtin mechanism fails... Not sure. You could also try the process again, but be super sure you close Market, "uninstall updates", and then do the touch and chattr. If all else fails you could take a screen video (can we do that on Android?) and I'll watch to see if maybe there's a step I missed.
 
lexelby
Old
#9  
Member - OP
Thanks Meter 49
Posts: 66
Join Date: Jan 2012
Also, after going through the steps, run these and paste in the results:

ls -l /data/app/com.android.vending-1.apk
lsattr /data/app/com.android.vending-1.apk
 
Donmeister85
Old
(Last edited by Donmeister85; 11th January 2012 at 12:43 PM.)
#10  
Donmeister85's Avatar
Senior Member
Thanks Meter 22
Posts: 194
Join Date: Jan 2011
Location: Pikeville, NC
Ok, I'm going to try all of this later today when I get a chance. Will post back with an update asap.

Also, do you remember the results that came up after running every command? I'm going to try to post everything that comes up so you can take a look for yourself.

How long have you been running the market without it updating? I know quite a few people that could benefit from this if it works consistsntly. We are not some rare group. This is a pretty widespread issue here.

Sent from my SGH-I777 using Tapatalk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes