最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

How to modify and test a android kernel on a real phone? - Stack Overflow

matteradmin8PV0评论

I am a student in the field of information engineering, and for research purposes, I need to modify the kernel of my Pixel 5a phone and perform some debugging.

Objective

Currently, I am trying to display debug information for the network part of the kernel on my Pixel 5a (by adding printk and using dmesg).

Have already do

  1. I built AOSP, which took up a lot of space and time. Then I found that it seems possible to directly download the Android kernel file, so I got the android-msm-redbull-4.19-android13-qpr2 file and compiled it.

  2. I tried to modify /Project/android_kernel/private/msm-google-modules/wlan/qcacld-3.0/core/mac/src/pe/lim/lim_process_deauth_frame.c and /Project/android_kernel/private/msm-google/net/mac80211/tx.c by adding printk to see if the modification was successful.

  3. My build code is as follows: BUILD_CONFIG=private/msm-google/build.config.redbull BUILD_BOOT_IMG=1 MKBOOTIMG_PATH=mkbootimg.py KERNEL_BINARY=Image.lz4 BOOT_IMAGE_HEADER_VERSION=3 KERNEL_CMDLINE="" BASE_ADDRESS=0x00000000 PAGE_SIZE=4096 CC=/usr/local/bin/gcc build/build.sh -j8,This gave me an out folder containing many .ko files and image files.

  4. According to online tutorials, I chose an image file to burn with the following code:fastboot flash boot boot.img,The phone can be turned on and off normally, but when I use dmesg to check the logs, no changes have occurred. How should I modify it to debug my code?

Post a comment

comment list (0)

  1. No comments so far