mirror of
https://github.com/hyugogirubato/KeyDive.git
synced 2026-07-15 18:40:02 +02:00
fix unavailable strings binary
This commit is contained in:
@@ -123,6 +123,10 @@ class Remote:
|
|||||||
|
|
||||||
# Execute shell command to fetch all system properties using 'getprop'
|
# Execute shell command to fetch all system properties using 'getprop'
|
||||||
sp = shell([*self.__prefix, 'getprop', '|', 'strings'])
|
sp = shell([*self.__prefix, 'getprop', '|', 'strings'])
|
||||||
|
if 'strings: not found' in sp[1]:
|
||||||
|
# Fallback to regex if 'strings' command is not available on the device
|
||||||
|
sp = shell([*self.__prefix, 'getprop', '|', "grep -a -o '[ -~]\\{4,\\}'"])
|
||||||
|
|
||||||
if sp[0]:
|
if sp[0]:
|
||||||
self.logger.error('Unable to retrieve system properties from the device (error: %s)', sp[1])
|
self.logger.error('Unable to retrieve system properties from the device (error: %s)', sp[1])
|
||||||
return properties
|
return properties
|
||||||
|
|||||||
Reference in New Issue
Block a user