1.下面方法适合真机:下载android源码,然后编译你修改的framwork的代码,会生成framework.jar,然后push到system/framework目录下,重启机器!ok 2,下面方法适合模拟器: (1):用unyaffs解压,你下载的sdk目录下system.img,然后替换其中的framework.jar,然后再压缩成新的system.img;然后启动模拟器就ok (2):或者用直接全编译源码,用生成system.img去替换模拟器下面system.img也ok 或者在源码根目录下编译systemimage: make systemimage 然后执行脚本启动模拟器: <div class="dp-highlighter bg_plain" style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; width: 936.531px; overflow: auto; padding-top: 1px; margin: 18px 0px !important; background-color: rgb(231, 229, 220);"><div class="bar" style="padding-left: 45px;"><div class="tools" style="padding: 3px 8px 10px 10px; font-stretch: normal; font-size: 9px; line-height: normal; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: silver; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(108, 226, 108); background-color: rgb(248, 248, 248);"><strong>[plain]</strong> <a target=_blank href="http://blog.csdn.net/h3c4lenovo/article/details/8056517#" class="ViewSource" title="view plain" style="color: rgb(160, 160, 160); text-decoration: none; border: none; padding: 1px; margin: 0px 10px 0px 0px; font-size: 9px; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: 0% 0%; background-repeat: no-repeat;">view plain</a><span class="tracking-ad" data-mod="popu_168"> <a target=_blank href="http://blog.csdn.net/h3c4lenovo/article/details/8056517#" class="CopyToClipboard" title="copy" target="_blank" style="color: rgb(160, 160, 160); text-decoration: none; border: none; padding: 1px; margin: 0px 10px 0px 0px; font-size: 9px; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_copy.gif); background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: 0% 0%; background-repeat: no-repeat;">copy</a></span><div style="position: absolute; left: 482px; top: 763px; width: 18px; height: 18px; z-index: 99;"></div><span class="tracking-ad" data-mod="popu_169"> </span></div></div><ol start="1" style="padding: 0px; border: none; color: rgb(92, 92, 92); margin: 0px 0px 1px 45px !important; background-color: rgb(255, 255, 255);"><li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(108, 226, 108); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">./out/host/linux-x86/bin/emulator -system ./out/target/product/generic/system.img -data ./out/target/product/generic/userdata.img -ramdisk ./out/target/product/generic/ramdisk.img -avd avd -partition-size 2047 -skindir /home/archermind/Downloads/android-sdk-linux/platforms/android-16/skins -skin WVGA800 -kernel /home/archermind/Downloads/android-sdk-linux/system-images/android-16/armeabi-v7a/kernel-qemu & </span></span></li></ol></div>
android中修改framework层代码后怎样操作才能看到修改后的效果?
最新推荐文章于 2023-05-09 13:56:06 发布
本文介绍了两种替换Android系统中framework.jar的方法:一种适用于真机,通过编译并替换framework.jar后重启设备;另一种适用于模拟器,包括使用unyaffs解压及替换system.img中的framework.jar或替换模拟器的system.img。
摘要由CSDN通过智能技术生成