[Q] porting theme and trying battery circle mod - not working - Desire Q&A, Help & Troubleshooting

Hi all
at the moment I'm trying to port a Theme from OpenDesire to Cyanogen RC2.
I got my framework-res.apk, replaced all those icons in there, that looks pretty nice. So that part worked.
Now I wanted to apply a battery circle mod to my theme but i'm stuck here.
I got apkmanager 4.8 and decompiled my already patched framework-res.apk to edit some xml files. I added the icons, i've put them into my public.xml, added some other xml files needed and now I'm trying to recompile that stuff. The tool produces an error about not declared images.
Looks like this here: drawable/zoom_plate declared here is not defined.
There are about 100 of these errors and these are no files I've touched.
I tried to decompile the original Cyanogen RC2, not even patched, framework, editing nothing and compiling again.. same error.
Am I missing something?

Solved.
Actually I confused my sources, after searching and editing I managed to get my theme working.
There were some files in the specified dir not mentioned in the public.xml, an some lines defining files not being there.
Had the idea after a break and a coffee

Related

compiling single xml to binary

how do i compile single xml into binary any way ??
eclipse needs other attached res files which i dont have in their normal form!!!
In my other theard about xml edits, there was a guy(his name slips my mind right now) but i think he was compiling the files in source. I will try and find that info and edit this post.
I don't want hex editimg as I don't lnow it but I think when the pudates are compiled meams like jesus freak compiles the jf versioms we can add our edites ones in them and then it would do coz I have edited some but can't get them edited as the source is for cupcake. I even don't have linux running it hangs on startup...
you cant compile your own xmls for any of the t-mobile builds. This is because we don't have T-mobiles source.
Stericson
edited adp 1.1 launcher apk xmls which i want to be compiled into xml so is there any way ?
no, theres no way because you edited the cupcake files, not that of T-mobiles build.
so even if you do compile it and try to run it, it will loop your phone. Probably won't even get past the first bootloader.
Stericson

[Q] Combining multimple themes ( SmoothSense + others )

Hi!
So, I decided to have a look inside AuraxTSenses framwork-res.apk ( applied SmoothSense to it ), and found .pngs and thought that I'm gonna try editing these. And so I did, and changed my lockscreen.
Then I did some more, and then I tried to change battery icons to Super Circle Battery just by replacing the .pngs and couple of xml files, but I ended up having no battery icon at all. Then I found UltraLinx's Minimal Matte Grey, and thought man I'd like to combine this and some of SmoothSense's icons + grey Super Circle.
Now, I know what I'm doing ( and did ) is NOT the right way, I basically just extracted the files I wanted to change, and then I threw the modified files back in to the framework-res.apk , and then I threw the modified framework to SmoothSense's installing zip and flashed the zip at recovery. And I did have the nice new lock screen look, but Theme Kitchen said that the framework is basically all the way corrupted.
So now I'd like to know what I need to do in order to do this thing correctly? The Theme Kitchen said that Minimal Matte Grey's framework is corrupted too, so I guess it's no good using it as the base-framework, and add the things I'd like to it? I know I'm supposed to sign something and compile and decompile and something?
If someone can give me any advice I would be more than grateful.

[Q for Theme development] Multiple lockscreens with JVS framework

Hello,
I always got Multiple lockscreen frameworks such as EDT and JKay's Lockscreens. I really want to know, actually where are these files located in framework-res..
I want to port EDT's JVR lockscreens to JVS framework.
Anybody willing to help me?
Regards,
Rahul
I'm quite interested in this too...and I guess that nobody will write us down a list with needed files .....I can tell you what I've found out so far and hope that it will be of any help to you.
The smali files for the lockscreen itself I think they should be in android.policy.jar
Then there also should be some changes in framework.jar which I do not know.
The ressource files like pictures etc are in the framework-res.apk
Then you also need the edt.apk in /system/app
Decompile the files with apkmanager/baksmali
Use a comparision tool like winmerge to see what files are added additionaly compared with the standard stock files. And also too see if there are smali changes in some files.
Good luck
Sent from my GT-I9000 using Tapatalk
why bother, they are not bug free anyways
$omator said:
why bother, they are not bug free anyways
Click to expand...
Click to collapse
You said that more than once now, but I sure as hell don't suffer any bugs while using them on JVQ or JVR.
While we're at it, I thought, hey, what the hell, I can learn and do it myself. Always good to learn this sort of thing. So I got smali/baksmali, winmerge, and Whitehawkx's source files, which I think will work.
But that's not the point.
The point is that baksmali is desassembling the .dex files just fine, but when I want to make a new file after merging the files from the sources with the originals of the .dex... It makes a .dex with the original files.
That is: disassemble -> merge the files -> I make sure the files are there. They are. -> I use smali, it creates the new .dex -> As everytime I do anything, I think, hey, lets disassemble the new file again to make sure the new files are there -> The files are not there.
It's driving me crazy... I mean, how the hell does it create a file from something that isn't there any more?
I can sort of get that the new files and folders don't make it to the new .dex (although, no, I don't get why would that be), but how can the overwritten files go back to be the original ones?
Seriously, driving me crazy.
Edit: Ok, nevermind what I said... The files change frigging places when smali assembles them...?
Edit2: Suprise, surprise, it didn't boot, but now I don't know if it's because I did something wrong or because the source files aren't good for JVS. I'm gonna try to do it on JVP, I'm curious now...
$omator said:
why bother, they are not bug free anyways
Click to expand...
Click to collapse
Well because some of them have features people want to have...and also because people can live with some of the bugs. I don't care if it writes me SIM-Card is locked even if it isn't. The functionality doesn't decrease because of that.
But well these lockscreens give us a music widget that works with other players then the crappy samsung stock one. And I can unlock directly to messages or phone. If it was for me I would only need something like the fourtab(which sadly has a memory leak)...but if the whole package could be ported or whatsoever and people would like to do it why not ?
Code is present in the android-policy.jar and framework.jar (for some lockscreens). You need to copy over the Smali Files fromt he MOD to the JVS framework and android policy. After that you need to copy over the drawables, layouts and other xml files to the framework apk of JVS and assign them each a unique resource ID. These resource IDs need to be substituted with the new values in the Smali files. Since the framework-res.apk changes with Firmwares, the Resource IDs are different for each framework.
It's very complicated stuff for rookies. You need to know which stuff to copy where and what modifications to make for specific lockscreens. And you need to use Logcat and do a lot of trial and error.
And $omator is right. Those lockscreens all together don't work perfectly due to conflicting code. For example, I made a SGS II Lockscreen Port http://forum.xda-developers.com/showthread.php?t=1070564 . The Same Lockscreen that is found along with 9 Lockscreen MOD is incomplete and doesn't work perfectly. I don't mean to say that the 9 lockscreen mod is useless, but It is very handly provided you compromise on what you get.
dhiru1602 said:
Code is present in the android-policy.jar and framework.jar (for some lockscreens). You need to copy over the Smali Files fromt he MOD to the JVS framework and android policy. After that you need to copy over the drawables, layouts and other xml files to the framework apk of JVS and assign them each a unique resource ID. These resource IDs need to be substituted with the new values in the Smali files. Since the framework-res.apk changes with Firmwares, the Resource IDs are different for each framework.
It's very complicated stuff for rookies. You need to know which stuff to copy where and what modifications to make for specific lockscreens. And you need to use Logcat and do a lot of trial and error.
And $omator is right. Those lockscreens all together don't work perfectly due to conflicting code. For example, I made a SGS II Lockscreen Port http://forum.xda-developers.com/showthread.php?t=1070564 . The Same Lockscreen that is found along with 9 Lockscreen MOD is incomplete and doesn't work perfectly. I don't mean to say that the 9 lockscreen mod is useless, but It is very handly provided you compromise on what you get.
Click to expand...
Click to collapse
Very complicated to do something like that from scratch, yes.
If at least one of the persons that have made a 9 lockscreen JVS rom posted the sources... From there I've learned by now that it's fairly easy to just include them into the files.
But no one have.
If you really want to learn how to do it i can only recommend read lots of info and do some investigations by yourself.
If some guy made the stuff for lets say XXJVQ then grab the files and compare them with the stock files. Decompile them with apkmanager. (jar files can also be modded this way, you only need to add .apk to the jar extention, and remove it later after compiling back)
This way you can see what files need to be added and what values need to be changed/added. First try to understand the process and after that make your own mods.
I used Winmerge for comparisation of the files.
Well... I modded the overscroll by myself. It's a start.
Thanks to Team Obssessed, we can already have multiple lockscreens on JVS.
I already made a theme as I like and added the lockscreens thanks to the files of this rom.
Now I can have a proper JVS .
Is just that I'm too used to puzzle and MIUI lockscreens to go back to stock or AOSP. And those two work without bugs, so... And don't know about the rest.
and btw. apkmanager got aapktool with outdated baksmali/smali ...

SOLVED: [Q] apktool compile error: need HELP

Hoping an "apktool" wizard can help me resolve a compile error driving me up a wall. I've been using apktool for past 6 months successfully making various system and data apk changes, but this one has me stumped. Experimenting with making a few simple color changes in my active Gmail v4.5.2 (inverted theme) apk. It successfully decompiles, but cannot recompile. To eliminate any of my changes, I started over and decompiled the Gmail apk... then immediately recompiled, but get the "No resource identifier found for attribute..." error (attached). I updated my JAVA and re-installed apktool... same issue. Anyone have guidance on what the issue might be? attaching screenshot of my CMD window commands in both WORD and PDF formats. Thx
EDIT: SOLVED I got it solved thanks to recognized themer "Ticklefish" in the UK. Turns out, the apk I was editing included 4.2 code (WidgetCategory)... and apktools could not handle this during recompile with my 4.1.2 framework. I just edited the 4 xml files which had the 4.2 code and removed those lines... made my theming edits... and it recompiled flawlessly. Then signed the apk and pushed to /system/app. If anyone else runs into similar apktool compile errors, this is why and how to resolve.

[Z1C][5.1.1] Going nuts trying to mod Settings.apk!

Hey all,
I need to change 2 small lines of text in an existing XML from a decompiled Settings.apk and it seems just impossible.
I've been on it litteraly 10 hours yesterday trying to figure it out.
I really could use some help.
The data: rooted stock Z1C 5.1.1 14.6.A.1.236 (non deodexed).
I need to decompile Settings.apk, just modify one existing .XML and recompile it.
(as seen here http://forum.xda-developers.com/showpost.php?p=55659129&postcount=2 ).
The problem is I cannot for the life of me recompile the Z1C Settings.apk.
I tested with windows apktool, android apktool, java JRE7, JRE8. It decompiles OK with JR7 but throws memory error with JR8.
But regardless I'm NEVER able to recompile it, apktool is never "able to find sources", and then it crashes out with some PNG error.
I use those 2 frameworks: framework-res.apk and SemcGenericUxpRes.apk.
If you are able to decomp/recomp the Z1C "Settings.apk", please by all means let me know the tools and method you use.
Does it make a difference if my rom (and Settings.apk) is deodexed or not?
Are there more frameworks I don't know about for Z1C?
Thanks much for any help, I'm going a bit nuts with this.
Ps24u said:
Hey all,
I need to change 2 small lines of text in an existing XML from a decompiled Settings.apk and it seems just impossible.
I've been on it litteraly 10 hours yesterday trying to figure it out.
I really could use some help.
The data: rooted stock Z1C 5.1.1 14.6.A.1.236 (non deodexed).
I need to decompile Settings.apk, just modify one existing .XML and recompile it.
(as seen here http://forum.xda-developers.com/showpost.php?p=55659129&postcount=2 ).
The problem is I cannot for the life of me recompile the Z1C Settings.apk.
I tested with windows apktool, android apktool, java JRE7, JRE8. It decompiles OK with JR7 but throws memory error with JR8.
But regardless I'm NEVER able to recompile it, apktool is never "able to find sources", and then it crashes out with some PNG error.
I use those 2 frameworks: framework-res.apk and SemcGenericUxpRes.apk.
If you are able to decomp/recomp the Z1C "Settings.apk", please by all means let me know the tools and method you use.
Does it make a difference if my rom (and Settings.apk) is deodexed or not?
Are there more frameworks I don't know about for Z1C?
Thanks much for any help, I'm going a bit nuts with this.
Click to expand...
Click to collapse
Deodexed is definitely better for this. I don't have confidence to say odex won't work, but I wouldn't be surprised.
What errors are you getting?
I would suggest deodexing. There are flashable patches in the forums. I've been able to use apktool on phone smoothly and easily with deodexed stock rom.
Thanks much for your reply levone1, I'm currently in talks with the creator of apktool to find where the compiling problem comes from, it seems to be related to image (png) files, although the only thing i modified is one .xml file..
Ps24u said:
Thanks much for your reply levone1, I'm currently in talks with the creator of apktool to find where the compiling problem comes from, it seems to be related to image (png) files, although the only thing i modified is one .xml file..
Click to expand...
Click to collapse
Do you have a reason not to deodex?
No I don't, actually I deoxed 2 hours ago
I used this patch http://forum.xda-developers.com/son...236-xperia-z1-z1c-5-1-1-deodex-patch-t3268096
It worked great.
But the exact same problem remains:
I: Using Apktool 2.1.1
I: Checking whether resources has changed...
I: Building resources...
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-xhdpi
-v4\appwidget_item_bg_pressed.9.png
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-ldrtl
-xhdpi-v4\appwidget_item_bg_pressed.9.png
etc....
I wait a reply from the dev for now ^^;
Ps24u said:
No I don't, actually I deoxed 2 hours ago
I used this patch http://forum.xda-developers.com/son...236-xperia-z1-z1c-5-1-1-deodex-patch-t3268096
It worked great.
But the exact same problem remains:
I: Using Apktool 2.1.1
I: Checking whether resources has changed...
I: Building resources...
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-xhdpi
-v4\appwidget_item_bg_pressed.9.png
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-ldrtl
-xhdpi-v4\appwidget_item_bg_pressed.9.png
etc....
I wait a reply from the dev for now ^^;
Click to expand...
Click to collapse
Try apktool 2.0. Or just do it on phone. I've modded stock lp ROMs w no problem using this - http://forum.xda-developers.com/sony-xperia-z1-compact/general/apktool-phone-t3230338
(latest version is 6.1, but I've had better success overall with 6.0.5. I can post a link if you need)
Same with apktool 2.0 or apktool android, already tried (always crash in libPNG error), but thanks for the tip!

Categories

Resources