Go Back   Android Forums > Android Phones > Samsung Transform Ultra > Transform Ultra - All Things Root

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old May 5th, 2013, 01:27 AM   #1 (permalink)
Senior Member
Thread Author (OP)
 
xaelith's Avatar
 
Join Date: May 2012
Location: Utah
Gender: Male
Posts: 534
 
Device(s): Sprint Note 3 (Black)
Carrier: Sprint

Thanks: 210
Thanked 277 Times in 181 Posts
Default Strange APK recompiling issue

Hey all. Having a little issue recompiling an APK, and thought I would see if anyone had any other suggestions beyond the irksome workaround I'm currently using.

Anyway, here's the situation: I'm working on a minor update to my theme, currently working with the SystemUI.apk. I decompiled the file, made the changes I wanted to, and am now trying to button things up. One of the things I changed was I .9'ed a background image. Here's the problem: when I try to recompile, APK Multi-tool loses its breakfast, lunch and dinner for the last three weeks, and spews out a huge list of errors (400+). Because of either the way Linux Terminal works, or due to something with the Linux version of APK Multi-tool (or a combination of both), I can't see the whole list, and past experiences have taught me that a lot of times, the first error is the real problem.

Through trial-and-error, I've found that the background image that I converted to a .9 (and other .9s that I've edited) is what seems to be causing the issue. When I copy over a non-.9 version of the background image, everything compiles easy-cheesy. I can understand the background image, but what really blows my brain is that the other .9s I made changes to are causing problems, as well. Both are .9s; the only difference between the edited and non-edited versions is I either added or removed text...and yet the non-edited .9s compile, and the edited ones cause multitool to spill its guts in errors. If I can help it, I would really rather not convert the edited .9s to non-.9 pngs (especially since they're supposed to be .9s to begin with), but right now, that seems to be my only option.

Thanks in advance for the help.

__________________
'WARE THE CUDDLY ZOMBIE DOG!!!
xaelith is offline  
Reply With Quote
sponsored links
Old May 11th, 2013, 07:43 PM   #2 (permalink)
AF Contributor
 
niteNarmor's Avatar
 
Join Date: Jun 2012
Location: Jacksonville, NC
Posts: 788
 
Device(s): (NEW)HTC Evo 4G - Rooted - Slimbean/Epic 4G-Rooted/Transform Ultra-FG11-MegaTron 6.1.1
Carrier: Sprint

Thanks: 87
Thanked 232 Times in 174 Posts
Send a message via Yahoo to niteNarmor
Default

Hey bro did you figure this out yet. The only thing I can think of is the original .9 is some what embeded in to the apk. If you delete the .9 then it has to be put back in as .jpg. Then recompile. This has been my experience.
__________________
Should the information I provided helped in any small way and you would like to thank me:
1. Hit the thanks button and/or
2. Add dropbox using this link: http://db.tt/kkkZKToY.
Thank you for allowing me to assist you.

niteNarmor is online now  
Reply With Quote
The Following User Says Thank You to niteNarmor For This Useful Post:
xaelith (May 11th, 2013)
Old May 11th, 2013, 10:44 PM   #3 (permalink)
ROM Developer
 
chevanlol360's Avatar
 
Join Date: Oct 2011
Location: new york
Gender: Male
Posts: 2,392
 
Device(s): LG Optimus F7 Running CM10
Carrier: North West, the baby

Thanks: 430
Thanked 1,933 Times in 801 Posts
Default

The .9's images are tricky, if you take a close look at any .9 image you will see that there are actual lines/ a box around the image it self. Thats a big must for all .9 images. I had to manually edit the original .9 images from the apk with photoshop and try to change the color without going outside the box/line around the image. I believe thats how i got it work once a while back, i try to stay away from editing them. Quick fix on what you can do is open the apk with winrar and replace the .9 images within winrar then flash the apk and reboot but be aware that if you decompile the apk again and try to recompile it, you will get that long error message again.
__________________
I have no special talents. I am only passionately curious.― Albert Einstein
Like my work? Donations are appreciated
MegaTron 6.2.5 -Transform Ultra
| LG Marquee |Galaxy Prevail
TweakNation - ZTE Warp | ZTE Warp Sequent
CyanogenMod 10
SimplicityXL 1.0.6
Carbon JB 4.2.2
WP7 4.2.3
Github
chevanlol360 is offline  
Reply With Quote
The Following User Says Thank You to chevanlol360 For This Useful Post:
xaelith (May 11th, 2013)
Old May 11th, 2013, 11:04 PM   #4 (permalink)
Senior Member
Thread Author (OP)
 
xaelith's Avatar
 
Join Date: May 2012
Location: Utah
Gender: Male
Posts: 534
 
Device(s): Sprint Note 3 (Black)
Carrier: Sprint

Thanks: 210
Thanked 277 Times in 181 Posts
Default

Quote:
Originally Posted by niteNarmor View Post
Hey bro did you figure this out yet.
Sort of...I found that if I just left the images as regular PNGs instead of converting them to .9s, the APK recompiled without issue. The only problem with that is that now the images don't stretch the way I want them to. Which is fine for 2 out of the 3, because they're just black bars anyhow.

Quote:
The only thing I can think of is the original .9 is some what embeded in to the apk. If you delete the .9 then it has to be put back in as .jpg. Then recompile. This has been my experience.
Didn't know that, but it make sense. One thing I don't get about the JPG, though...do you put that in along with the new .9, or instead of it? Because what I was trying to do was replace a .9 with another .9 of the same name, and in 2 of 3 cases, of the same size and everything, just it went from a black background with red text to all black.

Quote:
Originally Posted by chevanlol360 View Post
The .9's images are tricky, if you take a close look at any .9 image you will see that there are actual lines/ a box around the image it self. Thats a big must for all .9 images. I had to manually edit the original .9 images from the apk with photoshop and try to change the color without going outside the box/line around the image. I believe thats how i got it work once a while back...
I knew about the lines after playing around with .9s a bit, but didn't realize I had to stay within them. Usually what I do is delete any of the marks around the outside edge by cropping them out, edit the pic as I want, then re-convert the image back into a .9 using the "draw9patch" app that comes with the Android SDK.

Quote:
...i try to stay away from editing them.
Usually, I do too. However, after a few successful attempts, I felt confident that this time wasn't going to be any different...silly me.

Quote:
Quick fix on what you can do is open the apk with winrar and replace the .9 images within winrar then flash the apk and reboot but be aware that if you decompile the apk again and try to recompile it, you will get that long error message again.
Good to know, thanks.

It's also quite possible that my whole problem is that I upgraded my Ubuntu 12.10 Linux to 13.04 too soon. After all, it's since that update that APK Multi-tool (and APK Manager, for that matter) has refused to work properly. And if memory serves, something about going from one version to another tends to break the Android SDK, though I'm not sure what or why.
xaelith is offline  
Reply With Quote
Old May 12th, 2013, 01:12 PM   #5 (permalink)
AF Contributor
 
niteNarmor's Avatar
 
Join Date: Jun 2012
Location: Jacksonville, NC
Posts: 788
 
Device(s): (NEW)HTC Evo 4G - Rooted - Slimbean/Epic 4G-Rooted/Transform Ultra-FG11-MegaTron 6.1.1
Carrier: Sprint

Thanks: 87
Thanked 232 Times in 174 Posts
Send a message via Yahoo to niteNarmor
Default

I changed it from .9 to .png (sorry I know I stated .jpg in earlier post). I converted the image from a .jpg to .png. Might not be the right way but if memory serves me correct that is the way I changed it.

Back when changing the system backround images. If you tried to use a different .9 image or a .jpg image it would up bring up all those errors. They had to be converted to .png and then the errors would disappear.
niteNarmor is online now  
Reply With Quote
Old May 12th, 2013, 02:50 PM   #6 (permalink)
Senior Member
Thread Author (OP)
 
xaelith's Avatar
 
Join Date: May 2012
Location: Utah
Gender: Male
Posts: 534
 
Device(s): Sprint Note 3 (Black)
Carrier: Sprint

Thanks: 210
Thanked 277 Times in 181 Posts
Default

Quote:
Originally Posted by niteNarmor View Post
I changed it from .9 to .png (sorry I know I stated .jpg in earlier post). I converted the image from a .jpg to .png. Might not be the right way but if memory serves me correct that is the way I changed it.

Back when changing the system backround images. If you tried to use a different .9 image or a .jpg image it would up bring up all those errors. They had to be converted to .png and then the errors would disappear.
Ahh, okay. That might explain why the notification background image didn't wanna compile, at least...I tried changing it from a standard PNG to a .9 PNG. Still fuzzy why the other two were giving me fits, though. After all, the old and new images for the other two were practically the exact same.
xaelith is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Phones > Samsung Transform Ultra > Transform Ultra - All Things Root
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:06 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.