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

Python: Using r2pipe for analysing memory dump of an android process #143

Closed
saneeha-amir opened this issue Dec 6, 2021 · 7 comments
Closed

Comments

@saneeha-amir
Copy link

hello,

I want to disassemble a process dump obtained from an android device. The dump is obtained using volatility 'linux_procdump' command. The redare2 interface is working fine on the dump and I can see the disassembled instructions. But r2pipe script gives the following error:

"Warning: run r2 with -e bin.cache=true to fix relocations in disassembly"

The script i have written is as under:

import r2pipe
r= r2pipe.open('./dump',flags=['-e'])
r.cmd('aaa')
print r.cmd('afl')

Kindly guide. Ill be really grateful

@trufae
Copy link
Contributor

trufae commented Dec 6, 2021

The -e flag requires an argument

the warning you see is not an error and it will happen on notmal r2 unless you do what it says

@saneeha-amir
Copy link
Author

Many thanks for your response.
Please guide what should i do as the screen is stuck with this warning.

Can you please correct the command i m using.
r= r2pipe.open('./dump',flags=['-e'])

Ill be really grateful

@saneeha-amir
Copy link
Author

dear all,
I have figured out that 'e' represents all the configuration variables. I think i need to set the configuration variable of bin.cache to true. It is currently false. I should run r2pipe after resetting.
Please guide which file contains the configuration settings of radare2 as i m unable to find the configuration file.
Ill be grateful

@saneeha-amir
Copy link
Author

Dear all,

I have finally been able to run r2pipe. It was a problem with python. I was using python2.
r2pipe is working perfectly fine with python3.

Warning is there but output is obtained.

@trufae
Copy link
Contributor

trufae commented Dec 9, 2021

Sorry for the delay, ivebeen busy irl during the last 6 days.

the line should be:

r= r2pipe.open('./dump',flags=['-ebin.cache=true'])

@trufae
Copy link
Contributor

trufae commented Dec 9, 2021

uhm, in theory r2pipe should run fine in python2, but its better to get rid of it as its deprecated and unmaintained.

@saneeha-amir
Copy link
Author

Many thanks for your reply. I have changed the command as you have suggested and the warning is gone.

I have again verified running with python2 , but it is not working on my system.
Python3 is working fine.

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