[Android Software Development] Forever Alone:
Advance for N00bs

Never say thanks,hit it :D​

How to make Rom transparent

See my guide = http://xdaforums.com/showthread.php?t=1799373

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How to decompile android app , u need this TUT for making rom transparent or editing apps..

See my guide= http://xdaforums.com/showthread.php?t=1772220

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How to add powermenu on your Rom

http://xdaforums.com/showthread.php?t=811532

Thanks untermensch

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Some tweaks making Rom fast

http://www.mediafire.com/?t8rsdmedu5w2vo5 (by me)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How to Deodex Rom and >odex back

Things nEeded

backsmali.jar
* smali.jar
* custom java.awt.jar
* dexopt wrapper
* recent version of busybox

Download this

Open CMD CD to folder extracted those scripts and type

1 Deodexing Framework files-

java -Xmx1024m -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex

(i am taking android.policy.jar as example , if framework.jar or whatever just change 'android.policy.jar' to 'framework.jar' and 'framework.odex'

This will make out folder

now smali that out folder by

typing

java -Xmx1024m -jar smali.jar out -o classes.dex

in CMD

open android.policy.jar with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed android.policy.jar

2 Deodexing any App file i am taking systemUI.apk as example

java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x SystemUI.odex

Again out folder created now make it smali

by typing

java -Xmx1024m -jar smali.jar out -o classes.dex

in CMD

3 Now we will learn to odexing back

1/ backup your original files (apk jar and odex) to /sdcard/Mod/

2/ copy modified deodexed files (.apk and .jar) in /system/framework/

3/ open a CMD prompt in the folder of adb.exe (usualy /android-sdk-windows/platform-tools/)

4/ type command :

adb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar

response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---

## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jaradb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar

response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---

## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar

It will makepatched_apknameyouodexing file now remove (renaming) "patched_" line so it will be "apknameyouodexing.odex"

Now copy Signatures- (in same CMD)

# if not already done ...
adb shell
su

# copy the original .odex and .jar in system/framework (not .apk) :
cp /sdcard/MOD/original.XXX.odex /system/framework
cp -f /sdcard/MOD/XXX.jar /system/framework # where XXX.jar is the original odexed .jar

# give all permissions to XXX.odex files :
chmod 777 /system/framework/original.XXX.odex
chmod 777 /system/framework/patched_XXX.odex

# copy signature :
busybox dd if=/system/framework/original.XXX.odex of=/system/framework/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

response must be :
busybox dd if=/system/framework/original.XXX.odex of=/system/framewor
k/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.002042 seconds, 9.6KB/s

Done now odex/deodex your Rom , so easy!

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Changing splash Screen (bootsccreen before bootanimation)

Ok. 1st of all i dont maDe this script and i dont know who made it xD but i would day 'thanks' to Him

http://www.mediafire.com/?sr6lso6w7vj21o6

How to use this!! >>??

Decompile boot.img Scroll down to see HoW to decompile it/use DSIXDA kitchen

Ramdisk>initlogo.rle (make new folder and paste initlogo.rle into it)

now extract that downloaded kit in it

1 Now open CD to location and type

convert_image to rle.bat initlogo.rle

(if u named .rle file to 'yourfilename'

then type

convert image to rle.bat yourfilename.rle

2 the filename.raw file and filename.rle file will be created at the same location as filename.rle

Now yoU will see filename.png edit it like what you Want xD

3 For compiling filename.png to .rle , CD to that folder having dose files!

typE

convert rle to image.bat filename.png

Use this if you see Decompiled .rle Burred-

@bin\convert -depth 8 -size 333x774 rgb:initlogo.raw initlogo.png

(take your phone's size i just took which my mind told xD)

4 Now you will see new file named

filename.png.rle rename it to filename.rle

Done now replace it into your extracted boot.img and repack it :D

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Decompilng Boot.img

I didnt made this Script http://www.modaco.com/topic/340710-tool-edit-bootimg/ is originall thread :) thanks to him

Download Boot.img tools

So easy to use :D

Just extract it in folder

Now place boot.img also in it

Now open 'start.bat'

* Press 1 to decompile the boot.img

* replace the ramdisk.gz (if you want)

* replace the kernel (if you want)

* Press 2 and it will compile the boot.img again!

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Modifying updater-script (found in /META-INF/com/google/android)

Open with Notepad++

Now you can see in this pic theres written 'Welcome to Cm installer....'

How to make this!

open updater-script

you will see 1st line ! make enter so you can add 1 line (at first)

Now add

ui_print("your text anything");

package_extract_dir("system", "/system");

tells extract directory system to system (in android)

mount("system");

tells mount specific directory like u can change location to dev folder

unmount("/system");

means unmount from where you mounted ! before

show_progress(0.200000, 5);

tells us that show progress like you can see when installing Rom yellow lines comes (CWM) u can control by this. its by Seconds..

symlink("busybox", "/system/xbin/fold");

means make symbolic link to that file at folder 'xbin'

format("MTD", "system");

means format mounted system folder

delete("/data/local");

Tells that delete /data/local folder

set_perm(0, 0, 0777, "/system/bin/chka2sd");

set pem means setting permission like chka2sd permission rww-rww-rww

assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));

it means flash boot.img make raw file (image) at tmp/boot (afterwards android do which i dunno) and delete that file!

Now save this file :D

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Modifying settings.apk

Creed$ rom!

you can see 'author name' which is not in our normal settings!

how he D!d?

Decompile apk by apkmanager ( i wont tell again xD , not by apktool )

1 goto res>xml open "device_info_settings.xml"

2 scroll to last and add line before "</PreferenceScreen>" line

3 add this line

<Preference android:title="Rom name (or whatever" android:summary="My rom name (what ever)" style="?android:preferenceInformationStyle" />

you can add many of them

4 Now compile from apkmanager when ask delete any file from 'keep folder' delete this file from keep folder and Install apk :)

too easy!

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Enabling CRT animation on 2.3x

CRT animation is dam cool animation effect when locking phone :) so see how to make in your rom

But what is it?

[YOUTUBE]http://www.youtube.com/watch?v=ob4PN7s4WcY&feature=player_embedded[/YOUTUBE]

1 Decompile framework-res.apk

2 goto res>values>bools.xml

3 Change "<bool name="config_animateScreenLights">true</bool>" to "<bool name="config_animateScreenLights">false</bool>"

Done.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Swipe to clear notifications

http://xdaforums.com/showthread.php?t=1483193

thanks hansip87

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

When i do something (just that thing which i moded) i got bootloap/loop!

1 Open that think you will get loop

2 open terminal

3 type

su
logcat>sdcard/logcat.txt

So end. i will add more if i got any in mind/guidE xD