Jump to content


Photo

Universal MVNO patch

- - - - -

  • Please log in to reply
49 replies to this topic

#21
fortunados

fortunados

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:p3300

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

#22
tmallafre

tmallafre

    Newbie

  • Members
  • Pip
  • 1 posts
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, 17 January 2012 - 10:38 PM.

  • 0

#23
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts

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, 18 January 2012 - 10:01 AM.

  • 0

#24
farris12

farris12

    Newbie

  • Members
  • Pip
  • 9 posts

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

#25
malfare

malfare

    Newbie

  • Members
  • Pip
  • 11 posts
  • Devices:ZTE Blade

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

#26
McGiverGim

McGiverGim

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:LG Optimus 2x P990
Hi! I'm very interested in your patch, but I cannot apply it to my file. I didn't find the lines you said. If you can help me here you have my file:

http://www.box.com/s...6fnjgrarjvt9do9

Thanks!

  • 0

#27
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts

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

Regards
Manfred

The last version I uploaded should work, since RLS9's framework is the same as RLS3, which was already included. Unfortunately, Multiupload seems to be down, so I uploaded it again here: http://www.mediafire...5mxlqvegr6vaw4u


Hi! I'm very interested in your patch, but I cannot apply it to my file. I didn't find the lines you said. If you can help me here you have my file:

http://www.box.com/s...6fnjgrarjvt9do9

Thanks!

Hmm, what ROM is that from? It seems very different from all the others I've seen, and it already contains references to national roaming. Is that CM? If so, the setting should be available in the UI.

  • 0

#28
McGiverGim

McGiverGim

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:LG Optimus 2x P990
Is v20o from LG for Optimus 2x, ginger v2.3.4...

I've seen what you say of national roaming, but it didn't work for sure ;-)

  • 0

#29
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts
Could you try this? If possible, please also test it with a foreign SIM to see if it still detects real roaming.

Attached File  2x.zip   41.07KB   13 downloads

  • 0

#30
McGiverGim

McGiverGim

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:LG Optimus 2x P990
I'm out of home, tomorrow I will try it.

Thanks!

  • 0

#31
malfare

malfare

    Newbie

  • Members
  • Pip
  • 11 posts
  • Devices:ZTE Blade
Hi leromarinvit!

The last version I uploaded should work, since RLS9's framework is the same as RLS3, which was already included. Unfortunately, Multiupload seems to be down, so I uploaded it again here: http://www.mediafire...5mxlqvegr6vaw4u


Thank you very much!

Downloaded, installed, works.

Regards
Manfred

  • 0

#32
McGiverGim

McGiverGim

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:LG Optimus 2x P990

Could you try this? If possible, please also test it with a foreign SIM to see if it still detects real roaming.

Attached File  2x.zip   41.07KB   13 downloads


Hi! I've installed new ROM version v20q. The file is a little differente from v20o, but I've made the same modification than you in v20q and... ¡¡it works!!

I can not try with a foreign SIM (I've not one), but I will put the mod in a spanish forum to see if someone could try. I've made a CWM install package for anyone who wants to try.

If it helps:
Framework original for LG Optimus 2x v20q: http://www.box.com/s...67q1putre8vjuto
Framework modified for LG Optimus 2x v20q: http://www.box.com/s...q6rreo0lln3haic

Thanks!!!

Edited by McGiverGim, 20 February 2012 - 10:24 AM.

  • 0

#33
McGiverGim

McGiverGim

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:LG Optimus 2x P990
I've observed one strange thing with the patch...

My SIM is from Simyo (a MVNO of Orange).

When I'm connected to the bluetooth of my car, or I take a look at the "about" menu of the phone, the net that appears is "Orange".

When I do the same with a Galaxy S (with correct MVNO support out of the box), the net that appears is "Simyo".

i don't know if it is better or worst one or another. Some advice?

Regards and thanks for all!!

  • 0

#34
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts

I've observed one strange thing with the patch...

My SIM is from Simyo (a MVNO of Orange).

When I'm connected to the bluetooth of my car, or I take a look at the "about" menu of the phone, the net that appears is "Orange".

When I do the same with a Galaxy S (with correct MVNO support out of the box), the net that appears is "Simyo".

i don't know if it is better or worst one or another. Some advice?

Regards and thanks for all!!

Looks like it's displaying the operator name from the network rather than the SIM card, or maybe the other way round. No idea why, it works for me. It could probably be patched somehow, but I'm virtually certain it's only a cosmetic problem.

  • 0

#35
Barleyman

Barleyman

    Regular

  • Members
  • PipPip
  • 52 posts
  • Gender:Male
  • Devices:Huawei X5, Nook Color

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.


What about modifying the code to bypass operator code only if the country code is "safe"? That would make it more acceptable to include into actual roms. I know Finland is ok, wouldn't presume to say anything else is.

  • 0

#36
leromarinvit

leromarinvit

    Regular

  • Members
  • PipPip
  • 77 posts

What about modifying the code to bypass operator code only if the country code is "safe"? That would make it more acceptable to include into actual roms. I know Finland is ok, wouldn't presume to say anything else is.

I suppose that would be possible, but creating and maintaining such a whitelist sounds like an awful lot of work. Maybe we should have a look at Samsung's framework to see how they handle this.

  • 0

#37
Barleyman

Barleyman

    Regular

  • Members
  • PipPip
  • 52 posts
  • Gender:Male
  • Devices:Huawei X5, Nook Color

I suppose that would be possible, but creating and maintaining such a whitelist sounds like an awful lot of work. Maybe we should have a look at Samsung's framework to see how they handle this.


It's not really something that needs to be "maintained" much, not like the network operators change their domestic roaming policies like that. The blanked "allow domestic roaming" is too dangerous to put into stock roms', "whitelisted country codes can do domestic roaming" -fix should be something that can become standard in Cyanogenmod et al.

In any case if we get a code example, it should be easy enough for an educated layman to expand the safe list..

  • 0

#38
fortunados

fortunados

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:p3300
Well I am working in a cooked rom is Aurora 4.1 and the phone is a HTC desire

Here is a pastebin of my GsmServiceStateTracker.smali

http://pastebin.com/TM5FN46M

My file is quite larger about 344 kb and I cannot seem to find the lines in it.

This thing is driving me crazy , 2 days ago I was close to the border with other country and they charged me 4 Euros for 20 kbs !!! and there is no way to arrange this.

Any help is highlyapprecciated.

Thanks a lot.

  • 0

#39
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,654 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio

Well I am working in a cooked rom is Aurora 4.1 and the phone is a HTC desire

Here is a pastebin of my GsmServiceStateTracker.smali

http://pastebin.com/TM5FN46M

My file is quite larger about 344 kb and I cannot seem to find the lines in it.

This thing is driving me crazy , 2 days ago I was close to the border with other country and they charged me 4 Euros for 20 kbs !!! and there is no way to arrange this.

Any help is highlyapprecciated.

Thanks a lot.

Look at lines 1527 and 1529. Remove and replace with "goto :cond_51".

  • 0

#40
Barleyman

Barleyman

    Regular

  • Members
  • PipPip
  • 52 posts
  • Gender:Male
  • Devices:Huawei X5, Nook Color
More on this business of whitelisting.

It occurs to me that hardcoding something like this is a poor solution. A tryly elegant way would be to read MVNO/MCC pairs from a text file which could be updated independently of frmware version etc. Now JAVA isn't my strong point, never mind android guts, I do not know how difficult it'd be to implement something like this. My overall feeling from JAVA is that it's the preventer of programmer so turning an exteral text file into internal array might be harder than you'd think.

Something like that could very well become a standard feature of custom roms unlike the current shotgun method.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users