Streetpass Automation Script for Android

Hello everyone!
This is a android shell script I began creating as soon as I heard of the strides in homemade streetpass relays here on Temp and other places in the net. My focus is on customization.
It works quite like Chaldron's MAC Cycler, but on android. Since it can reverse tether your phone automatically, it's very useful for people without data plans like myself, or who only have access to a wireless router that can't clone its MAC easily. The way I have it setup, the internet connection comes from a wireless router to my PC, is shared with the phone by usb and is finally broadcast correctly from there.
To add or exclude MAC addresses, simply edit '/data/script.autoStreetPass/macList.txt'. By default it includes the GbaTemp prime MACs, the other 'near Nintendo Zone' MACs and personal MACs taken from the official spreadsheet.

Requirements
  • Root Access
  • ROM able to read the Wi-Fi MAC address from a file (only implemented for CyanogenMod based ROMs for now)
  • 'Wifi Tether for Root Users' app (found here)*
  • Usb tethering capabilities for reverse tethering, optional
*Make sure the virtual access point is started manually at least once from inside the app so that it generates the config files required for the binary to run in standalone mode. It is not recommended to enable MAC address spoofing in its options.

Usage
To install the script, simply unzip the contents of its release file to the root of your sd card.
My script was tested with Script Manager, but it should work with similar solutions. Navigate to /data/script.autoStreetpassForAndroid/ choose macCicle.sh, check Root and Wakelock, set your desired arguments and run. You can use the addon package SMWidgets to make a quick widget on the phone's launcher for quick access.
If you want to use reverse tethering just connect your phone to your PC, share a connection with the usb network adapter and turn on usb tethering before running the script with the proper argument(s) (See Configuration for details).

Configuration
In the main script there are some variables that can be edited along with a brief summary where applicable.
Thre is also file macList.txt, which stores all the MAC addresses that will be used. Invalid entries are ignored, as well as commentary lines denoted by '#' at their start.
As for the script's arguments, see the script's help text below:

Starts and manages a wifi access point while cicling through different MAC addresses -h Display help page -u ensure Enables usb reverse tethering Optional argument, if true quits on error -l loops Number of times to iterate through MAC list, default 1 Pass 0 for it to loop indefinitely -t delay<unit> Sets a custom delay beteen MAC changing Unit format: [s:seconds|m:minutes|h:hours|d:days]

Download
You can download it by going here and selecting the latest version. Also, please consider throwing me a penny for helping with college, by clicking here.

Considerations
Please report any issues here.
Thank you to everyone who made unnoficial streetpass relaying possible, now I can finally complete some puzzles!
 

KaleoOmega

I just don't know what to do with myself...
Member
Joined
Apr 17, 2013
Messages
386
Trophies
0
XP
282
Country
Brazil
Sounds nice, but, a question: it is possible to create a version without tethering, using data plans from the phone and activating-deactivating the phone router?

At this moment I'm without internet at my home, except by the phone data plan... :P
 

lpchaim

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2013
Messages
75
Trophies
0
XP
189
Country
Brazil
Sounds nice, but, a question: it is possible to create a version without tethering, using data plans from the phone and activating-deactivating the phone router?

At this moment I'm without internet at my home, except by the phone data plan... :P

Yes, in fact it's disabled by default. You have to pass the -u switch to enable it. It should work fine with a mobile data connection, although I don't have one to test with. Also, do note it doesn't check for connectivity before starting the switches yet.
 

RedHero

Well-Known Member
Member
Joined
Dec 27, 2008
Messages
208
Trophies
0
XP
239
Country
Netherlands
This method doesn't work for me. It essentially uses the same method as Zurce's Riilay app to change MACs. Basically, it changes the nvmac.info file manually. Which makes me wonder why the Wi-Fi tether app is necessary, since that app uses a different method that does work for me (I don't have nvmac.info and changing mac.info manually doesn't work). Sadly, development of Riilay seems to be on hold for now..

The Wi-Fi tether app's method works fine for me though. MAC spoofing with that app clearly uses a different method that doesn't change the MAC in the file, but changes (or appears to change) the actual MAC of the device temporarily.

Basically, this method would only work for people who have nvmac.info data folder and for people who can get that method to work manually. It might be worth checking to see how the Wi-Fi tether app spoofs the MAC. It might be more reliable than the method that changes the text files and it might work for more people.
 

lpchaim

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2013
Messages
75
Trophies
0
XP
189
Country
Brazil
This method doesn't work for me. It essentially uses the same method as Zurce's Riilay app to change MACs. Basically, it changes the nvmac.info file manually. Which makes me wonder why the Wi-Fi tether app is necessary, since that app uses a different method that does work for me (I don't have nvmac.info and changing mac.info manually doesn't work). Sadly, development of Riilay seems to be on hold for now..

The Wi-Fi tether app's method works fine for me though. MAC spoofing with that app clearly uses a different method that doesn't change the MAC in the file, but changes (or appears to change) the actual MAC of the device temporarily.

Basically, this method would only work for people who have nvmac.info data folder and for people who can get that method to work manually. It might be worth checking to see how the Wi-Fi tether app spoofs the MAC. It might be more reliable than the method that changes the text files and it might work for more people.

That's right. I based the script on this method because CyanogenMod ROMs use it and are the most popular ones. Also my phone has it, which makes testing easier. The way I have laid the basic sript, it's ready to replace MAC data in any form within a file, it's just a matter of adding the other methods when I discover other files to modify.
As for the app's method, I will look into it, yes. As you said it seems to be temporary, not sure what to expect here...
 

Maverynthia

Well-Known Member
Newcomer
Joined
Apr 1, 2010
Messages
51
Trophies
1
XP
268
Country
United States
Please add the Wifi Tether method, I do not use Cyanogen ROMs because they are usually buggy. Wifi Tether works for me, but file based MAC changes don't.
 

Zurce

Well-Known Member
Newcomer
Joined
Aug 16, 2013
Messages
50
Trophies
0
Age
33
XP
303
Country
United States
does this work with every phone or it's limited to the one who are compatible with the busybox method?
 

lpchaim

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2013
Messages
75
Trophies
0
XP
189
Country
Brazil
As I already said, I will look into implementing a "on the fly" method like the one used by the wifi tether app.
The thing is, college is taking a lot of my time right now, so please be patient.

does this work with every phone or it's limited to the one who are compatible with the busybox method?
The only things it uses busybox for are unrelated to the actual file manipulation. At the moment it replaces the MAC in the file at '/data/.nvmac.info', which can be changed for other ROMs if necessary.
I'm not sure if other ROMs have this file, I just know CM ones have it by default.
 

Akotan

Mathematical!
Member
Joined
Mar 14, 2004
Messages
563
Trophies
2
Age
44
Website
www.viciocriativo.com
XP
451
Country
Brazil
I searched my Nexus device for an MAC config file and I didn't find anything... so I'm stuck with a busybox method like Riilay.
For someone who never streetpassed, 6 ones are good enough. XD
 

lpchaim

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2013
Messages
75
Trophies
0
XP
189
Country
Brazil
I searched my Nexus device for an MAC config file and I didn't find anything... so I'm stuck with a busybox method like Riilay.
For someone who never streetpassed, 6 ones are good enough. XD
Oh, trust me, I know your pain :lol:
My friends didn't even know what a 3ds was before seeing mine, and no one in my college's city owns one afaik haha

I'm using CM 7.2 now and I don't recall my phone having that "nvmac.info". Not stock CM though.
Yeah, I risked a guess beause the ones I have seen seemed to have it as opposed to stock roms. Maybe it's manufacturer dependant.
When I resume development on this I will try to implement a more universal changing method.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Just 6 but dual band 6 lol