yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] DustArma:
I tried porting the free version of rayford85's Flats CM11 theme and I'm running into this error:

------------------------

18:35:14,33 : 01-09-2014

------------------------

java version "1.8.0_20"

Java(TM) SE Runtime Environment (build 1.8.0_20-b26)

Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Rafael\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Rafael\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

D:\CMX\XTheme\XThemeBase.apk\res\xml\redirections.xml:46: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/net_cactii_flash2').

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Rafael\AppData\Local\Temp\APKTOOL9088757869751637419.tmp, -0, arsc, -I, C:\Users\Rafael\apktool\framework\1.apk, -S, D:\CMX\XTheme\XThemeBase.apk\res, -M, D:\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)

at brut.androlib.Androlib.buildResources(Androlib.java:283)

at brut.androlib.Androlib.build(Androlib.java:206)

at brut.androlib.Androlib.build(Androlib.java:176)

at brut.apktool.Main.cmdBuild(Main.java:228)

at brut.apktool.Main.main(Main.java:79)

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Rafael\AppData\Local\Temp\APKTOOL9088757869751637419.tmp, -0, arsc, -I, C:\Users\Rafael\apktool\framework\1.apk, -S, D:\CMX\XTheme\XThemeBase.apk\res, -M, D:\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Rafael\AppData\Local\Temp\APKTOOL9088757869751637419.tmp, -0, arsc, -I, C:\Users\Rafael\apktool\framework\1.apk, -S, D:\CMX\XTheme\XThemeBase.apk\res, -M, D:\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)

... 6 more
[Miscellaneous Android Development] dully79:
It's saying there is no resource found on line 46 of the redirections.xml called net_cactii_flash2.

Use the manual option to create package redirections and check inside of XTheme\XThemeBase.apk\res\xml for net_cactii_flash2.

If its not there look inside CMThemeOut\nameOfApp\assets\overlays\net_cactii_flash2\tmp\ and copy it across.
[Miscellaneous Android Development] drgopi1234:
please tell me that theme posted in 4 the post gem flat working with HK theme manager
[Miscellaneous Android Development] dully79:
I wouldn't have posted it if it didn't work.
[Miscellaneous Android Development] Shanks:
It works! I have tried it myself
[Miscellaneous Android Development] zenosteam:
hi dully ,here what i have after processes finish is there something , i think there is but dont know what
[Miscellaneous Android Development] m1trand1r:
Hey....relax and enjoy :D[emoji481] [emoji481] [emoji482] [emoji482] [emoji482] [emoji106] [emoji106] [emoji12] [emoji41] [emoji41]
[Miscellaneous Android Development] resudo:
Hey, i really want to try this on a theme i bought from the play store but when I open RunMe.bat it say that I dont have java installed even though I have it installed. I have Windows 7 Ultimate x86 and Java is installed at C:/Program Files(x86)/Java/jre7/.../ and I have CMX folder on my desktop. Any help please? Thanks in advance!
[Miscellaneous Android Development] dully79:
You need to add the path to your system variables.

Type or copy and paste: SystemPropertiesAdvanced.exe into the windows search bar (windows icon, underneath all programs) and press return.

Click environment variables and look for "Path" in the system variables window.

Click edit and add the path to your java bin folder with a ";" prefixing. e.g ";C:\Program Files\Java\jdk1.7.0_51\bin".

Open a cmd and type java, if it returns a screen of info your good to go, else try rebooting for effects to take.
[Miscellaneous Android Development] m1trand1r:
Oh....you didn't get too drunk, eh?:p

[emoji23] [emoji23] [emoji23] [emoji106] [emoji482]
[Miscellaneous Android Development] dully79:
I drank so much JackD and coke i think my blood type is now JD positive.:eek:
[Miscellaneous Android Development] resudo:
Lol. I don't fully understand what to do just yet, I will try it when I'm home. If I need more help I will just ask you here.
[Miscellaneous Android Development] dully79:
https://www.google.co.uk/webhp?sour...-8#q=how to add java to system path windows 7
[Miscellaneous Android Development] dully79:
The theme contains faulty .9.pngs. Report it to the author or fix them yourself.

Please don't ask how to fix them as there is an abundance of .9.png guides including one in my signature.

Script update:

xmls are porting well but i need to figure out the best way to gather all the color.xml redirections into one xml file.
[Miscellaneous Android Development] resudo:
Ok thanks for the info. I will see what I can do. Just one thing, how do I know which .9.pngs are faulty?
[Miscellaneous Android Development] dully79:
Read the log and you will be enlightened.

Hint: it says error 9 patch image.

Always read the log and work from the first error. Fix it and retry.

You will be able to use manual option and compile to cut out steps and save time.
[Miscellaneous Android Development] Flowah:
I end up with a folder.apk but it won't ever zip :(

Not sure what I'm doing wrong.
[Miscellaneous Android Development] dully79:
Neither do I if you don't post your log. I have many abilities, but unfortunately one of them isn't the power of telepathy.
[Miscellaneous Android Development] Flowah:
Log

java version "1.7.0_67"

Java(TM) SE Runtime Environment (build 1.7.0_67-b01)

Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\TK421\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

I: Checking whether sources has changed...

I: Checking whether resources has changed...

I: Building resources...

(skipping dir '.RunMe' due to ANDROID_AAPT_IGNORE pattern '.*')

(skipping dir '.RunMe.bat' due to ANDROID_AAPT_IGNORE pattern '.*')

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/CMThemeIn

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/CMThemeOut

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/DoNotRun_png

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/DoNotRun_png.bat

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/log

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/log.txt

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/tools

invalid resource directory name: C:\CMX\XTheme\XThemeBase.apk\res/XTheme

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\TK421\AppData\Local\Temp\APKTOOL5959979817267762901.tmp, -0, arsc, -I, C:\Users\TK421\apktool\framework\1.apk, -S, C:\CMX\XTheme\XThemeBase.apk\res, -M, C:\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)

at brut.androlib.Androlib.buildResources(Androlib.java:283)

at brut.androlib.Androlib.build(Androlib.java:206)

at brut.androlib.Androlib.build(Androlib.java:176)

at brut.apktool.Main.cmdBuild(Main.java:228)

at brut.apktool.Main.main(Main.java:79)

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\TK421\AppData\Local\Temp\APKTOOL5959979817267762901.tmp, -0, arsc, -I, C:\Users\TK421\apktool\framework\1.apk, -S, C:\CMX\XTheme\XThemeBase.apk\res, -M, C:\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\TK421\AppData\Local\Temp\APKTOOL5959979817267762901.tmp, -0, arsc, -I, C:\Users\TK421\apktool\framework\1.apk, -S, C:\CMX\XTheme\XThemeBase.apk\res, -M, C:\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)

... 6 more
[Miscellaneous Android Development] dully79:
Have you tried compiling manually?

I'll probably upload a new version soon, I'm just squashing some bugs. You can give that a try.
[Miscellaneous Android Development] Flowah:
Yep. Tried it manually. Same results.

Also, is it supposed to open up like 30 command prompt windows and never close them? Does that indicate a problem on my end or is that working as intended?
[Miscellaneous Android Development] dully79:
No they should shut. I uploaded a zip file a pages back to fix that problem. Follow the instructions on that page if you want to try it.
[Miscellaneous Android Development] Flowah:
That problem got fixed. When I try automatic and then go into manual to "sign and zipalign xtheme" it tells me "project complete, signed and zipalinged, signed can be found in the "xthemefinished" folder. But I have no such folder.
[Miscellaneous Android Development] dully79:
I know, thats a message (bug) i put in to indicate the process has finished regardless. Thats fixed in my latest version.

It now checks for for the completed project and displays the appropriate message to the user.

IF EXIST XThemeFinished\signed_%Xcapp% (GOTO Xfinish) ELSE GOTO Xfailed

Ive added lots of checks and loops to try and prevent false reports amongst other things.

Like i say there should a new version up shortly, im just fine tuning some stuff.:fingers-crossed:
[Miscellaneous Android Development] dully79:
FOR /f *bug in (*.bat) do (
SET 1StepForward=1StepBack
)
ECHO %1StepForward%

:mad:

:(

:crying:

:confused:

:eek:

:silly:

Sorry for the delay folks, im trying to automate the removal of duplicate entries in xmls when they are merged.

I may just disable xmls for now and take a break.
[Miscellaneous Android Development] m1trand1r:
Oh...take a break ...maybe just Friday and too much of JD gave you headache :p:p
[Miscellaneous Android Development] dully79:
My heads spinning. I think ive solved one problem then i find another.

I cant do anything without thinking about how to solve the script, at work, in bed, trying to relax. The sooner i get this stable the sooner i can chill out.

Either way there will be some parts to porting xml's that will require some manual input from the user.
[Miscellaneous Android Development] dully79:
You can give this a try if want.

It has the xml porting feature bypassed until i can fix the duplicate lines bug.

This should run smoother than the last.

http://www.mediafire.com/download/4elw9ppo9gquam8/CMX_-beta_v2.zip

Feedback is much appreciated....seeing as ive had next to none.
[Miscellaneous Android Development] LRNZ09:
Hi, I've tried your tool, you're nice :good:

But I have encountered some issues: when I ran .RunMe.bat the CMThemeIn isn't created automatically and at the end the XTheme ported is 1/5 smaller then the original CM11 theme, in fact Android won't to install it :(

With adb I had this error

C:\CMX\XThemeFinished>adb install X_Material_Light_Theme-3.7.apk
2209 KB/s (2513898 bytes in 1.111s)
WARNING: linker: app_process has text relocations. This is wasting memory and is
a security risk. Please fix.
WARNING: linker: app_process has text relocations. This is wasting memory and is
a security risk. Please fix.
pkg: /data/local/tmp/X_Material_Light_Theme-3.7.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

The original theme is this one
[Miscellaneous Android Development] dully79:
Ive just noticed a bug in the script, when it finishes compiling, you will need to manually sign the apk. option 2>8

For some reason it's not recognizing the finished apk. i'll look into it when i get back around to it.;)
[Miscellaneous Android Development] LRNZ09:
Thanks for your answer, apprechated!

I'll thank you tomorrow because I've finished my 8 thanks for today :crying:
[Miscellaneous Android Development] dully79:
Dont worry about it mate.

I know the reason for the apks not signing in auto, and im also working on fix to include xmls.

With some luck ill officially update tonight.:fingers-crossed:
[Miscellaneous Android Development] dully79:
OK folks, after what seemed like a titanic battle with all 3 scripts deciding to stop producing stable results for whatever reason, I've finally got it ticking over nicely.

xml's are porting well including all the values resources (colors, dimens, drawables etc) and xml's from the drawable folder.

I've tested numerous times on a couple of themes which can be found in post 4 (i'll update info in all posts shortly inc changelog and usage details).

I'll also add some screenshots, here are a couple:

WARNING THEY ARE LARGE!

[IMG="mint"]http://i62.tinypic.com/2zylmo2.jpg[/IMG]

[IMG="chooser"]http://i61.tinypic.com/2r2m5hd.jpg[/IMG]

[IMG="gem flat"]http://i59.tinypic.com/2zjgwsm.jpg[/IMG]

Hope you enjoy the hard work i put in.:good:
[Miscellaneous Android Development] dully79:
Added some links and stuff for theme ports to post #4.
[Miscellaneous Android Development] CBpbxEcmecmBeH:
Hey, I want to try and use your nice tool, but I'm not sure I can do that at all...

I'm trying to run your script with Wine on an Ubuntu-based distribution (installed the Java.exe) but I don't even get the option to chose bewteen manual and automated. Is it actually possible, or I've to have a VM? Thanks! :)

The log is the .jpeg form:

View attachment 2941486
[Miscellaneous Android Development] dully79:
I'm not to clued up with Linux and wine, but the first error is easily fixed. Just open up the .bat with notepad++ and search for the line "mode con" and delete all instances.

The rest looks like it's looping through apktool if framework-res.apk. Find that line (near the top) and delete that also then try the script again.
[Miscellaneous Android Development] aoleary:
Errors in porting themes

HI.

I get the errors in the attached text file when I try to port a theme.
[Miscellaneous Android Development] dully79:
It helps if you attach your log.text.
[Miscellaneous Android Development] aoleary:
I'm a new user and there are major restrictions to what I can post, but sorted it now :)

I am trying to port this theme: https://play.google.com/store/apps/details?id=com.koulis.theme.l_ready.mlight&hl=en
[Miscellaneous Android Development] dully79:
I still need to see your log. Attach it using managed attachments or copy and paste.
[Miscellaneous Android Development] aoleary:
See post #84.
[Miscellaneous Android Development] dully79:
I'll look into it later, I'm back to work now and very busy.
[Miscellaneous Android Development] CBpbxEcmecmBeH:
Thanx, however it seems more complicated than that. I had to comment also another line and still it was difficult to get it running. And when it finally did i didn't get anything in the output, there's no log created, etc.

Don't get me wrong, I think your script is great and you'll make a lot of people happy. It's my inability to make it work :)

Keep it up!!!
[Miscellaneous Android Development] dully79:
Like i say ive got no experience (other than a fling in circa 2012) with Linux so im no use to you. Hopefully someone who does can chime in and help...but dont hold your breath. Most people around here are all take no give:rolleyes:

[MENTION=4956374]theKramer[/MENTION], can you send me the apk to look at please, you have until 1h30mins and then i'm off to try and relax and watch Everton, although i'll just end up shouting at the telly. :eek:
[Miscellaneous Android Development] aoleary:
Here you go. Thx a mill :)

https://drive.google.com/folderview?id=0B03kWBzzGaK6RFpVb3A5TVlDd0E&usp=sharing#list
[Miscellaneous Android Development] dully79:
Cheers, which one you having trouble with?
[Miscellaneous Android Development] dully79:
[MENTION=4956374]theKramer[/MENTION], fixed, i'll post details at half time.

Edit: The "@*common:color/*" error in various xml's needed to be changed to "@color/common_*"

Example-

The next error was

And finally the SystemUI error was caused by the source xml being messed up and needed a little recode-
[Miscellaneous Android Development] aoleary:
Sorry for the late reply. Had some friends visiting.

The one I am interested in is the L-Ready light.

Thx a lot for taking the time :)

---------- Post added at 08:15 AM ---------- Previous post was at 07:30 AM ----------

Where do I change these files?

In the "Xtheme" folder or the "CMThemeout" folder?

I presume then I have to compile and align manually?
[Miscellaneous Android Development] dully79:
You change it where the log reports the error in xtheme, cmthemeout is the source.
[Miscellaneous Android Development] aoleary:
Hi.

I cant find where to change "@*common:drawable/PACKAGE_NAME_custom_actionbar_bevel" to [MENTION=3944923]drawab[/MENTION]le/common_custom_actionbar_bevel.

Also, should [MENTION=3944923]drawab[/MENTION]le/common_custom_actionbar_bevel be without the quotation marks in the xml?

Thx.
[Miscellaneous Android Development] dully79:
"PACKAGE_NAME" is the name of the package, ie. Android, SystemUI, com_android_email.

So instead of "PACKAGE_NAME_custom_actionbar_bevel"

It will be "com_android_email_custom_actionbar_bevel".

The quotation marks are because it's a name. Don't include them.

Open up the xmls with errors and compare them to the xmls in the original theme (cmthemeout) and then look at what I've said.
[Miscellaneous Android Development] aoleary:
OK, so I changed all the custom_actionbar.xml files located in the res folders of the various packages.

Now, when I go to "Manual" and step 7 =>OK

Step 8 gives me the error below:

X_L-ReadyMLight1.7c.apk not found.

Please compile the project and try again.

Press any key to continue . . .

That was a custom name I gave on a first try, but on subsequent trys I just went with the default, but I unzipped CMX to a new directory, and it is still looking for this "X_L-ReadyMLight1.7c.apk".

I get the following screen when I click on automatic, do I need to define new values?

I selected 2, assuming it would fill in values, but i guess not..

Current AM name:
Current app name:
Current theme name:
Current author name:
Current author name:

Would you like to use these values?

1)= Define new values.
2)= Use the existing values above.
Type input:
[Miscellaneous Android Development] dully79:
X_L-ReadyMLight1.7c.apk not found.

Please compile the project and try again.

Press any key to continue . . .

Is an error from manual option 8 (sign) unless you used automatic.

If you used auto, compilation will have failed, check the log.

"X_L-ReadyMLight1.7c.apk" is the name of the compiled theme, if its not compiled it wont sign it as there will be nothing to sign, hence "X_L-ReadyMLight1.7c.apk not found."

Current AM name:
Current app name:
Current theme name:
Current author name:
Current author name:

Would you like to use these values?

1)= Define new values.
2)= Use the existing values above.
Type input:

The values are empty, you need to define them.

I added the option to use existing in case compiling or signing failed so you would not have to enter them again, thus saving time and annoyance.

Did you exit the xmls in xtheme?
[Miscellaneous Android Development] jahirfiquitiva:
Hi.

First of all thanks for sharing your work.

But, I'm getting troubles with the script.

I put the theme.apk in "CMThemeIn" folder and I've changed the name to "CMTheme.apk"

I run the .RunMe and select "Automatic" option. Everything works great until the Compilation and Sign/Zipalign process. It just closes the windows. And if I select option number 7 (Show log) I just get an advice saying "File can't be found".

I'm using the "beta 3" zip. And I've put the "CMX" folder in C:\Users\Jahir\.

What can I do? Thanks in advance :)
[Miscellaneous Android Development] jahirfiquitiva:
Yep, I'm trying to port it. Thanks for your reply and your help, I will try the new zip. And I hope this time I can make it. Thank you SO much. Btw, if you want, you can try to port my theme. :) Have a nice day.
[Miscellaneous Android Development] dully79:
If you haven't done it later and I'm bored I'll do it.

Shall I post it in your thread?
[Miscellaneous Android Development] jahirfiquitiva:
Yeah, sure! If I haven't succeed with the port. You can't do it and post it as your work. Thank you so much :D

Mmm One more thing, do you know how to fix the errors with 9.png's ?? Thanks in advance :)
[Miscellaneous Android Development] knives69:
Hope u can port it, I love ideaL Theme on my moto g, but I back to stock and there is no material theme on cm10... Only MATERIYO10
[Miscellaneous Android Development] dully79:
You need to use the 9 patch tool. There a link in my signature on how to theme, it includes a 9 patch tutorial.
[Miscellaneous Android Development] jahirfiquitiva:
Thank you so much. I've tried the new .RunMe but when compiling it gets an error. And then I try to see the log, and the file still being not able to see. :(
[Miscellaneous Android Development] dully79:
You need to fix the errors before compiling. Open the log with a text editor.
[Miscellaneous Android Development] jahirfiquitiva:
I can't find the log file ... I've searched in every folder :(
[Miscellaneous Android Development] dully79:
It's called log.txt in the main CMX folder.
[Miscellaneous Android Development] jahirfiquitiva:
I don't have this file :(
[Miscellaneous Android Development] dully79:
I've never had that problem so I don't know why you don't.:confused:
[Miscellaneous Android Development] jahirfiquitiva:
Don't worry. I will try using the log you posted some replies ago. Thank you so much :)
[Miscellaneous Android Development] dully79:
That was only a sample, there was many errors.

I'll port it in a bit.
[Miscellaneous Android Development] jahirfiquitiva:
:o

Well, if you can do it I will be really thankful.

Thank you SO SO SO much :)
[Miscellaneous Android Development] dully79:
Lol, no problem.
[Miscellaneous Android Development] EncryptedCurse:
I'm trying to port the Gem Emerald theme, but it just closes on step 6; setting package name, author, etc.

java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b20)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
The system cannot find the batch label specified - error_1
[Miscellaneous Android Development] dully79:
Use the RunMe zip I posted a few pages back.

[MENTION=5940066]EncryptedCurse[/MENTION], if you received that error, it means you entered something other than "y" or "n" when making a choice.

Try again.