How to get library installation path



  • Some Android apps require libraries to be linked against by specifying in their Manifest (in the application element):

    
    

    It is possible to list the installed libraries on the device by running the following command:

    $ adb shell cmd package list libraries                                                                                                                                                  1 ⨯
    library:android.ext.services
    library:android.ext.shared
    library:android.hidl.base-V1.0-java
    library:android.hidl.manager-V1.0-java
    library:com.android.future.usb.accessory
    library:com.android.location.provider
    library:com.android.media.remotedisplay
    library:com.google.android.gms
    library:com.google.android.trichromelibrary
    library:javax.obex
    library:org.apache.http.legacy
    library:com.example.customlib
    ...
    

    Where are these libraries installed? Is there a command similar to adb shell pm path com.exaple.packagename that would return the path of com.example.customlib? When I tried pm path, it does not return anything.



  • Most of the libraries you search can be found in /system/framework

    Example output form an Android 10 device:

        3621 2009-01-01 01:00 CustomPropInterface.jar
      193854 2009-01-01 01:00 OPCommonTelephony.jar
       21325 2009-01-01 01:00 am.jar
       13122 2009-01-01 01:00 android.hidl.base-V1.0-java.jar
       31354 2009-01-01 01:00 android.hidl.manager-V1.0-java.jar
       33410 2009-01-01 01:00 android.test.base.jar
       57302 2009-01-01 01:00 android.test.mock.jar
      106118 2009-01-01 01:00 android.test.runner.jar
        5693 2009-01-01 01:00 appwidget.jar
       31002 2009-01-01 01:00 bmgr.jar
        7445 2009-01-01 01:00 bu.jar
        5310 2009-01-01 01:00 com.android.future.usb.accessory.jar
       20050 2009-01-01 01:00 com.android.location.provider.jar
        9230 2009-01-01 01:00 com.android.media.remotedisplay.jar
        2906 2009-01-01 01:00 com.android.mediadrm.signer.jar
        7954 2009-01-01 01:00 com.android.nfc_extras.jar
       19389 2009-01-01 01:00 content.jar
        9193 2009-01-01 01:00 dpm.jar
       99829 2009-01-01 01:00 duraspeed.jar
       38582 2009-01-01 01:00 ethernet-service.jar
     3007999 2009-01-01 01:00 ext.jar
    27047266 2009-01-01 01:00 framework.jar
       17217 2009-01-01 01:00 hid.jar
      153906 2009-01-01 01:00 ims-common.jar
       13573 2009-01-01 01:00 input.jar
       54682 2009-01-01 01:00 javax.obex.jar
        3721 2009-01-01 01:00 locksettings.jar
       79905 2009-01-01 01:00 log-handler.jar
       16086 2009-01-01 01:00 media.jar
      114510 2009-01-01 01:00 mediatek-common.jar
       99278 2009-01-01 01:00 mediatek-cta.jar
      189961 2009-01-01 01:00 mediatek-framework-net.jar
      405350 2009-01-01 01:00 mediatek-framework.jar
      107978 2009-01-01 01:00 mediatek-ims-base.jar
       73974 2009-01-01 01:00 mediatek-ims-common.jar
       12061 2009-01-01 01:00 mediatek-ims-extension-plugin.jar
     2506910 2009-01-01 01:00 mediatek-ims-legacy.jar
      483881 2009-01-01 01:00 mediatek-ims-wwop-common.jar
      230333 2009-01-01 01:00 mediatek-services.jar
       49334 2009-01-01 01:00 mediatek-telecom-common.jar
      361002 2009-01-01 01:00 mediatek-telephony-base.jar
     2762490 2009-01-01 01:00 mediatek-telephony-common.jar
     1580981 2009-01-01 01:00 mediatek-wfo-legacy.jar
      114753 2009-01-01 01:00 monkey.jar
        3937 2009-01-01 01:00 mtk-wifi-service.jar
      491074 2009-01-01 01:00 org.apache.http.legacy.jar
       12445 2009-01-01 01:00 requestsync.jar
       10205 2009-01-01 01:00 sm.jar
       13273 2009-01-01 01:00 svc.jar
       13145 2009-01-01 01:00 telecom.jar
     2865674 2009-01-01 01:00 telephony-common.jar
      363793 2009-01-01 01:00 uiautomator.jar
       99817 2009-01-01 01:00 via-plugin.jar
      157682 2009-01-01 01:00 voip-common.jar
        4437 2009-01-01 01:00 vr.jar
     3391985 2009-01-01 01:00 wifi-service.jar
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2