Closed moonsky219 closed 6 years ago
Below is the adb logcat -b events
log:
10-07 16:25:27.467 980 3208 I am_new_intent: [0,64644103,6037,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL,android.intent.action.MAIN,NULL,NULL,270532608]
10-07 16:25:27.467 980 3208 I am_focused_stack: [0,0,1,bringingFoundTaskToFront setFocusedActivity]
10-07 16:25:27.467 980 3208 I wm_task_moved: [6037,1,1]
10-07 16:25:27.469 980 3208 I am_focused_activity: [0,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL,bringingFoundTaskToFront]
10-07 16:25:27.469 980 3208 I am_pause_activity: [0,2675983,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:25:27.499 980 3208 I am_resume_activity: [0,203824510,6037,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]
10-07 16:25:27.500 980 3208 I am_task_to_front: [0,6037]
10-07 16:25:27.501 980 3208 I sysui_action: [323,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]
10-07 16:25:27.501 980 3208 I sysui_action: [324,true]
10-07 16:25:27.501 980 3208 I sysui_action: [325,3597]
10-07 16:25:27.502 980 1018 I sysui_count: [window_time_0,43]
10-07 16:25:27.502 980 1018 I am_stop_activity: [0,2675983,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:25:27.523 6682 6682 I am_on_paused_called: [0,org.kivy.android.PythonActivity,handlePauseActivity]
10-07 16:25:27.524 6682 6682 I am_on_stop_called: [0,org.kivy.android.PythonActivity,handleStopActivity]
10-07 16:25:27.525 4637 4637 I am_on_resume_called: [0,com.google.android.launcher.GEL,RESUME_ACTIVITY]
10-07 16:25:27.568 980 1025 I sysui_action: [320,2]
10-07 16:25:27.568 980 1025 I sysui_action: [319,103]
10-07 16:25:27.568 980 1025 I sysui_action: [322,103]
10-07 16:25:49.798 980 28589 I notification_panel_revealed: 5
10-07 16:25:50.299 980 3711 I notification_visibility: [0|com.google.android.gms|1|com.google.android.gms.update.control.NotificationControl|10017,1,85419669,108290,0,3]
10-07 16:25:50.299 980 3711 I notification_visibility: [-1|android|17040422|null|1000,1,119860,119860,0,4]
10-07 16:25:50.299 980 3711 I notification_visibility: [-1|android|17040429|null|1000,1,119859,119859,0,2]
10-07 16:25:50.299 980 3711 I notification_visibility: [0|net.mobileinsight.app|1|null|10226,1,112319,112319,0,1]
10-07 16:25:50.299 980 3711 I notification_visibility: [0|com.whatsapp|2|null|10115,1,85442161,16363098,0,0]
10-07 16:25:54.562 980 1017 I am_pss : [4637,10035,com.google.android.googlequicksearchbox,145633280,134115328,0]
10-07 16:25:54.602 980 1017 I am_pss : [4699,10035,com.google.android.googlequicksearchbox:search,48475136,40939520,0]
10-07 16:26:00.083 980 1017 I am_pss : [6682,10226,net.mobileinsight.app,89665536,69746688,0]
10-07 16:26:09.704 980 17992 I notification_visibility: [0|com.google.android.gms|1|com.google.android.gms.update.control.NotificationControl|10017,0,85439074,127695,0,3]
10-07 16:26:09.704 980 17992 I notification_visibility: [-1|android|17040422|null|1000,0,139265,139265,0,4]
10-07 16:26:09.704 980 17992 I notification_visibility: [-1|android|17040429|null|1000,0,139264,139264,0,2]
10-07 16:26:09.704 980 17992 I notification_visibility: [0|net.mobileinsight.app|1|null|10226,0,131724,131724,0,1]
10-07 16:26:09.704 980 17992 I notification_visibility: [0|com.whatsapp|2|null|10115,0,85461566,16382503,0,0]
10-07 16:26:09.705 980 3666 I notification_panel_hidden: []
10-07 16:26:09.706 980 6957 I am_focused_stack: [0,1,0,bringingFoundTaskToFront setFocusedActivity]
10-07 16:26:09.706 980 6957 I wm_task_moved: [6038,1,0]
10-07 16:26:09.707 980 6957 I am_focused_activity: [0,net.mobileinsight.app/org.kivy.android.PythonActivity,bringingFoundTaskToFront]
10-07 16:26:09.707 980 6957 I am_pause_activity: [0,203824510,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]
10-07 16:26:09.708 980 6957 I am_task_to_front: [0,6038]
10-07 16:26:09.708 980 6957 I wm_task_moved: [6038,1,0]
10-07 16:26:09.709 980 6957 I am_create_activity: [0,258754766,6038,net.mobileinsight.app/org.kivy.android.PythonActivity,NULL,NULL,NULL,268435456]
10-07 16:26:09.712 980 6957 I wm_task_moved: [6038,1,0]
10-07 16:26:09.713 980 6957 I am_focused_activity: [0,net.mobileinsight.app/org.kivy.android.PythonActivity,startedActivity]
10-07 16:26:09.714 980 6957 I sysui_action: [323,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:26:09.714 980 6957 I sysui_action: [324,true]
10-07 16:26:09.714 980 6957 I sysui_action: [325,3639]
10-07 16:26:09.717 980 17991 I notification_clicked: [0|net.mobileinsight.app|1|null|10226,131737,131737,19418]
10-07 16:26:09.717 980 980 I sysui_histogram: [note_click_longevity,2]
10-07 16:26:09.719 4637 4637 I am_on_paused_called: [0,com.google.android.launcher.GEL,handlePauseActivity]
10-07 16:26:09.726 980 17995 I am_restart_activity: [0,258754766,6038,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:26:09.737 980 1018 I sysui_count: [window_time_0,42]
10-07 16:26:09.824 6682 6682 I am_on_resume_called: [0,org.kivy.android.PythonActivity,LAUNCH_ACTIVITY]
10-07 16:26:09.877 6965 6965 I auditd : type=1400 audit(0.0:125): avc: denied { read } for comm="debuggerd" name="libpymodules.so" dev="dm-0" ino=426738 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
10-07 16:26:09.877 6965 6965 I auditd : type=1400 audit(0.0:126): avc: denied { open } for comm="debuggerd" path="/data/data/net.mobileinsight.app/files/app/libpymodules.so" dev="dm-0" ino=426738 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
10-07 16:26:09.877 6965 6965 I auditd : type=1400 audit(0.0:127): avc: denied { getattr } for comm="debuggerd" path="/data/data/net.mobileinsight.app/files/app/libpymodules.so" dev="dm-0" ino=426738 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
10-07 16:26:10.979 980 6966 I am_crash: [980,0,net.mobileinsight.app,948485700,Native crash,Segmentation fault,unknown,0]
10-07 16:26:10.981 980 6966 I am_finish_activity: [0,258754766,6038,net.mobileinsight.app/org.kivy.android.PythonActivity,force-crash]
10-07 16:26:10.982 980 6966 I wm_task_moved: [6038,1,0]
10-07 16:26:10.984 980 6966 I am_focused_activity: [0,net.mobileinsight.app/org.kivy.android.PythonActivity,finishActivity adjustFocus]
10-07 16:26:10.985 980 6966 I am_pause_activity: [0,258754766,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:26:11.025 980 17999 I am_proc_died: [0,6682,net.mobileinsight.app]
10-07 16:26:11.028 409 409 I sf_frame_dur: [SurfaceView - net.mobileinsight.app/org.kivy.android.PythonActivity,30,0,0,0,1,0,0]
10-07 16:26:11.029 409 409 I sf_frame_dur: [net.mobileinsight.app/org.kivy.android.PythonActivity,0,0,0,0,0,0,1]
10-07 16:26:11.034 980 17999 I am_focused_activity: [-1,NULL,resetFocusedActivityIfNeeded]
10-07 16:26:11.061 980 17999 I am_proc_start: [0,6969,10226,net.mobileinsight.app,activity,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:26:11.094 980 17998 I am_proc_bound: [0,6969,net.mobileinsight.app]
10-07 16:26:11.102 980 17998 I am_restart_activity: [0,2675983,6038,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:26:11.164 980 1025 I sysui_action: [321,1459]
10-07 16:26:11.164 980 1025 I sysui_action: [320,1]
10-07 16:26:11.164 980 1025 I sysui_action: [319,1459]
10-07 16:26:11.263 6969 6969 I am_on_resume_called: [0,org.kivy.android.PythonActivity,LAUNCH_ACTIVITY]
10-07 16:26:11.501 980 1025 I sysui_action: [322,1796]
10-07 16:26:11.502 980 1025 I am_activity_launch_time: [0,2675983,net.mobileinsight.app/org.kivy.android.PythonActivity,455,1782]
10-07 16:26:11.885 980 1018 I am_stop_activity: [0,203824510,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]
10-07 16:26:11.921 4637 4637 I am_on_stop_called: [0,com.google.android.launcher.GEL,handleStopActivity]
10-07 16:26:11.947 409 409 I sf_frame_dur: [com.google.android.googlequicksearchbox/com.google.android.launcher.GEL,1,0,0,0,1,0,0]
10-07 16:26:13.591 346 353 I auditd : type=1403 audit(0.0:128): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:13.697 346 353 I auditd : type=1403 audit(0.0:129): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:13.821 346 353 I auditd : type=1403 audit(0.0:130): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:13.954 346 353 I auditd : type=1403 audit(0.0:131): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.057 346 353 I auditd : type=1403 audit(0.0:132): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.161 346 353 I auditd : type=1403 audit(0.0:133): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.251 408 408 I auditd : SELinux: Loaded service_contexts from /service_contexts.
10-07 16:26:14.244 346 353 I auditd : type=1403 audit(0.0:134): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.255 408 408 I auditd : avc: received policyload notice (seqno=29)
10-07 16:26:14.255 408 408 I auditd : avc: received policyload notice (seqno=30)
10-07 16:26:14.255 408 408 I auditd : avc: received policyload notice (seqno=31)
10-07 16:26:14.255 408 408 I auditd : avc: received policyload notice (seqno=32)
10-07 16:26:14.255 408 408 I auditd : avc: received policyload notice (seqno=33)
10-07 16:26:14.256 408 408 I auditd : avc: received policyload notice (seqno=34)
10-07 16:26:14.256 408 408 I auditd : avc: received policyload notice (seqno=35)
10-07 16:26:14.377 346 353 I auditd : type=1403 audit(0.0:135): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.471 346 353 I auditd : type=1403 audit(0.0:136): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.651 346 353 I auditd : type=1403 audit(0.0:137): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.717 346 353 I auditd : type=1403 audit(0.0:138): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.817 346 353 I auditd : type=1403 audit(0.0:139): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.897 346 353 I auditd : type=1403 audit(0.0:140): policy loaded auid=4294967295 ses=4294967295
10-07 16:26:14.930 408 408 I auditd : SELinux: Loaded service_contexts from /service_contexts.
10-07 16:26:14.932 408 408 I auditd : avc: received policyload notice (seqno=36)
10-07 16:26:14.932 408 408 I auditd : avc: received policyload notice (seqno=37)
10-07 16:26:14.932 408 408 I auditd : avc: received policyload notice (seqno=38)
10-07 16:26:14.932 408 408 I auditd : avc: received policyload notice (seqno=39)
10-07 16:26:14.932 408 408 I auditd : avc: received policyload notice (seqno=40)
10-07 16:26:14.932 408 408 I auditd : avc: received policyload notice (seqno=41)
10-07 16:26:28.984 980 6966 I sysui_action: [316,3]
10-07 16:26:28.985 980 6966 I wm_task_moved: [6038,1,0]
10-07 16:26:28.991 980 6966 I am_focused_activity: [0,net.mobileinsight.app/org.kivy.android.PythonActivity,moveTaskToFront]
10-07 16:26:29.005 980 6966 I am_task_to_front: [0,6038]
10-07 16:26:29.006 980 6966 I sysui_action: [323,net.mobileinsight.app/org.kivy.android.PythonActivity]
10-07 16:26:29.006 980 6966 I sysui_action: [324,true]
10-07 16:26:29.006 980 6966 I sysui_action: [325,3659]
10-07 16:26:29.189 409 409 I sf_frame_dur: [Application Error: net.mobileinsight.app,3,0,0,0,0,0,2]
10-07 16:26:30.929 980 1017 I am_pss : [6969,10226,net.mobileinsight.app,173201408,153460736,0]
10-07 16:26:30.968 980 1017 I am_pss : [4699,10035,com.google.android.googlequicksearchbox:search,48064512,40529920,0]
Here is the main log:
10-07 16:28:50.368 6969 6969 V PythonActivity: onPause()
10-07 16:29:00.510 980 17994 I ActivityManager: START u0 {cmp=net.mobileinsight.app/org.kivy.android.PythonActivity} from uid 10226 on display 0
10-07 16:29:00.510 980 17994 W ActivityManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=net.mobileinsight.app/org.kivy.android.PythonActivity }
10-07 16:29:00.534 6969 6969 V PythonActivity: My oncreate running
10-07 16:29:00.534 6969 6969 V PythonActivity: About to do super onCreate
10-07 16:29:00.535 6969 6969 V SDL : onCreate():org.kivy.android.PythonActivity@996fe90
10-07 16:29:00.535 6969 6969 V PythonActivity: Did super onCreate
10-07 16:29:00.612 6969 7382 V PythonActivity: Ready to unpack
10-07 16:29:00.612 6969 7382 V PythonActivity: UNPACKING!!! private app
10-07 16:29:00.612 6969 7382 V PythonActivity: Data version is 1507244747.47
10-07 16:29:00.612 6969 6969 V PythonActivity: onResume()
10-07 16:29:00.616 6969 6969 V pythonutil: Checking pattern libcrystax\.so against libSDL2_mixer.so
It seems that this piece of code is called in python-for-android-kivy/pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonActivity.java
:
60
61 @Override
62: protected void onCreate(Bundle savedInstanceState) {
63: Log.v(TAG, "My oncreate running");
64 resourceManager = new ResourceManager(this);
65
66: Log.v(TAG, "About to do super onCreate");
67: super.onCreate(savedInstanceState);
68: Log.v(TAG, "Did super onCreate");
69
70 this.mActivity = this;
10-07 16:26:10.979 980 6966 I am_crash: [980,0,net.mobileinsight.app,948485700,Native crash,Segmentation fault,unknown,0]
10-07 16:26:10.981 980 6966 I am_finish_activity: [0,258754766,6038,net.mobileinsight.app/org.kivy.android.PythonActivity,force-crash]
It seems we get a segmentation fault? I also find this in my side.
It seems like be a bug of p4a, not mobileinsight-mobile: https://github.com/kivy/python-for-android/issues/1099. I try to add the following line to pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml and it seems work:
<activity android:name="org.kivy.android.PythonActivity"
+ android:launchMode="singleTop"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation{% if args.min_sdk_version >= 13 %}|screenSize{% endif %}"
android:screenOrientation="{{ args.orientation }}"
cool. We can test it out then make a commit
Fixed by mobile-insight/python-for-android@a4e1d28, though the complete fix may depend on the upstream python-for-android
Versions
Description
What are you trying to get done: switch MI back using status bar icon.
What has happened, what went wrong: android pop out a window says MobileInsight is stopped and asked me to start it or not, while another MobileInsight main activity is already started at the same time, while the MobileInsight icon still exists in the status bar.
What do I expected: Should have similar behaviour like using the recent items button of android to switch MI back, it works well.
Code and Logs
OnPause():
Restart instead of doing resume: