Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't discover devices #94

Open
twoexem opened this issue Sep 6, 2022 · 9 comments
Open

Can't discover devices #94

twoexem opened this issue Sep 6, 2022 · 9 comments

Comments

@twoexem
Copy link

twoexem commented Sep 6, 2022

I can't seem to discover devices and neither can they. I have the TP-Link Archer T1U and owl starts running, but my PC doesn't get detected by an Apple device nor can it detect other AirDrop devices. Do I somehow have to connect it to a WiFi network or anything like that? I'm rather puzzled by this. If somebody needs more info I'll happily provide it, but I don't want to make this report unnecessary long.

@twoexem
Copy link
Author

twoexem commented Sep 6, 2022

Opendrop can discover itself, so if I run opendrop -i awdl0 find and run opendrop receive in another terminal, they get discovered. I just can't get an iPad and an iPhone to detect my laptop. Does anybody know a possible solution to my problem?

@bodaay
Copy link

bodaay commented Sep 25, 2022

I assume you have done all the steps required, extracting keys and using them.
The only thing that might be missing on your side, is that you need to send Airdrop BLE Beacon so IOS device will initiate its HTTPS server and will be able to receive /Discover Post request

One easy soltuion to test out without going through BLE thing, you can have two IOS devices, one of them start Airdrop as if you need to share a file, the other device will be discoverable

if you are running on raspberry pi with BLE 4.0 (newer ones have BLE 5.0), 5.0 will not work with apple_blee since hci api is deprecated, I have the required code for 5.0 but its in Golang, and its using bluez with d-bus ineterface. I'll upload the whole project which will be all in one soon

you can use adv_wifi.py from apple_blee project as base and send BLE Beacon for Airdrop, here is a snippets for the changes you need to make:


def generate_airdrop_beacon_data(appleid="[email protected]",phone="97411111111",email="[email protected]",email2="[email protected]"):
    adv_type=0x03 # dont touch this

    header = (0x02, 0x01, 0x1a, 0x17, 0xff, 0x4c, 0x00)
    const1=(0x05,0x12,0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00,0x01)

    first_2_bytes_apple_id_sha256 = get_hash(appleid,size=2)
    first_2_bytes_phone_sha256 = get_hash(phone,size=2)
    first_2_bytes_email_sha256 = get_hash(email,size=2)
    first_2_bytes_email2_sha256 = get_hash(email2,size=2)
    const_suffix_zero=(0x00,)

    data=(header + const1 +  first_2_bytes_apple_id_sha256 + first_2_bytes_phone_sha256 + first_2_bytes_email_sha256 + first_2_bytes_email2_sha256 + const_suffix_zero)

    return adv_type,data

@twoexem
Copy link
Author

twoexem commented Sep 25, 2022

I need to extract the keys? Didn't know it was neccessary, thought it was optional. I'll try that out and perform the BLE code thing too. Thanks for your reply!

@bodaay
Copy link

bodaay commented Sep 25, 2022

if that works, you may need to do this as well anyway. Make sure you install old libarchive, new ones not compatible with the code
in your requirements file for pip:
libarchive-c==2.9

@twoexem
Copy link
Author

twoexem commented Sep 26, 2022

@bodaay Is there any way I can get a keychain without actually owning a Mac? The Macbook Pro a friend lended me doesn't want to boot into recovery mode, and I don't know anybody else who owns a Mac.

@bodaay
Copy link

bodaay commented Sep 27, 2022

to be honest i'm not sure, I think you do need a mac and Apple Developer license as well. I don't know whether apple changed something, because I thought same initially that keys are optional, but for me it never worked without the keys. Having the keys actually is pretty good, you can be a verified contact as well, just add a contact in your phone with same apple id as email for the extracted keys.

if you are verified:
1- you can send while Airdrop in contacts mode only
2- There is a thumbnail picture while asking for accept.

@twoexem
Copy link
Author

twoexem commented Sep 28, 2022

Okay, I see. I'll have to ask other friends if they own a Mac or something similar. Thanks for your help, I'll update you once I get any results.

@bodaay
Copy link

bodaay commented Oct 3, 2022

I've uploaded a full all in one soltuion:

https://github.com/bodaay/GoOpenDrop

@lucasromeiro
Copy link

I'm having trouble extracting keys from my Mac Studio. did you have any problems?
can you give me any tips?

thank you for any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants