[APP][2.2+][11 Dec. 2022 - V3.1] BetterBatteryStats - BetterBatteryStats

I started BetterBatteryStats because I was missing the great battery history that Spare Parts allowed to call on Froyo. It has been a long journey since the first version. BetterBatteryStats provides an insight in following categories:
- General "other stats "overview: Awake, Deep Sleep, Screen On, Phone On, Wifi On, Wifi Running ratios
- Kernel Wakelocks
- Partial wakelocks
- Alarms/Wakeups
- CPU States
- Network stats
- Process stats with User and System CPU time
Use so called references BetterBatteryStats shows data for different samples over time:
- since boot
- since unplugged
- since charged
- since screen off
- custom references
- any combination of the above (e.g. from screen off to screen on)
BetterBatteryStats is calling the "batteryinfo" service of Android to retrieve data already lying there without generating overhead. Since Kitkat Google has revoked the permission for normal apps to access these stats (without valid reasons IMHO). You can read more about that here.
Fortunately and thanks to @Looki75 there is a way to work around the restrictions intruduced by google in Kitkat and run BBS on non-rooted devices. Please see here for more details.
BetterBatteryStats has been tested on Froyo, Gingerbread, Honeycomb (3.1, thanks to daveid), ICS, JB, Kitkat and Lollipop on different ROMs and Kernels.
What are wakelocks and why should you care about them?
When it comes to Android the most discussed and commented topic that I know is battery drain / battery life. I'm a quite heavy user because I spend a lot of time on the train every day reading my mails, surfing and listening to music but still my phone is off for a long time during the day and while I accept the battery being drained while I use the phone I care about it draining slowly while "doing nothing".
Wakelocks or to be more precise partial wakelocks is a pattern than helps devs to make sure that important pieces of their code do not get interrupted. Wakelocks are not bad per se, they are a tool. There are many poor implementations that make use of wakelocks and BBS helps making that transparent.
Caution: do not use and wakelock supressor tools. They will cause an erratic behavior of your phone, causing more harm than good.
Basically the phone has (simplified, kernel devs don't shoot) three states:
1. awake with screen on
2. awake
3. sleeping (that's you phone favorite state)
The transitions are from (1) to (2) and finally from (2) to (3). Now as long as you use your phone it's in (1) and does not leave that state as long as you keep using it interactively. If you stop using it the phone is aiming to go to (3) as fast as possible.
And here's where wakelocks are important: as our phones as smartphones they tend to do background processing. Some of this processing is important like e.g. making a phone call, listening to music or synchronizing your contacts.
As the phone wants to go from (2) to (3) and on the other hand you don't want to hang up while you are in a call the app keeps hold of a wakelock to prevent that transisiton. When you hang up the partial wakelock gets release and here we go (the phone goes to sleep).
So partial wakelocks is a tool and it's not something that we should forbid for obvious reasons. Now there are cases when the design on an app is not real life proven (conditions of poor of no converage) and the wakelocks have negative effects because they are held unnecessarily or for too long.
BetterBatteryStats identifies these wakelocks and using your expertise or the once from our users here you can understand what happens and find a strategy to change that for the better.
And what about wakeups?
Wakeups (alarms) is a pattern to be used when an application should to something after a certain period of time (or at a certain time). Again, an alarm is a tool and is nothing.
On the other hand there are a lot of poor implementations that BBS can help you discover:
- alarms waking up the device when all the app should do is refresh the screen: in such cases the app uses the wrong type of alarm, there are alarms that are specifically to be used only when the screen is on
- to frequent alarms: in case of e.g. poor network conditions some apps may use alarms to repeat failed network operations. Doing this too often will cause too many wakeups (and wakelocks for doing the handling)
- apps that wake up your device when you did not expect any activity while screen is off: you can use the info provided by BBS to contact the dev about such issues
Try it yourself
If you need help
Always add the whole context when asking for help. Most of the times a dumpfile is helpful, sometimes screenshots showing your observations may help as well.
Before posting a dump please make sure that the references for kernel wakelocks and alarms were processed correctly. Reading a dump takes a few minutes and it would be great if you could not waste the time of whomever studies it, aiming at helping you.
Generally a dump "since unplugged" is better than "since charged". When you start your analysis make sure to follow following procedure:
- enable watchdog processing in BBS settings
- verify from/to references is checked under custom views
- full charge device then let it run down to ~95%
- put device to sleep for at least 6 hours (no touchy!)
- wake device and launch BBS
- adjust from/to references to 'screen off' and 'screen on'
- save dumpfile from share menu
- post resulting log to this thread (or provide cloud link)
I will not reply to posts with incomplete dumps
Reporting bugs
If you want to report a bug please make sure:
- that you can reproduce the problem
- explain what the problem is, how you could reproduce it and what is going wrong (a sentence lke "xxxx does not work for me" is a waste of your time and wil be ignored)
- enable debug in advanced prefernces
- post a logcat
A good read about reporting bugs
Translations
Starting with 2.0 BBS is getting multi-language. Currently following languages are included:
- en: main language, maintained by me
- ru: translation thanks to @gaich
- cz: translation thanks to @mag01
- es translation thanks to @vldesco
- it translation thanks to @code010101
- hr translation thanks to @seky2205
- fr translation thanks to @xavihernandez
- de translation thanks to @Minty123
- tr translation and other language improvement by @Eleo
If you want to contribute with a new language please feel free to offer you service and contribute to BBS, by submitting a pull request to the github project with the translated strings.xml. But please be aware of the fact that translation is a continuous work: even if the initial effort is higher there will be unavoidable changes to the english master XMLs that will require regular updates of your translations.
If you have a recommendation for a free croud-translation service that you would prefer I am open for suggestions.
Thanks
To nobnut for donating me a Nexus S for testing
To nobnut and brandall for their support, encouragements, testing and constructive feedback in the early stages of the development.
To @Javinotfound or the new icons / logo
To suku_patel_22, jeremysherriff, Karpfenhai, Tungstwenty, It_ler, Perseus71 and mag01 for their help in this thread and their systematic testing my betas and RCs
To Entropy512 for providing support and insights about kernel wakelocks and helping making BBS a better tool

Release
Edit 2021-06-13: Google has pulled BBS from GPlay. The given reason is that I use a library (HockeyApp) that allows installations by other means than the GPlay; that is correct except that library is a) deprecated and does not have backend anymore and b) the GPlay edition does not use that library, only the xda-edition does. Anyhow, I am working on a fix
BetterBatteryStats is available on Google Play (https://play.google.com/store/apps/details?id=com.asksven.betterbatterystats) for what I believe is a fair price. If you like my work and want to support me please fell free to show your gratitude by buying the app.
Google play users can register to be part of the public beta programme. Selected Release Candidates will be released to google play as part of the beta programm. You can enroll to the beta programme here: https://play.google.com/apps/testing/com.asksven.betterbatterystats
Follow me on Mastodon to be notified of updates and get insights in new features/developments.
xda edition: for xda-dev members I provide an always free and fully featured version of BBS (please play fair and do not redistribute the app without my consent).
Current test-release:
I have moved to an automated build system (older releases are still attached here) and do the distribution using AppCenter.
Privacy note
Access to the downloads does not require you to register to AppCenter (you still can to benefit from neat features like notifications when new releases are available)
Get release candidates here
Changelog
2.3
- Full android O support
- Unrooted devices now fully supported (with perms added using ADB)
- UI improvements and I18N
- Better support for substratum theming
- Fixes based on crash-reports
- Added application analytics
2.2.2.0
Fixed #791: bugs preventing sensor stats to show properly on pre-lolipop devices
2.2.1.0
Fixed #787, #788: bugs preventing some stats to show properly on pre-lolipop devices
2.2.0.0
Merged translations
same as RC3
Older Changelogs
2.2.0.0RC3
Fixed sensor report
Prep for release
2.2.0.0RC2
#780: Added proper Sensor Stats
2.2.0.0RC1
#659: Renamed "Other" stat to "Summary"
#398: possibility to add a note when saving a dumpfile
#682: Alarms details view is now scrollable
#772: use bolder fonts to comply with design guidelines and make reading on smaller devices easier
#677: added GPS time (sensors) to Summary
#777: folded both Text and JSON representations of the dumpfile into one file
2.2.0.0B6
#675: watchdog sometimes shows awake > 100%
#756: added LG G2 Kernel Wakelocks support and more agressive detection of LG G2, G3, G4
#759: Watchdog toast sometimes get sticky
#760: Kernel Wakelocks do not substract properly on non-root devices (or with API-mode on)
#762: alarm do not show icon on non-root devices (or wirh API-mode)
2.2.0.0B5
#733: Kernel wakelocks parser for LG G4
#753: Added option to select the destination directory for dumpfile/locat/etc. (Requires OI FileManager)
2.2.0.0B4
#715: introduced snackbars instead of many of the toasts
#731: fixed layout issues for "old" widgets with RTL languages
#749: fixed another non-root issue
2.2.0.0B3
#211: add sensor data to "other" stats
#741: improvements on non-root experience (network stats, fixes)
#748: fixed doze mode counters
Added sync time to other stats
2.2.0.0B2
#734: added doze mode stats (Marshmallow)#744, #747: more fixes for non-rooted usage
#745: fixed/more accurate Bluetooth stats for Marshmallow
2.2.0.0B1
#716: experimental: grant required permissions without having to install system app (requires root)
#735: fixed parsing of native alarms and API call for Marshmallow
#736, #737, #738: various FC from gplay crash reports
#741: improve functionality for non rooted devices (having system app installed)
2.1.0.0
No changes from RC6
2.1.0.0_RC6
Some more widget tuning
Merged transations
2.1.0.0_RC5
Some widget tuning
Merged and compacted changelog
2.1.0.0_RC4
#720, #721: "Awake" is now consistently "Awake when screen off"
2.1.0.0_RC3
I18N
More work on widget
2.1.0.0_RC2
#712: Fixed widget real estate
2.1.0.0_RC1
#708: reverted AppOps call back to older working version
#711: fixed process view sort
#713: fixed graph series
See also in-app changelog
2.1.0.0_B5
#673: permissions list scroll issue
Experimental M-preview support
Transition animations
2.1.0.0_B4
#612: kernel wakelocks for LG G3 5.0
#694: added awake ratio to dashclock
#699: merged system app changes
#702: moved to new appcompat
New Icons by Javi
2.1.0.0_B3
#693, 695: fixed crash on 2.3.x devices
#693: reverted back to "old" (small) system app apk to work around CM/LP 5.1.1 installation isuues
#696: fixed behavior of the "back" icon on older Android devices
2.1.0.0_B2
#671: revert to old AppOps calling method
#681: fixed rate dialog
#683: limit widget font size
#686: string mssing leading to @number being displayed
#687: widget opacity can be adjusted
I18N
2.1.0.0_B1
New responsive widget
#510: New System App (no need to update)
#658: Fixed various crash reports from gplay
#679: Fixed graphs being off on 5.1
#405: Fixed widget sometimes not refreshing at screen on
2.0.0.0
No functional changes from RC6
Merged I18Nalized changelogs
2.0.0.0RC6
This is the golden release: release notes have been updated for the upcoming 2.0
#650: semi transparent grey touch feedback for pre-lolipop devices
- Sorry, no fix for the unthemed dialogs: there is a bug in appcompat to that and I could not find a way around that except rewriting all dialogs and that is too much change at this point in time.
2.0.0.0RC5
#632, #633, #634, #635: Fixed package info dialog (colors, label width)
#639: added arabic (testwise)
#626: fix (again) for FC on long press using german language
2.0.0.0RC4
#626: fixes crash when long-pressing a list item
#630: added credits for I18N
#631: hotfix for issue with RC3 on pre-lolipop devices
2.0.0.0RC3
#616: no battery graph when all values are 100%
#617: no changelog showing in RC2
#618: add info to dumpfile is alarms/kernel wakelocks are from API
#621, #624: I18N
#622: material design touch feedback
#625: FC opening dashclock settings
2.0.0.0RC2
#552: fixed wrong style for overflow menu in dark theme
#609: fixed oblique lines in graphs
2.0.0.0RC1
#546: option to force EN-en locale
#569, #582, #588, #595: more translations
#583: move *api* out of the title
#585: optimized load time of graphs
#586: use white icon for watchdog notifications
#597: battery graph always shows same data
#599: FC opening credits screen
#600: clean up debug info from normal logcat
#602: fixed watchdog reporting of awake
2.0.0.0B7
#491: added frature to import/export preferences
#540: System App Dialog now includes link to the recovery ZIP as a workaround is in-app install does not work (links to XDA or gplay, depending on version)
#551: fixed "pinned" battery graph
#553: lighter cicle gauge and font
#554: settings screen and white text on the light background that appears after clean start
#558: make from-to ref spinners suppressable
#563: more I18N (thanks to gaich and mag01 fpr their hard work keeping up with me changing the strings)
#564: alarm details dialog title is too dark for dark theme
#566: add notification bar color for lolipop
#572: pass the su --context for accessing dumpsys alarm (may cause slowdown, please report on that with supersu version you are using)
#574: better performance in graphics
2.0.0.0B6
#521: make icon size and font size adjustable
#522: kernel wakelock using API fail on lolipop
#550: missing strings
#556: fixed native kernal wakelocks on lolipop
#557: no translation of array, mote stuff to strings
2.0.0.0B5
#360, #529, #534, #539: more externalized strings for I18N
#387: use of wakelocks with timeouts, because I can
#511: Themed dialogs
#517: redesigned graphs
#527: add SELinux policy to dumpfile
#532: fixed theme switching issues
#535: added Czeck, thanks to mag01
#536, #537, #538: added russian, thanks to gaich
#531: fixed alarms dialog showing infinite / Hr.
#545: merged new constants that were causing the wrong stats to be processed
2.0.0.0B4
First shot at I18N: implemented german
#495: cleanup ununsed libs
#502: cleanup assets
#518: fixed infinite wakeups per hour in alarms
#519: re-add battery from/to % to screen (optional)
#520: alignment of labele/icons
#523: theme switch only complete after restart
#524: switched back from cards layout as it takes too much real estate
#525: notification area invisible by default
#526: FC after theme switch
#528: Partial wakelocks show wrong values (thank google for changing the constants again)!
2.0.0.0B3
#484, #508: surface information about errors / failures to the UI
#493: avoid retrieving the battery level from battery info API to reduce load (and avoid service unavailable)
#497: added dark theme
#509: added % from/to back to dumpfile
#512: theme preference slider controls
#513: fixed empty release notes
#515: automatically detect SELinux preventing access to dumpsys alarm and fall back to API mode
#516: fixed alarms showing infinity in gauges
2.0.0.0B2
#496: fixed gauges in RAW stats always being 100%
#499: "since" and white header missing in raw stats
#504: failed remot to ro after system app install does not report an error anymore since the app was installed correctly
#505: advanced pref to enable alternate (API) mode for retrieving alarms (and avoid the need for permissive kernel)
#506: alarm details missing in dumpfile
Bigger changes under the hood: externalized all preferences to prepare for I18N
2.0.0.0B1
It's all new and shiny
#487: ability to save JSON format from tasker plugin
New calculation approach to avoid rounding differences
Simplified / removed unused options from settings
Removed google analytics
1.16.1.0B2
#486: watchdog does not warn
1.16.1.0B1
#446, #483: watchdog warns about 100% awake even if reading shows it's not the case
#481, #482: FC conditions from crash reports
#485: addedf more comprehensive info about BATTERY_STATS perm and Xposed setting to dumpfile
1.16.0.0
no changes from RC6 1.16.0.0_RC6
#479: attempt to fix failing system app install process on certain devices
#480: fixed Dashclock settings not opening in xdaedition
1.16.0.0_RC5
#475: more speaking text for XPosed module settings
#476: fixed dashclock API 2 manifest (kudos to DvTonder)
#477: fixed exception in method to obtain other stats from dumpsys (compat mode)
#478: fixed alarm parsing error on pre 4.2 versions
1.16.0.0_RC4
#469: Fixed network stats parsing error
#472: Fixed alarm parsing for L preview
#473: fixed wakelock being expressed in ms on L preview
#474: fixed sorting of CPU states
1.16.0.0_RC3
#470: fixed non null extra passed by certain launchers
#471: fixed batterystats service name on L preview
1.16.0.0_RC2
#464: fixed icon height in list
#466: if xposed modue is checked in advanced prefs do as if all perms were there (use at your own risk)
#467: fixed missing icons in network view
#468: fixed FC condition when creating a logcat
1.16.0.0_RC1
#463: added copy to clipboard on long-press
Merged to master1.16.0.0_B7
#462: fixed antialiasing of pie gauge to avoid pixelation
1.16.0.0_B6
#457: fixed FC on calling permissions
#458: fixed value of "other" stats gauge being off
#459: pie gauge brush too large on low density devices
#460: add setting to disable system app presence (for XPosed module users)
#461: added setting (display section) to use "old" bar gauge instead of "new" pie
1.16.0.0_B5
#452: update to Dashclock API 2.0
#453: fixed "current" reference not getting updated when BBS is called from tasker
#454: fixed network stats "lo" not matched to "Mobile"
#455: merged a few UI changes from the upcoming 2.0 branch
#456: fixed: when only one reference spinner is shown avoid Toast message
1.16.0.0_B4
#426: added occurences per minute/hours in alarms on screen and dumpfile
#450: fix for memory leak
#451: revert from JSON the Java serialization of references for better performance (references will be deleted after installation)
1.16.0.0_B3
#448: if root is available offer full featured alarms using dumpsys
#449 avoid flushing cache, imporving performance
1.16.0.0_B2
#447: system app has wrong signature
1.16.0.0_B1
#427: optimize the root calls for dumpsys if system app installed
#429: replace java serialization of references with a more flexible JSON serialization
#435: avoid crashing when appops not available (4.4.2+)
#437: better resetting of screen counters for non rooted 4.4+ devices
#439: dumpfile chapters comments reflect need for root
#440: better support for root (does not require to be enabled in advanced prefs anymore)
#441: offer to install as system app on 4.4+ is root available
#443: alarm does not require root anymore
#446: watchdog notification should never report more than 100%
1.15.0.0
Same as RC8 except the release notes
1.15.0.0_RC8
#432: make sure to ask for su rights right after enabling root features
#433: hint that the system app should be uninstalled before uninstalling BBS
1.15.0.0_RC7
#430: better fix for blocking root access
#431: fix for install as system app when package comes from gplay
A few changes in the popup for kitkat user at first run
Bump in version number causes references to be deleted at first run
1.15.0.0_RC6
#430: fixed blocking call if trying to install as system app without having root features enabled
1.15.0.0_RC5
#428: force mediascanner after saving files
Recreated icons in all densities
1.15.0.0_RC4
#421: Another attempt to fix the xxxhdpi icon
#426: fied missing process stats on kitkat
Fixed other stats not refreshing properly on kitkat
1.15.0.0_RC3
Fixed the way we manage system apps
1.15.0.0_RC2
Sharpened xxxhdpi icon
Added the ability to install BBS as system app (requires root, usefull only for kitkat right now)
1.15.0.0_RC1
#424: add proper (error) messages to notify about features not available without root on kitkat.
Add timing of screen on time when no stats can be retrieved
1.15.0.0_B6
#421: added xxhdpi assets
#423: fixed alarms parsing on 4.3+
1.15.0.0_B5
#422: fixed account info obfuscation for new account format coming with kitkat
1.15.0.0_B4
#418: re-add process stats to kitkat
Fix for potentially missed partial wakelocks where uid could not be found
1.15.0.0_B3
#419: Package info and icons re-added to kitkat partial wakelocks
#420: fixe from gplay creashreports
Added hires icon
1.15.0.0_B2
#416: readded missing other stats (kitkat)
#417: fix for duplicate partial wakelocks
1.15.0.0_B1
#414: Fixed error at launch (service not available for kitkat)
#415: re-added partial wakelocks and very basic other stats (deep sleep only) to kitkat (requires root)
1.14.0.0
Updated libs
1.14.0.0RC1
#404: Fixed text padding for short time strings
#407: added app ops for 4.3+ users
1.14.0.0B2
#401: added ACCESS_SUPERUSER to manifest permissions
#402: wrong values in wakelocks with hashed account info caused by hash being applied multiple times
1.14.0.0B1
#355: implement a permanent su shell to execute all commands
Various fixes from gplay crash reports
1.13.4.0
Same as B2, no changes
1.13.4.0B2
#391 support all implementations of sqlite
1.13.4.0B1
Refactoring of database access to avoid locking
1.13.3.0
Fix for users having FCs due to database lock problem
1.13.2.0
Fix for users having FCs at start
1.13.0.0
Unchanged from RC2
1.13.0.0RC2
#384: salted the account name before hashing
Fix for stats not reflecting the combo boxes anymore for some users after a reference refresh
1.13.0.0RC1
Fix to make sure spinners do not get out of sync
#383: Fixed battery / voltage level in dumpfile
A few typos
Added timestamp to logcat
1.13.0.0B5
#191, #334: Added "share" option for saving/sharing dumpfiles, dmesg and logcat
#381: fixed database exception occuring sometimes and potentially responsible for the blank stats happening from time to time for some users
#382: dmesg requires root for newer kernels
1.13.0.0B4
Added some logging to debug percentage problem: adb logcat | grep StatsAdapter
#377: refactored KB handling
#379: refactored "raw" stats
Stats row shows interactive areas (glow)
1.13.0.0B3
#236: mask account info
#378: fixed fallback stat in DashClock widget
1.13.0.0B2
#376: no icon in process view
#377: missing KB icon
1.13.0.0B1
#367: added dashclock support
#375: added JSON dumpfile format support
1.12.4.0
#372: Widgets do not update on a fresh install
#373: change default widget fallbacl to "boot"
#374: refresh spinners and user refresh causes the cache of refs to get flushed/reloaded from data
1.12.3.0
#369: small widget uses wrong prefs
#370: Other stat times/total time incorrect
1.12.2.0
#366: fixed FC when creating a dumpfiel from tasker
Improved logging
Fixed concurrency problems potentially leading to weird display
Fixed a caching issue
1.12.1.0
Fix migration issues from 1.11 leading to inconsistent stats
#359: make sure BatteryInfoUnavailableException does not other stats to be shown
#361: a better fix for battery/voltage using current instead of "to" stat
#363, #364, #365: fixed different error conditions from crash reports
1.12.0.2
Skipped 1.12.0.1
#356: bug when migrating from 1.11
#357: to battery % always shows current value
1.12
Same as RC12, no changes
1.12RC12
#356: fixed empty stats after screen being rotated
1.12RC11
#223: active monitoring
#346: save 'unplugged' ref at first use to avoid empty refs
#347: pref to diable widgets to be refreshed at screen on
#344: better fix for errors in parsing network/alarms causing the whole reference to be saved empty
1.12RC10
#302: added credits for used libs in app besides git (under help)
#342, #345: remove log verbosity when debug advanced pref is not enabled for cleaner logcats
#343: fixed alarms parsing of details for flg= and cmp= (both pre- and post 4.2.2)
#344: error in parsing network stats causes the reference to be saved empty (potentially a cause of reference shown as not having been created)
1.12RC9
#323: pref for saving dumpfile to private storage
#337: implement 48dp rhythm
#338: optimize list real estate
#339 (partially): fixed tiny font for widget being same as small
1.12RC8
#341: fixed alarms for android 4.2.2
1.12RC7
#327: spinner refresh issues
#331: sometimes the stats shown do not reflect the spinner selection
#333: charged and unplugged should not be in the "to" spinner as that makes no sense
1.12RC6
#307, #328; widget stops updating and stays blank
#327: spinner refresh issues
#329: fallback ref in 1x1 widget is never loaded
#330: an attempt to fix wakelock issue when su commands are blocked
1.12RC5
#326: fixed rate dialog showing at each start
Some profining
Less intrusive logging if dedug is disabled in prefs
1.12RC4
New readme and rate dialogs
#325: times in wakeup_sources are a factory 1000 to small
1.12RC3
#321: fixed spinner heights
#322: filter "0" cpu states
#324: add marker to dumfile if using wakeup_sources
1.12RC2
#320: added experimental support for wakeup_sources (newer kernels deprecate /proc/wakelocks)
1.12RC1
#318: automatically refresh current when entering the main screen (can be changed in adv. prefs)
#319: "to ref" is shown by default (can be changed in adv. prefs)
1.12B9
#316: FC when calling BBS from watchdog notification
#317: 2x2 widget showing 0 KWL/PWL
1.12B8
#312: Fixed negative CPU percentages
#313: refresh after events creating new references show inconsistent references (from/to)
#314: proper migration of default stat type prefs coming from 1.11
#315: fixed cause of "unknown error"
1.12B7
#310: fixed partial and kernel wakelocks always being the same and icons missing
#311: fixed kb reader thread not retriieving online content
1.12B6
Changed the way su operations are processed
Some fixes regarding the refresh of the spinners
Make sure all root operations are running in an own thread
1.12B5
#308: since boot can not be selected
Fixed callstack when updating a reference
Widget now have a lightweight method for obtaining the current data without causing the cache to be updated
Spinners show references sorted in ascending order
Fixed spinner not showing all existing references
1.12B4
#306: fixed broken dumpfile
Added pref to show/hide the "reference to" spinner
Added screen on reference (saved when watchdog is active)
References are now stored in a database
From/To references are chronogical
1.12B3
#303: invalidate "current" when other refs are saved
#305: dissapearing refs
1.12B2
Some tuning
#298: Fixed FC on raw alarms
#299: Watchdog does not report when awake > threshold
#300: fixed spinner height
1.12B1
#187: freeze current time
#193: add screen brightness states to "other" stats
#274: copy wakelock to clipboard
#279: add option to save dmesg
#286: add mV/h to dumpfile
#290, 292: typo, wording
#296: kbreader is now asynchronous and doesn't block UI thread when github is slow
1.11
no change from RC8
1.11RC8
#289: FC on package info screen for pre-ICS devices
1.11RC7
#288: usability issue in permission view fixed
1.11RC6
#276: another attempt at fixing scheduled dumpfile creation from tasker
#287: fixed ratio calculation for battery drain in %/h
1.11RC5
#280: added legend to permissions tab
#283: unticking watchdog option "Screen off" stops the EventHandler service
#284: added drain per hour to battery drain text on screen and dumpfile
1.11RC4
#281: Fixed bad reference on unplug when 100% charged
#276: fixed dumpfile creation from tasker
removed delimiter till a configurable version can be provided
1.11RC3
A better fix for widgets being updated
Nicer implementation of package info using a tabbed pager (using ActionBarSherlock)
Changed in-app help and messages to make the conect of references clearer
More speaking "missing ref" texts
1.11RC2
#277: more prominent delimiter in listview
fixed calculation of since value
1.11RC1
#229: show autorun and other package info like permissions and services, click on the icons
#279: reverted the time reference for since and calculations back to 1.9.x
#275: widgets do not always refresh: hack to make sure the widget always get the broadcasts from the launcher, even if the lancher is not complying with standards (see http://stackoverflow.com/questions/7390449/widget-notification-when-homescreen-app-is-restarted)
yet another attempt to fix since screen off dump incomplete when created at wakeup from taker plugin
big refactoring (only relevant for the ones reading the code)
1.10.5
No changes from RC1
1.10.5RC1
Make sure app is not installed to SD (watchdog, widgets, detecting boot and unplug won't work properly)
Writing references respect "root features" settings
Fixed error condition in widget (potentially not showing data)
Refactored broadcast handlers
Another attempt to fix dumpfile creation in tasker plugin
1.10.4
Fixed logcat permission
1.10.3
Some changes in widget code
#270: added option to save logcat from app
1.10.2
#263: adv prefs to turn on stats while plugged
#264: error happening when reading other stats should not skip the whole stats
#265: reference summary shows data instead of counts (in dumpfile and log)
#266: difference in "since" time between widget and screen
#268: error when checking charger status causes exception
1.10.1
#261: missing cpu states file causes references to stay empty
#262: battery level handling causes exception
1.10
A few changes in logging
New ?????
1.10RC3
#257: referencea are missing processes
#258: if debug pref is not checked since shows 0s
1.10RC2
#256: silent crash on progress dialog
#252: a better fix for the FC on enabling root features
Typo in prefs
Added drain to on screen battery info
1.10RC1
#251: added batter level from/to to screen (and a pref to enable/disable it)
#252: an attempt to fix the FC on enabling root features
#254: incomplete (ref missing) dump from tasker
#255: not systematic crash on creating custom ref
1.10b7
#248: added raw CPU states
#249: ratio of other stats is calculated against something that is smaller than "since"
#250: when a reference is null all stats should show that there is no reference availble
1.10b6
#247: fixed deep sleep sometimes being substracted twice, causing negative values
1.10b5
#245: source of "since" is now the reference
#246: added battery voltage/level from/to to dumpfile
Removed unneeded API calls (that were to cause to batteryinfo stopping)
New error handling exposes API errors to the user
1.10b4
#243: deep sleep not showing
#244: no stats when plugged (as some internal registers do not count when plugged, leading to inconsistencies)
Removed pre-1.9 migration code that may lead refs to be deleted at start
#235: grey background for bars
1.10b3
#234: show icon for stats providing package info
#8: call application settings when package info is available (click on icon)
Refactored error handling
Workaround to avoid SuperUser to obcess about asking for rights
1.10b2
#240: removed "test" menu
#241: fixed nested menu causing FC on SDK<14
#242: removed froyo specific references as BBS is not depending on Android's implementation of refs anymore
1.10b1
#209: added since boot ref
#227: fallback to since boot if default stat type is not available
#228: pref to control log level
#230: two step save of references to avoid empty references if su request times out
#231, #232: reorganized preferences
#233: reorganized menu
#238: process Siyah "deleted: " kernel wakelocks properly
#239: network stats / alarms are disabled by default, can be turned on in advanced prefs
1.9.2.1
#226: reference info to dumpfile
1.9.2 (|xda only)
Fixed error condition where "no ref since charged" appeared after a while when a reference was present
#224: screen on time is too high in "since screen off"
1.9.1 (@xda only)
Added more logging to references
#213: Tasker plugin does not create dumpfiles / custom refs
#216: more compact CPU state view
#218, 220, 221: various fixes from Google Play logs
I maintain A list of features to be implemented and bugs here.
Below you can find older releases.
If not required I do not recommend using these as they are not up-to-date with the most current development, features and fixes.

How-to and FAQ
How-to
I have created a GitHub project for the Knowledge Base where the online and in-app help will be maintained as well. You can find the information here:
The online help: https://better.asksven.io/betterbatterystats/help/
The how-to: https://better.asksven.io/betterbatterystats/how-to/
A good how-to by Chris Hoffman published by How-to geek
Online Hilfe auf Deutsch: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/help_de.html
How-To auf Deutsch: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/howto_de.html
The repo: https://github.com/asksven/BetterBatteryStats-Knowledge-Base
The Knowledge Base Project: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/
FAQ
1. Q:Will BBS be fixed to support Kitkat (I get "Services could not be contacted" errors?
A: Kitkat is supported by BBS starting from version 1.15
2. Q:Why are partial statitics not available on Kikat?
A: If you have a rooted phone enable the advanced root features and all will be fine. If you have no root unfortunately you are stuck without Partial Wakelocks as Google has made changes to prevent apps to access that data (see also here)
3. Q:Why installing BBS as a system app as everything works with root?
Deprecated: BBS does not require the system app anymore
A: Starting with Kikat BBS has 3 modes: without root a limited mode provides a minimal set of stats. With root the set of stats is complete but some stats (other, partial wakelocks, processes) still use a workaround. Finally with the system app BBS is fully featured without any workaround.
4. Q:I have high wlan_rx kernel wakelock. What is it and how to proceed?
A: This kernel wakelock is caused by Wifi waking up your device. To avoid it you should turn your Wifi off if not using it, use a tool to control your Wifi state or try to find and remove the cause. More here
5. Q: Google Maps is causing a lot of overhead. Must I freeze it?
A: no, Karpfenhai wrote step-by-step instructions on how to configure autostarts and the location service to avoid that
6. Q: Are you aware of the bug in BBS causing SuperUser to ask for su-permissions over and over again
A: As you said, SuperUser is asking over and over again, it's no BBS bug as BBS only requests su rights. More here
7. Q: BBS shows "no ref since unplugged"
A: Starting from 1.9 is is mandatory to plug/unplug after boot to get a "since unplugged" reference to be created. Starting from 1.10 there is anew reference "since boot" and a preference to fall back to that reference if no other is available.
8. Q: Why can't you just skip deleting the references at boot?
A: If I could I would. In a nutshell: BBS is a passive monitoring tool; this means it does not cause any overhead collecting data but compares snapshots. Now the disadvantage of this is that it makes no sense to compare values of counters between two references (e.g. "since unplugged" and "current") if the counters were reset in between. In fact that would potentially cause negative values, in every case wrong values.
9. Q: But is used to work before. Why did you change it?
A: It didn't work, you just didn't notice. The kernel and Android reset their counters at boot. That means that there is no way to compare counters from before the boot with counters from after.
10. Q: What do the widget colors / graphics mean?
A (new round widgets): the legend is displayed if you resize the widget
A (legacy widgets): For the large widget it's pretty simple. The colors represent the values "Since" (blue), "Deep sleep" (green), "Awake" (yellow), "Screen on" (white), "Kernel wakelocks" (magenta), "Partial wakelocks" (cyan). The 100% is the max of those values.
For the small widget see here
11. Q: Where are the dumpfile and logcat saved / how are the files named?
A: Both files are saved to /sdcard, their names are BetterBatteryStats-.txt and logcat-.txt where timestamp is of the format "yyyy-MM-dd_HHmmssSSS" (starting from 1.12 there is an option in advanced prefs to save those files to the private directory /sdcard/Android/com.asksven.betterbatterystats/files).
12. Q: Are you aware of the fact that BBS does not work properly for secondary users (Android 4.2)?
A: BBS works fine for secondary users as long as you don't enable root features. The reason is not BBS but the lack of support of the multiuser feature in the superuser/supersu version you are using.
13. Q: What is *overflow*?
*overflow* is a sign that one stat counter was overrun. This may happen if you have not boote your phone since long or if some wakeup/wakelock is very frequent. The only way to see what is hidden behind *overflow* is to reboot and take a fresh reading.
14. Q: Why is 'screen off' reference not being created?
A: You have to enable the watchdog for that reference to be created
15. Q: Even after plugging/unplugging my phone no reference except 'boot' is shown
A: something is preventing the unplug event to be passed to BBS. You should check for tools like greenify or stamina mode that mask such events and make sure that BBS is whitelisted. On newer Android versions please also make sure that BBS is not "optimized" by Android, under "Settings - Battery Optimization"
16. Q: What is the watchdog and how does it work?
A: The wachdog is a feature to help you in analysing when happens when screen is off. When the watchdog is turned on a reference 'screen off' is created. You can also configure the watchdog to create a reference 'screen on'. Opionally the watchdog will notify you when screen is turned on and the awake ratio was bigger that the configured threshold. In order to avoid too much overhead in processing a threshold can be set to disable the computing for short screen off times.
17. Q: my logcat is empty and says "Unable to open log device '/dev/log/main': No such file or directory"
A: Check if you have a custom kernel that turns off logging. If not some file permissions may be broken: use the repair permissions function from your recovery
18. Q: How can I get rid of GSF wakelocks
A: GSF (google service framework) can not be avoided and in no case it should be frozen. Here are some settings that can help reducing the overhead.
19. Q: The other stat is wrong. It shows "No data connection" and "No or unknown signal" while was online with Wifi all the time
A: "No data connection" and "No or unknown signal" refer to your cell data (2G/3G) service. As you have had Wifi on for some time the cell data was turned off, consistent to what the stats say: work as designed
20. Q: I can not install BBS as a system app. What can I do.
A: BBS does not require the system app anymore
A: If you are on a version older than 4.4 you don't need to install BBS as a system app. If you are on 4.4+ you should first try the in app installer. If for some reason it fails you can use the CWM scripts attached to install / uninstall BBS as a system app
21. Q: I am suffering from a high NLPWakelock time. Is there something I can do about it?
A: Here's a good summary of what NLP is and how it can be positively impacted (thanks to @Perseus71)
22. Q: On CM12 based ROMs the launcher crashes when placing a widget. When will this be fixed?
A: I can not find anything wrong with BBS code and the crash occurs in the launcher, not in BBS. After spending quite some time trying to understand the problem I must conclude that the problem is with CM12 (other ROMs on Lollipop do not have this problem)
23. Q: I can not or do not want to root my devices but would like to use BBS to gain insight. Can this be done?
A: The answer used to be "no" but this has now changed. See post #4 for a detailed description on how to proceed.
24. Q: I can not get BBS to work. How should I proceed to find out the cause
BBS has no dependency to any root-tool and does not require root to work, it only requires specific permissions that can be granted by:
- using ADB as described in the FAQ
- letting the app grant itself the permission if root is available
25. Q: BBS Shows a permanent notification. Can I remove it?
The notification is due to the android app model having changed and now requiring apps that run in the background to show themselves. I have put the "background app" notification into a separate channel named "BBS Event Processing" so you can disable it if it bugs you: no other vital notification will be send to that channel
26. Q: What is this popup saying "Detected problems with API compatibility"?
For Android 9.0 Pie users getting the "Detected problems with API compatibility (visit g.co/dev/appcompat for more info)" popup error please see this post.
When diagnosing / analysing there are a few important things to know:
- the app (advanced settings) shows you whether the permissions were granted or not
- when checking if any acition had a positive result you should always use raw stats as the default view does a diff between two snapshots, i.e. if one snapshot is missing it may show no results
- logcat may give you some info about what is going wrong, e.g. the app not being able to contact the battery_info service

Running BBS on non-rooted devices
This is not an april's fool joke!
TLDR;
This knowledge article describes a method to enable BBS to run on unrooted devices on Android versions starting with Kitkat (on previous versions root is not a must). More about that here: http://better.asksven.org/bbs-systemapp/
As it requires a few tools to be installed on your pc it requires some basic knowledge, understanding, and the readiness to tinker and to learn.
What is describe here is a method to inject according permissions required to access the battery stats using the android debugging bridge to issue commands from the pc. This will allow to grant the needed permissions, that will survive reboots.
Credits
All credits for this brilliant approach go to @Looki75. My special thanks go to @Perseus as well as to the supportive bbs community in general for their tenacity, feedback and constant support and feedback.
Details
Congrats, you made it until here, let's get started.
We will go through all steps of the setup. If you are aware of the tools and techniques please feel free to jump to the appropriate section.
The initial post on this topic as well as the basic steps (for advanced users) can be found in this original post: http://forum.xda-developers.com/showpost.php?p=67441059&postcount=30632
1. Install necessary ADB drivers and exe on PC
This may be the tricky part but we can leverage some experience in that area. A good read:
The 15 second adb installer
2. Enable USB debugging on phone's developer options
This is pretty straight forward:
http://www.howtogeek.com/129728/how...menu-and-enable-usb-debugging-on-android-4.2/
Congratulations, your are now a developer!
3. Connect phone to PC
The easiest part: connect the usb cable on both ends. When you connect the phone to PC on ADB, some models will throw a authorization message on phone Screen asking if you authorize this pc to access the phone. Its a Android M Thing.
4. Run the commands:
This requires some explanations and some hints about how to check what may have gone wrong.
Once you have connected your phone via usb start by unlocking your phone and by issuing the command: adb devices
If it came back with a Device name instead of waiting for device or "no permissions" (on linux), then you know its safe to go ahead with the real command. Its this adb devices that also triggers the Authorize pc command.
If the "adb devices" command does not return a positive result you may want to look into:
a) on windows the proper installation of the special usb drivers
b) on linux you may need to add some udev rules. This may help: http://stackoverflow.com/questions/32151114/adb-is-not-detecting-my-android-device-on-ubuntu
If the "adb devices" returned a positive result is is safe to proceed:
adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS
Adapt the package name depending on which version - XDA or PlayStore (without "_xdaedition" extension) - you have installed
Update: starting with 2.3-150 two new permissions are required to support alarms fully on unrooted devices
adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS
adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.DUMP
adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.PACKAGE_USAGE_STATS (needed starting on Lolipop)
Update: starting with SDK28 (Android 11) google has restricted access to the private APIs that BBS uses. Google is fuzzy about the why and arguments in terms of privacy and security.
You will need to run the following (assuming your device is not rooted, otherwise BBS takes care of that for you) for BBS to get access to these APIs:
SDK28 (Android Pie / 9)
adb -d shell settings put global hidden_api_policy_pre_p_apps 1
adb -d shell settings put global hidden_api_policy_p_apps 1
SDK29 (Android 10 and following)
adb -d shell settings put global hidden_api_policy 1
Note: a restart may be required after applying the global settings...
See also here
Voila... congrats for your tenacity, you have earned it!

Ref, Hints and blacklist
Litterature
Article from the Android PDK about Power Management: http://www.netmite.com/android/mydr...s/power_management.html#androidPowerWakeLocks
Other useful tools
The default battery usage (Gingerbread): Settings -> About Phone -> Battery Usage
The most interesting data is shown when clicking on the graph (bars below the graph). Unjustified "awake" times when display is off is an indicator for rogue apps doing stuff in the background when you think your phone is asleep
Battery Monitor Widget
Has a great stat on battery drain over time. I use this tool regularly after leaving my phone alone for 1/2 hour to check how the battery drain looks like against my benchmark of 2-10 mAh average (optimal for my SGS2).
[android backup service]
(http://code.google.com/android/backup/index.html). It is a service that offers cloud backup/restore of your settings and offers an API for other apps to do the same (http://developer.android.com/guide/t...ta/backup.html).
You can turn it off (but will lose the automatic backup) under Setting -> Privacy ->Back up my data.
Backups are useful though but no need to do it in the cloud, I'd recommend scheduling a regular backup using titanium instead (that's my setting).
[DataTracker-FD] is fast dormancy. Find the 'secret' codes for your device to turn FD off. *#*#9900#*#* on an SGSII. (contrib. by nobnut)
[syncmanagerhandlesyncalarm] That service is documented here (http://www.kiwidoc.com/java/l/x/andr.../c/SyncManager) and is responsible for updating the accounts you have under Settings -> Accounts and Sync. High values may come from bad settings (sync too often, huge amounts of data) or poorly written providers.
[reserved for misbehaving apps]

Been looking for something like this since I installed a GB ROM!
So, basically I install this app, and then Spare Parts should work as it normally did? (or dial *#*#4636#*#*, or whatever that is)

thebeardedchild said:
Been looking for something like this since I installed a GB ROM!
So, basically I install this app, and then Spare Parts should work as it normally did? (or dial *#*#4636#*#*, or whatever that is)
Click to expand...
Click to collapse
No Spare Parts won't be of any help as BetterBatteryStats does not replace com.android.settings.battery_history.BatteryHistory (called by Spare Parts). Installing the app you will get a new icon and will get the stats when starting it

Excellent work! Just what Gingerbread needs. The very best of luck with the app!
Thank you.
Sent from my Motorola StarTac using Voodoo

chamonix said:
No Spare Parts won't be of any help as BetterBatteryStats does not replace com.android.settings.battery_history.BatteryHistory (called by Spare Parts). Installing the app you will get a new icon and will get the stats when starting it
Click to expand...
Click to collapse
Ah, I see, so I use this app instead of Spare Parts. Well awesome, thanks for the clarification, and the useful app!

This is great. What about mimicking the part in spare parts that showed percentage running time? That's valuable info too. I've seen many times where running time was pegged at 100 yet there wewettewere no partial wake locks.

lexluthor said:
This is great. What about mimicking the part in spare parts that showed percentage running time? That's valuable info too. I've seen many times where running time was pegged at 100 yet there wewettewere no partial wake locks.
Click to expand...
Click to collapse
I'd be happy to look into that. Can you give me the exact name of the option/dialog you are missing to make sure we talk about the same thing?

nobnut said:
Excellent work! Just what Gingerbread needs. The very best of luck with the app!
Thank you.
Sent from my Motorola StarTac using Voodoo
Click to expand...
Click to collapse
Thank you for the support and for the testing!

Bug in Network Usage stat
nobnut has reported incomplete stats for network usage (list does not show all apps that have generating network traffic). I reproduced this on Gingerbread where my phone only shows google maps traffic. I could reproduce this on HSDPA as well as on Wifi. The figures that are shown seem ok and increases when I use Maps.
Now interesting is that this problem can not be reproduced on Froyo where reported apps concur with the Network stats from Spare Parts.
As the stat is incomplete I'll remove it from the app till I can find a solution.

When I noticed this, it occurred to me that perhaps user apps were not reporting their data, whereas the system apps were. I can get readings for a number of apps, they are all system apps however.
This may just be concidence.

New version 0.4.0 is out. See second post for download link and changelog

Your blog link still reads 0.3.1

thebeardedchild said:
Ah, I see, so I use this app instead of Spare Parts. Well awesome, thanks for the clarification, and the useful app!
Click to expand...
Click to collapse
Not sure since I can't get there on spare parts.
It was in battery history and I think it was the default that came up that said "running" and it gives a percent of the time the phone is running.
I've seen that pegged at 100% with no wake locks, so that still indicated a problem.

Very cool, thank you for your efforts. Downloaded and following on twitter/subscribed to the thread.

nobnut said:
Your blog link still reads 0.3.1
Click to expand...
Click to collapse
oops, fixed, thank you

lexluthor said:
Not sure since I can't get there on spare parts.
It was in battery history and I think it was the default that came up that said "running" and it gives a percent of the time the phone is running.
I've seen that pegged at 100% with no wake locks, so that still indicated a problem.
Click to expand...
Click to collapse
Ok here's what I have on Froyo going to Spare Parts:
. Battery Information: useless
- Usage stats: it's an poorly formated list of apps with the launch count and CPU time
- Battery History: a list of graphable buttons with following stats: Other usage, Partial Wake Usage, Sensor Usage, GPD Usage, Network Usage, CPU Usage. Each shows a list of apps/processes with blue/red bars.
Maybe you are talking about "Other usages". Here I see % running, %screen on, %wifi on

Related

New Version Of Locale

You'll be happy to hear that we've just released Locale 0.3 beta this week. To install the update, simply:
1. Open the Android Market
2. Search for Locale
3. Tap on Locale
4. Tap on Install
The update resolves the PM-AM time boundary problem you ran into, as well as these other changes:
New Features
- Time Condition now supports day of week
- Network Setting now supports GPS
- Battery Condition now supports plugged-in and unplugged
- Contact Condition now supports accelerated scrolling
- Calendar Condition displays which calendar each event comes from
- Location Condition supports easier renaming and deletion of locations
- More thorough in-application help
Bug Fixes and Enhancements
- Better location detection
- Calendar Condition and Time Condition now detect changes immediately (previously it could take up to 10 minutes)
- Fixed a bug with Time Conditions spanning across the PM-AM boundary
- Fixed a bug where large locations couldn't be edited. Zoom controls now display even if a location fills the screen
- Notifications dismiss when leaving a situation
cool.
love the apps, keep them coming.
....cannot wait for cooking to start, but I think im not the only one...lol
just wondering.."Network Setting now supports GPS" means its posible to use locale features using gps only, without 3g location gethering?
Can anybode send me a link to the .apk oh this app for use on my HTC Tattoo, please?
THANK YOU
This is in the wrong forum; reported.

[Android] Total Screen Control (updated on 12 April)

I would like to take the opportunity given by XDA forum and share with you my application, named "Total Screen Control".
I would be more than happy if I will receive through this thread opinions, features requests, bug fixes requests, new ideas, anything that could improve the application.
Thanks !
Total Screen Control
Total Screen Control is an application for setting the Brightness Level, Screen Filter, ScreenOn Lock and Rotation Lock preferences individually for any application installed on your phone.
Allows you to apply a filter that dims the brightness below minimum value so your eyes don't hurt during night viewing. Very useful in low light conditions especially on AMOLED screens where even the lowest brightness value is still bright. Also can save a lot of battery combined with ScreenOn Lock based on phone orientation!
More features:
- Screen Filter/Privacy with schedule and brightness slider for fine control !
- Dynamic Screen Filter based on phone's light sensor! Forget about classic auto-brightness, switch to Dynamic Screen Filter!
- Screen Filter Bar for easy and cool control of Filter dim
- ScreenOn Lock based on phone orientation! Keeps the screen on as long as you use your phone! SAVE BATTERY also!
- ScreenOn Lock, Brightness level and Rotation Lock individually for any app
- Option to disable softkey backlight (not working on all phones)
- Tasker/Locale plugins !
- Notification icon on Status bar with all needed information
- Up to 5 configurable Screen Filter Presets
- 3 Widgets for easy access
- Configurable preferences, alerts
- Start at boot
Does your eyes hurt you when reading or playing before bedtime ? Enable the Screen Filter
Tired to get the screen off while reading your eBook, browsing on Web or playing? Setup the ScreenOn Lock
Want to set the brightness or rotation individually? Configure them with Total Screen Control
For all these this application is for you!
Changes log:
12/04/2012 - Ver 2.4.2
- Added option to manually input a value for Light sensor when using Dynamic Screen Filter
- Increased the list for dynamic levels to 10 items (from 5)
10/04/2012 - Ver 2.4.1
- added option for changing text color in notification status bar
- few bug fixes
26/02/2012 - Ver 2.4
- Tasker/Locale plugin for ScreenOn Lock event !
22/02/2012 - Ver 2.3
- Tasker/Locale plugin for Screen Filter settings !
- "Install button fix" option. Enable it only if you can't press Install button when installing an aplication.
- To come: Tasker/Locale plugin for other Total Screen Control features (eg ScreenOn Lock)
28/01/2012 - Ver 2.1
- Enhanced Softkeys backlight module. Turn off softkeys when screen filter value reach a configurable preset value
- New Softkeys off detection method (Root devices)
- Fixed first detection method,now it will work on supported devices. If not,select another method or contact me.
19/01/2012 - Ver 2.0
- Added NEW FEATURE: Screen Filter Bar - Control Filter dim with a swipe of you finger in any application you're in!
If you like this feature check Total Screen Filter which allows more customizations !
Check video for demo of this new feature
- Redesign of the application interface
- ICS compatible
- Various code enhancements
02/12/2011 - Ver 1.9.3
-Redesigned Screen Filter Schedule to be more intuitive
-Better performance when using Dynamic Filter
-Fix bug in Screen Filter Presets
11/10/2011 - Ver 1.9.2
Added option to delay Screen Off after the ScreenOn Lock is released.
07/07/2011 - Ver 1.9.1
Added option to select the interval Total Screen Control checks what application is visible and apply configured options.
Useful for those who want a better response time in changing the configuration but also for those who don't use settings per individual application by increasing the checking interval and by this achieving a lower battery usage.
26/06/2011 - Ver 1.9
*** New feature ***
- Option to disable softkey backlight when Screen Filter is enabled (not working on all phones)
Changes:
- Removed brightness popup window when brightness is changed
18/06/2011 - Ver 1.8
*** New feature ***
Screen Filter Color - allows you to change the color of the Screen Filter !
20/05/2011 - Ver 1.7
New feature !!
*** Dynamic Screen Filter ***
With this option you can configure Screen Filter levels based on phone's light sensor! Assign for every light sensor value a value for the Screen Filter !
Forget about the inexact auto-brightness option of your phone and enable Dynamic Screen Filter for better control of your phone's brightness!
28/02/2011 - Ver 1.6
New feature:
"Bright Light Detection", automatically disable Screen Filter based on Light Sensor readings when bright light is detected.
Useful when Screen Filter is enabled and the phone is used under direct sun, this feature will temporally disable the Screen Filter if the light threshold is passed.
14/02/2011 - Ver 1.5.1
Fixed Android 1.6 compatibility
07/02/2011 - Ver 1.5
Added option to disable Global Screen Filter for certain applications (e.g. you want Global Filter enabled but for Video Player or Messaging you want it disabled).
Just go in Application Tab/Brightness Icon and configure this feature for what application you want!
29/01/2011 - Ver 1.4.2
Added No Movement Detection in ScreenOn Lock based on phone orientation feature. Allows to set the time after that the ScreenOn Lock will disable if the phone was not moved.
Various enhancements in phone orientation detection algorithm.
Download: trial version valid until 06.02.2012
you might wanna say if its for android or winmo in the thread title
Kameirus said:
you might wanna say if its for android or winmo in the thread title
Click to expand...
Click to collapse
Thanks, I have only Android in my head, I didn't realize that it could be also for other platforms
Yeah, quite surprised that XDA hasnt created sub-forums for the different OS's aswell as mandatory topic titling.
Very nice idea though and thaks for posting info on your app bud
Really a good app , it could help me use lowest brightness value to save my battery.
But what i got a highly battery usaege on this app..... too bad~~~ Could some one tell me what's going on ?
My phone is idle , i even did not use it when i plug out the ac.
But ..
great app but it crashes everytime i try to change one of the settings :/
A great app, I like this.
Great app. working so far fine. No crashe....till now I can not confirm that battery problem.
serect said:
Really a good app , it could help me use lowest brightness value to save my battery.
But what i got a highly battery usaege on this app..... too bad~~~ Could some one tell me what's going on ?
My phone is idle , i even did not use it when i plug out the ac.
But ..
Click to expand...
Click to collapse
Ok I have got an equal result like you. 82% usage for the last 1h 20 min....Gonna keep it for a while on my device and watch its usage with the monitoring function of the app "SystemPanel".
Here is a screen shot of the usage
Hi guys,
thanks for your feedback:
Regarding battery use, this is something it needs deeper investigations, I have also encountered this high battery use REPORT but not always and I have gathered the following info:
- This is related only to ScreenOn Lock based on Sensor Orientation feature. So anyone that doesn't need this function just disable it and 99% that this usage will not appear anymore
- For the others, who find this feature useful there are 2 remarks:
1. First is a quote from another, much known application who's users reported also this high usage report:
* Battery usage is an insanely misleading stat. Many people assume that it means "80% of my battery was consumed by ****", and consequently, "if ***** were not running, my battery would last 80% longer". This simply isn't true. It's not even close. I've tried to get clear answers from Google on what the stat actually means, but haven't gotten more than "the amount of power consumed by an app when it is running". ***** doesn't run much.
* Some phones appear to get confused and attribute nearly all system battery usage to *****. This problem is not unique ******, and in fact applications such as Locale have started providing disclaimers for certain devices to warn users of the issues.
* ***** still suspends itself whenever the screen is turned off. The ***** service puts all threads into a sleep state using Thread.sleep(99999999999). It's possible that the Service is still being attributed some kind of resource usage since it hasn't been terminated (even though the threads have been suspended). I'm looking into this. At this point from what I can tell, there are no running threads once the screen is turned off...
I'm continuing to look into this, as I'm getting absolutely hammered at this point from a ratings (and consequently sales perspective), but I'm not sure that there is much I'm going to be able to do about improving the battery usage stats on specific devices.
The bottom line is this: ***** either improves your phone's battery life or it doesn't, regardless of what the battery stats say. On my Nexus One, ***** averages around 2-3% on the stats list. Sometimes it goes higher, but will generally drift back down to around that level.
2. This occurs randomly, please try to reboot your phone and check if the usage is still high.
DirkStorck said:
Ok I have got an equal result like you. 82% usage for the last 1h 20 min....Gonna keep it for a while on my device and watch its usage with the monitoring function of the app "SystemPanel".
Click to expand...
Click to collapse
I'm using also System Panel and there it could be clearly seen that Total CPU Time and Average Consumption for Total Screen are in limits.
reaperzero said:
great app but it crashes everytime i try to change one of the settings :/
Click to expand...
Click to collapse
Please provide more details, when it crash, what setting you try to modify, phone model, Android OS version...
muntos said:
Hi guys,
thanks for your feedback:
Regarding battery use, this is something it needs deeper investigations, I have also encountered this high battery use REPORT but not always and I have gathered the following info:
- This is related only to ScreenOn Lock based on Sensor Orientation feature. So anyone that doesn't need this function just disable it and 99% that this usage will not appear anymore
- For the others, who find this feature useful there are 2 remarks:
1. First is a quote from another, much known application who's users reported also this high usage report:
* Battery usage is an insanely misleading stat. Many people assume that it means "80% of my battery was consumed by ****", and consequently, "if ***** were not running, my battery would last 80% longer". This simply isn't true. It's not even close. I've tried to get clear answers from Google on what the stat actually means, but haven't gotten more than "the amount of power consumed by an app when it is running". ***** doesn't run much.
* Some phones appear to get confused and attribute nearly all system battery usage to *****. This problem is not unique ******, and in fact applications such as Locale have started providing disclaimers for certain devices to warn users of the issues.
* ***** still suspends itself whenever the screen is turned off. The ***** service puts all threads into a sleep state using Thread.sleep(99999999999). It's possible that the Service is still being attributed some kind of resource usage since it hasn't been terminated (even though the threads have been suspended). I'm looking into this. At this point from what I can tell, there are no running threads once the screen is turned off...
I'm continuing to look into this, as I'm getting absolutely hammered at this point from a ratings (and consequently sales perspective), but I'm not sure that there is much I'm going to be able to do about improving the battery usage stats on specific devices.
The bottom line is this: ***** either improves your phone's battery life or it doesn't, regardless of what the battery stats say. On my Nexus One, ***** averages around 2-3% on the stats list. Sometimes it goes higher, but will generally drift back down to around that level.
2. This occurs randomly, please try to reboot your phone and check if the usage is still high.
Click to expand...
Click to collapse
Thanks muntos. I like this app because the function on it equal to Screebl + Screen Filter .And I only need to use one app.
The "ScreenOn Lock" is same as Screebl. But i notice that when i use screebl it only have about 2~3% battery useage.
Hope you could find out the root cause about the heavily battery usage.
FYI , my phone is Galaxy S I9000.
BTW , How many days for trial version?
serect said:
Thanks muntos. I like this app because the function on it equal to Screebl + Screen Filter .And I only need to use one app.
The "ScreenOn Lock" is same as Screebl. But i notice that when i use screebl it only have about 2~3% battery useage.
Hope you could find out the root cause about the heavily battery usage.
FYI , my phone is Galaxy S I9000.
BTW , How many days for trial version?
Click to expand...
Click to collapse
My Phone it's also Galaxy S I9000. Please, could you do a phone reboot and then check if the same high values are shown in Battery use ?
Regarding trial version, as this moment you can check when the version expires by going to menu->about, but check in the Market when an update appears, this will extend the trial period.
muntos said:
My Phone it's also Galaxy S I9000. Please, could you do a phone reboot and then check if the same high values are shown in Battery use ?
Regarding trial version, as this moment you can check when the version expires by going to menu->about, but check in the Market when an update appears, this will extend the trial period.
Click to expand...
Click to collapse
yep~~ I had do a phone reboot. The picture which i posted before is a result after phone reboot.
Anyway , much appreciated your instant reply ,I will do a phone reboot again and observe if any change on battery usage.
Thanks Serect!
Anyone who uses this application please provide feedback regarding Battery Use Information in Settings->About Phone->Battery Use.
Thank you !
serect said:
yep~~ I had do a phone reboot. The picture which i posted before is a result after phone reboot.
Anyway , much appreciated your instant reply ,I will do a phone reboot again and observe if any change on battery usage.
Click to expand...
Click to collapse
It is a pity that i got a trial expire after my phone reboot .
It seems the battery usage has improve after reboot. But I only power on 37min~~lol...
serect said:
It is a pity that i got a trial expire after my phone reboot .
It seems the battery usage has improve after reboot. But I only power on 37min~~lol...
Click to expand...
Click to collapse
Well I believe that at least until you would recharge your phone you would not see anymore that high usage report...
Please check the Market for an update, trial period extended
muntos said:
Well I believe that at least until you would recharge your phone you would not see anymore that high usage report...
Please check the Market for an update, trial period extended
Click to expand...
Click to collapse
...I found when my trial expire , the "screen on lock" function automatically been disable , that's why I got a lower battery useage.
And I have a suggestion when the trial expire , I hope I have a chance to disable the Total Screen Control service , everytime I only been stick on "buy" or "close" option , but the service is still been enable there and i have no chance to disable it.
...It make me only have one option to uninstall it , too bad...

[User thread] MIUI v5 general discussion

The purpose of this thread is for discussion about best use of MIUI in general.
Which may or may not be related to MIUIv5 by rugglez.
It is recommended to try his rom first to see if you like it:
http://forum.xda-developers.com/showthread.php?t=2219511
For bugs about 3.5.3.
Issue: When you press and hold the home button, the multi task will flash up and then exist.
Solution: Setting-> button -> desktop key -> choose none.
I have already flash back to beta 2, but this should be the way to solve the issue.
For tips about 3.5.3.
- on the music icon, press and hold, then swipe up. You will see a pop-up music control
- there is a battery saving mode in setting >battery. I think this have something to do with tune down cpu freqz to from 1.2 to 1Gz.
Is there any battery drain or any other major downsites of this Rom?
Sent from my A2109A using Tapatalk HD
flopower1996 said:
Is there any battery drain or any other major downsites of this Rom?
Sent from my A2109A using Tapatalk HD
Click to expand...
Click to collapse
1. Uses material stolen from pengus77 without permission
2. Battery drain is higher than any other rom for the o2x
3. Our phone's low amount of available ram in android 4.0+ can't handle resource hungry miui any more. May be smooth at first but apps take a lot of time to open, compared to other roms, and multitasking can't be handled well(mostly due to low ram, again)
Those are the problems in descending order of importance, (and coupled with my lack of time) why you aren't seeing newer versions being released by me
MIUI ROM 3.5.10 is released. Changelog
[Messaging]
Fix - In some cases when network becomes unavailable, it still sends as network message instead of a normal text
[Lock screen , status bar, notification bar]
Optimization - Improved the touch slide fluency of lockscreen
[Desktop]
Optimization - "Global search" thumbnail style in editing mode
[Camera]
Fix - When entering camera from contacts, front camera mirror image function does not work
Fix - When enabling camera from other programs, the preview and image of moving objects is inconsistent
[Gallery]
Optimization - Gallery blacklist
Fix - Unsorted picture can still be moved to the photo album
Fix - In some cases, thumbnails cannot be displayed
[Music]
Fix - Online music fails to load from cache or flash back in some cases
Fix - Clicking on desktop widget cannot enter music player
[Sound Recorder]
New - “Recording silent mode” switch
[Calendar]
Fix - In some cases the calendar view switch may cause selected date to change
[Notes]
Optimization - Notes reminds will display notification in status bar area
Fix - In some cases the notes renaming notes folder will lead to flash back
New - Slide down on Notes icon to create a new note
[Alarm clock]
New - When setting an alarm, remaining time before alarm is displayed
Optimization - System default alarm ring interface displays weather
Optimization - Adjust the alarm interface for Samsung I9100
[Xiaomi account]
Fix - In some cases Cloud service activation is unsuccessful
source
3.5.17 is now available from MIUI site.

[APP][5.0+]OBD2 Plugin for Android Auto - Use Torque with AndroidAuto

Update 30.11.2022
End of life and open source.
Due to lots of changes both in Android and in my life, I do not have the possibility to maintain / update the code any further, therefore I've decided to open source.
Code is accessible: https://github.com/borconi/obd2aa
I will like to thank all of those who supported this project.
App Requirement
Torque Pro
OBD2 Reader
Android Auto compatible headunit or at least a copy of the Headunit Reloaded App (see signature).
This app will have limited functionality if you are using Android Auto on a your phone, the only functions you will be able to use is to see are notification about the speed cameras and street card!
Gauges and torque data will NOT work!
Previous XDA purchases can be reclaimed here: https://www.b3itlabs.com/download.php
How to purchase:
Visit: https://www.b3itlabs.com/prod.php?id=2
Instructions on how to get it running:
Option 1 - Will work on any phone & car/headunit combination, however the following features won't: - AutoPlay Music, 6 Tap limit remover, DPI change
After installing the app from XDA Labs, sign up for beta testing here: https://play.google.com/apps/testing/uk.co.boconi.emil.obd2aa and update the app
Once app is updated, make sure you disable auto-update in PlayStore then please uninstall it and reinstall it from XDA Labs.
With your screen unlocked, plug in the phone to the car, when prompted which app to use make sure you select "Android Auto"
Option 2 - Might NOT work on some device combination (for sure it won't work on Xiaomi phones), but if this method works all functions of the app are available
Install
Make sure you do not have any other 3rd party app Android Auto app installed.
Open the app and hopefully it will be quite self explanatory on how to set it up (choose colours, set gauge number, etc)
Open Android Auto (on the phone), go to About, tap the "About Android Auto" header 10 times, once you are a developer from the 3 dotted right corner menu select "Start Headunit Server" (ROOT users can skip this step!)
Close Android Auto
MAKE SURE YOUR SCREEN IS UNLOCKED and connect to the car, when prompted which app to use select "OBD2AA" and always (this needs to be done one time only) - If you are a HUR user select Android Auto and always! (If you do not see the prompt to chose, please go to settings -> apps -> all apps -> Google Play Services -> Clear Defaults and then try again)
Select the last tab on the right, by pressing it again you should see an app selector and choose OBD2AA
Give it a bit of time to start pulling the data from Torque.
Change log
Version 3.2 and 3.3 released 04/11/2018
Fix "drunk" map effect on Sync 3 units
Fixed rooted devices not being able to start headunit server.
Added option to change DPI for your screen!
Added option to auto play music on start
Added option to select default start screen.
Version 3.1 releases 26/08/2018
Compatibility fix for Pie devices.
Tap limit remover now working on all device
Tap limit remover allows Maps to be searchable even when driving.
Can be used for those who have problem with the parking brake wire.
Freeze issues fixes.
Important notes
Version 3.0 releases 05/07/2018
Compatibility fix for AA 3.0 and above.
Added option for overriding 6 tap limits
Added option for Bluetooth Audio output.
Important notes
Thanks to @slash_m_a_x for the support offered on this.
- Some users have reported choppy audio when using the app, this will mainly be due to the speed of the phone, the buffer on the car/headunit and other factors which are out of my control, if that is the case and you cannot use the app please feel free to contact me for a refund.
- Bluetooth Audio output might not work on all devices, it does depend how the car/headunit handles the Bluetooth. There will be devices which completely disable A2DP/Bluetooth capabilities of the car when Android Auto is running. In this case all the sound will be heard from the phone speaker rather then the car speakers.
- Tap limit will be disabled only for cars/headunits which are equipped with a GPS.
- In rare cases it can happen that after unplugging the phone from the headunit you will see a message which says that you are still connected to Android Auto, simply Force Stop the Google Play Services.
- You always need to make sure that Headunit Server is running on the phone (unless you have root), if the icon bothers you simply hide it.
Change log
Version 2.0 releases 17/01/2018
Added new layout option
Added styled gauged
Option for custom background on each gauge.
Option for custom needle on each gauge
Removed integration for CamSam/Blitzer.de (fully integrated now)
Possibility to change needle color
Possibility to adjust arch (indent, position, length) when using custom bg
Separated speed camera settings
Option to only download speed cam db over Wifi
Fixes for min/max value
Speed camera warnings over car speaker (Thanks @martoreto for the how-to)
Street info card
Added French translation (Credit to @fbike for doing the translation)
Added Danish (Credit to @Gunde for doing the translation)
Added Finnish (Credit to @Pyrres for doing the translation)
Added Spanish (Credit to @madabase for doing the translation)
Added Italian (Credit to @ilgaspa for doing the translation)
Version 1.6a - releases 03/10/2017
Fixed negative input for min/max values
Code cleanup
Added Greek language (credit to @sosimple for translating)
Version 1.6 - releases 29/09/2017
Fixes for custom PIDS
Fixes on Graphics rendering.
Fixed overlapping text
Fixed PSI/BAR conversion
Enhanced the gauge style.
Different approach for torque data pulling.
Moved to service should start work automatically when connected to the car
Added Supports PID alarms from Torque.
Added Toggle/Collapse layout for Pid settings.
Added Preview button with random data
Added Option to toggle units display
Added notification cleanup on exit
Added translation for DE,HU,RO (Credit to @FormelLMS for DE)
Added import/export setting option
Added option for colored text
Added TPMS option/screen
Added option to override car's headlights based on day/night
Added warning screen if nothing is configured to prevent black screen with no information.
Added more settings and move them to separate Settings options.
Added customizable background
Added search for PIDs
Added Support for Heads-Up notification
Added Speed camera warnings (powered by CamSam Plus)
Supported settings/Features:
3 x Colors for each gauge
Text color
Toggle needle, arch,units,scale,decimal and text for each gauge.
Variable number or gauges ( 1 - 15 )
Set warning limit for each gauge (percentage). This will be calculated relative to the given PID max value which is retrieved from Torque at runtime.
Possibility to set gauge in reverse mode. (example fuel tank)
Units will be converted automatically based on your Preferences in Torque
TPMS Screen (if you have PID's for TPMS data)
Possibility to use custom background/needle for each gauge
Low Fuel warning
Warm Engine warning
Speed Camera Heads Up Warning
Option to Overwrite Headlights state based on calculated sunset/sunrise
How to use it?
Open app and select each PID you want to display on your screen, adjust the number or gauges you want to see adjust the preference for each PID. If you want to use custom background/needle and interested on how to, please read HERE
Locking Pid values
On some PID's Torque reports wrong min/max values, by default if while using the application a reported value is higher/lower than the initially reported range, the app will adjust the range to the new values. However in some cases this is not desired and you will like to specify manually what is the min and max value for the give PID. In this case, simple edit the minimum/maximum for the pid and they will become locked, meaning the app won't make any adjustments.
By editing, it means you have to change the min or max value, the lock is triggered by the first keypress on this input fields.
The lock will be automatically removed when you select a different PID for the same gauge.
Preferences menu
Alternative pulling - Only enable this option if you have difficulties getting gauges updated, it uses an old deprecated method of obtaining data so should not really be used.
Enable debugging - Only enable it if you have problems with the app and I requested you to collect a bug report, otherwise it will spam the logs for no reason.
Automatically start Torque on Android Auto - Nothing to explain here
Launch FartKontrol on start - launches a Danish Speed Camera app (useless outside Denmark)
Custom Background (any background you will like to use instead of the black color)
Demo - When enabled random data is generated for the PID's just to see how things will look (in case you do not have an OBD2 adapter), so don't enable it.
Pid Alarms section. You can set up a low level fuel warning (displayed as a heads up notification) and a notification when the engine is warmed up. There a several PID options for both of this, pretty self explanatory.
TPMS Settings
- You set up the 4 PID's for TPMS, this will be used to display the tyre pressure values on the TPMS screen inside Android Auto
Speed Camera
Show current street card - Displays information about current street (name and speed limit if know). This information is updated once in 5 seconds and at a minimum distance of 200 meters so it's not 100% accurate it's more for general information.
Enable speed camera warnings - This will enable the app to display speed camera warning when driving, like any app which does this it relies on a database, which means it does NOT guarantee that it will warn you of all the cameras, and it might also produce false warnings. All options are pretty self explanatory.
Export & Import
- Allows you to export your current app configuration file which can later be imported (grate way of saving time of re-doing everything) after a clean install or so. The format use for Export & Import is JSON so if you want you can manually edit/adjust the values. Please see following post for more details about the sturcture/value/meanings
Permissions
Read notification permission - Only required so the app can read the notifications from CamSam and display them on AA scren
Locations - Only required if you want the app to overwrite the day/night theme based on sunset/sunrise
Storage - Only needed if you want to use your personal image as a background and/or planning to import/export settings
Can I create my own layout for the gauges?
- Yes, see instructions below:
Here is an example of the XML structure required, once you created the XML please send it over by email to [email protected] and I will include it in the next build.
Code:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="wrapper_layout">
<!-- Left column -->
<View
android:layout_width="226dp"
android:layout_height="226dp"
android:layout_gravity="center_vertical|start"
android:tag="gauge_2"
/>
<!-- Middle column -->
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:tag="gauge_1" />
<!-- right column -->
<View
android:layout_width="226dp"
android:layout_height="226dp"
android:layout_gravity="center_vertical|end"
android:tag="gauge_3" />
</FrameLayout>
Important
Each view must contain a tag, which is formated like in the example, where the number corresponds to the Gauge number from the setting screen.
The layout which wraps everything together must have a tag called: wrapper_layout
You are free to use any Layout you want, except ScrollView.
How to produce bug report?
Step 1 you need to enabled debugging in OBD2AA app, then follow this instruction set:
2. Enabling Developer Mode
Open Settings > About phone.
Scroll down to the Build number.
Tap the Build number 7 times in quick succession until "You're now a developer" appears.
Return to the Settings menu and select Developer options.
At the top of the screen, make sure 'Developer options' is set to On (green).
Scroll down to Debugging and enable both USB debugging and Bug Report Shortcut on (green).
Tab on Logger buffer sizes: Default setting is 256K. Select 16M to help capture more information for debugging. Of note, it can affect the apps performance especially with lower spec phone, so change it back after you have finished submitting bug reports.
3. Capturing a Bug Report
It's very important to do this right after you experience the issue again, so your device can log at least one occurrence of the issue.
Hold the Power button down until the menu appears.
Select Take bug report. and wait for the device to capture the bug report.
Tap the 'Bug report captured' notification when it appears.
Share the bug report. (I recommend to email it to yourself.)
Download the bug report to your computer.
Send the bug report by email to [email protected]
I have decided to open up my software, meaning I have made the source code available on GitHub, but it's only available for personal use, and you are not allowed (under any form) to redistribute your own version of the app. You can download and compile it yourself if you wish to do so, and you can implement your own changes for your own personal use, but you cannot create clones of the software which you redistribute under your own name. Source can be found here: https://github.com/borconi/obd2aa.
Due to the fact that there are some irresponsible developers out there, who created video apps for moving cars, which was one of the main reasons Google blocked 3rd party apps, I won't be updating the code on github any more, to try to prevent those developers to use my technique to overcome the limits. If you are developing a 3rd party app and you will like to know more about how I have done this, you are always welcome to contact me. If your project is something useful, I will be more then happy to share things with you.
This does not mean it is now a free app and apk can be freely shared!
Amazing work Emil, this along with your (and ofcourse @mikereidis) Headunit Reloaded app is perfect for Android Auto on the cheap ,
Gotta subscribe to this thread! The possibility of custom PIDs would be of huge interest to me.
Seems like its stuck without any option to change on Kmph rather than mph for speed etc, its set to mph in torque
fma965 said:
Seems like its stuck without any option to change on Kmph rather than mph for speed etc, its set to mph in torque
Click to expand...
Click to collapse
Yeap a few things to iron out....
Just to tired to work on it tonight.... it was a long one yesterday to get the alpha done for today but planning to work on it this weekend....
Emil Borconi said:
Yeap a few things to iron out....
Just to tired to work on it tonight.... it was a long one yesterday to get the alpha done for today but planning to work on it this weekend....
Click to expand...
Click to collapse
No worries, i wrote that quickly... other than that seems good, still figuring out what my car supports though. thinking about selling my tablet setup and buying the same car thing as me
fma965 said:
No worries, i wrote that quickly... other than that seems good, still figuring out what my car supports though. thinking about selling my tablet setup and buying the same car thing as me
Click to expand...
Click to collapse
Well I love my setup but I HATE my handsfree, have to come up with some solution for that because it's cr...
Emil Borconi said:
Well I love my setup but I HATE my handsfree, have to come up with some solution for that because it's cr...
Click to expand...
Click to collapse
does it not support external microphones?
fma965 said:
does it not support external microphones?
Click to expand...
Click to collapse
No. I have to try with a USB soundcard (which I use with my Odroid) but haven't got the chance yet, or I might just hook my himbox to the AUX in and use it that way. The built in mic is almost unusable especially over 30 MPH.
And first version of the app is live!
Bought, installed and looking good.
I've got the Prius PIDs plugin installed in Torque so I can see the data on my Prius C.
Only about half those PIDs are available to be selected, it looks like it's hitting the maximum number of allowed items in the "Select PID" list.
Great, could you please tell me, where I can find it?
FormelLMS said:
Great, could you please tell me, where I can find it?
Click to expand...
Click to collapse
The XDALabs app was a pain, I had to:
Install the XDA app from the Play Store
Log in
Install the XDALabs app it prompted me to install
Log in again
Then open Emil's link from the first post in the XDALabs app.
Ok, thank you. Any chance to have this in play store?
Hi.
Sorry for the pain caused by XDA labs, unfortunately Google play rejected the app submission so I cannot make it available trough that channel.
As for custom PIDs yes intending to support them in the future. Currently torque doesn't provide a method to expose them to 3rd parties so I need to speak with Torque developer if that is possible, alternatively I will need to fallback to manual PID configuration.
I will see if I can build a quick webpage to host/sell the app could potentially make it easier to get the app, but it will make it more difficult to keep it updated.
Emil Borconi said:
Sorry for the pain caused by XDA labs, unfortunately Google play rejected the app submission so I cannot make it available trough that channel.
Click to expand...
Click to collapse
Understood, I had a feeling Google wasn't going to allow it.
One of the issues with XDA is that you can get there via the web but it's not obvious at all how to buy it from there.
Then you have to jump through hoops to get the right app.
Emil Borconi said:
As for custom PIDs yes intending to support them in the future. Currently torque doesn't provide a method to expose them to 3rd parties so I need to speak with Torque developer if that is possible, alternatively I will need to fallback to manual PID configuration.
Click to expand...
Click to collapse
It's already showing around half of the Prius custom PIDs, it's like the list just runs out of space for more items.
edit:
Screenshot link
leonkernan said:
Understood, I had a feeling Google wasn't going to allow it.
One of the issues with XDA is that you can get there via the web but it's not obvious at all how to buy it from there.
Then you have to jump through hoops to get the right app.
It's already showing around half of the Prius custom PIDs, it's like the list just runs out of space for more items.
Click to expand...
Click to collapse
I'll send you a logging version at some point this weekend just to see if how much data Torque actually send over. For example it doesn't show any of my custom PIDs for KIA.
Thanks for this, it is awesome..
A magnificent add to the current great app.
Here is photo of my test
too low ISO 320.
My Observation:
1: I added in Gauge 2 : Volts(CM), then put "13.5" in W.Level 1, and 12 in W.Level 2, when I switch to ODB2AA it wont open and switch back to the current tab.
then I changed W.Level 1 to "13" and it works, so looks like it wont accept a decimal value!, don't know if its a bug or error from my side.
2: Each time I switch to the OBD2AA tab it takes 13s for the data to be pulled.
3: Just once "no data pulling", I had to unplug/plug usb to work.
suggestion:
* It would be good if there is a timeout option for the data pulling to stop, so no 13s delay when switch back and forth in that time, I don't know if it is applicable in AA.
Great job Emil.
MAJED.y said:
A magnificent add to the current great app.
Here is photo of my test
My Observation:
1: I added in Gauge 2 : Volts(CM), then put "13.5" in W.Level 1, and 12 in W.Level 2, when I switch to ODB2AA it wont open and switch back to the current tab.
then I changed W.Level 1 to "13" and it works, so looks like it wont accept a decimal value!, don't know if its a bug or error from my side.
2: Each time I switch to the OBD2AA tab it takes 13s for the data to be pulled.
3: Just once "no data pulling", I had to unplug/plug usb to work.
suggestion:
* It would be good if there is a timeout option for the data pulling to stop, so no 13s delay when switch back and forth in that time.
Great job Emil.
Click to expand...
Click to collapse
Check your email The version you are mentioning is the Beta, the release version has all those sorted
Sorry I'm moving too fast

Just tweak it

XIAOMIEU/miGlobe/ROS cleanup actions
BOOT SCRIPT
What it does:
* choose 7 categories of app removal
* disable 36 apps as per post 6 (preferred method, ppl can reenable)
* uninstall super sticky apps (i'd still prefer disabling by renaming, but didn't work)
* remove usage access for google (this is the only part not working - because of custom ROM, they say)
* recover hostname modified by xiaomi (privacy) (hardcoded, but could read it from settings in future)
* remove weird XiaomiEU app icons
* disable wifi diagnostics
* disable dumping of network
Download: file attached
Installation:
- run in su terminal or add to any startup script
ADAWAY LIST
What it does:
* adds as many Xiaomi servers to adblocker as possible
Download: file attached
Installation:
- open Adaway menu on the left and choose 'Your lists'
- click menu button on the top right and choose 'Import all lists'
- choose your file, and apply
What actions are needed after MIUI ROM is installed and what is already improved:
[automated] to disable:
Code:
Browser, Cloud Print, CloudServiceSysbase, com.mui.translation.xmcloud, com.xiaomi.micloudsdk.SdkApplication, Digital Wellbeing, Email, Google, Feedback, File Manager, Google Backup Transport, Google Calendar Sync, Google Contacts Sync, Google One Init Setup, Google Partner Set Up, Joyose, Mi Account, Mi Cloud, Mi Cloud backup, Mi Credit, Mi Video, Mi Wallpaper Carousel, MiCloudSync, Music, NextPay, Xiaomi service framework
[automated] to delete (can't disable):
Code:
FindDevice, Miuidaemon, MiuiHome, Xiaomi service framework
Disabling MiuiHome helps a lot as this launcher causes gfx problems (empty black screen) even when it's not selected as home provider.
Another tasks post flash weekly update:
- [automated] root magisk 19 (with one click in L.R.Team TWRP)
- [enhanced] reenable hosts in Adaway including attached custom Xiaomi blacklist
- [automated] remove /system/media/theme/miui_mod_icons
- [not working yet] redisable app permissions, 'Usage Access' and 'Modify system settings' (the later ensures first two are not enabled later - the aggressive Xiaomi/Google apps ignore user choices and help each other to restore permissions user doesn't like)
- redisable Device Admin, Trust admin (find my device, smart lock)
- [automated] LOG_PATH_FLAG=0 in cnss_diag.conf and /data/vendor/wlan_logs/ transformed to file - this is usually kept after ROM upgrade, this is where WiFi spying and tcpdumpin' takes place
- [automated] xiaomi pushes "Mi9" hostname, that's not privacy sensitive, need to setprop net.hostname [YOURNAME] on each boot (e.g. 3C script)
original bash
Oh i hate MIUI so much, but have to live with it until alt ROMs will come, fully supporting fingerprint, bluetooth, camera.
This MIUI (EU) is so aggressive overwriting all apps and dialogs in the system, and it's overall ugly and unnecessarily complex (except pro-looking charging animation, 24h wallpaper, and AOD). It blocks starting apps by default, it blocks app notifications by default. Battery ops are a joke, and all memory cleaner triggers kill virtually everything running. Zero respect for high prio notif apps running. It's so modified that tons of xposed modules won't have impact. It even annoys with data connection dialogs, download operations.. they stick their nose everywhere. I don't trust this company at all, so i've taken stronger measures and zero byte to Xiaomi policy.
In first round of making this phone less retail and more pro is
- revoke all authorizations (get the hell out Xiaomi)
- stop feeding device ids (oh they even have choice for it, but i need more complex and trustful blocking via Xposed) to xiaomi apps
- delete xiaomi account, now that won't stop findDevice and other cloud nonsense from running (contradiction to Xiaomi statement findDevice not supported on unlocked bootloaders)
- disable xiaomi packages via titanium/3c:
Code:
BugReport.apk
CloudBackup.apk
CloudService.apk
CloudServiceSysbase.apk
GoogleBackupTransport.apk
Joyose.apk
MiGalleryLockscreen.apk
MiVideo.apk (useless app without DLNA)
Music.apk (useless app without DLNA)
NextPay.apk
ThemeManager.apk
but hey, it's not always possible, some apps can't be disabled, this aggression can be stopped by not deleting but renaming the files in /system/[priv-]app e.g.:
Code:
FindDevice.apk.disabled
MiuiDaemon.apk.disabled (can be disabled but will still show up, what)
MiuiHome.apk.disabled
- firewall block any remaining xiaomi apps to stop Baba/Baidu etc connections
Rinse and repeat til you see no data transferred in the network monitor.
Some UI fixes already done:
- AOD doesn't show any notifs -> use "MIUI AOD Notification icon" xposed module, however, it will show too much (not configurable)
- Notch is ugly like hell, can't smart-crop it like OnePlus(R) -> use Notch Remover app (i'd like some system solution rather, due to performance reasons)
- AI button can be fully configured, forget MIUI choices and install xposed Edge
- Device health, the new feature, is hidden, just trigger it via activities, then create the app icon via its UI for convenience
- several vanilla dialogs are accessible via Settings search or activities like appops, notifications
- navigation [bar] enhanced by xposed Edge
I applaud:
- existing offline cron-able backup (although it won't save 90% of system settings which is so needed on this ROM)
- complex data usage configuration
- not hiding call recording, no need for xposed tweaks
- good battery info (wide icon, great animations and LED confirmation), oh yeah, Qi people do need this for practical reasons
- all recent micro tweaks like click on clock on quick settings opens clock
-notif. light, samsung style - great , double tap wake, raise2wake (producing too many smp2p-sleepstate wakelocks) - also great
I (or hopefully a ROM author) would like to fix this:
- remove their Security (which i think includes all memory and battery handling), PermissionManager nonsense
- remove status bar alarm icon, just go already! (fix via xposed and 3c didn't work! it's on the left)
- reduce status bar height to align with notch (xposed plugin didn't work)
- show batt% when notifs are expanded (batt% is literally nowhere to be shown, not in Battery details either, unless you turn on % status bar icon which is annoying, want to see % only when expand quick settings just like on other phones - that is user friendly)
- this UI overwrite app icons, omg..why.. of course i don't use their lausy home app (which doesn't even bring Pie swipe-to-apps action), but twisted icons will show up in all system dialogs
- Pie navigation [bar] is only good in vanilla pie, Samsung OnePlus and Xiaomi managed to destroy it by customizations, would love AOSP style in full screen mode (navbar-less), Xiaomi additionally created "original" swipe-from-right Back action, which interferes with GBoard swipes
- how to enable either Oreo or original Pie recents? used to tweak it via xposed Edge on note9,6t
- the MAC is not randomized, are you kidding me + device name you set won't matter when you make connections, they push Mi9-Mobile name, i don't like both for privacy reasons
- weather widget (where is it), linking weather cities to clock cities
- AOD only on notification with a preview (OnePlus style)
- voice navigation in Camera, this will require a different app
- remove all stupid confirmations with timeouts with several seconds
- "this UI overwrite app icons" -> fixed by using Global dev version
i tried the Global Dev ROM http://en.miui.com/download-361.html and i was shocked that it's the same firmware except those ****ty icons! not much missing, very very little things only.. few more processes (like facebook snitchware), the firewall blocked them proactively.. no byte sent. will be cleansed quickly. i saw Night mode and 48mpix mode in camera briefly but it depends on kernel somehow. weird. so weird brand.
doggydog2 said:
-notif. light, samsung style - great , double tap wake, raise2wake (producing too many smp2p-sleepstate wakelocks) - also great
Click to expand...
Click to collapse
Getting massive smp2p-sleepstate wakelocks - even with double tap and raise to wake disabled. Any idea what else could be causing this?
DavidRJ said:
Getting massive smp2p-sleepstate wakelocks - even with double tap and raise to wake disabled. Any idea what else could be causing this?
Click to expand...
Click to collapse
AOD, double tap to wake, pocket lock, handwave gesture, out-of-pocket gesture..some of those.. i just tested disabling this wakelock and it didn't help battery life. but i have a parasitic magisk/xposed drain now so maybe i don't spot the difference right now.
Achieved good battery life in the end. No bad wakelocks at all. I have a temporary AOD set, d.tap to wake, so this is not causing it. Now i will turn on Pocket lock back. I guess just like it was written in the other thread, the wakelocks are caused by the doze gestures ("Phh" menu in Settings).
Vaste majority of glitches above are fixed in the AOSP ROM. Definitely far better than any Xiaomi ROM tested. Next time i wouldn't waste any time with Xiaomi software IF the classic root unfriendly functionality works (fp, bt-car, cam..). That will be precondition for a buy in future, and 2 week unlock period will be considered hard too. If OnePlus will put QC/QI to model 8, that'll be the next phone.
Root-friendly brands:
1/ OnePlus (all easy, ROM is ok to keep, all functions kept) - WINNER
2/ LG (pretty easy, lil bit functionality can be lost, but they keep back fingerprint & community don't care about their new models -> dead brand)
3/ Xiaomi sort of (difficult unlock, terrible software, very difficult flashing, all functions kept)
4/ Samsung sort of (problems with some functionality, more and more obstacles for developers, Knox, bad battery....tired of it)
Gutripping list - what to do after installation/upgrade of MIUI
moved to first post
Why don't you just buy another phone? It's easier...
What's worse for one.... Isn't for another.
I have got pretty good SOT 6 hours on wifi around 5 on mobile network.
I like Miui...and all the Chinese oehhhh they are spying tin foil head stuff come on...
XiaomiEU app icons can be removed here: non-destructively rename /system/media/theme/miui_mod_icons (thanksgod)
Magisk compatible: 19.0+ (not booting with any earlier version)
QuickStep compatible: no
Still can't find link to Running services, they really care to hide it. This activity Settings\com.android.settings.RunningServices gets overwritten by app info which counts size on disk but at least give backdoor to original app properties.
*justintime* said:
Why don't you just buy another phone? It's easier...
What's worse for one.... Isn't for another.
I have got pretty good SOT 6 hours on wifi around 5 on mobile network.
I like Miui...and all the Chinese oehhhh they are spying tin foil head stuff come on...
Click to expand...
Click to collapse
my SOT is easily above 10hours sadly i can't find a modern phone, with rootability, wireless charging, fingerprint not in the back. forget SD card, notches and tons of other requirements.. so this is a list:
https://www.gsmarena.com/results.php3?nRamMin=6000&chkWCharging=selected&idFingerprint=5
discount unrootable huawei, nokia and i'm literally stuck with just S10 and Mi9. it's so bad situation. S10 struggles with root yet as Samsung created yet another tricks. Soon rooting will be a hate speech and we'll be arrested
Thank you for looking into all this and writing it up here.
I was tempted to give MIUI a go temporarily since everything else is early stages right now, but I think I'll wait for the GSIs instead. And hey, "just buy another phone or willingly give up your privacy to megacorps and the government" is pretty great if you'd like to live in a dystopia at some point
xephyris said:
Thank you for looking into all this and writing it up here.
I was tempted to give MIUI a go temporarily since everything else is early stages right now, but I think I'll wait for the GSIs instead. And hey, "just buy another phone or willingly give up your privacy to megacorps and the government" is pretty great if you'd like to live in a dystopia at some point
Click to expand...
Click to collapse
@doggydog2 grow up.... Playing a game who has the largest....?? I was just saying with it the phone and software isn't that bad.
Buy a Pixel or OP
@xephyris
Ghehehe man man man..... Like you have privacy in 2019...wake up...
So giving all your **** to Google is no problem for you...?
Are you using miui.eu from (xiaomi.eu) or global rom EU version?
The op sounds like he came here to promote Oneplus for some reason.
(duplicit)
@xephyris thanks, GSI is strong already except the fingerprint not excellent. i'm watching git changes, literally reading the code, and can't wait for more fixes.. for an AOSP - not bad status already with fp,bluetooth,camera,aptx working. Let's talk about other device AOSPs with features missing.. GSI is generic but when devs actually own the device, the progress is far batter (FlokoRom being the best, now new TWRPs progressing).
 @*justintime* don't understand what you blab about, i was just saying what is the situation. as you're long member, you should have remembered the golden times where all this stuff was easy and you could choose any mobile. and no "nonsense to fix in next generation" existed like notches or back fingerprints. also i'm giving little to Google, have zero ads, cleaned fingerprints of my internet activity, device data is cloaked etc to the extent i actually don't need to clean up Xiaomi processes. i do have privacy in 2019.. that's something i'm not even describing here as it's generic, here i fight the specific xiaomi bloat. when i sniff my network connections or trace personal data usage, i am satisfied. it's very clean.
 @rasmali ..and not promoting, as i spend too much time to fix this Xiaomi, it's pretty hard from unlock process, TWRP problems, Gapps problems, battery issues, camera issues to the MIUI. Also tested all ROMs, kernels, recoveries so i'm sharing/getting the knowledge to make sure we all later profit. maybe i'll script the cleanup process from post #6. true the OnePlus is cool, i did just single flashing/restoring process there for me and one for another person, and it's perfectly working from A to Z.. it's shocking easy compared to Mi9. just lacking QC+Qi:/
Keep posting updates, as you im trying to find a solution for the Running services.
any way to disable xiaomi service framework without causing problems?
bilal91 said:
any way to disable xiaomi service framework without causing problems?
Click to expand...
Click to collapse
Which problem you have disabling it through adb?
denzel09 said:
Which problem you have disabling it through adb?
Click to expand...
Click to collapse
i've heard it could cause a bootloop...have you done it through adb and can you direct me towards how you did it?
doggydog2 said:
Delete (can't disable):
Code:
FindDevice, Miuidaemon, MiuiHome, Xiaomi service framework
Click to expand...
Click to collapse
Introducing Xposed plugin "MIUI Anesthetist".
It will help disable the above ultra-sticky services which cannot be disabled (and we're not talking about normal system dialogs, we're disabing with root tools already).
However the author doesn't realise the spy company Xiaomi made 2 of them even more ultra-sticky: Miuidaemon, Xiaomi service framework.
The Xiaomi invented the way to load those even when disabled. As you can see in "Running services"* the processes are active.
*I'm kidding - you won't see it there as Xiaomi disabled this transparency tool, you need another root tool to check running processes.
So you still need to rename them in /system/[priv-]app folder.
Plus the FindDevice "disabled" with help of this plugin will make many error popups by another part of the system which tries to trigger it at all cost.
so it looked good first, as disabling would ultimately bring the convenience of setting and forgetting even during ROM updates.
That's not the case, so there's still maintenance needed as in the post 6.

Categories

Resources