Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraction issue with su/cat on rooted device #45

Open
m1435 opened this issue Aug 6, 2021 · 3 comments
Open

Extraction issue with su/cat on rooted device #45

m1435 opened this issue Aug 6, 2021 · 3 comments

Comments

@m1435
Copy link

m1435 commented Aug 6, 2021

Describe the bug
Andriller fails to extract internal databases using the the get_file(su/cat) method.

To Reproduce

  1. Connect rooted Android device.
  2. Set output folder.
  3. 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.

@den4uk
Copy link
Owner

den4uk commented Aug 19, 2021

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.

@m1435
Copy link
Author

m1435 commented Aug 24, 2021

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 😉

@den4uk
Copy link
Owner

den4uk commented Aug 24, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants