[Galaxy S III General] masterex567:
Hi guys! I see many people trying to learn how to make roms, Here i show the easiest and shortest way on how anyone can begin making roms for the Galaxy S3. ​

Requirements:

Prepared CWM Stock Package.

Apktool

7-zip

Notepad ++

Setting Up, and Introduction​

IF you have downloaded firmware from sammobile instead of zoot1's package, use this part for Setting up and introduction: http://xdaforums.com/showpost.php?p=37812381&postcount=33

OR ELSE THE EASIER WAY

To start with, Download the prepared CWM Stock Rom by zoot1 here: http://xdaforums.com/showthread.php?t=1868004

I personally use firmware from sammobile, because i like to do everything myself. Though this method would be easier for beginners.

Extract the zip file to folder called "ROM".

Now lets head towards the customizing.

Thanks to Prawesome alot for this part. I took some info from his guide.

So now, open up the system folder. You'll find loads of folders in it. Here is a brief introduction to each of those folders:

1.

apps

When you open this folder. You will find apk's. An apk is an install-able app package for any Android Device.

You can delete specific apps incase you want to delete. But take extra precautions on what you're deleting. As some apps are useful. You can add apps here as well in formats of apk's. But note, adding Play Store apps to the system/app folder is not recommended. For example you don't want Google Talk in your rom, you just have to delete the Talk.apk. :)

2.

bin

Nothing really to mod in this folder. Full of advanced techy stuff. xD

3.

etc

Here is where most of the tweaks come in. There is a folder called init.d where mods like the V6 Supercharger or multi-tasking fixes can be applied. Note! Don't add more than 1 or 2 scripts. Most of them usually conflict with each other.

In the gps.conf file, you can edit your gps info to make the gps more accurate. Pretty good guides about this, search them out.

Next is the hosts file. Devs use this to block sites from generating ads, and keeping their roms ad-free. Take a look at my DroidS3 hosts file, there are over 20,000 hosts blocked. You can use the same hosts file for your rom too.

4.

Fonts

Very easy folder to understand. All you need to do here is replace ttf files, and you'll change the fonts.

5.

Framework

Here is where the big mods come in. I'll explain further on about this. It contains the android.policy.jar, a useful element to add many mods. Framework-res is used to change wallpapers and theme the rom. I'll explain later.

6.

libs

Contains all the libs needed for specific system apps to work. Don't mess here unless you're adding a mod.

7.

Folders like csc, hdic, sipdb, wakeupdata, vendor, excetra..

These are the folders, there isn't much to do. Csc folder contains the feature.xml where some mods can be added. Search the forums for that. The rest contain multi-languages and more stuff.

8.

xbin folder

Used to add scripts like busybox, dexdump, openvpn support. More like the bin folder but smaller.

9.

Build.prop

Ever wondered how some roms have android 5.0, when it hasn't even released? All you need to change is the ro.build.version.release to any number you like. Even Android 20! Go change it, and fool some noobs out there. ;) More mods can be added to this file. e.g:

debug.sf.hw=1
video.accelerate.hw=1
debug.performance.tuning=1
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
ro.config.nocheckin=1
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.telephony.call_ring.delay=0
ro.lge.proximity.delay=15
mot.proximity.delay=15
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
ro.config.nocheckin=1

The codes listed above are for improving jpeg quality, saving some battery life, reducing call delay and more. Search for build.prop mods, you'll find loads of them.
​

Now, a small explanation of the Meta-inf folder.

In Meta-Inf you'll find the updater-script.

Since this is aimed at beginners, I'll just show you how to change what text is shown during install in CWM.

Just edit what's in the quotes of the ui_print code in the file, and enter your own text. e.g:

ui_print("Hi, This message in quotes is displayed in recovery");

Modding!​

It's time for the modding to begin.

Get apktool from: http://xdaforums.com/showthread.php?t=1755243

Now, first copy your framework-res from the /system/framework directory to where you extracted apktool files. Let's call this folder "apktool"

Open the folder apktool, press shift and right click. Click on "Open command window here". Type:

apktool if framework-res.apk

Now you are ready to decompile apk's.

I'm going to show you how to mod different files. Copy over:

SystemUI.apk

android.policy.jar

framework-res.apk

1.

SystemUI.apk

Just showing you basic modding here. Copy over SystemUI.apk to apktool folder. In the command prompt, type

apktool d SystemUI.apk

After it's done, you should see a SystemUI folder in the apktool directory.

I'm going to show you how to make the status bar transparent, thanks to raubkatze for this part.

Navigate to res/layout/tw_super_status_bar.xml and change android:background to match the red line.

<com.android.systemui.statusbar.phone.StatusBarWindowView [B][COLOR="Red"]android:background="#00000000[/COLOR][/B]" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

Save and close.

Then navigate to /res/values/drawables.xml

Edit to match:

<item type="drawable" name="status_bar_background">[COLOR="red"][B]#00000000[/B][/COLOR]</item>

That's it. Save and close.

Go back to your command prompt and type

apktool b SystemUI SystemUI-new.apk

After it's done, probably will take around 5-10 minutes. You'll find SystemUI-new.apk in your apktool folder. Open both SystemUI.apk and SystemUI-new.apk with 7-zip. Delete AndroidManifest.xml from SystemUI-new.apk and copy AndroidManifest.xml and META-INF from SystemUI.apk to SystemUI-new.apk

That's it. Close the zip files.

If you have adb or android-sdk push SystemUI-new.apk to your phone using:

adb remount
adb push SystemUI-new.apk /system/app/SystemUI.apk
adb reboot

If you don't have adb, just copy over SystemUI-new.apk to your phone. Rename it to SystemUI.apk and copy to system/app with root explorer. Reboot.

There you have transparent statusbar now! :)
​

2. android.policy.jar

Decompile android.policy.jar with:

apktool d android.policy.jar

You will find android.policy.jar.out, open it and use Cristiano Matos guide to mod the files: http://xdaforums.com/showthread.php?t=2018633

After that use:

apktool b android.policy.jar.out

Open the android.policy.jar.out folder, you will find a dist folder created and inside that is your modified android.policy.jar.

You can use adb again by:

adb push android.policy.jar /system/framework

or the normal root explorer method.
​

3. framework-res.apk

Here i'll show you small mods.

Decompile it using

apktool d framework-res.apk

Navigate to res/values/bools.xml.
​

Here you can add these. Thanks to DSA for this! :

4 Way Rotation:

Code:

<bool name="config_allowAllRotations">false</bool>

Change to:

Code:

<bool name="config_allowAllRotations">true</bool>

Lock Screen Rotation:

Code:

<bool name="config_enableLockScreenRotation">false</bool>

Change to:

Code:

<bool name="config_enableLockScreenRotation">true</bool>

and

Code:

<bool name="lockscreen_isPortrait">true</bool>

change to

Code:

<bool name="lockscreen_isPortrait">false</bool>

Disable Keyboard Switch In StatusBar When Typing

Code:

<bool name="show_ongoing_ime_switcher">true</bool>

Change to:

Code:

<bool name="show_ongoing_ime_switcher">false</bool>

Unplugging From USB doesn't Turn Screen On

Code:

<bool name="config_unplugTurnsOnScreen">true</bool>

Change to:

Code:

<bool name="config_unplugTurnsOnScreen">false</bool>[/indent]

Now to change wallpaper. Change the default_wallpaper.jpg in drawable-xhdpi and to change lockscreen wallpaper change keyguard_default_wallpaper.jpg.

Now recompile using:

apktool b framework-res framework-new.apk

Delete AndroidManifest.xml from framework-new. Copy AndroidManifest.xml and META-INF from framework-res.apk to framework-new.apk

To test use adb:

adb push framework-new.apk /system/framework/framework-res.apk

Or rename to framework-res.apk and copy to system/framework using root explorer. Reboot.
​

Once you've added everything, your modified apks. Ui_print mods, A custom kernel (just replace boot.img) it's time to compile. Now this is really easy. Just highlight all the folders/files like system, meta-inf and boot.img. Right click. Hover over 7-zip and click Add to Rom.zip. Wait for it to be done, and copy Rom.zip to your sd card and flash. Voila! You've made your rom!!
​

You can get more mods to add from here: http://xdaforums.com/showpost.php?p=26583654&postcount=4

I was a beginner once, everyone was a beginner once. People helped me, and now I want to help people. :)

Press the Thanks button, and/or rate this thread 5 stars to show your support.
​

FAQ

- How do i add a mod?

To add a mod, just download it. Open it and copy over all the folders from the zip file EXCEPT the META-INF.

- How can i set up apktool on windows?

To set up apktool on windows, you need aapt, apktool.jar and apktool.bat

- My modified apk is not working?

Do some testing and get to know what went wrong. I'm always here. I'll be glad to help.

- Are these the only apps i can modify?

Ofcourse not! Any apk can be modified. Just decompile it, and make your changes.

- I'm looking for a guide on something i want to learn. Can you add it here?

I'll try my best.​

​

​