[Wildfire Android Development] tathanhlam66:
[Tutorial] How to port aokp? :-p

You only take 15 to 20 minutes to complete the port

Only port aokp of samsung mini Android Open Kang Project (AOKP)

The first, you need:

* Android SDK.

* Smali and baksmali from here and place them in the tools folder (android sdk).

* Something such as winrar or 7zip or whatever you prefer.

* Notepad++

Let go :fingers-crossed:

Use base rom Non-official CyanogenMod 9 RC-0.

1. Replace system/app. system/framework and system/media folder of aokp.

- In folder system/etc, check init.d and permissions folder.

- Open build.prop and add line

# hardware info
ro.device.gpu=Adreno 200
ro.device.rear_cam=3.15 MP
ro.device.front_cam=n/a
ro.device.screen_res=240x320

and

ro.aokp.version=aokp_tass_milestone-6
ro.goo.developerid=aokp
ro.goo.rom=aokp
ro.goo.version=19

Replace line

ro.config.ringtone=Girtab.ogg
ro.config.notification_sound=Proxima.ogg
ro.config.alarm_alert=Cesium.ogg

2. Edit framework.jar and services.jar of aokp

- Open the framework.jar (services.jar) file with something such as winrar or zip or whatever you prefer

- Copy out the classes.dex file to your SKD/tools folder

- Run following from command line:

java -jar baksmali.jar -o classout/ classes.dex

* Edit classout of framework.jar

Now browse to your folders classout\android\net\wifi. Open WifiNative.smali

Add line

.method public static native isHotspotDriverLoaded()Z
.end method

.method public static native loadHotspotDriver()Z
.end method

.method public static native unloadHotspotDriver()Z
.end method

You can replace WifiNative.smali from cm9 to aokp:laugh:

* Edit classout of services.jar

Now browse to your folders classout\com\android\server. Open PowerManagerService.smali

Add line

.method static synthetic access$4900(Lcom/android/server/PowerManagerService;I)V
.registers 2
.parameter "x0"
.parameter "x1"

.prologue
.line 81
invoke-direct {p0, p1}, Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerOffAnimation(I)V

return-void
.end method

.method private native nativeStartSurfaceFlingerOffAnimation(I)V
.end method

Change line

.method private native nativeStartSurfaceFlingerAnimation(I)V

->

.method private native nativeStartSurfaceFlingerOnAnimation(I)V

invoke-direct {p0, p1}, Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)V

->

invoke-direct {p0, p1}, Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerOnAnimation(I)V

Browse to your folders classout\com\android\server\wm. Open InputManager.smali

Add line

.method private static native nativeSetStylusIconEnabled(Z)V
.end method

.method public setStylusIconEnabled(Z)V
.registers 2
.parameter "enabled"

.prologue
.line 472
invoke-static {p1}, Lcom/android/server/wm/InputManager;->nativeSetStylusIconEnabled(Z)V

.line 473
return-void
.end method

You can replace InputManager.smali from cm9

- Save the file

Now back to the command line and from your SDK/tools folder run:

java -Xmx512M -jar smali.jar classout/ -o new-classes.dex

- If the above finishes without errors you should have a file called new-classes.dex in your SDK/tools folder now that is the same size as your classes.dex file.

- Rename the old classes.dex file to classes-old.dex and rename the new-classes.dex file to classes.dex.

- Open the framework.jar (services.jar) file with your archiving tool again and replace the existing classes.dex file with our new classes.dex we just created.

- Now. replace new framework.jar and services.jar to system/framework folder.

- Build rom and flash it. If bootloop, you use logcat find bugs

P/s:Use logcat and edit smali, you can build aosp, cm9, miuiv4 or any rom ics :D

Good luck :highfive: