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
Related
Hi,
i couldn't find any info on how to spoof/change MAC address on Galaxy S.
I so some commands for Android like:
ip link set eth0 address XX:XX:XX:XX:XX:XX'
and
'ip link set eth0 broadcast XX:XX:XX:XX:XX:XX'
but it gives me error like this:
ip: either "dev" is duplicate, or "XX:XX:XX:XX:XX:XX" is garbage
there are some threads here on xda in HD2 forum, they have a krenel that allows spoofing MAC address by changing startup.txt....
http://forum.xda-developers.com/showthread.php?p=8828147
what are solutions for Galaxy S?
thanks in advance
did you find the answer?
It is possible. i have given procedure for LG Optimus One. Same can be used for u'r phone. Just have to locate nvram.txt file. and appen line "macaddr = XX:XX:XX:XX:XX:XX" Where "XX:XX:X..." is u'r new mac address.
Here's the link
http://forum.xda-developers.com/showthread.php?t=917684
nice find, thanks!
Doesn't work for me.
All I found was nvram_net.txt in /system/etc/wifi
inside there was a line:
#macaddr=00:11:22:33:44:55
so I removed the coment mark (#) and restarted the phone but MAC address didn't change.
The file should be right, because in wifi.conf there is a line:
"DRIVER_MODULE_ARG=firmware_path=/system/etc/wifi/bcm4329_sta.bin nvram_path=/system/etc/wifi/nvram_net.txt"
Any other ideas?
ifconfig/ip commands do not work on sgs
I think that the problem is related to how the wifi driver is compiled.
SGS uses bcm4329 and it has an option for custom mac address.
I saw this in odriod's forum
drivers/net/wireless/bcm4329/Makefile line 9
-DGET_CUSTOM_MAC_ENABLE
Disable above definition and make a new bcm4329.ko
Put is with "adb push" command to /system/lib/modules (replacement),
Change the permission of /system/etc/dhcpcd file with 777.
Click to expand...
Click to collapse
want to change this.
Let's hope that there is a kernel builder out there that want to change it.
try dowing the interface before changing the MAC and uping it afterwards as in:
http://forum.xda-developers.com/showthread.php?t=1901171
So, just NAND flashed my HD2 over to DFT's .2 release of Android. This gave me the infamous MAC address issue of 00:11:22:33:44:55. Now according to a long searched for forum post if you go to:
/system/etc/ find file calibration and open it as view in text editor
in first line you will see the mac address
put your desired mac address,save and exit.
Now, for this you need Root Explorer. So I downloaded and installed Root Explorer. However when I run it, the program tells me I haven't granted the program super user access. Exact text: " Root access could not be obtained because su failed with the following message: permission denied Make sure you granted root permission when requested by SuperUser. If you did then try re-rooting your device. Root explorer will not continue in non-root mode." When I check in super user the page is BLANK. No programs have even requested super user access for me to give permissions to. I'm at a loss, either the version of Android isn't rooted, or the app isn't requesting SU access like it should. Either way I can't fix the MAC address issue. So, does anyone have an idea on how to fix either Root Explorer not getting SU access or the MAC address issue that doesn't require me to edit that file?
Download a program called "Z4Root" and run a Permanent Root, about 15 seconds after "Rebooting..." appears, restart your phone and try Root Explorer again and Allow it SuperUser Permissions
Got that to work last night actually! Now I'm just waiting to see what file should actually be edited as the calibration file isn't in system/etc.
My friend got the same problem (he got MAC adress like 00:00:00:00:00:00). Now i'm trying to find "adress" file in /sys/devices/virtual/net/eth0/ but nothing..
I put together a small shell script to make it easy for anyone rooted to block ads and check to see if they have the latest version I keep of adhosts. If after checking you do not have the latest, it will download it for you automatically.
What does this script do (in a nutshell):
1) Checks to see if you have the latest version of ad hosts for adblocking from me
2) If you do not have the latest, it will download it for you
3) If you have the latest, it just exits out, no changes
4) Installs the script to your /system/xbin directory so the next time you just have to type:
Code:
su
blockads
and it will run the script for you
How to run this?
Get this if you are using an AOSP ROM:
1) Download it from http://dl.dropbox.com/u/24904191/blockads
Try this if you are using a SENSE ROM (thanks chrootz for the fixes):
1) http://dl.dropbox.com/u/24904191/sense/blockads
*** If you have troubles getting the script to work, try updating your system to the latest version of busybox (stick it in /system/xbin and overwrite the current version of busybox, then change the permissions to 755 and owner and group to root) ***
2) Move it to /data/local/tmp (if you dont have it, create it) from a file explorer with root permissions (must set the system in r/w mode) or from the terminal shell
3) make sure the script has the right permissions by typing:
Code:
su
chmod 755 /data/local/tmp/blockads
in the terminal shell (in the emulator or whatever you use to get to it)
4) run the script by typing
Code:
/data/local/tmp/blockads
5) let it do its thing
After its done you can run it again anytime from the terminal by typing
Code:
su
blockads
as already mentioned.
I'm working on making it a GUI app next (with more features), but this should tie anyone who wants it over until then
Anyone who finds any adservers and wants me to add them to the list, feel free to list them here and I will add them.
Latest updates:
2011-12-01: Updated to block carrieriq
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
newter55 said:
Tried this out and got this:
sh-3.2# su
sh-3.2# /data/local/tmp/blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
update could not be completed, sorry
sh-3.2#
Click to expand...
Click to collapse
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
GermanGuy said:
Ok. I am stuck. I actually don't have a hosts file under "etc", only a hosts.bak. With root explorer mounted as r/w I am still not able to rename the "host.bak" file to "hosts" - error message "read-only file/directory". I created a blank "hosts" text file, put in on the sdcard and with terminal emulator still can't cp to "etc" because of "read-only directory" error message. Any other suggestions?
Click to expand...
Click to collapse
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Does this do anything differently then AdFree, from the market?
yareally said:
I forgot some ROMs and such have a busybox version that doesn't work right with hostnames in wget. I'll see if I can work around that and update the script
EDIT: updated to work around by using the IP for those that their busybox wget does not work correctly with hostnames. Only issue with that is the IP may change.
Click to expand...
Click to collapse
Updated blockads script to test this am and:
sh-3.2$ export PATH=/data/local/bin:$PATH
sh-3.2$ su
sh-3.2# blockads
Fetching host file via hostname
wget: bad address 'dl.dropbox.com'
The busybox version of wget on your system does not work correctly with
hostnames. Trying workaround with latest known IP to the hostname...
Connecting to 184.73.229.87 (184.73.229.87:80)
hosts 100% |***********| 641k 00:00:00 ETA
backing up old host file and updating
failed on 'hosts' - Cross-device link
md5sum: can't open '/system/etc/hosts': No such file or directory
/system/xbin/blockads: line 38: [: 8172d35d1b72871f7e1ef4e709920f0e: unary operator expected
Unable to chmod /system/etc/hosts: No such file or directory
Unable to chmod /system/etc/hosts: No such file or directory
remounting filesystem in r/o mode...
Cleaning up files...
rm failed for -f, No such file or directory
update complete!
sh-3.2#
The end result is the existing hosts file being renamed hosts.bak and obviously no new hosts filebeing being created.
EDIT.... The above is testing on my inspire running busybox 1.19. Tried using the script on my sensation running bb 1.18.4 and it works fine.
Edit edit... Installed bb 1.18.4 on inspire and result is the same as posted above.
DroidTh3ory said:
Top right corner of Root Explorer .... Mount RW.
Sent from my A05PTH3ORY using XDA App
Click to expand...
Click to collapse
That's what I did, but it does not work - still does not let me modify read-only files.
After reading over the code and seeing the comments, I can only guess you had the modified version of wget on your device during testing, which does support host names. Before I continue, I am not trying to rain on your parade, but... By downloading the file, checking the md5, comparing it to the existing file, replacing if needed, and then cleaning up... you went about 5 steps beyond what just doing an "if server file is newer" check would do by including a custom wget. Even though you have to put in the code to install and verify the wget, the trade is that you no longer have to download the file every time, check it every time, and worry about making sure the md5 matches.
If you decide you want to switch over to that method, you can check out the option already included in http://forum.xda-developers.com/showthread.php?t=1092128 by downloading the live install version to view the actual script. Just a recommendation to optimize the process. Nice work, though, you definitely found a way to get the job done.
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
twistedumbrella said:
As for the difference between this and Adfree. There is no real difference. Adfree checks the server, does a callback, and prompts the user with updates. Adfree just requires an entire shell to turn it into an app, but will automatically run on boot.
Click to expand...
Click to collapse
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
spotmark said:
So, for those of you not comfortable running ADB, or Terminal Emulator, just install AdFree, and let it do everything for you.
Click to expand...
Click to collapse
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Well, you also have the option of most included ROM toolkits, ScriptFusion, and a lot of preinstalled adblock scripts, but the big difference is the hosts file itself. Sounds like this one is custom, whereas mine takes bamf and adfree and merges them. This one may end up blocking more ads, but the only way to know would be to sit down and compare them all.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
Ah, I see.
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
yareally said:
Thank you for your comments everyone . I'll refine the script a bit more and also deal with a permanent workaround for not having a wget that checks hostsnames by testing with a ping and getting the IP first, using that and then doing wget. This started as a way for me to deal with having to move my ad host file each time I update it on my phone to just giving it out to everyone.
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
If anyone is still having problems that weren't resolved with it from above, let me know as well. I tested it against busybox 1.16.2 on my own phone, but it seems no 2 busybox version are alike
I havent tried this, but this one does include busybox 1.19 for those that don't want to manually install it. https://market.android.com/details?id=com.jrummy.busybox.installer&feature=related_apps
Click to expand...
Click to collapse
Hit me up if I can be any help. It's good to have a better list available. Adfree has never been very thorough.
Sent from my ADR6400L using Tapatalk
+1 I exam yareally's hosts, This is much faster killing them and I glad you finally developing the script update for the hosts. I am going test your script update on 2 of the roms A05PTH3ORY and Gengeritis 3D VII. Thanks - Keep it up
yareally said:
The only other difference than what was mentioned between my script and adfree as far as I know is I include a wider range of adhosts according to those that have used both. I have never used adfree, but people that have said I blocked more ads than they do and I also use an invalid IP address to block (0.0.0.0) instead of the loopback address (127.0.0.1) so it kills them a bit faster.
Click to expand...
Click to collapse
Added about 10-15 more hosts today.
Thanks for the script. I'm going to give it a shot in a little bit. AdFree hasn't worked right in months. I've been using Absolute System to block ads, but I think I'll give this a try. Thanks again.
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
yareally said:
I'm about 50% done working on a basic gui app to do what the script does + some other features, just to give an update. GUI app will be free to any xda members of course
Things I am putting into it:
Choice between no blocking, partial blocking (basically in browser only stuff in case you want to show developers some love by not blocking their application ads), and full blocking.
Updating like the script does with just a touch of a button.
Optional ability to download a host block list for your desktop pc.
*features that may come later*
-ability to send me hosts from the app to add to the block list
-ability to add your own hosts on the fly to the list (either for personal routing or for adblocking, since adblocking is only the secondary use of the hosts file). Unfortunately, you will have to figure out the hosts yourself, since there's no easy way to tell really automatically.
Any other suggestions are welcomed
Click to expand...
Click to collapse
Sounds like AdFree but much better and will work better as well. Can't wait!!
Just tried this today on gingeritis 3d beta8 and it doesnt seem to work as i get the same error someone else posted a few posts back. Something about no such file or directory system/etc/hosts. I reverted adfree and uninstalled it and renamed the hosts file to hosts from hosts.bak but when I Su adblock it gets renamed to hosts.bak and terminal shows that same error
Me and my best friend both have Kindle Fires now. I rooted & flashed the latest MIUI onto both of them successfully over the past week, so we're running the latest version available. What we've found is that when we both try to attach to his wireless router, they seem to disrupt each other or confused the router and eventually our wifi goes bye-bye on our Kindles. When just one of us is trying to attach to his router, it goes through fine & seems to stay connected well without any issue.
Can anyone offer any recommendations on how to perhaps customize the wifi connection on either the Fire or the wifi router to try and resolve this issue?
Thanks much for your help in advance! Please ask any questions if I left out any details that could help : ]
Does MIUI have the MAC address problem? That'd be the first place I'd check. THen I'd check the router and see exactly what they're trying to do. My thoughts:
Either they have the same MAC, same name, or are vying for the same IP.
http://forum.xda-developers.com/showthread.php?t=1406845
Thanks for the feedback, guys! And thank for that related thread link! I reviewed that post and I have to admit, I'm a lil lost with where to start or what to do with that. I have a feeling both devices may be running the same MAC address, but I'm in the process of confirming that today. I also tried forcing a static IP on the Fire when connecting, but that didn't seem to resolve the problem.
Anyone have any, dare I say, more simple instructions for how I might go about altering my devices MAC address with MIUI? I'm not sure that the information in that post is fully applicable to the MIUI rom, so I'm hesitant to begin trying to give it a go, and plus, I might need something a little more noob-friendly... I could use a little more handle-holding with this, as I'm fairly fresh to rooting & flashing ROMs (but fairly computer literate).
look at post #24 in the linked thread - seems to be a easier solution
Oh, thanks! ... That does look much more manageable Now to just figure out where to get the file from the stock ROM and replace it. I did a backup of my stock stuff via TWRP prior to flashing MIUI, so does anyone know where I can locate this file from the stock amazon ROM after I've completed a backup of stock via TWRP?
I then assume that after locating the stock version of the file, that I would just replace the file in the root directory/system/bin right on the Kindle when it's attached to my PC via USB.
Yah.. I'm a noob, but trying! : \
Stock file I need to find: /system/bin/wlan_loader
there is one attached 2 or 3 posts after #24 - that should do it for your needs
Great! Thanks again!!!
This part of the post gets me a little lost. I assume I need to purchase & download Root Explorer ($3.99 in Market). As for performing the same thing this person did, I'm not quite sure how to go about doing that. One question I have is: Is Root Explorer absolutely necessary to perform this file replacement? It seems a little more involved than just simply replacing the file on the device while it is plugged in to my PC via USB.
I used root explorer, mounted as r/w, made a copy of the original JIC, overwrote the existing file within /system/bin and modified the permissions to appear as the original (rwxr-xr-x) rebooted leaving the system as r/w
Sure enough mac address is the same as when I was in 6.1 Kindle Fire OS.
Click to expand...
Click to collapse
Specifically, here are the things I'm not 100% clear on:
1) 'mounted as r/w' - I assume this means mounting as read/write; is this performed via Root Explorer?
2) 'made a copy of the original JIC' - I do not understand what is meant by 'JIC'
3) Can file permission changes as described above be performed in Root Explorer?
I greatly appreciate any insight! This appears to be the solution to my problem, not it's just a matter of execution on my part. Thanks, guys!
would use file explorer from the market - no cost and does the same
if you activate "root explorer" and "mount as root" in the settings all at the bottom
here the link:
https://market.android.com/details?id=com.estrongs.android.pop&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5lc3Ryb25ncy5hbmRyb2lkLnBvcCJd
1) 'mounted as r/w' - I assume this means mounting as read/write; is this performed via Root Explorer?
Click to expand...
Click to collapse
file explorer does this with the above settings automatically
2) 'made a copy of the original JIC' - I do not understand what is meant by 'JIC'
Click to expand...
Click to collapse
would mean he means the file to exchange
3) Can file permission changes as described above be performed in Root Explorer?
Click to expand...
Click to collapse
you can also do with file explorer - long tap on file - properties - change permission
Awesome - b63 - you're excellent
Ummmm... But I have to ask a really stupid question. I can't seem to find the /system directory on my Fire. I already had ES File Explorer... and I'm in it now, and I can only look around on my SD card it seems... Is the /system directory on the main internal storage of the device, or on the 'SD card?' Any help in finding this directory on my device would be appreciated! Sorry for the nooby questions n such
are the root settings made in the settings of es ?
then you can set your start directory to / somewhere in the settings
or simply go one directory up
when you are on / then you see the system directory like all the others (sdcard also)
OK... I'M SO CLOSE!
I got up to the root directory ( / ) and found the /system/bin directory... I have the new (well, old stock version) wlan_loader file from the linked thread that I downloaded on my Kindle on the SDCard ready to overwrite the existing file.
I definitely have Root Explorer on in ES File Explorer - it prompted me to allow and I did every time it asked. I then tried to copy the stock version of the file over my current version in /system/bin, but it said that the copy failed. I then went and tried to delete the existing file in /system/bin, but it said something like 'this file cannot be deleted' I'm not sure what is keeping the file locked. Do I need to modify the permissions of the file to be writable or something?
I hard-pressed on the file and tried to play around with it, but the only close option I have is 'Properties,' which didn't seem to allow me to change anything about the file though. So, I'm stuck : \ Help!?
OK, I got it! I didn't flip the 'Mount /, /system as writable option after switching on Root Explorer :\ My bad! But I was able to overlay the file now Let's test my MAC address now after rebooting.
looks promising ...
GET-R-DONE!
Yahoo! I got it!
I rebooted and everything seems to be functioning just fine - I'm connected to Wifi like normal, no big deal... AND, my MAC address is totally different than what it was before, so I think this did the trick!
Now to test it concurrently with my best friend's Kindle to ensure we can sit on the same network / router together. If it doesn't work, then I'll look to replace his wlan_loader file as well
Thanks for all your persistent assistance b63! I really appreciate it : ]
Was fun, and I learned a lot : ]
but take care if you change his one as well not to end up with the same mac again ...
and as allways - glad to help ...
please mark the subject of the topic (edit first post) with [Solved]
Heyyo, so after hearing about the broken LeEco Le 2 Qualcomm Edition (aka s2, x52x series) MAC address issue? It seems like certain earlier builds of Pixel Experience 9 and maybe other pie ROMs from around July last year (at least, that's what it seems like from searching Telegram chat history for an s2 group) could be the root of the issue... That, or some random mod that messed up persist.
So here's a method for fixing your MAC address issues properly via persist (that is, as long as something doesn't break your persist/wlan_mac.bin again).
Please note! This guide is for s2, but you can use this guide for other devices, but instead of wlan_mac.bin being in hex it could be normal text or some vendors might use something completely different.
You can optionally use a hex editing app on your PC (like GHex on Linux) or an app like Hex Editor Free on the Play Store.
Download this blank wlan_mac.bin that we will be editing
https://osdn.net/projects/lineageos-for-s2/releases/73055
Now, we will select a MAC address prefix for Lemobile (the company name that LeEco used for s2). According to a MAC Address/OUI Lookup we have three choices:
B4EFFA
28FECD
C825E1
Using this MAC Generator website (or you can use one of your choice) and enter one of the three MAC address prefixes of your choice from the top.
We will need to create FOUR MAC addresses as that is what s2 stores in its wlan_mac.bin. It is recommended to keep them similar with only the last digit changed as that's what s2 wants.
For example, I'll use C825E1 as my MAC address prefix in that MAC generator. I generated... C825E1BCA0E9, but I want to start my MAC address with a 1 at the end, so I'll do this for my four MAC addresses.
C825E1BCA0E1
C825E1BCA0E2
C825E1BCA0E3
C825E1BCA0E4
Using the hex editor of your choice, Hex edit the downloaded wlan_mac.bin and from beginning to end? Enter your four new MAC addresses into the HEX fields and not the strings. Please note how I already put in a 1, 2, 3 and 4 to mark the last digit of each of the four MAC addresses. We must OVERWRITE the hex values in there, so please make sure you don't accidentally enable insert mode on whichever hex editing app you use.
Save it and make sure the new wlan_mac.bin is copied somewhere onto your s2.
Reboot to TWRP and mount persist.
Go into TWRP's file manager found under Advanced > File Manager.
Browse to /persist and select your defective wlan_mac.bin and either delete it or copy it somewhere to your user data if you want to keep a backup of it.
Copy the good wlan_mac.bin to /persist
(optional) Go to the new /persist/wlan_mac.bin and select it and chmod it to 0644
Reboot to System and check your MAC address in System > About Phone and if your changes were correct then your new MAC address will appear there.
thank you so much man , it worked.
I have confirmation from two s2 users that their WLAN MAC address is properly fixed with the newly generated addresses. :good:
ThE_MarD said:
I have confirmation from two s2 users that their WLAN MAC address is properly fixed with the newly generated addresses. :good:
Click to expand...
Click to collapse
For some reason it didn't work for me. Do I need to have root access? My MAC adress now says 02:00:00:00:00:00
Edit: After updating TWRP to version 3.3.1-0 it worked!!
@T-Jay can you please share you wlan_mac.bin? I'll take a look
ThE_MarD said:
@T-Jay can you please share you wlan_mac.bin? I'll take a look
Click to expand...
Click to collapse
I hope this works. This is the new wlan_mac.bin I created:
https://drive.google.com/file/d/1pdi3P5PNHfu2rkHEJ2xHjVJqFKA2ySFO/view?usp=sharing
I replied in a PM for your newly generated wlan_mac.bin
UPDATE: We got T-Jay's wlan MAC address fixed! I'll mark the chmod step as optional as that might have caused him issues.
Thank you Sir! This was of great help to me.
ThE_MarD said:
Heyyo, so after hearing about the broken LeEco Le 2 Qualcomm Edition (aka s2, x52x series) MAC address issue? It seems like certain earlier builds of Pixel Experience 9 and maybe other pie ROMs from around July last year (at least, that's what it seems like from searching Telegram chat history for an s2 group) could be the root of the issue... That, or some random mod that messed up persist.
So here's a method for fixing your MAC address issues properly via persist (that is, as long as something doesn't break your persist/wlan_mac.bin again).
Please note! This guide is for s2, but you can use this guide for other devices, but instead of wlan_mac.bin being in hex it could be normal text or some vendors might use something completely different.
You can optionally use a hex editing app on your PC (like GHex on Linux) or an app like Hex Editor Free on the Play Store.
Download this blank wlan_mac.bin that we will be editing
https://osdn.net/projects/lineageos-for-s2/releases/73055
Now, we will select a MAC address prefix for Lemobile (the company name that LeEco used for s2). According to a MAC Address/OUI Lookup we have three choices:
B4EFFA
28FECD
C825E1
Using this MAC Generator website (or you can use one of your choice) and enter one of the three MAC address prefixes of your choice from the top.
We will need to create FOUR MAC addresses as that is what s2 stores in its wlan_mac.bin. It is recommended to keep them similar with only the last digit changed as that's what s2 wants.
For example, I'll use C825E1 as my MAC address prefix in that MAC generator. I generated... C825E1BCA0E9, but I want to start my MAC address with a 1 at the end, so I'll do this for my four MAC addresses.
C825E1BCA0E1
C825E1BCA0E2
C825E1BCA0E3
C825E1BCA0E4
Using the hex editor of your choice, Hex edit the downloaded wlan_mac.bin and from beginning to end? Enter your four new MAC addresses into the HEX fields and not the strings. Please note how I already put in a 1, 2, 3 and 4 to mark the last digit of each of the four MAC addresses. We must OVERWRITE the hex values in there, so please make sure you don't accidentally enable insert mode on whichever hex editing app you use.
Save it and make sure the new wlan_mac.bin is copied somewhere onto your s2.
Reboot to TWRP and mount persist.
Go into TWRP's file manager found under Advanced > File Manager.
Browse to /persist and select your defective wlan_mac.bin and either delete it or copy it somewhere to your user data if you want to keep a backup of it.
Copy the good wlan_mac.bin to /persist
(optional) Go to the new /persist/wlan_mac.bin and select it and chmod it to 0644
Reboot to System and check your MAC address in System > About Phone and if your changes were correct then your new MAC address will appear there.
Click to expand...
Click to collapse
Bro i need some help related to my le 2s in a bad situation can you help?
Heyyo @Taran2312, I can try and help but tbh I don't own an s2 but I'll try my best to help