Nexus 4 & mac changer spoofing

Search This thread

masterchung89

Senior Member
Nov 23, 2011
104
34
Anyone else mind confirming. Seems like someone reset the router after I banned myself since I don't see Mac filtering enabled anymore.

Edit: seems like someone noticed that I accidentally banned everyone and reset the router. :banghead:
Sent from my Nexus 4 using Tapatalk 2
 
Last edited:

yisu_fr

Member
Apr 12, 2013
10
6
Lyon
hi guy

I've been tring all methods i know to spoofing MAC address on e960 alias Nexus 4, but noone worked.

First of all i tried all playstore program (mac changer, gost mac, etc) that spoof mac but only one partially work giving a fake mac set on but authantication fails during connection with fake mac

Then i 've tried code throught busybox and teminal istalled

su
busybox ifconfig //determine device usually eth0
busybox ifconfig eth0 down //shuts down eth0
busybox ifconfig eth0 hw ether 00:00:00:00:00:00 //sets eth0's mac to 00...
busybox ifconfig eth0 up //turn eth0 back on
busybox ifconfig //check to see if eth0 is set to new mac

No way to change mac.

I'd want something to change mac in no permanent way, just trigger it when need...
i say thank before to many who'll answer and will solve this problem

i'm no mothertongue sorry for english xP

take a look at http://forum.xda-developers.com/showpost.php?p=40249946&postcount=37
 

snowman211

Member
May 11, 2011
25
11
Manitoba
Thanks for confirming snowman211.

Note that the original WCNSS_qcom_cfg.ini and WCNSS_qcom_wlan_nv.bin files are stored in /system/etc/wifi. The ones in /data/misc/wifi are updated with the mac addresses from persist.

I'm not sure but I think if you copy the files from /system/etc/wifi to /data/misc/wifi, the mac will be restored to the original one.

Update:
Sorry, I guess it wouldn't be restored to the original mac address. Have a look at this:
Code:
                /*
                 * Write nv mac address
                 */
                if (1 != wfc_util_qcom_write_mac_process(nv_mac_addr, mac_add_buff)) {
                        /*
                         * Check whether this is default mac address or not
                         */
                        if (wfc_util_qcom_is_default_mac(mac_add_buff)) {
                                /*
                                 * Create random MAC address
                                 */
                                wfc_util_qcom_create_random_mac();
                        }
                }

As ch3ckm4t3 mentioned here, there is a second copy (I'll call them backup) of the bin and ini files on the device. What I've found is that after a simple reboot, these backup files are written over the ones in /data/misc/wifi. So after changing your MAC address, a simple reboot will put it back to normal. I've yet to test if changing these backup files will make the MAC change permanent, and probably won't bother trying as I'm out of the hospital now and have no need to spoof it anymore.

Now, I don't know if this is the stock method of operation, as I'm running Codefire X SR15 with Franco's kernel. I don't think the kernel would have this functionality built in, but in my mind it's possible that it's a ROM thing.
 

yisu_fr

Member
Apr 12, 2013
10
6
Lyon
As ch3ckm4t3 mentioned here, there is a second copy (I'll call them backup) of the bin and ini files on the device. What I've found is that after a simple reboot, these backup files are written over the ones in /data/misc/wifi. So after changing your MAC address, a simple reboot will put it back to normal. I've yet to test if changing these backup files will make the MAC change permanent, and probably won't bother trying as I'm out of the hospital now and have no need to spoof it anymore.

Now, I don't know if this is the stock method of operation, as I'm running Codefire X SR15 with Franco's kernel. I don't think the kernel would have this functionality built in, but in my mind it's possible that it's a ROM thing.

That's why in my apps, I prefer to keep the easiest way(reboot) to roolback to the origial config.:p
For me , the MAC spoofing is not for permant use and people do not reboot their phone everyday:D
 

ch3ckm4t3

Member
Mar 12, 2013
23
2
As ch3ckm4t3 mentioned here, there is a second copy (I'll call them backup) of the bin and ini files on the device. What I've found is that after a simple reboot, these backup files are written over the ones in /data/misc/wifi. So after changing your MAC address, a simple reboot will put it back to normal. I've yet to test if changing these backup files will make the MAC change permanent, and probably won't bother trying as I'm out of the hospital now and have no need to spoof it anymore.

Now, I don't know if this is the stock method of operation, as I'm running Codefire X SR15 with Franco's kernel. I don't think the kernel would have this functionality built in, but in my mind it's possible that it's a ROM thing.

I think that for a permanent solution you have to edit the .macaddr in persist.
 

heyjulio

Member
Apr 24, 2011
7
0
That's why in my apps, I prefer to keep the easiest way(reboot) to roolback to the origial config.:p
For me , the MAC spoofing is not for permant use and people do not reboot their phone everyday:D

many thanks, is amazing, works 100% is a satisfaction to be in this foro.Uno learns a lot, thanks again.: Laugh: : Dedos, cruzado: ;) : Victoria:
 
Mar 7, 2013
41
2
OK thanks you guys great job..but 2 little question:
The Mac spoofed to put in the app is in format "xx:xx:etc" with ":" included?
Because inserting C0:18:85:9D:xx:xx for example it says me invalid Mac please insert correct one

Second point: OK is a great news that it can be restored original Mac only rebooting the telephone but let me know where the original Mac is stored.

Last question: if you add on file a chronology of Mac used and the possibility to clean it it will be perfect for 2 think:
First if you want rechange Mac with original one just redo the change with Mac listed without rebooting
Second if I have a Mac filter on router I haven't to write exactly the Mac allowed every time..just the first

Inviato dal mio Nexus 4 con Tapatalk 2
 
Last edited:
Mar 7, 2013
41
2
Ok I ve done but the Mac won't change..it shown the original one.
I ve done all with supersu and without ":" but after process nothing change (value insert was 0025D36626B3 for example)
Seems to be some bug..where? If this can help you during process I see the tooltip of what is happening and 2 of them are totally black without write in there
No way to change Mac :(
 
Last edited:

yisu_fr

Member
Apr 12, 2013
10
6
Lyon
hello you have to turn off /on your wifi to take account the new MAC

Sent from my Nexus 4 using xda app-developers app

---------- Post added at 07:21 AM ---------- Previous post was at 07:12 AM ----------

Ok I ve done but the Mac won't change..it shown the original one.
I ve done all with supersu and without ":" but after process nothing change (value insert was 0025D36626B3 for example)
Seems to be some bug..where? If this can help you during process I see the tooltip of what is happening and 2 of them are totally black without write in there
No way to change Mac :(

it's normal to have two toasts with blank value

Sent from my Nexus 4 using xda app-developers app
 
Mar 7, 2013
41
2
I ve done..I ve turn off..apply patch and turn on but no Mac change

Inviato dal mio Nexus 4 con Tapatalk 2
 
Last edited:
Mar 7, 2013
41
2
OK some problem is in here.
I explain you.
Yesterday I ve change Mac with app but nothing is shown (I ve switch WiFi off applyed patch and reswich wifi on, but the Mac was the same)
Tomorrow without reboot cell only put it on airplane mode the app show that new Mac is applied but how is possible? Yesterday no way to apply it

Inviato dal mio Nexus 4 con Tapatalk 2
 
Mar 7, 2013
41
2
OK I ve found the problem

Switching off WiFi - applying patch switch on :sometime works and sometimes no
Switching air plane mode off- applying patch and switching air plane mode on: always works

For each of two every time you switch Mac you have to reswitch off/apply/on mode

If can help I ve original stock rom only rooted

Inviato dal mio Nexus 4 con Tapatalk 2
 
Last edited:
Mar 7, 2013
41
2
Moreover I can add another bug:

When you use airplane mode if u have manually switch off WiFi when you apply the patch the Mac won't change
While if you have WiFi on and put on air plane mode (in this way the air plane mode seems to force deactivating ofsomething that on WiFi mode off only sometime was deactivated) the Mac will change every time.

Please check out yourself

Inviato dal mio Nexus 4 con Tapatalk 2
 

yisu_fr

Member
Apr 12, 2013
10
6
Lyon
Moreover I can add another bug:

When you use airplane mode if u have manually switch off WiFi when you apply the patch the Mac won't change
While if you have WiFi on and put on air plane mode (in this way the air plane mode seems to force deactivating ofsomething that on WiFi mode off only sometime was deactivated) the Mac will change every time.

Please check out yourself

Inviato dal mio Nexus 4 con Tapatalk 2

:laugh:thanks for the tests passed, they are very well described.
I assume that I never test my apps with airplain mode, I will do a bug-shooting this evening when I get home.
 
  • Like
Reactions: pan.droid

masterchung89

Senior Member
Nov 23, 2011
104
34
I think I found how to change the Mac address without problem authenticating. I found .macaddr under /persist/wifi. Just delete what is in the file and write your new Mac address. After changing it and rebooting it stuck, then I ran busybox ifconfig to confirmed that it works, and it shows the new Mac address.:eek::D
To anyone trying this, save your current Mac address somewhere just in case.

Sent from my Nexus 4 using Tapatalk 2
 
Mar 7, 2013
41
2
There are some think that we can't say but remember that android is Linux...if we will find the way to send raw packet on WiFi we will definitely make all we want

Inviato dal mio Nexus 4 con Tapatalk 2
 

masterchung89

Senior Member
Nov 23, 2011
104
34
Thank but I prefer the app..in your method how u change Mac?

Inviato dal mio Nexus 4 con Tapatalk 2

For the method I posted, it permanently changes the Mac. In the .macaddr file delete the address that is in there (which should be your current Mac) and put in your new Mac and reboot. For some reason, the router would still identify me by my old Mac with the app (new Mac doesn't show up in router log).

Sent from my Nexus 4 using Tapatalk 2
 
Mar 7, 2013
41
2
For the method I posted, it permanently changes the Mac. In the .macaddr file delete the address that is in there (which should be your current Mac) and put in your new Mac and reboot. For some reason, the router would still identify me by my old Mac with the app (new Mac doesn't show up in router log).

Sent from my Nexus 4 using Tapatalk 2

But with app no problems authentication persist..only if u change Mac without app with busy box and terminal there were problems

Inviato dal mio Nexus 4 con Tapatalk 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6

    You're absolutely correct that that's what you need to change. I just finished getting the MAC address on my phone changed. Here's what I did.


    First off, the usual disclaimer. Any apps that I use are not an endorsement of that app, and should doing this result you in bricking your phone, ending up an alien specimen, etc... I'm not at fault. It worked fine for me, and that's all that I'm saying. Root is necessary here, of course, but there really shouldn't be anything else special needed other than a text and a hex editor.

    I'd also recommend noting somewhere, the two MAC address that your phone currently has, and the MAC address that you want to change it to.

    So, let's say that the values are
    Phone: 10-68-3F-C3-54-08
    Target: 00-D3-E8-F0-6A-7D

    So, as good practice, make a copy of the following two files.

    Code:
    /data/misc/wifi/WCNSS_qcom_cfg.ini
    /data/misc/wifi/WCNSS_qcom_wlan_nv,bin

    I copied them to a working directory on my sd card, and renamed the backups to .bak

    Now, as discussed earlier in this thread, open your WCNSS_qcom_cfg.ini file to be edited.
    Line 36, after the comment of #Assigned MAC Addresses... is the first place to change the address.
    In my case it was a change from

    Code:
    Intf0MacAddress=10683FC35408
    to
    Code:
    Intf0MacAddress=0013E8F0637D

    Save this file, then open up what ever type of hex editor you want. I ended up using Hex Editor off of the play store, simply because it seemed that it'd do the job.

    Then, when you open up WCNSS_qcom_wlan_nv.bin, you'll be faced with something like this.

    Screenshot_2013-04-04-22-49-33.jpg

    The second line, labelled 0000000a is the one that you'll be changing.
    Tap on the cell you want to enter data into, and you'll see something like this.

    Screenshot_2013-04-04-22-57-36.jpg

    You'll know you're in the correct cell if the Offset value reads 0000000a. Enter the first two values of the target MAC address, then hit the right arrow. Enter the values up till the offset reads 0000000f. Enter in the last 2 digits of your target MAC address, then hit the disk to save it.
    Take a look at line 0000000a in the main Hex Editor screen. The first 5 entries should be your new MAC address.

    Save it, replace the files in the initial directory (if you worked outside of it like I did), and there you go! You can now change your Nexus 4's MAC address.

    Now, just as an aside, I saw some people wondering as to why anyone would want to do this. In my case, I'm currently stuck in a hospital with Wifi... if you pay for it. So I bit the bullet and shelled out the $25 for a week's rate (which is a little steep I'd say) because I needed some files on my laptop for a report. However, they lock the connection to the MAC address. Now I'm also outside of my normal cell service area, and in a place where I have less than a gig a month's worth of data... so, when you put all of that together, I'm just trying to preserve my poor student's budget.

    Anyhow, I hope that this helps someone! Just happy that I got it working myself
    3
    To attach a file you have to go to "Additional Options" and click "MANAGE ATTACHMENTS". Then you can upload the file and add it to the post.

    There is no need to backup the mac as the original one is stored in persist/wifi/.macaddr

    Thank you, I got the bug fixed and I upload the file can you test it plz?

    I already get it worked in my Nexus4

    Ok I found it's always better to describe the program before donwload and install it:

    FIrst of all, this program verifies that your are running from a rooted Nexus4.

    One shall type the 12bits MAC to be spoofed in number and in capital letter, the apps does a format check before touching anything.

    It replace then the two file : WCNSS_qcom_wlan_nv.bin and WCNSS_qcom_cfg.ini in the directory /data/misc/wifi/, that's why you need to root the phone.

    I did not implement the rollback fonction because after the reboot, the original MAC address will be reloaded and you have to redo it again if you need.
    2
    I published a MAC spoofer for devices with qualcomm adapter. It works on my Nexus 4, can you test on your devices and send me a comment through the google play? thank you.

    https://play.google.com/store/apps/details?id=com.jworksbr.macspoofer
    2
    Thanks for confirming snowman211.

    Note that the original WCNSS_qcom_cfg.ini and WCNSS_qcom_wlan_nv.bin files are stored in /system/etc/wifi. The ones in /data/misc/wifi are updated with the mac addresses from persist.

    I'm not sure but I think if you copy the files from /system/etc/wifi to /data/misc/wifi, the mac will be restored to the original one.

    Update:
    Sorry, I guess it wouldn't be restored to the original mac address. Have a look at this:
    Code:
                    /*
                     * Write nv mac address
                     */
                    if (1 != wfc_util_qcom_write_mac_process(nv_mac_addr, mac_add_buff)) {
                            /*
                             * Check whether this is default mac address or not
                             */
                            if (wfc_util_qcom_is_default_mac(mac_add_buff)) {
                                    /*
                                     * Create random MAC address
                                     */
                                    wfc_util_qcom_create_random_mac();
                            }
                    }

    As ch3ckm4t3 mentioned here, there is a second copy (I'll call them backup) of the bin and ini files on the device. What I've found is that after a simple reboot, these backup files are written over the ones in /data/misc/wifi. So after changing your MAC address, a simple reboot will put it back to normal. I've yet to test if changing these backup files will make the MAC change permanent, and probably won't bother trying as I'm out of the hospital now and have no need to spoof it anymore.

    Now, I don't know if this is the stock method of operation, as I'm running Codefire X SR15 with Franco's kernel. I don't think the kernel would have this functionality built in, but in my mind it's possible that it's a ROM thing.
    2
    As ch3ckm4t3 mentioned here, there is a second copy (I'll call them backup) of the bin and ini files on the device. What I've found is that after a simple reboot, these backup files are written over the ones in /data/misc/wifi. So after changing your MAC address, a simple reboot will put it back to normal. I've yet to test if changing these backup files will make the MAC change permanent, and probably won't bother trying as I'm out of the hospital now and have no need to spoof it anymore.

    Now, I don't know if this is the stock method of operation, as I'm running Codefire X SR15 with Franco's kernel. I don't think the kernel would have this functionality built in, but in my mind it's possible that it's a ROM thing.

    That's why in my apps, I prefer to keep the easiest way(reboot) to roolback to the origial config.:p
    For me , the MAC spoofing is not for permant use and people do not reboot their phone everyday:D