yashsingh1/xdaforums huggingface dataset:
[HTC EVO 3D] fxjumper:
Precisions

(Google traduction --- sorry)

After a few questions in Private Message, here is a method from a blank file and edit it.

i) file format (dos or unix encode)

ii) to file permissions

This is how I propose to proceed

1) recovering the file on the computer

2) we change

3) upload it on the mobile

4) we check the consistency of the file (right)

------------------------

It is left

------------------------

1) I assume the phone is Rooted

we will save the file wpa_supplicant.conf that derail and recreate one:

adb shell
cd /data/misc/wifi
cp-a wpa_supplicant.conf wpa_supplicant.conf.sav
rm wpa_supplicant.conf
exit

Switch OFF/ON the wifi

Copy the file on the computer

pull adb shell /data/misc/wifi/wpa_supplicant.conf wpa_supplicant.conf

2) To modify the file I suggest you use notepad++

http://download.tuxfamily.org/notepa....Installer.exe

Edit the file, and add at the end

network = {

ssid = "FreeWifi_secure"

key_mgmt = WPA-EAP IEEE8021X

eap = SIM

priority = 5

}

save

3) is the upload

adb push wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf.new

4) It checks the credentials and the owner and the old file

adb shell
cd /data/misc/wifi/
ls -l wpa_supplicant.conf

----> -rw-rw ---- 1 1000 1010 185 May 20 5:31 p.m. wpa_supplicant.conf

We crush our file

cat wpa_supplicant.conf.new > wpa_supplicant.conf

This should solve our problem of right and permissions

we check again:

ls -l wpa_supplicant.conf

----> -rw-rw ---- 1 1000 1010 185 May 20 5:31 p.m. wpa_supplicant.conf

Sincerely,
[HTC EVO 3D] tuxstang:
Another way, as we most use a custom rooted rom, is to use a rooted filemanager.

For exemple, i use ES File Explorer, set so it accesses /data RW, then edit the file with ES's editor. No need to set back file's permissions.
[HTC EVO 3D] B_e_n:
And it works for you??????

I did it and it can t connect....

Who have it working?????? and what did you do????
[HTC EVO 3D] fxjumper:
Hello B_E_N,

In private message, you said you are using a motorola milestone xt720 under cronosx 2.3.7, a cyanogen mod 7 customized.

Now i sent you a patch with /system/framework/com.orange.authentication.simcard.jar

We are waiting your test ...

Sincerely,
[HTC EVO 3D] severin333:
CM9 nightlies + SGS

Hello,

I just tried this modification, but cannot find a way to make it work...even though I doublecheck both the permission and the content of the file :confused:

For information, I'm running CM9 nightlies for my Samsung Galaxy S.
[HTC EVO 3D] mgl2:
Until now it doesn't work for me ... even with rom toolbox. Permissions and owners are checked and ok.

Next try : via adb & androisd sdk.

o2x - cm7 - FREE
[HTC EVO 3D] mgl2:
One more thing : no more error message but wifi try to connect without result ...

o2x - cm7 - FREE
[HTC EVO 3D] tuxstang:
Here's how i proceede from ground up on my EVO 3D, with Mwakious, Predator and KingCobra ICS roms.

1/ go in settings and select FreeWifi_secure

2/ set a lock PIN as requested

3/ switch off WiFi

4/ open ES File Explorer

5/ check "Up to Root", "Root Explorer" and "Mount FileSystem" in ES File Explorer settings

6/ navigate to /data/misc/wifi

7/ edit wpa_supplicant.conf

8/ save

9/ switch on WiFi and select FreeWifi_secure

10/ unset lock PIN

Hope it helps.
[HTC EVO 3D] keyra74:
it was that easy?????

should work on all rooted phone so

works like a charm on my evo
[HTC EVO 3D] mgl2:
Don't work with my phone...

How do you change owners parameters with ES explorer ?

Regards.

o2x - cm7 - FREE
[HTC EVO 3D] soicnarf:
Hi,

maybe you can use an alternate method on post #11 in

http://xdaforums.com/showthread.php?t=1639437&page=2

what's your phone by the way ?
[HTC EVO 3D] Anolnx:
I'm using CM7.2 on a Nexus One.

I edited the file with ES Explorer, saved, activated wifi...

But doesn't work... It tries to connect but fails.
[HTC EVO 3D] bebeu:
Not working on my HTC DESIRE with a custom rom : RevolutioN.A2SD V2 or 3 :-'(
[HTC EVO 3D] B_e_n:
As i tell you in pm your patch doesn t work for me...

It seems that it can t work with old wpa_supplicant (mine is 0.6 and fxjumper's have the 0.8....) to know which version you just have to use this command(Thanks fxjumper):

adb shell wpa_supplicant -v

I m gonna try a new rom on ics maybe i will be more lucky....
[HTC EVO 3D] chris83210:
work fine to connect but is very slow :(
[HTC EVO 3D] hawky51:
Hi,

I found file wpa_supplicnt.conf in etc/wifi directory !
[HTC EVO 3D] db77:
Hello, I have modified the file and added the lines at the end. So I have in my file, this lines :

______________

ctrl_interface=wlan0

update_config=1

device_type=0-00000000-0

network={

ssid="My WIFI at home"

key_mgmt=NONE

group=WEP104 WEP40

auth_alg=OPEN SHARED

wep_key0=xxxxxxxxx

priority=40

}

network ={

ssid ="FreeWifi_secure"

key_mgmt =WPA-EAP IEEE8021X

eap =SIM

priority=5

}

______________

I use IceColdSandwich 8 test1 (android 4.0.4) on a Desire HD.

BUT...

When I select FreeWifi_secure, my DHD try to connect and, at end, say "Problème d'authentification" :(

And you ?

On Desire HD, with ICS, this don't work :(

Anyone with a Desire HD ?
[HTC EVO 3D] jahfil:
@DB77

Have you tried inserting a line between the 2 networks?

For the record, I have a SGS2 (I9100) running Wanamlite v12. I edited the file with ES explorer and it worked like a charm...
[HTC EVO 3D] enthalpie:
not on SGS 1

Hi

i found file under /etc/wifi on my SGS 1 under gingerbread and JVU rom

I add lines on file but i can't use EAP-SIM, this authentification method does'en appear in wifi parameters

regards
[HTC EVO 3D] tuxstang:
The added lines don't add "SIM" in WiFi parameters, they just add FreeWifi_secure in your known WIFI networks and connects you to it when it's in range, provided your rom supports EAP-SIM.

Once you've added the lines, you should see FreeWifi_secure as "saved, secure with 802.1x" in the list of available networks. If your rom supports EAP-SIM, select it and you'll be connected, otherwise, it won't work.
[HTC EVO 3D] enthalpie:
I allready have the freewifi_secure. But the jvu seams to be unready for this network

Envoyé depuis mon GT-I9000 avec Tapatalk
[HTC EVO 3D] db77:
@jahfil : Insert a line ? ??? Blank line ? What else ?

if it is a "authentification problem", a blank line do nothing... and there is a blank line in the real file ;)

I can't set the password in settings (option not present with ICS) and I think it is the reason... (cf. http://xdaforums.com/showthread.php?t=1639437&page=4)
[HTC EVO 3D] tuxstang:
When i was asked to set a credential password, on the ICS roms i've tried, i was redirected to screen-lock security.
[HTC EVO 3D] db77:
I don't want to put a password on my screen-lock :(
[HTC EVO 3D] tuxstang:
Only had to set a password for the screen lock the first time, then i removed it and i connect to FreeWifi_secure without it.
[HTC EVO 3D] db77:
Ok tuxstang but my phone don't ask a pasword when i want to connect to FreeWifi_secure, it say "Problème d'authentification".

You are redirected to security but I'm not :(
[HTC EVO 3D] La_Globule:
Does my ROM supports EAP-SIM ?

OK, so I've got a question : how can I know if my ROM (Samsung Stock for SGS2, Android 2.3.5) supports EAP-SIM appart from giving a try ?

BTW, the file wpa_supplicant.conf doesn't exist on my SGS2. It is replaced by /data/wifi/bcm_supp.conf which holds all known wifi networks.

Thanks for your answers.
[HTC EVO 3D] Alomamabobo:
Thank You a lot for sharing, the first post exemple work like a charm (editing the file with root explorer), thanks again.

Tested on Samsung Galaxy S2 Rom I9100XWLPG and Syiah Kernel 3.3.1.

Good day.
[HTC EVO 3D] nicodem314:
Worked like a charm.

Thanks a lot!!
[HTC EVO 3D] Ast2001:
Your method worked perfectly on my Galaxy Note (ICS).

Thank you !!!!
[HTC EVO 3D] Dr.Mals1:
Merci de l'astuce fxjumper, je vais tester sur mon Xperia kyno V (ICS 4.0.3).

EDIT : Ne fonctionne pas :(
[HTC EVO 3D] spanish_man:
Hi,

I have a Huawei U8650, EAP-SIM is supported by the phone and I can choose it in the menu but when the phone try to connect it doesn't work ...

Anyone have an idea ?

May someone can post a backup of an Huawei ROM from Free Mobile.
[HTC EVO 3D] XpLoDWilD:
This only works if SIM auth is added to the wifi framework.

Tested on SGS3 running CyanogenMod, it doesn't work, but it works on OEMs/stock roms.
[HTC EVO 3D] Joravis:
It didn't work for me (Wifi wouldn't switch).

I setted up FreeWifi_secure in settings with PEAP method, then I just changed "PEAP" with "SIM" in wpa_supplicant.conf and now it works perfectly :)
[HTC EVO 3D] _AnAkIn_:
I found the solution if your wpa_supplicant binary doesn't support EAP-SIM.

I have CM9 and the wpa_supplicant binary doesn't support EAP-SIM. I extracted the wpa_supplicant binary from the ROM and replaced the one from CM9 with this one in /system/bin, and I could successfully connect then.
[HTC EVO 3D] RushaPoiL:
Gratitude for finding the hint fxjumper, you're my man of the day !!

With my GSII custom sammy rom it didn't work at first try.

Wifi just wouldn't switch on

Then i realised that i had to change the file's rights (gave full access) and then it worked perfectly, connecting to freewifi_secure and auto authenticating.

The only flaw is that i have to set the rights each time i reboot the phone...

Any hint?
[HTC EVO 3D] nickasimir:
not working for me

i have tested on ics nightly on samsumg galaxy S.

- cannot switch on wifi...

i have used es explorer for make change

damage !
[HTC EVO 3D] Jal84:
I use exactly the same ROM on my DHD, this method did not work for me too, I get exactly the same error message "Probleme d'authentification" and then the phone connects automatically to my private wifi.
[HTC EVO 3D] oliewan:
howto Resolve read-only problem

If you have a read only problem when you remplace the file, retry with excute this command before :

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

it works for my motorola atrix with rom stock (origin 2.3.4 root).

bye bye
[HTC EVO 3D] XpLoDWilD:
Or just type

adb root

then

adb remount

on your computer.
[HTC EVO 3D] rafiduck:
Did you both get "SIM" as an option in EAP Method in FreeWifi_secure configuration ? I can't see it on my DHD running IceColdSandwich 8.0 ...
[HTC EVO 3D] db77:
@rafiduck : Can you explain more because I'm not a good english reader ?

In French :

Peux-tu expliquer davantage car je ne suis pas très fort en anglais ?
[HTC EVO 3D] nickasimir:
wifi broken

Hi,

I have tested to change the conf by es explorer on ics crespo rom for the galaxy S.

Result today, wifi broken and portable crash for any reason... very strange.

Any solution to get back wifi ?

Regards
[HTC EVO 3D] db77:
Ok rafiduck, we are in the same state :(

In french

Ok rafiduck, on est tous dans la même impasse :(

Par contre, as-tu vu que le fichier est dans system/etc/wifi et dans data/misc/wifi ?

J'ai tenté de modifier les deux mais même résultat :(
[HTC EVO 3D] Jal84:
[MENTION=1583630]rafiduck[/MENTION], [MENTION=360189]db77[/MENTION]

SIM option is not displayed for me too when I manually edit the conf file, or run FreewifiConfig.

I think that we should not see that option as Android UI does not support it yet, but wpa_supplicant should support it when it's manually entred in the conf file. We should probably ask Lord Clockan to take a look in his code and find out why it is not working as apparently other ICS 4.0.4 ROMs do support this manual configuration.
[HTC EVO 3D] fxjumper:
Hi,

With à little baby 2 months old, i don't have many time to connect to xda-dev.

I will try this rom next week-end to compare with my genesis4 4 rom (ics 3.6)

I hope i could make a patch for you.

Best regard.
[HTC EVO 3D] Jal84:
Hi fxjumper,

Yeah that would be great, but if a logcat is enough I can send it to you this evening.
[HTC EVO 3D] X1iser:
It would be great if you create an app who do this mod automatically :good:
[HTC EVO 3D] bebeu:
this app exist !!

https://play.google.com/store/apps/...wxLDMsIm9yZy5idWJ1YWJ1LmZyZWV3aWZpY29uZmlnIl0.

freewificonfig :)
[HTC EVO 3D] B_e_n:
Yes but it don t work with most of the phone.... I m on motorola xt720 with cyanogen 7.2 (android 2.3.7 KANG) and it don t work at all....

I read a lot about this and it seems that it doesn t work for most of the cyanogenmod rom....

If anyone have it working...
[HTC EVO 3D] zamroni:
Need correct /system/bin/wpa_supplicant

Hi,

Please also share the /system/bin/wpa_supplicant file too because my wpa_supplicant does not support EAP-SIM. Free Mobile must have recompile wpa_supplicant with EAP-SIM support. Please also find pcsc related file in your phone.

I suggest that you can upload content of /system of your phone so we can analyze more (use adb -d pull /system <local directory>)

This is capability of Sony Neo V ICS wpa_supplicant:

########################################################################

shell@android:/ # echo "get_capability eap" | /system/bin/wpa_cli

echo "get_capability eap" | /system/bin/wpa_cli

wpa_cli v0.8.x

.............

Using interface 'wlan0'

Interactive mode

> MD5 TLS MSCHAPV2 PEAP TTLS GTC OTP LEAP WSC

> shell@android:/ #
[HTC EVO 3D] Lucius Snow:
EDIT / Message deleted
[HTC EVO 3D] killdashnine:
:cowboy:

OP, you should really change this line from the topic :

prev_imsi=120815XXXXXXXXXX@wlan.mnc150.mcc208.3gppnetwork.org

I don't think this is a good idea to provide your IMSI to anyone.

eg : http://en.wikipedia.org/wiki/International_Mobile_Subscriber_Identity

or : http://cedric.cnam.fr/~bouzefra/cours/cours_SEM/CartesSIM_2.pdf

Okay, this is not the Ki, but I don't think this is really good to do this.

As far as I checked, this is a correct IMSI. I also fount a weird correlation between my IMSI and my Free mobile account.
[HTC EVO 3D] targa:
What do you mean ? It's pretty obvious that those are related ?!
[HTC EVO 3D] killdashnine:
Of course yes, but this is not good to share your own IMSI on Internet (like IMEI). I saw many people sharing their own configuration without removing their IMSI. :cowboy:
[HTC EVO 3D] coolshot71:
The solution works for me, but...

When i reboot the phone the wifi gives an error and won't activate

To fix the error i just open the file, add a blank line at the end or remove a blank line between the two saved connections, save it and activate again the wifi connection... i also tried to just open it and save it exactly as it was when i opened it and that fixes the issue as well

Certainly would be cool if i found a solution to not have to do this each time i reboot :)

Any ideas?
[HTC EVO 3D] Kiof:
Dual SIM

Hello all,

Very interesting post. Thanks for all the contributors.

I add an other example :

Phone : Bluebo B3000

Android : 4.0.4

Dual SIM : only one Free SIM

Connexion not successful with the standard wpa_supplicant file.

I add this lines to the wpa_supplicant file: sim_slot="0"

The connexion ending with an authentication issue (then one step forward from the previous try)

I also add the following lines : imsi="none" and identity="none" but no change.

Any idea?

Thanks.
[HTC EVO 3D] freechelmi:
I guess this could be easily integrated in an application for root users ?

Anybody started such a project ?

Edit : found it : https://play.google.com/store/apps/details?id=org.bubuabu.freewificonfig

Edit2 : Not working , it just fails to authenticate. Galaxy Note with cyanogen 10.1. Maybe a PCSC issue ?
[HTC EVO 3D] letroll59:
You can connect to FreeWifi_secure with your nexus 4 ?
[HTC EVO 3D] targa:
Do you happen to know any HTC device supporting EAP-SIM on stock ROM ?

on SGS3, be aware that it has some problems in EAP-SIM/AKA implementation. It keeps values of old SIM when swapping SIM, so make sure to perform a factory reset when swapping SIM.
[HTC EVO 3D] Xoib:
Impossible on the Nexus 4 (for the moment). Maybe with the new qcom wifi driver...
[HTC EVO 3D] letroll59:
With a nexus 4? If yes, can you give me details? ( rom, Android version,...)
[HTC EVO 3D] Xoib:
I think I will auto answer my own supposition, yes with the new driver.
[HTC EVO 3D] Xoib:
Tried yesterday on my Nexus 4 - Stock 4.3 and it's NOT working. It's strange because I read some eap-sim related new code in the changelog of the sources.
[HTC EVO 3D] ozzingtost:
News

Hi everybody ... :D

have you good news about EAP-SIM for our devices ?

thank's
[HTC EVO 3D] Xoib:
Unfortunately no, same for the Nexus 4 :(
[HTC EVO 3D] OnçaPintada:
Does it works for HTC Explorer?

Hi everyone,

I'm a newbie in Android world, just a couple of questions:

1- Does it works for my HTC Explorer with HTC sense 3.5 (it's rooted)?

2- How to modify wpa_supplicant.conf with Es File Explorer when it appear the message "Read only file system"?

When I open the my wpa_supplicant.conf file it's like this:

#####wpa_supplicant configuration file template#####

update_config=1

ctrl_interface=eth0

eapol_version=1

ap_scan=1

fast_reauth=1

Somebody can help me?

Thanks
[HTC EVO 3D] eldon.T:
adding a FreeWifi_secure network{ } block does work on my Lenovo A820 (Infrared 2.3.5a multilang)

actually the wifi settings allows me to do it in the UI but in french there's a translation problem and the SIM Slot info is never recognized so the config gets undefined slot and it wont work.

Unfortunately the /data/misc/wifi/wpa_supplicant.conf file gets overwritten from times to times, i guess when wifi is scanned and the Freewifi_Secure block gets deleted or replaced with a faulty config so i have to prevent wpa_supplicant from modifying the file :

it can be done either by modifying the file permissions or by setting the following parameter in the same conf :

update_config=0

this is far from ideal as you can't add a wifi network to your file anymore, unless you edit it manually, you can still connect to unknown networks but your config (password) will only be used once..

i think i've identified the translation problem but i have no idea where to test / submit a patch for it...

i'll look in the A820 rom tutorial thread..
[HTC EVO 3D] Morice69:
Hi,

It is not working with my huawei u8350 with the custom rom Sarah CM7 RC2.

My provider is free and free wifi secure is always trying to connect with peap, tls, ttls. so it is not connected because the librairy eapsim from free is not here.

Soeone can please tell me how to install free eap sim librairy please?
[HTC EVO 3D] scallejam:
Xiaomi Red Rice

Any clue if it works on Xiaomi Red Rice?

Edited config file like this: (sorry i'm new and can't add external links and/or images)

h ttp://ww w.use.com/images/s_3/2014_07_18_2_01811d6c4eb6538b07f4.jpg

After reboot phone, still there is no chance to choose EAP-SIM

h ttp://ww w.use.com/images/s_3/2014_07_18_1_cfc9914d9db8fe692b70.jpg?2

Anybody knows if Red Rice has EAP-SIM support?

Cheers
[HTC EVO 3D] zubier:
When I tried to connect 802.1x AEP method Sim, The wap_supplicant.conf, it looks this

network={

ssid="ess1"

scan_ssid=1

key_mgmt=WPA-EAP IEEE8021X

eap=SIM

sim_slot="1"

imsi="***************@wlan.mnc050.mcc637.3gppnetwork.org"

priority=230

proactive_key_caching=1

}

Please help !!!!
[HTC EVO 3D] benjibasson:
Hi,

On my rooted honor Kiwi with Lineageos 14.1, while I have enabled root for both apk and adb, wWhen I try to

adb shell cat /data/misc/wifi/wpa_supplicant.conf

or adb push wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf,

it is always saying

adb: error: failed to copy 'wpa_supplicant.conf' to '/data/misc/wifi/wpa_supplicant.conf': remote couldn't create file: Permission denied

/system/bin/sh: cat: /data/misc/wifi/wpa_supplicant.conf: Permission denied

It is always doing it althought I use sudo, or I log to the PC as root

So I used es file explorer to edit /data/misc/wifi/wpa_supplicant.conf and add

I reboot, open /data/misc/wifi/wpa_supplicant.conf and I have realy

unfortunaly, each time I switch on or off the wifi, it ask me authentification for free wifi secure and the last network {} for free mibile has been removed.

So another solution: configure and choose eap sim from menu -> it say password may be incorrect (cf see BUGBASH-1612 from jira lineageos)

Al right, I will open /data/misc/wifi/wpa_supplicant.conf and ajust

I have:

So I removed id string

seted priority to 5.

Recorded

Switch off mobile

Switch on, open /data/misc/wifi/wpa_supplicant.conf to check that my modif is assumed: it is since there is still

Unfortunaly, when I switch on or of wifi,

is always being replaced by the stupid

How can I use the FreeWifi_secure please?
[HTC EVO 3D] htlm:
Hi happy to see someone interested in that trick because i never find a way to do. I don't have enough knowledge.:crying:

But i think maybe that changes of wpa.supplicant are due a MVV Free APK because it have an option to configure FreeWifi_Secure (auto) and i know it made changes in wpa.supplicant but doesn't work anyway.

In other hand you post that in October and now we are in December:silly: maybe it's too late...

But if you discover something share it:svetius:

Joyeux Noël
[HTC EVO 3D] benjibasson:
Hi, I don't think that change of wpa.supplicant are due a MVV Free APK because:

- Orange Panama witch has been build befor the free mobile project is abble to get internet throught free's eap sim

- Every smartphone huawey, samsung, or else witch are purchassed in Malaysia (with no free apk) ara abble to get internet throught free's eap sim until we replace stock rom to an official lineageos...

This bug Still occure with lineageos 15.1

https://gitlab.com/LineageOS/issues/android/issues/55#note_132204632

Cheers
[HTC EVO 3D] iboone:
Here is what I found:

https://xdaforums.com/showpost.php?p=79374457&postcount=172

I think wpa_supplicant must be build/compiled with CONFIG_PCSC=y.

If you look at latest lineageos android.config file in wpa_supplicant, you will read that the line CONFIG_PCSC is commented by default.

[B]# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
CONFIG_EAP_SIM=y
[/B]

# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y

# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine.
CONFIG_SMARTCARD=y

[B]# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
#CONFIG_PCSC=y[/B]

# Support HT overrides (disable HT/HT40, mask MCS rates, etc.)
#CONFIG_HT_OVERRIDES=y

# Support VHT overrides (disable VHT, mask MCS rates, etc.)
#CONFIG_VHT_OVERRIDES=y

# Development testing
#CONFIG_EAPOL_TEST=y

If someone can build a wpa_supplicant for Nougat 7.1.2, please send it to me :) I don't know anything in developing on android.
[HTC EVO 3D] benjibasson:
Hi,

And if someone can vote and comment this issue on lineageos at https://gitlab.com/LineageOS/issues/android/issues/55 it would be great.

Cheers