• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Package blocking - MetroPCS

k0nane

Android Expert
I found the source of the root headaches while digging through smali - in server.jar > com > android > server > PackageManagerService.smali, a conditional in the scanPackageLI method has the following:

Code:
move-object/from16 v0, p1

iget-object v0, v0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;

move-object v5, v0

const-string v6, "android.tether"

invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v5

if-nez v5, :cond_184

move-object/from16 v0, p1

iget-object v0, v0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;

move-object v5, v0

const-string v6, "com.noshufou.android.su"

invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v5

if-nez v5, :cond_184

move-object/from16 v0, p1

iget-object v0, v0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;

move-object v5, v0

const-string v6, "com.pdanet"

invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v5

if-eqz v5, :cond_190
Yep - that's exactly what it looks like. We were indeed right the first time - package installation of Superuser (and as you can see, others) is being blocked.

Unfortunately for them, I removed Carrier IQ on Sprint. This is a cakewalk. It's possible to remove this conditional altogether, but more hassle than it's worth. Instead, I replaced the package names with some pithy messages. After a little cleanup, and a reroot with stock Superuser and its standard su binary...

pJNZy.png


Here's a little message for MetroPCS.
 
Reserved. Also, this change has been made as a part of the in-development custom ROM.

It's also important to note that while I'm all but obligated to tease Samsung, it's not their fault that this is there. MetroPCS is Samsung's customer - and when Metro says "jump", Samsung says "how high". I can say with reasonable confidence that they would not put this sort of mechanism in unless they had to.
 
Good job. Now the phone will be more idiot proof since people can now update their superuser app and su binary
 
The phone has a piece of software that looks for the name of common tethering applications and blocks them. K0nane found this and changed the names it was looking for so that the phone wont block you from installing them anymore.
 
Back
Top Bottom