Hello,
As is my first serious post, I will like to teach you how to send any file from your PC directly to your Android phone only using the context menu and ADB.
DEMO
STEP 1: GET ADB
[SKIP IF YOU ALREADY HAVE IT]
We need to download the executable that will connect to our device and send the file we want to it. This executable is called ADB which stands for Android Debug Bridge. Here's the official link to the ADB download page from Google. Download the:
SDK Platform-Tools for Windows
Decompress the zip and put the folder whereever you want, the important thing is that you will cand find it later.
STEP 2: ENABLE ADB NETWORK ON PHONE
To be able ADB to connect to your android phone, you will have to have the ADB over Network enabled or connect yur phone with the computer by cable, but that is more rectrictly. You can use whatever app from the play store to activate the ABD over Network, just search ADB network and will appear a bunch of apps ehich can help you.
One you get enable this service, the app you used will tell you the IP adress of your phone which is useful when we'll create the script for Windows.
The IP adress will look similar to: 192.168.1.120
STEP 3: CREATE THE SCRIPT
Inside this folder (platform-tools) we'll create a script, like the bash script but now for windows, a batch script.
Script:
@echo off
for %%F in (%1) do set @FILE=%%~nxF
adb connect IP_ADRESS_OF_YOUR_ANDROID_PHONE
adb push %1 "/sdcard/DESTINATION_FOLDER/%@FILE%"
The second line is for reading the filename that we will send to this script through the context menu and save it in the FILE variable which will be used in the last line to determine the name of the file in the Android phone.
In the third line is where you will put the IP adress of your phone provided by those apps from the previous step.
Save that script as NAME.bat, you can name it whatever you want, I named it send.bat. The extension .bat is the most important because that is telling to windows that it can run that code and it is not a simple text file.
STEP 4: ADD BUTTON TO CONTEX MENU
In this step we will add this thing.
Soo for that we have to edit the registers files of Windows.
For that press on the keyboard WINDOWS+R. That will pop up a window where you will have to type regedit. Like so:
Hit OK and in the new window, in the left, we will have a tree of folders. We need to open HKEY_CLASSES_ROOT and the find the folder *.
Open that folder and the folder inside which is names shell. Right click on this folder shell and go to New -> Key. That will create a new folder inside, name that folder the way you want to look on the context menu when right click on any file, mine is named Send To Android.
One that folder or Key has been created, we'll reproduce this last step for the folder Send To Android. Create a new key or folder inside this one with the name command, it must be that specific name.
Once that is completed, in the right part we will see something like this:
Double click on that key named (Default) and set his value to the path of your script, the completed path that contains you script made in the previous step.
Mine is:
D:\\AndroidSDK\\platform-tools\\send.bat "%1"
"%1" means the path of the file, basically we use that symbol to pass the path of the file we want to send, from the explorer to our script. Which, by the way, is the same that we used in the creation of the script in the second line.
END
That's it, now when you right click on whatever file or folder you will get that button in the context menu which will call the script inside de ADB folder. The ADB will connect to your phone and send what you want to the android phone.
Remember to enable de ADB over Network in the Android phone before send anything.