[Guide] Quick and dirty guide to adding WiMax to your CM7-based ports.

Search This thread

v5HMeca

Senior Member
Dec 7, 2007
451
144
Los Angeles
I've had a few folks message me with requests for guidance on how to add 4G WiMax to CM7-based ports. I figured I would go ahead and write up this quick guide on how to do it for LeWa OS. This should be very similar with other ROMs.


Let's start with the easy part.
- Copy /system/app/CMWimaxSettings.apk.
- Copy /system/framework/wimax-api.jar.


Decompile /system/framework/framework-res.apk

Edit ./res/xml/bools.xml
- change config_wimaxEnabled value to true

Edit ./res/xml/strings.xml
- change config_wimaxServiceJarLocation value to /system/framework/wimax-api.jar
- change config_wimaxManagerClassname value to com.htc.net.wimax.WimaxController
- change config_wimaxServiceClassname value to com.android.server.WimaxService

Edit ./res/xml/arrays.xml
- in networkAttributes element, add <item>wimax,6,6,2</item> (I add it after wifi)
- in radioAttributes element, add <item>6,1</item> (I add it to the top)
- in config_tether_upstream_regexs element, add <item>wimax\\d</item> (I add it to the bottom)


Now somewhere (probably Settings.apk), you'll want to add a link to it.

Example from my LeWa OS port:
Code:
    <com.android.settings.IconPreferenceScreen android:title="@string/wimax_settings" android:key="wimax_settings" settings:icon="@drawable/ic_settings_wifi">
        <intent android:targetPackage="com.android.settings.wimax" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.wimax.WimaxSettings" />
    </com.android.settings.IconPreferenceScreen>

.


That should be it.


PS-
While you're in arrays.xml and looking at config_tether_upstream_regexs, you should also look for something like wlan\\d (if it's there, it's probably the second item) and change it to eth\\d if you see it. This will fix tethering.
 

ZzHacks

Senior Member
Jan 21, 2012
463
160
I appreciate this guide shall use this on my aed ios port

Sent from my PC36100 using xda premium
 

monty_python

Senior Member
Dec 31, 2011
512
72
Stupid question, so why are developers not including this did in there work?

Sent from my PC36100 using xda app-developers app
 

v5HMeca

Senior Member
Dec 7, 2007
451
144
Los Angeles
Stupid question, so why are developers not including this did in there work?

Sent from my PC36100 using xda app-developers app
I'd first like to emphasize that this guide is primarily targeted at developers of "CM7-based ports," i.e., taking a ROM that is based on CM7 from one device and bringing to the Evo 4G.

Now to answer your question: It's because device from which they are taking the ROM does not support WiMax and/or is not an HTC phone.


As an example, the version of LeWa OS that I use is made for a Chinese phone (U8800X) that doesn't have built-in WiMax support (and it is not made by HTC). The ROM should not be expected to support WiMax out of the box and certainly shouldn't be expected to use HTC's WiMax API. The developers that are porting the ROM are then tasked with having to shoehorn WiMax support into the ROM. This is a breeze when the ROM is based on CM7 (not nearly as easy when the ROM is, for example, MIUI) because it's just a matter of changing some settings, as demonstrated in the first post.
 
  • Like
Reactions: kz6fittycent

monty_python

Senior Member
Dec 31, 2011
512
72
I'd first like to emphasize that this guide is primarily targeted at developers of "CM7-based ports," i.e., taking a ROM that is based on CM7 from one device and bringing to the Evo 4G.

Now to answer your question: It's because device from which they are taking the ROM does not support WiMax and/or is not an HTC phone.


As an example, the version of LeWa OS that I use is made for a Chinese phone (U8800X) that doesn't have built-in WiMax support (and it is not made by HTC). The ROM should not be expected to support WiMax out of the box and certainly shouldn't be expected to use HTC's WiMax API. The developers that are porting the ROM are then tasked with having to shoehorn WiMax support into the ROM. This is a breeze when the ROM is based on CM7 (not nearly as easy when the ROM is, for example, MIUI) because it's just a matter of changing some settings, as demonstrated in the first post.

Ok, that makes more sense.. thanks for your letting us in on your mod...

Sent from my PC36100 using xda app-developers app
 

kz6fittycent

Senior Member
Sep 1, 2011
190
23
Murfreesboro, TN
I'd first like to emphasize that this guide is primarily targeted at developers of "CM7-based ports," i.e., taking a ROM that is based on CM7 from one device and bringing to the Evo 4G.

Now to answer your question: It's because device from which they are taking the ROM does not support WiMax and/or is not an HTC phone.


As an example, the version of LeWa OS that I use is made for a Chinese phone (U8800X) that doesn't have built-in WiMax support (and it is not made by HTC). The ROM should not be expected to support WiMax out of the box and certainly shouldn't be expected to use HTC's WiMax API. The developers that are porting the ROM are then tasked with having to shoehorn WiMax support into the ROM. This is a breeze when the ROM is based on CM7 (not nearly as easy when the ROM is, for example, MIUI) because it's just a matter of changing some settings, as demonstrated in the first post.

So...any ideas about the MIUI roms? I have been trying to get 4g to work forever. Gave up, and now I'm back at it. I'm using the kitchen btw. I tried including all the libs, jars, etc. from c7 and the phone booted normally, but I got nothing as far as wimax. There was no toggle present so I DL'd one from the market. It stated that my phone wasn't 4g capable. Back to the drawing board.

Do you have any ideas why this isn't working? You mentioned that your method wouldn't be as easy with MIUI. Why? I'm only asking because I'm seeking the education. My research has only rendered complaints from those who want it but can't figure it out. BTW, I'm not a fan of CIUI but I understand their reasons for the departure from MIUI altogether.

Thanks in advance!
 

v5HMeca

Senior Member
Dec 7, 2007
451
144
Los Angeles
So...any ideas about the MIUI roms? I have been trying to get 4g to work forever. Gave up, and now I'm back at it. I'm using the kitchen btw. I tried including all the libs, jars, etc. from c7 and the phone booted normally, but I got nothing as far as wimax. There was no toggle present so I DL'd one from the market. It stated that my phone wasn't 4g capable. Back to the drawing board.

Do you have any ideas why this isn't working? You mentioned that your method wouldn't be as easy with MIUI. Why? I'm only asking because I'm seeking the education. My research has only rendered complaints from those who want it but can't figure it out. BTW, I'm not a fan of CIUI but I understand their reasons for the departure from MIUI altogether.

Thanks in advance!
Yeah, the reason none of this will work in MIUI (or any other ROM not based on CM7) is because these are all just configuration settings. The CM7 framework reads the value of config_wimaxServiceJarLocation so that it knows where to find the WiMax API, for example. MIUI framework would simply ignore that value because it's not programmed to interpret it.

I know fergie and the guys got WiMax working on MIUI on some other device(s). Last I checked, they were working on getting it to work with the Evo 4G as well.
 
  • Like
Reactions: kz6fittycent

the.emilio

Senior Member
LOL I was gonna do this exactly for the JoyOS port. I saw the differences in Decks framework and the JoyOS framework and was like hmmmmmm. I put it off until I got everything else where I wanted it! Good looking out for those who need it for their ports or future ports!! ;)
 

kz6fittycent

Senior Member
Sep 1, 2011
190
23
Murfreesboro, TN
Yeah, the reason none of this will work in MIUI (or any other ROM not based on CM7) is because these are all just configuration settings. The CM7 framework reads the value of config_wimaxServiceJarLocation so that it knows where to find the WiMax API, for example. MIUI framework would simply ignore that value because it's not programmed to interpret it.

I know fergie and the guys got WiMax working on MIUI on some other device(s). Last I checked, they were working on getting it to work with the Evo 4G as well.

So basically I'd need to build a cm7 based miui rom from scratch to make it work...Jeeze.:what:

sent from my o.g.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    I've had a few folks message me with requests for guidance on how to add 4G WiMax to CM7-based ports. I figured I would go ahead and write up this quick guide on how to do it for LeWa OS. This should be very similar with other ROMs.


    Let's start with the easy part.
    - Copy /system/app/CMWimaxSettings.apk.
    - Copy /system/framework/wimax-api.jar.


    Decompile /system/framework/framework-res.apk

    Edit ./res/xml/bools.xml
    - change config_wimaxEnabled value to true

    Edit ./res/xml/strings.xml
    - change config_wimaxServiceJarLocation value to /system/framework/wimax-api.jar
    - change config_wimaxManagerClassname value to com.htc.net.wimax.WimaxController
    - change config_wimaxServiceClassname value to com.android.server.WimaxService

    Edit ./res/xml/arrays.xml
    - in networkAttributes element, add <item>wimax,6,6,2</item> (I add it after wifi)
    - in radioAttributes element, add <item>6,1</item> (I add it to the top)
    - in config_tether_upstream_regexs element, add <item>wimax\\d</item> (I add it to the bottom)


    Now somewhere (probably Settings.apk), you'll want to add a link to it.

    Example from my LeWa OS port:
    Code:
        <com.android.settings.IconPreferenceScreen android:title="@string/wimax_settings" android:key="wimax_settings" settings:icon="@drawable/ic_settings_wifi">
            <intent android:targetPackage="com.android.settings.wimax" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.wimax.WimaxSettings" />
        </com.android.settings.IconPreferenceScreen>
    
    .


    That should be it.


    PS-
    While you're in arrays.xml and looking at config_tether_upstream_regexs, you should also look for something like wlan\\d (if it's there, it's probably the second item) and change it to eth\\d if you see it. This will fix tethering.
    1
    Stupid question, so why are developers not including this did in there work?

    Sent from my PC36100 using xda app-developers app
    I'd first like to emphasize that this guide is primarily targeted at developers of "CM7-based ports," i.e., taking a ROM that is based on CM7 from one device and bringing to the Evo 4G.

    Now to answer your question: It's because device from which they are taking the ROM does not support WiMax and/or is not an HTC phone.


    As an example, the version of LeWa OS that I use is made for a Chinese phone (U8800X) that doesn't have built-in WiMax support (and it is not made by HTC). The ROM should not be expected to support WiMax out of the box and certainly shouldn't be expected to use HTC's WiMax API. The developers that are porting the ROM are then tasked with having to shoehorn WiMax support into the ROM. This is a breeze when the ROM is based on CM7 (not nearly as easy when the ROM is, for example, MIUI) because it's just a matter of changing some settings, as demonstrated in the first post.
    1
    So...any ideas about the MIUI roms? I have been trying to get 4g to work forever. Gave up, and now I'm back at it. I'm using the kitchen btw. I tried including all the libs, jars, etc. from c7 and the phone booted normally, but I got nothing as far as wimax. There was no toggle present so I DL'd one from the market. It stated that my phone wasn't 4g capable. Back to the drawing board.

    Do you have any ideas why this isn't working? You mentioned that your method wouldn't be as easy with MIUI. Why? I'm only asking because I'm seeking the education. My research has only rendered complaints from those who want it but can't figure it out. BTW, I'm not a fan of CIUI but I understand their reasons for the departure from MIUI altogether.

    Thanks in advance!
    Yeah, the reason none of this will work in MIUI (or any other ROM not based on CM7) is because these are all just configuration settings. The CM7 framework reads the value of config_wimaxServiceJarLocation so that it knows where to find the WiMax API, for example. MIUI framework would simply ignore that value because it's not programmed to interpret it.

    I know fergie and the guys got WiMax working on MIUI on some other device(s). Last I checked, they were working on getting it to work with the Evo 4G as well.