[COMMUNITY ROM][2.3.3][ZVJ] Stock Rooted ROM Base

drewwalton19216801

Well-known member
Dec 27, 2010
2,476
2,803
0
Visit site
Here a tutorial I'm currently educating myself with

Tutorial: Android Internals - Building a Custom ROM, Pt. 1 of 2 - YouTube

And this one claims to be more simplified on explaining android Roms

http://h4oxer.wordpress.com/building-an-android-rom/


Sent from my LS670 using Android Central Forums

That youtube video only explains how to compile from source. But you need a proper source tree.

That second link...utterly useless. All it does is explain what each core component does and has almost nothing to do with making a custom ROM.
 
  • Like
Reactions: vernotzy21

vernotzy21

Well-known member
Oct 20, 2011
572
31
0
Visit site
That youtube video only explains how to compile from source. But you need a proper source tree.

That second link...utterly useless. All it does is explain what each core component does and has almost nothing to do with making a custom ROM.

im still learning what core component are.....:'(..:p today i learned what .so file are:D but i didnt get to the part on how to edit them and i learned how to edit the framework-res and systemui.apk or at least the graphics the tutorial that i read said to use notepad++ but whenever i open xml files all the code says is "null" everywhere there should be xml code???? im a little confused on that and then tomarrow im gonna learn how to use apktool
and i pretty much understand the system libs and how they work with .apks but thats about it

got any good tips......think of me as a ed 3 yr old in a helmet please go slow.......its my first time;) and im severly LD but once i figure it out im gonna bust roms all over the place:cool:
 

jstntp

/\C...D3\/
Feb 6, 2011
1,705
1,082
0
Visit site
You will need to decompile the apk's with apktool, such as framework-res.apk and SystemUI.apk in order to edit the xml files. Sounds like you were headed that direction anyway so keep goin!! cracking the rom/apk's/files open and exploring is the best way to learn IMO.
 
  • Like
Reactions: vernotzy21

vernotzy21

Well-known member
Oct 20, 2011
572
31
0
Visit site
You will need to decompile the apk's with apktool, such as framework-res.apk and SystemUI.apk in order to edit the xml files. Sounds like you were headed that direction anyway so keep goin!! cracking the rom/apk's/files open and exploring is the best way to learn IMO.

Well I used 7zip to decompile the apks now without reading anything I'm guessing apktool works pretty much like the command line version of winrar?? Just a little different though
Maybe something like
Apktool- compile apklocation
Or something to that effect?
But after I decompile the apks with 7zip the files are in a folder
Do I keep the folder to recompile or did 7zip add the folder?

Sent from my LS670 using Android Central Forums
 

hlxanthus

Well-known member
May 22, 2011
1,790
411
0
Visit site
You cannot use 7zip to achieve anything within an apk or jar file (well besides theming to swap pngs). You need apktool or apk manager to properly decompile, edit and recompile.

APKTool Tutorial - YouTube

That is the apktool version I use, download link is there. Simply extact the contents (I keep the zip handy so when starting a new project I can simply reextract for a clean slate). Open the folder "PlaceApksHere" and place your apk or jar files to edit within. From within that folder, hold shift then right click and click on "Open command prompt window here" for simplicity. Make sure you place framework-res.apk in there first and "apktool if framework-res.apk" first and go from there.
 
Last edited:
  • Like
Reactions: vernotzy21

jstntp

/\C...D3\/
Feb 6, 2011
1,705
1,082
0
Visit site
Well I used 7zip to decompile the apks now without reading anything I'm guessing apktool works pretty much like the command line version of winrar?? Just a little different though
Maybe something like
Apktool- compile apklocation
Or something to that effect?
But after I decompile the apks with 7zip the files are in a folder
Do I keep the folder to recompile or did 7zip add the folder?

Sent from my LS670 using Android Central Forums

As hlxanthus just stated, I think you are confusing extracting with decompiling. 7zip won't decompile anything. It will extract the files from the apk but there is nothing you can do with the xml files like that.

I will elaborate a little on his above instructions:

What you need to do is read up on apktool and download the right files for it. You can get them here.

Essentially you will create a folder on your C drive to work out of. Call it "apktool" or whatever you want.

-Place the downloaded, extracted apktool files (apktool.jar - apktool.bat - aapt.exe) in said folder along with the framework-res.apk from the rom you are working with. (Important)

-Then place any other .apk files you want to modify in the same "apktool" folder as well.

Open a command prompt and navigate to your "apktool" folder and then you will type these commands:

Code:
apktool if framework-res.apk
- This loads the resources from framework-res.apk to a folder on your hard drive that apktool will use when decompiling and compiling the other .apk's you are modifying. If you switch to different rom to modify, you must run this command again using the framework-res.apk from that rom. You do not need to try to find this loaded file.... there is nothing you need to do with it once it is in place. But just remember to reload it if switching to different rom files within the "apktool" folder.

(I will use SystemUI.apk as an example for the rest of these instructions so place SystemUI.apk in your "apktool" folder)

Then type:

Code:
apktool d SystemUI.apk
- This will decompile the .apk and when it's finished, you will have a folder named "SystemUI". You then can modify the xml files, .9.png images (be careful with these), and any other files you wish to change.

When you all done with your changes type this:

Code:
apktool b SystemUI
- This will compile everything back up. When it is done, go back into that SystemUI folder and you will see two added folder inside. One is "dist" and the other is "build".

-Open the "dist" folder and you will see a nice looking built SystemUI.apk there.

-Now for a little trick that will save you the trouble of trying to resign the modified apk. - Grab a copy of the original, unmodified SystemUI.apk and open with your 7zip. Open the new compiled one as well and place next to each other. Now take the META-INF folder from the original SystemUI.apk and place it into the newly compiled SystemUI.apk.

And that's it! Place the new SystemUI.apk back into your rom and flash the rom. Hopefully it boots up and you get no errors or FC's....... but if you do...... welcome to the world of custom rom's! Try to grab a logcat and/or look back inside your decompiled .apk to see if you can find where things went wrong.

Hope this helped - Enjoy!!
 
  • Like
Reactions: vernotzy21

hlxanthus

Well-known member
May 22, 2011
1,790
411
0
Visit site
^also what jstntp said. He is the one that did the most to get me rolling. I still recommend that version of apktool I posted about, makes it very easy. Another little trick, once within the folder with all the necessary files, hold shift and right click within the window. That will give you the option to open a command line at that location.
 

vernotzy21

Well-known member
Oct 20, 2011
572
31
0
Visit site
Im so happy you guy r takeing the time to teach me:D
Thank you so much!!!!
I cant wait to make a custom rom and release it i have so many ideas
Im going to customise this one I think....mmmm "eVil RoM" maybe themed for the dark side or "rainbow rom" for the pot lovein hippys out there or iv been thinking about this one for awhile
"insulting rom" a rom that actually lowers the users self esteem:p

Im REALLY happy to learn a new skill
Now if my time between real life/computer life will allow me

Where do I get the raw builds from google? Do I just extract the source from sdk
And I heard that you can only compile rom source from linux?
Idk I do know I got like a gaabbgillion questions and im adhd:p
Sent from my LS670 using Android Central Forums
 
Last edited:

vernotzy21

Well-known member
Oct 20, 2011
572
31
0
Visit site
You cannot use 7zip to achieve anything within an apk or jar file (well besides theming to swap pngs). You need apktool or apk manager to properly decompile, edit .
So is that why all the xml code says "null" everywhere because it wasnt properly decompiled?



Sent from my LS670 using Android Central Forums
 

jstntp

/\C...D3\/
Feb 6, 2011
1,705
1,082
0
Visit site
So is that why all the xml code says "null" everywhere because it wasnt properly decompiled?



Sent from my LS670 using Android Central Forums

Yes, and until you use apktool, its not decompiled whatsoever, only extracted. If you want to build from source, you will have to build cyanogenmod. You won't be able to build from stock source because there is none available for this phone. I would advise taking this stock based rom I have posted in the OP and starting with it. No Linux needed and you can become familiar with things. But to answer your question....... yes, if you build from source, it has to happen in Linux.
 
  • Like
Reactions: vernotzy21

jstntp

/\C...D3\/
Feb 6, 2011
1,705
1,082
0
Visit site
what do you guys think of the auto apktool over at xda?

Are you talking about Apk Manager? If so, a lot of people really like that one too. My advice is to go ahead and use the original apktool at least a couple times simply to gain the extra knowledge of how it works. I've always found that learning the cmd prompt method of things before using tools/kitchens proves useful in the long haul. Not to discredit the tools/kitchens that people have created along the way.............. a really cool one to check out is dsixda kitchen. That only runs in Linux or a virtual machine through windows, but it does some really cool stuff.
 
  • Like
Reactions: vernotzy21

vernotzy21

Well-known member
Oct 20, 2011
572
31
0
Visit site
How the heck do you guys theme so fast to edit every single PNG and graphic!!! That's crazy....at least from my pov

Sent from my LG-LS670 using Android Central Forums
 

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
How the heck do you guys theme so fast to edit every single PNG and graphic!!! That's crazy....at least from my pov

Sent from my LG-LS670 using Android Central Forums

Certain Images are needes to be themed, and once you do that, its straight forward from there. Thry each have a name which makes everything easier ;)

Sent from my LG-VM670 using Tapatalk 2