Hacking Question How to compile .bin payloads to .uf2?

  • Thread starter Thread starter Akira
  • Start date Start date
  • Views Views 17,909
  • Replies Replies 25

Akira

I'm not a SHRIMP!!!!
Member
Joined
Apr 28, 2013
Messages
1,246
Reaction score
427
Trophies
0
XP
1,696
Country
United States
I'm asking mainly because I have those chinese dongles(the $16 ones) and they don't have all the .uf2's of some of the payloads I want to try. For example, I want to try and compile briccmii to .uf2(don't ask me why, I just want to lol) I just want to learn instead of relying on downloading it on some random github page. I'm using a Mac, Xcode installed, homebrew. There might be more to be installed for sure.
 
Last edited by tom2199,
  • Like
Reactions: Akira
Im having trouble with this im not sure what to do after installing the program and downloading the requisites im trying to build hekate 4.1
 
Im having trouble with this im not sure what to do after installing the program and downloading the requisites im trying to build hekate 4.1
just open the build.ino file with the arduino ide, change the include line to the hekate 4.1 .h file and export the compiled binary. this build .bin file has to be converted to uf2 with the script.
 
just open the build.ino file with the arduino ide, change the include line to the hekate 4.1 .h file and export the compiled binary. this build .bin file has to be converted to uf2 with the script.


I cant find the 4.1.h file from the sourcecode material from hekate latest release?
 
i've build a file .h from hekate4_1.bin and convert it to UF2 but doesnt seem to boot Hekate... maybe i've done something wrong when i convert it... i do some test and try to make it public when it will work !
 
i've build a file .h from hekate4_1.bin and convert it to UF2 but doesnt seem to boot Hekate... maybe i've done something wrong when i convert it... i do some test and try to make it public when it will work !
you dont convert the .h file, you have to compile the code in the arduino ide with the .h file included
here is my hekate 4.1 .uf2 file, but remember:
If you don't trust it, don't run it!
 

Attachments

  • Like
Reactions: itsjch
same problem as my file, it did not boot hekate

--------------------- MERGED ---------------------------

files need to have 512ko and the one generated with hekate4.1 have around 266Ko so the trinket didnt accept it as a boot file
 
works fine ! thanks
how did you compile your files ? if its not a problem for you to explain ? did you use python script ? or arduino software ? thanks !
 
same problem as my file, it did not boot hekate

--------------------- MERGED ---------------------------

files need to have 512ko and the one generated with hekate4.1 have around 266Ko so the trinket didnt accept it as a boot file
Sx payload has 16kb and works fine.
Never mind. This is about dongle, not modchip.
 
Last edited by Kubas_inko,
  • Like
Reactions: tom2199
:rofl2:thanks for the response guys, though Im having problems converting the .bin to .h. Im getting this error whenever I try to use the script

Arrons-MacBook-Pro:test-build arron$ python3 binConverter.py hekate.bin
reading file: hekate.bin
[ ] 0%Traceback (most recent call last):
File "binConverter.py", line 42, in <module>
stringBuffer += "0x"+binascii.hexlify(byte).decode('ascii')+", "
TypeError: a bytes-like object is required, not 'int'

I used windows and i managed to convert it to .h. Now that im trying to compile the .h into a .bin using Arduino IDE, Im getting this error

Usb.h: no such file or directory

I managed to compile the .bin using arduino ide. Now im having problems converting it to uf2:rofl2: i downloaded the script and run it but its asking for a drive to deploy.

Edit: Upon inspection of the code, there are commands on just to convert it to uf2. Profit! Now to check if it works.

All are working properly. Managed to run it both in Windows and Mac. Thanks guys. I could write a tutorial if anyone wants it.
 
Last edited by Akira,

Site & Scene News

Popular threads in this forum