[TOOL GB/ICS/JB/KK] Decompile/Recompile apk & jar | Sign | Zipalign | Basic editing

Search This thread

ibanez7

Senior Member
Mar 30, 2012
1,232
6,228
Bandung
this guide work on Deodex apk file?

i try all the step go well but after install settings.apk via Cwm go well to but it show

http://imageshack.us/photo/my-images/69/settingsir.png/

from y ? i just edit some word only (not del) (device_info_settings.xml) i edit in this xml please help

Sure mate, .... This guide works on deodexed rom.. Make sure that you change, replace, or whatever it is .. that you do not miss a single word. you try to repeat again, perhaps there is a missing.. if you get still problem... please post the logcat or xml file that you edit ;)
 

chandarakk

Senior Member
Mar 2, 2012
224
17
Sure mate, .... This guide works on deodexed rom.. Make sure that you change, replace, or whatever it is .. that you do not miss a single word. you try to repeat again, perhaps there is a missing.. if you get still problem... please post the logcat or xml file that you edit ;)

thanks alot bro for help me even am not edit anything i just decompile then rebuile do as instungtion after that i copy to replace setting.apk in phone

it still show like that other phone (m190s korian phone) after replace new setting.apk that i rebuil from apk tool it lost setiing icon from my phone am so confuse
the .xml that i want to edit (device_info_settings.xml ) in setting/res/xml

i edit from <Preference android:title="@string/build_number" android:key="build_number" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" /> to <Preference android:title="special thank to" android:key="build_number" android:summary="Xda forum" style="?android:preferenceInformationStyle" />

here my orginal file setting.apk and framw......
http://www.mediafire.com/download/0et0czjzg34kgn6/test_apk.rar
:crying:

here the screen shot i do






after i reaplace all done i sign setting.apk in (dist folder) then Zipalign as screen shot below



i do all step go well but still not work , and lost iconsetting so confuse
 
Last edited:

ibanez7

Senior Member
Mar 30, 2012
1,232
6,228
Bandung
Hi, @chandarakk, step you are doing is correct, but I'm not sure..whether xml file which you change that makes settings.apk become FC, or this apktool makes settings.apk FC..

okay... try this one apktool,
Download :
http://code.google.com/p/android-apktool/downloads/list

- apktool1.5.2.tar.bz2
- apktool-install-windows-r05-ibot.tar.bz2
(if you use Window)

Extract and replace to apktool on this thread :..
- apktool.jar
- apktool.bat
- aapt.exe


feedback again......;)
 
  • Like
Reactions: chandarakk

hanu_blr

Senior Member
Jul 14, 2011
162
14
bangalore
@ibanez7,

I tried what u suggested, but its always bootloops :(.

1. tried different apk tools 1.5.2, same issue
2 tried with Apktool JB 4.2.2_Signed_By Rizal Lovins Sundanesse.zip, same issue
3. tried APK-Multi-Tool-Stable-RELEASE, same issue.

steps iam doing: fix auto brightness / disable low battery warning
1. decompile framework-res.apk from 4.1.2 JB.
2. In the framework-res/res folder changing the xlm values of arrays(change brightness), integer xml for low battery warning.
3 compile framework-res folder.
4 copy the resource.arcs file from the compiled apk in step 3 to original framework-res.apk.
5. zipalign framework-res.apk
6. flash through cwm. zip
7. bootloops
8. restoring back the orginal framework-res.apk using cwm, still boot loops :(

anyhelp apperciated !

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

apktool.bat b framework-res

zipalign.exe -f -v 4 <apk> <newapk>
 
Last edited:

chandarakk

Senior Member
Mar 2, 2012
224
17
Hi, @chandarakk, step you are doing is correct, but I'm not sure..whether xml file which you change that makes settings.apk become FC, or this apktool makes settings.apk FC..

okay... try this one apktool,
Download :
http://code.google.com/p/android-apktool/downloads/list

- apktool1.5.2.tar.bz2
- apktool-install-windows-r05-ibot.tar.bz2
(if you use Window)

Extract and replace to apktool on this thread :..
- apktool.jar
- apktool.bat
- aapt.exe


feedback again......;)

thaks bro i do all as ur instruntion first post with ur new apktool 1.5.2 still same :crying:
 

ibanez7

Senior Member
Mar 30, 2012
1,232
6,228
Bandung
@ibanez7,

I tried what u suggested, but its always bootloops :(.

1. tried different apk tools 1.5.2, same issue
2 tried with Apktool JB 4.2.2_Signed_By Rizal Lovins Sundanesse.zip, same issue
3. tried APK-Multi-Tool-Stable-RELEASE, same issue.

steps iam doing: fix auto brightness / disable low battery warning
1. decompile framework-res.apk from 4.1.2 JB.
2. In the framework-res/res folder changing the xlm values of arrays(change brightness), integer xml for low battery warning.
3 compile framework-res folder.
4 copy the resource.arcs file from the compiled apk in step 3 to original framework-res.apk.
5. zipalign framework-res.apk
6. flash through cwm. zip
7. bootloops
8. restoring back the orginal framework-res.apk using cwm, still boot loops :(

anyhelp apperciated !

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

apktool.bat b framework-res

zipalign.exe -f -v 4 <apk> <newapk>

thaks bro i do all as ur instruntion first post with ur new apktool 1.5.2 still same :crying:

maybe you edited the wrong ... but if this apktool its wrong.. you can try this method first:
- Install the framework (framework also 2 if needed)
- Decompile apk file you want to edit
- After decompile, don't edit anything.
- Recompile and push back into the system on your device...
and after that..you can see, FC or not...

Please mentioned what the name of your device, and what rom you use...
 
  • Like
Reactions: chandarakk

hanu_blr

Senior Member
Jul 14, 2011
162
14
bangalore
Please mentioned what the name of your device, and what rom you use...

Mine is a jiayuG3, mediatek chipset 6577, with JB 4.1.2 deodexed, in the framework dir, i see mediatek-res.apk too. Do i need to install this 1st and then framework-res.apk ?

looks like mediatek-res.apk is not needed, its not loaded while decompiling !

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat if mediatek-res.apk
I: Framework installed to: C:\Users\chirpy\apktool\framework\2.apk

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat d framework-res.org.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat b -f -d framework-res.org
W: Could not find sources
I: Building resources...
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); us
ing existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android);
using existing value in manifest.
I: Building apk file...

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>
 
Last edited:

Dzepar

Senior Member
Feb 12, 2011
1,220
765
Sony Xperia 10 III
need help.

Sir, can you tell me how can I change claear notification button from cetner to the right? i add screenshot.
thanks
 
Last edited:

ibanez7

Senior Member
Mar 30, 2012
1,232
6,228
Bandung
Sorry guys for my late reply.....


Mine is a jiayuG3, mediatek chipset 6577, with JB 4.1.2 deodexed, in the framework dir, i see mediatek-res.apk too. Do i need to install this 1st and then framework-res.apk ?

looks like mediatek-res.apk is not needed, its not loaded while decompiling !

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat if mediatek-res.apk
I: Framework installed to: C:\Users\chirpy\apktool\framework\2.apk

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat d framework-res.org.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>apktool.bat b -f -d framework-res.org
W: Could not find sources
I: Building resources...
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); us
ing existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android);
using existing value in manifest.
I: Building apk file...

C:\Users\chirpy\Desktop\apktool_jb.4.2.2>

so how the results after decompile and recompile without editing?

Sir, can you tell me how can I change claear notification button from cetner to the right? i add screenshot.
thanks

it's about padding or margin on clear button in statusbar_expanded.xml.. change the number of padding or margin becomes larger.

please post the contents statusbar_expanded.xml here

will this work for windows 8?

try this guy.. and feedback if problem...
 
  • Like
Reactions: Dzepar

Dzepar

Senior Member
Feb 12, 2011
1,220
765
Sony Xperia 10 III
Edit
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" />
    <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" />
    <LinearLayout android:id="@id/buttons_bar" android:layout_width="wrap_content" android:layout_height="wrap_content">
        <com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
        <ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
    </LinearLayout>
    <Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
    <ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
</LinearLayout>
Thank you
 
Last edited:

cevhyruz

New member
Jun 13, 2013
1
0
sign.apk problem

hi, i have a problem in signing, when i put the code it has an error saying " ERROR: unable to acces jarfile signapk.jar"
pls help, thanks and more power :)
 

winzlim

Member
Sep 30, 2012
15
4
Medan
How to decompile and recompile framework-res.apk??
Need to install framework again?
In cmd : apktool if framework-res.apk? < needed?
or directly
apktool d framework-res.apk?
Thanks before :eek: Nice thread btw help a lot :good:
 

ibanez7

Senior Member
Mar 30, 2012
1,232
6,228
Bandung
Edit
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" />
    <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" />
    <LinearLayout android:id="@id/buttons_bar" android:layout_width="wrap_content" android:layout_height="wrap_content">
        <com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
        <ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
    </LinearLayout>
    <Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
    <ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
</LinearLayout>
Thank you

Okay, try to change this line :
Code:
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />

To :
Code:
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" [COLOR="Red"]android:scaleType="right"[/COLOR] android:contentDescription="@string/accessibility_clear_all" />

if still same, just feedback..

hi, i have a problem in signing, when i put the code it has an error saying " ERROR: unable to acces jarfile signapk.jar"
pls help, thanks and more power :)

make sure apktool etc on *.zip save or extract on :

Windows XP : C:\Document and Settings\folder your computer name\here (Without folder)

Windows 7 : C:\User\folder your computer name\here (Without folder)

How to decompile and recompile framework-res.apk??
Need to install framework again?
In cmd : apktool if framework-res.apk? < needed?
or directly
apktool d framework-res.apk?
Thanks before :eek: Nice thread btw help a lot :good:

not installed also had no effect, but I suggest install it...
 
  • Like
Reactions: Dzepar

Dzepar

Senior Member
Feb 12, 2011
1,220
765
Sony Xperia 10 III
Okay, try to change this line :
Code:
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />

To :
Code:
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" [COLOR="Red"]android:scaleType="right"[/COLOR] android:contentDescription="@string/accessibility_clear_all" />

if still same, just feedback..


No luck, when i chang center to right, save. i can't compale the SystemUI.apk
I get this error:
Code:
C:\AndroiSDK\Android\projects\SystemUI.apk\res\layout\status_bar_expanded_header.xml:11: error: Error: String types not allowed (at 'scaleType' with value 'right').
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Dzepar\AppData\Local\Temp\APKTOOL1386489261202298075.tmp, -0, arsc, -I, C:\Users\Dzepar\apktool\framework\1.apk, -S, C:\AndroiSDK\Android\projects\SystemUI.apk\res, -M, C:\AndroiSDK\Android\projects\SystemUI.apk\AndroidManifest.xml]
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:353)
	at brut.androlib.Androlib.buildResources(Androlib.java:281)
	at brut.androlib.Androlib.build(Androlib.java:209)
	at brut.androlib.Androlib.build(Androlib.java:177)
	at brut.apktool.Main.cmdBuild(Main.java:237)
	at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Dzepar\AppData\Local\Temp\APKTOOL1386489261202298075.tmp, -0, arsc, -I, C:\Users\Dzepar\apktool\framework\1.apk, -S, C:\AndroiSDK\Android\projects\SystemUI.apk\res, -M, C:\AndroiSDK\Android\projects\SystemUI.apk\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:406)
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:334)
	... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Dzepar\AppData\Local\Temp\APKTOOL1386489261202298075.tmp, -0, arsc, -I, C:\Users\Dzepar\apktool\framework\1.apk, -S, C:\AndroiSDK\Android\projects\SystemUI.apk\res, -M, C:\AndroiSDK\Android\projects\SystemUI.apk\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:89)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:404)
	... 6 more
Any suggestions??:fingers-crossed:
 

chandarakk

Senior Member
Mar 2, 2012
224
17
maybe you edited the wrong ... but if this apktool its wrong.. you can try this method first:
- Install the framework (framework also 2 if needed)
- Decompile apk file you want to edit
- After decompile, don't edit anything.
- Recompile and push back into the system on your device...
and after that..you can see, FC or not...

Please mentioned what the name of your device, and what rom you use...

sorry for late reply

confirm working smooth with ur new method without sign and Zialign

big thanks bro.....
 

jirka607

Senior Member
Aug 9, 2010
1,887
183
Alšovice
Xiaomi 11T Pro
Can you please tell me what is wrong i decompile classes.dex withou any problem but when i try to compile it using smali it shows command line for a moment and nothing is done new-classes.dex is not there
 

Top Liked Posts

  • There are no posts matching your filters.
  • 152
    [TOOL GB/ICS/JB/KK] Decompile/Recompile apk & jar | Sign | Zipalign | Basic editing

    hello everyone... I want to share the tool for editing apk, and making a slightly guide for decompile/recompile apk and basic editing xml/smali... and this guide and tool for Windows user...





    REQUIREMENTS :

    Download and Install on your computer

    1. JDK here

    2. 7zip here or Winrar (recommended) here

    3. Notepad++ here

    4. Android SDK for patch 9.png until Zipalign the apk here

    5. Apktool & baksmali/smali + Signer for all GB/ICS/JB ROM here

    6. Apktool & baksmali/smali + Signer for all GB/ICS/JB ROM v2 here

    7. Apktool & baksmali/smali + Signer for all GB/ICS/JB/KK ROM v3 (4.4 Kitkat support/optimized) here




    Save or extract apktool to folder directory :

    Windows XP : C:\Document and Settings\folder your computer name\here

    Windows 7 : C:\User\folder your computer name\here






    CREDITS & BIG THANKS TO :

    - Brut.all for apktool
    - Team Reject for Quick baksmali/smali file
    - Yorzua for Sign apk file
    - Rizal Lovins for support me
    - pantrif13







    1. How to Decompile and Recompile *.jar file or classes.dex​

    - Copy *.jar file to apktool folder (make sure is the same folder). for example : android.policy.jar

    - Open android.policy.jar using Winrar or 7zip and extract classes.dex file

    - Drag & drop classes.dex to Quick-Baksmali.cmd (decompile process)

    Screenshot example for Baksmaling/decompile classes.dex using drag & drop method :

    944210_457801300973090_1250194474_n.jpg


    - wait and you will see a folder with the name "classout"

    - now you can start editing smali file on classout folder (use Notepad++ for editing it)

    - After editing is complete, Drag & drop classout folder to Quick-Smali.cmd (recompile process)

    Screenshot example for Smaling/recompile classout folder using drag & drop method :

    308635_457805677639319_1326222474_n.jpg


    - After recompile is complete, there will be a file with a name "new-classes.dex"

    - Open android.policy.jar using Winrar or 7zip

    - Rename new-classes.dex to classes.dex, and Drag & drop to android.policy.jar with normal compression

    - finally, push back android.policy.jar into the system your device. push manual using root explorer/similar application or make a flashable zip.



    2. How to Decompile and Recompile *.apk file​

    a. Copy framework-res.apk to apktool folder (make sure is the same folder).
    (Attention : to edit other default apk on system/app like Contacts.apk, Phone.apk. MusicPlayer.apk etc.. needed framework 2. for example : twframework-res.apk)

    b. Copy other *.apk you want to edit to apktool folder. for example : GreenRockers.apk

    c. Open Command Prompt.bat

    d. Decompile and install framework

    Code:
    apktool if framework-res.apk
    apktool d GreenRockers.apk

    Screenshot example for installing framework and decompiling apk :

    178978_458301597589727_929866297_n.jpg

    if your apk is Contacs.apk, Phone.apk, Camera.apk etc.. follow this guide :

    Code:
    apktool if framework-res.apk
    apktool if twframework-res.apk
    apktool d Settings.apk

    Screenshot example for installing framework 2 and decompiling apk :

    62616_458274757592411_1587662104_n.jpg


    e. wait and you will see a folder with the name "GreenRockers or Settings"

    f. now you can start editing png, xml, even smali file

    g. After editing is complete, Now Recompile

    Code:
    apktool b -f -d GreenRockers

    or

    Code:
    apktool b -f -d Settings

    Screenshot example for decompiling dan recompiling apk :

    270838_457801324306421_626888386_n.jpg

    h. After recompile is complete, go to GreenRockers or Settings folder, Open dist folder and open GreenRockers.apk or Settings.apk using Winrar/7zip

    i. Open Original GreenRockers.apk or Settings.apk Using Winrar/7zip

    j. Drag & drop META-INF folder and android.manifest.xml (if you not edit android.manifest.xml), also lib folder if there in Original GreenRockers.apk to Modified GreenRockers.apk or Modified Settings.apk on dist folder.

    Screenshot example for Drag & drop META-INF folder etc :

    941887_458274747592412_829467582_n.jpg


    k. Now Sign apk, example :

    Code:
    java -jar SignApk.jar testkey.x509.pem testkey.pk8 GreenRockers.apk GreenRockers_signed.apk

    (Attention : Sign apk is only for 3rd Party apps, you can sign apk from system/app. but not all apk on system/app support)

    l. Rename GreenRockers_signed.apk to GreenRockers.apk

    m. Zipalign the apk

    Code:
    zipalign -fv 4 GreenRockers.apk GreenRockers-new.apk

    n. Rename GreenRockers-new.apk to GreenRockers.apk

    o. finally, push back xxxxxx.apk into the system your device. push manual using root explorer/similar application or make a flashable zip.



    3. How to Zipalign the *.apk​

    1. Download and Install Android SDK (if you've downloaded, do not need to download again)

    2. Go to C:\Program Files\Android\android-sdk\tools

    3. Search + copy zipalign.exe and draw9patch.bat then paste in the c:\windows\here

    4. Open cmd and typing this code (For example : Zipalign SystemUI.apk) :

    Code:
    zipalign -fv 4 SystemUI.apk SystemUI-new.apk
    48
    GUIDE FOR ICS AND JELLY BEAN ROM



    1. How to edit activity tltle bar on ICS and JB (CM9/CM10/CM10.1)

    Screenshot :

    Before :

    485506_453021281451092_487745334_n.jpg


    After :

    625659_443424919077395_1278360920_n.jpg




    a. Decompile framework-res.apk

    b. Go to framework-res folder/res/drawable-hdpi (or mdpi/xhdpi). and search *.png file with name :

    - ab_bottom_solid_dark_holo.9.png
    - ab_solid_dark_holo.9.png
    - ab_stacked_transparent_light_holo.9.png
    - ab_transparent_dark_holo.9.png
    - ab_transparent_light_holo.9.png

    c. replace all *.9.png file with your favorit *.9.png (Recommended resolution is 720x100 for XHDPI, or download source png for example from my theme Green Rocker CM10 on attachment)

    d, Recompile

    e. if you want to change too setting icon on title bar, just decompile settings.apk and go to settings/res/drawable-***dpi and change ic_launcher_settings.png and recompile.





    2. How to change quick settings background on CM10.1

    Screenshot :

    Before :

    936131_458312720921948_542987543_n.jpg


    After :

    63432_443424855744068_575071938_n.jpg



    a. Decompile SystemUI.apk

    b. Go to SystemUI\res\drawable and open qs_tile_background.xml using notepad ++

    Change this line :

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <selector
      xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true">
            <color android:color="#ff212121" />
        </item>
        <item>
            <color android:color="#ff161616" />
        </item>
    </selector>

    To :

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <selector
      xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true" [COLOR="Red"]android:drawable="@drawable/qs_tile_background_pressed" />
        <item android:drawable="@drawable/qs_tile_background_normal" />[/COLOR]
    </selector>

    c. Add source 2 *.png file to drawable-xxxxdpi folder with name (you are free to choose any image including transparent) :
    - qs_tile_background_pressed
    - qs_tile_background_normal

    d. Recompile






    3. How to change text color and underline color at Popup on CM9/CM10/CM10.1

    Screenshot :

    Before :

    941136_458312704255283_1080488990_n.jpg


    After :

    942076_458274804259073_1221048092_n.jpg



    a. Decompile framework-res.apk

    b. Go to framework-res\res\values and open colors.xml using notepad ++

    c. Change this line (for example : change blue color to green color) :
    Code:
    <color name="holo_blue_light">#ff33b5e5</color>

    To :

    Code:
    <color name="holo_blue_light">[COLOR="Red"]#ff9cc912[/COLOR]</color>

    Note : but this is quite global, there is some text that will be replaced. to more specifically, you can edit it in this line :​

    - Go to framework-res\res\values and open style.xml using notepad ++

    - Search this line :
    Code:
    <style name="TextAppearance.Holo.DialogWindowTitle" parent="@*android:style/TextAppearance.Holo">
            <item name="android:textSize">22.0sp</item>
            <item name="android:textColor">[COLOR="Red"]@color/holo_blue_light[/COLOR]</item>
        </style>

    and :
    Code:
    <style name="TextAppearance.Holo.Light.DialogWindowTitle" parent="@*android:style/TextAppearance.Holo.Light">
            <item name="android:textSize">22.0sp</item>
            <item name="android:textColor">[COLOR="Red"]@color/holo_blue_light[/COLOR]</item>
        </style>

    Change/Replace to :

    Code:
    <style name="TextAppearance.Holo.DialogWindowTitle" parent="@*android:style/TextAppearance.Holo">
            <item name="android:textSize">22.0sp</item>
            <item name="android:textColor">[COLOR="Red"]#ff9cc912[/COLOR]</item>
        </style>

    And
    Code:
    <style name="TextAppearance.Holo.Light.DialogWindowTitle" parent="@*android:style/TextAppearance.Holo.Light">
            <item name="android:textSize">22.0sp</item>
            <item name="android:textColor">[COLOR="Red"]#ff9cc912[/COLOR]</item>
        </style>


    d. Recompile






    More guide will come
    34
    GUIDE FOR GINGERBREAD





    1. How to change text color on flipfont chooser/option at dark pop up for Samsung Stock Gingerbread ROM

    Screenshot :

    Before :

    538030_452980494788504_243340317_n.jpg


    After :

    485543_452980504788503_1012291459_n.jpg



    a. Decompile Settings.apk (use apktool) or classes.dex in settings.apk (use baksmali)

    b. Go to com/android/settings/flipfont and open the fontlistadapter.smali with notepad ++

    c. search this line :
    const/high16 v6, -0x100

    d. change/replace const/high16 v6, -0x100 to const/high16 v6, -0x1

    e. recompile.





    2. How to change text color on dark pop up (Font size) at accessibility settings for gingerbread ROM

    Screenshot :

    563419_416241711795716_152125509_n.jpg



    a. Decompile Settings.apk (use apktool) or classes.dex in settings.apk (use baksmali)

    b. Go to smali\com\android\settings and open the FontSizeListAdapter.smali with notepad ++

    c. Search this line :
    const v7, -0x1

    d. change/replace const v7, -0x1 to const/high16 v7, -0x1

    e. Go to res\xml and open accessibility_settings.xml

    f. Search this line :

    Code:
    <com.android.settings.FontSizeListPreference android:title="@string/font_size_title" android:key="font_size" android:summary="@string/font_size_title" />

    Change or add color (Red text)

    Code:
    <com.android.settings.FontSizeListPreference android:title="@string/font_size_title" [COLOR="Red"]android:textColor="#FFFFFF"[/COLOR] android:key="font_size" android:summary="@string/font_size_title" />

    g. Recompile





    3. How to BIG Photo when calling on Samsung stock gingerbread ROM

    Screenshot :

    Before :

    934688_458274777592409_1481276667_n.jpg


    After :

    401901_458274730925747_66636397_n.jpg



    a. Decompile Phone.apk

    b Go to phone\res\layout and open call_card_person_info.xml using notepad ++

    c. Change all this lines (maybe some device is different) :

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <LinearLayout android:gravity="center_horizontal" android:orientation="vertical" android:id="@id/callCardPersonInfo" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <RelativeLayout android:layout_width="fill_parent" android:layout_height="123.0dip">
                <FrameLayout android:layout_width="123.0dip" android:layout_height="123.0dip" android:layout_centerHorizontal="true">
                    <ImageView android:id="@id/photo" android:layout_width="123.0dip" android:layout_height="123.0dip" />
                    <LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/birthPanel" android:background="#77000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="33.0dip">
                        <ImageView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/call_birthday_icon2" />
                        <TextView android:textSize="20.0sp" android:textColor="@color/twcolor001" android:layout_gravity="center_vertical" android:id="@id/birthdayRemainedDays" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:text="@string/BirthDay_remainedDays0" android:singleLine="true" />
                    </LinearLayout>
                </FrameLayout>
            </RelativeLayout>
            <LinearLayout android:layout_gravity="center_horizontal" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="43.0dip" android:layout_marginTop="12.0dip">
                <ImageView android:layout_gravity="center_vertical" android:id="@id/birthIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/call_birthday_icon" />
                <TextView android:textSize="31.0sp" android:textColor="@color/twcolor001" android:gravity="center_vertical" android:id="@id/name" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="43.0dip" android:singleLine="true" />
            </LinearLayout>
            <TextView android:textSize="21.0sp" android:textColor="@color/phone_number" android:gravity="center_vertical" android:id="@id/phoneNumber" android:layout_width="wrap_content" android:layout_height="29.0dip" android:singleLine="true" />
            <TextView android:textSize="20.0sp" android:textColor="@color/twcolor003" android:gravity="center_vertical" android:id="@id/cdnipNumber" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:text="@string/unknown" android:singleLine="true" />
        </LinearLayout>
    </FrameLayout>

    To :

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <LinearLayout android:gravity="center_horizontal" android:orientation="vertical" android:id="@id/callCardPersonInfo" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
                <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_centerHorizontal="true">
                    <ImageView android:orientation="vertical" android:id="@id/photo" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="0.0dip" />
                    <LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/birthPanel" android:background="#77000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="33.0dip">
                        <ImageView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/call_birthday_icon2" />
                        <TextView android:textSize="20.0sp" android:textColor="@color/twcolor001" android:layout_gravity="center_vertical" android:id="@id/birthdayRemainedDays" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:text="@string/BirthDay_remainedDays0" android:singleLine="true" />
                    </LinearLayout>
                </FrameLayout>
            </RelativeLayout>
            <LinearLayout android:layout_gravity="center_horizontal" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="43.0dip" android:layout_marginTop="12.0dip">
                <ImageView android:layout_gravity="center_vertical" android:id="@id/birthIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/call_birthday_icon" />
            </LinearLayout>
        </LinearLayout>
        <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
            <TextView android:textSize="16.0sp" android:textColor="@color/twcolor001" android:gravity="center_horizontal" android:id="@id/name" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="48.0dip" android:layout_marginTop="88.0dip" android:lines="2" android:singleLine="false" android:shadowColor="#ff000000" android:shadowDx="2.0" android:shadowDy="2.0" android:shadowRadius="2.0" android:layout_centerHorizontal="true" />
            <TextView android:textSize="16.0sp" android:textColor="@color/phone_number" android:gravity="center_horizontal" android:id="@id/phoneNumber" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="29.0dip" android:layout_marginTop="126.0dip" android:singleLine="false" android:shadowColor="#ff000000" android:shadowDx="2.0" android:shadowDy="2.0" android:shadowRadius="2.0" android:layout_centerHorizontal="true" />
            <TextView android:textSize="16.0sp" android:textColor="@color/twcolor003" android:gravity="center_horizontal" android:id="@id/cdnipNumber" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/unknown" android:singleLine="true" />
        </RelativeLayout>
    </FrameLayout>

    d. Go to phone\res\drawable-hdpi or xxx-dpi and search *.png file with name :
    - call_ani_00
    - call_ani_in_01
    - call_ani_in_02
    - call_ani_in_03
    - call_ani_in_04
    - call_ani_in_05
    - call_ani_in_06
    - call_ani_in_07
    - call_ani_out_01
    - call_ani_out_02
    - call_ani_out_03
    - call_ani_out_04
    - call_ani_out_05
    - call_ani_out_06
    - call_ani_out_07

    e. Replace with your favorite image (Minimal resolution is 480x460 or Higher for HDPI device), download source image for example on attachment.

    f. Recompile.


    4. How to make transparancy on Gingerbread (Following wallpaper)


    Click here to guide "How to make transparancy on Gingerbread"


    More guide will come
    25
    Update July 8, 2013

    [Update]

    Hi guys, if you have problems with this tool .. when you have to make sure to edit apk files, or jar files are correct but the error recompiling.
    you can try this tool (Update v2), hope this helps.

    Download :
    http://d-h.st/3KU
    24
    ABOUT ME

    WHO IS MASTER RIZAL LOVINS ???

    JUST FOLLOW ME OR ADD ME AS YOUR FRIEND ON SOCIAL NETWORKS




    A little tips/guide/info to port apps from the platform, this is doesn't mean all the applications of the platform can be ported!!!

    This is just example

    Ok Let's start!!! ;)


    Requirement :

    1. Knowledge in decompile/recompile/sign/zipalign apk file (apps) (In the first post )

    2. Knowledge to find library file (*.so file) and framework file (*.jar) whats needed from apps

    3. Knowledge to use LogCat

    - if you don't know how to do this, visit this thread http://xdaforums.com/showthread.php?t=2274119

    How can I know what's library is needed? :

    1. Knowledge is in need if the library doesn't exist in apk file, locate the name of the library file (*.so file) that may be related to the application (the file name may be a bit the same with the application) you can search in system>lib

    2. If library file already exist in apk file /folder lib>armeabi/armeabi-v7 (You just need to extract it from apk file and take the file *.so)

    1390685_1376164759288317_784663848_n.jpg


    3. To see what's apps required library framework file :

    - Decompile apps with using file framework-res.apk from that ROM apps (Also maybe need framework 2 like SemcGenericUxpRes.apk or twframework-res.apk etc)

    1381721_1376164639288329_404257341_n.jpg


    - Open AndroidManifest.xml using Text Editor (Like NotePad++) and see like this line

    1384300_1376164685954991_1611404921_n.jpg


    Leave file has been decompiled and Take it file name (In list androidmanifest) from the ROM file that you want to ported from system>framework also take permission framework file (*.xml) from system>etc>permission


    What should i do know? :

    1. First times you need download Full ROM is there already deodexed so you can take some file you need to ported
    2. If you already understand what i said above, lets start to final section
    3. If you already take all file what you need to port, collect all the files, and prepare cwm zip updater, add the file to zip with right folder

    *.Apk file must be in system>app

    *.So file must be in system>lib

    *.jar file must be in system>framework

    *.xml file permissions framework must be in system>etc>permissions

    564065_1376164732621653_257947863_n.jpg


    This section is not modified the apps, first you can try flash it with CWM and see its working or not, if not working (FC) you need to see whats wrong in logcat (FATAL ERROR)

    Or the problem apps parsing error because your Android Version is lower (e.g apps JB to ICS)

    Now you need to decompile that apps

    Go to smali folder and search what's wrong in logcat, if you already fix it

    Then open AndroidManifest.xml try to change minimal sdk version from Android_manifest or in apktool.yml

    1377208_1376196905951769_1861282843_n.jpg


    1381343_1376196852618441_1574383812_n.jpg



    Code:
    minSdkVersion: '[COLOR="Red"]16[/COLOR]'
    targetSdkVersion: '17'

    Change to this number

    Code:
    minSdkVersion: '[COLOR="Red"]14[/COLOR]'
    targetSdkVersion: '17'

    save all changes

    then recompile, sign and zipalign


    NOTE :
    1. You should right with signing the apps, Use Auto TESKEYS

    2. Not All apps can be ported to lower Android Version by changed minimal sdk