Skip to content

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

Notifications You must be signed in to change notification settings

Versiani-R/remote-phone-access

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published