Go Back   Android Forums > Android Phones > Samsung Transform Ultra > Transform Ultra - All Things Root
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old May 5th, 2013, 01:27 AM   #1 (permalink)
Member
Thread Author (OP)
 
xaelith's Avatar
 
Join Date: May 2012
Location: Utah
Gender: Male
Posts: 465
 
Device(s): Sprint Ultra with Megatron 6.1.1 and Red-n-Black v3.1 *NEW!* Motorola Photon Q
Carrier: Sprint

Thanks: 173
Thanked 235 Times in 152 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 online now  
Reply With Quote
Sponsors
Old May 11th, 2013, 07:43 PM   #2 (permalink)
Senior Member
 
niteNarmor's Avatar
 
Join Date: Jun 2012
Location: Jacksonville, NC
Posts: 740
 
Device(s): (NEW) Epic 4G/Rooted/TheCollectiveAoCP - Transform Ultra/FG11/MegaTron 6.1.1
Carrier: Sprint

Thanks: 79
Thanked 214 Times in 165 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
Posts: 1,483
 
Device(s): ZTE Warp Sequent rooted stock, LG marquee MT 6.2.0, Samsung Transform Ultra MT6.1.1
Carrier: Not Provided

Thanks: 355
Thanked 1,392 Times in 542 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.
__________________
"Let's rob the bank, give the money to the poor, then rob the poor and shoot the money!"
Like my work? Donations are appreciated
MegaTron 6.1.0 -Transform Ultra
& LG Marquee
TweakNation 1.0.0GM
WP7 4.2.3
chevanlol360 is online now  
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)
Member
Thread Author (OP)
 
xaelith's Avatar
 
Join Date: May 2012
Location: Utah
Gender: Male
Posts: 465
 
Device(s): Sprint Ultra with Megatron 6.1.1 and Red-n-Black v3.1 *NEW!* Motorola Photon Q
Carrier: Sprint

Thanks: 173
Thanked 235 Times in 152 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 online now  
Reply With Quote
Old May 12th, 2013, 01:12 PM   #5 (permalink)
Senior Member
 
niteNarmor's Avatar
 
Join Date: Jun 2012
Location: Jacksonville, NC
Posts: 740
 
Device(s): (NEW) Epic 4G/Rooted/TheCollectiveAoCP - Transform Ultra/FG11/MegaTron 6.1.1
Carrier: Sprint

Thanks: 79
Thanked 214 Times in 165 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)
Member
Thread Author (OP)
 
xaelith's Avatar
 
Join Date: May 2012
Location: Utah
Gender: Male
Posts: 465
 
Device(s): Sprint Ultra with Megatron 6.1.1 and Red-n-Black v3.1 *NEW!* Motorola Photon Q
Carrier: Sprint

Thanks: 173
Thanked 235 Times in 152 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 online now  
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 09:45 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.