I want to make script that can check instruction set architecture of the game. I'm using emulator, gg.getTargetInfo() does not work.
I want to writte as less as possible but clear and effecient Currently im using path name to filter out strings.
function ISACheck()-- possible instruction setslocal ISA_x64Emulator ="/x86_64/"-- 64 bit emulatorlocal ISA_x64 ="/arm64/"-- 64 bitlocal ISA_x32Emulator ="/x86/"-- 32 bit emulatorlocal ISA_x32 ="/arm/"-- 32 bitlocal ranges = gg.getRangesList('base.odex')if#ranges ==0then
ranges = gg.getRangesList('classes.dex')endfor i, v in ipairs(ranges)doif v.state =="Xa"thenif string.find(v.internalName, ISA_x64Emulator)~=nilor string.find(v.internalName, ISA_x64)~=nilthen
instructionSetArchitecture =64
dataType = gg.TYPE_QWORD
elseif string.find(v.internalName, ISA_x32Emulator)~=nilor string.find(v.internalName, ISA_x32)~=nilthen
instructionSetArchitecture =32
dataType = gg.TYPE_DWORD
else
print('Does not recognize instruction set')
os.exit()endendend
print(instructionSetArchitecture)end
ISACheck()
But this script quite long for its objective i think.
1.) If current script can be optimized, please post it.
2.) So i wanted to ask if it would be reasonable to use the ["end"] key in gg.getRangesList() to decide if the game is 64 or 32bit by putting a condition on that address if it exceeds 32bit? But it also got me to the next question.
3.) Games of 32bit are always loaded in memory addresses of max 32bit. But 64bit games uses 32bit memory addresses but also memory addresses of max 64bit. But is this "always" the case? Can it happen that a 64bit game is loaded at only memory addresses of max 32bit in size? It would make the whole calculating address size useless i think.
4.) Or if there is a more efficient way to get instruction set architecture. Please let me know.
Please keep note, the game being a split.apk should not intervene with getting the instruction set architecture.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
Platonic
Hi,
I want to make script that can check instruction set architecture of the game. I'm using emulator, gg.getTargetInfo() does not work.
I want to writte as less as possible but clear and effecient Currently im using path name to filter out strings.
But this script quite long for its objective i think.
1.) If current script can be optimized, please post it.
2.) So i wanted to ask if it would be reasonable to use the ["end"] key in gg.getRangesList() to decide if the game is 64 or 32bit by putting a condition on that address if it exceeds 32bit? But it also got me to the next question.
3.) Games of 32bit are always loaded in memory addresses of max 32bit. But 64bit games uses 32bit memory addresses but also memory addresses of max 64bit. But is this "always" the case? Can it happen that a 64bit game is loaded at only memory addresses of max 32bit in size? It would make the whole calculating address size useless i think.
4.) Or if there is a more efficient way to get instruction set architecture. Please let me know.
Please keep note, the game being a split.apk should not intervene with getting the instruction set architecture.
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.