[One (M7) Android Development] SageDroid:
My system UI App crashed right after startup. I have attached a logcat.

03-09 23:39:18.433 304-304/? E/android.hardware.wifi@1.0-service: Failed to get driver version: SUCCESS
03-09 23:39:18.435 304-304/? E/android.hardware.wifi@1.0-service: Failed to get driver version: SUCCESS
03-09 23:39:18.480 541-559/system_process E/BatteryExternalStatsWorker: no controller energy info supplied for wifi
03-09 23:39:18.487 541-559/system_process E/BatteryExternalStatsWorker: no controller energy info supplied for wifi
03-09 23:39:18.513 541-1319/system_process E/ActivityManager: Activity Manager Crash. UID:1046 PID:375 TRANS:14
java.lang.IllegalStateException: Bad magic number for Bundle: 0x6c0061
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1583)
at android.os.BaseBundle.<init>(BaseBundle.java:134)
at android.os.Bundle.<init>(Bundle.java:93)
at android.os.Parcel.readBundle(Parcel.java:2221)
at android.os.Parcel.readBundle(Parcel.java:2205)
at android.os.Bundle$1.createFromParcel(Bundle.java:1202)
at android.os.Bundle$1.createFromParcel(Bundle.java:1200)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:328)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2994)
at android.os.Binder.execTransact(Binder.java:696)
03-09 23:39:18.538 541-1363/system_process W/WallpaperManagerService: Cannot extract colors because wallpaper could not be read.
03-09 23:39:18.538 541-552/system_process W/WallpaperManagerService: Cannot extract colors because wallpaper could not be read.
03-09 23:39:18.557 541-552/system_process I/StatusBarManagerService: registerStatusBar bar=com.android.internal.statusbar.IStatusBar$Stub$Proxy@ed15f26
03-09 23:39:18.628 541-1319/system_process E/ActivityManager: Activity Manager Crash. UID:1046 PID:375 TRANS:14
java.lang.IllegalStateException: Bad magic number for Bundle: 0x6c0061
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1583)
at android.os.BaseBundle.<init>(BaseBundle.java:134)
at android.os.Bundle.<init>(Bundle.java:93)
at android.os.Parcel.readBundle(Parcel.java:2221)
at android.os.Parcel.readBundle(Parcel.java:2205)
at android.os.Bundle$1.createFromParcel(Bundle.java:1202)
at android.os.Bundle$1.createFromParcel(Bundle.java:1200)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:328)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2994)
at android.os.Binder.execTransact(Binder.java:696)
03-09 23:39:18.633 541-1319/system_process I/chatty: uid=1000(system) SoundPoolThread identical 1 line
03-09 23:39:18.678 541-1319/system_process E/ActivityManager: Activity Manager Crash. UID:1046 PID:375 TRANS:14
java.lang.IllegalStateException: Bad magic number for Bundle: 0x6c0061
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1583)
at android.os.BaseBundle.<init>(BaseBundle.java:134)
at android.os.Bundle.<init>(Bundle.java:93)
at android.os.Parcel.readBundle(Parcel.java:2221)
at android.os.Parcel.readBundle(Parcel.java:2205)
at android.os.Bundle$1.createFromParcel(Bundle.java:1202)
at android.os.Bundle$1.createFromParcel(Bundle.java:1200)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:328)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2994)
at android.os.Binder.execTransact(Binder.java:696)
03-09 23:39:19.845 1320-1320/com.android.systemui I/StatusBar: isKeyguardShowing() called before startKeyguard(), returning true
03-09 23:39:19.845 1320-1320/com.android.systemui W/StatusBar: isKeyguardSecure() called before startKeyguard(), returning false
java.lang.Throwable
at com.android.systemui.statusbar.phone.StatusBar.isKeyguardSecure(StatusBar.java:8494)
at com.android.systemui.statusbar.phone.StatusBar.isCameraAllowedByAdmin(StatusBar.java:6040)
at com.android.systemui.statusbar.phone.KeyguardBottomAreaView$DefaultRightButton.getIcon(KeyguardBottomAreaView.java:900)
at com.android.systemui.statusbar.phone.KeyguardBottomAreaView.updateCameraVisibility(KeyguardBottomAreaView.java:393)
at com.android.systemui.statusbar.phone.KeyguardBottomAreaView.setStatusBar(KeyguardBottomAreaView.java:356)
at com.android.systemui.statusbar.phone.NotificationPanelView.setStatusBar(NotificationPanelView.java:284)
at com.android.systemui.statusbar.phone.StatusBar.makeStatusBarView(StatusBar.java:1200)
at com.android.systemui.statusbar.phone.StatusBar.addStatusBarWindow(StatusBar.java:4159)
at com.android.systemui.statusbar.phone.StatusBar.createAndAddWindows(StatusBar.java:4155)
at com.android.systemui.statusbar.phone.StatusBar.start(StatusBar.java:1059)
at com.android.systemui.SystemBars.createStatusBarFromConfig(SystemBars.java:71)
at com.android.systemui.SystemBars.start(SystemBars.java:42)
at com.android.systemui.SystemUIApplication.startServicesIfNeeded(SystemUIApplication.java:216)
at com.android.systemui.SystemUIApplication.startServicesIfNeeded(SystemUIApplication.java:165)
at com.android.systemui.keyguard.KeyguardService.onCreate(KeyguardService.java:48)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3339)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-09 23:39:19.902 1320-1320/com.android.systemui I/StatusBar: isKeyguardShowing() called before startKeyguard(), returning true
03-09 23:39:19.902 1320-1320/com.android.systemui W/StatusBar: isKeyguardSecure() called before startKeyguard(), returning false
java.lang.Throwable
at com.android.systemui.statusbar.phone.StatusBar.isKeyguardSecure(StatusBar.java:8494)
at com.android.systemui.statusbar.phone.StatusBar.isCameraAllowedByAdmin(StatusBar.java:6040)
at com.android.systemui.statusbar.phone.KeyguardBottomAreaView$DefaultRightButton.getIcon(KeyguardBottomAreaView.java:900)
at com.android.systemui.statusbar.phone.KeyguardBottomAreaView.updateCameraVisibility(KeyguardBottomAreaView.java:393)
at com.android.systemui.statusbar.phone.KeyguardBottomAreaView.setUserSetupComplete(KeyguardBottomAreaView.java:365)
at com.android.systemui.statusbar.phone.NotificationPanelView.setUserSetupComplete(NotificationPanelView.java:2732)
at com.android.systemui.statusbar.phone.StatusBar.makeStatusBarView(StatusBar.java:1353)
at com.android.systemui.statusbar.phone.StatusBar.addStatusBarWindow(StatusBar.java:4159)
at com.android.systemui.statusbar.phone.StatusBar.createAndAddWindows(StatusBar.java:4155)
at com.android.systemui.statusbar.phone.StatusBar.start(StatusBar.java:1059)
at com.android.systemui.SystemBars.createStatusBarFromConfig(SystemBars.java:71)
at com.android.systemui.SystemBars.start(SystemBars.java:42)
at com.android.systemui.SystemUIApplication.startServicesIfNeeded(SystemUIApplication.java:216)
at com.android.systemui.SystemUIApplication.startServicesIfNeeded(SystemUIApplication.java:165)
at com.android.systemui.keyguard.KeyguardService.onCreate(KeyguardService.java:48)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3339)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-09 23:39:20.439 541-564/system_process E/BluetoothManagerService: MESSAGE_TIMEOUT_BIND
03-09 23:39:20.643 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesSystemBars took to complete: 2238ms
03-09 23:39:20.653 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesStorageNotification took to complete: 10ms
03-09 23:39:20.659 541-1363/system_process E/PowerManagerService: Failed to read last_reboot_reason file
java.io.FileNotFoundException: /data/misc/reboot/last_reboot_reason (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:200)
at java.io.FileInputStream.<init>(FileInputStream.java:150)
at java.io.FileReader.<init>(FileReader.java:72)
at com.android.server.power.PowerManagerService.getLastShutdownReasonInternal(PowerManagerService.java:4871)
at com.android.server.power.PowerManagerService$BinderService.getLastShutdownReason(PowerManagerService.java:4579)
at android.os.IPowerManager$Stub.onTransact(IPowerManager.java:328)
at android.os.Binder.execTransact(Binder.java:696)
03-09 23:39:20.660 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesPowerUI took to complete: 7ms
03-09 23:39:20.662 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesRingtonePlayer took to complete: 2ms
03-09 23:39:20.663 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesKeyboardUI took to complete: 1ms
03-09 23:39:20.681 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesPipUI took to complete: 18ms
03-09 23:39:20.683 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesShortcutKeyDispatcher took to complete: 2ms
03-09 23:39:20.683 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesVendorServices took to complete: 0ms
03-09 23:39:20.684 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesService took to complete: 1ms
03-09 23:39:20.685 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesLatencyTester took to complete: 1ms
03-09 23:39:20.898 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesGlobalActionsComponent took to complete: 213ms
03-09 23:39:20.898 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServicesRoundedCorners took to complete: 0ms
03-09 23:39:20.898 1320-1320/com.android.systemui D/SystemUIBootTiming: StartServices took to complete: 3097ms
03-09 23:39:21.554 541-557/system_process W/WindowManager: Keyguard drawn timeout. Setting mKeyguardDrawComplete
03-09 23:39:21.867 541-1245/system_process D/WifiService: New client listening to asynchronous messages
03-09 23:39:28.710 218-1240/? I/vold: Trimmed 21832171520 bytes on /data in 16870ms
03-09 23:39:28.710 541-701/system_process D/VoldConnector: RCV <- {662 /data 21832171520 16870605467}
03-09 23:39:37.445 541-556/system_process W/ActivityManager: Timeout executing service: ServiceRecord{3373c3c u0 com.android.server.telecom/.components.TelecomService}
03-09 23:39:40.500 541-556/system_process E/ActivityManager: ANR in system
PID: 541
Reason: executing service com.android.server.telecom/.components.TelecomService
Load: 3.1 / 1.37 / 0.52
CPU usage from 93596ms to 0ms ago (2018-03-09 22:38:03.853 to 2018-03-09 22:39:37.448):
7.5% 313/surfaceflinger: 3.6% user + 3.8% kernel / faults: 338 minor
3.6% 404/bootanimation: 2% user + 1.6% kernel
3.4% 168/mmcqd/0: 0% user + 3.4% kernel
2.5% 541/system_server: 1.9% user + 0.5% kernel / faults: 10761 minor 27 major
0.7% 6/kworker/u:0: 0% user + 0.7% kernel
0.6% 136/kworker/u:2: 0% user + 0.6% kernel
0.4% 218/vold: 0% user + 0.4% kernel / faults: 143 minor
0.5% 209/logd: 0.2% user + 0.2% kernel / faults: 89 minor
0.4% 170/msmfb_commit_th: 0% user + 0.4% kernel
0.4% 81/kworker/u:1: 0% user + 0.4% kernel
0.2% 375/media.codec: 0.1% user + 0.1% kernel / faults: 2342 minor 33 major
0.3% 357/installd: 0% user + 0.2% kernel / faults: 2446 minor
0.2% 304/android.hardware.wifi@1.0-service: 0% user + 0.2% kernel / faults: 84 minor
0.2% 367/mediaserver: 0% user + 0.2% kernel / faults: 449 minor
0.2% 3/ksoftirqd/0: 0% user + 0.2% kernel
0.1% 137/kworker/u:3: 0% user + 0.1% kernel
0.1% 26/ksoftirqd/3: 0% user + 0.1% kernel
0.1% 21/ksoftirqd/2: 0% user + 0.1% kernel
0.1% 99/ksmd: 0% user + 0.1% kernel
0.1% 16/ksoftirqd/1: 0% user + 0.1% kernel
0.1% 206/flush-179:0: 0% user + 0.1% kernel
0% 335/audioserver: 0% user + 0% kernel / faults: 121 minor
0.1% 210/servicemanager: 0% user + 0% kernel / faults: 2 minor
0% 361/media.extractor: 0% user + 0% kernel / faults: 294 minor
0% 4/kworker/0:0: 0% user + 0% kernel
0% 93/kworker/0:1H: 0% user + 0% kernel
0% 9/rcuc/0: 0% user + 0% kernel
0% 270/zygote: 0% user + 0% kernel / faults: 528 minor
0% 15/rcuc/1: 0% user + 0% kernel
0% 20/rcuc/2: 0% user + 0% kernel
0% 25/rcuc/3: 0% user + 0% kernel
0% 183/dhd_dpc: 0% user + 0% kernel
0% 306/netmgrd: 0% user + 0% kernel
0% 24/kworker/3:0H: 0% user + 0% kernel
0% 94/kworker/1:1H: 0% user + 0% kernel
0% 307/qmuxd: 0% user + 0% kernel / faults: 4 minor
0% 317/mm-qcamera-daemon: 0% user + 0% kernel / faults: 302 minor
0% 381/rild: 0% user + 0% kernel / faults: 102 minor
0% 486/kworker/3:2H: 0% user + 0% kernel
0% 1//init: 0% user + 0% kernel / faults: 57 minor
0% 5/kworker/0:0H: 0% user + 0% kernel
0% 95/kworker/2:1H: 0% user + 0% kernel
0% 193/ueventd: 0% user + 0% kernel / faults: 307 minor
0% 204/f2fs_gc-179:36: 0% user + 0% kernel
0% 211/hwservicemanager: 0% user + 0% kernel / faults: 27 minor
0% 328/thermald: 0% user + 0% kernel / faults: 7 minor
0% 448/kworker/2:2H: 0% user + 0% kernel
0% 490/kworker/1:2H: 0% user + 0% kernel
0% 169/kworker/1:1: 0% user + 0% kernel
0% 305/healthd: 0% user + 0% kernel
0% 364/media.metrics: 0% user + 0% kernel / faults: 34 minor
0% 369/wificond: 0% user + 0% kernel / faults: 50 minor
+0% 1281/com.android.bluetooth: 0% user + 0% kernel
+0% 1297/com.android.inputmethod.latin: 0% user + 0% kernel
+0% 1302/sdcard: 0% user + 0% kernel
+0% 1320/com.android.systemui: 0% user + 0% kernel
+0% 1327/iptables-restore: 0% user + 0% kernel
+0% 1335/ip6tables-restore: 0% user + 0% kernel
+0% 1350/wpa_supplicant: 0% user + 0% kernel
+0% 1361/webview_zygote32: 0% user + 0% kernel
+0% 1406/msm_sat0: 0% user + 0% kernel
+0% 1551/kworker/u:4: 0% user + 0% kernel
+0% 1573/kworker/1:2: 0% user + 0% kernel
51% TOTAL: 33% user + 7.3% kernel + 8.4% iowait + 0% irq + 2% softirq
CPU usage from 61ms to 400ms later (2018-03-09 22:39:37.510 to 2018-03-09 22:39:37.848):
23% 541/system_server: 15% user + 7.9% kernel / faults: 65 minor
19% 556/ActivityManager: 11% user + 7.9% kernel
11% 313/surfaceflinger: 0% user + 11% kernel
3.6% 313/surfaceflinger: 0% user + 3.6% kernel
3.6% 325/DispSync: 3.6% user + 0% kernel
3.6% 334/EventThread: 0% user + 3.6% kernel
3.4% 170/msmfb_commit_th: 0% user + 3.4% kernel
3.9% 404/bootanimation: 3.9% user + 0% kernel
3.9% 476/BootAnimation: 3.9% user + 0% kernel
3.9% 478/GL updater: 0% user + 3.9% ker
03-09 23:39:40.625 541-557/system_process W/Looper: Dispatch took 116ms on android.ui, h=Handler (com.android.server.am.ActivityManagerService$UiHandler) {7afb9ac} cb=null msg=2
03-09 23:39:40.847 541-557/system_process W/Looper: Dispatch took 163ms on android.ui, h=Handler (android.view.Choreographer$FrameHandler) {76ca675} cb=android.view.Choreographer$FrameDisplayEventReceiver@778b60a msg=0
03-09 23:39:47.775 541-541/system_process W/SystemServer: ***********************************************
03-09 23:39:47.776 541-541/system_process E/SystemServer: BOOT FAILURE making Network Policy Service ready
java.lang.IllegalStateException: Service NetworkPolicy init timeout
at com.android.server.net.NetworkPolicyManagerService.systemReady(NetworkPolicyManagerService.java:816)
at com.android.server.SystemServer.lambda$-com_android_server_SystemServer_78011(SystemServer.java:1802)
at com.android.server.-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo$1.$m$0(Unknown Source:98)
at com.android.server.-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo$1.run(Unknown Source:0)
at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:14327)
at com.android.server.SystemServer.startOtherServices(SystemServer.java:1722)
at com.android.server.SystemServer.run(SystemServer.java:411)
at com.android.server.SystemServer.main(SystemServer.java:274)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:787)

Apart from that, it runs very smoothly.