|Adding prebuilt APK fails||Tiago Vieira||6/4/10 12:19 PM|
Hi everyone, it's my first email to this group.
I'm building Android from source. I'm using all applications already in generic.mk and product.mk within the build folder. I'm also adding some prebuilt APKs following the Prebuilt cookbook on the Open Source website.
One example is Facebook. I extracted the Facebook.apk from the Marketplace. If I install this app through 'adb install' it works ok. But when I build with this apk added into the build, it doesn't work. I've done the samething for Twitter and it worked fine.
This is a piece of the logcat:
W/PackageManager( 89): Exception reading apk: /system/app/AndroidFacebook.apk
Thanks in advance,
|Re: Adding prebuilt APK fails||FrankG||6/7/10 12:59 AM|
I don't know the Prebuilt cookbook ( can you give me a pointer ?),
so I have no idea how you Build-File looks like.
Nevertheless I have good success with kind of Android.mk File :
LOCAL_MODULE := <YourAppName>
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
The special thing is IMHO the "include $(BUILD_PREBUILT)".
Good luck !
> W/PackageManager( 89): at com.android.server.PackageManagerService.performDexOptLI(PackageManagerService.java:2153)
> W/PackageManager( 89): at com.android.server.PackageManagerService.performDexOpt(PackageManagerService.java:2139)
> W/PackageManager( 89): at com.android.server.am.ActivityManagerService.ensurePackageDexOpt(ActivityManagerService.java:1750)
> W/PackageManager( 89): at com.android.server.am.ActivityManagerService.generateApplicationProvidersLocked(ActivityManagerService.java:7818)
> W/PackageManager( 89): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:5513)
> W/PackageManager( 89): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:5673)
> W/PackageManager( 89): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:311)
> W/PackageManager( 89): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1552)
|Re: Adding prebuilt APK fails||nguyenvuthiennga||6/8/10 12:47 AM|
I also tried to add pre-built apk. I follows the instructions from
Compiling gives no error but I don't see my package in installed-
files.txt as well as in the launcher.
Does anyone have a hint?
Thanks in advance,
|Re: Adding prebuilt APK fails||FrankG||6/8/10 12:59 AM|
|Re: Adding prebuilt APK fails||Pavan Savoy||6/8/10 2:21 AM|
Wonder why the "mm" command installs the .apk but not the top level
make -j2 command.
Is there a vendor specific file - where I can mention the same ? i.e
list of apps to be installed like the build/target/product/core.mk ?
|Re: Adding prebuilt APK fails||nguyenvuthiennga||6/8/10 5:08 AM|
Actually, I added the entry in vendor/aosp/products/aosp_core.mk
I did the same with my applications and it works.
Is there difference between mk files in build/target/product and
|Re: Adding prebuilt APK fails||FrankG||6/8/10 6:16 AM|
|Re: Adding prebuilt APK fails||Tiago Vieira||6/21/10 8:35 AM|
I solved the problem. When I install an APK via adb, the process extracts the libraries from the APK and copy it to some folder which is visible by the application itself.
The problem was when I add an APK through the prebuilt process, the .so library needed by the app was not being extracted (actually there is no "installation process", it is just copying files across) .
What I've done was finding through the logcat what .so was extracted for the particular APK during adb installation. Then I pull the file out from the handset and add into the Android.mk like:
That library is now going into a shared place and the application starts correctly. I had to do that for 3 or 4 APK I've been built as preloaded app.
I wouldn't change any file within the build directory as it can be overwritten in a future release and you are going to have lots of headaches in a future. Keep your changes within vendor directory as per Google's documentation on the PDK website.
|Re: Adding prebuilt APK fails||FrankG||6/22/10 6:41 AM|
thanks for your update.
But your original stacktrace is strange and misleading. I think nearly
everyone who add a prebuild app with some ndk stuff know this problem,
but normaly the error
indicates that the app is searching under /system/lib for his shared
library. But I your case their was no indication for this ?
Nevertheless nice if is solved know for you.
Best regards !
> > For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.- Zitierten Text ausblenden -
|Re: Adding prebuilt APK fails||Tiago Vieira||6/22/10 6:55 AM|
When I installed those apks via adb I found their libraries in /data/data/<packagename>/lib folder.
This looks a place where the apk shares libraries to itself. That would be OK if the library goes to that place during a prebuilt, which is not the case. The library just doesn't come out of the apk.
I'm new to the Android build system, so that was the way it was solved for the moment. But, it would be good to know what would be the best practice in this case. It is difficult to find more information about the Android Build System apart from what the PDK site has.
|Re: Adding prebuilt APK fails||FrankG||6/23/10 7:57 AM|
I have a simliar makefile ( without OVERRIDE_BUILT_MODULE_PATH := $
and with them the Shared Libraries are put in the generated system
image under /system/lib.
Good luck !
> >>> For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.-Zitierten Text ausblenden -
|Re: Adding prebuilt APK fails||Dianne Hackborn||6/23/10 9:42 AM|
The mm and mmm commands are short-cuts for use during rapid iteration of development to build specific targets without doing the full dependency tracking or product resolution. They thus can behave is slightly different ways from a regular make.Dianne Hackborn
Android framework engineer
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.
|Re: Adding prebuilt APK fails||dev.c...@gmail.com||7/10/17 7:27 AM|
I am still facing this problem. Can any one tell me where to place these libraries means in which folder of aosp.
|Re: Adding prebuilt APK fails||dev.c...@gmail.com||7/13/17 7:48 AM|
After Copying lib files at required location . My app is able to find but now Permission Issue.
java.lang.UnsatisfiedLinkError: dlopen failed: can't protect segments for "/system/app/XYZ/lib/arm/libtmfbeng.so": Permission denied
at com.trendmicro.virdroid.feedback.FeedbackEngine.<clinit>(Unknown Source)
at com.trendmicro.virdroid.service.SafeMobileService.a(Unknown Source)
at com.trendmicro.virdroid.service.SafeMobileService.onStartCommand(Unknown Source)