yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] pfak:
I believe that the radio on the device needs to match the version of the RIL (Radio Interface Layer.) Usually when you flash an RUU or update, it contains a radio firmware (radio.img) as well as associated RIL files. However, when you flash CyanogenMod or other third party ROM files they do not contain a matching radio, which means that your RIL and Radio can have interfaces that do not match causing issues.

My Google Spreadsheet (select "libhtc_ril.so" tab at the bottom of the spreadsheet) has a list of the various options associated with a RIL and Radio combination, including what RUU they are from. Which shows that RIL and Radio probably need to match.

This procedure may not work properly with CyanogenMod 7 (Android 2.3)!

I consider RIL files as the following on your Android system:

/lib/system/libhtc_ril.so

/lib/system/libril.so

/lib/system/libreference-ril.so

/lib/system/libganril.so

Conclusion: RIL files need to match the Radio you have flashed to have maximum compatibility!

Posts to Read

Flashable "Radio to RIL automatcher" which is ROM agnostic for matching your RIL to RADIO (by myself and rmk)

Stable RIL and Radio combination known to work with CyanogenMod 6.1.1 on HTC Vision

/system/build.prop settings to enable standard HTC Vision network performance and features on CyanogenMod 6.1.1

Radio & RIL Combination

2010-09-15 26.02.01.15_M2 (TMOUS 1.19.531.1) (MD5: 131444f66f3fd7ed62639cd5b291e988)

2010-09-24 26.02.00.24_M2 (WWE 1.22.405.1) (MD5: dc9fe8f440db4f609cb613d9510dcd21)

2010-10-08 26.03.02.08_M (WWE 1.31.405.1) (MD5: 1f96f09dc4a2b9383a7479fc6e21d46e)

2010-10-18 26.03.02.18_M3 (Asia HK CHT 1.34.708.3) (MD5: a70ee4f4b43011bb0efe209f86e97916)

2010-10-18 26.03.02.18_M3 (Asia India 1.34.720.3) (MD5: 3a02f88d1a8c2c6e7007ebc956ed6adc)

2010-10-18 26.03.02.18_M3 (Asia TW 1.34.709.3) (MD5: c668f5a9eea3c741aaa73d7f91e2d64c)

2010-10-18 26.03.02.18_M3 (BellMobility WWE 1.34.666.1) (MD5: 4b903470a1a020eee1aed59a8f88646e)

2010-10-18 26.03.02.18_M3 (WWE 1.34.405.3) (MD5: 7800526f22d74bb358e9702f18a00a87)

2010-10-26 26.03.02.26_M (WWE 1.34.405.5) (MD5: b89ccc5754e6b01090705d606b00dee2)

2010-11-17 26.04.02.17_M2 (Egypt 1.72.466.4) (MD5: 199cd21cbdc450c2ea1b0b839ed913fc)

2010-11-17 26.04.02.17_M2 (WWE 1.72.405.2) (MD5: 26991574aa541933e5e64de7b00314b7)

2010-12-20 26.04.02.17_M2 (ARA 1.83.415.2) (MD5: 4475dd875e20d37dc16c0e4a789b7685)

2010-12-20 26.04.02.17_M2 (Orange FR-B2B 1.85.73.2) (MD5: e6497a697f875bbc33a56be2cc71c669)

2010-12-20 26.04.02.17_M2 (WWE 1.82.405.1) (MD5: 4da76bb61684733f6c833eb5da17783c)

2011-01-27 26.06.02.27_M (Hutch AUS 1.85.861.3) (MD5: e699a37d4d7b9b26d5eaadf8e69be7dd)
[G2 and Desire Z Android Development] schaggo:
But, am I correct in assuming that those settings do not matter if not used by the ROM in use on the device?

I mean, obviously the CM libhtc_ril.so behaves exactly like the T-Mobile USA one. So by using a CM flavoured ROM we quite litterally turn all our Desire Z in G2's only supporting the specific extensions/functions/features the T-Mobile USA network offers and, if such a thing exists, network extensions possibly widely used in Europe are not considered since not supported by the libhtc_ril.so-ROM-combination in use on the device? What a sentence...

Just to make clear what I am assuming or proposing: it's not like the G2 is crippled in any way compared to the Desire Z, I guess we just don't take full advantage of the radio's abilities/features by using CM on our Desire Z. More or less correct?

And, as usual with me lately, an Edit: I also assume further, that using a HTC-native libhtc_ril.so on a CM ROM wouldn't result in added functionality since the CM ROMs themselves are basically G2 ROMs, TMOUS-spin off's so to say and do not consider the unused potential of the radio used in HTC's ROMS. Correct...?
[G2 and Desire Z Android Development] pfak:
Correct, but I'm almost wondering just how important having the RIL (libhtc_ril.so) match the radio that's flashed on the firmware. It could lead to some of the issues we see with certain subsets of people (high battery usage, etc.)

There could be subtle incompatibilities that lead to problems down the road if the RIL doesn't match the radio.

CyanogenMod is "crippling" the GPRS Class by setting it to 10 instead of 12, however.
[G2 and Desire Z Android Development] Shaquiel Harris:
Hm.. this is really interesting. How should we match them exactly? Ill flash every damn radio if it can stop my radio from using 40 percent of my battery..

Sent from my Rooted God-like HTC Vision running Liquid Metal.
[G2 and Desire Z Android Development] schaggo:
I do suffer exorbitant battery usage on the latest CM7 builds.

The whole day today I was back on GingerVillain - an "older" CM7 mod, I know - and after 16h my battery is still well above 50%. Before I would lose 20% on the train ride to work which takes 30 minutes. Nothing changed apart from wiping CM7 nightly and putting GV on. And since CM7 RIL still matches the CM6 RIL, I guess the GV RIL is exactly the same file. I genuinely *do* wonder where that incompatibility comes from... :-\
[G2 and Desire Z Android Development] pfak:
I'm trying to figure out where the /system/lib/libhtc_ril.so (MD5: 2405b479910beefd618de322f425ea40) is actually from, it doesn't appears to be from the original TMOUS 1.19.531.1.

With my device I made sure that the following files matched the radio:

/system/lib/libhtc_ril.so
/system/lib/libril.so
/system/lib/libreference-ril.so

I took WWE 1.72.405.2 RUU extracted the rom.zip from it, flashed the radio.img from it and copied the above files from the system.img onto my CyanogenMod 6.1.1 installation and everything seems to work fine. On top of that, I tweaked some of the settings based on the other worksheet on my spreadsheet since /system/build.prop is read from top-down and ignores later entries (as far as I could tell)

Additions to /system/build.prop:

ro.ril.enable.a52=0

Removals from /system/build.prop (since /system/build.prop is read from top-down and ignores later entries):

ro.ril.enable.dtm=0
ro.ril.gprsclass=10
ro.ril.hsdpa.category=10
ro.ril.hsupa.category=6
ro.ril.hsxpa=2
[G2 and Desire Z Android Development] sino8r:
I have to agree with this theory... I have switched to the Aussie radio but the battery life was horrible even after wiping dalvik cache. I ended up switching back to stock OTA tmobile radio and battery life was restored. I gave the new Aussie radio another chance by adding all the htc ril lib files except the wifi module and wiped cache. Battery life is now great like stock plus a bit better reception thanks to the newer radio. There's a thread that houses all the libs and new radio. Works nicely... worth a try for sure:)
[G2 and Desire Z Android Development] sino8r:
I ended up deplicating all the higher hspa class values (gprs too) just to be safe. No harm in doing so. I had these that way for a while now.
[G2 and Desire Z Android Development] bigmoew:
What about the using a froyo libhtc_ril.so on a gingerbread rom?

I'm currently on SenseGinger with the latest 26.06.02.27 have noticed a slight decrease in reception capabilities. Would a transfer of the ril.so be necessary/possible?
[G2 and Desire Z Android Development] Shaquiel Harris:
Not to be an ass, but you think you guys can make some updates with the updated libs for us? Or post a tutorial? I would love to have these results like you guys let alone test.

Sent from my Rooted God-like HTC Vision running Liquid Metal.
[G2 and Desire Z Android Development] pfak:
Give it a try and tell us how it works :)

Download: 2010-11-17 26.04.02.17_M2 (WWE 1.72.405.2) [HTC-RIL 2.2.0039HM (Oct 21 2010,22:38:34)]

Instructions for CyanogenMod, assuming you have a S-OFF engineering HBOOT, and Android SDK installed and USB connectivity (along with appropriate Fastboot drivers, etc.)

Copy the updated RIL libraries to your phone (from the lib folder in the RAR)

adb remount
adb push libhtc_ril.so /system/lib/libhtc_ril.so
adb push libreference-ril.so /system/lib/libreference-ril.so
adb push libril.so /system/lib/libril.so

Then power down the phone, Boot into the boot loader (Power + Volume down) and select FASTBOOT.

fastboot flash radio radio.img

Wait for it to say "Completed." then reboot into CyanogenMod and you are done. I am successfully using these for the past 2 weeks on CyanogenMod 6.1.1 Stable.
[G2 and Desire Z Android Development] Shaquiel Harris:
Thanks alot. But kinda confused.. i push these files BEFORE flashing the new radio? kinda makes no sense to me. im about to update to .27 again since you said it works better with these files. (had a bad time before with it) and do you recommend wiping cache after the flash?
[G2 and Desire Z Android Development] EdKeys:
Do we need to do this every time we flash an update, or will they be copied over to the update? (the lib files...I know the radio stays put)
[G2 and Desire Z Android Development] Shaquiel Harris:
is this cyanogenmod only? im not running cyan.
[G2 and Desire Z Android Development] tnpapadakos:
the lib files are part of the rom, so you'll have to do this again after an update

im gonna try this on the glacier using the libs from Glacier_TMOUS_1.17.531.2_Radio_12.28b.60.140e_26.0 3.02.26_M_release since the two phones are so similar build-wise
[G2 and Desire Z Android Development] EdKeys:
Copy the updated RIL libraries to your phone (from the lib folder in the RAR)

Code:

adb remount

adb push libhtc_ril.so /system/lib/libhtc_ril.so

adb push libreference-ril.so /system/lib/libreference-ril.so

adb push libril.so /system/lib/libril.so

If someone has the knowledge to make this into a flash.zip that would be great because it could be done in CWM right after flashing a rom (update). Anyone?
[G2 and Desire Z Android Development] Herrera91:
It's also wise to backup the current lib files before pushing them, in case the updated ones make things worse.
[G2 and Desire Z Android Development] TheNewGuy:
The lines from the build. Prop......

rild.libpath=/system/lib/librilswitch.so

rilswitch.ganlibpath=/system/lib/libganril.so

rilswitch.vendorlibpath=/system/lib/libhtc_ril.so

If you look at the build. Prop these lines about the libganril. So and the librilswitch.so make me think they are important.

And if you compare the G1 build. Prop to ours it only has the line about the libhtc.ril. so.

So one day I made the G2 build. Prop look like the G1 and it would stay at 3G and max out at 364 mbs then when I changed it back the H icon came back and restored normal speeds. So I always thought that these parts were something to do with switching from E to G to 3G to H..... but I am not sure. I have copied all five of the ril related files to my system / lib and have better signal now. But still no G or 3G except when the phone does the power save thing when you have H but are not using it.... does anyone know why?

Also there are lots of ril options that are not used /unknown pupose....

#ro.ril.a53.%s

#ro.ril.ecc.%s

#ro.ril.def.agps.mode.%s

#ro.ril.def.agps.feature.%s

#ro.ril.def.agps.mode

#ro.ril.def.agps.feature

#ro.ril.oem.ecclist

#ro.ril.oem.nosim.ecclist

#ro.ril.enable.dtm

#ro.ril.gprsclass

#ro.ril.hsdpa.category

#ro.ril.hsupa.category

#ro.ril.hsxpa

#ro.ril.enable.nitz

#ro.ril.enable.network_identify

#ro.ril.qos.maxpdps

#ro.ril.qos.traffic.class

#ro.ril.qos.max.ul

#ro.ril.qos.max.dl

#ro.ril.qos.guarantee.ul

#ro.ril.qos.guarantee.dl

#ro.ril.qos.delivery.order

#ro.ril.qos.max.sdu

#ro.ril.qos.delivery.err.sdu

#ro.ril.qos.transfer.delay

#ro.ril.qos.traffic.priority

#ro.ril.always.laccid

#ro.ril.fast.dormancy.rule

#ro.ril.fd.scron.timeout

#ro.ril.fd.scroff.timeout

#ro.ril.fast.dormancy.plmn

#ro.ril.enable.3g.prefix

#ro.ril.3g.long.name

#ro.ril.htcmaskw1.bitmask

#ro.ril.htcmaskw1

#ro.ril.enable.homezone

#ro.ril.enable.vt

#ro.ril.enable.regucid

#ro.ril.enable.hsdpaind

#ro.ril.enable.a52

#ro.ril.enable.a53

#ro.ril.enable.dcm.feature

#ro.ril.enhance.htcdis

#ro.ril.enable.tim.feature

#ro.ril.enable.korea.stk

#ro.ril.enable.hsupaind

#ro.ril.enable.gea3

#ro.ril.enable.managed.roaming

#ro.ril.enable.enhance.search

#ro.ril.disable.mcc.filter

#ro.ril.search.first.pnn

#ro.ril.enable.ncell.ind

#ro.ril.enable.enhance.nws

#ro.ril.radio.svn

#ro.ril.wp.feature

#ro.ril.emc.mode

#ro.ril.ucsq.mode

There was a thread in the G1 forum were they were trying to figure out what they each did. But I don't think that much progress was made other than the commonly known ones..

I have always been interested in the "fast dormancy " ones and the ro.ril.qos. xxxx ones...... but I could never find much information...
[G2 and Desire Z Android Development] tnpapadakos:
indeed i think there is a correlation

before this, i was getting 2300-2800 down
[G2 and Desire Z Android Development] bigmoew:
Used root explorer, mounted as read/write and copied the files w/ a reboot. Confirmed w/ at least the same data speeds and better network reception so far on SenseGinger :D
[G2 and Desire Z Android Development] G1ForFun:
It is crossed out, but the link still works. ;)

Would like to see the new radio in the OP though. 26.08.04.16_M
[G2 and Desire Z Android Development] tnpapadakos:
whats the new radio from, an OTA? is it tmous? and if you know of a link?
[G2 and Desire Z Android Development] heybobitsme:
It's from an HTC test build posted here.
[G2 and Desire Z Android Development] Ninj:
Hi!

Alright, i went through al the pages to try to find a solution to my case, and i must say, although i'm comfortable with all these stuffs, i'm not sure what to do now.

First, i have a Desire Z running Virtous (thank you rmk ;) ). I flashed the AUS .27 radio one month ago and got since then some really bad reception problems, and a little worse battery drain. It's not a witch trial statement, there's no doubt about it: my calls often hang up alone after 2 or 3 minutes, and in my house i have almost no more signal, also I went from about 40H of battery to less than 24H, no change in my daily use, no new app so far.

I've got some questions, you guys would be lovely to answer what you can :)

1. You all speak about CM7 but what about Sense ROMs? Which is known as the best radio for us on Virtous for instance?

2. On Sense ROMs, is it good to flash new RILs to match the radio? If yes, is the autopatcher the best way to do it?

3. Is the new radio coming from gingerbread good to try on my Virtous, running Froyo?

Here is the process of flashing since the last full RUU flash, so you can understand if i need to change something or not:

- 1.72 official RUU flash

- 1.34 downgrade through temproot, using official RUU

- Virtous 0.9 flashed

- Virtous 0.95 flashed

- Virtous 1.0.1 flashed

- AUS .27 radio flashed without lib

- Autopatcher flashed today.

Here i am :) Thank you for your time and help.
[G2 and Desire Z Android Development] crazyC:
I am no expert but tried similar to you and am using the .17 radio (plus autopatcher after it so as to match the ril files).

Went in to the Vodafone shop the other day and compared signal strength to the stock Desire Z they had, my signal reception was better. (It was on the original 1.34 stock rom though).
[G2 and Desire Z Android Development] schaggo:
That indeed is a kewl idea. And it would indeed replace some of the speculated parts in the ongoing discussion with facts. Should be interesting to see if the lib files are different or the same on two ROMs coming with the same radio but one being barebone, the other being Sense.

Unfortunately I'm too dumb to extract image files and I'm about to - lol - hardreset my thinkpad so there is no computer love for me in the next couple hours. This post in fact is one of the last things I do before wiping my industrial gray pals drive... I do have ORD, definitely :D

Edit: I'm getting dumb and dumber every day. I forgot to make my point before posting: no PC love for me, anybody else up to the task to extract the LIBs from the 1.34 RUU and post them for comparison? Actually the MD5 hash should do, we already have a couple hashes of some LIBs floating around...
[G2 and Desire Z Android Development] qpop:
+1

Or an explanation of what RIL to use :)
[G2 and Desire Z Android Development] dustrho:
I agree, I would like to see this wonderful radio patcher get updated so I can try out the new radio on my G2.
[G2 and Desire Z Android Development] BRad Barnett:
Sigh.

Dude, you're arguing in a polite fashion, so I'll do my best to do the same. However, please -- think about these things a bit more, ok?

How do you know the radio is getting a better signal? Are you going to tell me that you know, because the radio tells you so? That's what is happening after all. The radio reports signal strength when queried.

So, you flashed a new radio. It reports $a and the radio/phone you're testing against, reports $b. They're just numbers, numbers reported to you

by the radio

.

How do you *actually* know that there is better radio strength? YOU DO NOT!

Not to mention that moving a phone 1 foot, can change the strength, holding the phone a certain way can, the temperature of the phone, the angle the phone is at, the height you hold it at, and on and on and on.

Lastly, the phone does not provide you with instant numbers. It POLLS for signal strength. If I cover my phone completely with my hand, it can take > 1 second for it to report the difference.

RF signals often *fluctuate*. There are not constant. Unless you know the phones are polling at the precise same nanosecond, even with the same radio, the numbers could be different!

YOU CAN NOT TEST THE RADIO SIGNAL THIS WAY!

On top of all this, what precisely do you think is happening when you flash the rom?! All the hardware is the same! The antenna, the caps, circuitry and so forth is ALL THE SAME. All you could *actually* do is TRANSMIT with more power.

What do you all think is happening here? That the hardware is changing, or that (for example, like with the iphone when it had issues with how you held it), the radio is REPORTING DIFFERENTLY?

Yes, yes. Testing is fun. However, many of your guys are all running around telling others to flash this, flash that, and so on. And worse, people are getting others to flash libraries which, period, end of discussion, are meant for other roms... and crash with non-sense UI roms.

JUST STOP IT!
[G2 and Desire Z Android Development] C.Flat:
I pulled the libhtc_ril.so from my stock backup (1.34.666.5), and it has the same Md5 as the files for: (Taken from the flashable zip located here http://xdaforums.com/showpost.php?p=12080292&postcount=77)

26.03.02.18_M3

26.03.02.26_M

26.03.02.26_M2

26.04.02.17_M2
[G2 and Desire Z Android Development] ianmcquinn:
So basically you are saying that because you have a logical argument that if people want the most compatibility, they should be using the T-Mobile radio (a point I agreed with), no one should post any findings on experiments/ideas with different radios unless they've done a thorough scientific analysis on the matter? And that if it's not a thorough scientific analysis, the results are meaningless and should be thrown out? So what if a person was unable to initiate a call from a location for weeks due to lack of a reported signal. They flash a new radio and now they can talk all they want in that same location. Flash back and they cannot initiate calls again. This is a highly simplistic test that doesn't take into account changing atmospheric pressures and solar flares. It's hard to believe you think it's not indicative of something though...

I also agreed with you that people shouldn't be blindly flashing radios/changing out library files. Yet I thought this is a thread about trying to figure out whether or not a correlation exists between a radio and libhtc_ril (which you agree exists since you recommend using a matched T-Mobile radio with vendor RIL). If your real problem with this thread is that newbies shouldn't be flashing radios, edit the CM Wiki so it only instructs users on how to flash the T-Mobile radio (since all of the Desire Z users would have to change to it), post in the CM thread, post in the actual radio flashing thread, etc.

Simply telling everyone in this investigative thread with to stop (in an increasingly condescending fashion) defeats the purpose of figuring out more/putting out new ideas that can improve this community. It also hurts those users that may not even be using AOSP-based ROMs. Or are you saying it's not even worthwhile for Sense users to be doing any kind of testing with radios and RIL files?
[G2 and Desire Z Android Development] BRad Barnett:
Yes, in that, 'post any findings' means people don't write how-tos for installing CM, most especially to offical CM document sites.

Yes.

No matter what tests are done, they should be done in a scientifically methodic way. I was not present at your above hypothetical test (you use 'what if'), so how could I comment without knowing all the facts?

Originally, this thread was about that, yes. However, it has changed into a 'this radio is better' thread, as well.

I have done some of that. However, I have also seen newbies posting here, and people responding 'sure, you need this new fangled radio, yes!'

As long as newbies post here, and as long as others here post suggestions that the newbie does upgrade, I need to respond here as well.

I also need to respond to statements, patently false statements, about swapping in new rils libs.

Using a non-sense RIL file with a sense rom would quite likely have issues as well. These are (HELLO!) dynamically linked libs, and should not be used outside of their environment.

My comments about "stop it" were in the direct context of my comment:

"However, many of your guys are all running around telling others to flash this, flash that, and so on. And worse, people are getting others to flash libraries which, period, end of discussion, are meant for other roms... and crash with non-sense UI roms.

JUST STOP IT!"

See? I'm referring to people telling others (newbies) to flash this, flash that.. and most importantly to STOP WITH THE BULL ABOUT LIBS!
[G2 and Desire Z Android Development] Vlad83:
Alright, this is getting pointless, you are a quack that suffers from confirmation bias. Your "self-evident" axioms and counter arguments are by no means scientific yet you expect others to jump through hoops to prove their point.

I am just going to highlight a few things you seem to have missed while blindly reaching to defend your point:

We’re in agreement, no? But just because a certain libhtc_ril was causing trouble on majority of radios, does not prove that no other radio can be used with the libhtc_ril used by T-Mo and CM. One can not make this assertion mr. scientific analysis. Especially, considering the “T-Mo” radio IS a “Sense” radio since it was included in RUU 1.34.405.5.

Last, you talk about debugging but how can one debug without looking at source? Sure, a sigsegv was thrown and we can more or less tell why but once again you cannot blatantly state, that due to this no other radio can be used. That’s not a sound argument. You have no idea what is in the radio.img (well I am sure you can unpack it but you can’t look at source). Your scientific approach only seems to apply to counter arguments. If one’s signal appeared in an area that previously was a dead zone, this phenomenon should clearly be associated with the radio upgrade and not a solar flare. How do you even argue this without laughing? Because I will admit I got quite a chuckle out of your rebuttal

Well, anyway… I expect another funny response from you about libhtc crashing phones and solar flares dropping calls….