FORUMS
Remove All Ads from XDA
H10 Turbo

 View Poll Results: What are you using this guide for?

A starting point to learn
 
601 Vote(s)
73.11%
A quick refresher course
 
105 Vote(s)
12.77%
Troubleshooting
 
272 Vote(s)
33.09%
Referring users from development threads
 
50 Vote(s)
6.08%
Linking to my own guide(s)
 
11 Vote(s)
1.34%

[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!

6,813 posts
Thanks Meter: 9,163
 
Post Reply Email Thread
13th June 2018, 07:07 PM |#841  
[Help]
I would appreciate if anybody could help me know what is wrong here. I have successfully implemented 3Minit battery (for batteries I can download) but when I try to select one of the offline batteries, it crashes SystemUI

Now, I know I could go ahead and ask the 3Minit people for help, but I want to try to fix it myself before I do that (may be a good learning excercise), but I'm not very good at interpreting what the log is telling me what is wrong

Here is what the log is telling me:
Code:
06-13 12:20:51.720 19642 19642 D BatteryMeterView: ACTION_BATTERY_CHANGED : level:53 status:3 health:2
06-13 12:20:51.730 19642 19642 D AndroidRuntime: Shutting down VM
06-13 12:20:51.730 19642 19642 E AndroidRuntime: FATAL EXCEPTION: main
06-13 12:20:51.730 19642 19642 E AndroidRuntime: Process: com.android.systemui, PID: 19642
06-13 12:20:51.730 19642 19642 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 bqHint=4 (has extras) } in com.android.systemui.statusbar.policy.MinitBattery$1@a27cddc
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1007)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7406)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery$ResourceManager.getResourceId(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery$ResourceManager.getDrawable(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery.getDefaultBattery(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery.getNormalDrawable(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery.updateImageView(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery.access$300(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at com.android.systemui.statusbar.policy.MinitBattery$1.onReceive(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:997)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: 	... 7 more
06-13 12:20:51.730 19642 19642 I Process : Sending signal. PID: 19642 SIG: 9
06-13 12:20:51.730   706   720 W ActivityManager: Process com.android.systemui has crashed too many times: killing!
Thanks for reading!
 
 
3rd July 2018, 01:25 AM |#842  
Stryke_the_Orc's Avatar
OP Retired Senior Moderator
Flag Maras Dantia
Thanks Meter: 9,163
 
More
Quote:
Originally Posted by ShaDisNX255

I would appreciate if anybody could help me know what is wrong here. I have successfully implemented 3Minit battery (for batteries I can download) but when I try to select one of the offline batteries, it crashes SystemUI

Now, I know I could go ahead and ask the 3Minit people for help, but I want to try to fix it myself before I do that (may be a good learning excercise), but I'm not very good at interpreting what the log is telling me what is wrong

Here is what the log is telling me:


Thanks for reading!


There's a reference call to a resource that is missing. If you keep reading that error, you'll find where the null pointer reference is and what it's pointing to.
9th July 2018, 11:41 PM |#843  
Quote:
Originally Posted by Stryke_the_Orc

There's a reference call to a resource that is missing. If you keep reading that error, you'll find where the null pointer reference is and what it's pointing to.

Thanks! Can you help me on a new logcat? Just this last one, I promise

I've moved stock ROM quite a bit and implemented countless things, so I really don't know where I messed up that I broke the manual time/clock changer

This is the original log I got:
Code:
07-09 15:02:30.590  6516  6516 D AndroidRuntime: Shutting down VM
07-09 15:02:30.600  6516  6516 E AndroidRuntime: FATAL EXCEPTION: main
07-09 15:02:30.600  6516  6516 E AndroidRuntime: Process: com.android.settings, PID: 6516
07-09 15:02:30.600  6516  6516 E AndroidRuntime: android.view.InflateException: Binary XML file line #28: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.sec.android.touchwiz.app.TwTimePickerDialog.<init>(TwTimePickerDialog.java:172)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.android.settings.DateTimeSettings.onCreateDialog(DateTimeSettings.java:466)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.android.settings.SettingsPreferenceFragment$SettingsDialogFragment.onCreateDialog(SettingsPreferenceFragment.java:829)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.DialogFragment.getLayoutInflater(DialogFragment.java:407)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:984)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1164)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1557)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.FragmentManagerImpl$1.run(FragmentManager.java:488)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7406)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.createView(LayoutInflater.java:657)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	... 18 more
07-09 15:02:30.600  6516  6516 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at java.lang.reflect.Constructor.newInstance(Native Method)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.view.LayoutInflater.createView(LayoutInflater.java:631)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	... 23 more
07-09 15:02:30.600  6516  6516 E AndroidRuntime: Caused by: java.lang.NumberFormatException: Invalid int: "This app can read when apps are pinned or unpinned."
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at java.lang.Integer.invalidInt(Integer.java)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at java.lang.Integer.parse(Integer.java)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at java.lang.Integer.parseInt(Integer.java)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:133)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at android.content.res.TypedArray.getInt(TypedArray.java:357)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:99)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:91)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:87)
07-09 15:02:30.600  6516  6516 E AndroidRuntime: 	... 25 more
The thing is, from what I am gathering here is that there is an error in TwTimePicker, but I never messed with this smali at all which is weird.
I am an unexperienced person, so just at a quick glance at:
Code:
07-09 15:02:30.600  6516  6516 E AndroidRuntime: Caused by: java.lang.NumberFormatException: Invalid int: "This app can read when apps are pinned or unpinned."
I can kind of understand that it's getting an invalid number format. Looking at framework-res, the "This app can read when apps are pinned or unpinned." text is a string and comes as such:
Code:
<string name="tw_lock_to_app_status_intent_permission_description">This app can read when apps are pinned or unpinned.</string>
So what I did was look for a string that was meant for time picker and sure enough, there is one with it's specific number format:
Code:
<string name="time_of_day" formatted="false">%-l:%M:%S %p</string>
So as a quick patch (just to see if it fixes it), I changed the string to this:
Code:
<string name="tw_lock_to_app_status_intent_permission_description" formatted="false">%-l:%M:%S %p</string>
I compiled and pushed the new framework-res, tried again and now I got this crash log:
Code:
07-09 16:55:56.350  4294  4294 E AndroidRuntime: FATAL EXCEPTION: main
07-09 16:55:56.350  4294  4294 E AndroidRuntime: Process: com.android.settings, PID: 4294
07-09 16:55:56.350  4294  4294 E AndroidRuntime: android.view.InflateException: Binary XML file line #28: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.sec.android.touchwiz.app.TwTimePickerDialog.<init>(TwTimePickerDialog.java:172)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.android.settings.DateTimeSettings.onCreateDialog(DateTimeSettings.java:466)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.android.settings.SettingsPreferenceFragment$SettingsDialogFragment.onCreateDialog(SettingsPreferenceFragment.java:829)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.DialogFragment.getLayoutInflater(DialogFragment.java:407)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:984)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1164)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1557)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.FragmentManagerImpl$1.run(FragmentManager.java:488)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7406)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.createView(LayoutInflater.java:657)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	... 18 more
07-09 16:55:56.350  4294  4294 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at java.lang.reflect.Constructor.newInstance(Native Method)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.view.LayoutInflater.createView(LayoutInflater.java:631)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	... 23 more
07-09 16:55:56.350  4294  4294 E AndroidRuntime: Caused by: java.lang.NumberFormatException: Invalid int: "Set Smartcard permissions"
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at java.lang.Integer.invalidInt(Integer.java)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at java.lang.Integer.parse(Integer.java)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at java.lang.Integer.parseInt(Integer.java)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:133)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at android.content.res.TypedArray.getInt(TypedArray.java:357)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:99)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:91)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:87)
07-09 16:55:56.350  4294  4294 E AndroidRuntime: 	... 25 more
Looked for this string and repeated my previous "fix":
Code:
<string name="permlab_mdmSmartCardPolicy">Set Smartcard permissions</string>
So at this point I'm starting to see a pattern that it doesn't matter if I change it, it will just get another string?
I'm confused here
I also looked at all the smalis for it's public id number but it is nowhere to be found in either SecSettings, framework-res or twframework (here the TwTimePicker is located at)

I'm very interested on learning how to fix this problem, not because of its importance (still works fine in automatic date and time) but because I want to get better at reading and understanding this logcat. I know that all this information is supposed to tell me what's wrong, but I'm still not that capable of understanding it

Any help would be greatly appreciated!

Thanks!
Today, 10:11 AM |#844  
Junior Member
Thanks Meter: 0
 
More
bad2254@gmail.com
Post Reply Subscribe to Thread

Tags
how-to, logcat, troubleshooting

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes