[Q][CM10.1] How to change the WiFi mac address - HTC Amaze 4G

Hi!
How do I change the WiFi mac address of an Amaze phone?
I got two Amaze phones that I put Sport's CM10.1 on them.
Problem is both have the same (well known!) mac address. Seems like either CM10.1 picks a fixes address, or perhaps the process or rooting it cause the mac address to be reset?
I tried searching for ways to change it. Some posts require using busybox, however, that's temporary.
Some posts refer to change it in an nvram.txt data somewhere in /data/misc/ (or similar, don't have it handy), however, I do not have that file in any of the phones. I do not know what format I would have to put it in if I were to venture to do it. I found one example of a different phone and it was a rather complex file with all sorts of settings, which makes me cautious about even trying something and possibly breaking the format of the nvram on the phone.
Thanks!

[/COLOR]
ihama said:
Hi!
How do I change the WiFi mac address of an Amaze phone?
I got two Amaze phones that I put Sport's CM10.1 on them.
Problem is both have the same (well known!) mac address. Seems like either CM10.1 picks a fixes address, or perhaps the process or rooting it cause the mac address to be reset?
I tried searching for ways to change it. Some posts require using busybox, however, that's temporary.
Some posts refer to change it in an nvram.txt data somewhere in /data/misc/ (or similar, don't have it handy), however, I do not have that file in any of the phones. I do not know what format I would have to put it in if I were to venture to do it. I found one example of a different phone and it was a rather complex file with all sorts of settings, which makes me cautious about even trying something and possibly breaking the format of the nvram on the phone.
Thanks!
Click to expand...
Click to collapse
flash any sense 4.x rom on any of your device,i heard that sense 4.x roms change the mac adress of your device,dont knw what is the reason though...read it alnog yor research and readings...
http://forum.xda-developers.com/showthread.php?t=2201216

hatim_rajput said:
[/COLOR]
flash any sense 4.x rom on any of your device,i heard that sense 4.x roms change the mac adress of your device,dont knw what is the reason though...read it alnog yor research and readings...
http://forum.xda-developers.com/showthread.php?t=2201216
Click to expand...
Click to collapse
Thanks for the reply, however, this is not a great solution, as it's rather invasive. I'm also finding that this image I am on is stable and yields good battery and it has the latest 4.2.2, so I am trying to avoid major changes like a rom from a different device might be (I'm new to this too ..).
Here is what I have tried:
brute-force search on the zip file that Sport posted
brute-force search on the phone itself via a root shell
searching various other files and forums
the brute-force search on the phone found the mac address. This is what i did:
find -exec grep -iH '00:d2:8b:43:9f:fd' '{}' \;
which yielded:
/sys/devices/platform/msm_sdcc.4/mmc_host/mmc3/mmc3:0001/mmc3:0001:2/wl12xx/ieee80211/phy1/macaddress:00:d2:8b:43:9f:fd
/sys/devices/platform/msm_sdcc.4/mmc_host/mmc3/mmc3:0001/mmc3:0001:2/wl12xx/ieee80211/phy1/addresses:00:d2:8b:43:9f:fd
/sys/devices/platform/msm_sdcc.4/mmc_host/mmc3/mmc3:0001/mmc3:0001:2/wl12xx/net/wlan0/address:00:d2:8b:43:9f:fd
However these files are in a "/proc/-like" mounted device that is read-only. These files look like status files from the OS, so even if I had been able to change them, it looks like the changes would vanish after reboot, and even if that would not be the case, it would not have changed anything.
Any ideas?

This is the solution for permanently changing the MAC of the WiFi in the Amaze (ruby) phone:
su -
mount -o remount -o rw /system
cd /system/etc/firmware/ti-connectivity
calibrator set nvs_mac wl1271-nvs.bin 00:d2:8b:XX:YY:ZZ
cd /
mount -o remount -o ro /system
change the XX YY ZZ to any other (hex) numbers as you please.
(The assumption is that you are connected with adb shell)

Related

[Q] 2 Atrix phones with same wifi mac address (sorted)

Managed to fix my wifi mac address problem with some info read in this thread:
forum.xda-developers.com/showthread.php?t=1131649
all performed using linux,
connect phone to pc using in terminal
adb shell
dd if=/dev/block/mmcblk0p3 of=/sdcard/filename.img (stored image of block on sdcard)
exit
exit
disconnect then reconnect phone to pc this time allowing access to sdcard.
in terminal mount the image for editing
mount -o loop /source/filename.img /destination/
using a hex editor modify '/wifi/wlan_mac.bin' with wanted address
save
unmount /destination/
the filename.img has now been modified and needs to be returned to the phone
remove the phone then reconnect and using 'adb shell'
su
chmod 777 /sdcard/filename.img
dd if=/sdcard/filename.img of=/dev/block/mmcblk0p3
reboot
now after the reboot connect your phone to the wifi and it will be using your new address
Original question below:
got 2 of these Atrix phones.
i have rooted both following this guide
wiki.cyanogenmod.com/wiki/Motorola_Atrix_4G:_Full_Update_Guide
now my one has this installed:
cm-7-20121014-NIGHTLY-olympus.zip
the wifes is still stock.
now we both have been experiencing wifi problems, which i have traced to both phones having the same wifi mac code
98:4B:4A:5D:8D:4C. Resulting in the router not being able to distinguish between them, a right mess.
i have tried following this guide to change my mac address
pocketnow.com/tweaks-hacks/motorola-atrix-4g-how-to-change-wi-fi-and-bt-mac
but changing the address in this file has no effect, its as though the mac address above is a spoof. Not the address stored in /pds/wifi/wlan_mac.bin
i have also tried from terminal 'busybox ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx'
this also does not change my address.
others mention to change the contents of nvram.txt here:
/etc/wl/nvram.txt
this also has made no change
the 2 file locations mentioned contain different mac addresses from the one above.
which file contains this code '98:4B:4A:5D:8D:4C' ?
How do i change the mac address?
i think mac address related to hardware so you can't change it. I have flashed several roms but the mac address is constant, the only change is device name.
Sent from my MB860 using xda app-developers app
lambcutlet said:
which file contains this code '98:4B:4A:5D:8D:4C' ?
How do i change the mac address?
Click to expand...
Click to collapse
/pds/wifi/wlan_mac.bin looks like the right place. But be aware that messing up your PDS could mean quite bad consequences for your phone.
I'd probably dump the entire PDS partition into a file and back it up somewhere if I were you.
voncount said:
i think mac address related to hardware so you can't change it. I have flashed several roms but the mac address is constant, the only change is device name.
Click to expand...
Click to collapse
Nope, wrong.
It's true a MAC is a hardware address, but it's not true it cannot be changed.
ravilov said:
/pds/wifi/wlan_mac.bin looks like the right place. But be aware that messing up your PDS could mean quite bad consequences for your phone.
I'd probably dump the entire PDS partition into a file and back it up somewhere if I were you.
Nope, wrong.
It's true a MAC is a hardware address, but it's not true it cannot be changed.
Click to expand...
Click to collapse
pds backup was performed. My address is different in the 'wlan_mac.bin' file, probably the original F8:7B:7A:xx:xx:xx. i did manage to change its contents but still it appears to be over-ridden by '98:4B:4A:5D:8D:4C'
its weird that both phones have the same mac address
also noticed the bluetooth address is different 00:11:22:33:44:55
there is a program somewhere on my phone over riding the original addresses.
does anyone know what it could be?
has anyone else used the same guide as me to root the phone and ended up with the same mac and bt addresses?

[Q] Vibrant Slim Bean Issues

Recently I decided to try Slim Bean on my phone, seeing they released a new version a few days ago. I had been running Cyanogenmod 7 but decided it was time for a change. Initially, everything worked great, I was able to reinstall all my old apps, send texts, and things functioned well.
About 12-14 hours after doing this however, my phone stopped having signal. I didn't reboot it or anything, just no longer would it pick up a signal. Checking the about phone revealed it saying it had an unknown baseband and IMEI, I wasn't too concerned, I had backups of the EFS files, so I turned on USB debugging, plugged my computer in, and used an adb shell to move the backup to the main system. However, this still didn't work for my phone.
According to the Slimrom's FAQ, there are two solutions to this: delete the 00check and 98tweaks files in the system/etc/init.d folder, or just reinstall the ROM. However, using an adb shell or a terminal emulator on my phone, both with superuser powers, I can't remove those files. chmod spits back that they are read-only files. lsattr shows only the A tag active, which shouldn't be standing in my way. I seem powerless to get rid of these, and I can't find any guide as to how to do so. I've tried restoring to factory defaults and reinstalling the ROM, and this time I don't have signal right from the start. Can anyone help me figure out what to do about this? I've searched around and can't find any answers, which is making me think I'm just missing something really stupid. Any help would be appreciated!
Update: Figured it out. The system partition was mounted as read-only, and I thought I had tried remounting it but must have tried a higher level directory or botched the command. mount -o remount,rw /system gave me the ability to delete those files. Sorry for the trouble!

[Q] Change Bluetooth Address

I'm looking for some help verifying a few bits of information before I take a leap and risk bricking my phone. I need to change my bluetooth address. With any luck back to my original hardware address. I do have the original address, as "btnvtool -p" outputs a different address than is reported in 'about phone' -> 'status'. I problem is that both my wife and I have the same phone with the same ROM history, and now we both have the same improper mac address.
By way of links provided by another helpful users I have partial information in Russian. http://4pda.ru/forum/index.php?showtopic=420801&st=6840#entry28414922 post 6853. I think I understand what to do via google translate and my partial understanding of how this works. The post points me to the /misc partition but I can't find any useful information about the partition for this phone that would backup the claims. Also the specific location that the post references, offset 4000, contains a string "ANDROID-BOOT!". While "ANDROI" is hex of 414E44524F49 which matches my incorrect mac address, the fact that it says "BOOT" makes me worry about changing it.
I'm hoping someone can help me any verify that this string isn't part of the boot process, or that the /misc partition isn't required to boot recovery. I feel fairly confident that I could create a flashable zip to restore a backup of this partition if needed. Below is my cleaned translation of the Russian post. If anyone with an e970 and a proper BT address could complete the first half, dd the partition to a file and check out the contents in a hex editor, I would feel much better about doing the rest.
Code:
Hello, using this method you can restore your original Bluetooth addresses. The active mac address is in raw MISC partition at hex offset 4000, it is not spelled out or anything.
perform the following (root is required)
ADB shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/misc of=/sdcard/misc.img
and get at the file on the SD card and in a HEX editor zero the MAC address starting at hex offset 4000, save the file. Save the changed file to your phone:
su
dd if=/sdcard/misc.img of=/dev/block/platform/msm_sdcc.1/by-name/misc
reboot
After rebooting the details in the “About Phone” should show the real MAC BT.
----------
So I found a little corroborating evidence to this post. I found this post about the LS970(Sprint LGOG) stating that "All rooted LGOG Bluetooth MAC addresses are 41:4E:44:52:4F:49". Reading the thread a bit, I found a link to a "BT MAC FIX" script found with this kernel.
Looking at what the file does, it uses btnvtool to get the real mac and writes it to byte 16384 ( hex 4000 ) of the misc partition. Seeing as this file has people confirming it works, I took the leap. It worked. Problem solved.
Sound like to me this is a problem as old as unlocking with freegee. Could be wrong but that seems like the common denominator to me from the posts I was reading. And yes for the record, now the dump of the misc partition now reads "******D-BOOT!" *s to hide my real mac.
***Warning, 2015-01-12, This Fix as is doesn't work and causes problems with CM12 on the E970. Will post in thread with details.
I have the exact same issue with mine and my wife's phone. I tried this, and it seems like it should work, but after I reboot my phone, the contents of misc revert to the original (ANDROID...). Any thoughts?
mindstormsguy said:
I have the exact same issue with mine and my wife's phone. I tried this, and it seems like it should work, but after I reboot my phone, the contents of misc revert to the original (ANDROID...). Any thoughts?
Click to expand...
Click to collapse
I believe everyone that used freegee to root/unlock have the corrupted BTmac address. I also believe that it is only an issue when two of these devices try to use BT in close proximity, but you never know what device the person beside you will have.
I had not done anything about my BT until just now. The .zip just puts a script in the userinit.d folder. The script is run every boot. I do not recall what my BTmac address was, but the script does change it from the default.
I deleted the script and rebooted. My BTmac address reverted back to the default. I restored the script and my BTmac address changed back. This shows that the change is not permanent, and the script needs to be run every boot.
Did you flash the .zip, or just extract and run the script?
I've recently upgraded my E970 to CM12 nightly. Just like previous roms the BT Mac address is corrupted and results in my pairing being invalid. My mac address currently reports in "About Phone" as 00:00:00:00:5A:AD. Clearly this is incorrect.
When I tried to install this fix. The init.d script was placed properly, but did not repair the mac address as it did previously. This might be a one off case, but after the script was installed, my phone started acting funny, over heated, and completely drained the battery. The charger I regularly use, an iPad 2.1 amp failed to charge the phone. All it would do was turn on the red notification light solid. I was still able to use the computer usb ports to enter download mode, and start entering the off-charge mode. This port didn't give enough power to fully enter the off-charging mode. The phone made it to the first icon and then shut off, no progress was made.
I needed to switch to a lower output charger before I could gain charge to 5% and boot. As the OS booted it reported 0% charge. I was able to enter airplane mode and reboot. After the reboot the phone functioned well enough to use Solid Explorer to delete the script file from /data/local/userinit.d . After deleting the file my phone was back to functional with the bad mac address.
As I find info I will post it here.
2015-01-13 Update -----
Running the steps of the script file manually, results in a error "dd: stdout: Illegal seek" . Trying to read (if) instead of write (of), I get the same Illegal seek. Might this be part of a new protection with lollipop? I tried editing a dump of the partition as I suggested originally and writing the whole 16mb back. This completes without error, but when I read the partition again the modification was not saved.
Either way my BT Mac address with CM12 doesn't match the expected 41:4E:44:52:4F:49 to match the ANDROID from the file dump, so where is the OS picking up the new address?
Still works for CM11
I noticed my phone and my wifes also had the same bluetooth address. This was messing up my car link. I ran the script and now it shows that I have a different address. I will keep an eye out and make sure nothing else gets messed up. Thanks. I was looking for a fix for some time....

irulu 10.1 root/remount problems solved

I own an irulu K1001L1 10.1 (build number A20_K1001_K1001L1.20130713), a cheap one.
Many people complain about "partial rooting" and being unable to remount system in rw mode. Clueless as I was, I had tried several times with Uberizer, z4root and SRSroot, to no avail (the problem is not in the root, in my tablet su came by default in xbin directory).
D_rex (http://forum.xda-developers.com/show...2606510&page=2) found an effective solution which also helped in my situation: I think my tablet came with "su" application by default (notice overclocking worked) but due to /dev/block/nandd ext4 partition (I think /system starts at some offset) containing some errors (seen in dmesg) and due to this partition having the "s_errors" flag (behavior when errors detected) set to "mount read-only (02)", the partition is ALWAYS mounted read only, and remount as root doesn't change anything. More info on this ext4 option can be found here: https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout.
For me, the solution that worked was changing that flag s_errors to continue (01). I wasn't able to run e2fsck as the partition is already mounted; and I wasn't able to do a fsck in recovery mode since the recovery mode of this tablet lacks seems to lack both shell and e2fsck.
Tune2fs (old version precompiled here can change that flag in the partition. Using adb shell I pushed it to de device, set attribute as executable and run it, successfuly changing that "behavior when errors detected" in both partitions.
It has been suggested filesystem errors are linked to stability and realiability problems. Unfortunately this tablet lacks a version of CWM o TWRP as a recovery custom rom. I also adjusted the "max-mount-counts" value via tune2fs -c hoping it forces Android to run e2fsck, but it seems dmesg keeps displaying errors. I can only hope this problem is given more attention by developers.
After this I used the usual tools to root the device, noticing I had spent many hours in this cheap tablet. I should also mention by default now my tablet mounts in read-only mode (which is of course safer) but lets me change to rw whenever I want.
I have not been able to fix the ext4 errors. As others have explained, ls -al /dev/block can be used to better understand the images structure. System partition (nandd) contains the file e2fsck , but that file seems to be unavailable before mounting. Editing init.rc and associated files didn't force a diskcheck; I have not tried imaging the recovery partition (/dev/block/nandg) with dd and manually adding the required tools.I should also mention by default now my tablet mounts in read-only mode (which is of course safer) but lets me change to rw whenever I want.
On a side note, the adb driver setup tool found here didnt work for me (it seems &USER_PROFILE% in the .bat file should be replaced by "%USER_PROFILE%" and Desktop should be replaced according to the language of your operating system. Nevertheless the tool didn't work for me and I had to install another driver found in Uberizer distribution as the official "android_winusb.inf" didn't work in my Windows XP computer.
Thanks to the creators of tune2fs, to D_rex and other people/programs mentioned here. This is my experience with this problem; I'm not responsible if anyone tries this and bricks his device. All brands are property of their owners.
Good luck and Good bye

Mac address change on a tv dongle failed. I followed all possible ways i found online

Hello everybody i am not usually posting because most of my problems are always solved in already existing threads.
But in this case:
i have an anonymous TV dongle.
model: gxt_dongle_3188
android version: 4.4.2
rooted: with Kingo Root
Busybox is installed
I need to change my wifi-mac address from 54:e4:bd:9f:bd96 to 00:22:f4:f0:12:88, i know that the first 3 sets are vendor's indicator but i dont care for the possible conflicts that the change may create.
I started trying to use all the mac changing apps from playstore and i had any result, then i used terminal as SU with busybox and in my iplink show list i had not eth0, only wlan0 and p2p0 that looks like having MAC addresses.
Then i used ifconfig wlan0 hw ether [my mac] command and had no errors but in the status option i could not find any changes
I used also similar command sequences i found online.
also i found that i dont have the "efs" folder in my folder system and as i show in many tutorials this folder contains files about mac addresses.
Had anyone a problem like this so he/she can give me some help?
thank you in advance .

Categories

Resources