MoDaCo is undergoing planned maintenance. Site functionality may be reduced - follow @modaco or @paulobrien on Twitter for updates.

  • Announcements

    • Reminder - MoDaCo position on illegal content

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such software
      Nintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)


      CUSTOM ROMS

      You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not be hosted directly in topic via the MoDaCo attachment system
      ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)
      ROMs must give full credit to the original author
      This decision has been taken in light of the huge amount of interest in this area of device customisation within the community, and member feedback! Please note that custom ROM discussion should be kept in specific device sub-areas, (e.g. Kaiser.MoDaCo.com for Kaiser based devices). ISSUES If you have any issues with this policy, please contact me directly via PM. P
    • Support MoDaCo by signing up to a MoDaCo Silver or Gold membership

      To sign up to an annual MoDaCo Silver subscription which will eliminate all ads from the site (as well as giving you access to the MoDaCo Online Kitchens for Android) for only £9.99 using PayPal, Credit or Debit Card, ensure you are logged in to the site, and then click the link below, which will take you directly to the subscription store! You can also sign up to an annual MoDaCo Gold subscription for £29.99, which adds the benefits listed below! PURCHASE A MODACO SUBSCRIPTION - FREE Titanium Backup Mobile for Android worth $5.99! - FREE 1 year PrivateInternetAccess.com worth $39.95! - FREE 1 year LastPass Premium worth $12! - FREE CalcConvert for Pocket PC from Binaryfish worth $17.95! - FREE Calendar Bar for Pocket PC from OmegaOne worth $9.99! - FREE CamerAware for Pocket PC and Smartphone from MoDaCo worth £19.99 / $30! - FREE Chronos for Pocket PC from ActiveKitten worth $14.95! - FREE CodeWallet Pro for Smartphone and Pocket PC from DeveloperOne worth up to $24.95! - FREE Concentrix for Pocket PC from eSoft Interactive worth $9.95! - FREE FlexMail for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE FTouchSL for Pocket PC from Vekoff s.r.o. worth 10 euro / $12.50! - FREE Jewel Challenge for Pocket PC from eSoft Interactive worth $9.95! - FREE John Cody's Alerts Pro for Smartphone from Omnisoft worth $14.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Dutch for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> French for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> German for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Italian for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Spanish for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Dutch for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> French for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> German for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Russian for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Turkish for Smartphone from Lingvosoft worth $49.95! - FREE Note2Self for Pocket PC and Smartphone from WebIS worth up to $19.90! - FREE Opera 8.60 for Pocket PC and Smartphone from Opera Software worth up to $48! - FREE Pocket Informant for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE Pocket Launcher for Pocket PC and Smartphone from Conduits worth $9.95! - FREE PTab for Pocket PC and Smartphone from z4soft worth up to $60! - FREE Resco Explorer for Pocket PC and Smartphone from Resco worth up to $49.90! - FREE Safemode for Pocket PC from monocube worth $12.95 - FREE SplashPhoto for Pocket PC and Smartphone from SplashData worth up to $59.90! - FREE Sprite Backup for Pocket PC and Smartphone from Sprite Software worth $29.95! - FREE Teksoft Glyphs UI for Pocket PC and Smartphone from Teksoft €9.95! - FREE Teksoft HeadsetRemote for Pocket PC and Smartphone from Teksoft €4.95! - FREE Traffic Jam for Pocket PC from eSoft Interactive worth $9.95! - FREE unlock (1 per year) from imei-check.co.uk - DISCOUNT of 10% at MoDaCo FairDeal - DISCOUNT of 10% at Semsons.com - FORUM - AD FREE SITE - FORUM - custom rank / title - FORUM - double competition entries - FORUM - double post attachment space - FORUM - no search flood control - FORUM - priority event registration - FORUM - triple PM space
    • Reminder: Selling items on the forum directly is not allowed

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspensions / ban.

Universal MVNO patch

50 posts in this topic

Posted · Report post

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.

framework_mvno_patch.zip

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Someone?????

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

  • 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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

thanks for this, i just installed it to fish and chips rom and it works just fine :D

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Y have taken the framework.jar from the cooked rom I have followed the steps but there is no internal folder inside out/android/.

There is a path \out\com\android\internal\telephony\gsm but then there is no GSMServieTracker.smali. I have founded a GSMServiceStateTRacker.smali but I cannot find the lines of code inside.

Also there is 3 more files in the path GSMServiceStateTRacker$1.smali GSMServiceStateTRacker$2.smali GSMServiceStateTRacker$3.smali but again I cannot find the lines inside.

I am talking about a HTC desire just to clear confusion, so I guess I will hace to stay with my Roaming, It´s a pain because I am living close to the border and sometimes is taking the foreign country network and giving my a nice extra charges on my bill.

Thanks anyway guys.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Sorry for my ignorance and my English, but what steps I need to do exactly? On my linux box, if I do

$ patch framework.jar frameworkmvno.diff

I get

patching framework jar file.

1 Hunk FAILED at 1,457.

1 out of 1 hunk FAILED--saving rejects to file framework.jar.rej

or with

$ patch classes.dex frameworkmvno.diff

a similar error.

And with

$ java –jar smali-1.2.8.jar –o out classes.dex

I get

Exception in thread main java.lang.NoClassDefFoundError:-jar

Caused by: java.lang.ClassNotFoundException:-jar

at java.net. URLClassLoader1. run (java URLClassLoader.: 217)

at Java.Security. AccessController. doPrivileged (Native Method)

at java.net. URLClassLoader. findClass (java URLClassLoader.: 205)

at java ClassLoader lang.. loadClass (java ClassLoader.: 321)

at sun. misc. LauncherAppClassLoader. loadClass (java Launcher.: 294)

at java ClassLoader lang.. loadClass (java ClassLoader.: 266)

Could not find the main class:-jar. Program will exit.

I have both files, baksmali-1.2.8.jar and smali-1.2.8.jar in the directory, and my Java version:

java version "1.6.0_23"

OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)

OpenJDK Client VM (build 20.0-b11, mixed mode, sharing)

What should I do exactly?

If that is useful, my original framework .jar (MIUI 2.1.6, Desire S) is here:

http://dl.dropbox.co...6/framework.jar

Thank you very much.

Edited by tmallafre
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Y have taken the framework.jar from the cooked rom I have followed the steps but there is no internal folder inside out/android/.

There is a path \out\com\android\internal\telephony\gsm but then there is no GSMServieTracker.smali. I have founded a GSMServiceStateTRacker.smali but I cannot find the lines of code inside.

Also there is 3 more files in the path GSMServiceStateTRacker$1.smali GSMServiceStateTRacker$2.smali GSMServiceStateTRacker$3.smali but again I cannot find the lines inside.

I am talking about a HTC desire just to clear confusion, so I guess I will hace to stay with my Roaming, It´s a pain because I am living close to the border and sometimes is taking the foreign country network and giving my a nice extra charges on my bill.

Thanks anyway guys.

Yes, it's true that the guide is a bit wrong. The .smali file is not at the location in the guide, but somewhere else. I will post a correct guide when I'm home.

Sorry for my ignorance and my English, but what steps I need to do exactly? On my linux box, if I do

don't know how you must do it on linux, the guide is for windows.

Edited by farris12
0

Share this post


Link to post
Share on other sites

Posted · Report post

Y have taken the framework.jar from the cooked rom I have followed the steps but there is no internal folder inside out/android/.

There is a path \out\com\android\internal\telephony\gsm but then there is no GSMServieTracker.smali. I have founded a GSMServiceStateTRacker.smali but I cannot find the lines of code inside.

Also there is 3 more files in the path GSMServiceStateTRacker$1.smali GSMServiceStateTRacker$2.smali GSMServiceStateTRacker$3.smali but again I cannot find the lines inside.

I am talking about a HTC desire just to clear confusion, so I guess I will hace to stay with my Roaming, It´s a pain because I am living close to the border and sometimes is taking the foreign country network and giving my a nice extra charges on my bill.

Thanks anyway guys.

\out\com\android\internal\telephony\gsm\GsmServiceStateTracker.smali

This should be the correct path. The file is about 154kB, the line code that you need to replace starts at 476 (in my .smali file). Maybe you can check again? :)

0

Share this post


Link to post
Share on other sites

Posted · Report post

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.

This should be compatible with the following ROMs:

  • Ginger Stir Fry
  • GingerLeak
  • Swedish Spring
  • Japanese Jellyfish
  • FLB Froyo

Porting this to other ROMs is a five minute job, so just ask me and I'll add them.

Is there / will there be one for Mile High Mountain Pie RLS9 ?

Regards

Manfred

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.