Skip to content

Commit

Permalink
added new ios action modals
Browse files Browse the repository at this point in the history
  • Loading branch information
simondankelmann committed Dec 17, 2023
1 parent e129db0 commit 00505f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class ContinuityActionModalAdvertisementSetGenerator: IAdvertisementSetGenerator
"06" to "Pair AppleTV",
"0D" to "HomeKit AppleTV Setup",
"2B" to "AppleID for AppleTV?",
"05" to "Apple Watch",
"24" to "Apple Vision Pro",
"2F" to "Connect to other Device",
"21" to "Software Update",
)

companion object {
Expand All @@ -49,20 +53,29 @@ class ContinuityActionModalAdvertisementSetGenerator: IAdvertisementSetGenerator
val action = payload[3]
var flag = payload[2]

// Change flag from time to time
if ((StringHelpers.byteToHexString(action) == "20") && Random.nextBoolean()) {
flag = StringHelpers.decodeHex("BF")[0]
}

// Change flag from time to time
if ((StringHelpers.byteToHexString(action) == "09") && Random.nextBoolean()) {
flag = StringHelpers.decodeHex("40")[0]
}

// Change flag each time
if ((StringHelpers.byteToHexString(action) == "21")) {
flag = StringHelpers.decodeHex("40")[0]
}

payload[2] = flag

// randomize auth tag
payload[4] = Random.nextBytes(1)[0]
payload[5] = Random.nextBytes(1)[0]
payload[6] = Random.nextBytes(1)[0]

advertisementSet.advertiseData.manufacturerData[0].manufacturerSpecificData = payload
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,16 @@ class ContinuityIos17CrashAdvertisementSetGenerator: IAdvertisementSetGenerator
val action = payload[3]
var flag = payload[2]

// Change flag from time to time
if((StringHelpers.byteToHexString(action) == "20") && Random.nextBoolean()){
flag = StringHelpers.decodeHex("BF")[0]
}

// Change flag from time to time
if((StringHelpers.byteToHexString(action) == "09") && Random.nextBoolean()){
flag = StringHelpers.decodeHex("40")[0]
}

payload[2] = flag

// randomize auth tag
Expand All @@ -78,6 +81,7 @@ class ContinuityIos17CrashAdvertisementSetGenerator: IAdvertisementSetGenerator
payload[12] = Random.nextBytes(1)[0]
}

advertisementSet.advertiseData.manufacturerData[0].manufacturerSpecificData = payload
}
}

Expand Down

7 comments on commit 00505f3

@StingerFingersinmyass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, had a question about the new Modals. Specifically about the modal " Software update ". Can I insert its data into nRF Connect and use it in this way? I am also interested in the source where you got the UUID and 0xData for them. I would be very happy to get an answer.

@simondankelmann
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

953b49df-b6bb-4926-b565-e68eecdf155e

you can add it like this to nrf, if you want to test others you can replace the "21" with any other byte :)

@StingerFingersinmyass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! I will test soon!

@StingerFingersinmyass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It all works very well, but still, where do you get this "data" like UID or others from? After searching unsuccessfully for their mentions on the net, I'm stumped!

@simondankelmann
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StingerFingersinmyass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are indeed a very good developer, it's not just about quality and your attitude towards your "project".
But also considering your attention to everyone who has problems and questions or more precisely your users.
I will occasionally pop up with questions if I want to know something.
Thank you for your attention to the community, even if it is not a big one. 🤝

@ckcr4lyf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find on the Vision Pro! I am going to try and integrate it into my project as well. Cheers.

Please sign in to comment.