[MOD][HOW TO][JB] Delete quick toggle text - Galaxy Note GT-N7000 Themes and Apps

Hi I found this thread: http://forum.xda-developers.com/showthread.php?t=1770698
So I thought about creating such thing for our galaxy notes, so here I'll post my steps and my SystemUI.apk
{
"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"
}
Credits go to:
Freeza for providing these codes
and me for modifying it a little.
I'm using SystemUI.apk from ultimate rom, don't know if it will work for another rom
I'll post the tutorial from the specified thread above, but i'll add my own modifications to make it fit!
so lets start.
I have seen inquiries about how to mod the quick toggle area to remove it. It's a fairly easy modification to make. Especially if you already know how to decompile and recompile SystemUI.apk
For the sake of making this HOW-TO short and to the point, I'm going to assume you already know how to successfully decompile and recompile SystemUI.apk.
Let me first start out by apologizing because this is kind of sloppy. It may require less steps but once I got it, I didn't bother going back to figure out if it did require less steps or not.
Start off by decompiling SystemUI.apk
Next, navigate to /res/layout/tw_quick_setting_button.xml
Open it with your favorite editor
LOOK FOR:
Code:
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_height">
CHANGE:
Code:
android:layout_height="@dimen/quick_setting_button_height"
For complete removal of quick toggle settings:
TO:
Code:
android:layout_height="0.0dip"
For text removal like my mod:
TO
Code:
android:layout_height="50.0dip"
LOOK FOR:
Code:
Code:
<TextView android:textSize="@dimen/quick_setting_button_text_size" android:textColor="#ffafc5dc" android:gravity="center" android:id="@id/btn_text" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_text_height" android:includeFontPadding="false" />
CHANGE:
Code:
android:textSize="@dimen/quick_setting_button_text_size"
For complete or text removal:
TO:
Code:
android:textSize="0.0dip"
Save & close
Navigate to /res/layout/tw_status_bar_expanded.xml and open with editor
LOOK FOR:
Code:
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
CHANGE:
Code:
android:layout_height="wrap_content"
For complete removal:
TO:
Code:
android:layout_height="0.0dip"
For text removal like my mod:
TO:
Code:
android:layout_height="50.0dip"
If you want to remove the carrier ID (Sprint):
LOOK FOR and REMOVE:
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:textSize="@dimen/status_bar_expanded_plmn_text_size" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/date" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
Save & close
These next parts probably aren't needed but I did them anyway. If you want to try compiling and using your SystemUI.apk, go for it and report back. If you want to follow exactly what I did, keep reading..
Navigate to /res/layout/tw_status_bar_toggle_slider.xml and open with editor
LOOK FOR:
Code:
<TextView android:textSize="15.0dip" android:textColor="#ffd7d7d7" android:id="@id/label" android:layout_width="46.0dip" android:layout_height="wrap_content" android:layout_marginRight="4.0dip" android:singleLine="false" android:layout_alignParentRight="true" android:layout_centerVertical="true" />
CHANGE:
Code:
Code:
android:textSize="15.0dip"
For complete or text removal
TO:
Code:
android:textSize="0.0dip"
Save & Close
Navigate to /res/values/dimens.xml and open with editor
LOOK FOR:
Code:
<dimen name="quick_setting_button_text_height">30.0dip</dimen>
<dimen name="quick_setting_button_text_size">13.0dip</dimen>
For complete or text removal:
CHANGE TO:
Code:
<dimen name="quick_setting_button_text_height">0.0dip</dimen>
<dimen name="quick_setting_button_text_size">0.0dip</dimen>
Save & Close
Finally, navigate to /res/values/strings.xml and open with editor
LOOK FOR:
Code:
<string name="status_bar_settings_wifi_button">Wi-Fi</string>
<string name="status_bar_settings_airplane">Airplane mode</string>
<string name="status_bar_settings_auto_rotation">Auto-rotate screen</string>
<string name="status_bar_settings_mute_label">MUTE</string>
For complete or text removal:
CHANGE TO:
Code:
<string name="status_bar_settings_wifi_button"></string>
<string name="status_bar_settings_airplane"></string>
<string name="status_bar_settings_auto_rotation"></string>
<string name="status_bar_settings_mute_label"></string>
LOOK FOR:
Code:
<string name="quickpanel_wifi_text">Wi-Fi</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_silent_mode_text">"Silent
mode"</string>
<string name="quickpanel_silent_mode_sound">Sound</string>
<string name="quickpanel_silent_mode_vibrate">Vibrate</string>
<string name="quickpanel_silent_mode_mute">Mute</string>
<string name="quickpanel_rotation_text">"Screen
rotation"</string>
<string name="quickpanel_mobile_data_text">"Mobile
data"</string>
<string name="quickpanel_notification_text">Notification</string>
<string name="quickpanel_airplane_mode_text">"Flight
mode"</string>
<string name="quickpanel_sync_text">Sync</string>
<string name="quickpanel_wifi_display_text">"AllShare
Cast"</string>
<string name="quickpanel_power_saving_text">"Power
saving"</string>
<string name="quickpanel_driving_mode_text">"Driving
mode"</string>
<string name="quickpanel_error_text">Error</string>
<string name="quickpanel_ctwap_text">CTWAP</string>
<string name="quickpanel_ctnet_text">CTNET</string>
For complete or text removal:
CHANGE TO:
Code:
<string name="quickpanel_wifi_text"></string>
<string name="quickpanel_bluetooth_text"></string>
<string name="quickpanel_gps_text"></string>
<string name="quickpanel_silent_mode_text"></string>
<string name="quickpanel_silent_mode_sound"></string>
<string name="quickpanel_silent_mode_vibrate"></string>
<string name="quickpanel_silent_mode_mute"></string>
<string name="quickpanel_rotation_text"></string>
<string name="quickpanel_mobile_data_text"></string>
<string name="quickpanel_notification_text"></string>
<string name="quickpanel_airplane_mode_text"></string>
<string name="quickpanel_sync_text"></string>
<string name="quickpanel_wifi_display_text"></string>
<string name="quickpanel_power_saving_text"></string>
<string name="quickpanel_driving_mode_text"></string>
<string name="quickpanel_error_text"></string>
<string name="quickpanel_ctwap_text"></string>
<string name="quickpanel_ctnet_text"></string>
LOOK FOR:
Code:
<string name="quickpanel_data_roaming_text">"Data
roaming"</string>
For complete or text removal:
CHANGE TO:
Code:
<string name="quickpanel_data_roaming_text"></string>
Save & close
Now, a lot of these could have simply been removed from the XML, but I decided to mod their values to preserve structure in case I want to put things back the way they were. If you want to experiment with removing the entire "LOOK FOR:" line, please report back the results.
Click to expand...
Click to collapse
If you compile it right now, you'll notice an ugly space between the toggles and the brightness selector. I haven't figured out yet how to make it fit, while the brightness selector is turned off... (without the need to push a new SystemUI.apk)
But for now, while the brightness selector is turned on you can do the following:
LOOK FOR:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
CHANGE TO:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="50.0dip" android:layout_marginTop="-44.0dip">
Not Tested:
I guess this should work if you want to disable the brightness selector
LOOK FOR:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
CHANGE TO:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="-44.0dip>
Compile, push to /system/app/ and change permissions to 644 and reboot or create flashable zip to flash in recovery.
This was my way of doing it.
If you get stuck with apktool you should use this guide, it helped me out: http://forum.xda-developers.com/showthread.php?t=1814441
Good luck!
If I helped you, please press thanks:laugh:

great tutorial!
do you know how to resize text for toggles buttons?
i installed the 23 toggles and text for brightness, shutdown its not properly laid out, last letter goes on a second line...
thanks

Great Job
Thx

If I am working with a Custom ROM file in Zip format on a desktop, can the XML files that need editing be removed from the ZIP via 7-Zip, edited on a desktop and be added back in via 7-Zip?
Which is the long way of asking if this is do-able without de-compiling and re-compiling.

god job..but kind of hard to understand..

justppc said:
If I am working with a Custom ROM file in Zip format on a desktop, can the XML files that need editing be removed from the ZIP via 7-Zip, edited on a desktop and be added back in via 7-Zip?
Which is the long way of asking if this is do-able without de-compiling and re-compiling.
Click to expand...
Click to collapse
I don't understand you completely, but you can't edit the xml files this way, when compiled. The only way to do this without decompiling is to make use of an hex editor.

Related

[MODz]Advanced Theming Mods Collection

{
"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"
}
DISCLAIMER NOTE: I AND XDA IS NOT TO BE HELD RESPONSIBLE FOR ANY DAMAGES THAT YOUR PHONE MIGHT INCUR DURING THIS PROCESS, I HAVE TESTED IT IN MY BEST KNOWLEDGE TO WORK FOR OUR DEVICE BUT JUST TO BE SURE, PLEASE PERFORM ALL NECESSARY BACKUPS FOR THE PHONE TO PREVENT ANY DATA LOSS, IF YOU HAVE THE NEED TO DISAGREE AND/OR FAIL TO COMPLY JUST DONT FLASH IT AND GET ON WITH YOUR LIVES
Click to expand...
Click to collapse
PLEASE RESPECT MY WORK, DO NOT UPLOAD THIS TO OTHER WEBSITES, P2P, FTP AND OTHER MEANS OF FILE TRANSFER WITHOUT MY CONSENT, ALSO IF U WANT TO INCLUDE THIS IN YOUR WORK/ DEVELOPMENT, OR IF YOU BASE YOUR WORK IN ANY OF MY FILES THAT IS CONTAINED WITHIN THE DATA PLEASE CREDIT ME AND LINK THE FILES HERE OR ELSE IMMEDIATE LEGAL/ARBITRARY ACTION WILL BE UNDERTAKEN BY ME IN ORDER TO REMOVE THE FILES ON YOUR BEHALF IF EVER YOU NEED TO POST IT IN YOUR BLOG/WEBSITE, IF YOU FEEL YOU ARE NOT SATISFIED WITH MY WORK, CONSTRUCTIVE CRITICISMS IN A RESPECTFUL AND DECENT MANNER ARE ALWAYS WELCOME
Click to expand...
Click to collapse
IF YOU DON'T KNOW WHAT YOU ARE DOING,
BETTER NOT MESS WITH YOUR SYSTEM OR ELSE IT WILL CAUSE UNDESIRED OPERATION,
Prerequisites:
1. ANDROID GINGERBREAD DEVICE (Preferably deodexed Stock ROM)
2. Decompiling Studio (Apktool, VTS- (recommended), Apk Multi-tool, Android SDK)
3. Winrar (or any archive reader and writer software)
4. Patience
5. A keen eye
6. Coffee (lots and lots of em)
Click to expand...
Click to collapse
What's Not Covered in this Tutorial
1. Decompiling System App process
2. Recompiling System App Process
3. Installing Android SDK and Development Studio (VTS, Apktool, etc.)
Click to expand...
Click to collapse
[Moving Clock to status bar notifications]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/layout/status_bar.xml
3. Search for this line and remove it from the xml
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
4. Go to res/values/ids,xml
add this below the last item type before </resources>
Code:
<item type="id" name="clock">false</item>
5. Now, Go to res/layout/status_bar_expanded.xml
Search for this code
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/quickpanel_plmn_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
then paste this code below the code above
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="20.0sp" android:gravity="center" android:id="@id/clock" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
6. Recompile the apk
Additional Instructions if Modified from a custom rom:
7. Extract inside classes.dex from the unmodified systemui.apk
8. Delete classes.dex from the new systemui.apk
9. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
[Moving Carrier Logo to bottom of status bar]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/layout/status_bar_expanded.xml
3. Search for this line and remove it from the xml
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
4. Create a PNG with dimensions of 240x26px (240 width 26 height by pixels) save it as deathnotice_shade.png save to res/drawable-ldpi
5. Go to res/values/ids,xml
add this below the last item type before </resources>
Code:
<item type="id" name="carrier_label_background">false</item>
6. Go to res/layout/status_bar_tracking.xml
7. Search for this line
Code:
<com.android.systemui.statusbar.TrackingView android:orientation="vertical" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
then paste this code below the line above
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="18.659973dip" android:textColor="#ffffffff" android:gravity="center" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/deathnotice_shade" android:layout_marginTop="0.0dip" />
8. Recompile the APK
Additional Instructions if Modified from a custom rom:
9. Extract inside classes.dex from the unmodified systemui.apk
10. Delete classes.dex from the new systemui.apk
11. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
[Adding your own custom background to the statusbar]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/layout/status_bar_tracking.xml
3. Create a PNG with dimensions of 240x301px (240 width 301 height by pixels) save it as status_bar_background.png save to res/drawable-ldpi
4. Search for this line
Code:
<com.android.systemui.statusbar.TrackingView android:orientation="vertical" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
then paste this code below the line above
Code:
<View android:background="@drawable/status_bar_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
5. Recompile APK
Additional Instructions if Modified from a custom rom:
6. Extract inside classes.dex from the unmodified systemui.apk
7. Delete classes.dex from the new systemui.apk
8. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
[Adding your own custom background to all the overall android UI]​
1. Decompile FRAMEWORK-RES.apk
2. Navigate to res/values/styles.xml
search for this
Code:
<style name="Theme">
3. Again from res/values/styles.xml
search for this
Code:
<item name="colorBackground">@color/colorBackground</item>
delete the line and replace it with this
Code:
<item name="colorBackground">@color/transparent</item>
4. Create a PNG with dimensions of 240x301px (240 width 301 height by pixels) save it as deathnotice_bg.png save to res/drawable-ldpi
5. Again from res/values/styles.xml
search for this
Code:
<item name="windowBackground">@drawable/screen_background_dark</item>
6. Delete the entire line then replace with this
Code:
<item name="windowBackground">@drawable/deathnotice_bg</item>
7. Recompile APK
[Adding you own clear button to statusbar]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/drawable/
3. Create a xml named deathnoticeclear.xml
4. Add this code to the deathnoticeclear.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/deathnotice_normal" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/deathnotice_disable" />
<item android:state_pressed="true" android:drawable="@drawable/deathnotice_pressed" />
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/deathnotice_normal" />
<item android:state_enabled="true" android:drawable="@drawable/deathnotice_normal" />
<item android:state_focused="true" android:drawable="@drawable/deathnotice_normal" />
<item android:drawable="@drawable/deathnotice_normal" />
</selector>
5. 4. Create 3 PNGs with dimensions of 24x24px (24 width 24 height by pixels) save it as
-deathnotice_normal.9.png
-deathnotice_pressed.9.png
-deathnotice_disable.9.png
save to res/drawable-ldpi
6. Navigate to res/values/styles.xml
search for
Code:
</resources>
then add this code above </resources>
Code:
<style name="Awesome.Button" parent="@android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppeara nceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/deathnotice</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
7. Navigate to res/layout/status_bar_expanded.xml
find this code
Code:
<Button android:textSize="13.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="85.0dip" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:layout_marginBottom="3.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyleSmall" />
delete the line above
then replace it with this code
Code:
<Button android:textSize="13.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:layout_marginBottom="3.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
8. Navigate to res/values/strings.xml
find this code
Code:
<string name="status_bar_clear_all_button">Clear</string>
delete the code above
replace it with this
Code:
<string name="status_bar_clear_all_button"></string>
9. Recompile APK
Additional Instructions if Modified from a custom rom:
10. Extract inside classes.dex from the unmodified systemui.apk
11. Delete classes.dex from the new systemui.apk
12. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
WILL ADD MOARE SOOOOON!
HIT THAT THANKS BUTTON YOU UNGRATEFUL PERSON!
Credits:
Kill3d
initial clear button idea
b16h22
helping me a lot with stuff
Click to expand...
Click to collapse
[/right]
post potato
2 potato
thanks......first comment
really like it
can u pls add that how to put lildroid toggels to bottom of status bar
thanks(pressed)
explodeaamir said:
thanks......first comment
really like it
can u pls add that how to put lildroid toggels to bottom of status bar
thanks(pressed)
Click to expand...
Click to collapse
thanks,
problem is i dunno how,
tried closedraghandle in statusbarservice.smali,
still nothing happens,
also tried changing gravity to vertical then right,
still nothing happends,
wierd mod is wierd,
ask evanlocked,
he's the best man on the job for that
Gonna try it out soon
can you also add how to edit settings.apk? i want to try and edit the settings,apk that killed post.
heirfister said:
can you also add how to edit settings.apk? i want to try and edit the settings,apk that killed post.
Click to expand...
Click to collapse
lol
think before u write
pls add tuts how to add aosp lockscreen
Teach us how to make/edit lock screens!
Saving the universe, one game at a time.
deathnotice01 said:
thanks,
problem is i dunno how,
tried closedraghandle in statusbarservice.smali,
still nothing happens,
also tried changing gravity to vertical then right,
still nothing happends,
wierd mod is wierd,
ask evanlocked,
he's the best man on the job for that
Click to expand...
Click to collapse
Take the statusbarservice.smali
In the code following
Code:
const v7, 0x3030003
invoke-static {p1, v7, v9},
Landroid/view/View;->inflate
(Landroid/content/
Context;ILandroid/view/ViewGroup;)
Landroid/view/View;
move-result-object v3
check-cast v3, Lcom/lidroid/
systemui/quickpanel/PowerWidget;
.line 352
.local v3, qsv:Lcom/lidroid/
systemui/quickpanel/PowerWidget;
invoke-virtual {v3}, Lcom/lidroid/
systemui/quickpanel/
PowerWidget;->setupWidget()V
change mExpandedView&ExpandedView to mCloseView&CloseDragHandle.
Sent from my GT-S5360 using xda app-developers app
thank i will try
death
u can add b16h22 post
Subscribed!
★ Sent from a Galaxy far far away... ★
Yes, I copied this, and there's nothin' you can do about it... :badpokerface:
thanks for the tut!
Nice
thanks everyone,
will update this earlier tonight,
i'm actually sneeking on the company's PC so i can't be too vigilant,
So good Guide!Thanks-------I will try it later:laugh:
A guide to change status bar like winter mod evo is appreciated. Seperation toggles and notification. Thanks a lot for other tutors.
Dont forget add credit. Just in case
Sent from my GT-S5360 using xda premium
Could please tell me how to apply transparent background in all apps.
Editing framework-res.apk what line to replace with...
Sent from my GT-S5360 using xda premium

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

[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:

[DISCONTINUED][GUIDE]Recent App Shortcut in Statusbar[GB]

Recent App Shortcut in Statusbar​
Steps:
1.Decompile SystemUI.apk
2.Go to \res\values\ and open ids.xml
3.Add this line before </resources>
Code:
<item type="id" name="recent_app_button">false</item>
4.Now go to \res\layout\ and open statusbar_expanded.xml
5.Search for something like this or related to this
Code:
<Button android:textSize="15.0sp" android:id="@id/clear_all_button" android:paddingRight="6.0dip" android:layout_width="46.0dip" android:layout_height="46.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" style="@style/Clear.Buttons"/>
6.Add this line above it
Code:
<com.android.systemui.statusbar.RecentAppButton android:textSize="10.0dip" android:id="@id/recent_app_button" android:background="@drawable/btn_recent_app" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="center" android:layout_toRightOf="@id/settings_button" />
7.Download the attachment zip file and extract the smali file to /smali/com/android/systemui/statusbar/(here) and the png to \res\drawable-ldpi\(here).
8.Recompile the apk
9.Push it back to system/app
10.Reboot!!Done!!
Credits:
-lokeshsaini94
-xda
-google

Guide How To Natively Change Lock Screen Carrier Label Text Verizon S5

Guide How To Natively Change Lock Screen Carrier Label Text Verizon S5
First thing you need to do is decompile Keyguard.apk located in system/privapp
Find keyguard_emergency_carrier_area.xml in res/layout-sw360dp.
Look for line: "should be line 8"
<com.android.keyguard.CarrierText android:textAppearance="?android:textAppearanceMedium" android:textSize="@dimen/kg_status_line_font_size" android:textColor="#ffffffff" android:ellipsize="marquee" android:id="@id/carrier_text" androidaddingBottom="5.0dip" android:focusable="true" android:focusableInTouchMode="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:singleLine="true" android:shadowColor="#7f000000" android:shadowDy="2.0" android:shadowRadius="2.0" android:textAllCaps="@bool/kg_use_all_caps" android:fontFamily="roboto-regular" style="@style/keyguard_text_shadow" />
Change to and save file
<TextView android:textSize="@dimen/kg_status_line_font_size" android:textColor="#ffffffff" android:ellipsize="marquee" androidaddingBottom="5.0dip" android:focusable="true" android:focusableInTouchMode="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:text="@string/mytext" android:singleLine="true" android:shadowColor="#7f000000" android:shadowDy="2.0" android:shadowRadius="2.0" android:textAllCaps="@bool/kg_use_all_caps" android:fontFamily="roboto-regular" style="@style/keyguard_text_shadow" />
Then open res/values/strings.xml
Look for line 304. Add a line right below line 304 as follows:
<string name="tts_temperature">Degree</string>
303 <string name="keyguard_guest_mode_help_text">"Swipe to switch to %s's home screen"</string>
304 <string name="keyguard_clock_with_battery">%s battery power</string>
305 <string name="mytext">PUT YOUR TEXT HERE</string>
306 </resources>
Where it says "PUT YOUR TEXT HERE" is where you enter whatever you want it to say on your lock screen.
Save file and compile Keyguard.apk
Push to System/privapp and Enjoy!!!

[Guide] How to modify app preferences with adb (and set configuration for the Simple Calendar Widget)

HowTo change the Simple Calendar Widget configuration by modifying its internal files.​(also shows how to modify applications data files without root)​
Go to reply 1 to get the solution right away
Go to reply 2 to get my config file
Simple Calendar Widget is my favorite calendar widget. It has been with me since my first android phone. Unfortunately it hasn't been maintained for the last 10 years. The functionality is not lacking but an android change broke the widget. It still displays data properly but it's not possible to change the configuration (the app shuts down when you try to configure it).
Google store image on the left. My setup on the right.
{
"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"
}
Most of the users dropped the widget altogether and the store rating reflects it. It has nothing to do with how good the widget is - its perfect. Obviously most users are discouraged by the lack of configuration I am not though. Who needs a gui configuration as long as you can set the style you want. You only configure it once unless a migration between devices breaks your configuration or you remove and reinsert the widget.
I've decided to find out how the configuration is stored internally and make the changes I want by modifying files in apps data folder and that's what the guide is about.
Evaluating solutions
Picking best candidates
Finding out how to do stuff
Testing
Making the changes
Prospering
1. Evaluating solutions​
In general we can approach this in two ways. Either we fix the app by finding underlying issue and rebuilding the apk or find a way to modify the configuration without the GUI. Since rebuilding and posting a modified app without the authors consent is imo a bad form and doing all this work only for my benefit seemed not worth the time I went with the second option.
My main device is not rooted and cannot be rooted easily and with a rooted target device this whole task would not be worth a guide. Well at least not on xda.
With those decisions made the task is to find out how to setup the widget the way we want (a) and how to modify an app data on a non rooted device (b)
2. Picking best candidates​
Lets see what we can do about (b) first. Unless we succeed (a) is moot. With googles help I imagined those:
Modify the app manifest to make the app debuggable and execute commands from it's context
Accessing the data using root without permanently rooting the target device
Mounting the internal storage and reading/writing directly.
Triggering a load config from backup action without a gui (the widget has a config import/export capability - the gui to trigger it is broken though)
Backup-> modify -> restore app data
Looks like there are some potential options. 3. shouldn't even be here I don't even know how many protections there are for making it hard. 2. my device does not have an option to enable root on usb debugging. 4. I didn't feel like researching it so I picked 1. and 5.
Lets see about (a)
Look at the internal data and see if we can make any sense of it and be able to guess which parameter is stored where
Get an emulator with an old Android version (where the gui works) and see how gui config changes are reflected in the data files.
Both good enough but I didn't want to break stuff on my target device while playing with config so an emulator was needed. And since we use it we can get an old Android where the widget would work thus killing two birds (with one emulator) (read on for more excellent jokes like this)
3. Finding out how to do stuff​
Starting with (a) to mix things up I used the Apk Extractor from the store to export the app (com.anod.calendar) and installed it on the one emulator I had on hand - Bluestacks 5.4.100.1025 N32
This is the button to install an apk right there:
Also installed the Nova Launcher on the emulator from the store (the Bluestacks home screen is not a normal Android home screen and it's not possible to install widgets on it).
Amazingly I was was able to put the widget on the Nova Launcher home screen and it worked right of the bat.
The configuration is not exported with the apk - what I was hoping for - but still I hadn't expect it to work from first try.
For the next part we need to check how the changes in configuration are reflected in the data files. For this we need the adb: SDK Platform Tools includes adb and root on our Bluestacks instance.
To get root on Bluestacks go to %programdata%\BlueStacks_nxt folder and modify bluestacks.conf file (backup first). Change bst.feature.rooting="0" to "1" and bst.instance.Nougat32.enable_root_access="0" to "1". Note that if you have multiple Bluestacks instances the second line to modify might look like that: bst.instance.Nougat32_3.enable_root_access (4th instance)
Enable Android Debug Bridge in Settings->Advanced
Check if debug bridge works properly by listing available devices. Connect using the addressort listed on that page. In my instance its localhost on 5595 (127.0.0.1:5595). Then go to the app data folder and browse.
Code:
adb devices
adb connect localhost:5595
adb -e shell
su
cd /data/data/com.anod.calendar/
find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
No I did not write the last command myself
So this looks super uninteresting except from /shared_prefs/com.anod.calendar_preferences.xml and maybe app_webview/pref_store
tbc​
OK this got out of hand. It's already too long and I'm not even halfway there. Am I writing a book? Just wanted to copy couple of lines of code for reference...
Long story short:​Install the widget on an emulator where it runs properly
Make necessary config changes
Connect to both emulator (with connect) and target device (on usb) with adb
Code:
adb -e backup -apk com.anod.calendar
adb -d restore backup.ab
Reboot as many times as necessary on the emulator because sometimes config changes don't work without a reboot. Reboot the target device if needed.
Prosper
My config if anyone is interested. You need to change widget instance (here 4) to your instance id.
Code:
:%s,-4,-10,g ZZ
for instance if your instance id is 10
Then copy it to /data/data/com.anod.calendar/shared_prefs/com.anod.calendar_preferences.xml (with root)
or backup without apk -> use abe pack/unpack -> modify tar -> repack ->restore (without root)
abe: https://nelenkov.blogspot.com/2012/06/unpacking-android-backups.html
credit: Nikolay Elenkov
XML:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="line-color-4">#FF000000</string>
<string name="alt-layout-4">row_alt_2</string>
<string name="business-style-4">short_days</string>
<boolean name="highlight-today-text-4" value="true" />
<boolean name="show-date-4" value="false" />
<string name="text-color-eventdate-4">#FFFFFFFF</string>
<boolean name="calendar-4-1" value="true" />
<boolean name="tasks-due-allday-4" value="true" />
<string name="skin-4">simi_multiple</string>
<boolean name="today-text-cal-color-eventtext-4" value="true" />
<boolean name="provider-com.anod.calendar.sizes.CalWidgetProvider4x4" value="true" />
<int name="font-paint-weekday-4" value="0" />
<boolean name="hide-timezone-4" value="false" />
<int name="font-paint-eventdate-4" value="0" />
<boolean name="today-text-cal-color-eventtimes-4" value="false" />
<boolean name="time-prepend-zero-4" value="false" />
<string name="text-color-weekday-4">#FFFFFFFF</string>
<string name="lookup-millis-4">2592000000</string>
<string name="text-color-eventtext-4">#FFFFFFFF</string>
<boolean name="calendar-4-8" value="false" />
<boolean name="show-week-num-4" value="false" />
<string name="tasks-provider-4">none</string>
<boolean name="use-scrollable-4" value="false" />
<int name="max-number-of-event-4" value="50" />
<int name="today-font-size-eventtext-4" value="17" />
<boolean name="skin_changed_flag" value="false" />
<string name="calendar-application-4">default</string>
<boolean name="hide-duplicate-date-4" value="false" />
<boolean name="show-past-timed-events-4" value="true" />
<boolean name="calendar-4-7" value="false" />
<boolean name="today-text-cal-color-eventdate-4" value="false" />
<long name="drt_ts" value="0" />
<boolean name="hide-text-date-4" value="false" />
<boolean name="dismiss-on-end-4" value="false" />
<int name="font-size-eventtext-4" value="17" />
<boolean name="show-no-events-4" value="true" />
<string name="today-text-color-eventtext-4">#FFFFFFFF</string>
<boolean name="hide-text-weekday-4" value="false" />
<boolean name="one-day-only-4" value="false" />
<boolean name="config-button-4" value="true" />
<int name="today-font-paint-eventtext-4" value="32" />
<string name="bg-color-4">#20000000</string>
<string name="text-color-date-4">#FFFFFFFF</string>
<boolean name="show-timed-only-4" value="false" />
<boolean name="text-cal-color-eventtext-4" value="true" />
<int name="font-paint-eventtext-4" value="0" />
<boolean name="provider-com.anod.calendar.sizes.CalWidgetProvider4x3" value="true" />
<int name="today-font-paint-eventtimes-4" value="32" />
<boolean name="hide-end-time-4" value="true" />
<boolean name="provider-com.anod.calendar.sizes.CalWidgetProvider4x2" value="true" />
<string name="tasks-app-4">default</string>
<boolean name="hide-text-eventtext-4" value="false" />
<boolean name="text-cal-color-eventdate-4" value="false" />
<string name="drt"></string>
<boolean name="provider-com.anod.calendar.CalWidgetProvider" value="true" />
<int name="font-size-date-4" value="15" />
<boolean name="today-tomorrow-4" value="true" />
<int name="today-font-paint-eventdate-4" value="32" />
<boolean name="tasks-only-duedate-4" value="false" />
<int name="font-paint-date-4" value="0" />
<boolean name="provider-com.anod.calendar.sizes.CalWidgetProvider5x4" value="true" />
<int name="today-font-size-eventdate-4" value="16" />
<string name="month-name-4">none</string>
<boolean name="cal-color-bullet-4" value="false" />
<int name="font-size-weekday-4" value="16" />
<boolean name="click-anywhere-4" value="false" />
<boolean name="event-add-dow-4" value="false" />
<boolean name="hide-text-eventdate-4" value="false" />
<string name="today-text-color-eventdate-4">#FFFFFFFF</string>
<boolean name="hide-all-day-4" value="true" />
<boolean name="calendar-4-6" value="false" />
<boolean name="calendar-4-4" value="false" />
<string name="bg-opacity-4">32</string>
<string name="calendar-provider-4">google</string>
<int name="font-size-eventdate-4" value="16" />
<int name="date-side-width-4" value="1" />
<string name="today-text-color-eventtimes-4">#FFFFFFFF</string>
<int name="today-font-size-eventtimes-4" value="15" />
<boolean name="provider-com.anod.calendar.sizes.CalWidgetProvider5x1" value="true" />
<boolean name="day-prepend-zero-4" value="false" />
</map>

Categories

Resources