Page does not render completely and keeps on flickering through appium but renders correctly when done manually - android

I have a test case scenario to add medicine to a cart as below:
send medicine name in textbox
from the search results select the medicine by clicking ADD button
verify add medicine
Issue: When I click on the add button in step 2, the medicine gets added, but the page starts to flicker i.e. page keeps on rendering or refreshing (I don't know what to call in exactly), and so I am not able to perform the next steps.
One more concern is that the same scenario works perfectly when executed manually. The issue occurs only for execution done via appium. If I stop the appium server at the point where issue occurs, the flickering stops.
So seems to me like appium is messing something up.
My Android app is React Native app.
At the point of failure I can see below failure in adb logs:
Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
ADB logs:
09-19 15:20:05.274 2132 2132 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-19 15:20:05.690 2132 2132 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-19 15:20:10.719 2132 2132 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-19 15:20:10.770 15240 15240 I chatty : uid=10105(com.medlife.customer) expire 5 lines
09-19 15:20:10.784 2132 2132 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-19 15:20:10.809 2132 2132 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-19 15:20:10.916 2132 2132 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
ADB logs while executing on real device:
09-26 16:11:30.314 775 775 D SurfaceFlinger: duplicate layer name: changing com.medlife.customer/com.medlife.customer.MainActivity to com.medlife.customer/com.medlife.customer.MainActivity#1
09-26 16:11:30.524 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 45 lines
09-26 16:11:30.611 775 1301 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.medlife.customer#0
09-26 16:11:30.611 775 1301 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.medlife.customer#0
09-26 16:11:32.669 30011 30132 I chatty : uid=10273(com.medlife.customer) expire 5 lines
09-26 16:11:32.695 30011 30134 I chatty : uid=10273(com.medlife.customer) expire 4 lines
09-26 16:11:32.980 775 1301 W SurfaceFlinger: Attempting to set client state on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-26 16:11:32.980 775 1301 W SurfaceFlinger: Attempting to destroy on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-26 16:11:33.313 30011 30022 I chatty : uid=10273(com.medlife.customer) expire 3 lines
09-26 16:11:33.317 30011 30020 I chatty : uid=10273(com.medlife.customer) expire 36 lines
09-26 16:11:43.478 30011 30011 I chatty : uid=10273(com.medlife.customer) expire 12 lines
09-26 16:11:46.282 1451 1644 D ActivityManager: handleProcessStartedLocked mDoneFinishBooting && app.pid != 0 ---> notifyProcessStart, app.processName = android:ui, app.info = ApplicationInfo{58c1294 android}, app.hostingType = activity, getHostingName() = ComponentInfo{android/com.android.internal.app.ChooserActivity}, getIntentFlag() = 0, getIsPackageRunning() = false, app = ProcessRecord{ae3a8d2 30232:android:ui/1000}, getExtraData() = Bundle[{ACTIVITY_TASK_AFFINITY=android, ACTIVITY_INTENT=Intent { act=android.intent.action.CHOOSER flg=0x800000 cmp=android/com.android.internal.app.ChooserActivity (has extras) }, CALLER_PACKAGE=com.medlife.customer, ACTIVITY_INFO=ActivityInfo{382be16 com.android.internal.app.ChooserActivity}}]
09-26 16:11:47.830 1451 1714 D AR_ADV_APPS_USAGE_COL: com.medlife.customer -> resizable apps -> USAGE 17406
09-26 16:11:51.603 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 624 lines
09-26 16:11:54.508 30011 30011 I chatty : uid=10273(com.medlife.customer) expire 1 line
09-26 16:11:54.619 2492 2492 I AndroidIME: PasswordIme.onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Show : AutoCorrection = Disable : Microphone = Show : NoPersonalizedLearning = Disable
09-26 16:11:54.798 2492 2492 I ConversationToQueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-26 16:11:55.057 2492 2492 I AndroidIME: LatinIme.onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : NoPersonalizedLearning = Disable
09-26 16:11:55.191 2492 2492 I ConversationToQueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-26 16:11:59.524 30011 30020 I chatty : uid=10273(com.medlife.customer) expire 3 lines
09-26 16:12:09.589 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 541 lines
09-26 16:12:23.113 30011 30084 I chatty : uid=10273(com.medlife.customer) expire 21 lines
09-26 16:12:30.807 1451 2766 I ActivityManager: Force stopping com.medlife.customer appid=10273 user=0: from pid 30567
09-26 16:12:30.812 1451 2766 I ActivityManager: Killing 30011:com.medlife.customer/u0a273 (adj 0): stop com.medlife.customer
09-26 16:12:30.818 1451 2766 W ActivityManager: Force removing ActivityRecord{4610f1b u0 com.medlife.customer/.MainActivity t24974}: app died, no saved state
09-26 16:12:30.926 1451 1714 D AR_ADV_APPS_USAGE_COL: com.medlife.customer -> resizable apps -> USAGE 38817
09-26 16:12:31.912 1451 4565 I ActivityManager: Force stopping com.medlife.customer appid=10273 user=0: from pid 30594
09-26 16:13:41.434 3974 31010 D PowerCalculator: topApCounter com.medlife.customer
09-26 16:13:41.434 3974 31010 D PowerCalculator: topApCounter com.medlife.customer
09-26 16:13:41.434 3974 31010 D PowerCalculator: topApCounter com.medlife.customer
ADB logs post after disabling:
09-30 12:43:17.696 1992 3969 I ActivityManager: Force stopping com.medlife.customer appid=10102 user=0: from pid 5797
09-30 12:43:17.697 1992 3969 I ActivityManager: Killing 5609:com.medlife.customer/u0a102 (adj 0): stop com.medlife.customer
09-30 12:43:17.709 1992 3969 W ActivityManager: Force removing ActivityRecord{8440c12 u0 com.medlife.customer/.MainActivity t113}: app died, no saved state
09-30 12:43:18.010 1992 3969 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.medlife.customer/.MainActivity} from uid 2000
09-30 12:43:18.174 1992 2012 I ActivityManager: Start proc 5800:com.medlife.customer/u0a102 for activity com.medlife.customer/.MainActivity
09-30 12:43:18.505 5800 5819 I FA : adb shell setprop debug.firebase.analytics.app com.medlife.customer
09-30 12:43:18.975 5800 5879 I edlife.custome: Thread[44,tid=5879,Native,Thread*=0x75721b54ec00,peer=0x12fd1880,"create_react_context"] recursive attempt to load library "/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/lib/x86_64/libfb.so"
09-30 12:43:19.225 5800 5891 D : Successfully queried cache dir: /data/user_de/0/com.medlife.customer/code_cache
09-30 12:43:19.226 5800 5891 D RenderScript: Setting cache dir: /data/user_de/0/com.medlife.customer/code_cache
09-30 12:43:19.433 1928 1928 D SurfaceFlinger: duplicate layer name: changing com.medlife.customer/com.medlife.customer.MainActivity to com.medlife.customer/com.medlife.customer.MainActivity#1
09-30 12:43:19.614 5800 5883 I edlife.custome: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk"],nativeLibraryDirectories=[/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/lib/x86_64, /data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk!/lib/x86_64, /system/lib64]]
09-30 12:43:19.616 5800 5883 I edlife.custome: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk"],nativeLibraryDirectories=[/data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/lib/x86_64, /data/app/com.medlife.customer-3_0cUdZvnpi5RWm0mKBAwA==/base.apk!/lib/x86_64, /system/lib64]]
09-30 12:43:19.694 1992 2018 I ActivityManager: Displayed com.medlife.customer/.MainActivity: +1s549ms
09-30 12:43:21.337 1928 2346 W SurfaceFlinger: Attempting to set client state on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-30 12:43:21.337 1928 2346 W SurfaceFlinger: Attempting to destroy on removed layer: com.medlife.customer/com.medlife.customer.MainActivity#1
09-30 12:43:23.086 5800 5952 E cr_VariationsUtils: Failed reading seed file "/data/user/0/com.medlife.customer/app_webview/variations_seed": /data/user/0/com.medlife.customer/app_webview/variations_seed (No such file or directory)
09-30 12:43:34.090 2128 2128 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-30 12:43:34.395 2128 2128 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-30 12:43:37.846 2128 2128 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-30 12:43:37.856 2128 2128 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-30 12:43:38.429 2128 2128 I LatinIme: onActivate() : EditorInfo = Package = com.medlife.customer : Type = Text : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Show : Incognito = Disable
09-30 12:43:38.465 2128 2128 W Conv2QueryExtension: Conv2Query not enabled due to current app [com.medlife.customer] not in whitelist
09-30 12:46:28.724 1992 2665 I ActivityManager: Force stopping com.medlife.customer appid=10102 user=0: from pid 6074
09-30 12:46:28.724 1992 2665 I ActivityManager: Killing 5800:com.medlife.customer/u0a102 (adj 0): stop com.medlife.customer
09-30 12:46:28.725 1992 2665 W ActivityManager: Force removing ActivityRecord{f56adcb u0 com.medlife.customer/.MainActivity t114}: app died, no saved state
09-30 12:46:29.671 1992 2666 I ActivityManager: Force stopping com.medlife.customer appid=10102 user=0: from pid 6091

You need to increase the RAM and internal storage size that you are assigning to the emulator in order for that exception to go away. You are trying to do some action in the android code that's eating up the emulator's RAM and internal memory.

Related

Invalid ELF file

if I run my application on Android I always get this error and the application crashes immediately:
03-25 14:29:44.011 1833 7290 I ActivityManager: START u0 {flg=0x10000000 cmp=cz.jech.muzika/.Muzika} from uid 2000
03-25 14:29:44.093 1833 1998 I ActivityManager: Start proc 17399:cz.jech.muzika/u0a464 for activity cz.jech.muzika/.Muzika
03-25 14:29:44.098 17399 17399 E cz.jech.muzika: Not starting debugger since process cannot load the jdwp agent.
03-25 14:29:44.193 1833 2400 I WindowManager: SURFACE show Surface(name=Splash Screen cz.jech.muzika)/#0xbe60fc9: Splash Screen cz.jech.muzika
03-25 14:29:44.298 14007 17395 D InstalledAppProviderSer: insertAppIntoDb cz.jech.muzika
03-25 14:29:44.302 17399 17414 E AndroidRuntime: Process: cz.jech.muzika, PID: 17399
03-25 14:29:44.302 17399 17414 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: invalid ELF file "/data/app/cz.jech.muzika-iMRmvRSnmwPpVhRlaZJJwg==/lib/arm64/libswscale.so" load segment[4]: p_offset (0x41000) + p_filesz (0x0) ( = 0x41000) past end of file (0x40910)
03-25 14:29:44.306 1833 9531 W ActivityManager: Force finishing activity cz.jech.muzika/.Muzika
03-25 14:29:44.327 1833 4076 I ActivityManager: Process cz.jech.muzika (pid 17399) has died: vis TOP
03-25 14:29:44.336 1140 1237 W SurfaceFlinger: Attempting to destroy on removed layer: AppWindowToken{485887d token=Token{1c63ed4 ActivityRecord{a8f0c27 u0 cz.jech.muzika/.Muzika t4527}}}#0
What could be the root cause of the error? The ffmpeg libraries I use are from here. What does the error "invalid ELF file" mean?
The file /lib/arm64/libswscale.so is corrupt. In particular, it has a PT_LOAD segment with offset that is past the end of the file (file size is 0x40910) and has 0 length.
One way the file may have become corrupt is if you did an FTP transfer and forgot to set binary mode. (Of course there are numerous other ways, such as decompressing the archive and running out of disk space.)
Your best bet is to re-extract the archive, check the length and md5sum of the file, and use scp or something other than ASCII FTP transfer, then verify that the md5sum is still the same on the target device.

Android release APK fails immediately on launch on mobile device

The Android release APK crashes on launch when I install it on mobile device. It works fine on Android Emulator. Also, debug builds work fine on Emulator.
I’ve tried the methods in the below link suggested by #bhardman, #gderaco + #sacchykhedkar and #alvelig so far with no success.
https://github.com/facebook/react-native/issues/18357
Environment:
package.json
…
"dependencies": {
"react": "^16.6.3",
"react-dom": "^16.8.1",
"react-native": "0.58.4",
"react-native-gesture-handler": "^1.0.15",
"react-native-image-pan-zoom": "^2.1.11",
"react-navigation": "^3.2.1"
},
…
android/ build.gradle
…
buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
…
App.js
…
import React, {Component} from 'react';
import { Platform, StyleSheet, Text, View, Image, Dimensions, Button, TouchableHighlight, WebView, ViewPropTypes } from 'react-native';
import { createStackNavigator, createAppContainer, StackActions, NavigationActions, withNavigation } from "react-navigation";
type Props = {};
export class App1 extends Component {
render() {
return (
<View style={styles.container}>
<TopMenu1 navigation={this.props.navigation} />
<View1Map />
</View>
);
}
}
…
Expected behaviour:
You open the app on your mobile device. And the app opens.
Actual behaviour:
App fails to launch on Android phone. Error message:
Unfortunately, [APP Name] had stopped.
Error messages (from logs.txt file generated from the Android phone):
I can't tell which lines are relevant. So I searched with the app name "sampleapp".
02-14 08:12:51.252 1062 1940 I ActivityManager: Killing 26119:com.android.defcontainer/u0a17 (adj 15): empty #17
02-14 08:12:51.260 1062 2363 I ActivityManager: Recipient 26119
02-14 08:12:51.270 1062 1385 I ActivityManager: Recipient 26671
02-14 08:12:51.295 1062 1698 D StatusBarManagerService: swetImeWindowStatus vis=0 backDisposition=0
02-14 08:12:51.341 1062 1940 D PMS : releaseWL(23288de): PARTIAL_WAKE_LOCK *launch* 0x1 WorkSource{10256}
02-14 08:12:51.410 1062 1385 I ActivityManager: Process com.htc.videocenter (pid 26671) has died
02-14 08:12:52.438 26718 26718 E AndroidRuntime: FATAL EXCEPTION: main
02-14 08:12:52.438 26718 26718 E AndroidRuntime: Process: com.sampleapp, PID: 26718
02-14 08:12:52.438 26718 26718 E AndroidRuntime: java.lang.IllegalStateException: Unable to create layer for ReactViewGroup
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.MessageQueue.nativePollOnce(Native Method)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.MessageQueue.next(MessageQueue.java:323)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.Looper.loop(Looper.java:144)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5845)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
02-14 08:12:52.446 1062 2435 W ActivityManager: Force finishing activity com.sampleapp/.MainActivity
02-14 08:12:52.498 1062 2435 D PMS : acquireWL(f07ef11): PARTIAL_WAKE_LOCK *launch* 0x1 1062 1000 WorkSource{10256}
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: setSystemUiVisibility(0x8000)
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: disable:userId=0 what=0x0 which=0x1 pkg=Window{f67b705 u0 Application Error: com.sampleapp}
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: hiding MENU key
02-14 08:12:52.832 1062 1184 D PMS : releaseHCC(967c58c): CPU_MIN_NUM ActivityManager-MultiCore-Num 0x8000 null
02-14 08:12:52.832 1062 1184 D PMS : releaseHCC(5a7f4d5): CPU_MIN_FREQ ActivityManager-MultiCore-Freq 0x2000 null
02-14 08:12:52.999 1062 1080 W ActivityManager: Activity pause timeout for ActivityRecord{858d360 u0 com.sampleapp/.MainActivity t2027 f}
02-14 08:12:53.108 1062 1072 D PMS : releaseWL(f07ef11): PARTIAL_WAKE_LOCK *launch* 0x1 WorkSource{2897}

App closes without any error when I send BOOT_COMPLETE broadcast from ADB Shell

I have a boot complete broadcast receiver which was not being called when the phone restarted, so I removed everything from onReceive method, added a log statement and used ADB shell to send BOOT_COMPLETE broadcasts, now the app just closes down without any message when I send the broadcast and the status of the app goes to DEAD in the logcat package dropdown.
I have the following permission defined in my Manifest file:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Here is how I'm registering my receiver:
<receiver
android:name=".BootCompleteBroadcastReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
I have tried without the android:exported="true" tag.
I am doing nothing in the onReceive method, I just have a log statement which is not being printed.
Here's the logcat, the apps seems to be force closed somehow, no error whatsoever:
04-24 19:34:28.639 768 1645 D ReceiverController: getBootReceiverEnabledSetting(com.vysh.theeye) at User(0) with identity: 1001
04-24 19:34:28.639 898 898 D AppChangedReceiver: kill back service:com.vysh.theeye
04-24 19:34:28.642 768 1633 V PackageController: forceStopPackage: com.vysh.theeye
04-24 19:34:28.642 768 1633 I ActivityManager: Force stopping com.vysh.theeye appid=10119 user=0: from pid 768
04-24 19:34:28.643 768 1633 I ActivityManager: Killing 31461:com.vysh.theeye/u0a119 (adj 0): stop com.vysh.theeye
04-24 19:34:28.696 195 822 I BufferQueueProducer: [com.vysh.theeye/com.vysh.theeye.MainActivity](this:0xb4dd5000,id:270,api:1,p:-1,c:195) disconnect(P): api 1
04-24 19:34:28.697 195 822 I BufferQueueConsumer: [com.vysh.theeye/com.vysh.theeye.MainActivity](this:0xb4dd5000,id:270,api:1,p:-1,c:195) getReleasedBuffers: returning mask 0xffffffffffffffff
04-24 19:34:28.697 768 3699 I WindowState: WIN DEATH: Window{a34299a u0 com.vysh.theeye/com.vysh.theeye.MainActivity}
04-24 19:34:28.697 768 3699 V WindowManager: Remove Window{a34299a u0 com.vysh.theeye/com.vysh.theeye.MainActivity} client=1866e45, surface=Surface(name=com.vysh.theeye/com.vysh.theeye.MainActivity) Callers=com.android.server.wm.WindowState$DeathRecipient.binderDied:1217 android.os.BinderProxy.sendDeathNotice:566 <bottom of call stack> <bottom of call stack>
04-24 19:34:28.699 195 195 I BufferQueueConsumer: [com.vysh.theeye/com.vysh.theeye.MainActivity](this:0xb4dd5000,id:270,api:1,p:-1,c:-1) disconnect(C)
04-24 19:34:28.700 768 1633 D ActivityManager: SVC-handleAppDiedLocked: app = ProcessRecord{f2d64fb 31461:com.vysh.theeye/u0a119}, app.pid = 31461
04-24 19:34:28.702 195 821 I BufferQueue: [com.vysh.theeye/com.vysh.theeye.MainActivity](this:0xb4dd5000,id:270,api:1,p:-1,c:-1) ~BufferQueueCore
04-24 19:34:28.704 768 1633 W ActivityManager: Scheduling restart of crashed service com.vysh.theeye/.WatcherService in 10229ms
04-24 19:34:28.705 768 1633 D ActivityManager: removeDyingProviderLocked: cpr=ContentProviderRecord{6c3aebd u0 com.vysh.theeye/com.google.firebase.provider.FirebaseInitProvider} always=false inLaunching=false
04-24 19:34:28.705 768 1633 W ActivityManager: Force removing ActivityRecord{e3b6f3d u0 com.vysh.theeye/.MainActivity t2248}: app died, no saved state

Android 8 Settings app crashes on emulator with clean AOSP build

"Settings" app will crash immediately after open with clean Android 8 build (aosp_x86-eng) on emulator. logcat output is below:
--------- beginning of main
1536 1550 E memtrack: Couldn't load memtrack module
1536 1550 W android.os.Debug: failed to get memory consumption info: -1
--------- beginning of system
1536 1548 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings (has extras)} from uid 10013
1373 2321 W audio_hw_generic: Not supplying enough data to HAL, expected position 926726 , only wrote 926722
2477 2477 W zygote : Unexpected CPU variant for X86 using defaults: x86
1536 1548 I ActivityManager: Start proc 2477:com.android.settings/1000 for activity com.android.settings/.Settings
2477 2477 I zygote : The ClassLoaderContext is a special shared library.
2477 2477 D OpenGLRenderer: HWUI GL Pipeline
2477 2477 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
2477 2477 D ConditionManager: conditions loading asychronously
2477 2496 D ConditionManager: loading conditions from xml
2477 2495 E BluetoothAdapter: Bluetooth binder is null
2477 2495 V NFC : this device does not have NFC support
1388 1836 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2477 2500 D SuggestionParser: Day 0 for com.android.settings.suggested.category.FIRST_IMPRESSION
2477 2495 D BatteryInfo: time to make batteryStatsHelper: 1ms
1536 1554 I WifiService: requestActivityInfo uid=1000
1536 1554 I WifiService: reportActivityInfo uid=1000
1536 1554 I WifiService: getSupportedFeatures uid=1000
1536 1606 W HalDeviceManager: isWifiStarted called but mWifi is null!?
2477 2500 I SuggestionParser: Use fingerprint requires unavailable feature android.hardware.fingerprint
1536 1554 E BluetoothAdapter: Bluetooth binder is null
1536 1554 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
1536 1554 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
1536 1554 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2477 2500 I SuggestionParser: Add another fingerprint requires unavailable feature android.hardware.fingerprint
2477 2495 D BatteryInfo: time for getStats: 10ms
2477 2500 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
1643 1852 D EGL_emulation: eglMakeCurrent: 0x945dab60: ver 2 0 (tinfo 0x945e4970)
1380 1380 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096
1380 1525 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096
2477 2499 D : HostConnection::get() New Host Connection established 0xa750eb00, tid 2499
2477 2499 I zygote : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2477 2499 I OpenGLRenderer: Initialized EGL, version 1.4
2477 2499 D OpenGLRenderer: Swap behavior 1
2477 2500 E SystemServiceRegistry: No service published for: wifip2p
2477 2500 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: wifip2p
2477 2500 E SystemServiceRegistry: at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:75)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$49.createService(SystemServiceRegistry.java:569)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$49.createService(SystemServiceRegistry.java:567)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$StaticServiceFetcher.getService(SystemServiceRegistry.java:987)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:914)
2477 2500 E SystemServiceRegistry: at android.app.ContextImpl.getSystemService(ContextImpl.java:1667)
2477 2500 E SystemServiceRegistry: at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:171)
2477 2500 E SystemServiceRegistry: at android.app.Activity.getSystemService(Activity.java:5915)
2477 2500 E SystemServiceRegistry: at com.android.settings.wfd.WifiDisplaySettings.isAvailable(WifiDisplaySettings.java:216)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity.doUpdateTilesList(SettingsActivity.java:845)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity.-wrap0(Unknown Source:0)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity$5.run(SettingsActivity.java:747)
2477 2500 E SystemServiceRegistry: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
2477 2500 E SystemServiceRegistry: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
2477 2500 E SystemServiceRegistry: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
2477 2500 E SystemServiceRegistry: at java.lang.Thread.run(Thread.java:764)
1536 1548 W ActivityManager: Force finishing activity com.android.settings/.Settings
1536 1552 I ActivityManager: Showing crash dialog for package com.android.settings u0
It seems that crash is somehow related to WiFi, but Android emulator shouldn't have WiFi support anyway. What could be the issue here?
I managed to fix it myself. The problem seems to be due to com.android.settings.wfd.WifiDisplaySettings.isAvailable reporting that WiFi is available, while wifip2p service is absent. I went to WifiDisplaySettings.java:216 and replaced this check with false, so it won't try to locate the service. Now Settings can be opened properly.
Alter your WifiDisplaySettings.java in
/YoutAospRoot/packages/apps/Settings/src/com/android/settings/wfd/WifiDisplaySettings.java
Change the code snippet
public static boolean isAvailable(Context context) {
return context.getSystemService(Context.DISPLAY_SERVICE) != null
&& context.getSystemService(Context.WIFI_P2P_SERVICE) != null;
}
To
public static boolean isAvailable(Context context) {
return false;
}
Then
make systemimage
Maybe this can help too. I noticed that the Settings app is not crashing when building an clean Android 8 with lunch aosp_x86-userdebug instead of lunch aosp_x86-eng.

All Unity APKS crash in an Android Phone

I build an android apps about naked 3d display with Unity. I run it in 4 android phones, it runs well. But when I run it in a naked 3d mobile phone, the apps crashed. And all the apps generated with Unity can't run in this phone, even the simplest scene in Unity. But the apps generated by Android Studio, it can run well. It really confused me!
Here is the Log when I run the app in this phone, the phone is PPTV KING 7S.
04-13 11:14:18.841 753-1671/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity (has extras)} from uid 10040 on display 0
04-13 11:14:18.844 753-1671/? D/ActivityManager: [BMW] insertTaskAtTop fromHome = true lastStack = ActivityStack{8e74335 stackId=0, 1 tasks} this = ActivityStack{21b3d16c stackId=1, 11 tasks} topTask() = TaskRecord{1bd9c12a #6110 A=com.ShanghaiTech.Naked3D U=0 sz=0}
04-13 11:14:18.845 753-1671/? D/ActivityManager: [BMW] insertTaskAtTop fromHome = true lastStack = ActivityStack{8e74335 stackId=0, 1 tasks} this = ActivityStack{21b3d16c stackId=1, 12 tasks} topTask() = TaskRecord{256d73f #6127 A=com.ShanghaiTech.Naked3D U=0 sz=0}
04-13 11:14:18.853 753-785/? D/ViewRootImpl: hardware acceleration is disabled, fakeHwAccelerated = true, HardwareRenderer.sRendererDisabled = false, forceHwAccelerated = false, HardwareRenderer.sSystemRendererDisabled = false, this = ViewRoot{15248c3c Starting com.ShanghaiTech.Naked3D,ident = 12}
04-13 11:14:18.896 753-778/? I/ActivityManager: Start proc 10076:com.ShanghaiTech.Naked3D/u0a150 for activity com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity
04-13 11:14:19.187 10076-10076/? D/ViewRootImpl: disable hardware acceleration by APP!!!, this = ViewRoot{a4d2229 com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity,ident = 0}
04-13 11:14:19.229 753-785/? I/WindowManager: Gaining focus: Window{9d23207 u0 com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity}
04-13 11:14:19.375 753-785/? I/ActivityManager: [AppLaunch] Displayed Displayed com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity: +517ms
04-13 11:14:19.375 753-785/? D/ActivityManager: AP_PROF:AppLaunch_LaunchTime:com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity:517:984383
04-13 11:14:19.445 753-785/? I/WindowManager: Screen frozen for +522ms due to Window{322db31a u0 Starting com.ShanghaiTech.Naked3D}
04-13 11:14:19.534 10076-10100/? I/libGLES: file /storage/sdcard0/.gmax/shared_prefs/com.ShanghaiTech.Naked3D.gmaxC do not exit!
04-13 11:14:19.535 10076-10100/? I/libGLES: file /storage/sdcard0/.gmax/shared_prefs/com.ShanghaiTech.Naked3D.gmaxE do not exit!
04-13 11:14:21.983 753-2065/? I/WindowState: WIN DEATH: Window{9d23207 u0 com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity}
04-13 11:14:21.984 753-773/? I/ActivityManager: Process com.ShanghaiTech.Naked3D (pid 10076) has died
04-13 11:14:21.984 753-2065/? W/WindowManager: Force-removing child win Window{2f8b3d64 u0 SurfaceView} from container Window{9d23207 u0 com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity}
04-13 11:14:21.984 753-773/? W/ActivityManager: Force removing ActivityRecord{3ed8675e u0 com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity t6127}: app died, no saved state
04-13 11:14:21.994 277-353/? D/SurfaceFlinger: remove: com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity
04-13 11:14:21.995 753-785/? I/WindowManager: Losing focus: Window{9d23207 u0 com.ShanghaiTech.Naked3D/com.unity3d.player.UnityPlayerActivity}
I think it's not the problem in my Unity program. Anyone has some solution to deal with the problem?

Categories

Resources