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

Re: Alternative Method for Changing Battery Style in Status Bar

Post by Pepy » 30 Jun 2019 22:10

Desmanto wrote:
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.
Yeah, it's a pain to have to login and set up every app again :cry: I'm glad this all happened though as I definitely do not regret switching to MiXplorer. :D There are some things I dislike about it's code editor though, such as it having limited customizability (eg. can't choose between tabs or spaces and if for the latter, how many is used per indent) and not being able to go back one indent (so things like placing a match curly brace is super annoying).
I can assure you however, that I did grant MiXplorer root access; otherwise it wouldn't even be able to access my root storage at all... I just find it really weird how the file disappeared for a while and came back nearly empty :?
Desmanto wrote:
27 Jun 2019 16:04
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.
That is exactly why I doubt that even if I did have a back up and I replaced the file, it wouldn't have made a difference; I mentioned in my previous post that I was able to boot up the phone, and like you'd have expect from deleting the file, the lock screen settings (eg. keguard, message) have disappeared. Only problem is that I couldn't get past the "Phone is starting..." message no matter how many times I've rebooted. I think I've also tried uninstalling Magisk (which is known to cause that issue) but to no avail :cry:
Desmanto wrote:
27 Jun 2019 16:04
And please be careful, cause it is starting to get more dangerous. DWYOR.
I know :?
I have my reasons though. I tend to install a lot of apps I don't even use on my phone so part of the reason I don't make TWRP backups anymore is because I just find it tiring to have to reboot into recovery for like 5 minutes a day or my phone doesn't have enough space for one (now I don't really bother backing up app data though since I avoid games which don't support cloud or data export so that shouldn't be a problem anymore) :lol:
I was going to have to do this eventually anyway because I also had plans to make a flow which replaces the lock screen message with an inspirational quote from time to time and it would simply be helpful in cases where a setting or toggle has no associated System Setting :D Speaking of which... about the idea you gave me, I should really hurry up and finish that flow for making automatic backups in TWRP (given that there is enough space and battery left) ;)
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 » 06 Jul 2019 17:08

Pepy wrote:
30 Jun 2019 22:10
Yeah, it's a pain to have to login and set up every app again :cry: I'm glad this all happened though as I definitely do not regret switching to MiXplorer. :D There are some things I dislike about it's code editor though, such as it having limited customizability (eg. can't choose between tabs or spaces and if for the latter, how many is used per indent) and not being able to go back one indent (so things like placing a match curly brace is super annoying).
I can assure you however, that I did grant MiXplorer root access; otherwise it wouldn't even be able to access my root storage at all... I just find it really weird how the file disappeared for a while and came back nearly empty :?
My friend also experience bad thing with MiXplorer. He just lost one of his important text file because MiXplorer text editor suddenly can't save the file. He have the notes for years and never backup the file. When he try to save one day, MiX just didn't want to save it. Reopen the file, it is blank already, gone. So it can be the bug from MiXplorer itself.
Pepy wrote:
30 Jun 2019 22:10
That is exactly why I doubt that even if I did have a back up and I replaced the file, it wouldn't have made a difference; I mentioned in my previous post that I was able to boot up the phone, and like you'd have expect from deleting the file, the lock screen settings (eg. keguard, message) have disappeared. Only problem is that I couldn't get past the "Phone is starting..." message no matter how many times I've rebooted. I think I've also tried uninstalling Magisk (which is known to cause that issue) but to no avail :cry:
Maybe you should try safe mode too at that time. But since the problem lies on the system file, that maybe won't help either.
Pepy wrote:
30 Jun 2019 22:10
I know :?
I have my reasons though. I tend to install a lot of apps I don't even use on my phone so part of the reason I don't make TWRP backups anymore is because I just find it tiring to have to reboot into recovery for like 5 minutes a day or my phone doesn't have enough space for one (now I don't really bother backing up app data though since I avoid games which don't support cloud or data export so that shouldn't be a problem anymore) :lol:
I was going to have to do this eventually anyway because I also had plans to make a flow which replaces the lock screen message with an inspirational quote from time to time and it would simply be helpful in cases where a setting or toggle has no associated System Setting :D Speaking of which... about the idea you gave me, I should really hurry up and finish that flow for making automatic backups in TWRP (given that there is enough space and battery left) ;)
I almost never need to restore any TWRP backup. But it just make feel safe to do the backup weekly. Space can be problem, but backup is more important.

If you need random quote, maybe you should just put it at the smartwatch. I have discover a lot of wonder using Automagic with WearOS. For the past few days I am creating the flow to show random english word at my ticwatch. I still learn english till dates. When reading ebooks with unusual vocabulary, I copy the text, automatically translate in google translate. Use Control UI to fetch the translation and save it glovar list. Later use these words to show as widget at my tichwatch periodically, to keep myself learning the new words.
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 » 17 Aug 2019 03:47

Desmanto wrote:
06 Jul 2019 17:08
My friend also experience bad thing with MiXplorer. He just lost one of his important text file because MiXplorer text editor suddenly can't save the file. He have the notes for years and never backup the file. When he try to save one day, MiX just didn't want to save it. Reopen the file, it is blank already, gone. So it can be the bug from MiXplorer itself.

Maybe you should try safe mode too at that time. But since the problem lies on the system file, that maybe won't help either.
Sorry to hear that about your friend. I myself have never experienced any issues with editing text files with MiXplorer so it may have been fixed since then. I rarely use it anyway, since I prefer to use apps that feature clouds saves (eg. Google Keep, Notion, etc.). Using these, I can also edit on the web or via a desktop app on my computer as well, which is nice.

Just about an hour ago, I decided to stop procrastinating and give it another shot. Unfortunately, I got the same result but the locksettings.db file didn't disappear or go blank this time. I have given Safe Mode a try this time as well, but still got stuck on "Phone is starting" unfortunately, so I guess this marks the 7th time or so I have to clean flash my phone :oops:. I can't say for sure if this is a problem with MiXplorer however, since I haven't tried this with other editors.

The file isn't part of the System partition though, so perhaps maybe if I restored a backup of the Data partition, it might work.
Desmanto wrote:
06 Jul 2019 17:08
I almost never need to restore any TWRP backup. But it just make feel safe to do the backup weekly. Space can be problem, but backup is more important.
I know you're right, but unless I start uninstalling like nearly all my apps, that probably won't be an option. Even with a USB OTG, I can't imagine having to plug that thing in everyday just to do a backup (it'll likely be too easy to forget to do).

Speaking of which, it's been a while since I've ever had to restore a TWRP backup. Other than installing Magisk modules, there really isn't anything else that I do that could potentially corrupt my phone. If it's Substratum, I can simply just flash the rescue zip.

Just to give you an idea though, here are the sizes for my partitions. My phone comes with 64 GB and there is no external SD card slot. Having to free up 30 GB to back up app data and such sounds a bit crazy :cry:
  • Boot - 64 MB
  • Cache - 0 MB
  • Recovery - 64 MB
  • System - 1665 MB
  • System Image - 3072 MB
  • Vendor - 419 MB
  • Vendor Image - 1024 MB
  • Data (excluding storage) - 36545 MB
  • Modem - 127 MB
  • EFS - 6 MB
Desmanto wrote:
06 Jul 2019 17:08
If you need random quote, maybe you should just put it at the smartwatch. I have discover a lot of wonder using Automagic with WearOS. For the past few days I am creating the flow to show random english word at my ticwatch. I still learn english till dates. When reading ebooks with unusual vocabulary, I copy the text, automatically translate in google translate. Use Control UI to fetch the translation and save it glovar list. Later use these words to show as widget at my tichwatch periodically, to keep myself learning the new words.
Unfortunately, I don't have a smart watch and won't be getting one anytime soon (I just use my phone for everything pretty much). I know there are apps for this, but at least this will give me something creative I can do with the feature; up until I got the idea, I've only just had my name displayed as the message on the lock screen. I've heard of people using it for contact information in case they lose their phone but that's about it.

I would recommend you the Look Up app. It does pretty much everything you mention your flow does, such as word translations and storing searched words (though it does have some problems when the words are copied and not searched for directly within the app). It's got a Word of the Day notification as well which also shows words you've starred occasionally and supports a variety of sources (eg. Google, WordNet, Livio, etc.).

I am kinda curious as how your flow works though. Could you give me an idea of how you designed the widget?
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 » 17 Aug 2019 17:01

Pepy wrote:
17 Aug 2019 03:47
Sorry to hear that about your friend. I myself have never experienced any issues with editing text files with MiXplorer so it may have been fixed since then. I rarely use it anyway, since I prefer to use apps that feature clouds saves (eg. Google Keep, Notion, etc.). Using these, I can also edit on the web or via a desktop app on my computer as well, which is nice.
I usually use color note, but lately I use MiXplorer more. But for temporary note, I put it into Automagic, I currently have 3 placeholder for the notes, which I can show it up on the watch if I needed. I also use floating stickies (the old version) for another general purpose note.
Pepy wrote:
17 Aug 2019 03:47
Just about an hour ago, I decided to stop procrastinating and give it another shot. Unfortunately, I got the same result but the locksettings.db file didn't disappear or go blank this time. I have given Safe Mode a try this time as well, but still got stuck on "Phone is starting" unfortunately, so I guess this marks the 7th time or so I have to clean flash my phone :oops:. I can't say for sure if this is a problem with MiXplorer however, since I haven't tried this with other editors.

The file isn't part of the System partition though, so perhaps maybe if I restored a backup of the Data partition, it might work.
Maybe the locksettings.db really don't want to get edited. Should avoid editing since now then.
Pepy wrote:
17 Aug 2019 03:47
I know you're right, but unless I start uninstalling like nearly all my apps, that probably won't be an option. Even with a USB OTG, I can't imagine having to plug that thing in everyday just to do a backup (it'll likely be too easy to forget to do).

Speaking of which, it's been a while since I've ever had to restore a TWRP backup. Other than installing Magisk modules, there really isn't anything else that I do that could potentially corrupt my phone. If it's Substratum, I can simply just flash the rescue zip.

Just to give you an idea though, here are the sizes for my partitions. My phone comes with 64 GB and there is no external SD card slot. Having to free up 30 GB to back up app data and such sounds a bit crazy :cry:
  • Boot - 64 MB
  • Cache - 0 MB
  • Recovery - 64 MB
  • System - 1665 MB
  • System Image - 3072 MB
  • Vendor - 419 MB
  • Vendor Image - 1024 MB
  • Data (excluding storage) - 36545 MB
  • Modem - 127 MB
  • EFS - 6 MB
Same here, I am using 64 GB RN5, and my free space usually hover around 10-15 GB in most daily usage (20-25 GB if I exclude the TWRP backup). I don't backup the whole internal, nor the ROM. I only backup the /data partition without the /data/media (internal sdcard). The average backup size is about 4,5 - 5 GB, so I can store 2 backups for 10 GB. For the internal storage, I backup monthly and sometimes only just before I need to travel or go somewhere far (far from PC). And I don't backup all also, I made a batch script to execute adb pull to the folder. I only put importants files in the list. And of course Automagic folders/files is one of them.
Pepy wrote:
17 Aug 2019 03:47
Unfortunately, I don't have a smart watch and won't be getting one anytime soon (I just use my phone for everything pretty much). I know there are apps for this, but at least this will give me something creative I can do with the feature; up until I got the idea, I've only just had my name displayed as the message on the lock screen. I've heard of people using it for contact information in case they lose their phone but that's about it.

I would recommend you the Look Up app. It does pretty much everything you mention your flow does, such as word translations and storing searched words (though it does have some problems when the words are copied and not searched for directly within the app). It's got a Word of the Day notification as well which also shows words you've starred occasionally and supports a variety of sources (eg. Google, WordNet, Livio, etc.).
That lockscreen is truly useful. My friend recently got a phone from the street. I already encourage him to return it back. But the problem is the phone is in lock state and doesn't have any contact information. The person also don't call back, so we don't know how to return it. Maybe I will try to unlock it and see if he can get some info later after unlock. But this is crossing the line already, I still hope the best ending (that we can return the device to the original owner).

Thanks for the app recommendation, but it is too overkill for my purpose. I already have the dictionary for that. And what I need is a simple periodic reminder to stick the vocabulary more frequently. Besides, I try to only install the app I really need the most. If I can make it using Automagic, I usually will prefer to do so (even though it takes time to create it), rather than installing additional app.
Pepy wrote:
17 Aug 2019 03:47
I am kinda curious as how your flow works though. Could you give me an idea of how you designed the widget?
You can see several of my ticwatch widget here : https://forum.xda-developers.com/wear-o ... c-t3956264
I type that for sharing and as supporting data to request the additional element here : viewtopic.php?f=4&t=8184
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