Android system integration Google Maps and Google Search apk considerations

Source: Internet
Author: User

Recently the company needs to participate in an international show, need to integrate Google Maps and Google search apk, attention is the source code integration. In this process encountered a number of pits, summed up to hope that everyone attention, after encountering similar problems can be consulted.

As we all know, the source code integration APK mainly has two forms, one is pre-installed to/system/app below, one is pre-installed to/data/app under, of course, there is a more special is/system/priv-app. Before I integrated, I first downloaded the latest Google apk (my system environment is 5.0.1) in an app market, which were: Google Play Service, Google Service Framework, Google Play Store , Google Maps, and Google Search. The first thing I did was to integrate these apk directly into the/system/app, for example in Google Maps

local_path           := $ (Prebuilt_path) include $ (clear_vars) local_module         := googlemapslocal_module_tags   := optionallocal_module_class   := appslocal_certificate   := presignedlocal_module_suffix := . APKLOCAL_SRC_FILES     :=&NBSP, .... /n5100/system/app/googlemaps/googlemaps.apkinclude $ (build_prebuilt) 

But the compiled ROM will error when booting, mainly two kinds of errors: one is to prompt Google Play Service sopped, and the other is Google Maps installation location is incorrect. These two questions puzzled me for a long time. On Google Maps error, I found that the normal install is installed in the/data/app directory can be run normally, but put in/system/app under the. ADB shell in to look at the directory structure, suddenly found that the directory of the app also has dependent so file, only then suddenly big mistake. /data/app APK will go to the lib/arm in their own directory to find so, and/system/app will be looking for from/system/lib, I have only integrated the APK into the/system/app, and ignored the/system/lib under So, The ADB pull out data/app dependent so, and then integrated into the/system/lib. Google Play Service and Google search also need this step, Google Play store and Google Service Framework is not dependent on so. Take Google Maps as an example to add the following so integration

local_path          := $ (PREBUILT_PATH) include $ ( Clear_vars) Local_module        := libcrashreportererlocal_module_ Tags   := optionallocal_module_class  := shared_librarieslocal_certificate    := platformLOCAL_MODULE_SUFFIX := .soLOCAL_SRC_FILES      :=&NBSP, .... /n5100/system/app/googlemaps/libs/libcrashreporterer.soinclude $ (build_prebuilt) LOCAL_PATH           := $ (Prebuilt_path) include $ (CLEAR_VARS) LOCAL_MODULE         := libgmm-jniLOCAL_MODULE_TAGS   :=  optionallocal_module_class  := shared_librarieslocal_certificate   :=  PLATFORMLOCAL_MODULE_SUFFIX := .SOLOCAL_SRC_FILES     :=&NBSP, .... /n5100/system/app/googlemaps/libs/libgmm-jni.soinclude $ (build_prebuilt) 

Ok, after the above steps, Google Maps will not error, but Google Play Service or error, see log is the Google Service framework, some permission can not find, at this time, the inspiration is now Google The Service framework was integrated into the/priv-app, and it was a surprisingly work-like work. It seems to be a good look at the differences in these directories.

Local_path: = $ (Prebuilt_path) include $ (clear_vars) Local_module: = Googleserviceframeworklocal_module_tags : = Optionallocal_module_class: = appslocal_certificate: = presignedlocal_privileged_module: = TrueLOCAL_MODULE_SUFFI X: =. Apklocal_src_files: =.. /n5100/system/priv-app/googleserviceframework/googleserviceframework.apkinclude $ (BUILD_PREBUILT)

After the above steps, all the work has been accomplished. However, still encountered another problem, the system also integrates a domestic manufacturer's navigation software, in this method will find that the navigation software relies on a so library and the system's original so will have a naming conflict, it seems to be extracted from an Android version of So, despise not change a name, So integrated into the/system/app hopeless, that can only be integrated into the/data/app bar, about the integration apk to/data/app far more than/system/app trouble, the online poor some information, no outside the following principle: Save the APK to a folder in the system ROM , the first time the system starts by executing a script command from a daemon service in init.rc, the APK copy is copied to/data/app.

Specific reference Links: http://blog.csdn.net/zuiaikg703/article/details/12445525

Http://www.cnblogs.com/MMLoveMeMM/articles/4087014.html

Http://blog.chinaunix.net/uid-29535415-id-4168539.html

Android system integration Google Maps and Google Search apk considerations

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.