Add flags parameter to nearby actions

This commit is contained in:
Willy-JL
2023-09-06 03:55:10 +02:00
parent 355f1b9673
commit 37c8357d3e
3 changed files with 267 additions and 268 deletions

View File

@@ -18,9 +18,7 @@ typedef struct {
// Proximity Pair IDs from https://github.com/ECTO-1A/AppleJuice/ // Proximity Pair IDs from https://github.com/ECTO-1A/AppleJuice/
// Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/ // Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/
static Payload static Payload payloads[] = {
payloads[] =
{
#if false #if false
{.title = "AirDrop", {.title = "AirDrop",
.text = "", .text = "",
@@ -69,7 +67,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x00}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x00}},
}}, }},
{.title = "AirPods Pro", {.title = "AirPods Pro",
.text = "Modal, spammy (auto close)", .text = "Modal, spammy (auto close)",
@@ -125,7 +123,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x13}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x13}},
}}, }},
{.title = "AppleTV Connecting...", {.title = "AppleTV Connecting...",
.text = "Modal, unlocked, long range", .text = "Modal, unlocked, long range",
@@ -133,7 +131,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x27}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x27}},
}}, }},
{.title = "AppleTV Audio Sync", {.title = "AppleTV Audio Sync",
.text = "Banner, locked, long range", .text = "Banner, locked, long range",
@@ -141,7 +139,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x19}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x19}},
}}, }},
{.title = "AppleTV Color Balance", {.title = "AppleTV Color Balance",
.text = "Banner, locked", .text = "Banner, locked",
@@ -149,7 +147,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x1E}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x1E}},
}}, }},
{.title = "Setup New iPhone", {.title = "Setup New iPhone",
.text = "Modal, locked", .text = "Modal, locked",
@@ -157,7 +155,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x09}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x09}},
}}, }},
{.title = "Transfer Phone Number", {.title = "Transfer Phone Number",
.text = "Modal, locked", .text = "Modal, locked",
@@ -165,7 +163,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x02}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x02}},
}}, }},
{.title = "Pair AppleTV", {.title = "Pair AppleTV",
.text = "Modal, unlocked", .text = "Modal, unlocked",
@@ -173,7 +171,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x06}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x06}},
}}, }},
{.title = "HomePod Setup", {.title = "HomePod Setup",
.text = "Modal, unlocked", .text = "Modal, unlocked",
@@ -181,7 +179,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x0B}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x0B}},
}}, }},
{.title = "AirPods", {.title = "AirPods",
.text = "Modal, spammy (auto close)", .text = "Modal, spammy (auto close)",
@@ -293,7 +291,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x01}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x01}},
}}, }},
{.title = "HomeKit AppleTV Setup", {.title = "HomeKit AppleTV Setup",
.text = "Modal, unlocked", .text = "Modal, unlocked",
@@ -301,7 +299,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x0D}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x0D}},
}}, }},
{.title = "Join This AppleTV?", {.title = "Join This AppleTV?",
.text = "Modal, unlocked", .text = "Modal, unlocked",
@@ -309,7 +307,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x20}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x20}},
}}, }},
{.title = "AppleID for AppleTV?", {.title = "AppleID for AppleTV?",
.text = "Modal, unlocked", .text = "Modal, unlocked",
@@ -317,7 +315,7 @@ static Payload
.msg = .msg =
{ {
.type = ContinuityTypeNearbyAction, .type = ContinuityTypeNearbyAction,
.data = {.nearby_action = {.type = 0x2B}}, .data = {.nearby_action = {.flags = 0xC0, .type = 0x2B}},
}}, }},
}; };

View File

@@ -129,7 +129,7 @@ void continuity_generate_packet(const ContinuityMsg* msg, uint8_t* packet) {
break; break;
case ContinuityTypeNearbyAction: case ContinuityTypeNearbyAction:
packet[i++] = 0xc1; // Action Flags packet[i++] = msg->data.nearby_action.flags; // Action Flags
packet[i++] = msg->data.nearby_action.type; packet[i++] = msg->data.nearby_action.type;
packet[i++] = (rand() % 256); // Authentication Tag packet[i++] = (rand() % 256); // Authentication Tag
packet[i++] = (rand() % 256); // ... packet[i++] = (rand() % 256); // ...

View File

@@ -32,6 +32,7 @@ typedef union {
struct { struct {
} tethering_source; } tethering_source;
struct { struct {
uint8_t flags;
uint8_t type; uint8_t type;
} nearby_action; } nearby_action;
} ContinuityData; } ContinuityData;