[SOLVED] APK/smali editing question/help - Android Software/Hacking General [Developers Only]

First I want to say thanks in advance for anyone who might be able to help - my guess is I'm missing something stupid, but I'm having some issues working it out. I've recently ported a Sense 4.1 ROM from a VilleC2 RUU to my device (HTC Holiday/Vivid) and have been working out some bugs. One of them was readding the hardware menu button functionality in Rosie. After some battling, I added the proper methods in the .smali, flashed it, menu button worked. Awesome, or so I thought. I baked the new Rosie.apk into the ROM, full wiped, flashed, and Rosie/Sense crash immediately after setup. So I full wiped, flashed the previous version of the ROM and all was well. Flashed the fixed Rosie.apk and all was even better. My question is what am I doing that the new Rosie.apk won't install properly from a full wipe/flash? Here are all the things I've tried that work/don't work...
First, what works..
Using VTS - if I make the edits and sign with either a test key, or the original key, the fix is applied as long as it's installed on top of an already working/stock Rosie (whether it's a dirty flash from a full build, or a standalone recovery flashable package)
What doesn't work..
Baking the "fixed" apk into the ROM and flashing after a full wipe. This results in Rosie/Sense crashing immediately after setup.
Trying to flash/install the fixed apk over the flashed ROM that had it baked in
I've tried using APKTool to decompile/edit/recompile, both using the newly outputted apk, as well as replacing classes.dex in the original .apk with the newly edited one, and this just results in Rosie crashing (whether it's baked in or installed on top of a working Rosie)
I've also tried the above with the outputted classes.dex from VTS (injecting into the original Rosie.apk), which also results in Rosie crashing.
Fixing permissions and/or wiping cache and dalvik doesn't fix the crashes.
While I am relatively new at this, I somewhat know my way around .apks and have been editing them without (too many) issues for a while now, but this one has me stumped...What am I doing wrong???
Edit: Maybe this was better in Chef Central > Android? If it needs to be moved, please do
Edit 2: I was just being stupid - while trying to not break the signature I was continually breaking the signature. This thread can be closed. Method used to get it to flash correctly with the ROM (I guess it helps to know how to PROPERLY use the tools available to you):
Decompile with apktool
Make edits
Build with apktool
Put META-INF folder and AndroidManifest.xml frin the original apk into /build/apk/
Build with apktool again
Use apk from /dist/

Related

How-to Theme Development

To create themes, or to edit themes to your liking, you will need a working knowledge of android, adb, how to resign apk's, knowledge of your own O/S.
Before you start be aware that you will probably end up wiping your phone once, if not more. So lets go over the things that you will need.
You will need JF's RC30, RC8, or ADP1 V1.3, depending on what version you intend to create for.
Here is the link to these: http://forum.xda-developers.com/showthread.php?t=466174
You will also want to get the dev bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
Link to dev bootloader: http://forum.xda-developers.com/showthread.php?t=455860
You will also need to resign all the apks located in /system/app and framework-res.apk located in /system/framework. When you push all of these to your phone, you will need to do a wipe.
JesusFreke was kind enough to build a custom signing tool for me that would allow me to right click on an apk and resign it from there. I am posting it here for others to use as well. Note that this is a courtesy of JF, so thank him for it. I cannot stress how much time this has saved me and will save you.
Here is the link: Http://www.FightForthePits.com/testsign(2).zip
Before using this you need to know how to set this up:
I will assume that you have the sdk downloaded and extracted somewhere(if not, do that now), extract both files to the tools directory of your sdk.
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.
To do this, right click on My Computer click properties, then choose the tab that says advanced. Click the button that says environmental variables. Go to system variables find the one that says CLASSPATH, double click it, go to the end of variable value. There should be a semicolon ; at the end. type in the path to the testsign.jar located in the tools directory of your SDK, for example the path to my testsign.jar was c:\sdk\android-sdk-windows-1.0_r1\tools\testsign.jar If CLASSPATH is not in your system variables then create it.
If you find the right click menu not working for some reason you can type the following in cmd to sign your files: java testsign whateverfiletosign
Now right click the reg file that you extracted and choose to install it, or merge.
Now, right click an apk, do you see an option that says ResignApk? If not hit the windows key and R at the same time. Type in regedit. go to HKEY_CLASSES_ROOT and expand it. Now find .apk and click it. Double click on (Default) and erase apk_auto_file. Hit ok and close the Reg editor. Now right click an apk and the option ResignApk should be there.
Now through doing this you have done two things, first off you have made the resigning process extremely easy, secondly you will not have to cd to the tools dir of the sdk to use adb or any other tool in the sdk.
You will also need a version of linux installed or running vmware with linux, so that you can create an update file which will install the theme onto the users phone.
You need to make sure that you do this correctly, because if you don't then you will have the potential to create problems for people trying to install your theme. You also need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure every file gets signed. Make sure you test the update.zip before you release it.
Every .apk contains the images relating to itself. However, every apk has the ability to use the images in framework-res.apk. The images for every apk is located inside of res and more specifically in folders that are named Drawable, drawable-land, drawable-port, etc. Some things you cannot edit unless you rebuild the entire apk from source, which we will not go into here.(another tutorial, another time) Just know that at this time you SHOULD NOT edit, or even open images with the extension .9.png. If you do you will have problems...Trust me. These are special images called ninepatch images and android resizes these images to fit wherever android, or any other apk, needs it to. if you do open them or edit them they will no longer render correctly when resized. I believe that in order to edit these you must do so and then put them into the source and rebuild the entire apk.
Before getting started you must also realize that you cannot simply resign one or two apk's and stick them in your phone and expect them to work. You must resign every apk inside of /system/app and framework-res.apk and put them on your phone at the same time.
To simplify this process for you though, I have provided an update which will do all of this for you. Note that these updates will not completely wipe your phone, your apps will be retained, however, they will require you to re-enter your Google info, and you will lose you call history.
Links down
Just put the correct update.zip, depending on what version you are running, onto your sd card, boot into recovery and hit alt + s.
Now you can push your own apk's one at a time without re-wiping your phone.
Now, your ready to start changing things up.
You will now need to open the apk, which you can do by adding .zip after .apk, effectively changing it to a zip. Note that if you are using windows you will need to unhide known file extension types.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsoft/windows/extension-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-vista/how-to-change-a-file-extension/
After changing the apk to a zip open it go to res and copy the folders that have drawable in their name. Go to your desktop, or wherever, create a new folder called Images, or whatever. Open the folder, paste the drawable folders in there. Now you can see what the files look like without opening them. Btw, you may also want to add -frame, or -launcher, to the end of the folders you cope over to keep them separated from others.
Finally, you've edited the images put them all in the apk renamed it back to an apk and resigned it. Now it's time to push it to your phone and see the changes you've made.
Important! : Whenever pushing files to the phone NEVER do it while the phone is running. Do this in recovery mode! If you do this while the phone is running normally you will begin to lose space in /system.
So, boot into recovery plug your phone in and open a cmd prompt. From the cmd prompt type adb shell mount /system then type the following: adb push c:\whereveryourfileis\whateveryourpushing.apk /system/app (system/framework if your pushing framework-res.apk)
Now reboot your phone. If it doesn't boot, try doing a wipe, if that doesn't work reinstall an update and try again. There are alot of things people can do wrong, I can't explain them all here. If you get real stuck, you can ask for help here or contact me on Gtalk [email protected].
So now your theme is done and your ready to make an update.zip for others to install your theme.
This must be done in LINUX! Not WINDOWS! Yes it may work for you if you do it in windows but other people's phones will enter an indefinite loop! Just do it from Linux! If you absolutely cannot make your own update.zip, contact me and we'll see if I can make one up for ya.
I have created a template for you to make your own update.zip. Just download, open in Linux, and add the system apps to app, and framework to framework. Zip it up, SIGN IT, TEST IT YOURSELF, and then distribute it!
Empty update.zip template: Http://www.FightForthePits.com/Androidstuff/update_empty.zip
If anyone has any questions please try asking for help in this thread before emailing me for help Usually I will respond to questions in this forum.
I hope this Tutorial has been helpful. I will add on to it as needed.
Stericson
Links of interest:
Downloading SDK: http://code.google.com/android/intro/installing.html
Using ADB: http://code.google.com/android/reference/adb.html
Working with ninepatch should be straightforward if you use the draw9patch tool included in the SDK. Documentation on usage here:
http://code.google.com/android/reference/draw9patch.html
JF could also save theme users a wipe by resigning /system/app/* and /system/framework/framework-res.apk in his builds with the test keys. Nice tutorial, btw.
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Stericson
Stericson said:
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
Click to expand...
Click to collapse
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Click to expand...
Click to collapse
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
thx stericson this will help big time how long before I can get resigned rc30 last night when you said all the apk. need to be resigned I was like this is going to be a long night but I see jf hooked you up save some big time with his resigning tool
jashsu said:
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
Click to expand...
Click to collapse
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Stericson said:
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Click to expand...
Click to collapse
The resigned apps have been released, each update file will resign all of apps in /system/app and framework-res.apk. However, these updates make no changes to them whatsoever...Meaning your phone will look just like a brand new phone without any modifications.
rc30 works thx Stericson made it easy for use
Issues with using the update.zip above
Hi all,
I just wanted to point out that after I applied the update.zip above and rebooted applications kept force closing randomly and constantly even through the initial setup (where you have to click the green android to start).
Prior to this, I had JF's RC30 1.3, and the engineering bootloader V2 no sigcheck.
First I did just a alt+s then a alt-w and alt+s. And still nothing.
I'm new to all this so I'm not even sure where to begin troubleshooting. Should I be using the HardSPL?
Thanks in advance and I appologize if this isn't the right place for this post.
Update:
After reflashing with JF's 1.3 RC30 and the problem persisted I noticed that there was a new release 1.31 and this has fixed the problem. I hope this helps anyone else who runs into the same problem.
I still don't know what went wrong though, can anyone shed some light on this? thanks.
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Stericson said:
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Click to expand...
Click to collapse
Hey, I tested it with this one:
Rc30 resigned: http://www.fightforthepits.com/Andro...pdate_Rc30.zip
Update went fine, until I booted back up then the applications kept force quitting, without me even doing anything.
Thanks,
Limitlis
yes there is a temp problem with those right this moment I am on the problem as we speak, expect a fix tonight...
Stericson
Can we get the fix cuz it bricking fone I had to flash rc29 nbh
Edit: I forgot please.... feel kinda rude when ur helping me out lol but it bricking some phones and for our less experince members we don't global meltdown lol
These files have been fixed and uploaded.
Stericson
I found the cyclon boot effect images in in framework-res/assets/images,
is there any way to replace the android boot image with those images?
Is there anyway to make the theme with a custom boot screen? Also is there a way to change the second boot screen(The one that says Android and has the little robot)
i tried using the testkeys from JF to resign my apks, but the update still says there is not signature =[
hello, I used the tutorial and everything worked great. I'm trying to change the background to the notification section but I can't find that file. Could you tell me where it is? Thank you.
hey stericson, how do u create a theme for rc33?

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.

[ATTN][DEV] VillainROM and Partners Presents VillainTheme System 0.3.5 [THEMERS ONLY]

VillainTheme System 0.3.5 for the TF101
http://www.villainrom.co.uk/forum/showthread.php/4971-About-VillainTheme-System
pulser_g2 said:
OK, so I think it's time to explain what this is about. It's born from the idea that came about on IRC, for a way to make a theme once for a ROM, rather than have to adjust it for each incremental update for a given ROM or ROMs.
As a user, you don't need to know much - just flash this zip like a regular zip, and you'll get your theme running. But you should be able to apply themes to any device, ROM, and version of the ROM, without it causing adverse effects. That means less time spent by themers making the original theme, and less time spent modifying it constantly for new versions of ROMs.
As a themer? Well, here is the information:
Inside the zip, in the vrtheme folder, you can create a folder called "system" and "data". The former is required, the latter is not required unless you wanted to theme a data app (strongly not recommended, unless you know the app will be there on every phone)
Inside the system or data folder, create a subfolder "app", and in these, make subfolders named EXACTLY after the APK name. For example, to theme the Browser, you need a folder called "Browser.apk". It must be correctly capitalised.
Within there, place the files you require for your theme, in the relevant locations. So most PNGs will be in res/drawable-hdpi/. You can put in xml files too (those which are not in resources.arsc), if you compile them via apktool, and extract them with a zip tool.
In the vrtheme folder, as well as system and data folder, one called "raw" can exist. Within here, you can place files to be copied verbatim to the ROM (for example, modified JAR files). Note that using this may make the theme device dependent (read WILL make it device dependent)
And that's about it.
Features
Will modify APKs in a ROM, without changing signatures, and can be used on any ROM where the filenames of themed files is the same.
Should not need updated between versions of a ROM
Zipaligns all APKs before installation
Stores a backup of all files being modified in /cache/vrtheme-backup/
Requires no coding abilities or editing of files - just drag and drop
Can copy "raw" files, though at risk of not working on other devices (well, let's face it, it won't work on likely a slightly different ROM, so this feature is not recommended or encouraged)
Credits
Doctorcete for the original idea in a discussion on IRC
Stericson for the original idea of metamorph. While totally different, it's a shared goal to separate themes from ROMs
Matt from the Metamorph team, for the zip binary compiled for Android
Seshy, for testing
EULA
Click to expand...
Click to collapse
Nothing evil or complicated - just a few little things. You should not charge for access to this code. That includes a zip containing this, or a derivative of it. So please don't sell themes using it. That's not particularly cool. If you want to use it commercially for some reason, get in touch with us.
If you spot a bug or error, and find a fix, please reply in this thread and let us know, or post the changes you made. If you're going to distribute the changed version, it is expected that you share the change made by contacting us, or posting it here.
Finally, don't be a douche - don't rip this off or call it your own, and leave all headers and comments identifying the origin of the code in place. Don't rename this to match your ROM or "team" name - it's not cool, and it's not yours to go and adjust. I chose to make this a readable "plain" script, but can easily obfuscate and encrypt it if you want to be a douche.
Copyright VillainROM (2011). All rights reserved
Click to expand...
Click to collapse
Now this project was created around the SGS2, and as such it did not work on the TF101 at first, however me and Pulser have spent the day looking for solutions and finally got it working for the TF101.
IMPORTANT: DO NOT USE THE SGS2 TEMPLATE FROM THE VILLAINROM WEBSITE.
Download:
0.3.6 experimental
Clean template without theme included: http://www.mediafire.com/?5bs9srz88i4wdq4
Asus Eee Pad TF101 VRTheme template: http://www.mediafire.com/?5gyr1g0xgd05t70
Note: for now the template is my windows phone 7 theme since it shows you where everything goes really well
If you find any issues or bugs PM me with as much info as you can and if possible a recovery log (found in /cache/recovery/) so I can try and find a solution to your problem.
Changelog
0.3.5
Fixed ASCII art in updater script.
Minor clean up of installtheme.sh
Added preview.png to template.
0.3.3
Modified installtheme.sh as it was giving possible problems.
0.3.2
Fixed a problem with raw folder copying. Put contents of /raw in /system now on the root of the .zip
Fixed some status 0 errors.
Currently known bugs:
You may have issues trying to flash framework files and app files in the same .zip (code 0 error).
Temporary solution: Flash the framework folder and the app folder in seperate .zip files.
hello,
is that you can see screen pls ?
And this theme is compatible with any rom ?
wallah said:
hello,
is that you can see screen pls ?
And this theme is compatible with any rom ?
Click to expand...
Click to collapse
If you had taken 3 seconds to read the post you would know it's not a theme.
This is for themers only.
yes I have read and I have not really understood ...
sorry I disturb
For any themers who want a better example of how it works, I just updated my own theme to use this method:
http://forum.xda-developers.com/showthread.php?t=1120525
Hey seshmaru,
This is definitely a great method! As soon as I get a chance, I will experiment with adapting PCB Blue to use the VillainROM theming method (with leaving all credit intact of course )
If someone wants to uninstall any themes applied this way, what would be the best method though? Just reflash their ROM?...(is what I'm thinking).
Thanks for working on this with the Villain Team, and if there's anything I can do (help/test/etc.), please don't hesitate to PM me.
Thanks again, and cheers for now!
scar45 said:
Hey seshmaru,
This is definitely a great method! As soon as I get a chance, I will experiment with adapting PCB Blue to use the VillainROM theming method (with leaving all credit intact of course )
If someone wants to uninstall any themes applied this way, what would be the best method though? Just reflash their ROM?...(is what I'm thinking).
Thanks for working on this with the Villain Team, and if there's anything I can do (help/test/etc.), please don't hesitate to PM me.
Thanks again, and cheers for now!
Click to expand...
Click to collapse
Well seeing as the current .zip makes a backup of the original files, in the future there will probably be a script made to restore the back up.
Till then the easiest way is to just reflash your ROM without a wipe or to reflash whatever theme you had before.
If you want to help with testing (constantly fixing things since pulser is away so it's my task to keep the SGS2 template and TF101 template as identical as possible) or have any questions you can pop by the VillainROM IRC since I'm generally in there.
Hmm... I can't quite figure out why, but it is not working right for me.. My framework-res.apk file is exactly the same after flashing....
I managed to do some debugging, and i found out that the file file is actually created, but it doesn't copy it over for some reason...
within the VRTheme folder (which i prevented from being deleted so i could check out the contents) the framework-res.apk file is in apply/system/framework/framework-res.apk...
So i tried editing the install script, all the way down at the bottom, and i changed the code from from cd /cache/vrtheme/apply/system/framework/aligned/ to cd /cache/vrtheme/apply/system/framework/ and it worked!
All i can guess is that the file isn't getting aligned for some reason, so that folder/file is never created, but the script is still calling for it...
Can you please let me know if my fix is acceptable, or if there is something off with it that can be fixed and would allow it to be aligned therefore creating the folder and the file?
-trailblazer101
I just want to confirm this. I made some xml edits for the framework, finsky, and gmail were I change the color of the text. Those are in the values folder in the colors.xml file. After you compile the apk you cannot see that folder so I am guessing that you cannot use this to flash that xml correct?
went toflash the theme i get error 0
MetAloid said:
went toflash the theme i get error 0
Click to expand...
Click to collapse
just try the new version now i get error 6
MetAloid said:
just try the new version now i get error 6
Click to expand...
Click to collapse
I got error 6 as well.
Error 6
I'm gettting same error ^ as cescribed by others.
I have been wanting to get into the Honeycomb theme arena and this looks like a good place to start, thanks for your work and I hope I can figure it out. Would it be ok to drop by IRC if I have any questions?
Hi all, just looking for confirmation that the VillainTheme flasher is able to apply .XML files (specifically in framework-res/drawable)?
Thanks in advance!
It should be able to, although it's had some issues at times.
Anyone getting status 6, try this new updated template: http://www.mediafire.com/?5bs9srz88i4wdq4
seshmaru said:
Anyone getting status 6, try this new updated template: http://www.mediafire.com/?5bs9srz88i4wdq4
Click to expand...
Click to collapse
That 0.3.6 template works for me
Regards, folgui.
I'm having a problem with Recovery giving "E:Error in... / Error 0" with my theme for the TF101 below.
Can someone please test it and report their findings? Note that you should do a Nandroid backup first!
Thanks in advance...
** EDIT ** - Found the problem and fixed it...sorry for the post!

[MOD] Remove Recent Apps from Notification Bar

I haven't seen this around, so I went ahead and made this for myself, and I decided to share it with anyone who wants it...
I hate the Recent Apps section of the Notification Bar Dropdown... so I removed it.
I wanted the Recent Apps to be removed without having to flash a complete ROM or use some theme.
1. Flash the attached file in CW Recovery
2. Clear Cache and Dalvik Cache
3. Reboot
4. Profit (It will remove the recent apps section)
There are no side-effects that I have noticed.
It was made from the SystemUI.apk from the stock US 2.3.4 Build, and should work on any 2.3.4 build for the Sensation.
There are no other changes in this from stock 2.3.4 besides removing the Recent Apps.
It will work alongside the Battery Mods I made with no issues... One mod does not affect the other.
Let me know if you have any issues.
As always, I'm not responsible if your phone breaks beyond repair and you lose all your data.
Thanks to j4n87 for the smali change required.
Work for me on EagleBlood rom.
It would be helpful.
NoRecents - installed with tiwili - take it, work it, leave it
Hi,
thanks for this mod. As always all actual modifications in existing SystemUI.apk are changed by this installation.
I took both of your modified files in my tiwili-installation method. So all other existing files in SystemUI.apk will rest in peace.
I publish it here because it´s your work, your files; It took 5 minutes for me, that´s nothing to be proud of...
Greets
idephili
So pretty much this needs root?
Sent from my HTC Sensation 4G using XDA App
thevietmonk said:
So pretty much this needs root?
Sent from my HTC Sensation 4G using XDA App
Click to expand...
Click to collapse
Absolutely. You can't push SystemUI.apk to the apps directory without root.
Thanks for this...finally I can remove it...just a small issue...where I am, there is no 4g network yet...however it is now showing 4g icon on the notification bar, anyway I can change it to 3g icon?
Sent from my HTC Sensation Z710e using xda premium
This will also remove the extended quick settings I had installed, flashed the EQS again though, no prob just thought I'd let ya know
Edit: Flashing EQS again, makes the recent apps come back..
ARHD 3.1.1
bigg8k said:
This will also remove the extended quick settings I had installed, flashed the EQS again though, no prob just thought I'd let ya know
Edit: Flashing EQS again, makes the recent apps come back..
ARHD 3.1.1
Click to expand...
Click to collapse
That's because both mods modify the same system file. You can only choose one or the other unless the EQS Dec decides to put this in his mod.
sorry.
No worries, thanks for the effort anyways
This does not work on 3.5 SENSE but thank you for your work
EQS-Mod + Recent App
Hey
What do i do if i want the Recent App, with EQS-Mod ?
thanks...... I'll try this app
If any of you want to do it youself.....
1.Pull Systemui.apk from system/app
2.Decompile SystemUI.apk
3.navigate to com/android/systemui/statusbar
3.open up StatusBarFlag.smali using notepad or notepad++ (recommended)
4.Around line 89 (using notepad++) you should see this:
Code:
sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
5. Change v0 to v2.
6. Recompile Systemui.apk and push via adb to system/app or copy to system/app using root explorer.
**NOTE**If using root explorer make sure to set permissions as Owner = Read/Write Group = Read Others = Read. A reboot will be required after pasting SystemUI.apk before you can change persmissions.
7. Reboot and your done!
same outcome for me with p3d had to reflash to get extended settings
I tried this but it appears to remove the entire header bar. That is, there was no pull down bar at all pushing it and rebooting. Any suggestions?
mfrost66 said:
I tried this but it appears to remove the entire header bar. That is, there was no pull down bar at all pushing it and rebooting. Any suggestions?
Click to expand...
Click to collapse
Sounds like you have decompiled SystemUI.apk incorrectly and then not signed it before pushing it. What method did you use for decompiling the APK?
I'm having some trouble with decompiling the SystemUI.apk. I get a bunch of "Invalid config flags detected" error when I try to load the com.htc.resources.apk framework; when I try to recompile I get a handful of other errors (related I'd imagine) and it doesn't recompile. Googled around a bit, found similar problems but no answers - any advice?
jimhart3000 said:
I'm having some trouble with decompiling the SystemUI.apk. I get a bunch of "Invalid config flags detected" error when I try to load the com.htc.resources.apk framework; when I try to recompile I get a handful of other errors (related I'd imagine) and it doesn't recompile. Googled around a bit, found similar problems but no answers - any advice?
Click to expand...
Click to collapse
How are you decompiling the apk...??
Didn't work. Edited what was suppose to be edited and the recent apps still show up....

Replacing framework-res.apk on Stock Android 4.1.1

Hi all -
I'm using a GSM Galaxy Nexus with stock Android 4.1.1, and I'm trying to reduce the dim level, which kills my eyes at night. This is determined by a value "config_screenBrightnessDim" found in framework-res.apk. (In the source tree, it is found at frameworks/base/core/res/res/values/config.xml.)
I tried using apktool to decompile/recompile the stock framework-res.apk, but it doesn't seem to work with Jelly Jean. So, I instead attempted to replace the stock framework-res.apk with one I compiled from AOSP. When I do this, I get stuck at the boot animation. I assume this has something to do with the fact that my AOSP framework-res.apk is signed with a different certificate than the stock one. However, I also noticed that my AOSP file was ~10MB, while the stock one is only ~9.8MB, so there could be some other issue.
Any help with this would be greatly appreciated. Thanks!
(PS: Another modification I made was successful: I replaced the stock audio.primary.tuna.so with one I built from AOSP with a higher maximum volume. So, I think I am at least replacing the files correctly!)
Don't sign the framework file. Leave it unsigned and just move the cert from the stock framework. Also I would be interested in your audio boost file if you wouldn't mind sharing.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks for the advice –*I'll try it out. I'll "unsign" my framework-res.apk by removing all the META-INF files in it. If it doesn't work, do you know a way to find the logs from the failed boot? Also, is there anything I should do (wipe cache, etc) after copying over the new framework-res.apk?
I've attached a zip containing three versions of the library audio.primary.tuna.so, found at /system/lib/hw/audio.primary.tuna.so: orig, loud, and aosp. "orig" was pulled from my phone with stock 4.1.1, "aosp" was built from aosp (the command you need is "make audio.primary.tuna"), and "loud" was made from aosp with the "device/samsung/tuna/audio/audio_hw.c" file altered to change the volume. Enjoy!
Geo411m said:
Don't sign the framework file. Leave it unsigned and just move the cert from the stock framework. Also I would be interested in your audio boost file if you wouldn't mind sharing.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
This worked! Thanks so much!
Great! Glad it worked for you. Also thanks for the Audio file.
How do you build just framework-res.apk from AOSP?
I've followed a tutorial and built the whole system, but I don't know where fraemwork-res.apk is built from in the source or how to only build it.
Edit:
figured out to build specific packages:
make (package name)
...omg
If you figure out how to use a framework-res.apk built from AOSP to replace one on the stock rom, let me know. I never did get that method to work.
michaelmotes said:
How do you build just framework-res.apk from AOSP?
I've followed a tutorial and built the whole system, but I don't know where fraemwork-res.apk is built from in the source or how to only build it.
Edit:
figured out to build specific packages:
make (package name)
...omg
Click to expand...
Click to collapse
There are some (most) things that you can modify in framework-res.apk and just copy over the old META-INF.
There are some things (like AndroidManifest.xml) that you can not modify and use the old META-INF.
The most radical solution is to resign your entire system with a new signature.
If the particular APK (not FW-R) does not use a sharedid, you might get away with just signing that.
(The above observations might be different on different versions Android.)

Categories

Resources