简体   繁体   中英

Trying to modify a kernel

I'm a noob in linux/android, yet I have to modify a kernel.

For one specific reason I'm using this guide (it's somewhat understandable when translated to english using google).

The problem is that I'm stuck at part where you have to "enter the following command to view the address of these two functions". The only addresses I get when entering those commands are 00000000, which doesn't seem quite right.

I don't really understand why is that happening. It may be because the guy who created a guide is using adb for getting addresses, while I'm trying to get them using terminal in android. I can't quite use adb, because I'm running MEmu emulator and that's where I need addresses from.

The address is not being shown because you are not running the command under the root user. This issue has been explained in this answer .

In your case, you need to obtain super-admin rights using either the sudo -s or su command. Once admin, your shell prompt should end with a #. On my one plus, the prompt looks like this when I am admin: A0001:/ #

If it does not work, be sure that the file /proc/sys/kernel/kptr_restrict contains a 0 . You can do so by executing the command cat /proc/sys/kernel/kptr_restrict .

To set its value to 0 , you should execute the command echo 0 > /proc/sys/kernel/kptr_restrict with administrative rights.

Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM