Speed up WIFI / LTE By enabling CRDA on Android aka wifi country code (root only)

Search This thread

Darnrain1

Senior Member
Jan 2, 2018
360
105
USA
STANDARD DISCLAIMER: I am not responsible for any damages caused to your phone. Use the mod at your own risk there is no warranty or guarantee.

With computers there is always more than one way to get the same task accomplished. Some ways are better than others.

Hello, I just found out how to enable the CRDA the correct way on boot. That way the Kernel knows what country your using the phone in. And the Kernel need's to know what power level it can use for the wifi and what channels are okay to use per the FCC. This will speed up wifi a lot, also there was an unexpected side effect from this mod, The LTE on my Lgv20 is 16 MB Per second now as apposed to only 5 or 6 MB Per second. The speed will go up and down depending on how busy the network is.


All you have to do is flash my mod I made in twrp or do it yourself. Just edit your
wpa_supplicant.conf file. It should be located in /data/misc/wifi/wpa_supplicant.conf

Find the line that says #country=US or it may say what ever country your in and just comment out that line, remove the # in front of the line. Make sure it's the correct country code like US or GB. Save restart it's that simple. Check with "iw reg get" command.

Country Code List


The twrp mod I made just looks in /data/misc/wifi/wpa_supplicant.conf and finds #country= and just comments out that line. It does not change the default setting. On my phone the Lgv20 H910 the default was set to US but it was commented out so the Kernel just skips over that line of code.

I have no idea why the CRDA was never enabled on the Lgv20. But anyway I found a way to fix this issue. I just thought I would share my knowledge with the community. I love Linux, it's way cool that Android Runs on the Linux Kernel.




Before installing the mod, in termux type this command. If you get an output like this "#country=US" then you will benefit from this twrp mod. Or it may say "#country=UK" depending where you at.

command:
su cat /data/misc/wifi/wpa_supplicant.conf | grep "country"
#country=US
The # is what we are removing.

But it if says like file not found, the mod will not work on your version of Android. Make sure to check for typo's maybe you could just copy this in a text file to your phone and copy and past.

then type
exit exit


before
iw reg get

country 00: DFS-UNSET
(2402 - 2472 @ 40), (N/A, 20), (N/A)
(2457 - 2482 @ 40), (N/A, 20), (N/A), PASSIVE-SCAN
(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN
(5170 - 5250 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
(5250 - 5330 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
(5490 - 5710 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
(5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
(57240 - 63720 @ 2160), (N/A, 0), (N/A)

after
iw reg get

country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 30), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(5842 - 5863 @ 5), (N/A, 30), (N/A)
(5850 - 5870 @ 10), (N/A, 30), (N/A)
(5860 - 5880 @ 10), (N/A, 30), (N/A)
(5865 - 5885 @ 20), (N/A, 30), (N/A)
(5870 - 5890 @ 10), (N/A, 30), (N/A)
(5880 - 5900 @ 10), (N/A, 30), (N/A)
(5890 - 5910 @ 10), (N/A, 30), (N/A)
(5895 - 5915 @ 20), (N/A, 30), (N/A)
(5900 - 5920 @ 10), (N/A, 30), (N/A)
(5910 - 5930 @ 10), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)



How to install?
Flash in TWRP

Requirements:
TWRP
Only tested on Lgv20 H910 Stock Oreo.
Should work on Any Android

As long as you have /data/misc/wifi/wpa_supplicant.conf
 

Attachments

  • Auto_CRDA_Enabler_Flashable_v1.0.zip
    120.3 KB · Views: 72
Last edited:
  • Like
Reactions: Madnord00

Darnrain1

Senior Member
Jan 2, 2018
360
105
USA
How to change to uk please?

To change the default US country code edit "/data/adb/modules/init_crda/service.sh"
Change US to GB country code in all caps then reboot.

That is a very good question and I have provided info on how to change the country code in the main guide.

Also I have made a Magisk Module just for Great Britain that includes the UK.
 
Last edited:
  • Like
Reactions: [email protected]

Darnrain1

Senior Member
Jan 2, 2018
360
105
USA
Hey everyone I just learned some new information on how to set the CRDA on boot. This way we don't need to use the Magisk Modules I made. It works a lot better because the CRDA is set on boot.
 
Last edited:

Darnrain1

Senior Member
Jan 2, 2018
360
105
USA
Is this thing works in Android 12?
Good Question, I only run Oreo on my Lgv20.

Before installing the mod, in termux type this command. If you get an output like this "#country=US" then you will benefit from this twrp mod. Or it may say "#country=UK" depending where you at.

command:
su
cat /data/misc/wifi/wpa_supplicant.conf | grep "country"
#country=US
The # is what we are removing.
then type
exit
exit

But it if says like file not found, the mod will not work on your version of Android. Make sure to check for typo's maybe you could just copy this in a text file to your phone and copy and past.
 
Last edited:

Mushfiq Khan

Member
Nov 2, 2021
7
0
Good Question, I only run Oreo on my Lgv20.

Before installing the mod, in termux type this command. If you get an output like this "#country=US" then you will benefit from this twrp mod. Or it may say "#country=UK" depending where you at.

command:
su
cat /data/misc/wifi/wpa_supplicant.conf | grep "country"
#country=US
The # is what we are removing.
then type
exit
exit

But it if says like file not found, the mod will not work on your version of Android. Make sure to check for typo's maybe you could just copy this in a text file to your phone and copy and past.
what if I only try the manual way?
Which I tried.I found wpa_supplicant.conf but the folder was empty.
 

Darnrain1

Senior Member
Jan 2, 2018
360
105
USA
Please don't kill my hope :(
I really have to change the country code to us or something else otherwise my phone can not detect 5ghz wifi channels below 149.
:) ok ok

In termux type
su
iw reg set US

it should be changed to us now. you can check with "iw reg get"

You need to disable wifi and enable wifi for it to take affect.

You will need to do this every time you reboot.
 

Mushfiq Khan

Member
Nov 2, 2021
7
0
Screenshot_20220627-234830_Termux.png
Is this the proper way to type in termux?
I'm actually quite new to termux : )
 

Darnrain1

Senior Member
Jan 2, 2018
360
105
USA
View attachment 5647231Is this the proper way to type in termux?
I'm actually quite new to termux : )
Yep you did it correct. Then type "iw reg get"

It should say like US-FCC or something like that. Then turn off wifi and back on again and you should be able to get your channel 149.

In the terminal if you don't get an error back that means it worked. So no news is good news haha.

Oh and you don't need to type "type'

Only

su
iw reg set US
iw reg get
exit
exit
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    STANDARD DISCLAIMER: I am not responsible for any damages caused to your phone. Use the mod at your own risk there is no warranty or guarantee.

    With computers there is always more than one way to get the same task accomplished. Some ways are better than others.

    Hello, I just found out how to enable the CRDA the correct way on boot. That way the Kernel knows what country your using the phone in. And the Kernel need's to know what power level it can use for the wifi and what channels are okay to use per the FCC. This will speed up wifi a lot, also there was an unexpected side effect from this mod, The LTE on my Lgv20 is 16 MB Per second now as apposed to only 5 or 6 MB Per second. The speed will go up and down depending on how busy the network is.


    All you have to do is flash my mod I made in twrp or do it yourself. Just edit your
    wpa_supplicant.conf file. It should be located in /data/misc/wifi/wpa_supplicant.conf

    Find the line that says #country=US or it may say what ever country your in and just comment out that line, remove the # in front of the line. Make sure it's the correct country code like US or GB. Save restart it's that simple. Check with "iw reg get" command.

    Country Code List


    The twrp mod I made just looks in /data/misc/wifi/wpa_supplicant.conf and finds #country= and just comments out that line. It does not change the default setting. On my phone the Lgv20 H910 the default was set to US but it was commented out so the Kernel just skips over that line of code.

    I have no idea why the CRDA was never enabled on the Lgv20. But anyway I found a way to fix this issue. I just thought I would share my knowledge with the community. I love Linux, it's way cool that Android Runs on the Linux Kernel.




    Before installing the mod, in termux type this command. If you get an output like this "#country=US" then you will benefit from this twrp mod. Or it may say "#country=UK" depending where you at.

    command:
    su cat /data/misc/wifi/wpa_supplicant.conf | grep "country"
    #country=US
    The # is what we are removing.

    But it if says like file not found, the mod will not work on your version of Android. Make sure to check for typo's maybe you could just copy this in a text file to your phone and copy and past.

    then type
    exit exit


    before
    iw reg get

    country 00: DFS-UNSET
    (2402 - 2472 @ 40), (N/A, 20), (N/A)
    (2457 - 2482 @ 40), (N/A, 20), (N/A), PASSIVE-SCAN
    (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN
    (5170 - 5250 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
    (5250 - 5330 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
    (5490 - 5710 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
    (5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
    (57240 - 63720 @ 2160), (N/A, 0), (N/A)

    after
    iw reg get

    country US: DFS-FCC
    (2402 - 2472 @ 40), (N/A, 30), (N/A)
    (5170 - 5250 @ 80), (N/A, 30), (N/A), AUTO-BW
    (5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
    (5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS
    (5735 - 5835 @ 80), (N/A, 30), (N/A)
    (5842 - 5863 @ 5), (N/A, 30), (N/A)
    (5850 - 5870 @ 10), (N/A, 30), (N/A)
    (5860 - 5880 @ 10), (N/A, 30), (N/A)
    (5865 - 5885 @ 20), (N/A, 30), (N/A)
    (5870 - 5890 @ 10), (N/A, 30), (N/A)
    (5880 - 5900 @ 10), (N/A, 30), (N/A)
    (5890 - 5910 @ 10), (N/A, 30), (N/A)
    (5895 - 5915 @ 20), (N/A, 30), (N/A)
    (5900 - 5920 @ 10), (N/A, 30), (N/A)
    (5910 - 5930 @ 10), (N/A, 30), (N/A)
    (57240 - 63720 @ 2160), (N/A, 40), (N/A)



    How to install?
    Flash in TWRP

    Requirements:
    TWRP
    Only tested on Lgv20 H910 Stock Oreo.
    Should work on Any Android

    As long as you have /data/misc/wifi/wpa_supplicant.conf
    1
    How to change to uk please?

    To change the default US country code edit "/data/adb/modules/init_crda/service.sh"
    Change US to GB country code in all caps then reboot.

    That is a very good question and I have provided info on how to change the country code in the main guide.

    Also I have made a Magisk Module just for Great Britain that includes the UK.