New Forums Created for Windows 10 Development

Microsoft, looking to be a player in the game of giants with their recent announcement of … more

T-Mobile Expands Its LTE Network

T-Mobile US has announced moreLTE network expansion. The carrierwill provide asignal for the700 MHz band, … more

Kernel Source Available for HTC One M8

HTC pushed the Lollipop-based Sense update to the developer edition of the HTC One M8 just a couple … more

Asus Hints at Upcoming Week-long Battery Smartwatch

Asus hinted that their next smartwatch, succesor to the elegant ZenWatch, could feature … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[REF] Making use of Windows "Send to" menu

OP xan

13th November 2010, 04:39 PM   |  #1  
xan's Avatar
OP Recognized Developer
Flag Crack-ow
Thanks Meter: 457
 
1,399 posts
Join Date:Joined: May 2006
Donate to Me
More
Pushing files over adb has never been easy. There are some external tools for sending files over adb, but I like native, Windows-integrated ones.

The trick is extremely easy. It works with adbWireless and similar applications. It could work with USB connection too, but I rarely use it.

HEADS UP: Be sure to check all nice(r) scripts by Daneshm90 down the thread!

Prerequisites:
-adb
-adbMagic or similar for wifi connection, none for USB only.

How to?
For better look you will need two files:

adb_send.cmd;
Code:
adb connect 192.168.1.103
adb push %1 /sdcard/
pause
and a shortcut to it, where you can customize icon and name.

1) create your adb_send.cmd anywhere on disk (I put mine in android-sdk-windows\tools directory),
2) customize the ip address, to point at your device (I have router with static DHCP, so everytime my device connects it leases the same address)
3) then go to:
Windows Vista/7:
Code:
%APPDATA%\Microsoft\Windows\SendTo
(paste it in explorer's address bar, or hit WIN+R and paste there, Enter), and place shortcut to script file created earlier. (drag it with right mouse button)
4) customize the icon and name of the shortcut
Next time you click on any file menu appears:
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	880
Size:	12.3 KB
ID:	440360  
Last edited by xan; 16th November 2010 at 02:02 AM.
The Following User Says Thank You to xan For This Useful Post: [ View ]
13th November 2010, 05:38 PM   |  #2  
Junior Member
Flag New Delhi
Thanks Meter: 2
 
28 posts
Join Date:Joined: Aug 2010
More
good idea, btw how did you find the ip address? 192.168.1.103... i am not able to send using the same
13th November 2010, 05:40 PM   |  #3  
xan's Avatar
OP Recognized Developer
Flag Crack-ow
Thanks Meter: 457
 
1,399 posts
Join Date:Joined: May 2006
Donate to Me
More
When you use adbWireless, under big orange button you will see something like: "adb connect 192.168.1.103:5555"
13th November 2010, 05:40 PM   |  #4  
Senior Member
Thanks Meter: 36
 
315 posts
Join Date:Joined: Dec 2008
Quote:
Originally Posted by ravi4chahal

good idea, btw how did you find the ip address? 192.168.1.103... i am not able to send using the same

I think that you will have to find your own ip adress mate
13th November 2010, 05:52 PM   |  #5  
Junior Member
Flag New Delhi
Thanks Meter: 2
 
28 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by xan

When you use adbWireless, under big orange button you will see something like: "adb connect 192.168.1.103:5555"

ok thanks, I installed adbWireless and now it is working ... however is there any way of getting rid of the CMD window that pops up while transfer?
13th November 2010, 05:57 PM   |  #6  
xan's Avatar
OP Recognized Developer
Flag Crack-ow
Thanks Meter: 457
 
1,399 posts
Join Date:Joined: May 2006
Donate to Me
More
hmm..
I think there is. Right click on the shortcut (this in "%APPDATA%\Microsoft\Windows\SendTo")properiti es -> run -> minimised

Delete "pause" line from script, and command line is hidden.
13th November 2010, 05:58 PM   |  #7  
xan's Avatar
OP Recognized Developer
Flag Crack-ow
Thanks Meter: 457
 
1,399 posts
Join Date:Joined: May 2006
Donate to Me
More
//double, sry
13th November 2010, 06:13 PM   |  #8  
Daneshm90's Avatar
Recognized Developer
Thanks Meter: 638
 
3,309 posts
Join Date:Joined: Jun 2009
How's this :

Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push "%1" /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
Last edited by Daneshm90; 13th November 2010 at 06:21 PM.
13th November 2010, 07:17 PM   |  #9  
dhiru1602's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter: 13,225
 
1,733 posts
Join Date:Joined: Aug 2010
Donate to Me
More
It works directly for me.

Right click the file, Send to - > Bluetooth Devices.

Select my Phone and press Send.
13th November 2010, 08:45 PM   |  #10  
peachpuff's Avatar
Senior Member
Thanks Meter: 345
 
1,523 posts
Join Date:Joined: Aug 2010
Very cool tip, made a couple different cmd shortcuts to copy to different part of the sdcard(roms/apps/misc).

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes