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.
- scrcpy
sudo apt install scrcpy
- angry ip scanner
sudo apt install ./angryip
- adb
sudo apt install adb
- nodejs
- (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
;
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.
- airdroid Let's you do a bunch of stuff
- 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 ).
- and other great ways
- mirroring your phone's screen
And the list goes on and on ...
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:
-
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
-
On developer's options, enable usb-debugging
Debugging > Toggle USB Debugging
-
(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
- 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
- Other possible way is with the command (NOT 100% RELIABLE)
nmap -sn 10.0.0.0/24
-
-
Plug your device on the computer's usb.
-
On your terminal, type the following:
adb tcpip 5555
- this marks your phone as open, with the port as 5555
-
Unplug your phone
-
Run the script
node main.js
- If you used other port, run:
PORT=1234 node main.js