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