By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,818 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,818 IT Pros & Developers. It's quick & easy.

How to Write random hex code to android .so file

P: 1
Dear friends plz help me. I want to write random hex code in and android .so binary file suppose file is /data/data/test.so using Termux. How can i do this in c program.
1 Week Ago #1
Share this Question
Share on Google+
1 Reply


100+
P: 103
What have you done so far for this?

Hexadecimal values are represented in C by preceding the values with "0X" or "0x". E.g. "0x64" (which is equivalent to 100 in decimal). For generation of random hex code, you can use random function at first to generate random decimal values and then conversation from decimal to hexadecimal can be done.

Once the value to be written is available, concepts of file handling are to be used. .so file can be opened in "wb" mode for writing the data to the file in binary form. And then writing can be done using the already available binary functions.
1 Week Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.