Strange problems with framework-res.apk - Android

I am currently working with AOSP 2.3 for the Mytouch4G, and everytime I repack framework-res.apk, I get FC's all over and strange graphics glitches (screenshots below). This happens even if I don't edit any files or add/remove anything. I could literally just unpack the regular framework-res.apk, repack it just the same, and still get this problem. I am using apktool to pack/unpack it, and I've tried on both windows and linux, it's the same thing either way. It also causes several programs to FC on opening, and I can't access half of my settings. Once again, this is even when I change/edit/add/remove NOTHING. Has anyone seen anything like this before, or does anyone know what I can do to resolve this? I can't really do too much work if I can't edit this file.
http://img205.imageshack.us/i/device1y.png/
http://img815.imageshack.us/i/device2j.png/
UPDATE: Nevermind, much easier just rebuilding from source with the edited files.

Related

Compile SystemUi.apk / framework-res.apk

Sorry, but I have to do this here, i tried so many things, so many guides, asked people and still...
It doesn't work.... even if I dont change anything
Simple question, I am using apk manager, de/compiling does not show any errors but the apks wont run properly (other apks running smooth, of course with the right options selected)
framework-res.apk
SystemUi.apk
Both on Villain 2.0. I really dont know, tried with dependencies, without, normal, as system app .... and after maybe 50 times compiling I cant anymore...
Thanks in Advance

A primer for modifying framework-res.apk?

I've been trying to make a couple of modifications to framework-res.apk and I've been having a lot of trouble. I've bootlooped the DX2 more than a few times (and was able to recover with the recently released SBF).
I've tried making one change, I've tried signing the file, I've tried not signing it, I've tried different compression levels on the zip, all with no luck. The one time I got my apk into the phone with my change on board (I verified that it was there) my change was ignored by the phone. (I've been trying to replace /res/drawable-hdp/zz_moto_list_texture_bg.png to change the default list background from the light gray to black.)
Has anyone been successful making modifications to this file in a DX2? If so, how did you do it?
What did program did you zip it with?
What was the compression set to?
Did you sign the file? If so, with what program and key?
What method did you use to drop framework-res.apk back into the phone?
Are there any files that should not be modified? (I've heard to leave the ".9" files alone.)
Thanks,
Chris
I've been trying to do the exact same thing and haven't got too far. I'm doing dev stuff thru Ubuntu and it seems to be very friendly along with gimp. I've actually been able to drag and drop replacement files without extracting the apk but haven't been able to flash it inside a theme. I haven't actually tried just replacing the framework.
Staying tuned...
Sent from my DROID X2 using XDA App
You can make a theme at uot.dakra.lt and flash the .zip file to your phone.. jus upload your framework-res.apk to the site once you make it, but anyway, they modify the file and it worked for me.
Peperm1nt said:
You can make a theme at uot.dakra.lt and flash the .zip file to your phone.. jus upload your framework-res.apk to the site once you make it, but anyway, they modify the file and it worked for me.
Click to expand...
Click to collapse
Yes I've been using this but it's not really set up for blur. we're talking about going deeper than UOT can reach with current software.
Sent from my DROID X2 using XDA App
You can recompile and decompile with apkmanager, but its not without some hiccups. First, it compresses the resources.arsc which unlike the rest of the apk needs to be decompressed. To fix this I pull it out then with 7zip I add it back to the framework-res archive with zip as the format and store as compression. That fixes the boot-loops. Even after that there's been some minor problems with it recompiling certain .xml a little goofy.
But at least it doesnt cause a boot loop.

Editing .smali files??

Im trying to teach myself here and actually reading unlike others at times, but What my GOAL: is to remove the GPS icon in my ROM when it is not active. I may be wrong so please correct me if I am...
I started with "APKtool" to decompile my "systemUI.apk" I then edited "HtcCdmaStatusBar.smali" located in "com/android/systemui/statusbar/policy"
I ran into a problem with compiling it back together with errors (after trying for hours to find my mistake) I moved on to...
"APK-Manager"
Again following instructions I decompiled "systemUI.apk" using "com.htc.resources.apk" as well since its a system file..
It seems to have worked, it said to delete whatever I modified in the "keep" folder well the ".smali" files don't appear only XML and system images but I went ahead and tried to take that "SystemUI.apk" that I recompiled with the edited files and dropped it in my phone via root manager
(well yea that didnt seem to work)
I moved on to this link http://forum.xda-developers.com/showthread.php?t=549309
I used it as a reference to edit the files I wanted to and not the the ones that were on the guide. well I had no errors and I and did everthing correctly, as i thought and the finally step I pushed the "SystemUI.apk" via adb and then rebooted
That resulted in a force close on my "status bar" i believe it said when I booted it up, after i cleared the force close my phone worked fine except the fact I had NO TASKBAR what so ever...
I am running "Showdown 1.0'
http://forum.xda-developers.com/showthread.php?t=1209777
Like always, Thanks for any help or ideas in advanced....
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
Where did the thread go? Dont see it in Q &A forum??? Having the same problem
I was JUST having a very similar issue.. I was trying to decompile and recompile rosie but it kept giving me errors. Someone said try apkmanager 4.9 (I was using 5) and my problems went away. Also I noticed if you are using a file that has already been modified apkmanager didnt seem to like that. I had to take a stock one, make the xml changes, build it then replace whatever images I had replaced in the original
and now I cant get the ***** to build right. I'm not trying to mod it so the pull down notification bar is semi-transparent but it wont build correctly
pastebin of my apkmanager log file http://pastebin.com/uZ8JacJL

Framework-res always displays glitches

I tried to decompile, modify 1 xml file and recompile the framework-res.apk.
But everytime I do it, I either get into a boot loop, or when In succeed it displays glitches (like notification bar, and messed up lock screen, and settings)
This is for AURORA ICS 4.0.3 and I do have the latest aapt.exe file .. so I don't know what is wrong!
I tried to use the original framework-res but replace the resources file inside, stored and compressed methods.
Tried to get the compiled framework-res but add the META-INF and Manifest file (again, both with compressed and stored resources file) and always.. it just glitches or bootloops.. and the mod that I tried (ICS on screen buttons or the CRT effect when you switch off the screen, mainly used in Oxygen roms, but it's available in all ROMs).. it never works.. only glitches the lock screen, notification bar etc..
Any help?
Thanks.
I might know the answer to this..
Which files are you modifying in framework-res? And how are you pushing it back to your phone?
Sent from my U20i using xda premium
Would be great
I am modifying some files in the values folder, bools.xml, arrays.xml .. but even if I edit bools.xml alone, it still glitches.
To push it back: I go to recovery mode on my phone, plug it into my linux machine (the system partition mounts), paste the new framework-res.apk to replace the old one, fix permissions (otherwise it boot loops), and restart the phone. This method works for other files and never had any problems, like the android.policy.jar
Would be great if you can help me. Thanks
Well, the XML files you're editing are all part of resources.arsc so it's something to do with that which is causing the problem. I used to get all sorts of annoying bugs when I edited anything in resources.arsc and I eventually found out that I was pushing the final apk back to the phone incorrectly.
I use a Windows PC, not Linux, so I might not be that helpful but this is what I do to modify and replace framework-res.apk. Hopefully it'll help. What I do is..
Decompile framework-res.apk
Make my changes
Recompile the file
Use a program like 7zip to open the old and the new files
Drag and drop the "res" folder from the new file into the old
Extract resources.arsc from the new framework-res.apk and add it to the old one in "STORE" mode, so it's not actually compressed
Go into recovery, mount the system partition and push the old file
..and that's it. Works a charm every time.
I would have thought that you would need to do the same thing on Linux but with the additional step of correcting the permissions. If you do all that and it still doesn't work, then there has to be a problem with the actual mod you're trying to do.
Thank you very much, I actually tried that method. It sort of worked, but everytime it breaks the notification bar. It becomes like double the size and I'm not sure why.
Thanks.
Then the issue must be with the modification itself. What exactly are you changing to what?
Sent from my U20i using xda premium
I tried different ones.. but even a simple one.. enable CRT animation.. which is pretty much open bools.xml and edit one true to false.. it breaks it :/

Please Help. I can't figure out what's wrong.

So, I downloaded the app I'd like to mod. I unpack it and then go through the meticulous process of replacing all the images to change the overall look. I have done texture work, I understand what I'm doing with this simple program. However, when I rezip all the files into an apk, it won't install. None of the code has been edited, just graphical changes and it won't work.
I have no idea what I'm doing wrong.
@ChronicNeo
Use APK Editor. This always worked for me.

Categories

Resources