Tutorial  Updated

Building a Switch-lan-play client on your android phone

Note: this post is out of date and will not be updated. Please use this tutorial instead!
https://gbatemp.net/threads/zero-to-smashing-local-wireless-online-ldn_mitm-guide.526228/



Noticed a lot of people asking for this bit there isn't much help with this... so here it is....

Note:
no credit for this as I didn't make any of this.
All credit goes to the dev for the programs used. Also I wrote this up on my phone... Excuse me for the formatting. Will fix it up when I get the chance to.

Disclaimer: some phones are different and if this doesn't work, post here and we'll see if we can find a way around this. Also if your phone over heat, blows up, turns into an apple, and other issue or problem other you may encounter, none of those are my fault and you agree to the risk following or reading this tut


Requirements
Procedures
1. First you need to download the libs and packages required to build the client. Launch termux and enter in the following
Code:
apt update
apt install libpcap-dev
apt install libuv-dev
pkg install cmake
pkg install tsu
pkg install git

2. Download the git
Code:
git clone https://github.com/spacemeowx2/switch-lan-play.git

3. Change directory into the git folder and make a build directory
Code:
cd switch-lan-play
mkdir build
cd build

4. Build your client now
Code:
cmake ..
make

5.Your client is now built, to run it you use
Code:
tsudo ./lan-play --relay-server-addr example.com:11451

6. Profit

Links:
How to set up your switch: http//www.lan-play.com/install

Space's GitHub: https://github.com/spacemeowx2/switch-lan-play

Space's android script: https://gist.github.com/spacemeowx2/b2f336489ce621c9d177db0fb35940f1
 
Last edited by lil-devil,

lil-devil

Well-Known Member
OP
Member
Joined
Oct 16, 2007
Messages
225
Trophies
0
Age
33
Website
Visit site
XP
906
Country
Canada
Nvm about the rasp, got it running localy on it (and it runs perfectly).
Just had a minor adjustment to some of the commands (Sudo instead of tsudo for instance), installed cmake and made the program within seconds.

pi.png


Now to make it go autopilot if i turn off/on the raspberry pi... oh well, at least it runs :)
Yeah tsudo is for termux

Most other terminal uses Sudo, kinda annoying. .

Should be pretty easy to add this as a process in your init.d to start it up when the pi starts

Sent from my ONEPLUS A3000 using Tapatalk
 
  • Like
Reactions: gothteen

gothteen

Active Member
Newcomer
Joined
Jan 13, 2011
Messages
34
Trophies
1
XP
328
Country
Netherlands
Yeah tsudo is for termux

Most other terminal uses Sudo, kinda annoying. .

Should be pretty easy to add this as a process in your init.d to start it up when the pi starts

Sent from my ONEPLUS A3000 using Tapatalk

Was thinking that too, just have to select the port and thats where it hangs when booting. Should be a simple fix tough :)
 

Slushyberry

Member
Newcomer
Joined
Jun 7, 2018
Messages
18
Trophies
0
Age
29
XP
222
Country
Hungary
I have this error after cd build - cmake .. - make: "*** No targets specified and no makefile found. Stop." My build folder is empty.
 

WiseFool

Well-Known Member
Member
Joined
Sep 3, 2018
Messages
144
Trophies
0
Age
33
XP
432
Country
India
Was thinking that too, just have to select the port and thats where it hangs when booting. Should be a simple fix tough :)
Hi I also have a rpi. I'm a nub with no programming skills. Could you give me a step by step guide to setup please?

Sent from my Nexus 6P using Tapatalk
 

deepweed

Active Member
Newcomer
Joined
Jun 4, 2018
Messages
39
Trophies
0
Age
34
XP
657
Country
Lithuania
Im getting this error
Error pcap_findalldevs: wlan0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Permission denied
What im doing wrong? Im on android 9 galaxy s9 plus rooted with magisk
 

hitodesu

Well-Known Member
Member
Joined
Mar 10, 2017
Messages
136
Trophies
0
Age
25
XP
259
Country
United States
I was able to get this working the first time but after exitting the session and the app it doesn't work. What's wrong?
 

deepweed

Active Member
Newcomer
Joined
Jun 4, 2018
Messages
39
Trophies
0
Age
34
XP
657
Country
Lithuania
Notice a lot of people asking for this bit there isn't much help with this... so here it is....

Note:
no credit for this as I didn't make any of this.
All credit goes to the dev for the programs used. Also I wrote this up on my phone... Excuse me for the formatting. Will fix it up when I get the chance to.

Disclaimer: some phones are different and if this doesn't work, post here and we'll see if we can find a way around this. Also if your phone over heat, blows up, turns into an apple, and other issue or problem other you may encounter, none of those are my fault and you agree to the risk following or reading this tut


Requirements
Procedures
1. First you need to download the libs and packages required to build the client. Launch termux and enter in the following
Code:
apt update
apt install libpcap-dev
apt install libuv-dev
pkg install cmake
pkg install tsu
pkg install git

2. Download the git
Code:
git clone https://github.com/spacemeowx2/switch-lan-play.git

3. Change directory into the git folder and make a build directory
Code:
cd switch-lan-play
mkdir build
cd build

4. Build your client now
Code:
cmake ..
make

5.Your client is now built, to run it you use
Code:
tsudo ./lan-play --relay-server-addr example.com:11451

6. Profit

Links:
How to set up your switch: http//www.lan-play.com/install

Space's GitHub: https://github.com/spacemeowx2/switch-lan-play

Space's android script: https://gist.github.com/spacemeowx2/b2f336489ce621c9d177db0fb35940f1
Why theres no mention about selinux permisive? Without that it wont work!
 

freshrust

Member
Newcomer
Joined
Jul 23, 2018
Messages
6
Trophies
0
Age
34
XP
62
Country
Thailand
you can move lan-play to data dir and then type "tsudo data/lan-play --rela........"

this works for me.

I have the same problem (./lan-play not found). Could you please elaborate on how to move lan-play to data dir?

I input
Code:
tsudo mv lan-play /data
and it seems to have ran okay but when I try to run it
Code:
tsudo data/lan-play --relay-server.....
I got
Code:
/system/bin/sh: data/lan-play: not found


Appreciate any help :)
 

Codiox

Well-Known Member
Member
Joined
Jan 19, 2016
Messages
184
Trophies
0
Age
38
XP
722
Country
South Africa
@gothteen can you share your rapsberry pi compiled lan play?

Thank you!

@deepweed did you get it to run on android?
It runs on my phone but I can't connect to it somehow. On pc it works fine..
 

tiagok

New Member
Newbie
Joined
Nov 14, 2019
Messages
1
Trophies
0
Age
30
XP
33
Country
Brazil
Im gettint the exact same issue than @deepweed
`Error pcap_findalldevs: wlan0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Permission denied`
Galaxy S10, Magisk, Android 9

what to do from now?
 

Bartx

New Member
Newbie
Joined
Mar 15, 2017
Messages
4
Trophies
0
Age
28
XP
64
Country
Poland
I have a problem on pc my switch normal connect to internet but on Android termux i have a DNS error could connect to internet how to fix that ?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-