add rollback symbols usage

This commit is contained in:
hyugogirubato
2025-06-21 16:23:40 +02:00
parent 5170041d85
commit 6023acd300
+7 -2
View File
@@ -454,13 +454,18 @@ class Core(Remote):
'For OEM API > 17, the "--symbols" option is required. ' 'For OEM API > 17, the "--symbols" option is required. '
'Refer to: https://github.com/hyugogirubato/KeyDive/blob/main/docs/FUNCTIONS.md' 'Refer to: https://github.com/hyugogirubato/KeyDive/blob/main/docs/FUNCTIONS.md'
) )
self._server.dialog = True
# Determine whether to enable dynamic symbol resolution based on server and vendor context # Determine whether to enable dynamic symbol resolution based on server and vendor context
dynamic = self._server.features and vendor.min_oem[0] > 17 and not self._resolved dynamic = self._server.features and vendor.min_oem[0] > 17 and not self._resolved
# Attempt to hook into the identified library with or without dynamic symbols # Attempt to hook into the identified library with or without dynamic symbols
return script.exports_sync.hooklibrary(library['name'], dynamic) status = script.exports_sync.hooklibrary(library['name'], dynamic)
if not (self._server.dialog or status or self._resolved) and self.sdk > 33:
# https://github.com/hyugogirubato/KeyDive/issues/60
self.logger.warning('Detection without symbols failed, try again with the "--symbols" option.')
self._server.dialog = True
return status
# If the expected library was not found, clean up and notify the user # If the expected library was not found, clean up and notify the user
script.unload() script.unload()