Alternative Method for Changing Battery Style in Status Bar

Post your questions and help other users.

Moderator: Martin

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Alternative Method for Changing Battery Style in Status Bar

Post by Pepy » 22 Jun 2019 06:36

I had a simple flow for changing the battery style in the status bar from circle to text when battery saver has been turned on automatically so that it's easier to read and determine the exact level (along with the fact that I'm able to see the actual battery level rather than an exclamation mark when it is 5% or lower).

I used to achieve this using the Set System Setting method but after a recent ROM update, it seems that the variable for the setting is no longer present.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Desmanto » 23 Jun 2019 15:23

Try my secure setting logger flow to find the new value : viewtopic.php?f=3&t=7931

Mine also changed at one time. Now at RR Pie, it is [Secure] status_bar_battery_style : 1 >>> 3
Where 1 is circle, and 3 is text.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Pepy » 24 Jun 2019 01:19

Thanks for the suggestion, but I'm unsure how that would help if creating a new flow with trigger System Setting Changed that displays the changed setting (which you toggle manually in setting) doesn't give any results?

I used to use the status_bar_battery_style setting as well, but after a recent update, I cannot find the setting anymore. And as always, setting a value to a setting that doesn't exist does nothing.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Desmanto » 24 Jun 2019 17:52

If my secure setting logger flow won't show up the value when changing the battery setting, it might be saved on somewhere else. You are using crdroid, which is based on lineage OS ROM. LOS has additional set LineageOS system setting. You can try to find it there instead. Unfortunately, that action is partially broken for AM 1.37.0 with LOS 16 above.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Pepy » 25 Jun 2019 06:29

I skimmed through your thread and took a look at the pictures and it seems that it just presents a more user-friendly way of displaying and showing changed settings so I don't think it's any different than doing it manually with a simple System Setting Changed trigger and Notification on Screen action.

After granting the necessary permissions, the Set LineageOS System Setting action gives an error when I try to change the setting value which I'm guessing is what you mean by "broken".
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Desmanto » 26 Jun 2019 06:08

Yes, it is the same, just showing in tidier view and allow you to copy the found key directly.

While waiting it to be fixed, you can try to check at /data/user_de/0/org.lineageos.lineagesettings/databases/lineagesettings.db, using any SQLite editor. I would just use MiXplorer which has integrated SQLite Editor, find for any possible key correspond to this Battery Style.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Pepy » 26 Jun 2019 06:59

Desmanto wrote:
26 Jun 2019 06:08
Yes, it is the same, just showing in tidier view and allow you to copy the found key directly.
I see. Thanks for sharing it but I'll pass as I'm fine with using just a System Setting Changed trigger, Expression condition (to filter out the triggers) and Notification on Screen action :)
Desmanto wrote:
26 Jun 2019 06:08
While waiting it to be fixed, you can try to check at /data/user_de/0/org.lineageos.lineagesettings/databases/lineagesettings.db, using any SQLite editor. I would just use MiXplorer which has integrated SQLite Editor, find for any possible key correspond to this Battery Style.
I mentioned on another thread that I would be attempt to see if I can change the lock screen message using the SQL method as well; I'll be giving both of these a try soon.
I'm using Solid Explorer though which doesn't have an integrated .db viewer though, so I'm going to need an alternative. Been looking around the Play Store for one for the past couple of days but haven't found one that I liked yet. I would appreciate it if you or anybody else could recommend one.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Desmanto » 26 Jun 2019 17:05

I would still recommend MiXplorer. The free version is available in xda. The dev actually want to (re)upload the free version in playstore, but someone in the past mis-used his packagename and got banned forever. Even though he have tried to regain it, playstore policy doesn't allow the same packagename under different dev. So now he only have the paid version (silver) at playstore, for those who want to support him.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Pepy » 26 Jun 2019 22:41

I really liked the customizability of MiXplorer; it's amazing that you can toggle the visibility and change the position of icons and options in basically anywhere. The UI looks a bit ugly though, but it's functionality is way more than what Solid Explorer has to offer. I never knew that the app was completely free either and thought the Play Store was the only way to get it. By mis-used, did you mean that someone took his package name and used it as his own?

Also, I attempted to edit the locksettings.db with MiXplorer and the file disappeared. When I tried changing the lock screen message manually, the message would stay the same. After a while, I noticed that the .db file is back but it's practically empty. When I rebooted, I got stuck in a bootloop and while wiping the system and reflashing the ROM does make it boot, I cannot get past the "Phone is starting..." screen. Long story short, I bricked my phone :cry:
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Desmanto » 27 Jun 2019 16:04

Ouch, I didn't know you directly went that far. I just realized that current MiXplorer version doesn't backup the file anymore after editing, usually it save the original one in .bak extension. It seems the root access is not granted properly for MiXplorer.

If you have made TWRP backup before, you can extract out only the /data/system part to get the lockscreen.db and move it to the same location. But AFAIK, losing that file should not cause bootstuck. As one of the way to remove forgotten password is to delete locksettings.db from TWRP. Maybe it is there, but with empty and wrong permission, which make it stuck. Try to delete again the file from TWRP, and you should can boot the phone properly without any lockpattern/password. And please be careful, cause it is starting to get more dangerous. DWYOR.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply