AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

SMB not finding Servers automatically

Open d-e-n-n-i-s-t opened this issue 3 years ago • 3 comments

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.

d-e-n-n-i-s-t avatar Jul 03 '22 23:07 d-e-n-n-i-s-t

Never worked for me.

NanyangTaiji avatar Jul 05 '22 01:07 NanyangTaiji

@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 avatar Jul 05 '22 02:07 TranceLove

@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();       

                                }
                                

                            }
                                                    
	})

fiasko131 avatar Jul 14 '22 17:07 fiasko131