Reading Activity names from apk file in Android

后端 未结 4 1936
渐次进展
渐次进展 2020-12-31 14:59

I want to extract all the activities names from an android apk file. Any idea how possibly it can be done?

Thanx Kaps

4条回答
  •  有刺的猬
    2020-12-31 15:43

    其实不用得到apk的路径,直接在activity内调用

    (English translation) You don't have to use the full path to the APK, just call the following directly from inside an Activity.

    PackageManager manager = getPackageManager();
    PackageInfo packageInfo = manager.getPackageInfo("your package name", PackageManager.GET_UNINSTALLED_PACKAGES);
    

提交回复
热议问题