vinint / MoKee-WarpShare

移植魔趣的“跃传”,支持Android向Mac传输数据
114 stars 62 forks source link

Found few issues #3

Open Bhavinjain260 opened 2 years ago

Bhavinjain260 commented 2 years ago

hi i have devices 1 oneplus 6 running android 11 2 oneplus 3 running android 9 3 hackintosh running big sur 11.6 using opencore

im able to send files to my hackintosh from both my devices

issue 1 i turned on discoverable in openplus 3 and 6 and im not able to see both of my devices in airdrop finder window

issue 2 oneplus 6 is discoverable in oneplus 3 when i try to send any files to oneplus 6 i get a notification to accept the request as soon as the file starts transfering app on oneplus 6 crashs

vinint commented 2 years ago

issue 1 Apple using awdl to find device. So Android can find Mac,otherwise not work

issue 2 I need log

Bhavinjain260 commented 2 years ago

And one more issue im able to see my windows laptop and able to send files too But my both devices are not discoverable in windows laptop

Bhavinjain260 commented 2 years ago

How do i collect logs ??

Goshin commented 2 years ago

Issue 1: You can force AirDrop to discover devices over all the interfaces.

In the terminal:

$ defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
$ defaults write com.apple.NetworkBrowser DisableAWDL 1
$ killall sharingd

Issue 2:

I found out it is a bug in ReceiverService.java, the authority string does not match up with that declared in the manifest. The simple patch here should fix this.

@@ -466,7 +457,7 @@ public class ReceiverService extends Service implements AirDropManager.ReceiverL
     private Uri getUriForReceivedFile(String fileName) {
         final File downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
         final File file = new File(downloadDir, fileName);
-        return getUriForFile(this, "org.mokee.warpshare.files", file);
+        return getUriForFile(this, BuildConfig.APPLICATION_ID + ".FileProvider", file);
     }
Bhavinjain260 commented 2 years ago

Issue 1: You can force AirDrop to discover devices over all the interfaces.

In the terminal:

$ defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
$ defaults write com.apple.NetworkBrowser DisableAWDL 1
$ killall sharingd

what are the default values for com.apple.NetworkBrowser BrowseAllInterfaces and com.apple.NetworkBrowser DisableAWDL

are the default 0's for both?

Goshin commented 2 years ago

Yes, you can also delete the settings to reset the behaviors.

defaults delete com.apple.NetworkBrowser
Bhavinjain260 commented 2 years ago

@Goshin where is the NetworkBrowser plist is store in macOS?

vipenl26 commented 1 year ago

Issue 1: You can force AirDrop to discover devices over all the interfaces. In the terminal:

$ defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
$ defaults write com.apple.NetworkBrowser DisableAWDL 1
$ killall sharingd

what are the default values for com.apple.NetworkBrowser BrowseAllInterfaces and com.apple.NetworkBrowser DisableAWDL

are the default 0's for both?

Issue 1: You can force AirDrop to discover devices over all the interfaces.

In the terminal:

$ defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
$ defaults write com.apple.NetworkBrowser DisableAWDL 1
$ killall sharingd

Issue 2:

I found out it is a bug in ReceiverService.java, the authority string does not match up with that declared in the manifest. The simple patch here should fix this.

@@ -466,7 +457,7 @@ public class ReceiverService extends Service implements AirDropManager.ReceiverL
     private Uri getUriForReceivedFile(String fileName) {
         final File downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
         final File file = new File(downloadDir, fileName);
-        return getUriForFile(this, "org.mokee.warpshare.files", file);
+        return getUriForFile(this, BuildConfig.APPLICATION_ID + ".FileProvider", file);
     }

Thanks a lot, it works.

vipenl26 commented 1 year ago

It works for mac, it doesn't work for iphone