A brief history of what I've been through before this issue:
My Pro came with 2.2 Froyo from verizon, then flashed Vanilla's CM7 v8 (which is the absolute best ROM I've tested for this phone); no wifi mac address problem here. Then I messed up by installing another recovery, semi-bricked, and forced to SBF to stock Verizon 2.3.3 gingerbread. Then rooted with Pete's Motorola Root Tools, flashed recovery, kernel, wiped, and once again to Vanilla's CM7 v8.
After all this mess, my Wi-Fi MAC address is changing every time wifi goes off/on or reboot, and this is pretty inconvinient for me since both my workplace and home networks have MAC address filter, and changing the router configuration every time I'm forced to reboot my phone is not an option.
YES, I've flashed the Kernel that the developer provides with the ROM.
YES, I've tried reflashing both the rom and the kernel the way the diveloper suggests, doing system/data/cache wipes in between.
NO, this was not happening the first time I've flashed this ROM.
Any suggestions?
Please help!!
SOLVED READ BELOW!
Fix found
Here's the MAC address fix for your Pros running CM7. If you have had an issue connecting to wifi, it's probably because each time the device's wifi is restarted, a new MAC address is generated which will clog up your router as you can easily run out of IP addresses to lease to each and every new MAC address that's generated each time your device's wifi is restarted. The link can be downloaded here. The instructions are simple:
1. Flash CM7MAC.zip (attached) in clockwork no need to wipe anything
2. "Activate it" by going into the terminal emulator app, typing "su" (without the quotes) then typing "mac-address-fix.sh" (without the quotes). A bunch of weird symbols should come up, but that's normal.
What this does is it auto-generates and writes your permanent MAC address to a file called called nvs_map.bin under /data/misc/wifi/nvs_map.bin. It will remain there and your MAC address will remain the same unless you wipe your /data whereas you will simply have to redo it
Note: if you get an error message in the terminal after doing the fix, make sure your Wi-Fi is turned on and you're connected to a network
For CM7, download -->
hi!
my phone does the same, each time WIFI is turned on it generates a temporary MAC address, but the file you mentioned (nvs_map.bin) can't be found in /data/misc/wifi...
could you help me please how the map_gen file is generated? i don't have CWM so i can't flash the zip file, but i have a terminal and two hands
thx
Do we have anything for Android 4.2?
negro_acdc said:
Here's the MAC address fix for your Pros running CM7. If you have had an issue connecting to wifi, it's probably because each time the device's wifi is restarted, a new MAC address is generated which will clog up your router as you can easily run out of IP addresses to lease to each and every new MAC address that's generated each time your device's wifi is restarted. The link can be downloaded here. The instructions are simple:
1. Flash CM7MAC.zip (attached) in clockwork no need to wipe anything
2. "Activate it" by going into the terminal emulator app, typing "su" (without the quotes) then typing "mac-address-fix.sh" (without the quotes). A bunch of weird symbols should come up, but that's normal.
What this does is it auto-generates and writes your permanent MAC address to a file called called nvs_map.bin under /data/misc/wifi/nvs_map.bin. It will remain there and your MAC address will remain the same unless you wipe your /data whereas you will simply have to redo it
Note: if you get an error message in the terminal after doing the fix, make sure your Wi-Fi is turned on and you're connected to a network
For CM7, download -->
Click to expand...
Click to collapse
Note: if you get an error message in the terminal after doing the fix, make sure your Wi-Fi is turned on and you're connected to a network
** How can I turn on Wi-Fi when there's no mac-address? No mac-address, no network! **
Hi,
I tried running this shell script but seems like its not executed successfully ... reason i believe so is ...
1. i dont see any wierd symbols coming up ... just a pause for a couple of seconds.
2. i dont see the "/data/misc/wifi/nvs_map.bin' file in the said location.
Please help.
thnx
Mac addrs and imei problm
Hi, in my gionee ctrl v4s the problem is two types, i have seen after i was updated lollipop , one problem is tht, whn i reboot my phn thn my mac address automatically changed everytime.. And 2nt problem is tht my imei also erased whn i updated lollipop so plz help me...
this is the best solution
https://www.youtube.com/watch?v=8ejnFB5i5o8
Is there a solution for this in Marshmallow?
yes this is the best solution
Thanks. This process worked well on my lenovo s650 cyanogenmod 13 custom rom. But could someone explain what is really happening through this solution?
my oppo f1s 64gb, it was dead, recovered working fine, but each restart it changes mac id, and remove all wifi stored connections
is there any solutions?
Seems its pretty common for MediaTek chipsets.
Thanks for the video link!
Been using a rooted nook, version 1.2.1 for a couple of months now. Suddenly noticed that my device details have been erased. The following under Settings-About Your Nook comes up as 'Unavailable',
Owner
Account
Software Version
Wi-Fi MAC Address
Would not mind this much but been experiencing problems with wi-fi connectivity since the erasure of these details and think the disappearance of my Wi-Fi MAC Address might have something to do with it.
Thanks!
Is /rom still populated with appropriate files containing the correct details?
cowbutt said:
Is /rom still populated with appropriate files containing the correct details?
Click to expand...
Click to collapse
Yes, the details are still there.
The disappearance of the details is not as much a problem as the failure to connect to wi-fi. Can there be any reason, not related to this, for the loss of wi-fi connctivity?
Hi all. I have the following problem, which happened sometime on 4.2.2 and there is still present in 4.3. Note here that I flashed the whole image of 4.3 using adb but without wiping (that is I deleted the –w in the bat file of the image)
So, my nexus 4 does not keep the passwords of some routers wifi and I have to manually login to them every time to connect. This happens in different modems/routers, including my house’s.
Strange thing is that sometimes, even if it is connected, wifi’s name is shown in the list without saying connected underneath. And if I choose it, it prompts me to enter the password to connect.
I opened the wifi list using root explorer (/data/misc/wpa_supplicant.conf) and I deleted the several references of those specific routers but problem still occurs.
Now, is there something I can do to avoid the whole system format? I guess that something is causing a cobflict, but I really can’t think of what that is.
Any ideas?
Thanks a lot.
Hi there,
First of all, this is my first thread and before asking for anything I want to thank every contributors to this forum as this forum has been really helpful to find out how to root my phone, install CWM and a custom ROM and fix some minor issues!
I have an Australian LG Optimus L7 P705. I was on ICS and wanted to upgrade to JB (stock update not available in Australia)
I installed Slim Bean 4.1.2 Build 3 a few weeks back on my phone which is awesome!
A few days back, I have done the same on my partner's P705. The ROM is working fine too.
But since, we both have Slim Bean installed on our phones, well I realised the ROM changed our MAC address to exactly the same.
As a result, we can't be connected to the house Wifi at the same time which is really annoying as we live together...
I have tried to create 2 separate networks and to use MAC Address spoofer but nothing worked.
Have I done something wrong when flashing Slim Bean or is just normal for a custom ROM to give the same MAC address to all of its users?
Is there any way we could still use the same ROM and get our original MAC Address back?
If there are no solutions, what custom ROM on JB 4.1.2 would you recommend as an alternative (I'm happy to change ROM if needed if I get the same speed and reliability as SlimBean) so we'd be on a different ROM from each other until we get a stable and fully functional version of JB 4.3?
Thank you to anyone who can help or try to help!
Anyone with a solution please?
I edited my first post so the problem is better described.
Thanks!
Hi Everyone,
I found the solution by myself so I will share it in case other people are in the same situation as me.
The Wifi MAC Address on LG P700/705 using Slim Bean (maybe the same on other ROM, please test) is located in:
/system/etc/firmware/wlan/volans/WCN1314_qcom_cfg.ini
You will need to change the MAC address in this file with the text editor from any root explorer app.
To be able to write on the /system folder, I simply used "mount /system (rw / ro)" app from Google Play: https://play.google.com/store/apps/details?id=com.beansoft.mount_system&hl=en
Just press Mount r/w and it will work (no need to get any terminal emulator or adb shell I couldn't understand myself, you will still need to be rooted and grant superuser to the app of course)
Modify the MAC address in the file above to the MAC address of your choice (there are four different line with MAC addresses, I have put the same number in all of them)
Save the file
Restart your Wifi on your phone
You will have the MAC address you specified as your new MAC address.
I tried restarting Wifi and phone a few times and it seems to be a permanent fix.
PS: If I were you, I would still press "Mount r/o" on the mounting app after changing the MAC address to put the /system folder back into "read-only" just as a safety thing.
I hope I helped someone!
Hi,
First off i want to state that i have some knowledge of the legal issues concerning changing of MAC addresses and the sole reason that i want to do this is because privacy is a big issue for me and i have a right to enjoy my right. Therefore, any posts or argument concerning such are requested to be posted elsewhere where the topic expressly states so.
Also, please treat me like a newbie when it comes to developing and programming of any kind. I have a very shallow understanding of kernel and the likes.
I am using a rooted S5 G-900H(Exynos with BCM 4534 chip)
Running on 4.4.2 Kitkat stock ROM and Kernel
So without further ado, here is what i have found so far
The MAC address is reflected in a hidden file called .mac.info in the /efs/wifi/ folder. However, editing the file does not change the actual MAC address in anyway. A phone reboot or even turning the wifi on/off will just change it back to the original.
I dumped partitions from /dev/block/ on to my SD card and copied it to my laptop. I searched through the files and found the MAC address in the efs.img partition.My wifi was turned off and the plane was in airplane mode. I modified it and flashed it back using the dd command from terminal emulator on my phone(this can also be done through adb shell but im guessing if you know what that is then you obviously know how to do it).
I rebooted the phone and everything seemed fine. The Wifi MAC address in the status screen in settings displayed my edited address. The .mac.info file also displayed the same. The problem is that it reverted back to the original as soon as i turned on the wifi. The MAC address values in the .mac.info file, status screen and the efs partition from the /dev/block/, all changed back to the original.
I have read that for most phones the important information unique to that particular phone(like IMEI, wifi/BT MAC address, unlock codes and so on) is stored in the NV_DATA.bin file, but everything is encrypted. Also there are only guides as to searching unlock codes and such, so i tried to search for hash blocks randomly using Hex Editor but there was nothing of the sort and the only hash block i can recognize is the one with AES-Encryption as shown from another forum on this site.Maybe it is another type of encryption, but that was another dead end for me.
Then i tried to search and edit various files and kernels as such, but there are no kernels that directly offer this customization. Tried to edit init.tuna.rc but there was no such file in the root directory. Searched init.goldfish.rc and init.wifi.rc and found nothing, but i did see init.svc.macloader mentioned and since i didnt want to mess with programs in the /system/bin/file i left it as is.
Also tried to search through PARAM partition using Hex Editor but nothing was there. Did the same for RADIO and BOOT but i dont think i did find anything major there.
tried to edit /sys/class/net/wlan0/address but it didnt let me, even though i was mounted as r/w. Flashing through dd command on terminal also resulted in permission denied. I was only able to view or dump it. I thought that may have been the source, but modifying the MAC address through the busybox if config command was reflected on the file. which obviously means that its not.
Looked through the dmesg (kernel) log and found a few interesting things but i dont know how to interpret them and what to do with it either. Ill post it later.
There is no NVRAM.txt the only ones in place of it i have are nvram_mfg.txt, nvram_mfg.txt_wisol, nvram_mfg.txt_semco3rd, nvram_net.txt, nvram_net.txt_semco3rd, nvram_net.txt_wisol.
I did do a bit more searching and editing, but i dont recall them right now.
Now, After all that what i think is this.
There is a source for the original MAC address somewhere either hardcoded in the Broadcom chip or somewhere in the partitions under a layer of encyrption.
The Original MAC address is only accessed when the wifi is turned on and not on reboot. This means it is not in any file, program or script that activates on boot, so only scripts and files accessed and imported during the turning on of wifi
must have it. Also while wifi is on and running, busybox ifconfig command changes the MAC address succesfully albeit temporarily, although the change is not seen on the status screen and but it does on the .mac.info file.
Any help from anyone, especially from developers with knowledge of Android kitkat ROm and kernels would be very much appreciated.
Alpaca_Bandit said:
Hi,
First off i want to state that i have some knowledge of the legal issues concerning changing of MAC addresses and the sole reason that i want to do this is because privacy is a big issue for me and i have a right to enjoy my right. Therefore, any posts or argument concerning such are requested to be posted elsewhere where the topic expressly states so.
Also, please treat me like a newbie when it comes to developing and programming of any kind. I have a very shallow understanding of kernel and the likes.
I am using a rooted S5 G-900H(Exynos with BCM 4534 chip)
Running on 4.4.2 Kitkat stock ROM and Kernel
So without further ado, here is what i have found so far
The MAC address is reflected in a hidden file called .mac.info in the /efs/wifi/ folder. However, editing the file does not change the actual MAC address in anyway. A phone reboot or even turning the wifi on/off will just change it back to the original.
I dumped partitions from /dev/block/ on to my SD card and copied it to my laptop. I searched through the files and found the MAC address in the efs.img partition.My wifi was turned off and the plane was in airplane mode. I modified it and flashed it back using the dd command from terminal emulator on my phone(this can also be done through adb shell but im guessing if you know what that is then you obviously know how to do it).
I rebooted the phone and everything seemed fine. The Wifi MAC address in the status screen in settings displayed my edited address. The .mac.info file also displayed the same. The problem is that it reverted back to the original as soon as i turned on the wifi. The MAC address values in the .mac.info file, status screen and the efs partition from the /dev/block/, all changed back to the original.
I have read that for most phones the important information unique to that particular phone(like IMEI, wifi/BT MAC address, unlock codes and so on) is stored in the NV_DATA.bin file, but everything is encrypted. Also there are only guides as to searching unlock codes and such, so i tried to search for hash blocks randomly using Hex Editor but there was nothing of the sort and the only hash block i can recognize is the one with AES-Encryption as shown from another forum on this site.Maybe it is another type of encryption, but that was another dead end for me.
Then i tried to search and edit various files and kernels as such, but there are no kernels that directly offer this customization. Tried to edit init.tuna.rc but there was no such file in the root directory. Searched init.goldfish.rc and init.wifi.rc and found nothing, but i did see init.svc.macloader mentioned and since i didnt want to mess with programs in the /system/bin/file i left it as is.
Also tried to search through PARAM partition using Hex Editor but nothing was there. Did the same for RADIO and BOOT but i dont think i did find anything major there.
tried to edit /sys/class/net/wlan0/address but it didnt let me, even though i was mounted as r/w. Flashing through dd command on terminal also resulted in permission denied. I was only able to view or dump it. I thought that may have been the source, but modifying the MAC address through the busybox if config command was reflected on the file. which obviously means that its not.
Looked through the dmesg (kernel) log and found a few interesting things but i dont know how to interpret them and what to do with it either. Ill post it later.
There is no NVRAM.txt the only ones in place of it i have are nvram_mfg.txt, nvram_mfg.txt_wisol, nvram_mfg.txt_semco3rd, nvram_net.txt, nvram_net.txt_semco3rd, nvram_net.txt_wisol.
I did do a bit more searching and editing, but i dont recall them right now.
Now, After all that what i think is this.
There is a source for the original MAC address somewhere either hardcoded in the Broadcom chip or somewhere in the partitions under a layer of encyrption.
The Original MAC address is only accessed when the wifi is turned on and not on reboot. This means it is not in any file, program or script that activates on boot, so only scripts and files accessed and imported during the turning on of wifi
must have it. Also while wifi is on and running, busybox ifconfig command changes the MAC address succesfully albeit temporarily, although the change is not seen on the status screen and but it does on the .mac.info file.
Any help from anyone, especially from developers with knowledge of Android kitkat ROm and kernels would be very much appreciated.
Click to expand...
Click to collapse
As you said, ifconfig changes it, there are several apps that do it for you as well, chainfire also released a mac randomizer app. You also noted it's hardwired in, so i would just have a startup script that changes it if i were you, there night be a better way to do it though.
Sent from my Tw5ted SM-G900A using Tapatalk
Yes, I have been using pry-fi as an option but the thing is that when i'm watching videos or downloading large sized files from playstore or other file hosting sites, it starts to turn my wifi on/off several times before becoming stable and logging in to the AP again. I have tried macchanger also and both misbehave after an interval of time. Thats why im trying to search for a more cleaner way to do it.
Running an init script would be nice but i have no idea how to do that. But there should be a script that only runs when turning on the wifi right? Would you know where this file was located and how to modify it? and if so please tell me.
Alpaca_Bandit said:
Yes, I have been using pry-fi as an option but the thing is that when i'm watching videos or downloading large sized files from playstore or other file hosting sites, it starts to turn my wifi on/off several times before becoming stable and logging in to the AP again. I have tried macchanger also and both misbehave after an interval of time. Thats why im trying to search for a more cleaner way to do it.
Running an init script would be nice but i have no idea how to do that. But there should be a script that only runs when turning on the wifi right? Would you know where this file was located and how to modify it? and if so please tell me.
Click to expand...
Click to collapse
You can just use init.d to make the script, shell scripting isnt very hard and i won't give you a tutorial here. Also as noted many places when researchng changing a mac on android, you can't connect to secured APs, or it won't be easy at least. As i said before, there may be a better way to do this, but i do not know it.
Sent from my Tw5ted SM-G900A using Tapatalk
Ok, thanks a lot. Running a script might just be cleaner than anything else I have right now. I'll still be on the lookout for other ways though. Call me hard to please.
Btw, I think the reason most custom MAC addresses(if they do get changed) are too different than the ones registered on the chip. I've found that changing only the 2nd digit out of the 12 in the address, to an even hexadecimal number like 2 or A, works for me on my pc.
Also you need to forget the networks on your pc or android as soon as you change it. Doesnt matter if you have the password or not, it doesnt connect. Must be something to do with the saved info about the ap on the phone that messes it up.
Alpaca_Bandit said:
Ok, thanks a lot. Running a script might just be cleaner than anything else I have right now. I'll still be on the lookout for other ways though. Call me hard to please.
Btw, I think the reason most custom MAC addresses(if they do get changed) are too different than the ones registered on the chip. I've found that changing only the 2nd digit out of the 12 in the address, to an even hexadecimal number like 2 or A, works for me on my pc.
Also you need to forget the networks on your pc or android as soon as you change it. Doesnt matter if you have the password or not, it doesnt connect. Must be something to do with the saved info about the ap on the phone that messes it up.
Click to expand...
Click to collapse
I know on for example ddwrr and even some official router firmwares they allow you to spoof your mac, may be worth looking into how they do it, but i have a suspicion it might be done with a script.
Sent from my Tw5ted SM-G900A using Tapatalk
Hard Wired?
I have been messing with 2 Alcatel Ideal 4060a, (because I bricked the first one i had).
After bricking the first 4060a I had, (wiping all partitions), I bought a second, (so I could install TWRP on it back it up and restore the backup onto the first).
After Restoring the backup of the second onto the first, all was good until I tried to get them online together.
When one connected it knocked the other offline, because they both share the same MAC address.
This is my problem and I wish the Mac Addresses were hard wired, then i wouldn't have this problem.
This is good news for anyone who wants to know if mac addresses are indeed hard wired. They are not, (at least not in the 4060a).
Hope This Helps.
gscripting
MAC for bt and wifi reside in the EEPROM or NVRAM. And that is not editable.
To put it simply you can't change it. Only spoof it. And if you know it's not legal you probably shouldn't be asking.
Reported Is different from original
gscripting said:
I have been messing with 2 Alcatel Ideal 4060a, (because I bricked the first one i had).
After bricking the first 4060a I had, (wiping all partitions), I bought a second, (so I could install TWRP on it back it up and restore the backup onto the first).
After Restoring the backup of the second onto the first, all was good until I tried to get them online together.
When one connected it knocked the other offline, because they both share the same MAC address.
This is my problem and I wish the Mac Addresses were hard wired, then i wouldn't have this problem.
This is good news for anyone who wants to know if mac addresses are indeed hard wired. They are not, (at least not in the 4060a).
Hope This Helps.
gscripting
Click to expand...
Click to collapse
More info relative to these 2 phones
I installed an app called Change my Mac.
It Lists:
Original MAC 12:34:56:78:90:ab
Current MAC ff:ee:dd:cc:bb:aa
They Are Different.
I thought the original MAC address it's showing, was the one written in the EEPROM or NVRAM,
but it turns out, after installing Change My MAC on the other phone also, its lists the same Original and Current MAC addresses as the first phone.
The Current MAC address listed is the one reported in settings and my network.
I Use Change My MAC to set the reported MAC to the original every time the phone boots using Tasker on only one of them.
Using Change My MAC, the change lasts til boot.
Just passing it on for those that might be interested.
When I get link privileges, I'll add a screenshot of Change My MAC.
gscripting