Guest TheManicGibbon Posted June 6, 2011 Report Posted June 6, 2011 Hey everyone, looking for someone more experienced than I to help with a wee issue I'm having. Some members of the Huawei U8800 forum here have contacted me inquiring about porting my Gingerbread theme to their phones. I have the framework-res.apk and services.jar from the ROM that that device runs. I've been looking around and reading Frankish's guide on the subject but I can't find a simple way to port the theme. Can someone here help me please? I really cannot face writing the theme from scratch :D Also, I've found the theme porter on XDA and I've been mucking about with that, but it only ports the images as far as I know, and not the XML files that control colours. Any help would be much appreciated guys
Guest ricardopvz Posted June 6, 2011 Report Posted June 6, 2011 (edited) Use apktool to decompile framework-res.apk and then you can compare the xml files in your theme and the one from Huawei U8800 and modify it. The images, you can copy over from your theme to the Huawei one. To edit services.jar (i guess you only want to make the notification background transparent), you can use smali/baksmali, in frankish guide there's a howto in "2b. Statusbar Pulldown Transparency" If they also want the notification power widget, that requires much much more work. It took me one week of hard work to implement it in my rom. Edited June 6, 2011 by ricardopvz
Guest TheManicGibbon Posted June 6, 2011 Report Posted June 6, 2011 Use apktool to decompile framework-res.apk and then you can compare the xml files in your theme and the one from Huawei U8800 and modify it. The images, you can copy over from your theme to the Huawei one. To edit services.jar (i guess you only want to make the notification background transparent), you can use smali/baksmali, in frankish guide there's a howto in "2b. Statusbar Pulldown Transparency" If they also want the notification power widget, that requires much much more work. It took me one week of hard work to implement it in my rom. I thought it would be something like this; is it possible just to punt the necessary XML files from my theme straight into the Huawei one? I'll look at the transparency, cheers, and no, they don't want a power control widget. If they do I'll point them at widgetsoid lol Thanks for the quick reply.
Guest ricardopvz Posted June 6, 2011 Report Posted June 6, 2011 I thought it would be something like this; is it possible just to punt the necessary XML files from my theme straight into the Huawei one? I'll look at the transparency, cheers, and no, they don't want a power control widget. If they do I'll point them at widgetsoid lol Thanks for the quick reply. You can try that, but i'm not sure it will work
Guest TheManicGibbon Posted June 7, 2011 Report Posted June 7, 2011 Ok so I'm trying to use apktool but it seems different to Frankish's instructions; You need to download APKTool from the tools section and extract it and run install.bat. Once you have done this you only need to place framework-res.apk (or any other .apk file!) in the APKTool folder and run APKTool_Decompile.bat, this will decompile all .apk's in the folder. Once deoompiled you will be able to make all your changes to the .xml files using a text editor like Editpad Lite. To recompile you just need to run APKTool_buiuld.bat. It will pop up a command window and you drag and drop your decompiled framework-res folder or other to this window and press enter. If it compiles with only "no default translation" errors then it is fine. Your compiled .apk will be output to /framework-res/dist/ folder or whatever your .apk name was. e.g. /apkname/dist/apkname.apk. Alternatively APKTool allows manual commands. Open a cmd window in the APKTool directory and run "apktool d apkname.apk outputfoldername" to decompile and "apktool b outputfoldername newapkname.apk" to build your modified .apk. Something to note is that if you add xml that points to new images (extra battery images) then you must also add these extra images to the right folder or the apk will fail to compile. I don't have any of the batch files, but if I start a command prompt in the folder and do apktool <enter> i get a big menu of commands like he said...is there a different download for the batch files and stuff? I downloaded the top 2 files on the Google code page (the ones it says to do for Windows). Also, it's not in my Windows folder, because all my dev stuff is on a different hard drive Cheers
Guest HMZX Posted June 8, 2011 Report Posted June 8, 2011 Ok so I'm trying to use apktool but it seems different to Frankish's instructions; I don't have any of the batch files, but if I start a command prompt in the folder and do apktool <enter> i get a big menu of commands like he said...is there a different download for the batch files and stuff? I downloaded the top 2 files on the Google code page (the ones it says to do for Windows). Also, it's not in my Windows folder, because all my dev stuff is on a different hard drive Cheers Alternatively APKTool allows manual commands. Open a cmd window in the APKTool directory and run "apktool d apkname.apk outputfoldername" to decompile and "apktool b outputfoldername newapkname.apk" to build your modified .apk. Something to note is that if you add xml that points to new images (extra battery images) then you must also add these extra images to the right folder or the apk will fail to compile. just do that... it works for me
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now