yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] jmckeejr:
I am on customRom. Telenougat4.5 and trying to restore stock battery. I have changed the entries in sytem_icons.xml and dimens.xml and REMOVED the 3minit small files but I just get blank battery area. There are other mods on systemui so don't want to use a stock version. Any idea what I am missing?

System_icons.xml ( this one I put the dimensions in direectly but have also tried using [MENTION=1245493]Dimens[/MENTION]/status_bar_battery_height (and width). I have also changed the dimensions in dimens.xml

This is on nougat 7.0, do I need wrap_content instead? I copied from a stock system ui and they have [MENTION=1245493]Dimens[/MENTION]/status_bar_battery_height (n width)

com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="14.0dip" android:layout_height="8.0dip" android:layout_marginBottom= [MENTION=904501]dimen[/MENTION]/battery_margin_bottom" />

Just wondering if missing something obvious. Are there image files coiuld have maybe been removed or is everything drawn from drawable xmls?
[Android Apps and Games] The Sickness:
Why don't you just choose the stock battery in 3Minit settings?

Users #15
[Android Apps and Games] jmckeejr:
Until there is a workaround/ fix for alpha entries for light backgrounds I would like to go stock. If I had time to code I would put Rom control toggle but I am not that far advanced yet. I frequently find myself in an app with light status bar and my OCD kicks in and when i can't see battery or clock it just gets to me. If it weren't for that damn OCD I wouldn't be sneaking to my office in the middle of the night to decompile apks. Lol

EDIT: I got it. Missed 2 entries in dimens (battery_ height, battery_width)
[Android Apps and Games] zarpanzur:
Hi guys, I'm on stock KitKat 4.4.2 on Galaxy S3 i747m

No matter how I do it, whether manually or using tools like advanced apktool or easy apktool, or even by keeping the original signature of the SystemUI.apk file, I cannot seem to get this mod to work. Obviously my firmware is odexed and to deodex SystemUI I use apktool on my Android device. I don't get FC but I don't see the status bar and my home background is all black. This can't be as bad as an FC so I know I'm doing something right. I can still use the phone no problem despite this but I'd like to solve this, obviously. Permissions for systemui are set to 0644

Also, hope this isn't a dumb question but, do I have to deodex the framework-res file also? Please tell me that's all I had to do. lol

I literally spent a straight 24 hours trying different things out with no success. Pre-kitkat I would get FC but on Kitkat, atleast I get no FC. Started off with 4.0.4 ICS and ended up updating to KitKat (why was I still on ICS? new phone, previous owner never updated it)

I know that in the OG Battery mod, Osama's handy little app extracts the whole framework folder. Me thinks you need more than just framework-res.apk

Any ideas on what could be wrong/what I'm missing? Thanks
[Android Apps and Games] Ticklefish:
You don't need to deodex framework-res.apk for this mod, no.

This first things I'd check is whether you can decompile and recompile your SystemUI.apk without making any changes. If the new APK runs, you know it's got something to do with the mod.

Oh, and I'd check whether your APK is actually deodexed or not.

Did you wipe the dalvik cache when you put the modded APK back to your device?
[Android Apps and Games] zarpanzur:
Will try wiping cache first then try dec/rec without mod. Thanks
[Android Apps and Games] Ticklefish:
If you ever change smali you always have to wipe the Dalvik cache or it'll never be picked up. Android has to put those changes into the cache.
[Android Apps and Games] zarpanzur:
I'll flash TWRP and try wiping dalvik. If that doesn't work then I'll compile/decompile without the mod.

With the OG Battery mod, I'm not sure if the app wipes Dalvik cache or if this can even be done through adb, as that's what the program uses, and it worked for me on JellyBean, but sadly, does not support KitKat

I get different filesizes using different tools, must be the compression level or something.

UPDATE: dec/rec without mod and no go so I guess it's not really deodexed, but how? I get the smali folder and all.

---------- Post added at 06:47 AM ---------- Previous post was at 06:11 AM ----------

Thinking of just giving up, spending way too much time on just a stupid battery icon.

There's gotta be a better way to do it. There's an xposed module called xBlast that successfully modifies the icon file and you don't need to mess with smali files or do any decompiling or recompiling but xBlast also modifies your system in other, undesirable ways. Would love for some wonderful, wonderful person to port this 3minit mod to xposed.

I'm thinking this mod, as it currently is, can't be done, it's just a futile task and I bet the developer is laughing at all the people even trying to do this.

Unless someone wants to recommend a good way to deodex apks? Clear, step by step instructions would be so helpful, outlining exactly what must be done, no assumptions. If I was a developer, I would have done so. But I guess this mod is meant for developers of ROMS and not the end-user. :)
[Android Apps and Games] Ticklefish:
This mod is meant for everybody, not just developers. And I don't think the developer is laughing at you.

Some mods can be tricky. Especially since different OEMs do different things to the different roms in their different hardware. Samsung, in particular, often add their own custom stuff in roms which can cause issues with modding.

Unfortunately some mods just won't work in every case. 3minit should work in yours.

If your SystemUI.apk doesn't work when you decompile and recompile it without modding, the problem isn't with this mod. The problem's going to lie with the process you've been following.

I'd recommend trying Tickle My Android to de/recompile. Not because I made it (although I'm honest enough to admit that's part of the reason) but because it automates that process for you and it creates a log so it's easy to see what happens if things go wrong. TMA also creates flashable ZIP files which can wipe your Dalvik cache automatically.

As an aside, Tickle My Android can deodex an entire room for you as well.

You don't have to use it, of course. That's up to you. But I'd suggest reexamining your process. If a recompiled APK doesn't run and you haven't made any mods, something has gone wrong somewhere.
[Android Apps and Games] zarpanzur:
I downloaded tickle my android and my anti-virus, Bitdefender, detected the main .exe as having a trojan, sigh, too good to be true, but whatever, I recovered the file and tried to run it but it gave me some bogus message that I couldn't.
[Android Apps and Games] Ticklefish:
That's just adb. Antivirus programs don't like it because of the way it interfaces with other hardware so they get all upset and say it's malware.
[Android Apps and Games] zarpanzur:
Nah man, you think I didn't have adb before? Not once did my antivirus detect other adb files as having trojans. Tickle my Android seems to have a trojan, now I gotta format and re-install windows. Thanks man.

---------- Post added at 04:04 PM ---------- Previous post was at 03:57 PM ----------

OG Mod by Osama Ghareeb seems to do the job of replacing battery icons, but even that uses smali files, which I think are unnecessary. xBlast xposed module, like I said, replaces the battery icon, and you don't need to wipe dalvik or any of that and no smali files.

---------- Post added at 04:08 PM ---------- Previous post was at 04:04 PM ----------

Tickle my balls
[Android Apps and Games] GayCasper:
I'm using NNE4.0_STABLE_S8PORT s6 edge. Can anyone post a flushable version that will work with this ROM
[Android Apps and Games] servanteternal:
I've done the mod, successfully deodexed/decompiled/recompiled/signed/zip-aligned and my android boots up and runs great. However, when I try to change the battery icon, it doesn't change, just stays stock. I've followed the instructions EXACTLY. What could be wrong oh xda gurus?
[Android Apps and Games] :
Did you copy 3minitresources.apk to system/priv-app/ and grant 0644 permissions? Are you able to see the blue battery icon in your status bar that I am able to see in mine? This is apart from the stock white color battery icon. Attaching screenshot for further reference.
[Android Apps and Games] CryonicCore:
So in order to use my paid 3minit battery I have to modify a bunch of files and crap. Can there just be modified files that can be downloaded and used instead? Probably be easier to just download and use superman rom as everything is already done for you.
[Android Apps and Games] xSilas43:
Of course using a ROM with an already modded systemui is easier, the devs have done all the work for you. ;)
[Android Apps and Games] :
There was no compulsion for anyone to buy the paid app in the first place.

On a sidenote - crDroid ROM 7.1.x for my Mi3 (cancro) comes with all modifications done already. I just need to copy 3minitresources.apk to priv-app to get my battery icon working. If you search your respective device forums, you are bound to come across at least one ROM with 3minitbattery support out of the box.
[Android Apps and Games] CryonicCore:
What do you think I'm stupid or something? I know that there is no "compulsion" to buy the app. However, I paid for the app to 1. Support the developer 2. Used it for a rom that had a modded systemui already (that I didn't know) 3. When you buy an app then it should work right off the bat. Not having to get the customer to put it together. It's like paying for Windows and then they say "oh yea, before you can fully use the system, you will have to decompile/mod/ then recompile it before use.
[Android Apps and Games] manbat:
Screenshot from Playstore

Screenshot from Playstore

Just to clarify ....it is made quite clear on paid app from Playstore that the required mods must be made for it to work.

Have a good day...
[Android Apps and Games] :
I don't know if you are stupid or not. But I do know that you didn't read the playstore app description properly before purchasing it. The author has clearly mentioned that the app works only by following the instructions given in the OP of this thread. (=_=)"
[Android Apps and Games] kpirnie:
ahhh but when you buy windows you have to install it for yourself mate... Microsoft isnt going to go to your house and hold your hand while they do it...

your solution is simple. dont use the mod

you know how many android devices, versions, and roms there are? u going to mod each and every single systemui to implement it? and then support them all?

think before you post mate
[Android Apps and Games] CryonicCore:
You guys are hilarious. Just an FYI, Windows comes pre-installed on certain computers so yes they may as well hold my hand because your statement is flawed "mate". My solution is that I'll use it or don't use it but that's not what I'm trying to say. There is not many mods that make people do that work to make it work and honestly I don't think it's fair to get people to pay for an app then make them do the work to make it work. "Mate"
[Android Apps and Games] Ticklefish:
Unfortunately not, no. The trouble is that there's just no way that could work.

This mod does two things. The first thing it does is display a new battery icon. That could probably be done without modifying anything, as long as you're using a recent enough version of Android. An 'overlay' could be used to just put the new icon on top of the status bar and away you go.

The problem lies in the second thing this mod does and that's hide the original battery icon. The code that displays the battery icon isn't the same in every rom and every version of Android. It's not even always in the same file. In theory a developer could possibly write a routine that searches for the relevant code and edits it automatically. However, unless the APK is decompiled, that code can't be edited. It has to be converted into legible text, which is part of what decompiling does.

The other option would be to have a pre-modified APK that users could use to replace their own. But that would be a nightmare to maintain. The SystemUI.apk in every rom is different. There would have to be a collection of literally hundreds, maybe even thousands, and that collection would have to grow every time a developer brought out a new rom or an OEM released a new device or upgraded an existing one.

Since users can modify their own in less than 5 minutes, I would imagine the developer of this app would rather people just do that.

From what I understand, you're unhappy because you paid for the app and yet you're expected to do the modding yourself. Unfortunately, because of the nature of the mod, there's no way it could be done for you. That's why the description on Google Play says what it says.

Sorry about that.
[Android Apps and Games] aa1064697:
thankyouvery
[Android Apps and Games] kpirnie:
you didnt say "buy a new computer" you said "buy windows"

so yeah... you can "buy windows" and no Microsoft if not going to hold you hand and install it for you

and again... by all means dont use the mod.
[Android Apps and Games] CryonicCore:
Wow now I feel that your trying to start a fight on here. How about don't tell me what to do and let's leave it at that ok? Ok.
[Android Apps and Games] kpirnie:
You came on here putting down the mod, all because you can't read what is clearly in the OP, as well as what is clearly in the play store. Or you did read, decided to buy it anyways just so you could come here and complain.

Who's starting what where?
[Android Apps and Games] CryonicCore:
And all I see is a big baby taking my opinion and throwing assumptions that you clearly know nothing about just so he can get likes and show how stupid you can be. My first post had nothing to do with "putting the mod down" as I was just clearly stating the obvious. However, you piling on and continuing to belittle and tell me what to do on a public forum shows how immature you are. Now you can say whatever you want after this post because we all know you will but I really don't care and will not respond because now this conversation is becoming foolish. But if you continue then I will report your childish behaviour to a moderator or someone that can properly handle this situation.

How you got recognized contributor status is beyond me but you don't deserve it.
[Android Apps and Games] pas2001:
You are right that users purchase paid app just only for support developer instead of only say thanks. Developer still pay for cloud storage ( contain all above 1000 types of battery icons, so you can download only the types you want and can delete with sure that you still find it there in future ) every months no matter his app still sell or not. And [MENTION=4315551]Ticklefish[/MENTION] explain above the need to moded each systemUI coz it too much different in detail so can't make "one moded - fit all" to download and install with all devices.
[Android Apps and Games] zfk110:
Hi, after doing the mod on MM my icons jumps down on lock screen from status bar then it goes back to normal place, I find bit and pcs from here and there to do the mod so I dont know what is causing this, since I didnt find <android:id="@id/battery to began with on my res/layout/status_bar.xml
[Android Apps and Games] kpirnie:
if u google his site youll find proper directions.

most likely you needed to look in system_icons.xml
[Android Apps and Games] zfk110:
Bro, whats the problem are you facing? I baked this mod to three different ROMs using three different SystemUI and Frame.apk and none of them have any problem, yes its trail and error procedure before you get it going.
[Android Apps and Games] Borfas:
hi, any one help my with code for galaxy s8?

i have a full version from play store long time..
[Android Apps and Games] jj27_6:
Help to make a flasheable zip

Good night. I have a z3 with the rom 12 search plus

Home Sony Xperia Z3 [ROM][6.0.1][D6653/03/33] MK-XM2 v4.5.0. I love 3mint battery but I am not a developer and I have not got to make a flasheable zip to this rom.

Could yo help me to get a flasheable zip to my rom?. I have tried to make it again and again and I have not get nothing.

Thanks beforehand
[Android Apps and Games] NEXT14:
Hello

I update my Icons No 12. The Files is in my Smartphone. On 5.0.1 i used this without problems. In MM 6.0.1 It can not be read. I do not understand why it does not work. Can anyone help me please

-------------------------------

SOLVED
[Android Apps and Games] santo_spy:
Not display Battery Mod after follow intsruction

How to install on samsung galaxy s5 (stockROM (port S7)) marshmallow? Because it has followed the instructions, battery mod icon does not change .. Thank You
[Android Apps and Games] santo_spy:
How to S5 stock MM? I've followed the instructions, but not work (icon battery mod not apply). Thanks B4
[Android Apps and Games] ROBERT CM:
Log or file moded?
[Android Apps and Games] santo_spy:
Here's the code I added in system_icon.xml :

<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/battery_icon_width" android:layout_height="@dimen/battery_icon_height" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" />

<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" />

And success RC, but not change battery mod.

I attach file systemUI

Thanks
[Android Apps and Games] ninestarkoko:
- did you install all of the correct needed framework files on TMA?

You need to take the framework-res.apk from your rom and other possible .apk files in /system/framework and install into TMA

- how did you replace the SystemUI.apk file? (adb, manually, from recovery....)

if your systemui crashes after reboot it can be a problem of permissions (app permissions got reset after replacement) so you need to grant them again (via .xml files backup, via adb maybe, or via Settings -> apps -> SystemUi -> permissions if you can open the Settings).

Connect the phone to the pc and use "adb logcat" to know which is the problem

--------------------------------------------------------------------------------------------------------------

Question:

does anyone know how to reduce the padding/space/margin at the right of the battery icon?

ok found myself some things:

- in values/dimens.xml

<dimen name="status_bar_clock_size">14.0sp</dimen> to edit size of clock in statusbar (default android clock not OEM clocks)

<dimen name="status_bar_icon_drawing_size">17.0dip</dimen> to edit size of icons on the left of statusbar

- in layout/status_bar.xml

<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="8.0dip" >

Edit paddingEnd to reduce the size of the space/padding/margin at the right of battery/system icons

(Sony MM rom but it probably works for most of the roms)

Unfortunately i cannot find the dimension for system icons (icons on the right). Tried status_bar_icon_size (coded in framework-res.apk) but it does not work.

I'd like to enlarge them a bit, but the icon size seems written in the code and not in resources and I gave up after some digging in the code and android sources (i'm not expert enough). [MENTION=4619873]gharrington[/MENTION] maybe you discovered something while digging in systemui code?
[Android Apps and Games] Tha_Dynasty2049:
I tried many times yall i cant recompile the app

can some 1 please add the 3minit battery mod for me to this ui

i already paid for the app and use it on a 5.1 rom but need this for 6.0
[Android Apps and Games] LiquidT:
Has anyone got this to work on Samsung s8+? Verizon. I have made the code changes in the system_icons.xml and added the smali files, installed both 3minit .apk's. After reboot I don't have a status bar, notification bar, or nav buttons. This is Nougat 7.0 rooted.
[Android Apps and Games] gherbert:
I'm trying the same thing with the same results.

Don't understand what I'm doing wrong...
[Android Apps and Games] LiquidT:
Not sure at this point, but I believe the whole rom has to be deodexed for this to work.
[Android Apps and Games] gherbert:
I'm on Renovate Ice and believe that deodexed

Enviado de meu SM-G955F usando Tapatalk
[Android Apps and Games] Tomas1516:
Hi, I cant install this mod in my rom

When recompile de system ui apk give me error

My rom is deodex and debloated without knox

Enviado desde mi SM-A310F mediante Tapatalk
[Android Apps and Games] LiquidT:
I'm running stock root on a Verizon s8+, it's not deodexed at this point. I'm working on a Rom for the verizon s8+ though. I was reading somewhere it said that it needed to be deodexed, if you are already deodexed than I not sure. Sorry
[Android Apps and Games] gherbert:
Is there any log that I can get to know what's going on?

I saw the adb logcat, can I use it? And how can I used it?

Enviado de meu SM-G955F usando Tapatalk
[Android Apps and Games] Logel:
Hello!

at first: im not a developer. But i tried to implement that mod into my used Rom

I did all steps like provided in OP.

But the Stock Battery Icon is still visible in Statusbar.

The 3minit Battery icon is only overlapping the stock Icon.

Maybe someone can tell me why.

Many THX in advance

Setup:

Samsung Galaxy Note 8

Android 7.1.1

My used Custom Rom (Nemesis Nougat N8 V2)

Sreenshots:
[Android Apps and Games] edzamber:
Hi,

Remove this line in res/layout/system_icons.xml

<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/status_bar_battery_icon_width" android:layout_height="@dimen/status_bar_battery_icon_height" android:layout_marginBottom="@dimen/battery_margin_bottom" />
[Android Apps and Games] Logel:
Many Thx for your fast asnwer

Completly delete this line gives me a SystemUI FC after reboot all few seconds.

I can't use the Phone with the new recompiled SystemUI and switched back to Stock SystemUI

In OP it's provided to only edit this Line. but the Entry to change is different from what i have in system_icons.xml

What i should change (in layout_width and layout_hight):

android:layout_width="wrap_content"

What i have in my system_icons.xml:

android:layout_width="@dimen/battery_margin_bottom"
[Android Apps and Games] kramer04:
I'v changed like this in systemUi/res/layout/system_icons.xml

<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_margin_bottom" />
<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" />

Hope it can help
[Android Apps and Games] edzamber:
Ok,

Have a look here :

https://xdaforums.com/showpost.php?p=70127889&postcount=39

Don't miss to add global context too...

I you havn't RomControl you need to use 6gear database editor to create a key "stock_battery_visibility" in System tab with value 0 for hide Stock battery

6Gear database editor here

https://xdaforums.com/showpost.php?p=66720889&postcount=6054
[Android Apps and Games] Logel:
No, this Rom haven't a Rom Control :(

And i think my Knowledge is much too less for that Guide from [MENTION=4714483]daxgirl[/MENTION] :eek:

But Thx for your useful answers and Links:svetius:

I will read about that 6Gear database editor, and read, and read, and read:cyclops:
[Android Apps and Games] edzamber:
Just follow the guides...

Database editor working only if you mod your SystemUI with global context and switch for hide stock battery. It not working without modding systemui First... This app is only writing into database some values for specifics Keys as RomControl do.
[Android Apps and Games] edzamber:
[MENTION=3901205]Logel[/MENTION],

Go into res/values/dimens.xml and set theses 2 lines to 0.0 like this :

<dimen name="status_bar_battery_icon_height">0.0dip</dimen>

<dimen name="status_bar_battery_icon_width">0.0dip</dimen>

Thanks to my bro [MENTION=4434858]sanoc69[/MENTION]