pc与android通过usb socket实现手机通信Demo

上传者: lixiaodaoaaa | 上传时间: 2020-01-03 11:25:24 | 文件大小: 2.05MB | 文件类型: rar
a.PC客户端与Android服务端的Socket同步通信(USB) b.操作步骤如下: ----------------------------------------------------------- 1.请将测试数据文件夹中的ucliulanqi.apk copy到c:\下进行测试 2. 将android代码导入到Eclipse中进行调试,或者直接运行里面的apk文件即可。 3.将pc端程序也导入到Eclipse中 运行main函数,执行=====》 输入4 。将复制pc电脑中的 c:\ucliulanqi.apk 到 android手机中的/mnt/sdcard/目录下 4.复制完毕后,请你查看 /mnt/sdcard/下查看 这个ucliulanqi.apk文件。 5.想复制其他文件,请在源码中进行文件夹名字的改动以及在apk中冶要进行调试。 6.综合这两个程序,我总结一下,很扯淡。。还不如用adb push c:\liulanqi.apk /mnt/sdcard/下更方便

文件下载

资源详情

[{"title":"( 65 个子文件 2.05MB ) pc与android通过usb socket实现手机通信Demo","children":[{"title":"pc与android手机通信Demo","children":[{"title":"pc端运行程序","children":[{"title":"ConnectToAndroid","children":[{"title":"src","children":[{"title":"com","children":[{"title":"geo","children":[{"title":"util","children":[{"title":"MyUtil.java <span style='color:#111;'> 566B </span>","children":null,"spread":false},{"title":"FileHelper.java <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"testPcClient.java <span style='color:#111;'> 5.31KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"com","children":[{"title":"geo","children":[{"title":"util","children":[{"title":"FileHelper.class <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"MyUtil.class <span style='color:#111;'> 624B </span>","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"testPcClient.class <span style='color:#111;'> 5.49KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 301B </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 598B </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 392B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"测试数据","children":[{"title":"ucliulanqi.apk <span style='color:#111;'> 1.19MB </span>","children":null,"spread":false}],"spread":true},{"title":"使用_说明.htm <span style='color:#111;'> 4.38KB </span>","children":null,"spread":false},{"title":"android运行源码apk","children":[{"title":"com.chenhl.testusbconnect.UsbConnect.apk <span style='color:#111;'> 178.52KB </span>","children":null,"spread":false},{"title":"testUsbConnect","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"layout","children":[{"title":"main.xml <span style='color:#111;'> 501B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-ldpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"menu","children":[{"title":"main.xml <span style='color:#111;'> 249B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.97KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 323B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 8.02KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 13.25KB </span>","children":null,"spread":false}],"spread":false},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 380B </span>","children":null,"spread":false}],"spread":false},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 221B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 679B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"chenhl","children":[{"title":"testusbconnect","children":[{"title":"domain","children":[{"title":"FileInfo.java <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true},{"title":"ThreadReadWriterIOSocket.java <span style='color:#111;'> 4.94KB </span>","children":null,"spread":false},{"title":"androidService.java <span style='color:#111;'> 3.28KB </span>","children":null,"spread":false},{"title":"ServiceBroadcastReceiver.java <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"MyUtil.java <span style='color:#111;'> 583B </span>","children":null,"spread":false},{"title":"FileHelper.java <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false}],"spread":false},{"title":"UsbConnect.java <span style='color:#111;'> 393B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"chenhl","children":[{"title":"testusbconnect","children":[{"title":"ThreadReadWriterIOSocket.class <span style='color:#111;'> 5.15KB </span>","children":null,"spread":false},{"title":"androidService$1.class <span style='color:#111;'> 706B </span>","children":null,"spread":false},{"title":"domain","children":[{"title":"FileInfo.class <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false}],"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 359B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 688B </span>","children":null,"spread":false},{"title":"androidService.class <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 415B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 361B </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"FileHelper.class <span style='color:#111;'> 2.39KB </span>","children":null,"spread":false},{"title":"MyUtil.class <span style='color:#111;'> 662B </span>","children":null,"spread":false}],"spread":false},{"title":"R$style.class <span style='color:#111;'> 452B </span>","children":null,"spread":false},{"title":"androidService$sysBroadcastReceiver.class <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"ServiceBroadcastReceiver.class <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 412B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 491B </span>","children":null,"spread":false},{"title":"R$menu.class <span style='color:#111;'> 409B </span>","children":null,"spread":false},{"title":"UsbConnect.class <span style='color:#111;'> 525B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 428B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"drawable-ldpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.22KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 6.15KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.85KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"com.chenhl.testusbconnect.UsbConnect.apk <span style='color:#111;'> 178.52KB </span>","children":null,"spread":false},{"title":"jarlist.cache <span style='color:#111;'> 119B </span>","children":null,"spread":false},{"title":"classes.dex <span style='color:#111;'> 361.94KB </span>","children":null,"spread":false},{"title":"resources.ap_ <span style='color:#111;'> 25.60KB </span>","children":null,"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 364B </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 376.65KB </span>","children":null,"spread":false}],"spread":false},{"title":".project <span style='color:#111;'> 817B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"chenhl","children":[{"title":"testusbconnect","children":[{"title":"R.java <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"BuildConfig.java <span style='color:#111;'> 167B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"readme.txt <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • drift_away :
    感谢分享!
    2020-01-14
  • weixin_39508885 :
    有用,解决了我的大问题
    2019-08-09
  • i135797135 :
    学习了哦,谢谢楼主
    2019-03-13
  • hupei :
    还没有尝试,不过应该蛮不错
    2018-11-21
  • twilightnewmoon86 :
    实用的资源,谢谢分享,学习了
    2018-08-08

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明