Is there a way to get count of number methods used in a jar file

前端 未结 12 2196
粉色の甜心
粉色の甜心 2020-11-28 03:20

Can i have the count of all methods used in a jar file . My APK uses certain external JARS and there are a number of classes around hundred to be precise.

I have use

12条回答
  •  一整个雨季
    2020-11-28 03:30

    For cases where you're already over the 64k method limit, an alternate approach would be to use the --multi-dex option to dx, and then use baksmali's "list methods" functionality on all of the dex files that dx generates. Next, you would combine these lists, sort the combined list and remove any duplicates. The number of methods you are left with will be the total method count.

    dx --dex --multi-dex --output=out orig.jar
    find out -name classes*.dex -exec baksmali list methods {} \; | sort | uniq | wc -l
    

提交回复
热议问题