8.2.5 Pushing the Shim libraries to the target

Use adb to push the Shim libraries to the target.

Prerequisites

Make sure that the Android SDK is installed.

Procedure

  1. Ensure the adb client is available.

    On Linux:

    export PATH=$PATH:<path of android-sdk-linux>/platform-tools/
    adb connect localhost:5212

    On Windows:

    set PATH=%PATH%;<installation_directory>\<path of android-sdk-windows>\platform-tools
    adb connect localhost:5212

    Note:

  2. From the target terminal, launch the adbd service with the following commands:
    su
    ifconfig eth0 up
    dhcptool eth0
    stop adbd
    setprop service.adb.tcp.port 6901
    start adbd
  3. On the host, run adb connect to connect to the target, for example:
    adb connect localhost:5212
  4. If there are other GLES libraries, for example libGLES_mali.so, change their suffixes in order to hide them. This change allows the *_vimpl libraries to be loaded.
  5. From the host, remove libEGL*.so and libGLES*.so from the target.

    Note:

    Remember to back up the needed files before removal.

    The commands are:

    adb shell rm /system/vendor/lib/egl/libEGL*.so
    adb shell rm /system/vendor/lib/egl/libGLES*.so
    adb shell rm /system/vendor/lib64/egl/libEGL*.so
    adb shell rm /system/vendor/lib64/egl/libGLES*.so
    
  6. Note:

    For versions of Android older than 6.0, change /system/vendor/lib[64]/egl to /system/lib[64]/egl in the commands below.
    From the folder containing the Generic Graphics Accelerator, push the Shim libraries to the target using adb.
    For example, from a Linux host:
    • Use the following commands to connect to a 32-bit Android target:

      adb remount
      
      adb push  GGA/shim/linux-armv7sfl/rel/libGLES.so /system/vendor/lib/egl/libGLES_vimpl.so
      adb push  GGA/shim/linux-armv7sfl/rel/<platform>/libnwhal.so     /system/lib/libnwhal.so
      
      adb shell chmod 0644 system/vendor/lib/egl/libGLES_vimpl.so
      adb shell chmod 0644 /system/lib/libnwhal.so
      
    • Use the following commands to connect to a 64-bit Android target:

      adb remount
      
      adb push  GGA/shim/linux-armv7sfl/rel/libGLES.so   /system/vendor/lib/egl/libGLES_vimpl.so
      adb push  GGA/shim/linux-armv7sfl/rel/<platform>/libnwhal.so       /system/lib/libnwhal.so
      
      adb push  GGA/shim/linux-armv8l_64/rel/libGLES.so  /system/vendor/lib64/egl/libGLES_vimpl.so
      adb push  GGA/shim/linux-armv8l_64/rel/<platform>/libnwhal.so      /system/lib64/libnwhal.so
      
      adb shell chmod 0644 /system/lib/libnwhal.so
      adb shell chmod 0644 /system/vendor/lib/egl/libGLES_vimpl.so
      adb shell chmod 0644 /system/lib64/libnwhal.so
      adb shell chmod 0644 /system/vendor/lib64/egl/libGLES_vimpl.so
      
    From a Windows host:
    • Use the following commands to connect to a 32-bit Android target:

      adb remount
      
      adb push  GGA\shim\linux-armv7sfl\rel\libGLES.so /system/vendor/lib/egl/libGLES_vimpl.so
      adb push  GGA\shim\linux-armv7sfl\rel\<platform>\libnwhal.so     /system/lib/libnwhal.so
      
      adb shell chmod 0644 system/vendor/lib/egl/libGLES_vimpl.so
      adb shell chmod 0644 /system/lib/libnwhal.so
      
    • Use the following commands to connect to a 64-bit Android target:

      adb remount
      
      adb push  GGA\shim\linux-armv7sfl\rel\libGLES.so   /system/vendor/lib/egl/libGLES_vimpl.so
      adb push  GGA\shim\linux-armv7sfl\rel\<platform>\libnwhal.so       /system/lib/libnwhal.so
      
      adb push  GGA\shim\linux-armv8l_64\rel\libGLES.so  /system/vendor/lib64/egl/libGLES_vimpl.so
      adb push  GGA\shim\linux-armv8l_64/rel\<platform>\libnwhal.so      /system/lib64/libnwhal.so
      
      adb shell chmod 0644 /system/lib/libnwhal.so
      adb shell chmod 0644 /system/vendor/lib/egl/libGLES_vimpl.so
      adb shell chmod 0644 /system/lib64/libnwhal.so
      adb shell chmod 0644 /system/vendor/lib64/egl/libGLES_vimpl.so
      
Non-ConfidentialPDF file icon PDF versionARM 100965_1101_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.