1

I recently had to make a version of a survivalcraft 2 mod that allowed circuits to run faster

I found this script by stack overflow to unpack a mono bundle app

I already modified the .dll, but I need to repack it, and I don't know anything about pyelftools

Script:

from elftools.elf.elffile import ELFFile
from zipfile import ZipFile
from cStringIO import StringIO
import gzip, string

data = open('libmonodroid_bundle_app.so').read()
f = StringIO(data)
elffile = ELFFile(f)
section = elffile.get_section_by_name('.dynsym')
for symbol in section.iter_symbols():
  if symbol['st_shndx'] != 'SHN_UNDEF' and symbol.name.startswith('assembly_data_'):
    print symbol.name
    dll_data = data[symbol['st_value']:symbol['st_value']+symbol['st_size']]
    dll_data = gzip.GzipFile(fileobj=StringIO(dll_data)).read()
    outfile = open(symbol.name[14:].replace('_dll', '.dll'), 'w+'); print symbol.name[14:].replace('_dll', '.dll')
    outfile.write(dll_data)
    outfile.close()
-2

I already created a script, However, It probably won't work, Although, There is a folder called assemblies without the mono bundle, you will probably just need to zip the extracted dlls, create the folder, and delete the mono bundle

However, I'm not sure, but anything is possible :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.