Jump to content


Photo

Universal MVNO patch

- - - - -

  • Please log in to reply
49 replies to this topic

#1
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts
Those of you using MVNOs (mobile virtual network operators, e.g. budget brands of big networks) probably know that you need to enable data roaming to get the data connection to work (unless specific RIL libs exist like for Saunalahti). This is quite annoying when you travel abroad, because you need to disable it manually to avoid expensive roaming bills.

CyanogenMod has a useful feature called "national roaming", which enables roaming to all providers in one's home country, while disabling it internationally. Unfortunately, such a thing doesn't exist in standard Android builds. Since I'm going to need it next week, I hacked framework.jar to work the same way as CyanogenMod's national roaming. I tested it with a foreign SIM and it does indeed work.

This should be compatible with the following ROMs:
  • Ginger Stir Fry
  • GingerLeak
  • Swedish Spring
  • Japanese Jellyfish
  • FLB Froyo
If you're using a ROM based on any of these, chances are it will work too, since the only relevant file is framework.jar. Trying it doesn't hurt, since it compares the MD5 checksum before changing anything. It also doesn't matter if your phone is Gen1 or Gen2. Porting this to other ROMs is a five minute job, so just ask me and I'll add them.

BIG FAT WARNING: In some countries (USA IIRC, maybe others), some operators let you roam onto their networks even at home. So don't install this unless you know you can safely (and need to, otherwise it's useless) enable roaming at home without incurring any additional costs!

Download here: http://www.multiupload.com/FJX94XCC13
You don't need to download the attachment to this post if you just want to use it.

If you're interested in how it works, I'm patching isRoamingBetweenOperators() in the GsmServiceStateTracker class to rely on the MCC only and ignore the carrier name. I've attached the patch so you can port it yourself using smali/baksmali.

Attached File  framework_mvno_patch.zip   404bytes   165 downloads

  • 0

#2
sambartle

sambartle

    Enthusiast

  • Members
  • PipPipPip
  • 204 posts
  • Gender:Male
  • Location:Sheffield
  • Devices:Acer Liquid Metal
  • Twitter:@sambartle
Awesome work.. Useful in the UK for Orange and T-Mo users as they can share each others network now..

Another great post from leromarinvit after fixing the touch issues.. fancy a crack at the CM7 GPS Reboot issue? :)

  • 0
3 UK Acer Liquid Metal, Silver, B10 - ROM: Modified Stock 2.3.6
orange ZTE Blade Gen 2 (Converted), Grey, B10 - ROM: CM7 Nightly SBUK Mod
orange HTC Hero - ROM: Modaco v5, Radio:63.18.55.06PU_6.35.15.11
orange HTC TyTN II / Kaiser - ROM: Custom SBUK_V3
orange HTC SPV M3100 / Hermes - ROM: Custom SBUK_V8

#3
Lacra

Lacra

    Newbie

  • Members
  • Pip
  • 6 posts
On the previous Android version (v2.3.4) this patch corrected the MVNO issue flawlessly. Recently, ZTE has released Android v2.3.5 for their Blade / San Francisco devices. It performs very nicely I must say. Nevertheless, the MVNO issue has not been corrected. I've tried to install the MVNO Patch v1.0 and it's aborted during the process, I presume that it's incompatible with it. Will you release an updated version capable of dealing with v2.3.5? Thanks a lot !

  • 0

#4
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts
Here you go: http://www.multiupload.com/J33E4CEITV

As always, remeber to make a backup before applying!

  • 0

#5
Lacra

Lacra

    Newbie

  • Members
  • Pip
  • 6 posts
Hey! Thank you!!! That was quick! I applied the 'mvno-v3.zip' patch but it returned the following error:
Error: no matching framework found!
Therefore, I tried to install 'framework_mvno_patch.zip' you offered above but it aborted. I'm kinda stuck here.
Am I doing something wrong?
Thanks again!!

  • 0

#6
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts
Hmm, which 2.3.5 ROM are you using, and which add-ons if any? Theoretically it should work on LibraGinger, Moldovan Mile-High Mountain, and this "gen3" mod. But I didn't test the install package, I only checked that the framework patch itself still works on 2.3.5 (tried it with LibraGInger).

The only 2.3.5 ROM it shouldn't work on is the original image.bin version, since it's odexed and I've never messed with that particular beast before.

  • 0

#7
Lacra

Lacra

    Newbie

  • Members
  • Pip
  • 6 posts
Bull's eye! I'm afraid I'm using an original image.bin version, but I'm not quite sure. Is there an easy way to find that out? Thanks.

  • 0

#8
Lacra

Lacra

    Newbie

  • Members
  • Pip
  • 6 posts
Bull's eye! I'm afraid I'm using an original image.bin version, but I'm not quite sure. Is there an easy way to find that out? Thanks.

  • 0

#9
unrandomsam

unrandomsam

    Addict

  • Members
  • PipPipPipPipPip
  • 916 posts
  • Gender:Not Telling
  • Devices:Xperia Play / Xoom / ZTE Blade

Bull's eye! I'm afraid I'm using an original image.bin version, but I'm not quite sure. Is there an easy way to find that out? Thanks.


Check in /system/framework for odex files.

  • 0

#10
Lacra

Lacra

    Newbie

  • Members
  • Pip
  • 6 posts
Hi, There is no 'odex' files. All of the files ther are '.jar' files. The closest I could find is the file 'java.obex.jar'.
Regards

  • 0

#11
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts

Hi, There is no 'odex' files. All of the files ther are '.jar' files. The closest I could find is the file 'java.obex.jar'.
Regards

Then it doesn't look like you're using the original version. What does the Build Number in Settings -> Phone Info (or something similar) say?

  • 0

#12
Lacra

Lacra

    Newbie

  • Members
  • Pip
  • 6 posts
Model Number: ZTE-BLADE
Android Version: 2.3.5
Base Band Version: P729B01
Kernel Version: 2.6.35.7-perf+zte-kernel@Zdroid-SMT
Compilation Number: ZTE-BLADEV1.0.0B01

I hope this info be useful for you.
Thanks again

  • 0

#13
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts
Can you make this for a MIUI ROM or teach me how to do it? I tried to do it myself, but I don't understand anything of the GsmServiceStateTracker.smali file and how to add my virtual provider.

  • 0

#14
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts
Someone?????

  • 0

#15
betaboxmd

betaboxmd

    Newbie

  • Members
  • Pip
  • 3 posts
  • Devices:ZTE Blade
  • Extract framework.jar from your Rom-Zip file, you will get Meta-inf folder, Classes.dex , Preloaded-classes

  • java –jar baksmali-1.2.8.jar –o out classes.dex
    -> new folder out


  • Open file out\android\internal\telephony\gsm\GSMServieTracker.smali with a text editor of your choice
  • Search for the following lines

    if-eqz v0, :cond_49
    if-nez v1, :cond_4f
    if-nez v2, :cond_4f
    :cond_49
    move v8
    , V12

    and replace the two lines

    if-nez v1, :cond_4f
    if-nez v2, :cond_4f

    with

    goto :cond_4f



  • java –Xmx512M –jar smali-1.2.8.jar out\ -o newclasses.dex

  • rename newclasses.dex to classes.dex and
    replace the original classes.dex in your framework.jar with the new classes.dex

  • replace framwork.jar in your ROM-Zip file


Edited by betaboxmd, 05 December 2011 - 08:11 PM.

  • 0

#16
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts
Sweet!!!!! I'm not roaming anymore!!!! I'm wondering if it switches to roaming when I travel abroad.. but this is good enough for me! Especially for Spotify.. it keeps nagging me that I was roaming.. I don't care ;)

But now it works!! Thanks!!

  • 0

#17
ManMetDeHamer

ManMetDeHamer

    Diehard

  • MoDaCo Silver
  • PipPipPipPip
  • 347 posts
  • Gender:Male
  • Location:Netherlands
  • Devices:ZTE Blade
thanks for this, i just installed it to fish and chips rom and it works just fine :D

  • 0
Running:
Swedish Snow RLS3
With Nemus launcher!

#18
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts
I've made a .bat file to automate some of the command. The only thing you have to do is copy the framework.jar into the right folder, and replace the lines, the rest is done automatically. If there's any interest, I can post it here.

  • 0

#19
fortunados

fortunados

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:p3300
WOuld it be possible to apply this patch to HTC desire with a cooked rom ?

I have looked everywhere about how to solve this problem mith MVNO but there is no way

When you say

Extract framework.jar from your Rom-Zip file


It is from the cooked rom zip file before install ??


It means that after that I have to reinstal the rom or to modify the patch ?


Thx

  • 0

#20
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts

WOuld it be possible to apply this patch to HTC desire with a cooked rom ?

I have looked everywhere about how to solve this problem mith MVNO but there is no way

When you say

Extract framework.jar from your Rom-Zip file


It is from the cooked rom zip file before install ??


It means that after that I have to reinstal the rom or to modify the patch ?


Thx

Just get the framework.jar from the /system/framework folder once you have your ROM installed. It isn't neccessary to do it in advance.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users