Hey guys,
Since there's no way back from rooting the N1 at the moment I'm a little reluctant to do so. The main reason I want it is to be able to manually edit the wpa_supplicant file, as my work network is supported by Android, but not by the wireless settings GUI, so I have to enter the settings manually.
Is anyone aware of any tricks or apps that will allow me to edit this file without root access?
Thanks!
Editing wpa_supplicant.conf
snoopstah said:
Hey guys,
Since there's no way back from rooting the N1 at the moment I'm a little reluctant to do so. The main reason I want it is to be able to manually edit the wpa_supplicant file, as my work network is supported by Android, but not by the wireless settings GUI, so I have to enter the settings manually.
Is anyone aware of any tricks or apps that will allow me to edit this file without root access?
Thanks!
Click to expand...
Click to collapse
Looking at the this file in /etc/wifi and the fact that it commences with a # I'd say not. Like other Linux systems files, you need to be root to edit and save the file.
I guess you are on a 801.1x authenticated wifi network and want it to look like the following (or similar):
##### wpa_supplicant configuration file template #####
update_config=1
ctrl_interface=eth0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="SSID NAME"
scan_ssid=1
key_mgmt=IEEE8021X
eap=PEAP
phase2="auth=MSCHAPV2"
identity="usuallyfullemailaddress"
password="MY_PASSWORD"
ca_cert="PATH_TO_USER_CERTIFICATE.cer"
priority=1
}
Pity this cannot be done with the SDK.
Hi guys,
I read that i need to change a line to wpa_supplicant.conf in order to be able to connect to ad-hoc networks.
First of all, my wpa_supplicant.conf file is not in /data (/data is empty), but it is in /etc/wifi/ & system/etc/wifi/
Secondly, i have no write access even though i have flashed with the aufs_overlay_rw patch.
Any input on how i can change my access to be able to save the config file?
Thanks
p0inte said:
Hi guys,
I read that i need to change a line to wpa_supplicant.conf in order to be able to connect to ad-hoc networks.
First of all, my wpa_supplicant.conf file is not in /data (/data is empty), but it is in /etc/wifi/ & system/etc/wifi/
Secondly, i have no write access even though i have flashed with the aufs_overlay_rw patch.
Any input on how i can change my access to be able to save the config file?
Thanks
Click to expand...
Click to collapse
You can boot into recovery and manually mount system and data and so on there , then either push/pull stuff with adb , or go in there with adb shell and for instance copy the file to sdcard (don't forget to mount it in that case 8)
Id don't know if tha file requires you to chmod or anything though , maybe someone else can help you there.
I had to chmod framework-res.apk on my X10mini. You might have luck if you google it or search all of the subforums here.
Well, thanks to HDCR.Jacob & danne_jo and their hard work on the WildFire v8, ad-hoc support comes with the rom.
I guess that solves my problem
Hi all
I am facing a problem with HyperDroid-CM7-v2.0.1 build. Its when I try to connect to wifi adhoc connection it says "not in range".
I reinstalled the ROM but no gain. Someone suggested to use correct recovery size and I did use 150Mb only and its fresh installed ROM there are no other programs in phone right now. So please guide me how to solve this issue. Any solution will be appreciated.
Thanks
I have the same issue in HyperDroid-CM7-v2.0.1 & TyphooN CyanogenMod 7 Nightly v3.2.9, with HyperDroidGBX-v12 everything works fine
Try installing the latest SuperUser app from the Android Market, maybe that will help. It fixed my none working HotSpot on HyperDroid-CM7-v2.0.1.
not working
I had to install a specific adhoc fix using clockwork, called: wpa_supplicant_adhocfix_v0.6.10ah_update.zip
There may be a new version but i don't know, do a search for the file above and install. This allowed my phone to connect to adhoc networks
Thanks for all of the answers, now I have already installed GBX ROM and its working fine with it.
Though I could not locate this wpa_supplicant_adhocfix_v0.6.10ah_update.zip file anywhere.
I found a way to solve this problem
1) ADD your ad-hoc connection (it will appear at the end of the list)
2) go to data/misc/wifi and edit the wpa_supplicant.conf file like this
ctrl_interface=eth0
update_config=1
ap_scan=2
network={
ssid="Ad Hoc name"
mode=1
scan_ssid=1
key_mgmt=your_password
priority=41
}
3) turn on your wifi
sorry for my bad English
WiFi error after changing the wpa_supplicant.conf file
Just in case anyone who goes through the same grief as I did with a wifi error after changing the wpa_supplicant.conf file as detailed above here is what my problem was and the solution:
Problem: I used droid explorer to copy the original wpa_supplicant.conf to my desktop as a backup and then edit it with notepad. I then copied it back to the device with droid explorer.
In doing this process I changed the group and the ownership of the file to 'root' rather than 'wifi'. The startup process 'wifi' couldn't do what it needed with the file because it was now owned by 'root' (which droid explorer uses)
Solution: To check if this is the problem go to a terminal and type:
su
cd /data/misc/wifi
ls -l
it should come out with something like
-rw-rw-rw- 1 root root *size* *date/time* wpa_supplicant.conf
to change it type:
chown wifi wpa_supplicant.conf
chgrp wifi wpa_supplicant.conf
it should come out with something like
-rw-rw-rw- 1 wifi wifi*size* *date/time* wpa_supplicant.conf
I hope this helps. It might be becuase I am a complete noob to android but if this post had of been here it would have saved me a lot of grief.
I'm trying to set up ad-hoc networking with a new Casio Commando. I have another embedded Linux box with a working ad-hoc network.
The Casio is rooted. I've "adb push'd" the wpa_supplicant.conf to the Casio. I added these lines to the beginning of the /data/misc/wifi/wpa_supplicant.conf on the Casio as follows:
ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant
update_config=1
ap_scan=2
network={
ssid="Ad Hoc"
mode=1
scan_ssid=1
key_mgmt=NONE
priority=41
}
When I restart WiFi on the Casio, the "Ad Hoc" network appears in the list, but it also says "Not In Range".
I know the "Ad Hoc" network in my embedded Linux device is in range - its right next to the phone. What am I missing?
Permissions and ownership of the wpa_supplicant.conf is
rw-rw-rw system root
thx.
Edit: Considering all the complex processes that I've done, I'm willing to do some series of steps again with the gathered knowledge, but I still need some guidance.
Actual status: Losing my mind (not fixed)
Here's the info of my current problem:
I have a XT1563, cid12 (cl)
Working perfectly until android 6.0 OTA. After restart, in the wifi screen loading bar is constantly present and switches itself off after a couple of seconds of activated. Network list is empty, mac address appears as 02:00:00:00:00:00 in wifi details and status of the phone.
Sent it to support and they 'updated the software', when I got it back wifi was working, but when I installed sd and sim cards back it stopped working.
The most relevant logcat message that appears to be the main one is from WifiStateMachine:
Code:
WifiStateMachine: Fail to set up pno, want false now false
WifiStateMachine: Failed to load driver
Things I've done
Most of this steps have been tried with clean installs and removing sd/sim cards
Network Reset
Factory Reset
Flash different stock roms (currently on 6.0.1 MPD24.107-52)
Flashed ultra kernel R2, R3 and squid kernels 14, 15, 15 oc, 15b
Used twrp 2.8.7 and 3.0.0-r2
Used rsd to flash official firmware for my carrier (RETLA-ENTEL_6.0_MPD24.65-25.1)
Flashed CM 12 and CM 13 unofficial
Installed SuperSU and Busybox
Changed owners and permits in persist/
Copied new persist from different sources
Hex edited .bin file in persist/
downloaded WCNSS_wlan_dictionary.dat and put it in persist to comply with symlink in prima/
fastboot oem install [2 of my carriers; entel, claro]
Replaced WCNSS files in persist with the ones available the motorola repo
Copied WCNSS factory file to prima/ folder
Copied WCNSS_qcom_cfg.ini to /data/misc/wifi
went crazy with 776 permissions
Even after flashing stock with RSDLite, bootloader show the modified status as 3 when I think it should be 2. This has led me to think that something is in the file system that android does not like but is not being fixed by RSD nor clean wipes.
From what I understand, the only thing that could be surviving full flashes and wipes are contents in persist/ and modifications to the root of the system, like busybox and superSU. I've not been able to find any way of cleaning the root of the phone and I imagine that's really dangerous.
TL;DR Wifi driver is not loading, persist folder is ok and clean flash does not fix it.
Possibly relevant logcat entries:
E WifiService: Invoking mWifiStateMachine.setWifiEnable
D WifiStateMachine: setting operational mode to 1
E WifiHW : User build,dont Start logging service.
E WifiService: Invoking mWifiStateMachine.setWifiEnabled
E WifiStateMachine: Failed to load driver
D WifiStateMachine: setWifiState: unknown state
Info for nerds:
Source code of WifiStateMachine.java containing the error message:
Code:
public boolean processMessage(Message message) {
switch (message.what) {
case CMD_START_SUPPLICANT:
[B]if (mWifiNative.loadDriver())[/B] {
// Code for loading supplicant
} else {
loge("Failed to load driver");
}
break;
# More code
}
}
WifiNative.java cointains the class being instantiated where the evaluation calls a empty abstract method:
Code:
public native static boolean loadDriver();
I'm having problems for identifying where this class is being extended for this method to actually do something. If anyone knows please leave a comment.
Wifi problems and fixes
I've still not found a solution for myself, but I figured I still can give some tips for people with problems, especially considering how confusing is to get information about this.
This is a work in progress. I would gladly receive corrections and new info.
Before anything, do a backup. Even if your wifi does not work, it can save you from a lot of problems. Remember to backup the persist folder, a lot of automated recoveries don't make a backup of that folders because it's supposed to survive flashes but there's ways in which you can do it by mistake. It also helps a lot with bug hunting.
Things you should have already tried:
Plane mode on, reboot, wifi on and plane mode off
Network settings reset in android and reboot
Rebooted to safemode (longpress in power off when turning phone off]
Factory reset in android
Removal of SD and SIM cards
Factory reset in recovery
Flash Stock ROM in RDSlite
Unlock bootloader
Activate developer mode and set usb debug on
Installed custom recovery
Clean Flash stock ROM trough fastboot
Flash custom Kernels
Things you need:
adb and fastboot
usb drivers for the phone
Optional Text editor that preserves text format (avoid notepad and MS word)
Optional Busybox for extended commands in android shell (root required)
Optional If you're in windows and want to mess with adb: A decent console to work with.
Option A: cash with cmder
Install cmder
Install NodeJs
Install cash tipping in cmd npm install cash-global -g (after NodeJs)
Option B: babun
http://babun.github.io/
optional Open text editor for easy copy-paste of long paths and commands
optional Hex editor if you want to edit .bin files. I use XVI32
Useful console commands (In windows you need one of the optional shells described above)
List files and folders
Code:
ls -la [path to list]
Find file/folder in linux (and android shell)
Code:
find / -iname '*[word you're looking]*'
* are 'wildcards', they allow for matching any text (or no text at all)
you can add, before -iname, -type f (for files) or -type d (for folders)
Symlink
It's an alternative of copying files. this allows you to simulate having a file in two different places, but really all paint to one. Modifications in this source are going to affect all the links, so it's easier to configure. Android does this a lot.
Code:
ln -s [path to] [from]
Copy files and folders
Code:
cp [-R if you want to move folders] [path to source] [path to target]
logcat for essential wifi messages (short-colored) If someone know more, please let me know
Code:
adb logcat -v brief -v color WifiSerice:V WifiHW:V WifiStateMachine:V FileUtils:V QSEECOMAPI:V *:S
change owners and permissions
the flag -R makes the command work for files and subfolders
Code:
chown user:group [path to file or folder]
chmod [num of user][num of group][num of all] [path to file or folder] [SIZE="2"](e.g. chmod 660 /persist/WCNSS_qcom_wlan_nv.bin)[/SIZE]
grep
This one is awesome; It's for filtering the results of any command, so you can use it for filtering.
Code:
[command you want to filter] | grep -i [term you're looking for]
For example, [adb logcat] gives you a huge list of messages, but [adb logcat | grep -i wifi] gives you just the lines that contain 'wifi'
From my experience, this are the common folders related to wifi configs:
Code:
/persist/
/system/etc/firmware/wlan/prima/
/system/etc/wifi/
/data/misc/wifi/
Command list for do a full clean flash:
please note that system.img_sparsechunk can vary in number according to ROM, but I've put 9 in here because failed commands don't write to phone
note: fastboot flash partition gpt.bin works perfectly when used first, but for me it's failing when I erase system and boot first.
Code:
fastboot erase system -w
fastboot erase boot
fastboot erase fsg
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash modem NON-HLOS.bin.
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot (or reboot-bootloader)
Important: Every time you flash, do a clean wipe. In fastboot this usually means using erase system -w and erase boot before flashing.
Be aware that for getting the logcat your phone must be booted to android OS.
Be aware that for copying and modifying important files you must access the phone's shell either in recovery mode or switching to root with the command (su) that's only accesible if you're rooted.
Ok. If you made it this far you're probably losing your mind. To debug this, especially if you're going to post asking for help, get the catlog of your phone and/or a precise description to look for clues to your problem (I have a command ready for you above).
Here's some common solutions I've found while trying to solve my own problem: (Credits to the authors of the solutions)
Bad permissions/users
These appear to be correct or usable permissions for relevant files. Consider that there's a lot of fragmentation in this info so they might be wrong.
Confirmation of these would be great:
Code:
-rwxrwx--- wifi wifi /system/etc/wifi
-rw-rw---- wifi wifi /system/etc/wifi/wpa_supplicant.conf
-rwxrwx--- wifi wifi /data/misc/wifi
-rwxrwx--- wifi wifi /data/misc/wifi/sockets
-rw-rw---- wifi wifi /data/misc/wifi/wpa_supplicant.conf
-rw-rw---- system:wifi /data/misc/wifi/WCNSS_qcom_cfg.ini
-rw-rw---- wifi wifi WCNSS_qcom_wlan_nv.bin
-rw-rw---- root root WCNSS_wlan_dictionary.dat
-rwxrwx--- is 770, -rw-rw---- is 660
Is reported in some places that the parent folder of wpa_supplicant.conf should be -rw-rw---- wifi wifi
Missing or badly configured wpa_supplicant.conf
The solution is place a new copy of the file in the correct folders. If someone has a 'oficial' source or more info let me know
I remember reading that some people had success deleting the file so the SO rebuilds it. Do it to your discretion and remember to backup
Missing WCNSS files
These files are essential and must be in the correct paths for wifi drivers to load.
There's a lot of different sources for this files, but from my experiencie they don't change a lot (last commits are more than one year old).
Files in oficial source repository from motorola
These posts have info and files
http://forum.xda-developers.com/showthread.php?t=2589790
http://forum.xda-developers.com/showpost.php?p=48861415&postcount=19
Paths of relevant files. Please consider that not just because it's here means you need it
Code:
/persist/WCNSS_qcom_wlan_nv.bin
/persist/WCNSS_qcom_wlan_factory_nv.bin
/persist/WCNSS_qcom_wlan_dictionary.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
/system/etc/firmware/wlan/prima/WCNSS_cfg.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_dictionary.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_factory_nv.bin
/data/misc/wifi/WCNSS_qcom_cfg.ini
/data/misc/wifi/wpa_supplicant.conf
Missing /persist/drm/widevine and/or /persist/prov
Check this two posts:
http://forum.xda-developers.com/showthread.php?t=2589790
http://forum.xda-developers.com/showpost.php?p=48861415&postcount=19
In there you can find backups to get the folders, restore them to /persist/ and check permissions.
Bad MAC address in WCNSS_qcom_wlan_nv.bin
Sometimes the file WCNSS_qcom_wlan_nv.bin needs to be updated with the correct mac address.
Since it's a .bin file, it cannot be changed with a text editor. You need to use a hex editor (XVI32 link is in 'things you need' above).
The mac address starts at 'A' (since is hex) or, more simply, after 10 'cells'. Be aware that in this editor changes get 'inserted' instead of modified, so you have to delete the initial 6 addresses of the old mac.
Put the file back, and check permissions. There's two copies of this file: one in /persist/ and another in /system/etc/firmware/wlan/prima/ change one or both according with your situation
Some logcat messages and details about them
For getting more messages about wifiHW you need a userdebug build like CyanogenMod. Stock roms don't log wifiHW.
Code:
WifiStateMachine: failed to load driver
WCNSS_qcom_cfg.ini and/or WCNSS_cfg.dat is missing somewhere. In my case this was missing from /system/etc/wifi.
Code:
wcnss_service: CAL file not found
This refers to the calibration file. The source of wcnss-service.c defines this file as "WCNSS_qcom_wlan_cal.bin" in the path "/data/misc/wifi/WCNSS_qcom_wlan_cal.bin". however, source show that CAL file is not used if the factory file is present. Source in link gives this address '"/data/misc/wifi/WCN_FACTORY" which is weird because from posts in xda this file has the name "CNSS_qcom_wlan_factory_nv.bin" I'll update if I have more info
Info for nerds:
How android Wifi works:
https://community.freescale.com/docs/DOC-93603
source code for wifi opt framework - android 6.0.1 r22
source code for wifi qcom framework - android 6.0.1 r22
you need hex editor to edit those .bin files.www.droidrzr.com/topic/65438-how-to-change-your-mac-address-xt926/
forum.xda-developers.com/nexus-4/help/nexus-4-mac-changer-spoofing-t2180809/page3
Thank you for your answer!
I'll make the edit in the file but I'll take a while to report back on the results because it's already too late in here.
Considering this, would it make sense for a nonmatching mac address show up as 02:00:00:00:00 in the wifi details screen?
RoDeltaLambda said:
Thank you for your answer!
I'll make the edit in the file but I'll take a while to report back on the results because it's already too late in here.
Considering this, would it make sense for a nonmatching mac address show up as 02:00:00:00:00 in the wifi details screen?
Click to expand...
Click to collapse
Yes, your Mac address is fine, just checked I also have the same
try this and report if its working
1. Put the phone into airplane mode.
2. Restart the phone.
3. Turn on WiFi.
4. Connect to the WiFi network.
5. Turn off airplane mode.
bablu048 said:
Yes, your Mac address is fine, just checked I also have the same
try this and report if its working
1. Put the phone into airplane mode.
2. Restart the phone.
3. Turn on WiFi.
4. Connect to the WiFi network.
5. Turn off airplane mode.
Click to expand...
Click to collapse
I've tried those steps and it's not working.
Logcat shows "WifiStateMachine: Failed to load driver" in each attempt.
I will update the .bin modifications results in a couple of minutes
bablu048 said:
you need hex editor to edit those .bin files.www.droidrzr.com/topic/65438-how-to-change-your-mac-address-xt926/
forum.xda-developers.com/nexus-4/help/nexus-4-mac-changer-spoofing-t2180809/page3
Click to expand...
Click to collapse
I have tried the modifications to no avail.
Steps I did:
get the wifi mac address from the recovery logs
adb pull the files on recovery with persist mounted
hex edited the lines taken from the screenshot on your second link (Both _factory_nv.bin and _nv.bin
adb pushed lines back to mounted persist on recovery
cleaned data/cache/dalvik
rebooted to system
Is there something in the /data/ folder that could be causing the issue? Now both files show back at -rw-r--r-- permissions with root:root owner. I'll try again without wiping data this time and post the report.
RoDeltaLambda said:
I have tried the modifications to no avail.
Click to expand...
Click to collapse
I think this thread solved the problem just by replacing the files from another device forum.cyanogenmod.org/topic/84876-wifi-failure-after-cm11-install-still-present-after-restore-from-backup/
bablu048 said:
I think this thread solved the problem just by replacing the files from another device forum.cyanogenmod.org/topic/84876-wifi-failure-after-cm11-install-still-present-after-restore-from-backup/
Click to expand...
Click to collapse
I have tried the steps in that topic, copying the exact same files in /persist and /prima. Problem still persists
From that topic I've learned that at flash time the files from persist are taken out and sent to system folders. I will try to reflash now with the new files and permissions set up
After the actions of my last post and before the new flash, I scanned the results of adb logcat *: D | grep Wifi
Here are some entries that could be of interest:
more possibly relevant logcat entries:
Code:
[SIZE="2"][I]Initially country code appears to be empty:[/I][/SIZE]
I WifiService: WifiService trying to set country code to with persist set to true
WifiService: Client connection lost with reason: 4
I WifiService: WifiService trying to set country code to cl with persist set to true
E WifiService: Invoking mWifiStateMachine.setWifiEnable
D WifiStateMachine: setting operational mode to 1
E WifiHW : User build,dont Start logging service.
E WifiService: Invoking mWifiStateMachine.setWifiEnabled
E WifiStateMachine: Failed to load driver
D WifiStateMachine: setWifiState: unknown state
RoDeltaLambda said:
I have tried the steps in that topic, copying the exact same files in /persist and /prima. Problem still persists
From that topic I've learned that at flash time the files from persist are taken out and sent to system folders. I will try to reflash now with the new files and permissions set up
Click to expand...
Click to collapse
I've fully flashed the device with RSD and problem still persist.
Eager to hear some more ideas.
I noticed that in system/etc/firmware/prima, adding to the files I copied, there's one symlink: WCNSS_wlan_dictionary.dat -> /persist/WCNSS_wlan_dictionary.dat
This file is not present in my persist folder (nor the rest of the files in the phone, based on adb shell find . -name WCNSS_wlan_dictionary.dat). I imagine this could clearly cause a problem with the wifi driver looking for a file that does not exist.
Someone has a reliable source where I could get this file? I can try to delete it to see if the SO tries to rebuild something, but I would prefer the safest option first.
have you tried flashing back stock recovery then do a factory reset from there?
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
bablu048 said:
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
Click to expand...
Click to collapse
Thank you for the file and the instructions. I've checked the diff with 3 different sources:
Meninblack007 - vendor
huawei_msm8916
google android source code
All match, so I'll asume this is a universal file without modifications.
Moving this file to persist/ folder made no difference
I've also tried taking the files from motorola official github repo, copy them to persist/ and flash. Without success this far.
I'll send factory_nv.bin to prima folder and report back
flash the firmware through rsd lite, lock the bootloader and take it again to service center.
I am out of ideas and also Google searches.. I'll keep looking and report if I find anything else.
bablu048 said:
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
Click to expand...
Click to collapse
I've copied the file between the locations trough adb shell and there's no noticeable difference.
MAC address does not appear either in this screen:
I'll post this image and the versions of the phone in the OP
did u try ultra kernel?
i have same problem.
i flash ultra kernel(r3), and my wifi work fine.
jalal-jap said:
did u try ultra kernel?
i have same problem.
i flash ultra kernel(r3), and my wifi work fine.
Click to expand...
Click to collapse
Yes I've tried.
Flashed ultra kernel R2, R3 and squid kernels 14, 15, 15 oc, 15b
Click to expand...
Click to collapse
Considering all the changes I've done, it was a good idea to try again.
I've tried the last release of squid kernel, since the dev of ultra kernel recommended this one for 6.0.1.
Installed the kernel, wiped cache/dalvik and rebooted without success. Logcat is still showing failure at loading drivers.
The main problem I'm having is that the failure point is not correctly specified, so now I'll try to dig deeper into logcats to see if I pinpoint the source of the issue. If anyone can let me know about some complementary logs, I would be super grateful.
I've installed CM to have a userdebug build, in order to debug more in detail thanks to the logs of wifiHW.
After fixing an error of missing WCNSS_qcom_cfg.ini in /system/etc/wifi (Copied from prima folder) I've came across this error appearing persistently:
Code:
wcnss_service: Failed to open /dev/wcnss_ctrl : Bad address
I've looked around but there's no info of how could I deal with this. I will dig around a little more but if someone has a tip I would gladly hear
TL;DR: (story in second post)
As always, everything you do is at your own risk. I'm not responsible for your phone running away or any nuclear wars.
1. Edit the content of /persist/wlan_mac.bin using a file manager with root access (e.g. Solid Explorer) and change the first two lines to your desired MAC. It's a good idea to keep the first 3 bytes (the OUI), or bad things may happen.
2. Using a terminal emulator (e.g. Termux), execute the following commands:
Code:
su
chattr +i /persist/wlan_mac.bin
And done! You may have to switch airplane mode on and off.
I just got my new OnePlus 5T, and of course, one of the first things I want to do is to change my MAC address. I immediately spotted the file:
Code:
/persist/wlan_mac.bin
But even if I hadn't, tools like my overseer can find it automatically for us.
So the file is in a standard directory for Qualcomm chips. Using Solid Explorer (with root access), I modified the file's content to change the first two lines to my desired MAC address. I then switched airplane mode on and off and..... it didn't work? I quickly checked the file content again - it had reverted back. Ouch.
To combat this, I ran my overseer tool, but to no avail. There was no obvious file containing our MAC, only symlinks to this one. I then figured that maybe the system caches the value somewhere, and restores it when I toggle airplane mode (spoiler: it doesn't).
Well, the next attempt is mainstream: write-protect the file (set it to immutable). Using a terminal emulator (e.g. Termux), I executed:
Code:
su
chattr +i /persist/wlan_mac.bin
Airplane mode on and off... and it works! I restarted the phone and verified our success. Now, one last question burdened me. Was the system caching the MAC address? I removed the immutable attribute after the restart (so the new MAC would have been cached) and after I switched airplane mode -- original MAC was restored! So the system is doing something else to stop us.
Anyways, the current method works flawlessly and I shall refrain from digging any further just now.
Good luck!
i did whatever you mentioned here. after i set it to immutable, wifi wasn't working, mac address was 02:00:00:00:00:00 . i couldn't even edit the file because i set it to immutable. so i had to remove the immutation by using -i command. i still wanna know how to change my mac address. please help me out
aneesh12 said:
i did whatever you mentioned here. after i set it to immutable, wifi wasn't working, mac address was 02:00:00:00:00:00 . i couldn't even edit the file because i set it to immutable. so i had to remove the immutation by using -i command. i still wanna know how to change my mac address. please help me out
Click to expand...
Click to collapse
Hey,
You have to edit the file before you set the immutable flag, otherwise you'll get access denied just like you observed. Unless you messed up the content of the file I see no reason you are getting an invalid MAC. Make sure you preserve the first 3 bytes (the OUI) when setting a new MAC.
ViRb3 said:
Hey,
You have to edit the file before you set the immutable flag, otherwise you'll get access denied just like you observed. Unless you messed up the content of the file I see no reason you are getting an invalid MAC. Make sure you preserve the first 3 bytes (the OUI) when setting a new MAC.
Click to expand...
Click to collapse
is there no way to change the whole Mac address(including the OUI)?
aneesh12 said:
is there no way to change the whole Mac address(including the OUI)?
Click to expand...
Click to collapse
Sure you can, as long as you use a valid OUI. While using a made-up OUI won't affect you in the short-term, some (public) hotspots could block you.
okay, by your method, i could change the mac address but not completely, only the last 4 digits. i searched for woan_mac.bin . this is what i found. these files might be causing for you to reverting back to the original mac address after removing the immutation.
I tried to change mac address of my OP5T completely to my laptop's(lenovo thinkpad) mac address
system is reading that address in reverse fashion.
eg. i put Aa:Ba:Ccd:Ee:Ff at the first line of wlan_mac.bin then system is showing Ff:Eed:Cc:Bb:Aa as mac after airplan mod on/off