[TUT] Building a Switch-lan-play client on your android phone

Discussion in 'Switch - Tutorials' started by lil-devil, Nov 5, 2018.

  1. lil-devil
    OP

    lil-devil GBAtemp Regular

    Member
    4
    Oct 16, 2007
    Canada
    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
     
    Last edited by lil-devil, Nov 9, 2018
    lordelan, jakkal, yuu.hack and 3 others like this.
  2. MisterMue

    MisterMue Member

    Newcomer
    2
    Jan 18, 2013
    Germany
    Thank you for that , but why don’t you explain how it is meant to be used?
     
  3. Chamillionaire

    Chamillionaire GBAtemp Regular

    Member
    3
    Nov 8, 2006
    Gambia, The
    You do realize that it IS explained in a single and simple sentence if you click the last link?
     
  4. MisterMue

    MisterMue Member

    Newcomer
    2
    Jan 18, 2013
    Germany
    i read your post about infos and do not want to follow links to get the puzzle solved. See it as a service to the reader who is not informed about each detail.
     
  5. lil-devil
    OP

    lil-devil GBAtemp Regular

    Member
    4
    Oct 16, 2007
    Canada
    Sorry I forget there are plenty of lazy people that requires to be spoon fed... Enjoy
     
  6. Codiox

    Codiox Advanced Member

    Newcomer
    3
    Jan 19, 2016
    South Africa
    Can't install cmake, it says 404 not found after I type y for install
     
  7. lil-devil
    OP

    lil-devil GBAtemp Regular

    Member
    4
    Oct 16, 2007
    Canada
    What does it spit out after you type
    Code:
    pkg search cmake
     
  8. Codiox

    Codiox Advanced Member

    Newcomer
    3
    Jan 19, 2016
    South Africa
    It works now, thanks!
     
  9. 133mhz

    133mhz Member

    Newcomer
    2
    Feb 5, 2018
    Philippines
    Up thanks for this
     
  10. Codiox

    Codiox Advanced Member

    Newcomer
    3
    Jan 19, 2016
    South Africa
    Did you get it to work with your switch? It's running on my phone but my switch somehow can't connect to it.
     
  11. spacemeowx2

    spacemeowx2 Newbie

    Member
    1
    Oct 4, 2018
    China
  12. gothteen

    gothteen Member

    Newcomer
    3
    Jan 13, 2011
    Netherlands
    Just a quick question: since this is based on linux (or a fork), is it possible to port it over to a rasp-pi 3 or something? Would be great to have this app running localy but not on any phone or pc, just a dedicated micro pc should do the trick (but thats just assumption)
     
  13. annson24

    annson24 The Patient One

    Member
    6
    May 5, 2016
    Philippines
    I'm having a

    /system/bin/sh: ./lan-play: not found

    Error.

    I'm on galaxy s8 rooted with magisk.

    Sent from my SM-G950F using Tapatalk
     
  14. DeadlySin9

    DeadlySin9 Member

    Newcomer
    1
    Aug 21, 2015
    United States
    Anyone tried running this on something like UserLAnd for non rooted users? Planning to try later if nobody has.

    EDIT: Seems to run into a permissions issue: "Error pcap_findalldevs: socket: Permission denied"
    Running as the root user in the machine doesn't seem to fix it, so device root may be necessary.
     
    Last edited by DeadlySin9, Nov 9, 2018
  15. annson24

    annson24 The Patient One

    Member
    6
    May 5, 2016
    Philippines
    I think I found out why I'm having the 'not found' problem. But I don't know how to fix it.[​IMG]

    Sent from my SM-G950F using Tapatalk
     
  16. lil-devil
    OP

    lil-devil GBAtemp Regular

    Member
    4
    Oct 16, 2007
    Canada
    Awesome!

    I will add that to the OP
    Only thing i notice is, i find most phones i use doesn't come with cmake, so might be a good idea to install cmake on yours.
    but then again, users can figure that out them self i guess....

    No, in order for this to work, libpcap must have root access to view the network interface and modify it, hence root is required (just like on windows you may have to do a run as admin)

    Do an
    Code:
    ls
    what does that show?
    you have to make sure you're in the "switch-lan-play/build" folder to run it.
     
  17. annson24

    annson24 The Patient One

    Member
    6
    May 5, 2016
    Philippines
    Sorry for the late response. Gbatemp was having a maintenance when I sent the reply, anyway, here it is again.

    Warning: Spoilers inside!

    Sent from my SM-G950F using Tapatalk
     
  18. Ninoh-FOX

    Ninoh-FOX Otaku Gamer!!

    Member
    4
    Jan 22, 2015
    Spain
    Military base.
    you can move lan-play to data dir and then type "tsudo data/lan-play --rela........"

    this works for me.
     
    Last edited by Ninoh-FOX, Nov 12, 2018
    lil-devil and annson24 like this.
  19. annson24

    annson24 The Patient One

    Member
    6
    May 5, 2016
    Philippines
    Can confirm, this one worked for me. Thanks a lot!

    Sent from my SM-G950F using Tapatalk
     
  20. gothteen

    gothteen Member

    Newcomer
    3
    Jan 13, 2011
    Netherlands
    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.

    [​IMG]

    Now to make it go autopilot if i turn off/on the raspberry pi... oh well, at least it runs :)
     
    Last edited by gothteen, Nov 12, 2018
Loading...