ro.serialno and android_id issues - Captivate Android Development

Seems there is an issue affecting most devices when ro.serialno is not set in build.prop.
ANDROID_ID is generated by running the ro.serialno through a command, if not set then ANDROID_ID is always the same. Some apps on the market, for me it is "Fast Web Installer" from appbrain that is giving me an issue because my ANDROID_ID is currently the magic number = 9774d56d682e549c
Seems some other developers use the Android_ID to identify handsets on the market when apps are installed. There is an app on the Market to view the android_id and if rooted be able to change it.
I'm about to update my build.prop with my device serial number and see if I get a true random ANDROID_ID
I'm currently using Cog 2.2 beta7
Could someone check the build.prop file on a stock ROM? By stock I mean truly stock because I believe the handsets from the factory have this set, but when we flash the JF6 it no longer has the ro.serialno.
Edit: http://code.google.com/p/android/issues/detail?id=10639

looks like adding ro.serialno does not help us since the ROMs we use are not true first boots, the system.db already has the value set so it doesn't generate a new one.
next I will try removing the ANDROID_ID from the system.db and see if that fixes it...

im bookmarking this, it would really be a big help

well i found an app that allows you to change it, but can't find a way to set it to what it should be from factory using serial number.
would be easy to get an app to use same method and just ask for your serialno if not set
turns out cynogen had the same issue since the ro.serialno was not set, they added code recently to generate based on serialno and first boot time so it would have seed data even if serialno was not set.
http://github.com/CyanogenMod/andro...mmit/81ed751a1dcf1e7c722db2cdded38bef4308a1c5

so something in samsungs source may be goofed cause they don't seem be pulling ro.serialno, i set android_id to "" in the database and rebooted, it stayed the same.
I then deleted the entry all together and rebooted and it went back to the magic number.
edit: well checked with getprop and ro.serialno is blank even though I set it in build.prop

I'm done tinkering for tonight, I changed my value manually for now to a randomly generated hex value and my "fast web installer" is working fine now.
Does seem to be an issue though, and not sure the code solution on cyanogen's site is best way either. They are looking at using ro.serial and time to generate random just in case the serial is blank.
If your someone who purchases a lot of apps, then it might be a good idea to make sure your android_id is random and then keep it so you can restore it later if needed. Some app developers use this to identify the end user.

If you go back to 2.1 you can retrieve your original Android ID and manually set it in Froyo

I did a fresh restore to JF6 and it was set to a unique one, then done a restore to a nandroid I had from an old 2.1 install and it was the same ID. So hopefully that one is unique to my device

well i installed the froyo leak on my gf's captivate after i had zero problems after like a week or 2....now she needs an app in the market and calls me complaining about how she cant find it. Whoops, forgot to tell her about that little tid bit!
Any work on at least a temporary fix? I was going to just tell her to sideload the app using sideload wonder machine, but i can't find an .apk for a free app on the market!!

well i installed the froyo leak on my gf's captivate after i had zero problems after like a week or 2....now she needs an app in the market and calls me complaining about how she cant find it.
Click to expand...
Click to collapse
This is normal for pre-release firmware.
1. Root her phone.
2. Edit her /system/build.prop file
3. Find the line that starts with this: ro.build.fingerprint=
4. Make it say this: ro.build.fingerprint=verizon_wwe/inc/inc/inc:2.2/FRF91/231334:user/release-keys
Save, exit, reboot.
The fingerprint line is carrier agnostic. Android Market just looks for known (to Google) fingerprints. If you have a known good one, you get to see all the protected apps that your unknown fingerprint prevented you from seeing.

Joe1981AL said:
well i found an app that allows you to change it, but can't find a way to set it to what it should be from factory using serial number.
would be easy to get an app to use same method and just ask for your serialno if not set
turns out cynogen had the same issue since the ro.serialno was not set, they added code recently to generate based on serialno and first boot time so it would have seed data even if serialno was not set.
Click to expand...
Click to collapse
hi im curious about the name of the app that let you change the android id can you post a link for it or the name of the app ty
Edit: found an app but havent tried it heres the link anyone who rooted the phone with busybox can try this http://adaptiveeng.blogspot.com/2010/10/android-id-changer.html

I am having this same problem. I wanted to use the fast web installer but it wouldn't work as well.
Has anyone figured how to change it so this will work?

jdsemler said:
This is normal for pre-release firmware.
1. Root her phone.
2. Edit her /system/build.prop file
3. Find the line that starts with this: ro.build.fingerprint=
4. Make it say this: ro.build.fingerprint=verizon_wwe/inc/inc/inc:2.2/FRF91/231334:user/release-keys
Save, exit, reboot.
The fingerprint line is carrier agnostic. Android Market just looks for known (to Google) fingerprints. If you have a known good one, you get to see all the protected apps that your unknown fingerprint prevented you from seeing.
Click to expand...
Click to collapse
thats great! thank you for the quick reply! just tried this on my phone and it worked great. I knew it was a common problem but never found a real answer on what to do. It's just too bad she lives 6 hours from me and i'm not sure i feel like writing her a step by step (as in button by button) guide for her to do this. She will live without the app for another week or so haha.
I was hoping that there would be an app on the market that would allow me to put her a random android id like the above guy stated. Anyways...thanks again.

I'm not running Cog2.2b7, but it seems to me you could use this method to generate yourself a unique Android ID using the emulator option under Make a new androidID with the Emulator. Then, using this command to pull the unique ID off the emulated Android device:
adb shell sqlite3 /data/data/com.google.android.googleapps/databases/accounts.db "select * from meta";
Once you have the Android ID, close out the emulator, and put this Android ID into your phone.
Like I said, I'm not running that version of Cognition, but give this a shot.

i am curious as to what the difference is between what i did (modifying the build.prop file as stated a few posts up) and getting my unique android ID and insterting it back into the phone while running froyo? I can see the apps on the market, was that not the issue at hand with the android ID?

The Android ID is a unique identifier for your phone.
The fingerprint is more of a signature to tell the Android Market that you have a known good firmware and what firmware version it is (2.2 in this case). When you have an approved signature, you get to see apps that were promoted to the market with the "Protected" flag enabled. If you do not have an approved signature, it is as if those apps aren't there.

Need clarafication
Hi Im interested in this ID changing process, but have a question about it. Now does this also fix other issues with 2.2 like not being able to log in to certain apps because the ID of your phone has been changed? I have a captivate but I have been reading thru the threads and noticed a lot of devices, well the ones who upgraded to 2.2, are having the same issue. If this does that i thank you very much cuz i have been looking for a fix for a few weeks now.

jdsemler said:
I'm not running Cog2.2b7, but it seems to me you could use this method to generate yourself a unique Android ID using the emulator option under Make a new androidID with the Emulator. Then, using this command to pull the unique ID off the emulated Android device:
adb shell sqlite3 /data/data/com.google.android.googleapps/databases/accounts.db "select * from meta";
Once you have the Android ID, close out the emulator, and put this Android ID into your phone.
Like I said, I'm not running that version of Cognition, but give this a shot.
Click to expand...
Click to collapse
hi how can i change my android ID MAnually seems the link i provided on top doesnt work on me xD

I have been successful with these steps in getting my phone's id corrected (Cog 2.2 Beta6)
adb
su
sqlite3 /dbdata/databases/com.android.providers.settings/settings.db "update secure set value = '[your HEX android id]' where name = 'android_id';"
sqlite3 /dbdata/databases/com.google.android.gsf/gservices.db "update main set value = '[your DEC android id]' where name = 'android_id';"
reboot
I got my old id by doing a text search with notepad++ on a backup made with rom manager.

jfl0wers said:
I have been successful with these steps in getting my phone's id corrected (Cog 2.2 Beta6)
adb
su
sqlite3 /dbdata/databases/com.android.providers.settings/settings.db "update secure set value = '[your HEX android id]' where name = 'android_id';"
sqlite3 /dbdata/databases/com.google.android.gsf/gservices.db "update main set value = '[your DEC android id]' where name = 'android_id';"
reboot
I got my old id by doing a text search with notepad++ on a backup made with rom manager.
Click to expand...
Click to collapse
I did play around with sqlite3 as well, I didn't search through my old backup though I just put JF6 back with Odin, one click root, and downloaded "Android ID" from the market, wrote down the ID, and then flashed to cog 2.2 beta7 and restored.. Of course then setting my ID with app..
I know I went the long way, but it worked

Related

cbackup v0.4 - backup/restore tool

I've been a lurker since I got my eris back when root was a dream. Now I have quite a few things floating around my work dirs that aren't on xda or are wanted, so I figured I would start releasing some of my better/more polished things. So here is my first:
cbackup v0.4
Based upon craft_backup v0.5.3: showthread.php?t=628743 (sorry no links)
Backup and restore apps/data just like craft_backup
Changes/Features of cbackup:
- Change names to cbackup and crestore because I got tired of typing out "craft_backup" and "craft_restore"
- Move backup dir to /sdcard/backups/cbackup/*
- For cbackup, allow a choice for destination in backup dir (defaults to cb<date>)
- For cbackup, automatically move backup dir to timestamped location instead of overwriting it
- For crestore, display menu of all cbackup dirs along with original craft_backup dir if it exists. This menu has the latest last, numbered first with number 1 being the default.
- Works with roms that don't have the busybox symlinks installed
Changelog:
v0.3
- First public release
v0.4
- Fix problem when missing bb symlinks
Disclaimer: I am not responsible for damage caused by this app. I take no credit for the good work done on craft_backup, I just wanted something it didn't do so I hacked it up to suit my needs. Eventually it became nice enough to share. I will not support it, unless there is something wrong with my added code (which is possible, since the listing code is complex). Refer to the original app's thread for almost all problems.
nXuaJunYYc
Testing it now.
EDIT: WORKS PERFECTLY- 5 STARS.
Crestore- not found.... help?
I assume you're running "crestore" and not "Crestore" nor "Crestore-". Can you post the output of:
echo "$PATH"
from adb shell?
If that's fine, I think I know what may be wrong, but try that first
edit:
I'll be uploading a new version in a minute that I think will fix your problems, but if it doesn't, if you could also try the following it would be helpful:
# which crestore
# which sed
# echo abc | sed -es/a/d/
# ls -l /system/bin/crestore
# ls -l /system/bin/cbackup
# /system/bin/crestore
So I got it to find it, but it says not found for everything. Also comes up in Italian no matter what, but no biggie.
or use the eris master app, which can do most of that right now. the good thing is that its in a gui interface. jamezelle and i will be adding additional features later for the backup / restore apps as well. and one thing that we will have shortly is the ability to restore market update links for apps installed outside of the market.
@ECLIPS3:
Sorry, I'm a command line guy and I'm a linux guy. I really don't want to install wine and mono on my poor little linux netbook just to run your app and then navigate a gui. Plus these scripts run entirely on the phone, so you should be able to run them anywhere with only your phone (maybe even using terminal on the phone...haven't tested that yet). And before we start a war, I'm not saying that there is anything with wrong with your app, and I'm sure it has/will help a lot of people who want the easy gui, but it wasn't for me, and I thought other people may feel the same way. There's no reason both apps can't exist. I also appreciate you letting people know in this thread so the less cli-oriented people know their options.
@Erisftw:
That is really strange if it's continuing to not give you a choice for language. Are you sure you flashed the latest one that I uploaded (cbackup-v0.4-signed.zip)? And that you made your backup either using v0.4 or using v0.3 on a phone with busybox properly installed. If so could you copy and paste the first ~20 lines of output from crestore, and let me know if you are on windows or linux?
dont worry, not trying to start a flame war at all. i love diversity and competition as it creates better programs to arise, that ultimately are better for the end user. theres plenty of room for everyone here. i love CLI as well, but not a lot of people do. arent you glad this is a free world to have competition?
Changed to 4, restored. fine, but it has old rosie, and when you click on the app, it says app no longer installed.

How to change "Model Number

Been trying to access some info from the "My Account" app and says my phone model is not supported. I think its due to the change in model number in the about phone section. Anyway to change it back to what it was before?
Btw im running CM 5.0.8
Edit: Reason for editing: On the "Model Number" part, its says HTC Dream, I wanted to change the text string back to what it use to be so I fully use the my account app.
old post, but I would like to know where/what I need to do to change the model also. I can't update via my sammy i9000 via Kies, because it's reading as a GT-I9000 after installing a Euro 2.2 ROM, when it's infact a GT-I9000T.. which Kies now has a New Zealand 2.2 update for. The issue is the 3G support of the Euro ROM and the fact it makes my screen on first power up do the rainbow snow deal. I'm hoping the NZ ROM for the actual 9000T will fix this... but I need to change the device model # to test.
The Kies registry patch trick didn't work for me at all. I would run the app, it would appear to change the registry keys, but Kies would either add another set of 3 keys (4, 5, 6) or just change the 1, 2, 3 modified reg keys to what the phone is reporting instead of keeping the modified info.
Any help would be greatly appreciated
/system/build.prop
i am carllindsay, i was surfing to know that, thanks for sharing a nice thread.
dhkr123 said:
/system/build.prop
Click to expand...
Click to collapse
How do you open /system/build.prop? I use ASTRO and can't open it. Is there any editing app that can open any extension?
general-tso said:
How do you open /system/build.prop? I use ASTRO and can't open it. Is there any editing app that can open any extension?
Click to expand...
Click to collapse
You could rename it to .txt, edit, change to .prop.
Or you could adb pull, edit, push ect.
never mind. I have SGS Tools app that lets me edit /system/build.prop without renaming it. SGS Tools is available on the Market for free.
for those who don't know what SGS Tools is, you're missing a lot! Try it.
general-tso said:
for those who don't know what SGS Tools is, you're missing a lot! Try it.
Click to expand...
Click to collapse
For anyone who actually knows how to use a computer.... no, they're not missing ANYTHING. The terminal is FAR more powerful than any nonsense like that.

Allways the same Android_ID

I dont know if this problem is known here,
all (in my opinion froyo builds) have the same android_id
In every build the id is: 9774d56d682e549c
this cause problems with some apps of the market because they use this id to identify the device. for example imobsters ;-)
see this post
forum.xda-developers.com/showpost.php?p=7251507&postcount=1110
sorry for my bad english
I think this causes a problem too with pMessenger, but I'm not sure if the Android ID or the MAC address is being used by pMessenger. However, both of them are identical on all our devices for now.
I think it should be trivial for the devs to fix it, but they are concentrating on fixing more major things now.
i am not sure, but maybe there is a way to change that id:
NOT ugly market fix
No more emulators!
Push this over to your phone, and you'll be able to get a working android ID without any sort of silly fooling around.
To repeat and clarify: You will get a fresh working Android ID, from Google, just like a phone.
From early testing it still appears SOME paid apps may be missing, but this is definitely a better solution than an ID from the 1.6 emulator as I continue to look into the issue. (I think this is actually less an Android ID issue than it is an issue with PDN being a configuration that some apps refuse to support, be it resolution, version 2.0 or whatever)
(I've also found that using your phone's ID on your PDN may "taint" what you can see in the market on your phone. Personally, I'll be moving away from sharing an ID with my phone)
Instructions
1) You'll need to remount system as R/W regardless. so let's start with that:
"adb remount"
2) If you want to start over clean, I'd recommend clearing market cache and killing your existing android ID.
adb shell sqlite3 /data/data/com.google.android.googleapps/databases/gls.db "update meta set intvalue='0' where name='androidId'";
To clear market cache: Settings->Manage Applications->press menu button->choose "Filter"->choose "All"->Scroll down to Market and select it->choose "Clear Cache"
3) Apply this hack
"adb push framework.jar /system/framework/"
4) Since we replaced a main framework, clear dalvik cache just to be safe, and reboot. Yes, the first reboot will take longer since we just cleared the cache.
"adb shell rm -r /data/dalv*"
"adb shell reboot"
5) Go ahead and log into Google Talk and use the Market to ensure all is working.
Feedback welcome!
File:
framework.jar
Click to expand...
Click to collapse
From here
I dont know if that works because its not for the hd2, but someone could try it.
I Mirrored the file in case it gets deleted:
Multimirror (Rapidshare, zshare etc.)
edit: I dont think that could work, i just tried to change to /data/data/com.google.android.googleapps/databases/ and it didnt exist at all ...
News
strazzere.com/blog/?p=217
but where can i find these "/data/data/com.android.providers.settings/databases/settings.db"
is there somebody out there who can say me how can i change my android_id on my HD2?

[SCRIPT] Change Hostname v6 08/07/2012

This will also be the last update to this script for the foreseeable future. Someone else is more than welcome to take what is here and run with it though.
08-07-2012 fixed a few typos and problems with quotes.
01-29-2012 added some variables to check for the existence of things and get correct paths.
01-06-2012 fixed hostname path.
01-02-2012 Updated to truly work on all devices.
Check it out and let me know what you think.
Big thanks to cdesai for pointing out a nice little enhancement.
This is version 5 of this script.
This script is designed to change the hostname of your device so that you can access it through your network by name instead of android_0123456789ABCEDF.
Your device will also be able to be seen at your router by the new name as well.
Code:
#!/system/bin/sh
#change devName to whatever you want.
devName="changeMe"
#random variables
devHostPath=$(which hostname)
devGetPath=$(which getprop)
devSetPath=$(which setprop)
if [ "$($devGetPath net.hostname)" = "$devName" ]
then
echo "Device hostname does not need to be changed."
else
echo "Device hostname is being changed to $devName."
$devHostPath $devName
$devSetPath net.hostname $devName
if [ "$($devGetPath net.hostname)" != "$devName" ]
then
echo "Device hostname has not been changed."
else
echo "Device hostname has been successfully changed."
fi
fi
Download Hostname.sh
Download Hostname.sh to your device.
Use a text editor to change the "changeMe" in the script to whatever you want. [Keep the quotes]
Use Script Manager to run the script.
The script output will tell you if the command has completed successfully.
Once it has been run your device will be named whatever you change the "changeMe" to.
*Additionally, this script should be able to be run on any device without issues but I have only tested this on Galaxy Nexus AOKP and Droid Bionic Eclipse v3.0.
**Standard disclaimer, I am in no way responsible for ANYTHING that happens to your phone that you have done.
***This code is provided free of charge and is released with no warranty explicit or implied.
If you find this post useful or it helped in any way please hit the thanks button.
Can anyone confirm this worked for them? Doesn't seem to be working for me.
What's the output when you run it?
And when you run it a second time?
You can check at your router as well by logging into it and checking the DHCP leases.
Oh, I figured this was assumed, but you have to have root and run it as root.
Terror_1 said:
What's the output when you run it?
And when you run it a second time?
You can check at your router as well by logging into it and checking the DHCP leases.
Oh, I figured this was assumed, but you have to have root and run it as root.
Click to expand...
Click to collapse
It didn't work for me either, but your effort is much appreciated!
Not all roms will have bash, and even those which have it is mostly in /system/bin
Using /system/bin/sh would be the best way!
From my fingers to your eyez
Thanks,works perfect for me on the HTC EVO.
cdesai said:
Not all roms will have bash, and even those which have it is mostly in /system/bin
Using /system/bin/sh would be the best way!
From my fingers to your eyez
Click to expand...
Click to collapse
Good call.
I will get it fixed when I find a couple moments.
OP has been updated with the change, works fine on my bionic though untested on anything else.
Terror_1 said:
Good call.
I will get it fixed when I find a couple moments.
OP has been updated with the change, works fine on my bionic though untested on anything else.
Click to expand...
Click to collapse
Yet another idea, you can specify the host name while executing the script as an argument (quick changes )
You can use read devname and if it's empty you can get model no. From build.prop
From my fingers to your eyez
cdesai said:
Yet another idea, you can specify the host name while executing the script as an argument (quick changes )
You can use read devname and if it's empty you can get model no. From build.prop
From my fingers to your eyez
Click to expand...
Click to collapse
I left it static so that it can be run at boot and will always have the same name. The model could work but it is more for changing the name to something you want rather than being dictated what it will be.
Oh and depending on your model you could have a space or other special in it.
Hi everybody !
in the old version I have to follow the instructions, but when starting the Script Manager notice shall not be allowed and notice was not found, I'm using xperia arc s, please tell me why? sr my english is not good
Are you running this as root using the skull and crossbones icon?
Terror_1 said:
Are you running this as root using the skull and crossbones icon?
Click to expand...
Click to collapse
I just running as root, pls check pic
le_manhpro said:
I just running as root, pls check pic
Click to expand...
Click to collapse
Let me work on this a little and get back to you. It looks like you don't have busybox installed, which you "shouldn't" need.
What is your device?
[EDIT] Give the new version a shot and let me know how you make out.
Terror_1 said:
Let me work on this a little and get back to you. It looks like you don't have busybox installed, which you "shouldn't" need.
What is your device?
[EDIT] Give the new version a shot and let me know how you make out.
Click to expand...
Click to collapse
I just installed the update of your version but still does not work, do not know which step I did wrong, please guide the steps to install it?
I'm using the xperia arc S
I have attached pictures of my sr english is not good
le_manhpro said:
I just installed the update of your version but still does not work, do not know which step I did wrong, please guide the steps to install it?
I'm using the xperia arc S
I have attached pictures of my sr english is not good
Click to expand...
Click to collapse
I have many swear words for this.
There is nothing that you have done. Can you provide me with a link to the ROM you are using and I will take a closer look. Even if it's the last thing I do I will get this working.
Challenge accepted.
Terror_1 said:
I have many swear words for this.
There is nothing that you have done. Can you provide me with a link to the ROM you are using and I will take a closer look. Even if it's the last thing I do I will get this working.
Challenge accepted.
Click to expand...
Click to collapse
I'm using the original rom android 2.3.4, you can check here, hope you find ways to overcome sorry my english is not good
http://forum.xda-developers.com/forumdisplay.php?f=965
LG Revolution
On LG Revolution running GingerVolt 1.3, I had to change /bin/hostname to /system/xbin/hostname.
The script can be modified to determine the location of hostname command , rather than hardcoding the path.
gumnaam.sur said:
On LG Revolution running GingerVolt 1.3, I had to change /bin/hostname to /system/xbin/hostname.
The script can be modified to determine the location of hostname command , rather than hardcoding the path.
Click to expand...
Click to collapse
I am working on a V5 of this which should be released within the next 2 weeks that should address almost all issues. It works as is on some devices but not all.
I have also found from my testing that setting the hostname is inconsequential and will only appear when you run the hostname command.
gumnaam.sur said:
On LG Revolution running GingerVolt 1.3, I had to change /bin/hostname to /system/xbin/hostname.
Click to expand...
Click to collapse
Thanks! This is the path on the Galaxy Nexus (ICS 4.02) and i was able to get it to update successfully.
However, if this does not update the host name that is sent to my wireless router, the point of the exercise is moot to me. But at least I learned a little bit more about my phone!
This has been posted elsewhere, but to set the name set for the Wifi DHCP request:
Code:
echo yourphonehostname > /proc/sys/kernel/hostname
Obviously, this needs root. You can stick that in a new or existing script in /etc/init.d.
No need to reboot the phone for this to take effect. Stop and start wifi to get the phone to request a new DHCP lease. Note that if your phone was already connected to a router, then the new name might not show up immediately. You'll need drop the previous name from the router dhcp client table by either waiting for the lease to expire, rebooting the router or expiring the lease manually (e.g., in Tomato Admin GUI, click on the remaining lease time under lease column in the Status -> Device List page.)

[Q] PERMANENTLY changing MAC address (Samsung Galaxy S5 G-900H)

Hi,
First off i want to state that i have some knowledge of the legal issues concerning changing of MAC addresses and the sole reason that i want to do this is because privacy is a big issue for me and i have a right to enjoy my right. Therefore, any posts or argument concerning such are requested to be posted elsewhere where the topic expressly states so.
Also, please treat me like a newbie when it comes to developing and programming of any kind. I have a very shallow understanding of kernel and the likes.
I am using a rooted S5 G-900H(Exynos with BCM 4534 chip)
Running on 4.4.2 Kitkat stock ROM and Kernel
So without further ado, here is what i have found so far
The MAC address is reflected in a hidden file called .mac.info in the /efs/wifi/ folder. However, editing the file does not change the actual MAC address in anyway. A phone reboot or even turning the wifi on/off will just change it back to the original.
I dumped partitions from /dev/block/ on to my SD card and copied it to my laptop. I searched through the files and found the MAC address in the efs.img partition.My wifi was turned off and the plane was in airplane mode. I modified it and flashed it back using the dd command from terminal emulator on my phone(this can also be done through adb shell but im guessing if you know what that is then you obviously know how to do it).
I rebooted the phone and everything seemed fine. The Wifi MAC address in the status screen in settings displayed my edited address. The .mac.info file also displayed the same. The problem is that it reverted back to the original as soon as i turned on the wifi. The MAC address values in the .mac.info file, status screen and the efs partition from the /dev/block/, all changed back to the original.
I have read that for most phones the important information unique to that particular phone(like IMEI, wifi/BT MAC address, unlock codes and so on) is stored in the NV_DATA.bin file, but everything is encrypted. Also there are only guides as to searching unlock codes and such, so i tried to search for hash blocks randomly using Hex Editor but there was nothing of the sort and the only hash block i can recognize is the one with AES-Encryption as shown from another forum on this site.Maybe it is another type of encryption, but that was another dead end for me.
Then i tried to search and edit various files and kernels as such, but there are no kernels that directly offer this customization. Tried to edit init.tuna.rc but there was no such file in the root directory. Searched init.goldfish.rc and init.wifi.rc and found nothing, but i did see init.svc.macloader mentioned and since i didnt want to mess with programs in the /system/bin/file i left it as is.
Also tried to search through PARAM partition using Hex Editor but nothing was there. Did the same for RADIO and BOOT but i dont think i did find anything major there.
tried to edit /sys/class/net/wlan0/address but it didnt let me, even though i was mounted as r/w. Flashing through dd command on terminal also resulted in permission denied. I was only able to view or dump it. I thought that may have been the source, but modifying the MAC address through the busybox if config command was reflected on the file. which obviously means that its not.
Looked through the dmesg (kernel) log and found a few interesting things but i dont know how to interpret them and what to do with it either. Ill post it later.
There is no NVRAM.txt the only ones in place of it i have are nvram_mfg.txt, nvram_mfg.txt_wisol, nvram_mfg.txt_semco3rd, nvram_net.txt, nvram_net.txt_semco3rd, nvram_net.txt_wisol.
I did do a bit more searching and editing, but i dont recall them right now.
Now, After all that what i think is this.
There is a source for the original MAC address somewhere either hardcoded in the Broadcom chip or somewhere in the partitions under a layer of encyrption.
The Original MAC address is only accessed when the wifi is turned on and not on reboot. This means it is not in any file, program or script that activates on boot, so only scripts and files accessed and imported during the turning on of wifi
must have it. Also while wifi is on and running, busybox ifconfig command changes the MAC address succesfully albeit temporarily, although the change is not seen on the status screen and but it does on the .mac.info file.
Any help from anyone, especially from developers with knowledge of Android kitkat ROm and kernels would be very much appreciated.
Alpaca_Bandit said:
Hi,
First off i want to state that i have some knowledge of the legal issues concerning changing of MAC addresses and the sole reason that i want to do this is because privacy is a big issue for me and i have a right to enjoy my right. Therefore, any posts or argument concerning such are requested to be posted elsewhere where the topic expressly states so.
Also, please treat me like a newbie when it comes to developing and programming of any kind. I have a very shallow understanding of kernel and the likes.
I am using a rooted S5 G-900H(Exynos with BCM 4534 chip)
Running on 4.4.2 Kitkat stock ROM and Kernel
So without further ado, here is what i have found so far
The MAC address is reflected in a hidden file called .mac.info in the /efs/wifi/ folder. However, editing the file does not change the actual MAC address in anyway. A phone reboot or even turning the wifi on/off will just change it back to the original.
I dumped partitions from /dev/block/ on to my SD card and copied it to my laptop. I searched through the files and found the MAC address in the efs.img partition.My wifi was turned off and the plane was in airplane mode. I modified it and flashed it back using the dd command from terminal emulator on my phone(this can also be done through adb shell but im guessing if you know what that is then you obviously know how to do it).
I rebooted the phone and everything seemed fine. The Wifi MAC address in the status screen in settings displayed my edited address. The .mac.info file also displayed the same. The problem is that it reverted back to the original as soon as i turned on the wifi. The MAC address values in the .mac.info file, status screen and the efs partition from the /dev/block/, all changed back to the original.
I have read that for most phones the important information unique to that particular phone(like IMEI, wifi/BT MAC address, unlock codes and so on) is stored in the NV_DATA.bin file, but everything is encrypted. Also there are only guides as to searching unlock codes and such, so i tried to search for hash blocks randomly using Hex Editor but there was nothing of the sort and the only hash block i can recognize is the one with AES-Encryption as shown from another forum on this site.Maybe it is another type of encryption, but that was another dead end for me.
Then i tried to search and edit various files and kernels as such, but there are no kernels that directly offer this customization. Tried to edit init.tuna.rc but there was no such file in the root directory. Searched init.goldfish.rc and init.wifi.rc and found nothing, but i did see init.svc.macloader mentioned and since i didnt want to mess with programs in the /system/bin/file i left it as is.
Also tried to search through PARAM partition using Hex Editor but nothing was there. Did the same for RADIO and BOOT but i dont think i did find anything major there.
tried to edit /sys/class/net/wlan0/address but it didnt let me, even though i was mounted as r/w. Flashing through dd command on terminal also resulted in permission denied. I was only able to view or dump it. I thought that may have been the source, but modifying the MAC address through the busybox if config command was reflected on the file. which obviously means that its not.
Looked through the dmesg (kernel) log and found a few interesting things but i dont know how to interpret them and what to do with it either. Ill post it later.
There is no NVRAM.txt the only ones in place of it i have are nvram_mfg.txt, nvram_mfg.txt_wisol, nvram_mfg.txt_semco3rd, nvram_net.txt, nvram_net.txt_semco3rd, nvram_net.txt_wisol.
I did do a bit more searching and editing, but i dont recall them right now.
Now, After all that what i think is this.
There is a source for the original MAC address somewhere either hardcoded in the Broadcom chip or somewhere in the partitions under a layer of encyrption.
The Original MAC address is only accessed when the wifi is turned on and not on reboot. This means it is not in any file, program or script that activates on boot, so only scripts and files accessed and imported during the turning on of wifi
must have it. Also while wifi is on and running, busybox ifconfig command changes the MAC address succesfully albeit temporarily, although the change is not seen on the status screen and but it does on the .mac.info file.
Any help from anyone, especially from developers with knowledge of Android kitkat ROm and kernels would be very much appreciated.
Click to expand...
Click to collapse
As you said, ifconfig changes it, there are several apps that do it for you as well, chainfire also released a mac randomizer app. You also noted it's hardwired in, so i would just have a startup script that changes it if i were you, there night be a better way to do it though.
Sent from my Tw5ted SM-G900A using Tapatalk
Yes, I have been using pry-fi as an option but the thing is that when i'm watching videos or downloading large sized files from playstore or other file hosting sites, it starts to turn my wifi on/off several times before becoming stable and logging in to the AP again. I have tried macchanger also and both misbehave after an interval of time. Thats why im trying to search for a more cleaner way to do it.
Running an init script would be nice but i have no idea how to do that. But there should be a script that only runs when turning on the wifi right? Would you know where this file was located and how to modify it? and if so please tell me.
Alpaca_Bandit said:
Yes, I have been using pry-fi as an option but the thing is that when i'm watching videos or downloading large sized files from playstore or other file hosting sites, it starts to turn my wifi on/off several times before becoming stable and logging in to the AP again. I have tried macchanger also and both misbehave after an interval of time. Thats why im trying to search for a more cleaner way to do it.
Running an init script would be nice but i have no idea how to do that. But there should be a script that only runs when turning on the wifi right? Would you know where this file was located and how to modify it? and if so please tell me.
Click to expand...
Click to collapse
You can just use init.d to make the script, shell scripting isnt very hard and i won't give you a tutorial here. Also as noted many places when researchng changing a mac on android, you can't connect to secured APs, or it won't be easy at least. As i said before, there may be a better way to do this, but i do not know it.
Sent from my Tw5ted SM-G900A using Tapatalk
Ok, thanks a lot. Running a script might just be cleaner than anything else I have right now. I'll still be on the lookout for other ways though. Call me hard to please.
Btw, I think the reason most custom MAC addresses(if they do get changed) are too different than the ones registered on the chip. I've found that changing only the 2nd digit out of the 12 in the address, to an even hexadecimal number like 2 or A, works for me on my pc.
Also you need to forget the networks on your pc or android as soon as you change it. Doesnt matter if you have the password or not, it doesnt connect. Must be something to do with the saved info about the ap on the phone that messes it up.
Alpaca_Bandit said:
Ok, thanks a lot. Running a script might just be cleaner than anything else I have right now. I'll still be on the lookout for other ways though. Call me hard to please.
Btw, I think the reason most custom MAC addresses(if they do get changed) are too different than the ones registered on the chip. I've found that changing only the 2nd digit out of the 12 in the address, to an even hexadecimal number like 2 or A, works for me on my pc.
Also you need to forget the networks on your pc or android as soon as you change it. Doesnt matter if you have the password or not, it doesnt connect. Must be something to do with the saved info about the ap on the phone that messes it up.
Click to expand...
Click to collapse
I know on for example ddwrr and even some official router firmwares they allow you to spoof your mac, may be worth looking into how they do it, but i have a suspicion it might be done with a script.
Sent from my Tw5ted SM-G900A using Tapatalk
Hard Wired?
I have been messing with 2 Alcatel Ideal 4060a, (because I bricked the first one i had).
After bricking the first 4060a I had, (wiping all partitions), I bought a second, (so I could install TWRP on it back it up and restore the backup onto the first).
After Restoring the backup of the second onto the first, all was good until I tried to get them online together.
When one connected it knocked the other offline, because they both share the same MAC address.
This is my problem and I wish the Mac Addresses were hard wired, then i wouldn't have this problem.
This is good news for anyone who wants to know if mac addresses are indeed hard wired. They are not, (at least not in the 4060a).
Hope This Helps.
gscripting
MAC for bt and wifi reside in the EEPROM or NVRAM. And that is not editable.
To put it simply you can't change it. Only spoof it. And if you know it's not legal you probably shouldn't be asking.
Reported Is different from original
gscripting said:
I have been messing with 2 Alcatel Ideal 4060a, (because I bricked the first one i had).
After bricking the first 4060a I had, (wiping all partitions), I bought a second, (so I could install TWRP on it back it up and restore the backup onto the first).
After Restoring the backup of the second onto the first, all was good until I tried to get them online together.
When one connected it knocked the other offline, because they both share the same MAC address.
This is my problem and I wish the Mac Addresses were hard wired, then i wouldn't have this problem.
This is good news for anyone who wants to know if mac addresses are indeed hard wired. They are not, (at least not in the 4060a).
Hope This Helps.
gscripting
Click to expand...
Click to collapse
More info relative to these 2 phones
I installed an app called Change my Mac.
It Lists:
Original MAC 12:34:56:78:90:ab
Current MAC ff:ee:dd:cc:bb:aa
They Are Different.
I thought the original MAC address it's showing, was the one written in the EEPROM or NVRAM,
but it turns out, after installing Change My MAC on the other phone also, its lists the same Original and Current MAC addresses as the first phone.
The Current MAC address listed is the one reported in settings and my network.
I Use Change My MAC to set the reported MAC to the original every time the phone boots using Tasker on only one of them.
Using Change My MAC, the change lasts til boot.
Just passing it on for those that might be interested.
When I get link privileges, I'll add a screenshot of Change My MAC.
gscripting

Categories

Resources