andriller
andriller copied to clipboard
Extraction issue with su/cat on rooted device
Describe the bug
Andriller fails to extract internal databases using the the get_file
(su/cat) method.
To Reproduce
- Connect rooted Android device.
- Set output folder.
- Click Check and then Extract.
Expected behavior
Andriller extracts and parses the various databases, e.g. calllog.db
.
Screenshots n/a
Environment:
- OS: Debian Sid
- Andriller version: 3.5.3
- Installation from PyPi.
- Python version: 3.9.2
- ADB binary path:
/usr/bin/adb
- ADB version:
Android Debug Bridge version 1.0.41, Version 28.0.2-debian, Installed as /usr/lib/android-sdk/platform-tools/adb
Target Android device:
- When a device is connected, is it recognised when clicked on Check? Yes.
- Device make / model: Oneplus 5T
- Android OS: 11 / Lineage 18.1 "dumpling"
- Screenlock present? Yes, known credentials.
Error Log / Traceback andriller.log
Additional context
The reason appears to be related to the unstrip
function in the adb_conn.py
file.
With the following change which effectively bypasses the function, I got the extraction working:
136 def unstrip(self, data: bytes) -> bytes:¬
137 return data # re.sub(self.rmr, b'\n', data)¬
So maybe the value of the _is_adb_out_post_v5
variable is not setup correctly? It appears to be False
in my case, although I have adb exec-out id
available.
Thank you, I will investigate this. It seems that the version you have does not require removing extra carriage returns. I don't want to rush in releasing a fix, as I would need to be able to test with multiple Android versions.
Thanks for replying. I am all for proper investigation. In the end, it might still be odd behavior of my version of adb. It's not called Debian Unstable for nothing 😉
TBH, I won't have the time for a month to be able to look into it, as I am on a long holiday. Feel free to modify your own fork with any code changes you like in the mean time.