How to fix WLAN MAC Address on LeEco Le 2 (s2) - LeEco Le 2 Guides, News, & Discussion

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

Related

How to Spoof MAC Address

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

[Solved] 2+ Kindle Fires on Same Wifi Router Disrupt Each Other

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]

Unable to mount my Xoom (Linux - Ubuntu 11.10)

I'm trying to mount my Xoom (MZ605 ICS Team EOS IML74K Nightly 41) in Ubuntu (11.10) , the device is founded and Installed, but I can't open the internal storage (MTP), I can't see or to transfer any file. What can I do?
I searched for some driver, but I didn't founded. Do I need of a specific software for MTP Storage?
Thanks!
Sent from my MZ601 using xda premium
I use Linux Mint and had the same issue. You need Samba to access the files. Here are the instructions I used (for Debian but will work on Ubuntu as well, I'm sure):
To get started install samba and nautilus-share through Synaptic. You will need to edit /etc/samba/smb.conf as Superuser (su).
1
In the global section of /etc/samba/smb.conf add the line
usershare allow guests = Yes
Find the line ; security = user and add this line directly after
map to guest = bad user
2
As su run these two commands from a term
chgrp sambashare /var/lib/samba/usershares
chmod 1770 /var/lib/samba/usershares
Ensure the group sambashare is added to your user profile - Just go into "Users and Groups" and check, add if necessary. Look in Manage Groups, scroll down to sambashare and select properties and select you user name to be a group member. It is not enough that your login name is in the list, it must also be selected.
3
Restart and you should be able to right click on a folder and select "sharing options" just like in Ubuntu, and others on your network (including media players) should be able to see and browse the shared folders.
The share definitions are stored in /var/lib/samba/usershares automatically by nautilus-share. The share definitions are NOT stored in smb.conf
Source: http://forums.debian.net/viewtopic.php?f=16&t=60620

[GUIDE] Change WiFi MAC Address

Hello everybody,
i have found a solution to change the WiFi MAC address if "/system/etc/calibration" doesn't exist.
Requirements:
root
ES File Explorer or Root Explorer
1. Copy file "/proc/calibration" to "/system/etc/calibration"
2. Edit "/system/etc/calibration"
Code:
- Search line "macaddr=your current mac"
- Replace "your current mac" with your new mac
- Save
3. Edit "/system/etc/init.d/01_modules"
Code:
- Add this line at the bottom:
mount -o bind /system/etc/calibration /proc/calibration
- Save
4. Change permissions of "/system/etc/init.d/01_modules"
Code:
Read Write Execute
X X X
X X X
X X X
5. Reboot
Your MAC address should now be changed.
Please ask if you have a question.
Tested with:
- NexusHD2 V2.9 (tytung's kernel)
Dragon812 said:
Hello everybody,
i have found a solution to change the WiFi MAC address
Click to expand...
Click to collapse
Hello
why would you do that ? Reading a unique wifi/bluetooth macaddress in the hd2 is implemended since ~one year ?
Franck
Franck78 said:
Hello
why would you do that ? Reading a unique wifi/bluetooth macaddress in the hd2 is implemended since ~one year ?
Franck
Click to expand...
Click to collapse
But some routers have a limited number of authorized MACs.
For example, in my router you can enter only 10 MAC addresses, but we have 12 devices.

[ROOT] How to change MAC address of the OnePlus 5T

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

Categories

Resources