如何通过Wi-Fi访问SD卡上的文件?

发布于 2024-12-26 20:54:57 字数 240 浏览 4 评论 0原文

众所周知,当Android通过USB线连接到PC时,SD卡被配置为大容量存储设备,并映射到一个驱动器号。因此,PC程序可以使用驱动器盘符来访问SD卡上的文件。现在我想不再使用电缆,而使用 Wi-Fi。我的问题是:

当PC和Android通过Wi-Fi位于同一路由器/LAN上时,以编程方式,PC程序(用MFC编写)如何访问存储在SD卡中的文件?

我知道这个问题有点太宽泛,但此时,我所需要的只是指向我需要开始寻找的一些技术。非常感谢。

As we know, when Android is connected to a PC through USB cable, the SD card is configured as a mass storage device, and mapped to a drive letter. Thus, a PC program can use the drive letter to access files on the SD card. Now I want to eliminate the use of the cable, and use Wi-Fi instead. My question is:

When a PC and and an Android are on the same router/LAN through Wi-Fi, programmatically, how can a PC program (written in MFC) access the files stored in the SD card?

I know this question is a little too broad, but at this point, all I need is a pointer to a few technologies I need to start looking. Thank you very much.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

煞人兵器 2025-01-02 20:54:57

Wwyt,

没有办法强制 Android 设备从 PC 端泄露其数据。设备上至少需要一个小型 Android 应用程序。它是故意以这种方式实现的。请注意,Android 应用程序不必很复杂,只需响应 Wifi 连接事件并设置适当的环境即可。然后,PC应用程序可以运行获得连接所需的内容。

有多种应用程序在某种程度上利用了这种配对。例如,EZTether 通过代理服务器利用“交换文件”将 Web 连接分发到 PC 端。据我所知,这样的配对仍然需要完整的配对。

本质上,问题是这样的:如果没有本地对应设备的干预,Android 设备就无法被告知要做什么。本地对应方可以是用户或应用程序。如果它是用户,那么必须有一个接口可以让他们给出正确的答案。如果它是一个应用程序,则必须由用户或通过响应事件(系统或其他)来告诉它运行。换句话说,在不破解设备的情况下,无法远程强制解决此问题。

希望这有帮助,

模糊逻辑

Wwyt,

There is no way to force the Android Device to give away its data from the PC side. It would require at the very least a small Android Application on the device. It was implemented this way on purpose. Mind you the Android Application need not be complex, merely respond to the Wifi connected event and set up the appropriate environment. The PC Application may then run what it needs to get its connection.

There are several applications which utilize this pairing to some degree. EZTether, for instance, utilizes a "swap file" via proxy server to distribute a web connection to the PC side. Such a pairing still requires the full pair, to my knowledge.

In essence, the issue is this: An Android Device cannot be told what to do without intervention by some local counterpart. The local counterpart may be a User or an Application. If its a User, then there must be a Interface by which they can give the correct answer. If it is an application, it must be told to run by either a User or by responding to an event, (system or otherwise). In other words, without cracking the device, one cannot force this issue remotely.

Hope this helps,

FuzzicalLogic

驱逐舰岛风号 2025-01-02 20:54:57

例如,您可以实现一个在手机上运行的 Web 服务器或 ftp 服务器,用于提供文件服务。

You could e.g. implement a web server or ftp server running on the handset, that is serving the files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文