How to port PARANOIDANDROID ROM on Defy
After porting the PARANOIDANDROID ROM, I am getting too many PMs from users about how to port. So I decided to make a guide so that you all can port it yourself based on your choice of CM9 nightly. This will also make my job easier and I wont need to take the pain of uploading new build every other day.
Anyone who knows how to operate a computer can port using this guide, just bring the confidence in you that you can do it.
What all you need:
CM9 Nightly (For base)
Original PA ROM, I prefer galaxy s2 PA ROM.
Notepad++
Winrar
A Human Brain in preferably working condition
Click to expand...
Click to collapse
20 simple steps
Make a folder and name it whatever you want.
Copy original S2 PA ROM and the latest cm9 nightly which you want to make the base to your rom.
Rename the cm9 nightly rom to "my_ported_pa" and original S2 PA ROM to "s2_pa"
Now open the "my_ported_pa" with winrar and navigate to system folder.
Delete the "app" and "framework" folder one by one.
Now open original "s2_pa" rom and navigate to system folder.
Drag "app" & "framework" folder from "s2_pa" zip to "my_ported_pa" zip one by one.
Just press the "ok" button on winrar dialogue box, dont change any settings there.
Drag "pad.prop" from "s2_pa" zip to "my_ported_pa" zip
Navigate to /system/media folder of both the zip
Drag the bootanimation.zip from "s2_pa" zip to "my_ported_pa" zip
Close the "s2_pa" zip now.
Now, open the app folder of "my_ported_pa" and just delete the following apks (galaxys2settings.apk, samsungservicemode.apk, tvout.apk, torch.apk)
Open the original un-altered cm9 nightly and navigate to /system/app folder.
Drag the following apks from original un-altered cm9 nightly zip to "my_ported_pa" zip (audioeffectsettings.apk, compasscalibrate.apk, defyparts.apk, droidsshd.apk, filemanager.apk, motophoneportal.apk, torch.apk, usb.apk)
Close the cm9 nightly zip now.
Open the build.prop file using notepad++ of "my_ported_pa" system folder.
Find "# additional_build_properties" and add these lines after it
Code:
ro.cm.version=paranoidandroid
ro.modversion=paranoidandroid
ro.pa.version=paranoidandroid-pa_galaxys2-1.5a-25jun2012-170644
it shud look like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Find and delete the following lines
Code:
ro.cm.version=9-20120710-nightly-jordan
ro.modversion=cyanogenmod-9-nightly-120711-defy
Save the build.prop and close the "my_ported_pa" zip.
That's it, if you followed the process correctly then the rom will boot and that's 100% assurance.
Click to expand...
Click to collapse
This is just the basic thing in order to make the ROM boot. You will further need to decompile the framework-res.apk of both the ROMs and modify the xml files of the following folder as per our device value.
/res/values
/res/XML
and then re-compile.
At the moment, If you are not able to decompile and recompile using apktool, you can get the compiled framework from here. I will make a guide for this later.
Click to expand...
Click to collapse
The AIM here is to make all the users knowledgeable. Maybe some other guys can joing this thread and we can teach every little thing to every one, step by step. This will be in the interest of the community. Knowledge share is the best way to learn.
Warning: Please do this thing at your own risk, It maybe harmful for your device. I have explained the process which I follow.
Click to expand...
Click to collapse
Please post your feedback. I will be happy to help you in every possible way.
APKtool guide for modding framework-res.apk:
Credit: blindndumb
There might be an easier way of doing all of this, but this is what I found works for me. I know there are several other tools out there that automate it for you, but I have not really used them too much except for when I needed to do troubleshooting, since it saves the log when it compiles.
I like doing it manually so I can understand what is going on exactly. Also I think the automation tools do not come with the right apktool.jar versions to decompile framework-res.
Download the these apktools that I gathered and put together apktools-ics - Minus , there are several files in there. Apktool 1.4.2, Apktool 1.4.3, apktool.bat, and aapt.exe
You do not need the sdk installed, but you will need to have Java runtime installed. I am using Java version "1.6.0_29", but I am sure you can just downloaded the latest java runtime.
First thing you want to do is make sure you keep backups of any apk files just in case.
What I do is create a folder to work in and call it for example:
Code:
c:\apktools
1) Take the zip and unzip all 4 files to c:\apktools. You can call this folder whatever you want or put it anywhere, that is up to you.
2) You will need to pull the framework-res.apk from the rom you are working on. Copy it to c:\apktools.
3) Rename apktool.jar.1.4.2 to apktool.jar
4) Open a command window and make sure everything you do from now on is while you are in this folder c:\apktools
We now need to install the framework and type the following:
Code:
java -jar apktool.jar if framework-res.apk
You only need to do this once, unless you are working on a different Rom, then you will need to copy the framework-res.apk from that Rom and run the above command again.
5) We can now decompile framework-res with apktool (most important thing is to make sure we are using version 1.4.2 or will get errors)'
at the command prompt type:
Code:
java -jar apktool.jar d framework-res.apk
the d option stands for decompile and you will now see a folder under c:\apktools\framework-res. Here is all the output and can make any changes you want, and then can recompile. I would test to make sure you can recompile before making a lot of changes though.
6) We will now compile framework-res.apk and what is most important is we need to compile it with apktool version 1.4.3
So what I do at this point is rename apktool.jar to apktool.1.4.2, and then rename apktool.jar.1.4.3 to apktool.jar
now we compile by running the following make sure you are still in c:\apktools
Code:
java -jar apktool.jar b framework-res
It will take a few minutes and it should complete without any errors.
7) Once it is done compiling you will need to go to c:\apktools\framework-res\dist and you will now see your new framework-res.apk
If you get any errors about plurals when compiling it means you used the wrong version of apktool.jar
For any other apk including systemUI.apk, you can decompile and recompile with apktool.jar version 1.4.3. Basically you will have to keep renaming the apktool.jar if you doing a lot of building with framework-res, otherwise most of the time you can decompile/recompile all other apk files with 1.4.3
Just remember to copy any apk you want to decompile right into the root of c:\apktools, run the decompile command and it will create a folder of the output that has the same of the apk file.
Once you have your apk file built you will need to open it with 7zip, and copy out any files you changed to the original apk. If you only changed xml files, then you just need to copy the resources.arsc file and place it in the original apk file. The reason you need to do this is the siganture will change and you want to keep that intact.
Click to expand...
Click to collapse
Reserved for me
Sent from my MB525 using xda premium
Thanks brajesh, ngu ! I am an electronics final yr student... nd m thinking to try this! Can i use crc studio? I am nooob!
Sent from my MB525 using xda app-developers app
Is there a way to bring in the aokp
Toggles and rom control in cm9 hwa based rom?
Sent from my MB525 using xda app-developers app
vedhasd said:
Thanks brajesh, ngu ! I am an electronics final yr student... nd m thinking to try this! Can i use crc studio? I am nooob!
Sent from my MB525 using xda app-developers app
Click to expand...
Click to collapse
This guide is intended for noobs and ur a electronics student so It should not be a problem for you. It's just a simple copy/paste operation.
vedhasd said:
Is there a way to bring in the aokp
Toggles and rom control in cm9 hwa based rom?
Sent from my MB525 using xda app-developers app
Click to expand...
Click to collapse
Haven't tried it but it looks to be a bit hard as there will be need to mod framework.jar which is beyond my expertise. Anyways I will make some attempt for sure.
Can latest aokp for s2 be fused to our defy using ur guide? I wanna try it! But there will be need of restructuring framework-res na? Wasse?
Sent from my MB525 using xda app-developers app
I will help u in testing sharmaji
Sent from my MB525 using xda app-developers app
does the battery drain a lot? i think this is more important than performance
Good guide mate however, I think many of us will appreciate the planned guide for de/recompile which can be tricky to get running. When that's posted with link from first post everyone can do this. One question, are winrar preferable instead of 7zip for this task?
My favourite devs made me send this from my phone
SuperSkill said:
Good guide mate however, I think many of us will appreciate the planned guide for de/recompile which can be tricky to get running. When that's posted with link from first post everyone can do this. One question, are winrar preferable instead of 7zip for this task?
My favourite devs made me send this from my phone
Click to expand...
Click to collapse
well, with the method mentioned in the OP you all can get the ROM running. You need to edit the framework-res.apk for changes to take effect according to our device. The decompile/recompile method is nothing but knowing apktool. There are lots of guide on xda for framework modding.
Edit: 2nd post updated
And for the 2nd question: Both Winrar and 7zip can be used but I prefer using winrar (now).
brajesh.sharma87 said:
Edit: 2nd post updated
Click to expand...
Click to collapse
Hmm that's the same post I used. But then I switched to this version of apktool along with your posted link as a guide, so there was no need to use one version for decompile, one for re.
Also I used this post to figure out which framework-res to decompile, which to edit, which to use finally etc. That bit was a little confusing, how to use the edited framework apk. Didn't realize I have to then open it as an archive and transplant the innards back to the base rom's apk!
I wanted this process to be as easy as 1 click, in the process kadavil made his attempt and I must say he produced desired results.
We are just working to polish it more and then you all will have a 1-click ROM porting option (Only for CM based ROMs) very soon.
Hi brajesh.sharma87! first i want to thank you for all the stuff that are you doing for the defy! I have some questions:
First: with this method we can use all cm9 roms but, i have a green lens defy, and for that reason i have to use a froyo kernel cm9 rom right?
Second: There is no problem in using a CM9 rom with a PA rom based in CM10? or i have to use a CM10 nightly as base?
Because i want to port the last PA (1.95a) to my defy green lens and i dont want to make misstakes with the kernel and ruining my beloved Defy. Thanks for all!!
Isma1306 said:
Hi brajesh.sharma87! first i want to thank you for all the stuff that are you doing for the defy! I have some questions:
Click to expand...
Click to collapse
Thanks
First: with this method we can use all cm9 roms but, i have a green lens defy, and for that reason i have to use a froyo kernel cm9 rom right?
Click to expand...
Click to collapse
Well, u will use CM9 nighly which doesn't have kernel in zip. Dont worry about that, you wont need to change the kernel.
Second: There is no problem in using a CM9 rom with a PA rom based in CM10? or i have to use a CM10 nightly as base?
Click to expand...
Click to collapse
PA 1.95a is based on CM10 so use defy CM10 nightly.
Because i want to port the last PA (1.95a) to my defy green lens and i dont want to make misstakes with the kernel and ruining my beloved Defy. Thanks for all!!
Click to expand...
Click to collapse
Just use this tool to automate this process for everything, its completely based on my guide.
brajesh.sharma87 said:
I wanted this process to be as easy as 1 click, in the process kadavil made his attempt and I must say he produced desired results.
We are just working to polish it more and then you all will have a 1-click ROM porting option (Only for CM based ROMs) very soon.
Click to expand...
Click to collapse
So what extra steps/how did you get the PA-JB port working?
I've tried following your instructions as well as the 1-click rom port tool (versions 4.5 and 5). I've used Epsy's 8/6 build, as well as Q's 8/10 build and have now tried GN, NS, and S2 PA 1.97 builds. The only I can get to even boot is the GN port, but as soon as I include the paranoid properties.conf, it starts going crazy with FC in system.ui making it unusable. The rest of the combos won't boot and either just plain hang on the boot screen, or boot loop with a flashing red led.
Suggestions?
This guide work for armv7 to armv6?
antonio8297 said:
This guide work for armv7 to armv6?
Click to expand...
Click to collapse
I doubt, because this guide is about 'porting' the overlaying OS. For armv7 to armv6 its change in hw. So its not that easy.. both hw may have diff kernel modules..
Or else may be i mustn't b knowing
Sent from my MB525 using xda app-developers app
vedhasd said:
I doubt, because this guide is about 'porting' the overlaying OS. For armv7 to armv6 its change in hw. So its not that easy.. both hw may have diff kernel modules..
Or else may be i mustn't b knowing
Sent from my MB525 using xda app-developers app
Click to expand...
Click to collapse
If i change only app,framwork and media?
Inviato dal mio GT-S5660 con Tapatalk 2
Will it work for miui
Sent from my MB525 using xda app-developers app
Related
People are using different rom's , some other are asking for specific mod etc
Could someone write some guide how to do it, to enlight those who are not aware ?
Take the framework-res.apk from your current rom and upload it to http://uot.dakra.lt/kitchen
Once uploaded go to battery mod and select the battery style u want and cook it.
When its cooked extract the framework-res.apk from the downloaded file and either replace it with root explorer or push it with adb back into the phone.
Sent from my GT-I9100 using Tapatalk
Locster126 said:
Take the framework-res.apk from your current rom and upload it to http://uot.dakra.lt/kitchen
Once uploaded go to battery mod and select the battery style u want and cook it.
When its cooked extract the framework-res.apk from the downloaded file and either replace it with root explorer or push it with adb back into the phone.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
This is what I know already, but this is not working and phone is keeping crashing
masi0 said:
This is what I know already, but this is not working and phone is keeping crashing
Click to expand...
Click to collapse
Depends of which rom you are running but if you use VillainRom I think you need to open your modded framework with 7-zip and replace "META-INF" directory with the one found in the original framework of your rom. This is needed to sign the file.
However I'm not sure you use VillainRom (where files must be signed) and I didn't use yet the kitchen ... but your feedback is usefull if you want to try ...
shaolin79 said:
Depends of which rom you are running but if you use VillainRom I think you need to open your modded framework with 7-zip and replace "META-INF" directory with the one found in the original framework of your rom. This is needed to sign the file.
However I'm not sure you use VillainRom (where files must be signed) and I didn't use yet the kitchen ... but your feedback is usefull if you want to try ...
Click to expand...
Click to collapse
I am using stock KE4
masi0 said:
I am using stock KE4
Click to expand...
Click to collapse
Ok so ignore what I said upper ... should be only for signature of the rom (not needed in stock roms).
Anyway ... if someone has the solution ...
I always made that on my own...
Open the decompiled .xml in the framework-res.apk, edit those lines, add my own battery.pngs and that was all...
I didnt test it on my sgs2... But it should be the same way to get it...
Swyped from my overclocked GT-I9100 using XDA Premium App
PoTi_96 said:
I always made that on my own...
Open the decompiled .xml in the framework-res.apk, edit those lines, add my own battery.pngs and that was all...
I didnt test it on my sgs2... But it should be the same way to get it...
Swyped from my overclocked GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
could you tell which .xml to edit and what to add within the file?
I juz grab one of the batt mod out there and replace the .png files under /res/drawable-hdpi-v4 with the ones I want. guess its kind of a lazy way to do it=)
I have KE2 and get a "signature verification failed" error when trying to apply the UOT.zip file :-(
Anyone some idea how to get this applied?
Also my original framework-res.apk file doesn't have any folder called "/res/drawable-hdpi-v4" but the UOT file has!?
masi0 said:
could you tell which .xml to edit and what to add within the file?
Click to expand...
Click to collapse
I dunno exactly which one it was right now but I think the battery.xml somewhere in the first 3 or 4 folders...
sorry idk it anymore ... Long time no use for :/
Swyped from my overclocked GT-I9100 using XDA Premium App
I have been theming on the x2 for awhile now building custom themes .. I just got my nexus yesterday so I downloaded the gummy rom and tried to theme first with apktool and also with apk manager.. I see there have been themes made.. I have yet to be able to decompile any system apks successfully.. are there any new tools I'm missing or steps... would love to start theming again if I can get things to work
Sent from my Galaxy Nexus using xda premium
Kevin3328 said:
I have been theming on the x2 for awhile now building custom themes .. I just got my nexus yesterday so I downloaded the gummy rom and tried to theme first with apktool and also with apk manager.. I see there have been themes made.. I have yet to be able to decompile any system apks successfully.. are there any new tools I'm missing or steps... would love to start theming again if I can get things to work
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
yep, you need to update apktool for use with Android 4.0
edit: more specifically...
-Wrong version of apktool (get the latest)
-Wrong verison of apktool dependancies files (same site)
-Wrong version of aapt.exe in Android SDK (get latest SDK)
Alright awesome I'll look into it tonight after work
Sent from my Galaxy Nexus using xda premium
I have the latest version of all of that and can decompile with apktool. The problem is when I build the new apk and copy over the edited files and push back to the phone the app won't work.
A run down of everything I did is here: http://forum.xda-developers.com/showthread.php?t=1452530
Did u try putting it back in the flash able zip with 7 zip? I never use adb push.... in theory if u are able to compile the apk without errors it should work
Sent from my Galaxy Nexus using xda premium
Kevin3328 said:
Did u try putting it back in the flash able zip with 7 zip? I never use adb push.... in theory if u are able to compile the apk without errors it should work
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I pulled the music apk, edited it, rebuilt it, and put the edited files back in the original apk. I did that because I don't know how to sign my own apk so I just used the already signed one with some edited png and xml files. The thing I don't understand is that I pulled an apk once and opened it via 7zip and edited some things, pushed it back and everything was fine (changed out some icons on the contacts.apk)
Do you know where an up-to-date theming guide can be found? I'm very interested in making my own themes instead of requesting themers to make one. Learning experience and all that jazz.
Thanks.
coverton341 said:
I pulled the music apk, edited it, rebuilt it, and put the edited files back in the original apk. I did that because I don't know how to sign my own apk so I just used the already signed one with some edited png and xml files. The thing I don't understand is that I pulled an apk once and opened it via 7zip and edited some things, pushed it back and everything was fine (changed out some icons on the contacts.apk)
Do you know where an up-to-date theming guide can be found? I'm very interested in making my own themes instead of requesting themers to make one. Learning experience and all that jazz.
Thanks.
Click to expand...
Click to collapse
You can't replace xml's in that way.
Sent from my Galaxy Nexus using XDA App
If u properly recompile the apk then yes u can .. u edit it all the XML s and pngs in the apk then recompile.. then drop the recompiled apk into the system app section of the rom u r using unless its the framework Res apk or other framework apk.. once u do this put the new rom zip back into your phone and flash in recovery ... bottom line I'm not the most experienced themer in the forums I just got the phone yesterday so its gonna take time for me to begin theming anything.. that being said perhaps if this thread stays open and more experienced themers can chime in with some tips and advice
Sent from my Galaxy Nexus using xda premium
coverton341 said:
I pulled the music apk, edited it, rebuilt it, and put the edited files back in the original apk. I did that because I don't know how to sign my own apk so I just used the already signed one with some edited png and xml files. The thing I don't understand is that I pulled an apk once and opened it via 7zip and edited some things, pushed it back and everything was fine (changed out some icons on the contacts.apk)
Do you know where an up-to-date theming guide can be found? I'm very interested in making my own themes instead of requesting themers to make one. Learning experience and all that jazz.
Thanks.
Click to expand...
Click to collapse
Also in my short experience theming u should not have to sign a system app... u should recompile then rename it.. then reinsert into the rom you are using.. reflash the rom without any wiping and u should be good try it that way
Sent from my Galaxy Nexus using xda premium
Kevin3328 said:
Also in my short experience theming u should not have to sign a system app... u should recompile then rename it.. then reinsert into the rom you are using.. reflash the rom without any wiping and u should be good try it that way
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Hey Kev did u figured it out yet? I replied to ur PM...
Sent from my Galaxy Nexus using XDA App
Kevin3328 said:
Also in my short experience theming u should not have to sign a system app... u should recompile then rename it.. then reinsert into the rom you are using.. reflash the rom without any wiping and u should be good try it that way
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Actually, GoogleMusic.apk is found in data/app not in system, at least in the ROM I am on. But, am I correct in assuming that I can do the same thing in this instance?
Furthermore, is there no way to theme a single application? Do I need to always theme an app, place it back into the ROM zip, and reflash said ROM?
Can I make my own flashable zip file for a single app?
Sorry to ask so many questions, I just really like tinkering with things and I would really like to get good at theming.
Kevin3328 said:
If u properly recompile the apk then yes u can .. u edit it all the XML s and pngs in the apk then recompile.. then drop the recompiled apk into the system app section of the rom u r using unless its the framework Res apk or other framework apk.. once u do this put the new rom zip back into your phone and flash in recovery ... bottom line I'm not the most experienced themer in the forums I just got the phone yesterday so its gonna take time for me to begin theming anything.. that being said perhaps if this thread stays open and more experienced themers can chime in with some tips and advice
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Sorry misread what you were saying then.
Sent from my Galaxy Nexus using XDA App
I am at work until 1030 then I am gonna set up shop on my CPU first... gotta get the new sdk and apktool then I will gtalk u from there with issues.. all I know is this should be a learning experience lol.. by the looks of this phone it could be awhile b4 I learn what everything "is" framework will be all the apks will be different than what I'm used to
Sent from my Galaxy Nexus using xda premium
coverton341 said:
Actually, GoogleMusic.apk is found in data/app not in system, at least in the ROM I am on. But, am I correct in assuming that I can do the same thing in this instance?
Furthermore, is there no way to theme a single application? Do I need to always theme an app, place it back into the ROM zip, and reflash said ROM?
Can I make my own flashable zip file for a single app?
Sorry to ask so many questions, I just really like tinkering with things and I would really like to get good at theming.
Click to expand...
Click to collapse
U can make update zips and yes u should b able to do the same.. I usually borrow someone else's at first
Sent from my Galaxy Nexus using xda premium
wut? i've never done what you guys have when it comes to compiling/decompiling and replacing stuff. i'm not so sure that works, but i'll take your word for it for now since i've never tried it either. in theory, you can decompile and change xml, recompile and replace that xml, but not if you're dealing with the actual xml folder in apks. your resources change when you mess with that. this is the same for changing smali, except something else changes (it's been a bit since i've dealt with actual dev stuff).
also, it's a big waste (and sometimes troublesome) to flash an entire ROM to update one or a few apks. making one for just testing out things in \system\ will save you time and frustration. you can also make a backup easier for if something bootloops you
Success!!!
All right, first and foremost, thank you immensely for all the suggestions Kevin and others as well.
Here's what I did. I searched the ROM zip to no avail, but then found the apk in the gapps zip. I took it out of there, decompiled, messed around with just a few png files, recompiled and put it back into the gapps zip. Flashed it and it worked. Problem is, only a couple of the edits I made showed up which brings me to my next issue, ICS optimised apps have a tonne of "drawable-***" folders. Drawable, drawable-hdpi, drawable-hdpi-v8,v9,v11, drawable-xdpi, etc....ad nauseum.
I am not messing with any smali code, xml files, or .9.png files yet as I don't know what smali does, xml is a headache, and I have heard horror stories about .9.png files.
I'm going to dink around and see if I can sort out what items need to be changed for my current dpi setting (241) and will report back any findings, but probably not tonight as I have an early course in the morning followed by work.
coverton341 said:
Success!!!
All right, first and foremost, thank you immensely for all the suggestions Kevin and others as well.
Here's what I did. I searched the ROM zip to no avail, but then found the apk in the gapps zip. I took it out of there, decompiled, messed around with just a few png files, recompiled and put it back into the gapps zip. Flashed it and it worked. Problem is, only a couple of the edits I made showed up which brings me to my next issue, ICS optimised apps have a tonne of "drawable-***" folders. Drawable, drawable-hdpi, drawable-hdpi-v8,v9,v11, drawable-xdpi, etc....ad nauseum.
I am not messing with any smali code, xml files, or .9.png files yet as I don't know what smali does, xml is a headache, and I have heard horror stories about .9.png files.
I'm going to dink around and see if I can sort out what items need to be changed for my current dpi setting (241) and will report back any findings, but probably not tonight as I have an early course in the morning followed by work.
Click to expand...
Click to collapse
Let us know how you (hopefully) succeed. Im a bit tempted to try theming myself but ive cant seem to find a guide that is up-to-date - and im learning somthing with every question you are asking - and with every answer the other nice fellows are providing.
:thumbs up!:
I am still trying to figure out how to setup everything.. I know I need newest sdk and newest apk multi tool which I didn't get yet.. I'm gonna tinker around today/tonite and see what I'm doing wrong
Sent from my Galaxy Nexus using xda premium
mrvirginia said:
wut? i've never done what you guys have when it comes to compiling/decompiling and replacing stuff. i'm not so sure that works, but i'll take your word for it for now since i've never tried it either. in theory, you can decompile and change xml, recompile and replace that xml, but not if you're dealing with the actual xml folder in apks. your resources change when you mess with that. this is the same for changing smali, except something else changes (it's been a bit since i've dealt with actual dev stuff).
Click to expand...
Click to collapse
See this is how I read it too. I believe the OP means that he's making changes and then replacing the apk in the flashable zip. Not actually replacing the edited xmls in the original apk. Glad I'm not the only one that read it that way though
coverton341 said:
Success!!!
All right, first and foremost, thank you immensely for all the suggestions Kevin and others as well.
Here's what I did. I searched the ROM zip to no avail, but then found the apk in the gapps zip. I took it out of there, decompiled, messed around with just a few png files, recompiled and put it back into the gapps zip. Flashed it and it worked. Problem is, only a couple of the edits I made showed up which brings me to my next issue, ICS optimised apps have a tonne of "drawable-***" folders. Drawable, drawable-hdpi, drawable-hdpi-v8,v9,v11, drawable-xdpi, etc....ad nauseum.
I am not messing with any smali code, xml files, or .9.png files yet as I don't know what smali does, xml is a headache, and I have heard horror stories about .9.png files.
I'm going to dink around and see if I can sort out what items need to be changed for my current dpi setting (241) and will report back any findings, but probably not tonight as I have an early course in the morning followed by work.
Click to expand...
Click to collapse
no decompiling is necessary for tweaking pngs.
smali code is for messing with policies, etc.
.9.png files can be a pain if you don't recompile the apk correctly.
and this should help with your dpi as far as what to edit so you can see it...
http://developer.android.com/guide/practices/screens_support.html
I will be releasing the fix on my rom sometimes next week , and I will not compile this for every set up / theme / rom out there but if you know what you are doing this is pretty easy fix
Here is how the fix works :
Our present kernel source is 2.3.4 and we are running 2.3.6 base . So I looked at what was different in the wifi files from 2.3.4 to 2.3.6 and there you go .
Files attached at the end of the post are 2.3.4 JVQ (already modified for JVU)
(fyi these files come from apk manager just rename your jar files to apk to decompile them then copy the files attached at the end of the post in there respective places )
_framework.jar :
delete: \android\net\wifi\WifiStateTracker$1.smali
and copy paste the files attached and recompile
_services.jar :
copy paste the files attached and recompile
_'etc' folder copy paste into your /system folder in your rom/Phone
(not 100% sure its needed but better use them anyways)
IF you are not on JVU you need to change the ids manually , the names of the values are written in the smali so that will make it easier to port to other versions .
Tested on Belkin router (the worst of them all) and on public wifi with no dhcp assigned . after an hour no disconnect flawless victory
For beginers here is a guide by pantrif13 : http://forum.xda-developers.com/showpost.php?p=22032781&postcount=16
Credits to Shoman94 for pointing me in the right direction and providing files to help me diff(and being insistent about it )
suprstar for testing
and gtg465x who achieved this first on the SGS2
Will this fix the adhoc problem too ?
You are the master.
Sent from my GT-I9000 using xda premium
HSaber said:
Will this fix the adhoc problem too ?
Click to expand...
Click to collapse
well this fix the current wifi bug , rule of thumb if it was wokring back on JVQ for you , and it stopped after that , now it works .
try and tell us
I'm using it in my rom thank you!
Can some1 please explain me how to recompile...
Sent from my GT-I9000 using XDA App
burakgon said:
I'm using it in my rom thank you!
Click to expand...
Click to collapse
Pleasure.. Spam my thx button ?
Little mention on your credits maybe
To others if you don't know how to use apkmanager this mid is not for you
Tell your favorite rom dev about it it takes a few minutes to apply this
I could have kept this to my rom but I put it out there for all rom to use
This fix really works
DAGr8 said:
Pleasure.. Spam my thx button ?
Little mention on your credits maybe
To others if you don't know how to use apkmanager this mid is not for you
Tell your favorite rom dev about it it takes a few minutes to apply this
I could have kept this to my rom but I put it out there for all rom to use
This fix really works
Click to expand...
Click to collapse
Bootloop when I try it on odexed rom. (Deodexed applied odexed) JVU
burakgon said:
Bootloop when I try it on odexed rom. (Deodexed applied odexed) JVU
Click to expand...
Click to collapse
well use odex jvq ..
(fyi these files come from apk manager just rename your jar files to apk to decompile them then copy the files attached at the end of the post in there respective places )
_framework.jar :
delete: \android\net\wifi\WifiStateTracker$1.smali
and copy paste the files attached and recompile
_services.jar :
copy paste the files attached and recompile
_'etc' folder copy paste into your /system folder in your rom/Phone
(not 100% sure its needed but better use them anyways)
Click to expand...
Click to collapse
cant get the instrucstion newbie here..how can i use this one pls can u use much more clearer instructions for newbies..thank you very much in advance
Great work!
Thx for your time.
titaempoy said:
cant get the instrucstion newbie here..how can i use this one pls can u use much more clearer instructions for newbies..thank you very much in advance
Click to expand...
Click to collapse
As said in OP, until built for any ROM version: Be your own developer!
Adb pull the system .jar files, decompile with dependency, edit, compile, rename, adb push result.
are a beginner and I did not understand anything ,more clear PLEASE if you can, thanks!...I think your work is useful
I think many people could do with a step by step guide for this if anyone has the time to do it
Please note our desires about this topic...declared above..thanks!
romyo said:
Please note our desires about this topic...declared above..thanks!
Click to expand...
Click to collapse
I think that dagr8 explain very clear what needs to be done (but you need to have some experience with decompiling and compiling).
Here what you need to do in case you are on jvu:
1) First off all you need the latest JDK and JRE installed on your system.
2) Then go here to learn how to set up apktool.
3) After the setup of apktool pull the services.jar (services.odex if you have odex rom) and framework.jar (framework.odex in case of odex rom) and put it in your apktool folder
4)
a. If you are on deodex rom you only need to run these commands from the folder of apktool (go to apktool folder and press ctrl and shift -open command window here)
Code:
apktool d framework.jar
apktool d services.jar
You will find two new folders (servicesout and frameworkout)
Then do what dagr8 said in op.
b. if you are on odex rom: get the latest baksmali from here
then pull all your system/framework to your pc and put baksmali.jar there.
Open commant window and write:
for sevices:
Code:
java -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -xa 10 services.odex -o services.jar.out
for framework:
Code:
java -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -xa 10 framework.odex -o framework.jar.out
Then do what dagr8 said.
5)Both deodex odex: get the latest smali from here
Put it in the folder with out folders and write:
for services:
Code:
java -jar smali.jar sevices.jar.out -o classes.dex
you will find a new classes.dex file.Open services.jar with winrar and drag and drop (overwrite) there.
Then for framework:
Code:
java -jar smali.jar framework.jar.out -o classes.dex
Same here (open the jar with winrar and drag and drop)
5) if you are on deodex rom you finished just push the new services and framework to the system along with the files which provide dagr8 for etc folder.
6) if you are on odex...go here and follow the guide from the part odexing back...
I hope i helped!
Thanks a lot dagr8 for this!!
can dev provide the public.xml that this was made with for comparison of ids?
Thanks for your time and explanations given pantrif13 and dagr8, expecting something more simple ... you can install the CWM (example) ... so (who knows it's easy anyway)...expect other solutions!!!to solve the problem with wifi...
Great job. Thanks
i m on jw1 deodex jetpack custom rom 8.2 and i am using the jvt modem...
will you provide fix for jw1 rom next days? thank you !!!
First of all I didn’t create this tool entirely.
This tool has been created by xavierjohn22 and his thread can be found here:
http://forum.xda-developers.com/showthread.php?t=1053227
He deserves most if not all the credit for this amazing tool.
Credits:
@Beachon
@Xavierjohn22, the amazing author of AutoApktool! Visit his thread, click his thanks button, and support his work with donations, and my personal thanks to author for this tool and his permission to modify it and re-post it..
@Brut_all for Apktool
@XDA Community
I did add few more options to the tool to make it AoutAPKTool a universal Tool.
The Idea was to make this a one stop shop for all app/jar/dex file modifications any dev would like to do.
With new changes to hex/dex that have been introduced in ICS leaks/roms decompiling an app became a few step process. We had to take classes.dex out of app and save it somewhere. Delete it from app and then decompile it. After mods have been done we had to put that dex file back into app.
I have added a menu option to decompile ICS app and a script that would do all that all by itself making that process fully automated.
Also I did add baksmali/smali script and menu options for .dex and .jar files so we don’t have to keep 2 different tools and to be able to do everything we want to do under one roof.
I’m not gonna type up a tutorial for complete tool.
You can read about it in thread linked above. Mr. xavierjohn22 knows much more about this subject and his explanations are better than I can do it. You also can read more about how to use this tool here:
http://forum.xda-developers.com/showthread.php?t=1511755
I’ll just explain how to use new options in menu I’ve added.
Download zip file from link provided and extract somewhere on your hard drive. It will create AutoAPKTool2.0.4 folder on your hard drive with all tools and folders you need inside that folder.
How to:
1. Decompile ICS app. This has been tested on E4GT apps and it’s working. If you try this tool on apps from other phones ICS builds please let me know if it works and I’ll add that info to description for others to know. Now back to subject. You don’t need to do any extra steps to decompile an ICS app. You would choose option 14 from menu and drag’n’drop app from _INPUT_APK folder into CMD window. The script will take classes.dex out of apk, decompile it and once done with decompiling it will move classes.dex back into xyz.apk file leaving it in its original state. Script will also add classes.dex file to decompiled apk folder so when you recompile it after you done with your modifications the classes.dex will be there. To recompile app use option 15 from menu.
2. Baksmali/smali classes.dex file. This options will do exactly what they say they would. You put a dex file into _INPUT_APK folder and run baksmali option. It will create clasout folder and put decompiled classes.dex file into it. Do your modifications and run smali. It will recomplile classes.dex and create a new file new-classes.dex in your _INPUT_APK folder. You can rename it to classes.dex and put into apk you took it out from.
3. Baksmali/smali JAR files. Put a JAR file you want to edit into _Jar_Files folder and run baksmali JAR option from menu. You will be asked to drag’n’drop jar file into CMD window. Do that and hit enter. New folder with filename.dex extension will be created _Jar_Files folder and jar file will be decompiled into that folder. After you done with your modifications choose option Smali JAR file. You will be prompted to drag’n’drop filename.dex folder into CMD window. Do it and hit enter. Jar file will be recompiled and you will find newly created/recompiled jar in filename.dex folder.
If you see any bags in while using this options please let me know. If you have problems with anything else please contact xavierjohn22 since I don’t know anything about all the other stuff in this tool.
I’m not a programmer nor am I a code writer and this is my first attempt to put together a tool. Please go easy on me if you discover any bugs. I’ll try to keep up with you and fix bugs as you discover them.
You can download tool here:
http://jumbofiles.com/tuwvhbc1ksio/AutoAPKTool2.0.4.zip.html
Updated tool to aapt.exe from windows-sdk API level 15 (ICS).
AutoAPKTool2.0.4a
I'm looking forward to get some feedback about options added.
Reserved just in case
reserved as well.
downloading now...will report back after some testing
Thanks!!!
LOL i didn't realize the typo until I downloaded the actual file. *AutoAPKTool
This is fantastic! As I've been working on a theme for Mijjah's Goodness rom, I've hit several roadblocks through all of his updates where decompiling worked on one build, but would fail on another. Before updating my theme from build to build, I've had to figure out how to de/recompile. I currently have two versions of apk manager, two versions of apk multi tool, and two versions of apk auto tool on my computer right now! Can't wait to try this!!
Sent from my SPH-D710 using xda premium
VegasEvo4G said:
This is fantastic! As I've been working on a theme for Mijjah's Goodness rom, I've hit several roadblocks through all of his updates where decompiling worked on one build, but would fail on another. Before updating my theme from build to build, I've had to figure out how to de/recompile. I currently have two versions of apk manager, two versions of apk multi tool, and two versions of apk auto tool on my computer right now! Can't wait to try this!!
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
As stated in OP the whole idea was to try to have one tool for all needs.
I've been using Tiffany84's ICS theme for all my roms and had to jump thru hoops every time. So I decided to try to make it simple.
First I've build a tool just for ICS apps, backsmali/smali.
Then I've contacted xavierjohn22 and asked his permission o add the script and parts to his tool.
And here we are.
ericwgarza1 said:
LOL i didn't realize the typo until I downloaded the actual file. *AutoAPKTool
Click to expand...
Click to collapse
LOL.
Was too tired when posting it. Usually I'm trying to read all in preview before posting but almost never I read title after I typed it up.
OK guys.
I understand that tool won't get as much attention as rom/theme/kernel but after 25 downloads no one has anything to say?
Does it work?
Are there any problems?
Anything?
agat63 said:
OK guys.
I understand that tool won't get as much attention as rom/theme/kernel but after 25 downloads no one has anything to say?
Does it work?
Are there any problems?
Anything?
Click to expand...
Click to collapse
I tried the original version before but it was giving me problems with systemUI.apk, how is that working on your version? Also have you tried the smali tools? Every multitool/manager I have tried hasn't worked and I have had to use the tools separately. I haven't downloaded yet but I will this weekend. I was having trouble finding any set out tools that works on all apks across all the ICS roms it usually involves swapping out several different apktools.jar and appt. For example I would have to use one apktool.jar for framework-res.apk and another for systemUI. Thanks though for your work.
dtm_stretch said:
I tried the original version before but it was giving me problems with systemUI.apk, how is that working on your version? Also have you tried the smali tools? Every multitool/manager I have tried hasn't worked and I have had to use the tools separately. I haven't downloaded yet but I will this weekend. I was having trouble finding any set out tools that works on all apks across all the ICS roms it usually involves swapping out several different apktools.jar and appt. For example I would have to use one apktool.jar for framework-res.apk and another for systemUI. Thanks though for your work.
Click to expand...
Click to collapse
If you were trying to decompile a modified/themed SystemUI.apk you will get same errors using this tool.
The problem is that every dev does cut the corners when making a theme or modding apps. And even thou the app works you can't decompile it properly because there are some png's that don't have references, some 9.png's with missing chunks etc.
So if you want to add something to an app that has been modified/themed you would start with stock app. Do your modifications and then drag your modded xml, png and 9.png files into modded app. This way you can add your own modifications to already modified app.
That's the way I'm doing it because from my Eclair days I couldn't find other workaround for this problem.
However I did add all tool so you can do smali/baksmali and decompile/recompile using one tool. So you don't have to switch.
Well I'll have to see if i can give it a spin. I created a couple of Moment ROM builds but they were pretty much stock plus one or two apps that I used. Never published on SDX as they were my purchased apps.
I may not get a chance to do so till this weekend and I need to do a OS re-install on the laptop.
You might if its allowed if you have not done so put a post in the themes an apps section.
Would this be used to take native apps and make inverted? If so perhaps the topic there should be "create your inverted apps with this:"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my SPH-D710 using Tapatalk
rbaucom said:
Well I'll have to see if i can give it a spin. I created a couple of Moment ROM builds but they were pretty much stock plus one or two apps that I used. Never published on SDX as they were my purchased apps.
I may not get a chance to do so till this weekend and I need to do a is install on the laptop.
You might if its allowed if you have not done so put a post in the themes an apps section.
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
I thought it belongs to development since it's not an app or theme but a tool.
If mod's think it belongs into app/theme section please move this thread.
agat63 said:
I thought it belongs to development since it's not an app or theme but a tool.
If mod's think it belongs into app/theme section please move this thread.
Click to expand...
Click to collapse
I think it needs to go to both sections...
Sent from my SPH-D710 using Tapatalk
So would you use this to create inverted apps from stock apps?
Sent from my SPH-D710 using Tapatalk
rbaucom said:
So would you use this to create inverted apps from stock apps?
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
This is tool that helps you to decompile and recompile apps.
What you do with it it's up to you.
ICS apps are PITA to decompile. And this tool does it with one click.
Also no apktool had baksmali/smali in it for dex and/or jar edits.
All I did is adding those option to a tool created by xavierjohn22.
Bring all tools under one roof.
That's it.
jar
Cant manage to decompile framework.jar from an ICS aokp ROM. I just get a framework.dex folder with the same framework.jar in it.
monstaX said:
Cant manage to decompile framework.jar from an ICS aokp ROM. I just get a framework.dex folder with the same framework.jar in it.
Click to expand...
Click to collapse
Didn't try it with AOKP/AOSP/CM roms.
GB and ICS.
Gimme rom link I'll download it and try.
Having trouble deodexing stock FC24 rom. Any tips on what I can do to help.
Have a WIN7 Machine(64 bit), used both dsixda's kitchen and this tool and both were a no go. Haven't tried since updating java. Thanks for the help.
here it is
Download the one that says build 29: mirror 1.
Thanks
Or you can just download the attachment that is what I was trying to decompile
http://forum.xda-developers.com/showthread.php?t=1565994
lostcausenjtown said:
Having trouble deodexing stock FC24 rom. Any tips on what I can do to help.
Have a WIN7 Machine(64 bit), used both dsixda's kitchen and this tool and both were a no go. Haven't tried since updating java. Thanks for the help.
Click to expand...
Click to collapse
What option of menu is deodexing a rom?
Can anyone edit a framework-res.apk with no mods other than adding the crt animation? I've found guides on how to edit the bools file in the res/values filder inside the apk, but I can't get it to recompile the apk correctly. Can someone tell me how or send me an edited apk or something?
If you want to post your framework file, I'll do it for you and send it back.
I just posted several of these for Caulkulin's 3.0 rom. What are you using now? His framework, but with a stock battery look.
Sent from my SPH-D710 using XDA
kyamora said:
Can anyone edit a framework-res.apk with no mods other than adding the crt animation? I've found guides on how to edit the bools file in the res/values filder inside the apk, but I can't get it to recompile the apk correctly. Can someone tell me how or send me an edited apk or something?
Click to expand...
Click to collapse
You need to check the error and see whats wrong with the framework file. Also you just want a stock framework file with crt on? Also what are you using to compile and decompile
playya said:
You need to check the error and see whats wrong with the framework file. Also you just want a stock framework file with crt on? Also what are you using to compile and decompile
Click to expand...
Click to collapse
I was using apk manager 4.9, and I have no idea how to read the log.
I attached my framework-res. It's stock from FD19, I probably should have specified.
If no one gets to it, I'll mod it when I get home.
Sent from my SPH-D710 using xda premium
All done. I tested on my phone. After I replaced the apk, I had to manually restart the phone for it to work. I placed your apk in a zip file before I uploaded, so make sure you unzip your apk before putting it back on your phone.
Thank you so much, it works very well.
Now I'd just like to know how you did it. Coming from a clean computer with nothing installed, what would I need to decompile an apk, edit it, and compile it again? I'm trying to get a handle on the whole thing to do some development myself.
Try and upgrade to Apk Manager 5.02 since I just de-compiled and then compiled your apk file without an issue. Also try and update everything associated with it like your java... But it seems quite fine to me
Edit: just tried yours again as well as removing animation I lowered autobrightness which is something I do on all my roms for better battery life.. Try that mod next
playya said:
Try and upgrade to Apk Manager 5.02 since I just de-compiled and then compiled your apk file without an issue. Also try and update everything associated with it like your java... But it seems quite fine to me
Edit: just tried yours again as well as removing animation I lowered autobrightness which is something I do on all my roms for better battery life.. Try that mod next
Click to expand...
Click to collapse
Do I have to do anything to set it up or is it good to go from install? Should I restart my computer?
Also where can I find 5.02? I had a lot of trouble finding 4.9 in the first place.
I've never used apk manager, so I'll check that out also. I used apktool to mod your framework along with all the java runtime files it needed to work.
Sent from my SPH-D710 using xda premium
&roid said:
I've never used apk manager, so I'll check that out also. I used apktool to mod your framework along with all the java runtime files it needed to work.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Apktool confused me so I used apk manager. I can't figure out how to get apktool to work. Do you have a link to a good guide or anything?
There are some good ones on xda. I'll link you one when I get home.
Sent from my SPH-D710 using xda premium
I was apparently using the gingerbread method for an ICS build. Would that have kept it from compiling correctly?
kyamora said:
I was apparently using the gingerbread method for an ICS build. Would that have kept it from compiling correctly?
Click to expand...
Click to collapse
YES
&roid said:
YES
Click to expand...
Click to collapse
Haha, at least I'm learning.
To be fair, no one specified. Thanks for all the help guys.
Hi. Any help me to on crt effect in this framework ? I try apk menager and apk edit, and always some problem when compile, program loop and only exit work
http://db.tt/W2DKqulN