1. Download our Official Android App: Forums for Android!

Root Package blocking - MetroPCS

Discussion in 'Android Devices' started by k0nane, Jun 6, 2011.

  1. k0nane

    k0nane Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    803
    Joined:
    Apr 8, 2011

    Apr 8, 2011
    803
    779
    163
    Male
    I do stuff, with things
    127.0.0.1
    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 (Text):
    1. move-object/from16 v0, p1
    2.  
    3. iget-object v0, v0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
    4.  
    5. move-object v5, v0
    6.  
    7. const-string v6, "android.tether"
    8.  
    9. invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    10.  
    11. move-result v5
    12.  
    13. if-nez v5, :cond_184
    14.  
    15. move-object/from16 v0, p1
    16.  
    17. iget-object v0, v0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
    18.  
    19. move-object v5, v0
    20.  
    21. const-string v6, "com.noshufou.android.su"
    22.  
    23. invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    24.  
    25. move-result v5
    26.  
    27. if-nez v5, :cond_184
    28.  
    29. move-object/from16 v0, p1
    30.  
    31. iget-object v0, v0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
    32.  
    33. move-object v5, v0
    34.  
    35. const-string v6, "com.pdanet"
    36.  
    37. invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    38.  
    39. move-result v5
    40.  
    41. 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...

    [​IMG]

    Here's a little message for MetroPCS.
     

    Advertisement

  2. k0nane

    k0nane Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    803
    Joined:
    Apr 8, 2011

    Apr 8, 2011
    803
    779
    163
    Male
    I do stuff, with things
    127.0.0.1
    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.
     
    wilsonbx198st likes this.
  3. wilsonbx198st

    wilsonbx198st Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    148
    Joined:
    Jan 12, 2011

    Jan 12, 2011
    148
    10
    38
    police officer
    bronx,ny
    yo, keep it up!!!!
     
  4. ciper

    ciper Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    368
    Joined:
    Mar 31, 2011

    Mar 31, 2011
    368
    83
    53
    Good job. Now the phone will be more idiot proof since people can now update their superuser app and su binary
     
  5. indulge

    indulge Member
    Rank:
    None
    Points:
    15
    Posts:
    53
    Joined:
    Mar 10, 2011

    Mar 10, 2011
    53
    0
    15
    Help Desk Tech
    Pontiac Mi
    I think ill just wait for the custom rom to come out :)
     
  6. k0nane

    k0nane Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    803
    Joined:
    Apr 8, 2011

    Apr 8, 2011
    803
    779
    163
    Male
    I do stuff, with things
    127.0.0.1
    There's no other option here. ;)
     
  7. TRS-80

    TRS-80 Android Enthusiast
    Rank:
    None
    Points:
    83
    Posts:
    404
    Joined:
    Dec 29, 2010



     
  8. INSURGENCY

    INSURGENCY Member
    Rank:
    None
    Points:
    16
    Posts:
    48
    Joined:
    May 20, 2011

    May 20, 2011
    48
    7
    16
    Can you please explain this in ..... english? thanx.
     
  9. ciper

    ciper Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    368
    Joined:
    Mar 31, 2011

    Mar 31, 2011
    368
    83
    53
    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.
     
  10. INSURGENCY

    INSURGENCY Member
    Rank:
    None
    Points:
    16
    Posts:
    48
    Joined:
    May 20, 2011

    May 20, 2011
    48
    7
    16
  11. baysiderider

    baysiderider Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    104
    Joined:
    Feb 18, 2011

    Feb 18, 2011
    104
    17
    38
    Hayward Ca
    was this already in the one click root he built or will this come in the custom rom
     
  12. k0nane

    k0nane Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    803
    Joined:
    Apr 8, 2011

    Apr 8, 2011
    803
    779
    163
    Male
    I do stuff, with things
    127.0.0.1
    In the ROM. The one click does what it says on the tin.
     
  13. zimlokks

    zimlokks Android Expert
    Rank:
    None
    Points:
    113
    Posts:
    750
    Joined:
    Oct 12, 2011

    Oct 12, 2011
    750
    244
    113
    Male
    Fish Distribution! :D
    Los Angeles
    can this be applied to a stock rom well i mean the changes in the service.jar
     

Share This Page

Loading...