Table of Contents

https://developer.android.com/studio/command-line/adb

Проблема

Приложение после заупска сразу закрывается, а в логе такое:

adb logcat *:D -e ae.uaepass.mainapp

03-13 11:53:31.752   946  2466 I ActivityManager: BGTaskClear startActivityLocked intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ae.uaepass.mainapp/.core.platform.main.MainActivity bnds=[116,527][296,707] }
03-13 11:53:31.752   946  2466 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ae.uaepass.mainapp/.core.platform.main.MainActivity bnds=[116,527][296,707]} from uid 10091
03-13 11:53:31.771   946  1119 D ViewRootImpl[mainapp]: hardware acceleration is disabled, fakeHwAccelerated = true, HardwareRenderer.sRendererDisabled = false, forceHwAccelerated = false, HardwareRenderer.sSystemRendererDisabled = false, this = ViewRoot{de72d55 Splash Screen ae.uaepass.mainapp,ident = 5}
03-13 11:53:31.778   946  1170 D DuraSpeed/DuraSpeedService: switchState currentPackage = ae.uaepass.mainapp, event =1005
03-13 11:53:31.782   405   405 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:0,p:-1,c:405) setConsumerName: Splash Screen ae.uaepass.mainapp#0
03-13 11:53:31.782   405   405 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:0,p:-1,c:405) setDefaultBufferSize: width=1080 height=1920
03-13 11:53:31.791   405  1186 I BufferQueueProducer: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:2,p:946,c:405) connect(P): api=2 producer=(946:system_server) producerControlledByApp=false
03-13 11:53:31.807   946  1430 I ActivityManager: Start proc 32233:ae.uaepass.mainapp/u0a216 for activity ae.uaepass.mainapp/.core.platform.main.MainActivity
03-13 11:53:31.869   399   501 I vendor.mediatek.hardware.power@1.1-impl: notifyAppState pack:ae.uaepass.mainapp, act:ae.uaepass.mainapp.core.platform.main.MainActivity, pid:32233, state:1
03-13 11:53:31.870   399   423 I libPerfService: [perfNotifyAppState] foreground:ae.uaepass.mainapp, pid:32233
03-13 11:53:33.720   946  2466 I PowerSave: PowerManagerService isInterceptWakeLock packageName:ae.uaepass.mainapp, tag:fiid-sync, ws:null
03-13 11:53:33.721   946  2466 D AppOps  : startOperation: allowing code 40 uid 10216 package ae.uaepass.mainapp
03-13 11:53:34.006 32233 32402 I FA      : To enable faster debug mode event logging run:
03-13 11:53:34.006 32233 32402 I FA      :   adb shell setprop debug.firebase.analytics.app ae.uaepass.mainapp
03-13 11:53:34.220   946 21877 I ActivityManager: Force stopping ae.uaepass.mainapp appid=10216 user=0: clear data
03-13 11:53:34.220   946 21877 I ActivityManager: Killing 32233:ae.uaepass.mainapp/u0a216 (adj 0): stop ae.uaepass.mainapp
03-13 11:53:34.244   946 21877 I ActivityManager: Start proc 32413:ae.uaepass.mainapp/u0a216 for activity ae.uaepass.mainapp/.core.platform.main.MainActivity
03-13 11:53:34.249   946 21877 I ActivityManager:   Force finishing activity ActivityRecord{15ce44f u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51744}
03-13 11:53:34.267   946 13314 I PowerSave1: PowerManagerService AddHistoryWakeLocks packageName:ae.uaepass.mainapp, tag:fiid-sync
03-13 11:53:34.286   405   405 I SurfaceFlinger: screenshot (Splash Screen ae.uaepass.mainapp#0)
03-13 11:53:34.294   946 21877 I ActivityManager:   Force finishing activity ActivityRecord{15ce44f u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51744 f}
03-13 11:53:34.294   946 21877 W ActivityManager: Duplicate finish request for ActivityRecord{15ce44f u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51744 f}
03-13 11:53:34.340   946   980 I ActivityManager: Force stopping ae.uaepass.mainapp appid=10216 user=-1: clearApplicationUserData
03-13 11:53:34.340   946   980 I ActivityManager: Killing 32413:ae.uaepass.mainapp/u0a216 (adj -10000): stop ae.uaepass.mainapp
03-13 11:53:34.346   946   980 I ActivityManager:   Force finishing activity ActivityRecord{15ce44f u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51744 f}
03-13 11:53:34.346   946   980 W ActivityManager: Duplicate finish request for ActivityRecord{15ce44f u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51744 f}
03-13 11:53:34.480   405  1186 I BufferQueueProducer: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:2,p:946,c:405) disconnect(P): api 2
03-13 11:53:34.481   405  1186 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:2,p:-1,c:405) getReleasedBuffers: returning mask 0xffffffffffffffff
03-13 11:53:34.497   405   405 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:2,p:-1,c:-1) disconnect(C)
03-13 11:53:34.498   405   405 I BufferQueue: [Splash Screen ae.uaepass.mainapp#0](this:0x7adda34000,id:41,api:2,p:-1,c:-1) ~BufferQueueCore
03-13 11:53:41.937   946  7003 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp flg=0x1000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.GmsIntentOperationService (has extras) }
03-13 11:53:41.947   946  2466 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp flg=0x1000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) }
03-13 11:53:42.005   946  4752 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=com.google.android.gms.config.ACTION_PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp cmp=com.google.android.gms/.config.ConfigService }
03-13 11:53:42.013   946  2466 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp flg=0x1000010 pkg=com.google.android.gms cmp=com.google.android.gms/.icing.service.IndexWorkerService (has extras) }
03-13 11:53:42.034   946  7003 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=com.google.android.gms.wearable.ACTION_PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp cmp=com.google.android.gms/.wearable.service.WearableControlService }
03-13 11:53:42.073  1945 11343 I Icing   : doRemovePackageData ae.uaepass.mainapp

После переустановки через adb со всеми пермишинами:

adb push ~/Downloads/UAE\ PASS_v4.2.6_apkpure.com.apk /data/local/tmp/uaepass.apk
adb shell pm install -g -r "/data/local/tmp/uaepass.apk"

лог стал такой:

03-13 12:15:50.814   946   957 I ActivityManager: BGTaskClear startActivityLocked intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ae.uaepass.mainapp/.core.platform.main.MainActivity bnds=[116,527][296,707] }
03-13 12:15:50.815   946   957 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ae.uaepass.mainapp/.core.platform.main.MainActivity bnds=[116,527][296,707]} from uid 10091
03-13 12:15:50.834   946  1119 D ViewRootImpl[mainapp]: hardware acceleration is disabled, fakeHwAccelerated = true, HardwareRenderer.sRendererDisabled = false, forceHwAccelerated = false, HardwareRenderer.sSystemRendererDisabled = false, this = ViewRoot{f19014d Splash Screen ae.uaepass.mainapp,ident = 14}
03-13 12:15:50.836   946  1170 D DuraSpeed/DuraSpeedService: switchState currentPackage = ae.uaepass.mainapp, event =1005
03-13 12:15:50.852   405   405 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:0,p:-1,c:405) setConsumerName: Splash Screen ae.uaepass.mainapp#0
03-13 12:15:50.852   405   405 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:0,p:-1,c:405) setDefaultBufferSize: width=1080 height=1920
03-13 12:15:50.856   946  1713 I ActivityManager: Start proc 11507:ae.uaepass.mainapp/u0a217 for activity ae.uaepass.mainapp/.core.platform.main.MainActivity
03-13 12:15:50.859   405   576 I BufferQueueProducer: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:2,p:946,c:405) connect(P): api=2 producer=(946:system_server) producerControlledByApp=false
03-13 12:15:50.893   399   501 I vendor.mediatek.hardware.power@1.1-impl: notifyAppState pack:ae.uaepass.mainapp, act:ae.uaepass.mainapp.core.platform.main.MainActivity, pid:11507, state:1
03-13 12:15:50.894   399   423 I libPerfService: [perfNotifyAppState] foreground:ae.uaepass.mainapp, pid:11507
03-13 12:15:50.972  1201  2467 W asset   : Asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk is neither a directory nor file (type=1).
03-13 12:15:50.973  1201  2467 E ResourcesManager: failed to add asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk
03-13 12:15:50.974  1201  2467 W PackageManager: Failure retrieving resources for ae.uaepass.mainapp
03-13 12:15:50.974  1201  2467 W asset   : Asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk is neither a directory nor file (type=1).
03-13 12:15:50.975  1201  2467 E ResourcesManager: failed to add asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk
03-13 12:15:50.975  1201  2467 W PackageManager: Failure retrieving resources for ae.uaepass.mainapp
03-13 12:15:50.976  1201  2467 W asset   : Asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk is neither a directory nor file (type=1).
03-13 12:15:50.976  1201  2467 E ResourcesManager: failed to add asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk
03-13 12:15:50.977  1201  2467 W PackageManager: Failure retrieving resources for ae.uaepass.mainapp
03-13 12:15:50.977  1201  2467 W asset   : Asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk is neither a directory nor file (type=1).
03-13 12:15:50.977  1201  2467 E ResourcesManager: failed to add asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk
03-13 12:15:50.978  1201  2467 W PackageManager: Failure retrieving resources for ae.uaepass.mainapp
03-13 12:15:50.978  1201  2467 W asset   : Asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk is neither a directory nor file (type=1).
03-13 12:15:50.978  1201  2467 E ResourcesManager: failed to add asset path /data/app/ae.uaepass.mainapp-0s3E5xOvt5HhUEpIzRQdaQ==/base.apk
03-13 12:15:50.979  1201  2467 W PackageManager: Failure retrieving resources for ae.uaepass.mainapp
03-13 12:15:51.066   946  1713 I PowerSave: PowerManagerService isInterceptWakeLock packageName:ae.uaepass.mainapp, tag:fiid-sync, ws:null
03-13 12:15:51.067   946  1713 D AppOps  : startOperation: allowing code 40 uid 10217 package ae.uaepass.mainapp
03-13 12:15:51.268   946  1709 I ActivityManager: Force stopping ae.uaepass.mainapp appid=10217 user=0: clear data
03-13 12:15:51.269   946  1709 I ActivityManager: Killing 11507:ae.uaepass.mainapp/u0a217 (adj 0): stop ae.uaepass.mainapp
03-13 12:15:51.298   946  1709 I ActivityManager: Start proc 11552:ae.uaepass.mainapp/u0a217 for activity ae.uaepass.mainapp/.core.platform.main.MainActivity
03-13 12:15:51.306   946  1382 I PowerSave1: PowerManagerService AddHistoryWakeLocks packageName:ae.uaepass.mainapp, tag:fiid-sync
03-13 12:15:51.307   946  1709 I ActivityManager:   Force finishing activity ActivityRecord{f2b9252 u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51756}
03-13 12:15:51.334   405   405 I SurfaceFlinger: screenshot (Splash Screen ae.uaepass.mainapp#0)
03-13 12:15:51.344   946  1709 I ActivityManager:   Force finishing activity ActivityRecord{f2b9252 u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51756 f}
03-13 12:15:51.344   946  1709 W ActivityManager: Duplicate finish request for ActivityRecord{f2b9252 u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51756 f}
03-13 12:15:51.359   946   980 I ActivityManager: Force stopping ae.uaepass.mainapp appid=10217 user=-1: clearApplicationUserData
03-13 12:15:51.359   946   980 I ActivityManager: Killing 11552:ae.uaepass.mainapp/u0a217 (adj -10000): stop ae.uaepass.mainapp
03-13 12:15:51.375   946   980 I ActivityManager:   Force finishing activity ActivityRecord{f2b9252 u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51756 f}
03-13 12:15:51.375   946   980 W ActivityManager: Duplicate finish request for ActivityRecord{f2b9252 u0 ae.uaepass.mainapp/.core.platform.main.MainActivity t51756 f}
03-13 12:15:51.569   405  1136 I BufferQueueProducer: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:2,p:946,c:405) disconnect(P): api 2
03-13 12:15:51.569   405  1136 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:2,p:-1,c:405) getReleasedBuffers: returning mask 0xffffffffffffffff
03-13 12:15:51.584   405   405 I BufferQueueConsumer: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:2,p:-1,c:-1) disconnect(C)
03-13 12:15:51.585   405   405 I BufferQueue: [Splash Screen ae.uaepass.mainapp#0](this:0x7ae41eb800,id:81,api:2,p:-1,c:-1) ~BufferQueueCore
03-13 12:15:51.623   946  1382 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp flg=0x1000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.GmsIntentOperationService (has extras) }
03-13 12:15:51.626   946 22106 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp flg=0x1000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) }
03-13 12:15:51.636   946  1713 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=com.google.android.gms.config.ACTION_PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp cmp=com.google.android.gms/.config.ConfigService }
03-13 12:15:51.642   946 22106 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp flg=0x1000010 pkg=com.google.android.gms cmp=com.google.android.gms/.icing.service.IndexWorkerService (has extras) }
03-13 12:15:51.646   946 10688 I ActivityManager: BGTaskClear startServiceLocked service:Intent { act=com.google.android.gms.wearable.ACTION_PACKAGE_DATA_CLEARED dat=package:ae.uaepass.mainapp cmp=com.google.android.gms/.wearable.service.WearableControlService }
03-13 12:15:51.655  1945  2285 I Icing   : doRemovePackageData ae.uaepass.mainapp

Profiling (Tracing)

При попытке посмотреть какие системные вызовы предшествуют падению

adb shell am start -n "ae.uaepass.mainapp/.core.platform.main.MainActivity" --start-profiler -S -P /data/local/tmp/all.trace

Появляется такое:

Starting: Intent { cmp=ae.uaepass.mainapp/.core.platform.main.MainActivity }
Security exception: Process not debuggable: ae.uaepass.mainapp

Значит - надо перепоковать APK и добавить в манифест такое:

    <application .. android:debuggable="true">
       ...
    </application>

Утилиты для перепаковки манифеста