LightBlog

samedi 21 mars 2015

[Q] Google Play services and Android modifications

I have problems with Google Play services after I made couple of small

logging source code changes to Android frameworks files. I have tried

with various GApps packages from BasketBuild.



I have rebuilt CyanogenMod12 20150318 build for hammerhead (Nexus5)

and installed also Google Apps. Everything works fine with unmodified

code. Next I tried to study and debug control flow of Android activities and

process creation by adding log output messages to a couple of class

methods in frameworks/base and recompiled again. Basically everything

still works fine but there is a nasty side effect as Google Play

services start to fail. There is a popup message:



"Unfortunately, Google Play services has stopped"



Obviously my changes are causing these problems but I do not

understand what is happening and why only Google Play services

seem to fail. Seems like modifications to final Java classes like

ActivityRecord, ActivityManagerService, ActivityStackSupervisor are

triggering these problems. I did not add or modify class function

APIs or data members. I just added couple of log prints and tests for

intents. These problems are already present during system setup.

I have to delay network configuration as otherwise this Google Play

error is causing the whole configuration phase to stuck.



Attached logcat log contains many suspicous messages:



1. Two jar files do not exist or contain no resources



The jar files actually are in /system/framework directory but for some

reason the files cannot be used.



2. Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'



Google search found couple of postings with this message and there

were hints that this could be a signing key problem. However, I did

not detect any Cyanogenmod instructions and my initial unmodified

build worked with GApps and Google services.



3. Parcel errors when unmarshalling



Class com.google.android.gms.auth.firstparty.shared.AppD escription

not found. This is causing android.os.BadParcelableException

exception.



Any ideas what could cause these problems. Here is extract from log output:



I/ActivityManager( 772): Start proc com.google.android.gms.ui for activity http://ift.tt/NfMfvh: pid=7978 uid=10022 gids={50022, 9997, 2001, 3003, 1007, 3006, 3007, 3002, 3001, 1028, 1015, 1005} abi=armeabi-v7a

E/Zygote ( 7978): ForkAndSpecializeCommon - name=com.google.android.gms.ui info=release

I/Timeline( 7945): Timeline: Activity_idle id: android.os.BinderProxy@20e35d40 time:7502907

W/ResourcesManager( 7978): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.

W/ResourcesManager( 7978): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.

I/MultiDex( 7978): VM with version 2.1.0 has multidex support

I/MultiDex( 7978): install

I/MultiDex( 7978): VM has multidex support, MultiDex support library is disabled.

I/ProviderInstaller( 7978): Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'

D/GCM ( 2484): GcmService start Intent { act=com.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=http://ift.tt/1hctW3p } com.google.android.gms.INITIALIZE

D/AuthorizationBluetoothService( 2484): Received GmsCore event: Intent { act=com.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=http://ift.tt/1EzPSiG luetoothService$AutoStarter }.

D/c ( 2484): Getting all permits...

D/a ( 2484): Opening database...

D/LocationInitializer( 2680): Restart initialization of location

D/a ( 2484): Opening database auth.proximity.permit_store...

D/a ( 2484): Closing database...

D/OpenGLRenderer( 7978): Render dirty regions requested: true

D/Atlas ( 7978): Validating map...

I/Adreno-EGL( 7978): <qeglDrvAPI_eglInitialize:410>: QUALCOMM Build: 10/24/14, 167c270, I68fa98814b

I/OpenGLRenderer( 7978): Initialized EGL, version 1.4

D/OpenGLRenderer( 7978): Enabling debug mode 0

I/ActivityManager( 772): START u0 {act=com.google.android.gms.common.account.CHOOSE_ ACCOUNT flg=0x20000000 pkg=com.google.android.gms cmp=http://ift.tt/KwdUql (has extras)} from uid 10022 on display 0

I/Timeline( 772): Timeline: Activity_windows_visible id: ActivityRecord{3cfb3e37 u0 http://ift.tt/NfMfvh t13} time:7503232

W/GLSActivity( 2484): [LegacyAuthenticator] The app AppDescription<com.google.android.gms, 10022> is invoking addAccount

W/GLSActivity( 2484): [LegacyAuthenticator] Returning intent launch AccountIntroActivity.

I/Timeline( 7978): Timeline: Activity_launch_request id:com.google.android.gms time:7503308

I/ActivityManager( 772): START u0 {flg=0x80000 cmp=http://ift.tt/1EzPTmA (has extras)} from uid 10022 on display 0

I/GLSActivity( 7978): [AccountIntroActivity] Provisioning with name/email. Edu: false

I/GLSActivity( 7978): [AccountIntroActivity] Setup a Google account using GmsCore managed workflow.

I/Timeline( 7978): Timeline: Activity_launch_request id:com.google.android.gms time:7503474

E/Parcel ( 772): Class not found when unmarshalling: com.google.android.gms.auth.firstparty.shared.AppD escription

E/Parcel ( 772): java.lang.ClassNotFoundException: com.google.android.gms.auth.firstparty.shared.AppD escription

E/Parcel ( 772): at java.lang.Class.classForName(Native Method)

E/Parcel ( 772): at java.lang.Class.forName(Class.java:308)

E/Parcel ( 772): at java.lang.Class.forName(Class.java:272)

E/Parcel ( 772): at android.os.Parcel.readParcelableCreator(Parcel.jav a:2275)

E/Parcel ( 772): at android.os.Parcel.readParcelable(Parcel.java:2239)

E/Parcel ( 772): at android.os.Parcel.readValue(Parcel.java:2146)

E/Parcel ( 772): at android.os.Parcel.readArrayMapInternal(Parcel.java :2479)

E/Parcel ( 772): at android.os.BaseBundle.unparcel(BaseBundle.java:221 )

E/Parcel ( 772): at android.os.BaseBundle.containsKey(BaseBundle.java: 269)

E/Parcel ( 772): at com.android.server.am.ActivityStackSupervisor.star tActivityLocked(ActivityStackSupervisor.java:1314)

E/Parcel ( 772): at com.android.server.am.ActivityStackSupervisor.star tActivityMayWait(ActivityStackSupervisor.java:950)

E/Parcel ( 772): at com.android.server.am.ActivityManagerService.start ActivityAsUser(ActivityManagerService.java:3654)

E/Parcel ( 772): at com.android.server.am.ActivityManagerService.start Activity(ActivityManagerService.java:3641)

E/Parcel ( 772): at android.app.ActivityManagerNative.onTransact(Activ ityManagerNative.java:141)

E/Parcel ( 772): at com.android.server.am.ActivityManagerService.onTra nsact(ActivityManagerService.java:2476)

E/Parcel ( 772): at android.os.Binder.execTransact(Binder.java:446)

E/Parcel ( 772): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.auth.firstparty.shared.App Description" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

E/Parcel ( 772): at dalvik.system.BaseDexClassLoader.findClass(BaseDex ClassLoader.java:56)

E/Parcel ( 772): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 11)

E/Parcel ( 772): at java.lang.ClassLoader.loadClass(ClassLoader.java:4 69)

E/Parcel ( 772): ... 16 more

E/Parcel ( 772): Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.auth.firstparty.shared.AppD escription

E/Parcel ( 772): at java.lang.Class.classForName(Native Method)

E/Parcel ( 772): at java.lang.BootClassLoader.findClass(ClassLoader.ja va:781)

E/Parcel ( 772): at java.lang.BootClassLoader.loadClass(ClassLoader.ja va:841)

E/Parcel ( 772): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 04)

E/Parcel ( 772): ... 17 more

E/Parcel ( 772): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

F/ActivityManager( 772): Activity Manager Crash

F/ActivityManager( 772): android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.auth.firstparty.shared.AppD escription

F/ActivityManager( 772): at android.os.Parcel.readParcelableCreator(Parcel.jav a:2289)

F/ActivityManager( 772): at android.os.Parcel.readParcelable(Parcel.java:2239)

F/ActivityManager( 772): at android.os.Parcel.readValue(Parcel.java:2146)

F/ActivityManager( 772): at android.os.Parcel.readArrayMapInternal(Parcel.java :2479)

F/ActivityManager( 772): at android.os.BaseBundle.unparcel(BaseBundle.java:221 )

F/ActivityManager( 772): at android.os.BaseBundle.containsKey(BaseBundle.java: 269)

F/ActivityManager( 772): at com.android.server.am.ActivityStackSupervisor.star tActivityLocked(ActivityStackSupervisor.java:1314)

F/ActivityManager( 772): at com.android.server.am.ActivityStackSupervisor.star tActivityMayWait(ActivityStackSupervisor.java:950)

F/ActivityManager( 772): at com.android.server.am.ActivityManagerService.start ActivityAsUser(ActivityManagerService.java:3654)

F/ActivityManager( 772): at com.android.server.am.ActivityManagerService.start Activity(ActivityManagerService.java:3641)

F/ActivityManager( 772): at android.app.ActivityManagerNative.onTransact(Activ ityManagerNative.java:141)

F/ActivityManager( 772): at com.android.server.am.ActivityManagerService.onTra nsact(ActivityManagerService.java:2476)

F/ActivityManager( 772): at android.os.Binder.execTransact(Binder.java:446)

D/AndroidRuntime( 7978): Shutting down VM

--------- beginning of crash

E/AndroidRuntime( 7978): FATAL EXCEPTION: main

E/AndroidRuntime( 7978): Process: com.google.android.gms.ui, PID: 7978

E/AndroidRuntime( 7978): java.lang.RuntimeException: Unable to start activity ComponentInfo{http://ift.tt/1OjnSrB ty}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.auth.firstparty.shared.AppD escription

E/AndroidRuntime( 7978): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2329)

E/AndroidRuntime( 7978): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2391)

E/AndroidRuntime( 7978): at android.app.ActivityThread.access$900(ActivityThre ad.java:147)

E/AndroidRuntime( 7978): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1296)

E/AndroidRuntime( 7978): at android.os.Handler.dispatchMessage(Handler.java:10 2)

E/AndroidRuntime( 7978): at android.os.Looper.loop(Looper.java:135)

E/AndroidRuntime( 7978): at android.app.ActivityThread.main(ActivityThread.jav a:5256)

E/AndroidRuntime( 7978): at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime( 7978): at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime( 7978): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:898)

E/AndroidRuntime( 7978): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:693)

E/AndroidRuntime( 7978): Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.auth.firstparty.shared.AppD escription

E/AndroidRuntime( 7978): at android.os.Parcel.readException(Parcel.java:1542)

E/AndroidRuntime( 7978): at android.os.Parcel.readException(Parcel.java:1493)

E/AndroidRuntime( 7978): at android.app.ActivityManagerProxy.startActivity(Act ivityManagerNative.java:2414)

E/AndroidRuntime( 7978): at android.app.Instrumentation.execStartActivity(Inst rumentation.java:1480)

E/AndroidRuntime( 7978): at android.app.Activity.startActivityForResult(Activi ty.java:3736)

E/AndroidRuntime( 7978): at android.app.Activity.startActivityForResult(Activi ty.java:3697)

E/AndroidRuntime( 7978): at android.support.v4.app.q.startActivityForResult(So urceFile:817)

E/AndroidRuntime( 7978): at com.google.android.gms.auth.gsf.b.startActivityFor Result(SourceFile:660)

E/AndroidRuntime( 7978): at com.google.android.gms.auth.gsf.b.a(SourceFile:513 )

E/AndroidRuntime( 7978): at com.google.android.gms.auth.gsf.AccountIntroActivi ty.i(SourceFile:358)

E/AndroidRuntime( 7978): at com.google.android.gms.auth.gsf.AccountIntroActivi ty.d(SourceFile:213)

E/AndroidRuntime( 7978): at com.google.android.gms.auth.gsf.AccountIntroActivi ty.onCreate(SourceFile:188)

E/AndroidRuntime( 7978): at android.app.Activity.performCreate(Activity.java:5 933)

E/AndroidRuntime( 7978): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1105)

E/AndroidRuntime( 7978): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2282)

E/AndroidRuntime( 7978): ... 10 more

W/ActivityManager( 772): Force finishing activity http://ift.tt/1EzPTmA

W/ActivityManager( 772): Force finishing activity http://ift.tt/KwdUql

W/DropBoxManagerService( 772): Dropping: system_server_wtf (1497 > 0 bytes)

W/DropBoxManagerService( 772): Dropping: system_app_crash (2410 > 0 bytes)





from xda-developers http://ift.tt/1EzPTmC

via IFTTT

Aucun commentaire:

Enregistrer un commentaire