Remove Battery Indicator Icon - Android Software/Hacking General [Developers Only]

Is it possible to remove/hide the battery icon? I'm on a Samsung Epic 4G Touch with a stock ROM that's been rooted.
I don't want to replace it with something else (I've already done that). I want to remove it, so it doesn't take up space in the notification toolbar.
Thanks for any help.

you could ask Master&Slave(tm) . as you can see in this thread he made some statusbar mods before and maybe he knows how to do that

there is a tut in second post of this thread:
forum.xda-developers.com/showthread.php?t=1371330
i havent tried it, since my rom has this option built in

t0mas_ said:
there is a tut in second post of this thread:
forum.xda-developers.com/showthread.php?t=1371330
i havent tried it, since my rom has this option built in
Click to expand...
Click to collapse
^^^I second this^^^
I have previously used this method on the t-mobile sgsII. Worked great!

I tried following that exact post last night, but I ended up with a missing status bar. The issue I'm having is that none of the instructions I've seen are for an odexed system. I'm running the stock rom, so all my .apk files have corresponding .odex files, rather than containing a classes.dex file within the .apk file. I'm not sure, but I suspect this could be the reason I haven't gotten it to work.
Basically, I'm doing the same thing as the instructions say, but instead of extracting classes.dex from the SystemUI.apk, I'm using SystemUI.odex, since SystemUI.apk doesn't contain classes.dex. I baksmali SystemUI.odex file to extract the code, modify the code, then smali it back into a new SystemUI.odex, and replace the existing SystemUI.odex with the new one.
Any reason why this shouldn't be working? One possible error that I thought of is that I think I pointed smali to one level too far up in the code directory structure when generating the new SystemUI.odex. Using baksmali produced "out/com/android/systemui/...". In the smali command, I used "out/com", but I think I should have used just "out". I'm going to try again tonight and see if that was the problem. Otherwise I'm out of ideas.

i dont think it is possible to edit odexed apks. not sure though...

Related

Having trouble theming Rosie.

ok, so I am working on reskinning sense, I'm using DamageControl 2.1 right now and I was able to edit some of the files used in com.htc.resources.apk without problem.
The problem I am having right now is whenever I try and modify a file in rosie, repack and resign and adb push it back to the phone, sense force closes until I revert back to the orginial file, has anyone run into the same issue?
I am going to download the latest framework to see if there might be an issue with signing caused by not having the latest one. I really can't remember which version I'm running.
i give you credit, i wouldn't even attempt to try this on my phone.
Quick question, is there a reason why you're resigning the .apk? There is no need too.
I was under the impression, perhaps uneccesarily, that whenever you modify an apk it needs to be resigned to prevent problems.
I've always done this, I have never had a problem with that practice in the past which is why it perplexed me now. As I already stated, there was no problems when I modified com.HTC.resources.apk
I'm drunk
obelisk79 said:
ok, so I am working on reskinning sense, I'm using DamageControl 2.1 right now and I was able to edit some of the files used in com.htc.resources.apk without problem.
The problem I am having right now is whenever I try and modify a file in rosie, repack and resign and adb push it back to the phone, sense force closes until I revert back to the orginial file, has anyone run into the same issue?
I am going to download the latest framework to see if there might be an issue with signing caused by not having the latest one. I really can't remember which version I'm running.
Click to expand...
Click to collapse
There is images where the name is yadayad08.png, well the number might not be 08 it might be another number and i really dont feel like diggin into it right now, but the images with that number in the end have scripts attatched to the or it written into the image. Have you looked into that. Sorry if I have been %100 clear but ther is images with scripts actually written inside of them......... if you can follow what i'm sayin...:\ I'm drunk......... anyway i'll look into it right now and be back so I dont look like a complete douchebag
So some images have a script stored in the same file? I have never heard of that before. I'd like to see some examples if possible, and how exactly do you modify them?
Time to put my Google-fu to good use.
Edit: whatcha drinking?
The file I am trying to modify is common_mainnav_scroller3.png. maybe that will help. I'm not at my laptop right now, so I am not able to try modifying it without resigning.
I also found some info about the images with scripts attached to them. I have a utility now to modify that stuff, however looking around some more I also think the files with a filename.9.png are the applicable files. I'm not modifying them right now.
obelisk79 said:
The file I am trying to modify is common_mainnav_scroller3.png. maybe that will help. I'm not at my laptop right now, so I am not able to try modifying it without resigning.
I also found some info about the images with scripts attached to them. I have a utility now to modify that stuff, however looking around some more I also think the files with a filename.9.png are the applicable files. I'm not modifying them right now.
Click to expand...
Click to collapse
yea i know forsure the.9 files have scripts attached however if your just changing something as small as an icon I don't think it should matter. Not sure though, i was trying to port a theme and i ran into this situation im not a linux guru so I kind of gave it up
I do not resign the .apk after modifying them If you are only changing images just make sure the new image has the same name and just open the .apk and drag n drop the image into the folder where it needs to be it will over write the old image and store the new one.
I have modified the Rosie.apk and com.htc.resources.apk many times to change things in the taskbar change over to Espresso etc
if you are only changing .png files just drag and drop.
Also like cheyne1 said files or .png's with xxxx.9.png etc in them are more than just .png files and replacing them will cause all sorts of issues if the new file is not made correctly
well, lesson learned... drag-n-drop worked. didn't think rosie apk was going to be so testy. thanks for the help.

Ways to make a rom

By any chance could someone tell me the best way to make a rom, I have a droid 3 and really want to make a rom but I don't know where to start, thanks in advance
Sent from my DROID3 using XDA App
The best roms start with 3 eggs and little bit of milk to make them fluffy. Whisk briskly!
If you want to jump in, this is a good place to start http://source.android.com/source/index.html
If you just want to dip your toe in the water, then you could start with modding roms, such as adding/removing apks, theming, writing update scripts.
Find a rom and unzip it. Look inside, poke around. Don't be shy-take things apart. Peel back the layers until you find xml and png files. Then, put it all back together and see if you can get it to flash.
Thanks
Sent from my DROID3 using XDA App
thanks so much for the info!
If you download a rom and unzip it, there will be a META-INF folder- look in here- there will be some crypto certs and a com/google/android/ folder which will have the updater-script and update-binary. The script is how the phone knows what to do with the rom. Read through the script and try to decipher what it is actually doing. It will be different for some roms. For example, the cyanogen roms will back up some system apps and replace them after flashing.
You might also come across a boot.img in the root directory of the rom. If you do, there will be some instructions in the updater-script for what to do with it.
Next look in the system/app directory- you'll find a bunch of apk files. These are actually in zip format, so you could unzip them to see what is inside.
A basic test would be to add or remove an apk to the system apps and then get it to flash. Of course you'll need a rooted phone and maybe jarsigner or signapk. Signing a rom will put all those CERT.RSA files back into the META-INF/ folder, which contain crypto hashes of all the files and the names of the files. Some recoveries will allow you to flash an unsigned rom, but you might as well figure out how to sign them. It's in the android link I posted earlier.
Good luck!
Thank you for that also this is very helpful I was kinda confused on where to start with aosp, also that the droid 3 has a locked bootloader
Sent from my DROID3 using XDA App
By any chance would you know how to do some theming? If I understand right it has to do with decompiling the framework-res and systemui apks, and replacing some pngs and xmls with others right?
Sent from my DROID3 using XDA App
I just got started with this so I am by no means an expert. I think you'll want to start by deodexing a rom so that you can make changes to the res, xml, etc. I think most stock apps come as a two part package- an .apk file and an .odex file, both with the same names. Find a stock app and look in the framework and app folders. De-odex-ing takes the odex file, de-compiles it, and then recompiles it into a classes.dex file that is put back into the apk or jar file. This configuration will should allow you to make changes without having to compile the rom from scratch... at least that is my understanding.
Find an apk that doesn't have an odex file and look for the classes.dex file inside. Then take a peak in the res folder in the apk. In the res folder you'll find all sorts of xml and png files.
To get started with decompiling, you'll want baksmali http://code.google.com/p/smali/wiki/DeodexInstructions
Take a look at the issues. JesusFreke wrote some interesting comments in issue 61.
I think there are a few other packages that will do the same thing, and there are certainly a few scripts that will work too.
I ran into some issues with deodexing honeycomb- I outlined the process here http://forum.xda-developers.com/showthread.php?t=1324653.
This is also a good source http://wiki.sdx-developers.com/index.php/How_to_deodex_a_ROM
Good info, thanks.
thank you you have been extremely helpful, im gonna try to get my rom out by sometime this week thank you
I just did some mini-theming. I have an ASUS Transformer- the stock rom has it's own back/menu/home buttons. I wanted a more complete honeycomb look, so I grabbed the stock honeycomb versions from a xoom rom, and added them into my deodexed stock ASUS SystemUI.apk. Oddly enough, if I signed the apk, it wouldn't work, but if I left it unsigned, it works fine.
thats odd, i thought you needed to sign it for it to work

[Q] Guide Request-- How to Implement Krylon's CIQ Removal

Hello. I would like to know if anyone has an actual beginner's guide to CIQ removal. For a minute, there was a guide that didn't quite have all the bugs worked out of it, but it was removed. I've been trying to follow Krylon's thread on rootzwiki, but it seems to stop short of telling people how to actually recompile everything and push it back to the phone. It would be helpful and informative to be walked through this process once the CIQ files have been deleted from the decompressed classes.dex files and .xml manifest.
Thanks
Note: So far, I have figured out that autosmali can be used to smali the files back into a classes.dex file, which can be reincorporated into the associated .jar files using 7zip. Seems simple enough. However, the process of getting framework-res updated seems to be more complicated, and requires answering some questions about. Specifically: 1. Option 11 asks (a) Is this a system apk? (b) Aside from the signature, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors? I have answered "yes" to 1.(a) and "yes" to 1.(b), which told me to delete the .xml and the resources.arcs file from a temp directory before completing the compile. This whole process has left me with three modified files (framework.jar, android.policy.jar, and framework-res.apk (unsigned)). Now what do I do with them?
Note 2: Looks like I can sign the framework-res.apk file using option 12.
Once you are done modifying the files you need to either put them in an update.zip and flash or push them with adb to their respective folders.
As for someone giving a step by step I doubt that will happen. It seems like the ones that do know how to do alot of the modifications to roms, are pretty vague when they post how to's. Most of the time it seems like they just don't want to share the information. Why I don't know, but that is just my opinion. I am sure I will probably get flamed for saying this but again this is just my opinion.
You can search the forums and find most of the information here and there. Then you need to put it all together and hope it works.
My thought's would be to have a seperate area in the forum to post just Tips, Techniques and How To's. Then alot of the people that want to learn how to theme and build roms would have an better source to find their answers than having to search all the forums. Again just my .02 cents worth...
Hope no one is offended by this as that is not my intention.... XDA is a great source for information...
quick steps..
Decompile Framework.jar, delete the entire carrieriq dir and all it's contents, recompile.
delete /system/xbin/iqbridger
DONE
Makes the rest dead code.
tablador said:
Hello. I would like to know if anyone has an actual beginner's guide to CIQ removal. For a minute, there was a guide that didn't quite have all the bugs worked out of it, but it was removed. I've been trying to follow Krylon's thread on rootzwiki, but it seems to stop short of telling people how to actually recompile everything and push it back to the phone. It would be helpful and informative to be walked through this process once the CIQ files have been deleted from the decompressed classes.dex files and .xml manifest.
Thanks
Note: So far, I have figured out that autosmali can be used to smali the files back into a classes.dex file, which can be reincorporated into the associated .jar files using 7zip. Seems simple enough. However, the process of getting framework-res updated seems to be more complicated, and requires answering some questions about. Specifically: 1. Option 11 asks (a) Is this a system apk? (b) Aside from the signature, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors? I have answered "yes" to 1.(a) and "yes" to 1.(b), which told me to delete the .xml and the resources.arcs file from a temp directory before completing the compile. This whole process has left me with three modified files (framework.jar, android.policy.jar, and framework-res.apk (unsigned)). Now what do I do with them?
Note 2: Looks like I can sign the framework-res.apk file using option 12.
Click to expand...
Click to collapse
Don't use option 12.
NEVER SIGN A SYSTEM APK
krylon360 said:
Don't use option 12.
NEVER SIGN A SYSTEM APK
Click to expand...
Click to collapse
Thanks krylon for the quick fix.
If, for completeness, I wanted to put all of these modified files on my phone (unsigned), how would I do it? Last time I tried, I used a root file explorer and my phone started bootlooping immediately after placing framework-res.apk on the phone. Adb was not available, so I had to reflash in order to put the file back the way it was. I was thinking maybe to adp push the file instead of copying it with the explorer.
adb push then reboot.
but, it's best to do it as a fresh install.
Thanks, I will give that a try.
Followed these directions 3x, but when I boot up my phone with these changes, the Android System process stops responding every time i boot my phone. I can bypass the error message fine, though.
edit: Well, after reflashing it 2 more times with the exact same rom, it doesn't happen anymore. MEH, who knows?
One of Raver's ROMs did that too. I think it is a dependency to something you removed. It was fine on the ROM. One FC when you boot ROM and that was it.

[Q] "smali" files on the I727? Can they be edited without Baksmali (Deodex)?

[Q] "smali" files on the I727? Can they be edited without Baksmali (Deodex)?
I've been looking into the coding on this phone for a while. I've made a couple of posts trying to figure out how to get Nfc enabled on this phone with no luck. So I am trying to look into it a bit further myself. I'm learning as I go, but I am trying to compare other phones files (and custom ROM files) with working Nfc with the stock ROM files on the SkyRocket to try and find clues as to which files are needed to start working on this. One thing I notice (difference) is there doesn't seem to be any "smali" files or code on the SkyRocket stock ROM. Can someone please tell me where they are located (I am rooted and use Root Explorer) on the Stock ROM or which files are used in their place?
Thanks.
**Edit**
OK, I've done a little more research and found out the "smali" code in an Odexed ROM is located in the Odexes. In order to work on them I am guessing they would need to be DeOdexed? Or is there a way to view and edit them without Baksmali?
typically bc
an odex file is renamed to class.dex and combined into the same apk
deodexing basically works likethis
every apk needs a set of instructions
thats the odex
so by removing the odex and turning it to a classes.dex
file we can remove the unwanted odex file
and speed up access to the files instructions
opens faster closes and caches faster i do beleive i could be wrong
but i know the general idea

[Q] (Q) OTA Battery Full notification

Has anyone found a way to remove the battery full notification from the 2.3.3 OTA Rom? I know this has been asked before, but I can't tell if the answer is still no, or I simply haven't found the correct thread.
Vorkosiganm said:
Has anyone found a way to remove the battery full notification from the 2.3.3 OTA Rom? I know this has been asked before, but I can't tell if the answer is still no, or I simply haven't found the correct thread.
Click to expand...
Click to collapse
It has been removed in most custom OTA ROMs
Assuming that I don't want to switch to another ROM, is it possible for me to remove the notification from the stock ROM (by modifying framework-res.apk or such), or can the removal only be done when compiling from LG's source?
Vorkosiganm said:
Assuming that I don't want to switch to another ROM, is it possible for me to remove the notification from the stock ROM (by modifying framework-res.apk or such), or can the removal only be done when compiling from LG's source?
Click to expand...
Click to collapse
It can removed from the stock rom, but you need to know exactly what you're doing, as far as modding smali in apks.
Can you give me any help to point me in the right direction for what I need to do? I think I know how to edit the apk's, and I am guessing that I would need to edit one of the xml files, but the naming conventions are not always logical. For example, config_animateScreenLights is related to the crt screen off animation for some reason.
Vorkosiganm said:
Can you give me any help to point me in the right direction for what I need to do? I think I know how to edit the apk's, and I am guessing that I would need to edit one of the xml files, but the naming conventions are not always logical. For example, config_animateScreenLights is related to the crt screen off animation for some reason.
Click to expand...
Click to collapse
This is not an xml edit, its a small smali edit, but here goes:
adb pull SystemUI.apk from /system/app and decompile SystemUI.apk, navigate to
\smali\com\android\systemui\statusbar\policy\StatusBarPolicy.smali
Find & remove the ENTIRE "showChargingComplete" method
then find and remove this line
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showChargingComplete()V
Recompile SystemUI.apk and push to /system/app, then reboot.
If this sounds too hard or tricky, let me know.
Thanks! That worked perfectly.
I don't suppose you could post a link to that modified SystemUI.apk file? I'd love to get rid of the battery full popup, but I've never compiled/decompiled an .apk, so it sure would be a time saver.
Thanks in advance!
I certainly can. A couple of things first. I found that using the OTA, you cannot just push the SystemUI.apk to your phone using adb (it has to do with the permissions baked into the ROM), I had to make a flashable zip. This means that you will need clockworkMOD to flash the zip. Also, the SystemUI.apk that I have includes xboarder56's green signal fix (from this thread: http://forum.xda-developers.com/showthread.php?t=1179748&highlight=ota+gingerbread). I can apply the battery popup fix to a stock SystemUI.apk if you want, just let me know. In any case, I have to recreate the flashable zip, so it will take a few days.
I'm rooted, running the rooted but stock ROM "P999_2.3.3_Stock_OTA" by xboarder.
The only mod I've added is the battery icon mod from this thread installed: http://forum.xda-developers.com/showthread.php?t=1190283&highlight=battery+mod
So I assume you can't just pull the SystemUI.apk and post, then copy in place using ES Explorer? If you can post a flashable .zip that works for me, whatever is easiest. Many, many thanks....

Categories

Resources