Coder Social home page Coder Social logo

versiani-r / remote-phone-access Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 3.21 MB

This will help you to connect to your phone ( or any phone in general ) remotely using scrcpy

JavaScript 49.99% TypeScript 50.01%
typescript javascript scrcpy scrcpy-android android remote-control remote-access nmap network phone

remote-phone-access's Introduction

How it's going to work

We will use the handy scrcpy, some useful resources, such as angry ip scanner, and other stuff.
It will use TypeScript, but I pretend in doing another repository like this, but this time using python3.
Also, as a matter of fact, it will use quite a lot of linux terminal commands, I will cover the usage, and why to use it, but it wouldn't hurt knowing at least the basics.

Dependencies

  1. scrcpy
    • sudo apt install scrcpy
  2. angry ip scanner
    • sudo apt install ./angryip
  3. adb
    • sudo apt install adb
  4. nodejs
  5. (OPTIONAL) nmap
    • sudo apt install nmap
    • You don't need to install this dependency, it's not as reliable as I want to;
    • It's only possible use case is on: Steps To Follow > 3;

Usage

I just recently broke my phone's display, the touch works, but the image doesn't ( the phone's screen is black ). I tried many ways to have access to my phone, and being honest, there's a lot of great ways of achieving so.

  1. airdroid Let's you do a bunch of stuff
  2. The good old way of just plugging your phone on the usb and getting the files back ( although that doesn't grant me any control over the phone ).
  3. and other great ways
  4. mirroring your phone's screen

And the list goes on and on ...

Steps to follow

DISCLAIMER: I HAVE ABSOLUTELY NO IDEA IF IT WORKS ON APPLE DEVICES. TRY BY YOUR OWN RISK.
First of all, you must have all the dependencies installed.
Second of all, it only works while your phone and your pc are on the same network.
After that:

  1. Get your phone, and activate the developer's options. It should be one of the following paths:

    • Settings > About Phone > Build Number
    • Settings > About Phone > Status > Build Number
    • Settings > About Phone > Status > Info > Build Number
  2. On developer's options, enable usb-debugging

    • Debugging > Toggle USB Debugging
  3. (OPTIONAL) Get your ip address. It should be one of the following paths

    • Settings > About Phone > Status > Ip Address

    • Settings > About Phone > Info > Ip Address

    • the program itself tries the connection with all the ip addresses on the network, you can skip this process if you want to

    1. Another great way of getting your ip address ( and every other ip address of your network ) is with the following command
      • ipscan -f:range 10.0.0.0 10.0.0.255 -s
    2. Other possible way is with the command (NOT 100% RELIABLE)
      • nmap -sn 10.0.0.0/24
  4. Plug your device on the computer's usb.

  5. On your terminal, type the following:

    • adb tcpip 5555
    • this marks your phone as open, with the port as 5555
  6. Unplug your phone

  7. Run the script

    • node main.js
    1. If you used other port, run:
      • PORT=1234 node main.js

remote-phone-access's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hummans

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.