Windows 10 Setup to Access Android ConnectedSMB Servers

Introduction

Windows computers require some configuration before you are able to access files stored on an Android device and running the ConnectedSMB app. This configuration will create a network presence for your Android device within your Windows computer. You will need to create one of these presences for each Android device you will access. For the sake of this discussion, this presence will be called a “proxy”.

Our investigation of this procedure was helped by a Web Posting we discovered that is used to mounting a directory over SSH. We’ve modified this procedure for the configuring Windows 10 to interoperate with our ConnectedSMB for Android product but we’ve provided the link for your reference.

Define the Configuration

The first step is to define the configuration.

Select a Proxy Network

A proxy network is a virtual network that does not exist outside of the Windows PC. A network is defined by an IP address and a network mask. So, we want to select an IP address and network mask for our proxy network.

The easiest way to do that is to simply accept the address and mask we recommend. Although we can guarantee our address and mask will not conflict with addresses outside your home or business, we cannot guarantee that it won’t conflict with your other home or business networks. So it is possible you will need to come up with an alternative address.

Default Proxy Network Address and Mask

By default, the proxy network allows up to 254 Android devices and is defined with a network address of 192.168.150.0 and a mask of 255.255.255.0. This is not typically an address that is used by home routers.

Alternative Proxy Network Address and Masks

The address and mask we choose is somewhat arbitrary but we want it to be unique from your view of the internet. The internet is designed using the concept of a private and public address space. You are assured that no address in the private space exists on the internet. So if we need to select an alternate proxy network, we should limit our candidates to those in this private addess range.

The private IPv4 address space is documented here

You can see from the table in the above link, that there are actually three address regions that differ by their network masks. This difference allows the definition of networks that vary in the number of devices that can coexist on them. So the first question we need to answer is how many Android devices do we want to exist on this proxy network. An address in the Class C range will support up to 254 devices. A Class B address will support up to 65 thousand devices and a Class C address will support more than 16 million devices. Choose the class that’s right for you. Our default is a Class C address so if you follow our defaults, the configuration will support up to 254 devices.

Any address you choose is valid. If you find that after configuring an address, you can no longer access a computer within your home or business, double check that that computer’s IP address subnet does not conflict with the one you chose.

Assinging IDs to Each Device

IDs are assigned starting at 1 and increasing for the number of devices supported by the network address and mask you chose in the previous step. IDs for devices in the default network and all Class C networks are in the range 1 to 254. So, assign 1 to the first device, 2 to the second and so on until all devices have an ID.

Create Proxy IP Address

The devices proxy IP address is simply a combination of the proxy network address and the device id. Simply replace the 0 numbers in the network address with the device id. For Class B networks, the device id portion of the IP address will be in the range 0.1 to 255.254. For Class A networks, the device id portion will be between 0.0.1 to 255.255.254.

Finding the Device’s IP Address

The help document for using Connected SMB describes the “Settings” dialog box. You should follow that document and walkthrough for enabling the server on the Android device. You should also note the IP address assigned to the phone and is available as an informational field in the Settings Dialog box.

To see the Android device’s IP address, from within the ConnectedSMB application on the Android device select the “menu” icon in the top right of the Connected SMB Storage Provider window (the icon with three vertical dots). Click on the menu items for “Settings”.

There will be two informational fields and five configurable fields shown. The two information fields will be the device name and its IP address. Note the IP address. You will add it to the proxy configuration table later on.

Proxy Configuration Table

To help you manage the proxy network configuration, we present the following table template:

Network Address: ___.___.___.___   
Network Mask:    ___.___.___.___   
Device ID Proxy IP Address Device IP Address Name
(1 .. max) xxx.xxx.xxx.xxx xxx.xxx.xxx.xxxx friendly_name

For example, the proxy configuration table for a network with 3 devices using the default proxy network address and mask would be:

Network Address: 192.168.150.0   
Network Mask:    255.255.255.0   
Device ID Proxy IP Address Device IP Address Name
(1 .. max) xxx.xxx.xxx.xxx xxx.xxx.xxx.xxxx friendly_name
1 192.168.150.1 192.168.1.110 dads
2 192.168.150.2 192.168.1.65 moms
3 192.168.150.3 192.168.1.98 sons
4 192.168.150.4 192.168.1.103 daughters

You will use this proxy network table in the following section.

Modifying Windows File Service Startup

A minor change needs to be made to the startup sequencing of windows services so that we can create interfaces for the proxy network that do not get bound to the Windows file sharing service.

Click inside the search box on the taskbar and type “services”. The Services utility (Services) should be highlighted in the results. Run the command by clicking on the highlighted result. The search results and Services command will appear as in the following screenshot

Run Services
Run Services

This will bring up the Services configuration utility with a list of services and descriptions in main window pane. Scroll down the list of services until you see “Server”. Right click on the “Server” service and select “Properties”

Server Service
Server Service

This will bring up the “Server Properties” screen. Select the pulldown for Startup Type and select “Automatic (Delayed Start)”

Server Properties
Server Properties

Then click “OK”

You can now close the “Services” window.

Adding Virtual Network Interfaces

Each device you have defined in the proxy configuration table needs to have a virtual network interface (VNI) configured in your Windows PC.
Microsoft Windows uses the term “Looback Driver” as the equivalent of a VNI. We will configure a VNI for each device and it will be defined using the IP address and mask in the proxy table. There are a few steps for adding a VNI: 1) adding a VNI device, 2) Naming the Android Device 3) Configuring the VNI’s IP address, mask and other interface details, and 4) Associating the Device with the VNI, Run these steps for each Android device you wish to add.

Adding a VNI device

You will add a VNI device using the Windows Add Hardware Wizard.

Click inside the search box on the taskbar and type “hdwwiz”. The Add Hardware Wizard utility (hdwwiz) should be highlighted in the results. Run the command by clicking on the highlighted result. The search results and hdwwiz command will appear as in the following screenshot

Run Add Hardware Wizard
Run Add Hardware Wizard

Windows will present you with a popup that asks if you wish to allow this app to make changes to your device. Select “Yes”

You will then be brought to a screen that welcomes you to the Add Hardware Wizard.

Welcome to the Add Hardware Wizard
Welcome to the Add Hardware Wizard

Click “Next >”

You will be presented with two options, to search for and install hardware automatically, or to install hardware that you manually select. Clock on “Install the hardware that I manually select from a list” and click “Next >”.

Install Hardware Manually Selected
Install Hardware Manually Selected

You will then be asked to select the type of hardware you are installing. Scroll the list of “Common hardware types” until you see “Network adapters”. Select “Network adapters” and click “Next >”.

Install Network Adapters
Install Network Adapters

You will then be asked to select the device driver you want to install. Two lists wlil be presented, one containing manufacturers and one containing models. Scroll and select “Microsoft” from the “Manufacturer” List and “Microsoft KM-TEST Loopback Adapter” from the “Model” List and clock “Next >”.

Install Loopback Adapter
Install Loopback Adapter

The wizard will then be ready to install the Microsoft KM-TEST Loopback Adapter. It will ask you to confirm the installation. Click “Next >”

Start Installing Loopback Adapter
Start Installing Loopback Adapter

Once the adapter driver has been installed, you will see the “Completing the Add Hardware Wizard” noting that the “Microsoft KM-TEST Loopback Adapter has been installed”. Click “Finish”

Finish Add Hardware Wizard
Finish Add Hardware Wizard

You will now have a new Virtual Network Interface added to your system.

Configuring the Virtual Network Interface

The next step is to configure the newly added VNI.

Clock on the Windows icon in the lower left of your screen and click the settings icon. Then click on “Network & Internet”. Then select “Change adapter options” as shown in the following screenshot.

Change Adapter Options
Change Adapter Options

This will bring up a file explorer window showing you all the network adapters on your system. The contents of your window will likely contain different adapters than shown in the screenshot since computers can have a variety of adapters, but if you look at the type of adapters, you will see one or more “Microsoft KM-TEST Loopback Adapter” interfaces.

See the following screenshot:

Network Connections
Network Connections

There will be a “Microsoft KM-TEST Loopback Adapter” for each Virtual Network Interface you have added. In the screenshot, you can see that I had just added a loopback adapter for the third Virtual Network Interface on my system. Assuming this is the first VNI you are configuring, you will only see one.

Click on the loopback adapter you wish to configure and then select “Rename this connection” so we can give it a name will will recognize. I recommend giving it names associated with the names you have selected in the proxy configuration table we created earlier.

Rename Adapter
Rename Adapter

Now, right click on the adapter and select “Properties” to bring up the Adapter properties screens.

Network Menu
Network Menu

You will see a window that looks as follows and includes a list of items that the connection uses and checkboxes either checked or not to the left of each item. Deselect all items except for the “Internet Protocol Version 4 (TCP/IPv4)” item. Be sure to scroll the list down so you can deselect any items which may only be visible after scrolling. Then select the “Internet Protocol Version 4 (TCP/IPv4)” Item and click “Properties”.

Network Properties
Network Properties

This will bring up the “Internet Protocol Version 4 (TCP/IPv4) Properties” window. Select “Use the following IP address” and enter the IP address and Subnet mask with those in the proxy configuration table for the Android device we are configuring. Each Android device will share the same Subnet mask but will have a unique IP address. Then click “Advanced…”

IPv4 Properties
IPv4 Properties

This will bring up the Advanced TCP/IP Settings window with three tabs: “IP Settings”, “DNS”, and “WINS”. The “IP Settings” tab will be visible

Uncheck the “Automatic metric” checkbox and enter 9999 in the Interface metric. Then select the “WINS” tab.

Advanced TCP/IP Settings
Advanced TCP/IP Settings

On the WINS tab, within the “NetBIOS setting” section, select “Disable NetBIOS over TCP/IP” and click “OK”

WINS Settings
WINS Settings

Then click “OK” out of the “Internet Protocoll Version 4 (TCP/IPv4) Properties” window.

Then click “Close” on the Adapter Properties window.

Now the Virtual Network Interface is configured.

You can also close the Adapter Explorer window and the Network Settings window.

Associating the VNI with the Android Device

So far we’ve created a virtual network interface for the device but we still need to assicate that VNI with the actual Android device that we want it to communicate with. To do this, you need to run an administrative command shell and run a command.

To run the administrative command shell, click inside the search box on the taskbar and type “cmd”. The Command Prompt application should be highlighted in the results. Run the command by right clicking on the highlighted result and selecting “Run as administrator”. The search results and Command Prompt will appear as in the following screenshot

Run Command Prompt
Run Command Prompt

This will bring up a security window asking if you want to allow this app to make changes to your device. Select “Yes”.

This will bring up Windows Command Shell.

You will be entering a netsh command using the Android devices proxy IP address and Device IP address as follows:

netsh interface portproxy add v4tov4 
      listenaddress=<proxy ip address> listenport=445 
      connectaddress=<device ip address> connectport=4445

Where proxy IP and device ip are from the proxy configuration table we created above.

See the following screenshot for an example:

netsh Command
netsh Command

Naming the Android Device within Windows

If you wish to identify the device with its IP address only within Windows File Explorer and application file selection dialogs, you do not need to name the device but we recommend giving it a name that you will easily be able to remember when looking for access files on that device.

To do this, you can reuse the command window you may still have open from the previous step, or you can reopen a command window in the same way described above. Once open, you can type the following command:

notepad drivers\etc\hosts

This will bring up the notepad application and load in the hosts text file. Add the Android device’s IP address and the friendly name you have selected from the proxy configuration table.

Our sample configuration is shown in the following screenshot

Notepad of hosts File
Notepad of hosts File

Save this file by clicking on the Menu Bar “File | Save”

Then exit Notepad.

And you can now exit the administrative command prompt.

Restart Your Computer

Once you have added and configured all Virtual Network Interfaces, you must restart for your changes to take affect. When the system comes back up, you will be able to access your ConnectedSMB Android devices.

Using File Explorer to Access your Device.

There are many ways you can access remote files within Windows. The most visible way is through the File Explorer. This assumes you have exported directories on your Android device that you wish to share with remote users. See the help document for how to export directories and name those exports in ConnectedSMB for Android. We have previously exported a directory that we’ve exported as “Pictures” and will use this in our example.

Click on the “File Explorer” Icon in the run bar of you Windows desktop or run it from the start menu. You can see the “Quick access” pulldown. Type a path to the Android device’s Pictures export using the following syntax:

\\<android device name>\<export name>

For example:

\\sons\Pictures

This would look like the following screenshot:

File Explorer
File Explorer

A Windows Security popup will appear for you to enter your username and password. Use the username and password you have configured in the settings of the ConnectedSMB Android application for that device.

Credentials
Credentials

An explorer window showing the content of your Android device’s exported directory will now be populated and visible.

Pictures Export
Pictures Export

As a note of caution, loading thumbnails of images stored remotely on an Android device may be time consuming and you may prefer to set the explorer view to something other than icons, but that depends on your usecase.

Enjoy your Connected SMB for Android Experience.

Nothing left to do now but enjoy your new experience.

Learning More

If you wish to learn more about the ConnectedSMB application, or contact developers, sales, or support, simply click on the menu pulldown in the top right of the ConnectedSMB for Android screen and select “About”