build-processapkandroid-sourceflash-player-11

How to add Flash Player prebuilt application to the system.img in android?


I am trying to customize my android system by adding Flash Player to the default system applications. I added the .apk file to packages/apps/FlashPlayer, with the Android.mk file

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := FlashPlayer
LOCAL_SRC_FILES := FlashPlayer.apk
LOCAL_MODULE_SUFFIX := .apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)

This apk also uses some libraries: libflashplayer.so libstagefright_froyo.so. libstagefright_honeycomb.so and libysshared.so.

I created a module for each one and added them to generic.mk in the variable PRODUCT_PACKAGES

PRODUCT_PACKAGES:=  libflashplayer \
libstagefright_froyo \
libstagefright_honeycomb \
libysshared \
FlashPlayer \

I tested with adb shell, the apk is in /system/app and the libs are present in /system/lib but when I try to play a movie from a browser, it says that the flash player is not installed.

However if I manually install FlashPlayer with adb install command the movie can be played from browser.

Can you help with this issue?


Solution

  • Libs should be in /system/lib/plugins/com.adobe.flashplayer, according to PluginManager.java.