mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
chore: don't rename xxd artifacts
This commit is contained in:
1 parent
1a17188e6e
commit
339bb85ea8
20 files changed
+65
-52
No files matched your search
@@ -12,14 +12,14 @@ payloads:
|
||||
name=$$(basename "$$file"); \
|
||||
name=$${name%.*}; \
|
||||
echo " XXD $$file"; \
|
||||
xxd -i -n "$$name" "$$file" > "src/gen/payloads/$$name.h"; \
|
||||
xxd -i "$$file" > "src/gen/payloads/$$name.h"; \
|
||||
done
|
||||
|
||||
@for file in images/*; do \
|
||||
name=$$(basename "$$file"); \
|
||||
name=$${name%.*}; \
|
||||
echo " XXD $$file"; \
|
||||
xxd -i -n "$$name" "$$file" > "src/gen/images/$$name.h"; \
|
||||
xxd -i "$$file" > "src/gen/images/$$name.h"; \
|
||||
done
|
||||
|
||||
xxd -i -n "DFUHelperDeviceInfo" resources/DFUHelperDeviceInfo.json > src/gen/DFUHelperDeviceInfo.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+42
-29
@@ -5,14 +5,14 @@
|
||||
|
||||
#include "../utils/log.h"
|
||||
#include "dfu.h"
|
||||
#include "../gen/payloads/t8015.h"
|
||||
#include "../gen/payloads/t8011.h"
|
||||
#include "../gen/payloads/t8010.h"
|
||||
#include "../gen/payloads/s8003.h"
|
||||
#include "../gen/payloads/s8001.h"
|
||||
#include "../gen/payloads/s8000.h"
|
||||
#include "../gen/payloads/t7001.h"
|
||||
#include "../gen/payloads/t7000.h"
|
||||
#include "../gen/payloads/yolo_t8015.h"
|
||||
#include "../gen/payloads/yolo_t8011.h"
|
||||
#include "../gen/payloads/yolo_t8010.h"
|
||||
#include "../gen/payloads/yolo_s8003.h"
|
||||
#include "../gen/payloads/yolo_s8001.h"
|
||||
#include "../gen/payloads/yolo_s8000.h"
|
||||
#include "../gen/payloads/yolo_t7001.h"
|
||||
#include "../gen/payloads/yolo_t7000.h"
|
||||
|
||||
bool checkm8_find_device_configuration_for_cpid(int cpid, struct DeviceConfiguration *config) {
|
||||
bool foundMatchingConfiguration = true;
|
||||
@@ -226,9 +226,23 @@ bool checkm8_find_payload_configuration_for_cpid(int cpid, struct PayloadConfigu
|
||||
|
||||
uint8_t *create_pongo_overwrite_for_device(struct PayloadConfiguration *payloadConfig, size_t *overwriteSize) {
|
||||
LOG("Preparing overwrite for YoloDFU mode.");
|
||||
|
||||
uint64_t *overwrite = malloc(0x30);
|
||||
|
||||
LOG("overwrite buffer: %p", (void *)overwrite);
|
||||
LOG("insecureMemoryBase: 0x%016llx",
|
||||
(unsigned long long)payloadConfig->insecureMemoryBase);
|
||||
|
||||
overwrite[5] = payloadConfig->insecureMemoryBase;
|
||||
|
||||
LOG("overwrite[5]: 0x%016llx",
|
||||
(unsigned long long)overwrite[5]);
|
||||
|
||||
*overwriteSize = 0x30;
|
||||
|
||||
LOG("overwriteSize: 0x%zx (%zu)",
|
||||
*overwriteSize, *overwriteSize);
|
||||
|
||||
return (uint8_t *)overwrite;
|
||||
}
|
||||
|
||||
@@ -236,36 +250,35 @@ uint8_t *create_pongo_payload_for_device(struct DeviceConfiguration *deviceConfi
|
||||
LOG("Preparing YoloDFU payload for CPID 0x%x.", deviceConfig->cpid);
|
||||
switch (deviceConfig->cpid) {
|
||||
case 0x8015:
|
||||
*payloadSize = t8015_len;
|
||||
return (uint8_t *)t8015;
|
||||
*payloadSize = payloads_yolo_t8015_bin_len;
|
||||
return (uint8_t *)payloads_yolo_t8015_bin;
|
||||
case 0x8011:
|
||||
*payloadSize = t8011_len;
|
||||
return (uint8_t *)t8011;
|
||||
*payloadSize = payloads_yolo_t8011_bin_len;
|
||||
return (uint8_t *)payloads_yolo_t8011_bin;
|
||||
case 0x8010:
|
||||
*payloadSize = t8010_len;
|
||||
return (uint8_t *)t8010;
|
||||
*payloadSize = payloads_yolo_t8010_bin_len;
|
||||
return (uint8_t *)payloads_yolo_t8010_bin;
|
||||
case 0x8003:
|
||||
*payloadSize = s8003_len;
|
||||
return (uint8_t *)s8003;
|
||||
*payloadSize = payloads_yolo_s8003_bin_len;
|
||||
return (uint8_t *)payloads_yolo_s8003_bin;
|
||||
case 0x8001:
|
||||
*payloadSize = s8001_len;
|
||||
return (uint8_t *)s8001;
|
||||
*payloadSize = payloads_yolo_s8001_bin_len;
|
||||
return (uint8_t *)payloads_yolo_s8001_bin;
|
||||
case 0x8000:
|
||||
*payloadSize = s8000_len;
|
||||
return (uint8_t *)s8000;
|
||||
*payloadSize = payloads_yolo_s8000_bin_len;
|
||||
return (uint8_t *)payloads_yolo_s8000_bin;
|
||||
case 0x7001:
|
||||
*payloadSize = t7001_len;
|
||||
return (uint8_t *)t7001;
|
||||
*payloadSize = payloads_yolo_t7001_bin_len;
|
||||
return (uint8_t *)payloads_yolo_t7001_bin;
|
||||
case 0x7000:
|
||||
*payloadSize = t7000_len;
|
||||
return (uint8_t *)t7000;
|
||||
*payloadSize = payloads_yolo_t7000_bin_len;
|
||||
return (uint8_t *)payloads_yolo_t7000_bin;
|
||||
default:
|
||||
LOG("Failed to prepare payload for device with CPID 0x%x.", deviceConfig->cpid);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO: move l8r
|
||||
|
||||
bool wait_for_device_to_enter_yolo_dfu(usb_handle_t *handle) {
|
||||
@@ -313,13 +326,13 @@ bool prepare_pongo(unsigned char **pongoBuf, size_t *size)
|
||||
// that decompresses the Pongo image into memory.
|
||||
// It is, in effect, a self-extracting payload.
|
||||
|
||||
shellcodeSize = lz4dec_len;
|
||||
shellcodeSize = payloads_lz4dec_bin_len;
|
||||
shellcode = malloc(shellcodeSize);
|
||||
memcpy(shellcode, lz4dec, shellcodeSize);
|
||||
memcpy(shellcode, payloads_lz4dec_bin, shellcodeSize);
|
||||
|
||||
pongoSize = Pongo_len;
|
||||
pongoSize = payloads_Pongo_bin_len;
|
||||
pongo = malloc(pongoSize);
|
||||
memcpy(pongo, Pongo, pongoSize);
|
||||
memcpy(pongo, payloads_Pongo_bin, pongoSize);
|
||||
|
||||
// Compress PongoOS
|
||||
char *pongoCompressed = malloc(pongoSize);
|
||||
|
||||
+20
-20
@@ -156,53 +156,53 @@ void DfuPanel::LoadDevice(const std::string& productType)
|
||||
|
||||
if (m_sequence.imageName == "ipadmini")
|
||||
{
|
||||
imageData = ipadmini;
|
||||
imageSize = ipadmini_len;
|
||||
imageData = images_ipadmini_png;
|
||||
imageSize = images_ipadmini_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "ipad")
|
||||
{
|
||||
imageData = ipad;
|
||||
imageSize = ipad_len;
|
||||
imageData = images_ipad_png;
|
||||
imageSize = images_ipad_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "iphonese")
|
||||
{
|
||||
imageData = iphonese;
|
||||
imageSize = iphonese_len;
|
||||
imageData = images_iphonese_png;
|
||||
imageSize = images_iphonese_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "iphone6s")
|
||||
{
|
||||
imageData = iphone6s;
|
||||
imageSize = iphone6s_len;
|
||||
imageData = images_iphone6s_png;
|
||||
imageSize = images_iphone6s_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "iphone7")
|
||||
{
|
||||
imageData = iphone7;
|
||||
imageSize = iphone7_len;
|
||||
imageData = images_iphone7_png;
|
||||
imageSize = images_iphone7_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "iphone8")
|
||||
{
|
||||
imageData = iphone8;
|
||||
imageSize = iphone8_len;
|
||||
imageData = images_iphone8_png;
|
||||
imageSize = images_iphone8_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "iphonex")
|
||||
{
|
||||
imageData = iphonex;
|
||||
imageSize = iphonex_len;
|
||||
imageData = images_iphonex_png;
|
||||
imageSize = images_iphonex_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "ipodtouch")
|
||||
{
|
||||
imageData = ipodtouch;
|
||||
imageSize = ipodtouch_len;
|
||||
imageData = images_ipodtouch_png;
|
||||
imageSize = images_ipodtouch_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "siriremote")
|
||||
{
|
||||
imageData = siriremote;
|
||||
imageSize = siriremote_len;
|
||||
imageData = images_siriremote_png;
|
||||
imageSize = images_siriremote_png_len;
|
||||
}
|
||||
else if (m_sequence.imageName == "atv_std_brd")
|
||||
{
|
||||
imageData = atv_std_brd;
|
||||
imageSize = atv_std_brd_len;
|
||||
imageData = images_atv_std_brd_png;
|
||||
imageSize = images_atv_std_brd_png_len;
|
||||
}
|
||||
|
||||
if (imageData)
|
||||
|
||||
@@ -23,7 +23,7 @@ MainPanel::MainPanel(MainFrame* frame, wxWindow* parent)
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
wxMemoryInputStream stream(logo, logo_len);
|
||||
wxMemoryInputStream stream(images_logo_png, images_logo_png_len);
|
||||
wxImage img(stream, wxBITMAP_TYPE_PNG);
|
||||
wxBitmap bmp(img);
|
||||
|
||||
|
||||
Reference in new issue
Block a user