Android 11(R) rapid development and debugging framework and services

    Android 11(R) rapid development and debugging framework and services


Android source code compilation series blog:

Android.bp do you really understand
Android.bp Android.bp Getting Started Guide Converting Android.mk to Android.bp
Android.bp Getting Started Guide Analysis Android.bp Syntax
Android.bp Correct Posture Adding Macro Control Compilation Guide
Android High Version P/Q /R Source Code Compilation Guide
How to view the Android source code online docs


introduction

  In the previous blog Android high version P/Q/R source code compilation guide , from the actual point of view of Android source code development, the compilation issues related to each version of Android are analyzed. Then some readers asked in private about how to quickly develop and debug the framework for Android 11(R). Just now, let’s just talk about it in the development of Android 11(R)!




specific method

What is dealt with here is that the compilation environment of the Android terminal is userdebug. I haven’t tried the user state yet. I have written an article about debugging the framework in the user state. You can refer to Android ART mode without re-burning system.img. How to modify the framework and app under the circumstances !

Note here that we are debugging in userdebug. For the user compilation environment, please refer to the previous blog (Android high version, I haven't actually verified it!)

Since this is a combat blog, there is not much to say, just put in the specific method!

#调试framework
#编译framework,Android 11和之前版本有所区别,
#此处不能使用make framework -j32 或者mmm framework/base -j32都是不行的
make  -j32 framework-minus-apex  

adb root
adb remount
adb shell "rm -rf /system/framework/arm"
adb push framework.jar /system/framework
adb shell sync
adb reboot

#调试services
mmm framework/base/services -j32 或者 make -j32 services

adb root
adb remount
adb shell "rm -rf /system/framework/arm"
adb push services.jar /system/framework
adb shell sync
adb reboot

Okay, it's over! Don't ask readers to like or pay attention!

Guess you like

Origin blog.csdn.net/tkwxty/article/details/114699887