''' Created by Snoolie K (0xilis) on 2025 March 18. Licensed under MIT. Please credit if using. ''' import struct # make a .aar of one contexts.plist file def wrap_in_aar(input_file, input_mov, output_file): # Since I only need to care about a contents.plist (and in the future the mov file), I am hardcoding the header... header = bytearray.fromhex("4141303125005459503146504154500E00636F6E74656E74732E706C697374444154418E13") with open(input_file, 'rb') as f: file_data = f.read() file_size = len(file_data) if file_size <= 0xFFFF: # Our size can fit in a 2 byte AA_FIELD_TYPE_BLOB, yay header[-2:] = struct.pack('