mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 16:09:25 +08:00
add: convert arch to arch with abi
This commit is contained in:
@@ -237,12 +237,24 @@ class UpdateServerApi:
|
||||
|
||||
|
||||
class CrackResource:
|
||||
ARCH_MAP = {
|
||||
"x86": "x86",
|
||||
"x86_64": "x86",
|
||||
"armv7": "armeabi-v7a",
|
||||
"arm64": "arm64-v8a",
|
||||
"aarch64": "arm64-v8a",
|
||||
"aarch": "armeabi-v7a",
|
||||
}
|
||||
|
||||
def __init__(self, config: AzurLaneConfig, device: Device):
|
||||
self.config = config
|
||||
self.device = device
|
||||
arch_ret = device.adb_shell("uname -m").lower()
|
||||
self.arch = "x86" if arch_ret == "x86_64" else arch_ret
|
||||
logger.info(f"Arch: {self.arch}")
|
||||
self.arch = self.ARCH_MAP.get(arch_ret, "")
|
||||
if not self.arch:
|
||||
raise CrackerError(f"Unsupported arch: {arch_ret}")
|
||||
|
||||
logger.info(f"Arch: {arch_ret} -> {self.arch}")
|
||||
|
||||
self.resource_root = f"./bin/hook"
|
||||
self.resource_dir = f"{self.resource_root}/{self.arch}"
|
||||
|
||||
Reference in New Issue
Block a user