recompiling errors... please help - Samsung Infuse 4G

i tryed to decompile and modify 2.3.6 and make it have a epm, and i finished the coding and what not just having problems recompiling it, here is a youtube video i made with the errors im getting im using nuns apk tool
http://www.youtube.com/watch?v=v6_gAI6jZeg

The second error, the out folder, looks to me like a .9 issue. That's what happens when you mess up a .9 image by having a color other than black in the one pixel border. A for the other errors, not sure there. Could be an issue with your edit. Have you retired to recompile with no edits. Just to see if it works. If I suspect it to be a tool issue rather than user error, I will do a fresh recompile, then immediately recompile. Our it does not recompile, then its a tool/framework issue. Is it does, then its user error, usually in your edits.

NunHugger said:
The second error, the out folder, looks to me like a .9 issue. That's what happens when you mess up a .9 image by having a color other than black in the one pixel border. A for the other errors, not sure there. Could be an issue with your edit. Have you retired to recompile with no edits. Just to see if it works. If I suspect it to be a tool issue rather than user error, I will do a fresh recompile, then immediately recompile. Our it does not recompile, then its a tool/framework issue. Is it does, then its user error, usually in your edits.
Click to expand...
Click to collapse
Ok thx will look into it, though I may not have the same problem being that my computer died a few days ago, got parts coming in tomorrow to build a new one, so will definitely try it out again
Sent from my SGH-I997 using xda premium

Related

[Q] Metamorphing Rubix 1.0

So last night, I was fiddling with Metamorph trying to change the battery indicator in Rubix 1.0. Very simple change as it's only 11 .png's, but on reboot the theme had applied, but everything was force closing. I have to assume it's a signature/permissions issue, but I never had this problem at all with any of the theming on my Eris.
My question is if this is a DX specific problem or a Rubix specific issue? Since Nand restores don't seem to work correctly with Rubix, I don't really care to experiment anymore with it, so any input would be nice.
What do the experts think is going on here? Am I just an idiot, or is this phone truly the spawn of the devil?
I used ninja morph to do the same thing. I haven't had any problems. It sticks. It takes longer. But I couldn't figure out meta morph.
Would you mind writing a short tutorial on the meta morph process?
I examined a theme that Fabulous created and tried altering his xml file for my theme but got an error from meta morph.
Sent from my DROIDX using XDA App
I'll give ninja a try, but I'll be damned if I want to reflash this thing if it hoses up again.
There's a great tutorial on how to Metamorph HERE.
I've found that editing the xml's of other themes usually confuses the app and causes an error when you try to unzip. I think it's a name mismatch thing or something. You can manually unzip it and then just use "Apply Existing". This has always worked for me.
Update on the NinjaMorph approach, it still causes everything to Force Close. I swear this phone is evil.
I don't know how you did it, but this is making me an angry person.
erishasnobattery said:
Update on the NinjaMorph approach, it still causes everything to Force Close. I swear this phone is evil.
I don't know how you did it, but this is making me an angry person.
Click to expand...
Click to collapse
I really don't know much about theming, and even less about metamorph. I stumbled through using Ninjamorph to replace the drop down notification panel (wanted transparent) and it worked just fine on Rubix 1.0
That's all I've tried to do though.
erishasnobattery said:
I'll give ninja a try, but I'll be damned if I want to reflash this thing if it hoses up again.
There's a great tutorial on how to Metamorph HERE.
I've found that editing the xml's of other themes usually confuses the app and causes an error when you try to unzip. I think it's a name mismatch thing or something. You can manually unzip it and then just use "Apply Existing". This has always worked for me.
Click to expand...
Click to collapse
Make a nandroid backup. If anything goes wrong, just to an advanced restore of /system only. You'll be back up and running within 5 minutes.
Sent from my DROIDX using Tapatalk
Zaphod-Beeblebrox said:
I really don't know much about theming, and even less about metamorph. I stumbled through using Ninjamorph to replace the drop down notification panel (wanted transparent) and it worked just fine on Rubix 1.0
That's all I've tried to do though.
Click to expand...
Click to collapse
Yeah, I was able to replace the pull-down as well, but anything in the status bar itself is causing nightmares, I don't know why, as it's the same .apk. Got me. I'll fiddle.
Man- I am sorry about that bro. Ninja morph was all good for me. Didn't cause any problems. I guess I should have issued that standard...
"I take no responsibility blah blah blah..."
Hope I didn't cause you to much grief. I wonder why it would work for some and not for others? I used the original images from rubix1 framework-res. Is that where you said you pulled your images from?
Just curious.
thepolishguy said:
Man- I am sorry about that bro. Ninja morph was all good for me. Didn't cause any problems. I guess I should have issued that standard...
"I take no responsibility blah blah blah..."
Hope I didn't cause you to much grief. I wonder why it would work for some and not for others? I used the original images from rubix1 framework-res. Is that where you said you pulled your images from?
Just curious.
Click to expand...
Click to collapse
They were actually from Incognito, which I can flash over Rubix with no issues, but I'm not a fan of the whole theme, just a few of the icons and what not. I'm bored at work today, so I'll just continue trying to screw it up until it works.
I edit the framework-res on most ROMs I use as I like the round clock myself. That said I've found the best wya to cause the least headaches is to pull the framework-res.apk from the ROM you are going to install. Then using 7-zip open the framewor-res.apk ( don't extract or decomplie it) and just drop the *.png's files in the /res/drawable-hdpi folder. Once done closeout of 7-zip. Then double click in the *.zip of the ROM I'm going to use and drop the now edited framework-res.apk into the frameowrk folder the ROM. All said and done put the updated/edited ROM on the sdcard of the device and away you go to install it.
Example currently I'm running a mix of Tranqulitiy 2.3.8a along with the Incognito theme in orange and a modified framerwork-res.apk. Most of the framework is still P3's stuff but I put the round clock in his framework-res along with all the edited files from the Orange frameowrk-res.apk of the Incognito theme so it matches.

Modifying framework-res in CM6.1 RC1 causing massive force closes

I modified the graphics for notification tray power widget to not look so.. bland.
They were all regular PNGs except for the on/off graphic which I handled as a .9.png. I started off by pulling the apk from my phone via ADB, decompiled it via APK manager, put in my modified graphics, and then used APK Manager to recompile, sign, repush the APK. I've done this in HTC ROMs before without any problems but with CM6.1 I'm getting mass force closes, can't really do much unless I push back the original APK. I'm not sure what's wrong, the modified graphics are there and look good but something is wrecking havoc.
don't resign it. that usually is what causes the problems skip that step and see if it works
saf100792 said:
don't resign it. that usually is what causes the problems skip that step and see if it works
Click to expand...
Click to collapse
Just as I expected: boot loop.
Hmmm... I have no idea what's causing the force closes..
Thats weird i just modified mine to give it a clear taskbar. i used winrar but i didn't recompile or sign the apk just extracted the images,edited them, and then pushed em back in the apk.
saf100792 said:
Thats weird i just modified mine to give it a clear taskbar. i used winrar but i didn't recompile or sign the apk just extracted the images,edited them, and then pushed em back in the apk.
Click to expand...
Click to collapse
So you just dragged and dropped the graphics into winrar/apk replacing the old files?
yup everything worked fine
saf100792 said:
yup everything worked fine
Click to expand...
Click to collapse
Thanks. I just nandroid'd back to CM6.0 stable, got to go out but will try this when I get back. I'll probably post it up if it works. Very minor tweaks but still better.

Theming GB NewsWidget.APK Issues

In my opinion the orange on the Blur News Widget looks very odd against the blue Gingerbread notification bar.
So I thought I could take it upon myself to change that, and in my attempt to change the color I always run into the same issue, the issue "stretch" correctly.
I did the following:
1. Pulled the APK from my DROID X
2. unzipped it with APK Manager
3. Made my changes to the specific images
4. Edited it with draw9patch (Tried NOT doing this also)
5. Zipped the APK.
6. ADB push NewsWidget.APK /system/app/NewsWidget.apk
Any help is appreciated, thanks.
Sent from my DROIDX using XDA App
Bump
Sent from my DROIDX using XDA App
Ok... post a screenshot of what went wrong and post the file of the original one and the edited one and we'll fool around with it
Sent from my DROID2 using XDA App
Thanks!
I hope these files are sufficient.
So you just want to change that top bar on the widget or the whole widget... and what files have you been changing?
Sent from my DROID2 using XDA App
ljbaumer said:
So you just want to change that top bar on the widget or the whole widget... and what files have you been changing?
Sent from my DROID2 using XDA App
Click to expand...
Click to collapse
Just the top bar on the widget.
I edited orange_sleeve_horiz.9.png, and orange_sleeve_vert.9.png.
I tried editing both in draw9patch, to no avail.
I hope someone can figure this out soon. I'm still having no luck >_<
Sent from my DROIDX using XDA App
i dont understand exactly what youre trying to do, is the second (orange) version what you want?
oceanxblake said:
i dont understand exactly what youre trying to do, is the second (orange) version what you want?
Click to expand...
Click to collapse
I want the image in the blue version to stretch correctly, as the orange image does.
Sent from my DROIDX using XDA App
infazzdar said:
Thanks!
I hope these files are sufficient.
Click to expand...
Click to collapse
I can tell by looking at your edited pngs that you only passed them through drawpatch9 and didn't run them through eclipse or xUltimate afterward, that's why they are not stretching properly; I also noticed that you didn't properly draw the lines on the vertical png because it was giving errors.
Try this: http://www.mediafire.com/?a5soknd0381k1xp
Hopefully it works like you want
I can't test it out because I am running ApeX 2.0 Alpha 2, and the NewsWidget doesn't work (most likely missing other apks that NewsWidget requires to work properly).
bouchigo said:
I can tell by looking at your edited pngs that you only passed them through drawpatch9 and didn't run them through eclipse or xUltimate afterward, that's why they are not stretching properly; I also noticed that you didn't properly draw the lines on the vertical png because it was giving errors.
Try this: http://www.mediafire.com/?a5soknd0381k1xp
Hopefully it works like you want
I can't test it out because I am running ApeX 2.0 Alpha 2, and the NewsWidget doesn't work on (most likely missing other apks that NewsWidget requires to work properly).
Click to expand...
Click to collapse
beat me to it.
and yeah i dunno wtf happened with the vert png, error error error. odd. if i were you infa i would scrap, re-adjust, re-color, and run through eclipse post 9patch. ive had recompiling issues when i dont run through eclipse as well.
bouchigo said:
I can tell by looking at your edited pngs that you only passed them through drawpatch9 and didn't run them through eclipse or xUltimate afterward, that's why they are not stretching properly; I also noticed that you didn't properly draw the lines on the vertical png because it was giving errors.
Try this: http://www.mediafire.com/?a5soknd0381k1xp
Hopefully it works like you want
I can't test it out because I am running ApeX 2.0 Alpha 2, and the NewsWidget doesn't work (most likely missing other apks that NewsWidget requires to work properly).
Click to expand...
Click to collapse
Thanks! The image looks great!
The only issue with it now is that RSS icon and the 'widget name' displays incorrectly.
Also, would you mind explaining what Eclipse and xUltimate has to do with it, for my own future reference? ^_^
P.S. Thanks so much =D
Modified newswidget.apk
I also ran into the initial problem of the stretching. After I fixed that, I also noticed the position settings of the RSS Icon and "News" word to be out of place.
So I thought it was something I had messed up. I restored the original newswidget.apk and everything was fixed (except I was back to the orange bars).
I borrowed the modified apk from bouchigo, removed the files
orange_sleeve_horiz.9.png
orange_sleeve_vert.9.png
and I used Ninjamorph to put them into the stock newswidget.apk. And even then I had the same problem of offset RSS icon and "news".
I also used bouchigo's newswidget.apk as a whole but even that had the same RSS / "News" offset issue.
Sorry to bring up a slightly older thread.
Running Stock / deodexed / rooted .596
Eesu said:
I also ran into the initial problem of the stretching. After I fixed that, I also noticed the position settings of the RSS Icon and "News" word to be out of place.
So I thought it was something I had messed up. I restored the original newswidget.apk and everything was fixed (except I was back to the orange bars).
I borrowed the modified apk from bouchigo, removed the files
orange_sleeve_horiz.9.png
orange_sleeve_vert.9.png
and I used Ninjamorph to put them into the stock newswidget.apk. And even then I had the same problem of offset RSS icon and "news".
I also used bouchigo's newswidget.apk as a whole but even that had the same RSS / "News" offset issue.
Sorry to bring up a slightly older thread.
Running Stock / deodexed / rooted .596
Click to expand...
Click to collapse
Tis an old thread =P But since then I have been able to theme the NewsWidget apk myself while keeping the two icons in place.
I can post the themed apk back if you would like it?
Sent from my DROIDX using XDA App
That would be greatly appreciated. I would probably figure it out here soon. I have only been rooted for a few days now. Could you also please let me know what the issue was? So I know for the future. Thanks.
Eesu said:
That would be greatly appreciated. I would probably figure it out here soon. I have only been rooted for a few days now. Could you also please let me know what the issue was? So I know for the future. Thanks.
Click to expand...
Click to collapse
Here it is, along with a screenshot:
To install adb push the NewsWidget.apk to /system/app/NewsWidget.apk
Code:
adb push NewsWidgetBLUE.apk /system/app/NewsWidget.apk
if you get an error about read/write permissions then use:
Code:
adb remount
In later time I will open a new NewsWidget themeing thread and also upload a flashable zip.
The issue, I believe, is that when running the image through Draw9Patch the bottom border wasn't drawn correctly, which forced the RSS icon and name space to be pushed to the side.
Also, instead on simply unzipping the apk, I decompiled it and made my edits. Which fixed the issues I was having.

Un-modifiable APKs???

So i keep running into this problem when trying to theme certain user apps! I'm trying to theme all the apps that i use on my home screen and some of them -particularly 'Root Explorer' and 'HomeSmack' right now, break every time I try to mod them. At this point i'll settle for just the launcher icon but how? I've tried decompiling, modding, recompiling, replacing the META-INF, and then signing with 'test keys ....doesn't work! ...actually had problems decompiling.
But next I tried just pulling the icon I mostly wanted, nodded, replaced, then signed with test keys. This usually works but but with these two, I do not. Either I get a parsing error saying that its not signed ...or I get it on my phone. But it won't open.
I figure its cuz its signed with private keys but there must be a way to fix this.
Note: I also tried not signing it at all and 'pushing' to /system/app/ bit it won't open or show in my drawer (or anywhere)
Sent from my ADR6400L using XDA App
Have you tried using APKtool? It helped me with those issues.
CleveRuse said:
So i keep running into this problem when trying to theme certain user apps! I'm trying to theme all the apps that i use on my home screen and some of them -particularly 'Root Explorer' and 'HomeSmack' right now, break every time I try to mod them. At this point i'll settle for just the launcher icon but how? I've tried decompiling, modding, recompiling, replacing the META-INF, and then signing with 'test keys ....doesn't work! ...actually had problems decompiling.
But next I tried just pulling the icon I mostly wanted, nodded, replaced, then signed with test keys. This usually works but but with these two, I do not. Either I get a parsing error saying that its not signed ...or I get it on my phone. But it won't open.
I figure its cuz its signed with private keys but there must be a way to fix this.
Note: I also tried not signing it at all and 'pushing' to /system/app/ bit it won't open or show in my drawer (or anywhere)
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
If its just the icon for the app on the home screen you are trying to change, then why not just use Desktop Visualizer instead of modifying the apk. Just a thought.
No, its a good thought. I new there was an app for that, cuz I thought I had heard of people doin that ...so that's prolly wut I'll do so my OCD will subside ....but still, the APKs r for a theme I have released already and i'd like to include them , plus I'd rather theme the whole thing if possible ...plus I wanna know.
But yeah, Thnx for that! I'll try now
Sent from my ADR6400L using XDA App
Indirect said:
Have you tried using APKtool? It helped me with those issues.
Click to expand...
Click to collapse
U mean for decompiling n recompiling? Yeah ....well I think that's all there is for that ...right? I mean, I know it can be used seperately, but all those like 'APK Manager' and 'Android Utility' use in in their programs. So no, not as a standalone thru the command line ...but thru an app; yes ...3 different previous versions and the new one compiled from source.
Sent from my ADR6400L using XDA App
I have themed Root explorer before. You need to delete the framework files prior to decoding (at least I did).
Then recompile. Then sign (test keys are fine).
1.apk and 2.apk are located in $HOME/apktool/
Delete those (you can always reinstall with "apktool if name.apk" or using Android-utility.
Ooooooh, ok T, I should just keep u on retainer .....well, I guess I already do, huh ...lol!

[HOW-TO]Successfully decompile and compile com.htc.resources.apk

This guide assumes you already know how to use apktool and use latest 1.52 version. If you don`t, there are plenty of guides already on XDA.
Latest Sense 5 com.htc.resources.apk and apktool are not great friends. Actually there is a long history of compile issues with this file, but also I managed to fix it usually in the past. I stumbled about some theme threads, who were correctly complaining, that they can`t fully finish their work, since many essentially stuff in HTC`s framework can`t be themed, since com.htc.resources.apk can`t be compiled and as a result many color themes remain incomplete.
So I had a quick look and here is the workaround, which is tested and works.
For those having other apktool issues, it also might pay off looking in my One S apktool issues thread, maybe you will find some ideas to solve other problems.
http://forum.xda-developers.com/showthread.php?t=1642224
Credits:
brut for his awesome apktool
hdneuling for being a great tester and guy
1. First thing you will recognize, when decompiling the "nice" way, apktool will miserably fail. So let`s be the bad guy and brute force decompile
2. Decompile com.htc.resources apk with the following:
PHP:
java -jar apktool.jar d --keep-broken-res com.htc.resources.apk com.htc.resources-decoded
This ignores all errors and decompiles the apk
3. Since the real issues here in reality are only very minor dimens decompile problems, you can now simply delete all unneeded folders with an ERR at the end.
4. Make all necessary edits
5. Now compile the apk as usual, there are different ways to do it - I compile with
PHP:
java -jar apktool.jar b com.htc.resources-decoded
6. Flash and enjoy your work
Good job
Had to look into it, Helmut was desperate
Great Job, and o.k., feeling guilty now :silly:
LG, Helmut
One thing we noticed when putting together our tranquility rom was that any com.htc.resources, sense 4 and after, was that even when it could be decompiled it was better to hex edit. It caused issues with the rom. The dialer and battery life were affected. There were other performance issues also.
Sent from my HTC6435LVW using xda premium
fernando sor said:
One thing we noticed when putting together our tranquility rom was that any com.htc.resources, sense 4 and after, was that even when it could be decompiled it was better to hex edit. It caused issues with the rom. The dialer and battery life were affected. There were other performance issues also.
Sent from my HTC6435LVW using xda premium
Click to expand...
Click to collapse
Yep font size was stuck at medium aswell no matter what we set it to
i´m running a pretty heavy edited com.htc.resources.apk on my One since yesterday and didnt notice and afaik he_stheone did the same since yesterday.
Of course we have to have a look at "maybe problems", but it´s good to have a solution to de/compile it now i think
LG, Helmut
fernando sor said:
One thing we noticed when putting together our tranquility rom was that any com.htc.resources, sense 4 and after, was that even when it could be decompiled it was better to hex edit. It caused issues with the rom. The dialer and battery life were affected. There were other performance issues also.
Sent from my HTC6435LVW using xda premium
Click to expand...
Click to collapse
Hi Fernando, we will watch behavior going forward on Sense 5. So far we still could not find negative side effects. But we surely keep an eye on it.
Sent from my HTC ONE - powered by TrickDroid
Nice work, thanks for sharing. Have to say, you and Helm are really blazing the way with One theming!
Did try this approach with the Sense4.5 resources, could never get the apk to compile after deleting the _ERR folders, but I'll definitely give it a try with Sense5
Fisha, where are you?
We need your skills on the One :fingers-crossed:
LG, Helmut
hd2neuling said:
Fisha, where are you?
We need your skills on the One :fingers-crossed:
LG, Helmut
Click to expand...
Click to collapse
Nah, you guys are doing a great job. I'm enjoying just being a user for now
he_stheone64 said:
Hi Fernando, we will watch behavior going forward on Sense 5. So far we still could not find negative side effects. But we surely keep an eye on it.
Sent from my HTC ONE - powered by TrickDroid
Click to expand...
Click to collapse
Haha yes those of you lucky enough to have the phone! 8 days for me.
Sent from my HTC6435LVW using xda premium
Small Update:
Was running 4 different edited versions com.htc.resouces.apk, until yet, and no problems noticed, of course i´m still watching on it :fingers-crossed:
LG, Helmut
hd2neuling said:
Small Update:
Was running 4 different edited versions com.htc.resouces.apk, until yet, and no problems noticed, of course i´m still watching on it :fingers-crossed:
LG, Helmut
Click to expand...
Click to collapse
That's awesome. Hex editing is not as fun.
Sent from my HTC6435LVW using xda premium
First off, Nice find!! So far the only ill effect I'm noticing is the fonts in settings/display, gestures and buttons doesn't function properly. it changes the font size in certain areas but not system wide like it should. this is the same error we had before, and maybe its because im using the port rom for Evo LTE. I'm looking into it but we couldn't find a resolve for this before.
double post.
steal25 said:
First off, Nice find!! So far the only ill effect I'm noticing is the fonts in settings/display, gestures and buttons doesn't function properly. it changes the font size in certain areas but not system wide like it should. this is the same error we had before, and maybe its because im using the port rom for Evo LTE. I'm looking into it but we couldn't find a resolve for this before.
Click to expand...
Click to collapse
Just to confirm, this is also the case on the One ROMs themselves as well, not just limited to ports.
To see it clearly, just go into Settings/Display, Gestures and Buttons, and try flicking between small and extra large fonts. When you go back out into the main Settings menu, the font size doesn't change as expected.
Did try to get around this by compiling the images, and dragging them into the stock resources apk. If you do this without renaming some of the 9.pngs back into r.9.pngs, you get SysUI FC, and a messed up lockscreen. With those corrections made, everything boots fine, but Dialer FCs and several Settings menu options also FC.
Next thing to try is using villaintheme to insert the altered pngs directly on-device....
Edit: yup, using villaintheme seems to give the best result. No app FCs and no text resizing issue. Just means we still need to hex edit to change any of the values xmls.
At least the recompile workaround gives us a way to easily test resource edits. Thanks again for the heads up!
fisha21 said:
Just to confirm, this is also the case on the One ROMs themselves as well, not just limited to ports.
To see it clearly, just go into Settings/Display, Gestures and Buttons, and try flicking between small and extra large fonts. When you go back out into the main Settings menu, the font size doesn't change as expected.
Did try to get around this by compiling the images, and dragging them into the stock resources apk. If you do this without renaming some of the 9.pngs back into r.9.pngs, you get SysUI FC, and a messed up lockscreen. With those corrections made, everything boots fine, but Dialer FCs and several Settings menu options also FC.
Next thing to try is using villaintheme to insert the altered pngs directly on-device....
Edit: yup, using villaintheme seems to give the best result. No app FCs and no text resizing issue. Just means we still need to hex edit to change any of the values xmls.
At least the recompile workaround gives us a way to easily test resource edits. Thanks again for the heads up!
Click to expand...
Click to collapse
no problem, Ive dug in settings and com.htc.resources and see no link in the two. Not arrays, dimens, nothing. all the arrays and sizes for the different fonts are in settings so i dont understand why that would be affected. If i find afix/workaraound ill post it here.
Noticed the fontsize-problem before de/compiling com.htc.resources.apk too, dont know if it works on Stock because i never booted Stock ^^
Besides this, my edited com.htc.resources.apks are still working without problems, even with ROMs based on 1.29.401.1/2
LG, Helmut
This will no doubt come in handy. Thanks
Sent from my HTC One using Tapatalk 2

Categories

Resources