[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 :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
- 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 :
- 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 :
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 :
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 :
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 :
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
GUIDE FOR GINGERBREAD
1. How to change text color on flipfont chooser/option at dark pop up for Samsung Stock Gingerbread ROM
Screenshot :
Before :
After :
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 :
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 :
After :
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
GUIDE FOR ICS AND JELLY BEAN ROM
1. How to edit activity tltle bar on ICS and JB (CM9/CM10/CM10.1)
Screenshot :
Before :
After :
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 :
After :
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 :
After :
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
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://forum.xda-developers.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)
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)
- Open AndroidManifest.xml using Text Editor (Like NotePad++) and see like this line
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
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
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
hay sir.. yu'r awesome..
nice guide :thumbup:
Sent from my GT-I8150 using xda premium
RizaLeon said:
hay sir.. yu'r awesome..
nice guide :thumbup:
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
Thanks mate... More guide will come...
or you want to adding some tutorial? Hehe..
It's awesome thread. I got new knowledge.. thank you
Sent from my GT-I8150
ibanez7 said:
Thanks mate... More guide will come...
or you want to adding some tutorial? Hehe..
Click to expand...
Click to collapse
I'm waiting for it..
ohh mate.. I don't have a tutorial I just nubie
Sent from my GT-I8150 using xda premium
WOW... awesome.. :fingers-crossed:
thanks for ur guide :highfive:
RizaLeon said:
I'm waiting for it..
ohh mate.. I don't have a tutorial I just nubie
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
Not a newbie... You will be a master...
Linq'z QIrls'z Chinese said:
WOW... awesome.. :fingers-crossed:
thanks for ur guide :highfive:
Click to expand...
Click to collapse
Thanks sist linq, I hope this is helpful
Thanks for the tutorial sir :good:
Update May 8, 2013
Some guide/tutorial and screenshot is added, more guide will come...
ibanez7 said:
Some guide/tutorial and screenshot is added, more guide will come...
Click to expand...
Click to collapse
Awesome
Learned Decompiling and Recompiling of apks from ur thread
Thnx
when i compile SemcGenericUxpRes.apk, aapt.exe stop working, why?
teztaz--v3 said:
Thanks for the tutorial sir :good:
Click to expand...
Click to collapse
Fang Leone said:
Awesome
Learned Decompiling and Recompiling of apks from ur thread
Thnx
Click to expand...
Click to collapse
You are welcome guys.....
rizone27 said:
when i compile SemcGenericUxpRes.apk, aapt.exe stop working, why?
Click to expand...
Click to collapse
Visit this thread, maybe can help you :
http://forum.xda-developers.com/showthread.php?t=2190716
Visit this thread, maybe can help you :
http://forum.xda-developers.com/showthread.php?t=2190716[/QUOTE]
Yeah very help me and success :fingers-crossed:
Thanks for tutorial
Is zipaligning not important anymore? The amount of guides I read that don't even mention it is quite shocking.
For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain.
Click to expand...
Click to collapse
- What Is Zipalign In Android And How To Make Apps Zipaligned [Complete Guide]
thanks for the guide . its very useful. and because of posts like this gives us opportunity to do some modifications. and i know little bit of
compile and recompile stuff and have managed to do some small changes
i want to know some info about following.
im using CM10 ROm . and it has FM radio app. but we cant change station/ volume or stop radio playing with headset button. whenever headset button pressed it plays from Music player. could u tell me where can we modify and enable headphone button to FM radio ? maybe this need some serious modding . but im so curious and i know you guys know the workaround about it .
XperienceD said:
Is zipaligning not important anymore? The amount of guides I read that don't even mention it is quite shocking.
- What Is Zipalign In Android And How To Make Apps Zipaligned [Complete Guide]
Click to expand...
Click to collapse
yes, Zipalign is indeed very important, but I did not include it here because here it has a lot to share about how the way to Zipalign apk. for example :
1. Download and Install Android SDK
2. Go to C:\Program Files\Android\android-sdk\tools
3. Search + copy zipalign.exe and draw9patch.bat and paste in the c:\windows\here
4. Open cmd and typing this code (for fxample Zipalign SystemUI.apk) :
Code:
zipalign -fv 4 SystemUI.apk SystemUI-new.apk
but thanks for your suggestion.. I will add it to the first page
Dilesh Perera said:
thanks for the guide . its very useful. and because of posts like this gives us opportunity to do some modifications. and i know little bit of
compile and recompile stuff and have managed to do some small changes
i want to know some info about following.
im using CM10 ROm . and it has FM radio app. but we cant change station/ volume or stop radio playing with headset button. whenever headset button pressed it plays from Music player. could u tell me where can we modify and enable headphone button to FM radio ? maybe this need some serious modding . but im so curious and i know you guys know the workaround about it .
Click to expand...
Click to collapse
okay, your welcome mate, and thanks for good question...
I think the headset for music player created by default, but for third-party applications may be different configuration with the default application in terms compatibility of the headset. so might have to edit the application itself. and it could be the effect of CM ROMs, because by default does not have FM radio.
you can try to edit it, looking at the layout or smali files, but I have not tried it
Nice Guide My Brother!!
Many THANKS for this awesomeness :good:
I want post simple guidance how to port Trebuchet launcher from CM10.2 for our stock and customs ROMs based on android 4.1-4.2How to:
1.Download installation zip for custom recovery from the link below
http://www.androidfilehost.com/?fid=23060877490001603
2.Open archive and unpack Trebuchet.apk from /system/app/ folder
3.Decomplie Trebuchet.apk
4.Navigate to \Trebuchet.apk\smali\com\cyanogenmod\trebuchet\preference\NumberPickerPreference.smali and find line 223
Code:
const v6, 0x1020310
5.Decomplie your framework-res.apk
6.Navigate to \framework-res.apk\res\values\public.xml and find line
Code:
<public type="id" name="numberpicker_input" id="0x01020310" />
your id 0x01020310 will be different from my one.
7.Use your id from name="numberpicker_input" and replace in NumberPickerPreference.smali in code
Code:
const v6, 0x1020310
remember ignore 0 after 0x
8.Complie your modified apk and replace with my one in flashable archive you downloaded before
9.Flash in custom reovery or just put in system/app on your device with 644 rights.
After installation press menu button when you are on app drawer or homescreen and choose your trebuchet settings.
artur0588 said:
I want post simple guidance how to port Trebuchet launcher from CM10.2 for our stock and customs ROMs based on android 4.1-4.2How to:
1.Download installation zip for custom recovery from the link below
http://www.androidfilehost.com/?fid=23060877490001603
2.Open archive and unpack Trebuchet.apk from /system/app/ folder
3.Decomplie Trebuchet.apk
4.Navigate to \Trebuchet.apk\smali\com\cyanogenmod\trebuchet\preference\NumberPickerPreference.smali and find line 223
Code:
const v6, 0x1020310
5.Decomplie your framework-res.apk
6.Navigate to \framework-res.apk\res\values\public.xml and find line
Code:
<public type="id" name="numberpicker_input" id="0x01020310" />
your id 0x01020310 will be different from my one.
7.Use your id from name="numberpicker_input" and replace in NumberPickerPreference.smali in code
Code:
const v6, 0x1020310
remember ignore 0 after 0x
8.Complie your modified apk and replace with my one in flashable archive you downloaded before
9.Flash in custom reovery or just put in system/app on your device with 644 rights.
After installation press menu button when you are on app drawer or homescreen and choose your trebuchet settings.
Click to expand...
Click to collapse
not bad.. not bad at all...
artur0588 said:
I want post simple guidance how to port Trebuchet launcher from CM10.2 for our stock and customs ROMs based on android 4.1-4.2How to:
1.Download installation zip for custom recovery from the link below
http://www.androidfilehost.com/?fid=23060877490001603
2.Open archive and unpack Trebuchet.apk from /system/app/ folder
3.Decomplie Trebuchet.apk
4.Navigate to \Trebuchet.apk\smali\com\cyanogenmod\trebuchet\preference\NumberPickerPreference.smali and find line 223
Code:
const v6, 0x1020310
5.Decomplie your framework-res.apk
6.Navigate to \framework-res.apk\res\values\public.xml and find line
Code:
<public type="id" name="numberpicker_input" id="0x01020310" />
your id 0x01020310 will be different from my one.
7.Use your id from name="numberpicker_input" and replace in NumberPickerPreference.smali in code
Code:
const v6, 0x1020310
remember ignore 0 after 0x
8.Complie your modified apk and replace with my one in flashable archive you downloaded before
9.Flash in custom reovery or just put in system/app on your device with 644 rights.
After installation press menu button when you are on app drawer or homescreen and choose your trebuchet settings.
Click to expand...
Click to collapse
I get an error while decomplieing, but my id is the same.
This is amazing! THANKS!!!
Hi, first of all, This is my first GUIDE on XDA so I just wanna share this little mod for your Gingerbread devices or any
REQUIREMENTS:
Apktool
Notepad++
Your SystemUI.apk
STEPS:
1. Decompile your SystemUI.apk
2. Go to SystemUI > res > values
3. Open dimens.xml then add this code below </resources>
Code:
<dimen name="status_bar_height">40.0dip</dimen>
4. Save it then Recompile your SystemUI.apk
5. Decompile SystemUI.apk again
6. Go to SystemUI > res > values then open public.xml
7. After that search this code
Code:
<public type="dimen" name="status_bar_height"
8. Copy the id of it. then go to SystemUI > smali > com > android > systemui > statusbar and Open the StatusBarService.smali
9. In StatusBarService.smali, find this:
Code:
.method protected addStatusBarView()V
10. Inside of that method, find this line:
Code:
.line 351
.local v6, res:Landroid/content/res/Resources;
const v1, 0x1050004
invoke-virtual {v6, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v2
11. Change 0x1050004 into the id of status_bar_height you copy before. Then Recompile SystemUI.apk, push to system/app, set permission to rw-r-r and reboot your phone. Done.
Press The THANKS button if it works
Gonna Try!
Hello guys
here i am back with a new guide on adding Ram Info on Recents.
Before starting this guide make sure you have tried this. Because this guide is based on that guide.
[This guide is only for 5.0+]
Credit:-
KachalkinGeorg (The GK)
Requirement (Deodexed):-
1.Settings.apk
2.SystemUI.apk
3.NotePad++
4.Patience.. if you dont have try to get it
First part ( Settings.apk )
1.Decompile Settings.apk
2.Download ramsettings.zip from attachment. Extarct and copy files to your Decompiled Settings
3.Open Settings\res\xml\gk_recents_panel_settings.xml
add below preference
Code:
<PreferenceScreen android:title="@string/recents_panel_title" android:key="recents_panel" android:fragment="com.android.settings.gk.RecentsPanel.RecentsPanelSettings" />
4.Open Settings\res\values\arrays.xml
add below arrays
Code:
<string-array name="recents_clear_all_location_entries">
<item>@string/recents_clear_all_location_top_right</item>
<item>@string/recents_clear_all_location_top_left</item>
<item>@string/recents_clear_all_location_top_center</item>
<item>@string/recents_clear_all_location_bottom_right</item>
<item>@string/recents_clear_all_location_bottom_left</item>
<item>@string/recents_clear_all_location_bottom_center</item>
</string-array>
<string-array name="recents_clear_all_location_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
5.Open Settings\res\values\strings.xml
add below strings
Code:
<string name="recents_panel_title"><b>Recents</b></string>
<string name="recents_panel_category">Recents panel</string>
<string name="recents_button_show_clear_all_title">Clear all button</string>
<string name="recents_button_show_clear_all_summary">Show clear all button</string>
<string name="recents_clear_all_location_title">Clear all location</string>
<string name="recents_clear_all_location_top_right">Top right</string>
<string name="recents_clear_all_location_top_left">Top left</string>
<string name="recents_clear_all_location_top_center">Top center</string>
6.Recompile and Decompile Settings (For id's)
7.Open Settings\com\android\settings\gk\RecentsPanel\RecentsPanelSettings.smali
find
Code:
0x7f09042c
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_right"
find
Code:
0x7f09042d
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_left"
find
Code:
0x7f09042e
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_center"
find
Code:
0x7f09042f
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_right"
find
Code:
0x7f090430
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_left"
find
Code:
0x7f090431
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_center"
find
Code:
0x7f06004b
replace with below id
Code:
<public type="xml" name="gk_recents_panel"
8.Recompile Settings and move to your device
Continued on next post.
Continued.
Final part ( SystemUI.apk )
1.Decompile SystemUI.apk
2.Go to "SystemUI\smali\com\android\systemui\recents"
find "RecentsActivity$5.smali". if you found this smali download this. Extract and copy files to your decompiled SystemUI
if you didnt find "RecentsActivity$5.smali" in "SystemUI\smali\com\android\systemui\recents" Download this. Extract and copy files to your decompiled SystemUI
Click to expand...
Click to collapse
3.Open SystemUI\res\values\ids.xm
add below id's
Code:
<item type="id" name="recents_membar">false</item>
<item type="id" name="recents_memory_bar">false</item>
<item type="id" name="recents_memory_text">false</item>
<item type="id" name="floating_action_button">false</item>
4.Open SystemUI\res\values\dimens.xml
and add below demens
Code:
<dimen name="floating_action_button_height">54.0dip</dimen>
<dimen name="floating_action_button_width">54.0dip</dimen>
<dimen name="floating_action_button_translation_z">12.0dip</dimen>
<dimen name="floating_action_button_margin_side">32.0dip</dimen>
<dimen name="floating_action_button_margin_bottom">45.0dip</dimen>
5.Open SystemUI\res\values\colors.xml
add below colours
Code:
<color name="fab_color">#ffdc4c3c</color>
<color name="floating_action_button_icon_color">#ffffffff</color>
6.Recompile and Decompile SystemUI (For id's)
7.Open SystemUI\smali\com\android\systemui\recents\RecentsActivity.smali
find
0x7f0a0000 - <public type="id" name="clear_recents"
Click to expand...
Click to collapse
( Two Times )
replace with
0x7f0f00e2 - <public type="id" name="floating_action_button"
Click to expand...
Click to collapse
8.Open SystemUI\smali\com\android\systemui\recents\views\RecentsView.smali
Find
Code:
0x7f0f016f
replace with below id
Code:
<public type="id" name="floating_action_button"
find
Code:
0x7f0f00db
replace with below id
Code:
<public type="id" name="clear_recents"
find
Code:
0x7f0f016e
replace with below id
Code:
<public type="id" name="recents_memory_text"
find
Code:
0x7f0f016d
replace with below id
Code:
<public type="id" name="recents_memory_bar"
find
Code:
0x1050011
replace with below id
Code:
<public type="dimen" name="status_bar_height"
( Two Times)
find
Code:
0x7f090038
replace with below id
Code:
<public type="dimen" name="status_bar_header_height"
9.Recompile and move to your device
Enjoy...