在对Android系统的某个动态so库部分代码修改后,需要重新生成so library,可以查看该路径下的Android.bp文件,关键词cc_binary的name即为对应的library 名称,在根路径执行 m libraryname 即可。
举例:
比如修改了frameworks/native/services/surfaceflinger 部分代码, 查看该路径下的Android.bp文件
cc_binary { name: "surfaceflinger", defaults: ["libsurfaceflinger_binary"], init_rc: ["surfaceflinger.rc"], srcs: [ ":surfaceflinger_binary_sources", // Note: SurfaceFlingerFactory is not in the filegroup so that it // can be easily replaced. "SurfaceFlingerFactory.cpp", ], shared_libs: [ "libSurfaceFlingerProp", ], logtags: ["EventLog/EventLogTags.logtags"],}
则对应的library name为libsurfaceflinger.so
在根路径下执行命令:
m libsurfaceflinger
在/system/lib64/路径下会生成新的libsurfaceflinger.so