BadCase Posted January 10, 2019 Share Posted January 10, 2019 Can someone help me out and tell me how to check the ARM version on a device in a script? Link to comment Share on other sites More sharing options...
Administrators Enyby Posted January 10, 2019 Administrators Share Posted January 10, 2019 arm32 or arm64: getTargetInfo - field "x64". If you need more specific - you can check by loaded ELF libs type. 1. Get ELF code location by getRangesList. 2. Read ELF header here. 3. Check e_machine field in this header. _______________________________________________ added 1 minute later Also you can even check info from getTargetInfo - x32 or x64 has been different size for memory address. Link to comment Share on other sites More sharing options...
saiaapiz Posted January 10, 2019 Share Posted January 10, 2019 Check e_machine from specific lib using GameGuardian. function GetLibraryTextBase(lib) for _, __ in pairs(gg.getRangesList(lib)) do --print(string.format("%s | Start: 0x%08x | End: 0x%08x | Size: 0x%x | State: %s | Protection: %s", lib, __["start"], __["end"], __["end"] - __["start"], __["state"], __["type"])) if __["state"] == "Xa" or __["state"] == "Xs" then return __["start"], __["end"] end end return nil end function GetLibraryArch(LibName) e_machine = GetLibraryTextBase(LibName) + 0x12 -- e_machine offset _ = {{address = e_machine, flags = gg.TYPE_WORD }} return gg.getValues(_)[1].value & 0xFFFF -- Format end Arch = GetLibraryArch("libc.so") -- http://www.sco.com/developers/gabi/2000-07-17/ch4.eheader.html if Arch == 40 then ArchName = "Advanced RISC Machines ARM: " else ArchName = "Unknown" end gg.alert(string.format("libc.so\n\nArchitecture: %s (0x%02X)", ArchName, Arch)) References: http://www.sco.com/developers/gabi/2000-07-17/ch4.eheader.html Link to comment Share on other sites More sharing options...
BadCase Posted January 10, 2019 Author Share Posted January 10, 2019 TY both Link to comment Share on other sites More sharing options...
Question
BadCase
Can someone help me out and tell me how to check the ARM version on a device in a script?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.