SMB not finding Servers automatically
Hey! I want to report a bug. I host a SMB file server on my own network and when searching/accessing it with another Windows machine, everything works great. It gets detected automatically in the "Network"-Section in file explorer. However, when I try to find it using the "+"-Button on the lower right, selecting "Cloud Connection" and then "SMB Connection", it didn't show up after letting the app search for 3 minutes. I am on Android 12L (LineageOS 19.1) and use the latest version of Amaze File Explorer provided by the Google Play Store.
Never worked for me.
@NanyangTaiji Possible duplicate of #2622
I share the pain with you, but never been able to get a good solution for SMBv2 server discovery. I too need someone to shed some light on how SMBv2 is doing, so we can fix this long overdue problem.
@TranceLove For that you can use this: https://github.com/stealthcopter/AndroidNetworkTools
ArrayList<Integer> ports = new ArrayList<>();
ports.add(445);
ports.add(443);
SubnetDevices.fromLocalAddress().findDevices(new SubnetDevices.OnSubnetDeviceFound() {
@Override
public void onDeviceFound(Device device) {
// Stub: Found subnet device
}
@Override
public void onFinished(ArrayList<Device> devicesFound) {
// your logic here for example:
for (Device device : devicesFound){
ArrayList<Integer> openPorts = PortScan.onAddress(device.ip).setMethodTCP().setPorts(ports).doScan();
}
}
})