Giter Site home page Giter Site logo

spieglt / flyingcarpet Goto Github PK

View Code? Open in Web Editor NEW
3.1K 41.0 125.0 62.15 MB

Cross-platform AirDrop. File transfer between Android, iOS, Linux, macOS, and Windows over ad hoc WiFi. No network infrastructure required, just two devices with WiFi chips in close range.

License: GNU General Public License v3.0

Rust 38.58% JavaScript 26.77% HTML 2.81% CSS 0.15% Objective-C 0.65% Kotlin 31.05%
file-transfer wireless cross-platform ios linux macos windows android rust tauri

flyingcarpet's People

Contributors

dependabot[bot] avatar spieglt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flyingcarpet's Issues

no module downloaded

Please restart transfer. Failed to scan QR code: com.google.mlkit.common.MlKitException: Waiting for the Barcode UI module to be downloaded.

Better GUI

I also used to use the recipe/qt.
Now am using flutter desktop for golang.
Same code works on all desktops and mobiles.

You can embed golang inside the flutter GUI on desktop and mobile also.
It's very natural to use also.

Desktop
https://github.com/Drakirus/go-flutter-desktop-embedder

Mobile
https://github.com/empirefox/flutter_dial_go

Also I saw a golang QR sample that used an animated QR to stream the data through the photons essentially. The data rate was obviously slowish. Did you see it on Reddit maybe ?

Ubuntu 20.04 ?

Hello,

On Ubuntu 20.04 , launching the last appimage

image

Is there a way to fix that ?

Thank you for your work !

memory allocation failed

First of all, Thanks for making this amazing app, I absolutely love it!

The problem occurred when I try to transfer from Android 13 to Ubuntu 22.04 LTS, a 818 MB .mp4 video file, the Linux app crashed after the Android had connected to the hotspot:

$ flying-carpet                                 
memory allocation of 3511553999805349888 bytes failed
[1]    30333 IOT instruction  flying-carpet

Version information:

  • Android: v7.1 from Google Play
  • Linux: v7.1 AppImage version

In fact, the .deb version of Linux client also suffered from the same issue.

Also, I tried a 9.8MB .jpg file, which is smaller, and it succeeded.

PS: I also met the same problem as in #51. Although I'm a Windows user most of the time, it would be great if FlyingCarpet can also work flawlessly under Linux (like it does under Windows)

CLI version?

This would be quite useful for my daily workflows if I was able to get a CLI version of this working.

Imagine something like

$ flyingcarpet transfer /tmp/download.tar.gz [-password 1234 -timeout 10m]

And on the other end:

$ flyingcarpet receive /tmp/copy.tar.gz -password 1234 [-timeout 10m]

Once the transfer is done, the sender cleans up and reverts just like it already does (the rx does the same as well).

What do you think?

Questions on releases and permissions

I've just checked the releases here, and was a little confused: they all have multiple/different APK files attached. So e.g. v7.1 has APKs for 7.0.2, 7.1.0 and 7.2.0 – and v8.0.1 two different APKs for 8.0.0. Shouldn't the APK versions match the tags? Currently, I've had to disable my updater which always thought there'd be a new version available (have: 8.0.0, found: 8.0.1 => downlaod => oh, it's 8.0.0 still => delete).

Also at v8.0.1: Will future releases have these very same 2 build variants with matching file names? With their sizes quite apart, what speaks against taking the smaller one (which also supports more Android versions it seems), or what makes the bigger one preferable?

Next, running my scanner over the bigger one, and it reported:

Permissions:
------------
* android.permission.CHANGE_WIFI_STATE
* android.permission.NEARBY_WIFI_DEVICES
* android.permission.ACCESS_FINE_LOCATION
* android.permission.ACCESS_COARSE_LOCATION
* android.permission.CHANGE_NETWORK_STATE
* android.permission.INTERNET
* android.permission.ACCESS_NETWORK_STATE
* dev.spiegl.flyingcarpet.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
* android.permission.CAMERA

SigningBlock blobs:
-------------------
0x504b4453 (DEPENDENCY_INFO_BLOCK; GOOGLE)

Permissions it highlighted (as they are defined to be sensitive) are NEARBY_WIFI_DEVICES (which is clear for the purpose of the app), ACCESS_*_LOCATION (which is not entirely clear to me as the app requires at minimum Android 11 – I know one of those is needed with lower Android versions if you request Bluetooth, but what is the connection here?) – and then especially CAMERA. Checking the code I see qrcode.js, so I assume there's a QR code scanner integrated?

Last concern is the DEPENDENCY_INFO_BLOCK. What are you using to sign your APKs? Background: that block is an opaque blob, supposed to just hold a copy of your dependency tree in binary form. But as it's encrypted using a public key owned by Google, nobody can check if it's really that and only that. As it's needed by Google only and of no use outside the PlayStore (remember, nobody but Google can read it), it would preferable to not have it in the APK.

Thanks in advance for clarification!

ios software

Why should the version of ios be higher than ios15.5 to be used, and can't be used below this version

Android app crash when select folder or files

When I tapp the "Select Files/Folder" button, whole app crash and quit.
My system is MUI12.5 with Android 11.
Process: dev.spiegl.flyingcarpet, PID: 26132 android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT typ=*/* (has extras) } at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2081) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1737) at android.app.Activity.startActivityForResult(Activity.java:5493) at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:728) at androidx.core.app.ActivityCompat$Api16Impl.startActivityForResult(ActivityCompat.java:860) at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:249) at androidx.activity.ComponentActivity$2.onLaunch(ComponentActivity.java:243) at androidx.activity.result.ActivityResultRegistry$2.launch(ActivityResultRegistry.java:175) at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.java:47) at dev.spiegl.flyingcarpet.MainActivity.onCreate$lambda$12(MainActivity.kt:348) at dev.spiegl.flyingcarpet.MainActivity.$r8$lambda$x6FHI-1BRbvHz4EHXwmTUWs5OvA(Unknown Source:0) at dev.spiegl.flyingcarpet.MainActivity$$ExternalSyntheticLambda13.onClick(Unknown Source:2) at android.view.View.performClick(View.java:7515) at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1202) at android.view.View.performClickInternal(View.java:7492) at android.view.View.access$3600(View.java:847) at android.view.View$PerformClick.run(View.java:28742) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:8171) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

Doesn't work on the M1

$ ./flyingcarpet_cli_mac_apple_silicon_arm64 -peer mac -receive .
Welcome to Flying Carpet!

Starting Transfer
=============================
Transfer password: EojJKY
Please use this password on sending end when prompted to start transfer.
=============================

2022-03-25 18:03:55.335 flyingcarpet_cli_mac_apple_silicon_arm64[14946:333559] startAdHoc error: Error Domain=com.apple.coreWLAN.error Code=-3930 "(null)"
Failed to start ad hoc network
Aborting transfer.

Password and encryption

Will make longer random/custom password as an option? Like 16-digit or more.
And I wonder know what encryption method it uses.

Windows wrapper not working

I need to find another way to bundle as single executable. For now, extract Flying Carpet (Windows).zip and run the flyingcarpet.exe inside.

Does not cleanup after itself (Debian Linux)

I uninstalled it a while back, but it left network connections files, *.nmconnect (/etc/NetworkManager/system-connections/). Can be exceedingly problematic. It needs to properly cleanup after itself properly. I suggest it provide a removal trigger for uninstallation. (For portability re AppImage, perhaps a built-in removal/cleanup parameter, say "--purge" or whatever, as most users simply delete AppImages. Make sure to document this on the first run.)

No wireless interface found - Ubuntu 22.04

Hello,

it seems FC uses always the first interface after the lo (loopback) so it never find the WLAN interface when it is a USB WIFI key ..

Is there a way to tell FC what interface to use ?

Thanks for help

Eric Collart

panic: interface conversion

[user@linux user]$ git clone https://github.com/spieglt/FlyingCarpet.git
[user@linux user]$ cd FlyingCarpet/gui/flyingcarpet
[user@linux flyingcarpet]$ go build
[user@linux flyingcarpet]$ ./flyingcarpet
looking for qtbox in: /home/user/FlyingCarpet/gui/flyingcarpet/qtbox
final qtbox location: /home/user/FlyingCarpet/gui/flyingcarpet/qtbox
panic: interface conversion: interface {} is []*widgets.QAction, not []interface {}

goroutine 1 [running, locked to thread]:
github.com/therecipe/qt/internal.convertToJson(0x11fd4c0, 0xc00000e6d8, 0x122e580, 0x178b530)
	/home/user/go/pkg/mod/github.com/therecipe/[email protected]/internal/internal.go:176 +0x96c
github.com/therecipe/qt/internal.convertListToJson(0xc000076190, 0x5, 0x5, 0x18, 0x125d820, 0x0)
	/home/user/go/pkg/mod/github.com/therecipe/[email protected]/internal/internal.go:149 +0x65
github.com/therecipe/qt/internal.convertToJson(0x11ff100, 0xc00000e6f0, 0x5, 0xc00000e6f0)
	/home/user/go/pkg/mod/github.com/therecipe/[email protected]/internal/internal.go:176 +0x705
github.com/therecipe/qt/internal.CallLocalFunction(0xc000076190, 0x5, 0x5, 0xc00000e6d8, 0x410518)
	/home/user/go/pkg/mod/github.com/therecipe/[email protected]/internal/internal.go:217 +0x66
github.com/therecipe/qt/widgets.(*QWidget).AddActions(0xc000150000, 0xc0000101c0, 0x1, 0x1)
	/home/user/go/pkg/mod/github.com/therecipe/[email protected]/widgets/widgets.go:58433 +0x168
main.newWindow(0xc00012c150, 0xc00012c150)
	/home/user/FlyingCarpet/gui/flyingcarpet/gui.go:87 +0x4e5
main.main()
	/home/user/FlyingCarpet/gui/flyingcarpet/main.go:12 +0x6c

Unable to obtain IP error

Capture

When I am trying to send a file from a Windows 10 to Windows 7 system, its showing that unable to obtain IP address in the sending machine. Another issue is that its not always showing showing updated network SSID.

Improvements

Couple of improvements I would like to suggest to the app.

  1. I would appreciate a way to clear the history of earlier transfer logs. For example, in Win 11 PC, closing the app and reopening it shows the prior logs. I'm unsure if this happens only when the prior file transfers were not complete. If that's the case, then I'm good.
  2. It would be helpful if the latest transfer logs were shown at the top instead of the bottom after multiple file transfers, as this would require a lot of scrolling down.
  3. Request the Android user to disconnect the device from the local VPN on the Android device to complete the file transfer. When Adguard was turned on, the file transfer did not initiate when transferring through the hotspot. I had to trial and error to understand why files weren't transferring, and when I finally found out, the local VPN being turned on was the issue.
  4. It would be beneficial to have an option to "open folder" on the receiving device after the file transfer is done.
  5. When in receive mode, the button in Android shows "Select folder" where the user needs to select the master folder where the files need to go. It should instead be "Choose destination folder," where the user would want to store the files. (I was confused why do I need to select folder when I'm receiving it)
  6. It would be convenient to allow an option for the user to choose a master folder (if required) in the settings menu to send files to, instead of requesting the user to do it every time during each folder transfer.

Incompatible Android Devices

Neither via the Play Store nor via directly downloading the apk an installation is possible.

Google Play Store says the device is incompatibie. When trying to install the apk directly the package manager complains that there was an error parsing the file.

This affects at least my Xiaomi Mi A1 with Android 9 (Android One) and a Shiftphone SHIFT6mq with Android 10.

If there are good reasons that these devices are not supported, it would be good to know the requirements.

Necessary version of glibc not available

I downloaded the deb and installed it. When I run flying carpet I get the following error:

$ flying-carpet 
flying-carpet: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by flying-carpet)
flying-carpet: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by flying-carpet)
flying-carpet: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by flying-carpet)

I have 2.31 on Linux Mint 20.3
Is there an easy fix?

[Feature Request] Static network option

I noitced for mac and android transfers due to limitations, you have to enter a ssid and password (which can be a bit long).

I was wondering if it would be possible for to set a static network (ssid and password don't change) for specific peers (say mac).

Transfers fail from Linux to Android

Sender: Dell Latitude running Debian 12 with FC installed via .deb.
Receiver: Samsung Galaxy A03 running Android 13 with FC installed via Google Play.
On the sender I open FC, select "Send", "Android", and the file I want to transfer. On the receiver I open FC, select "Receive", "Linux", and the destination folder. The receiver turns on its camera, and I click "Start Transfer" on the sender. Immediately the sender says:

Start the transfer on the other device and scan the QR code when prompted.
Starting hotspot flyingCarpet_934b
Error connecting to peer: Could not start hotspot: Error: Connection activation failed: No suitable device found for this connection (device eno1 not available because profile is not compatible with device (mismatching interface name)).

The sender displays a QR code only for a split second, but this is still long enough for the receiver to register it. The receiver says Searching for devices... and after a few seconds, No devices found. Make sure the device you want to connect to is turned on and ready to install.

Both devices are able to connect to my home wifi without issues. I've also tried transferring in the other direction, and that fails in a similar manner.

I'd appreciate any insight you might have on this. Thank you.

Dependency to libwebkitgtk3 cant be met in Arch based Manjaro

... as the title says, there appears to be no package that would supply me with the required package.
The error that occurs while starting up is:

./Flying Carpet: error while loading shared libraries: libwebkitgtk-3.0.so.0: cannot open shared object file: No such file or directory

But nevertheless, I think this is an awesome idea and would make a useful addition to any Computer/OS :)
Thanks for your work

Sending doesn't work in android

Hey man. Thanks for your awesome work.

Recently I installed the android version and got this error

Please restart transfer. Failed to scan QR code: com.google.mlkit.common.MlKitException: Waiting for the Barcode UI module to be downloaded.
Please restart transfer. Failed to scan QR code: com.google.mlkit.common.MlKitException: Waiting for the Barcode UI module to be downloaded.

My phone is a Samsung A33 android 13

Android with old tauri

Android and iOS platforms support in tauri is being developed in 2.0.0-alpha versions, but I've noticed, that you are using old Tauri 1.2 for your project, and I can't figure out, how you are doing it 😅

tauri = { version = "1.2", features = ["dialog-all", "os-all", "path-all", "window-all"] }

Could you explain, please? I am very interested in such case 😇
At least, how are you compiling it for Android?

ios <-> linux - no transfer

I've just installed v8.01 on fedora (i3) and an iphone.

Transfer in either direction seems to drop a few seconds after qr code scan on the iphone. "Cancel" button on the phone changes back to "Select Files", wifi switches back to my home network, and the last log line on the phone is "Peer IP: x.x.x.x".

This may not be related, but I also noticed, that "Select Folder" doesn't appear to be working: "Selected Folder:" remains empty and selecting folder again always defaults to some path (presumably app image path?) that looks like this: /tmp/.mount_linux_dQwUyI/usr.

Thank you for your help.

Linux support

FlyingCarpet is already an awesome project! Thank you!

I only miss Linux support... Is it planned?

macOS app has inaccurate version information

To accurately display version information, macOS apps need to have the CFBundleVersion and CFBundleShortVersionString tags in Info.plist.

In Flying Carpet’s case, the latter is set to a fixed 1.0.0 while the former is not present.

If they’re not set during the build process, they can be added after it’s done by directly editing the Info.plist:

# Change these values
app_path='/PATH/TO/APP/HERE'
app_version='VERSION NUMBER HERE'

# Keep these as they are
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string ${app_version}" "${app_path}/Contents/Info.plist" # Adds the missing value
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString string ${app_version}" "${app_path}/Contents/Info.plist" # Modifies the existing value

That would use the same version number for both fields. Technically they should be different, but that’s a secondary concern. An accurate version number is important for macOS to know which app to open in ambiguous situations; for users who expect the information available via the Finder; and for interoperability with other apps.

Cant open scanner

Please restart transfer. Failed to scan QR code: com.google.mlkit.common.MlKitException: Code scanner module is not supported on current Google Play Services version, please upgrade.

Its not working for me

I am getting an error when trying to send a file to a "laptop" (its called a GPD WIN) when running it under Windows 10 Home. Here's the log:

Entered password: FSPy
Error getting current SSID: exit status 1
Profile flyingCarpet_098b49 is added on interface Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter.
Looking for ad-hoc network flyingCarpet_098b49 for 60 seconds...
Error getting current SSID: exit status 1

How to build this project for Android?

Really interested in Tauri & this project.
I've tried this command:

cargo tauri build -t aarch64-linux-android 

But the openssl-sys dependency failed to build. What is the official build steps for the Android platform? Need some help plz :)

Great app! But 2 major problems!!

Thank you so much for developing this app for free. I really appreciate your effort and the value it brings. However, there are a couple of major issues that prevent me from being able to use the app effectively.

  1. Firstly, the app doesn't seem to respect folder structures. I have a large number of photos and videos organized in various folders on my iOS 17 device. However, when I copy these folders to my Windows 11 computer, all the files get accumulated into a single folder. This not only makes it difficult to navigate and find specific files, but it also loses all the categorization that I had meticulously set up. With nearly 2000 photos, this becomes quite a frustrating experience.

  2. Secondly, I've noticed that when my iPhone goes to sleep, the file transfer process stops. While this may not be a big issue on its own, the real problem arises when I unlock my iPhone and reconnect it to my Windows 11 computer. The app doesn't support resuming the file transfer from where it left off, which is quite disappointing. This means that I have to manually check which files were not copied, which can be quite time-consuming and inconvenient.

I hope you can understand my concern and consider addressing these issues in future updates. Once again, I want to express my gratitude for your hard work, and I look forward to seeing improvements in the app. Thank you!

A bug was found on the windows side

1、When you click to cancel the transfer, the software will freeze
2、In addition, apps under ipados will be incompatible, such as the camera is upside down
All in all a great product

Restore Licensing

Currently, the repository has no LICENSE file, which it had previously. One could assume that the code is still licensed under the previous BSD 3-Clause, as that was the last license text to exist in the repository. But legally, that wouldn't fly, so if possible, could we get a license in the repository again?

window 10 compile with gcc, missing core.cpp

cd E:\ghs\go\src\github.com\therecipe\qt\core
TERM='dumb' g++ -I "E:\ghs\go\src\github.com\therecipe\qt\core" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=c:\tmp\go-build451990318\b124=/tmp/go-build" -gno-record-gcc-switches -I "c:\tmp\go-build451990318\b124\" -g -O2 -o "c:\tmp\go-build451990318\b124\_x003.o" -c core.cpp

github.com/therecipe/qt/core

core.cpp:9:30: fatal error: QAbstractAnimation: No such file or directory
compilation terminated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.