Instructions for editing system resources | Catalog of instructions (manuals) for editing system resources



Rep: (3155)
Instructions for editing Android system resources


Attached Image

We collect knowledge on editing the graphic part of Android

  1. Only manuals, lessons, etc. are published. on application modification
  2. Before making a message with a lesson.
    • It is recommended to check if it has not been placed before; in case of repetition, the information will be deleted. Please describe in detail all the subtleties of the editing method.
  3. Publication of lessons, manuals, etc.
    • Allowed only by the set pattern!
      Template
      New instruction
      [center] [color = blue] [size = 3] [b] The name of the lesson, manual, etc. [/ b] [/ size] [/ color] [/ center]
      [b] Tested on: [/ b]
      [list] [*] [color = darkred] [b] Android versions: [/ b] [/ color] Android X.Y.Z
      [*] [color = purple] [b] Shell / firmware / device: [/ b] [/ color] Samsung / LG / AOSP / LineageOS
      [/ list]
      [spoiler = Description / Instruction] [color = "# 000000"] [b] Description [/ b] [/ color]
      Briefly, but clearly disclose the essence of the modification
      [img] // s.savagemessiahzine.com.to / forum / style_images / f / 281-divider_3.png [/ img] (When inserting a message, remove the space to make // s.savagemessiahzine.com.to)
      [color = "# 000000"] [b] Instructions [/ b] [/ color]
      Here is your detailed instructions
      [/ spoiler]
      [spoiler = Screenshots / Video] Attach screenshots / video if necessary. If not, then remove the spoiler [/ spoiler]


      Addition to the already existing instructions
      [center] [size = 3] [color = teal] [b] Addition to [/ color] [url = "//savagemessiahzine.com/forum/index.php?showtopic=540887" reference to the original [/ url] [/ b] [/ size] [/ center]

      [spoiler = Description / Instruction] [color = "# 000000"] [b] Description [/ b] [/ color]
      Briefly, but clearly disclose the essence of the supplement
      [img] // s.savagemessiahzine.com.to / forum / style_images / f / 281-divider_3.png [/ img] (When inserting a message, remove the space to make // s.savagemessiahzine.com.to)
      [color = "# 000000"] [b] Instructions [/ b] [/ color]
      Here is your detailed instructions
      [/ spoiler]
      [spoiler = Screenshots / Video] Attach screenshots / video if necessary. If not, then remove the spoiler [/ spoiler]

    • It is forbidden to publish messages that include only links to instructions / additions, but not the content of instructions / additions, because this does not match the above message design patterns. The exception is the announcement of adding a supplement to the message with the manual (located in this topic). Such an announcement must be removed within a week after publication.


Catalog of manuals and manuals
Part One (General, Framework, Multimedia)

The second part (SystemUI, Communication, Other)

The third part (Settings)


Topics Curator:Art2000Write


Post has been editedArt2000 - 06.04.20, 13:20



Rep: (483)
Information about the device settingswith music

The version apktool (do without them)
Important!!!
1)Minus-Information will need to enter the handles! 2)The purpose of the instructionsimplement this program is how to further modify the program, I'm sure it razberetes.Menyayte music, text, pictures, backgrounds to your (for newbies but do not change the name, if you do not want problems!) What else ... with regards to the program in the file in line menu.xmlandroid: title = "savagemessiahzine.com"write the name of a site, and in the fileMainActivity.smaliin line217write address sayta.Vso so-to information ...

Description
Decompile SecSettings and original manual openingres / xml / settings_header.xmlI have the same general configuration is responsible for the res \ xml \ settings_headers_goya.xml, sure soobrazite.Listaem down andATTENTION!who do not have the item "About your device" and so on, that add up</ preference-headers>
<header android: icon = "@ drawable / ic_about_rom" android: title = "About ROM">
<intent android: targetPackage = "com.about.minirom" android: action = "android.intent.action.MAIN" android: targetClass = "com.about.minirom.MainActivity" />
</ header>

"@ Drawable / ic_about_rom" -Icons will pick themselves!
I have the same point this was a
<header android: icon = "@ drawable / ic_settings_about" android: id = "@ id / about_settings" android: title = "@ string / about_settings" android: fragment = "com.android.settings.DeviceInfoSettings" />

I brought him to this kind of
<header android: icon = "@ drawable / ic_settings_about" android: title = "About your device">
<intent android: targetPackage = "com.about.minirom" android: action = "android.intent.action.MAIN" android: targetClass = "com.about.minirom.MainActivity" />
</ header>

Actually it! Putting SecSettings, change in a system and setAttached fileSimplerom_About.zip(4.85 MB)
(In the launcher icon would not be, do not worry!)

Screenshot and Video
You will be so
Attached Image

my video review


Post has been editedPomidor666 - 07.05.16, 07:06



Rep: (906)
ALLIV OS Carrier Label & Carrier Logo


Decompile 1. Settings (apktool 1.5.2)
2. Unzip into foldersAttached fileSettings.rar(37.81 KB)

3. res \ values ​​\ string.xml
<string name = "carrier_options_category_title">Status Bar Carrier Label</ string>
<string name = "carrier_options"><b>Carrier Label</ b></ string>
<string name = "show_status_bar_carrier_title">Show or hide carrier label</ string>
<string name = "show_status_bar_carrier_summary">Show carrier in status bar</ string>
<string name = "custom_carrier_label_title">Custom carrier label</ string>
<string name = "custom_carrier_label_explain">Please enter a new label. Leave blank to revert to stock label.</ string>
<string name = "custom_carrier_label_notset">Custom label currently not set</ string>
<string name = "status_bar_carrier_color">Carrier label color</ string>
<string name = "status_bar_carrier_size">Carrier label size</ string>
<string name = "status_bar_carrier_text_style">Carrier label text style</ string>

4. res \ xml \ display_settings.xml
<PreferenceScreen android: title = "@ string / carrier_options" android: key = "carrier_label_options" android: summary = "Add any custom carrier label in statusbar" android: fragment = "com.android.settings.alliv.AllivFeature.CarrierLabel.CarrierLabelSettings" />

5. Recompile
6. smali \ com \ android \ settings \ alliv \ AllivFeature \ CarrierLabel \ CarrierLabelSettings.smali replace going to your
<public type = "xml" name = "illusiondev_carrierlabel" id = "0x7f060092" />

7. Compile

8. decompile SystemUI (apktool 1.5.2)
9. Unzip the foldersAttached fileSystemUI.rar(10.27 KB)

10. res \ values ​​\ styles.xml
<style name = "TextAppearance.StatusBar.AllivLabel" parent = "@ * android: style / TextAppearance.StatusBar.Icon">
<item name = "android: textSize">14.0sp</ item>
<item name = "android: textStyle">normal</ item>
<item name = "android: textColor">@ * Android: color / white</ item>
</ style>

11. res \ layout \ status_bar.xml
<com.android.systemui.statusbar.alliv.AllivLabel android: textAppearance = "@ style / TextAppearance.StatusBar.AllivLabel" android: ellipsize = "end" android: layout_gravity = "center_vertical" android: id = "@ + id / status_bar_carrier_label" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: singleLine = "true" android: textAllCaps = "false" />

12.1. Left Logo
<com.android.systemui.statusbar.alliv.LayoutOnVisibility android: layout_width = "wrap_content" android: layout_height = "wrap_content" key = "alliv_carrier_logo_left">
<com.android.systemui.statusbar.alliv.WorstColorImage android: id = "@ + id / logo" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / ic_status_bar_alliv_logo" android: scaleType = "center" android: paddingEnd = "1.5dip" key = "alliv_logo" />
</com.android.systemui.statusbar.alliv.LayoutOnVisibility>

12.2. Right Logo
<com.android.systemui.statusbar.alliv.LayoutOffVisibility android: layout_width = "wrap_content" android: layout_height = "wrap_content" key = "alliv_carrier_logo_right">
<com.android.systemui.statusbar.alliv.WorstColorImage android: id = "@ + id / right_logo" android: paddingRight = "2.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / ic_status_bar_alliv_logo "android: scaleType =" center "key =" alliv_logo_right "/>
</com.android.systemui.statusbar.alliv.LayoutOffVisibility>

13. Compile

Attached Image
Attached Image
Attached Image

Russian and Ukrainian localization

Post has been editedDimar - 12.05.16, 11:03
Reason for editing: Supplement



Rep: (1505)
Double StatusBar

The version apktool 2.0.
What is it for?
Sooner or later get tired of familiar interface, you want something new. So, you can make an unusual fashion.
Pros:
It does not look normal.
The status bar can hold more of information
You can arrange the objects in the status bar as your heart desires.
Minuses:
Led pattern to TouchWiz interface, on the other will not work rather need probyvat.

Screenshots
Option 1
Attached Image
Attached Image
Attached Image
Attached Image

Option 2
Attached Image
Attached Image



Description
Option 1
To edit the "custom text" set as a normal applicationAttached fileStatusbarLabel.apk(74 KB)

ParseSystemUI
Download and scatter on the Archive folderAttached filefiles.zip(15.22 KB)

Open upSystemUI / res / layout / status_bar.xml
Completely replace the code:
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android: orientation = "vertical" android: id = "@ id / status_bar" android: background = "@ drawable / system_bar_background" android: focusable = "true" android: fitsSystemWindows = " true "android: descendantFocusability =" afterDescendants "
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: systemui = "http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android: layout_gravity = "right" android: id = "@ id / call_background" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<ImageView android: layout_gravity = "right" android: id = "@ id / notification_lights_out" android: paddingBottom = "2.0dip" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / ic_sysbar_lights_out_dot_small" android: scaleType = "center" android: paddingStart = "6.0dip" />
</ Framelifeout>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / status_bar_contents" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: paddingStart = "6.0dip" android: paddingEnd = "8.0dip">
<com.android.keyguard.AlphaOptimizedLinearLayout android: orientation = "horizontal" android: id = "@ id / system_icon_area" android: layout_width = "wrap_content" android: layout_height = "fill_parent" />
<LinearLayout android: orientation = "horizontal" android: id = "@ id / status_bar_contents" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: paddingStart = "6.0dip" android: paddingEnd = "6.0dip">
<LinearLayout android: orientation = "vertical" android: id = "@ id / system_icon_area" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<LinearLayout android: gravity = "center" android: layout_gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginLeft = "0.0dip" android: layout_marginRight = "0.0dip" android: singleLine = "false" android: layout_alignParentStart = "true">
<LinearLayout android: gravity = "center" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 3.5dip" android: layout_alignParentLeft = "true">
<TextClock android: textSize = "20.0dip" android: textColor = "# ffffffff" android: paddingLeft = "0.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: includeFontPadding = "true" android: format24Hour = "kk" />
<blink android: layout_gravity = "center | top" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "0.0dip">
<TextView android: textSize = "17.0dip" android: textstyle = "normal" android: textColor = "# ffffffff" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginBottom = "2.0dip" android: text = ":" android: includeFontPadding = "true" />
</ blink>
<TextClock android: textSize = "20.0dip" android: textColor = "# ffffffff" android: paddingRight = "5.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: includeFontPadding = "true" android: format24Hour = "mm" />
</ LinearLayout>
<RelativeLayout android: gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginLeft = "0.0dip" android: layout_marginRight = "0.0dip" android: singleLine = "false" android: layout_alignParentLeft = "true">
<LinearLayout android: gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 16.0dip" android: singleLine = "false" android: layout_alignParentLeft = "true">
<TextClock android: textSize = "10.0dip" android: textColor = "# ffffffff" android: paddingLeft = "0.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "8.0dip" android: includeFontPadding = "true" android: format24Hour = "EEEE" />
</ LinearLayout>
<LinearLayout android: gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 8.0dip" android: singleLine = "false" android: layout_alignParentLeft = "true">
<TextClock android: textSize = "11.0dip" android: textColor = "# ffffffff" android: paddingLeft = "0.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "8.0dip" android: includeFontPadding = "true" android: format24Hour = "d" />
<TextClock android: textSize = "11.0dip" android: textColor = "# ffffffff" android: paddingLeft = "2.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "8.0dip" android: includeFontPadding = "true" android: format24Hour = "MMMM" />
</ LinearLayout>
</ RelativeLayout>
<com.android.systemui.statusbar.policy.Clock android: textSize = "18.0dip" android: ellipsize = "none" android: gravity = "center | left" android: id = "@ id / clock" android: paddingLeft = " 3.0dip "android: visibility =" gone "android: layout_width =" 0.0dip "android: layout_height =" 0.0dip "android: layout_marginTop =" 2.3299866dip "android: singleLine =" true "android: includeFontPadding =" false "/>
</ LinearLayout>
<com.android.systemui.statusbar.policy.Clock android: textAppearance = "@ style / TextAppearance.StatusBar.Clock" android: textColor = "# ffffffff" android: gravity = "start | bottom | center" android: id = "@ id / clock "android: layout_width =" 0.0dip "android: layout_height =" 0.0dip "android: singleLine =" true "android: paddingStart =" 6.0dip "/>
<LinearLayout android: gravity = "end" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<FrameLayout android: id = "@ id / call_background" android: visibility = "gone" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<ImageView android: layout_gravity = "left" android: id = "@ id / notification_lights_out" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: scaleType = "fitXY" />
</ Framelifeout>
<ImageView android: id = "@ id / notification_lights_out" android: paddingBottom = "2.0dip" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / ic_sysbar_lights_out_dot_small "android: scaleType =" center "android: paddingStart =" 6.0dip "/>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / system_icon_area" android: layout_width = "wrap_content" android: layout_height = "fill_parent">
<include layout = "@ layout / system_icons" />
</ LinearLayout>
</ LinearLayout>
</ LinearLayout>
<ImageView android: paddingLeft = "1.0dip" android: paddingRight = "1.0dip" android: layout_width = "fill_parent" android: layout_height = "1.0dip" android: src = "# ffffffff" />
<LinearLayout android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0" android: paddingStart = "6.0dip">
<LinearLayout android: gravity = "end" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout android: orientation = "horizontal" android: id = "@ id / notification_icon_area" android: layout_width = "0.0dip" android: layout_height = "fill_parent" android: layout_weight = "1.0">
<com.android.keyguard.AlphaOptimizedLinearLayout android: id = "@ id / notification_icon_area_inner" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android: id = "@ id / moreIcon" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / stat_notify_more "/>
<com.android.systemui.statusbar.traffic.Traffic android: textSize = "8.0dip" android: textstyle = "normal" android: textColor = "# ffffffff" android: gravity = "left" android: layout_gravity = "center_vertical" android: layout_width = "25.0dip" android: layout_height = "fill_parent" android: lines = "2" android: singleLine = "false" />
<com.android.systemui.statusbar.phone.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android : layout_alignParentStart = "true" />
<com.android.systemui.statusbar.phone.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android : layout_alignParentStart = "true" />
</com.android.keyguard.AlphaOptimizedLinearLayout>
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
<com.adi.rom.interface.customcarrierlabel android: textAppearance = "@ style / TextAppearance.StatusBar.CustomLabel" android: gravity = "center | right" android: id = "@ id / custom_label" android: layout_width = "wrap_content" android : layout_height = "fill_parent" android: singleLine = "true" />
<TextView android: textSize = "15.0dip" android: textColor = "# ffffffff" android: gravity = "center_vertical" android: id = "@ id / carrierLabel" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: singleLine = "true" />
<ImageView android: id = "@ id / operatorLogoIcon" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: src = "@ drawable / tw_stat_notify_operator_logo" />
<ImageView android: id = "@ id / operatorLogoIcon_org" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: src = "@ drawable / tw_stat_notify_operator_logo_org" />
<TextView android: textSize = "12.0dip" android: textColor = "# ffffffff" android: gravity = "center_vertical" android: id = "@ id / knoxCustomStatusBarText" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: includeFontPadding = "false" />
</ LinearLayout>
</ LinearLayout>
</ LinearLayout>
</ LinearLayout>
</ LinearLayout>
<ViewStub android: id = "@ id / ticker_stub" android: layout = "@ layout / status_bar_ticker" android: inflatedId = "@ id / ticker" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>

If you want to instead of "custom text" - the name of the wifi, then replace the line
<com.adi.rom.interface.customcarrierlabel android: textAppearance = "@ style / TextAppearance.StatusBar.CustomLabel" android: gravity = "center | right" android: id = "@ id / custom_label" android: layout_width = "wrap_content" android : layout_height = "fill_parent" android: singleLine = "true" />

on:
<com.android.systemui.statusbar.mod.WifiName android: textSize = "13.0dip" android: textColor = "# ffb9eeff" android: gravity = "center | right" android: layout_width = "wrap_content" android: layout_height = "fill_parent" />

We collectSystemUI
Parseframework-res.apk
Open upres / values ​​/ dimens
Change the value to 40
<dimen name = "status_bar_height">40.0dip</ dimen>

We collectframework-res.apk

Option 2
ParseSystemUI
Download and scatter on the Archive folderAttached filefiles1.zip(22.34 KB)

Open upSystemUI / res / layout / status_bar.xml
Completely replace the code:
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android: orientation = "vertical" android: id = "@ id / status_bar" android: background = "@ drawable / system_bar_background" android: focusable = "true" android: descendantFocusability = " afterDescendants "
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: systemui = "http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android: layout_gravity = "center" android: id = "@ id / call_background" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
<ImageView android: id = "@ id / notification_lights_out" android: paddingBottom = "2.0dip" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / ic_sysbar_lights_out_dot_small "android: scaleType =" center "android: paddingStart =" 6.0dip "/>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / status_bar_contents" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout android: orientation = "vertical" android: id = "@ id / system_icon_area" android: background = "@ drawable / stat_bar_bg" android: paddingLeft = "3.0dip" android: paddingRight = "3.0dip" android: layout_width = "fill_parent "android: layout_height =" wrap_content ">
<FrameLayout android: gravity = "center" android: orientation = "horizontal" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout android: layout_gravity = "left" android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout android: gravity = "left" android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<include android: id = "@ id / signal_cluster" android: layout_width = "wrap_content" android: layout_height = "fill_parent" layout = "@ layout / signal_cluster_view" />
<com.android.keyguard.AlphaOptimizedLinearLayout android: orientation = "horizontal" android: id = "@ id / system_icon_area" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
</ LinearLayout>
<LinearLayout android: gravity = "left" android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<LinearLayout android: gravity = "center" android: layout_gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginLeft = "0.0dip" android: layout_marginRight = "0.0dip" android: singleLine = "false" android: layout_alignParentStart = "true">
<RelativeLayout android: gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginLeft = "0.0dip" android: layout_marginRight = "0.0dip" android: singleLine = "false" android: layout_alignParentLeft = "true">
<LinearLayout android: gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 16.5dip" android: singleLine = "false" android: layout_alignParentLeft = "true">
<TextClock android: textSize = "10.0dip" android: textColor = "# ffffffff" android: paddingLeft = "0.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "8.0dip" android: includeFontPadding = "true" android: format24Hour = "EEEE" />
</ LinearLayout>
<LinearLayout android: gravity = "center | left" android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 7.0dip" android: singleLine = "false" android: layout_alignParentLeft = "true">
<TextClock android: textSize = "10.0dip" android: textColor = "# ffffffff" android: paddingLeft = "0.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "8.0dip" android: includeFontPadding = "true" android: format24Hour = "d" />
<TextClock android: textSize = "10.0dip" android: textColor = "# ffffffff" android: paddingLeft = "2.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "8.0dip" android: includeFontPadding = "true" android: format24Hour = "MMMM" />
</ LinearLayout>
</ RelativeLayout>
<com.android.systemui.statusbar.policy.Clock android: textSize = "18.0dip" android: ellipsize = "none" android: gravity = "center | left" android: id = "@ id / clock" android: paddingLeft = " 3.0dip "android: visibility =" gone "android: layout_width =" 0.0dip "android: layout_height =" 0.0dip "android: layout_marginTop =" 2.3299866dip "android: singleLine =" true "android: includeFontPadding =" false "/>
<com.android.systemui.statusbar.traffic.Traffic android: textSize = "8.0dip" android: textstyle = "normal" android: textColor = "# ffb9eeff" android: gravity = "center" android: paddingLeft = "5.0dip" android : layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 1.5dip" />
</ LinearLayout>
</ LinearLayout>
</ LinearLayout>
<LinearLayout android: layout_gravity = "center" android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<FrameLayout android: gravity = "center" android: layout_gravity = "center" android: layout_width = "wrap_content" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<TextClock android: textAppearance = "@ style / TextAppearance.StatusBar.Clock" android: textColor = "# ffffffff" android: gravity = "center" android: id = "@ id / clock" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginTop = "- 2.0dip" android: singleLine = "true" android: format12Hour = "h: mm: ss a" android: format24Hour = "HH: mm: ss" />
<com.android.systemui.statusbar.policy.Clock android: textAppearance = "@ style / TextAppearance.StatusBar.Clock" android: gravity = "center" android: id = "@ id / clock" android: layout_width = "0.0dip" android: layout_height = "0.0dip" android: singleLine = "true" android: paddingStart = "2.0dip" />
</ Framelifeout>
<FrameLayout android: gravity = "center" android: layout_gravity = "center" android: paddingRight = "3.0dip" android: layout_width = "wrap_content" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<include android: gravity = "center" android: orientation = "horizontal" android: paddingTop = "3.5dip" android: paddingRight = "3.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: adjustViewBounds = " true "layout =" @ layout / system_icons "/>
</ Framelifeout>
</ LinearLayout>
<LinearLayout android: layout_gravity = "right" android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout android: gravity = "right" android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<com.android.keyguard.AlphaOptimizedLinearLayout android: id = "@ id / notification_icon_area_inner" android: layout_width = "wrap_content" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android: id = "@ id / moreIcon" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / stat_notify_more "/>
<com.android.systemui.statusbar.phone.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android : layout_alignParentStart = "true" />
</com.android.keyguard.AlphaOptimizedLinearLayout>
</ LinearLayout>
<LinearLayout android: gravity = "right" android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0">
<com.android.systemui.statusbar.mod.WifiName android: textSize = "12.0dip" android: textColor = "# ffb9eeff" android: gravity = "center | right" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: scaleType = "fitCenter" android: paddingStart = "4.0dip" style = "@ style / TextAppearance.StatusBar.TextButton" />
</ LinearLayout>
</ LinearLayout>
</ Framelifeout>
</ LinearLayout>
</ LinearLayout>
<LinearLayout android: layout_width = "fill_parent" android: layout_height = "0.0dip" android: layout_weight = "1.0" android: paddingStart = "6.0dip">
<LinearLayout android: gravity = "end" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout android: orientation = "horizontal" android: id = "@ id / notification_icon_area" android: layout_width = "0.0dip" android: layout_height = "fill_parent" android: layout_weight = "1.0" />
<TextView android: textSize = "15.0dip" android: textColor = "# ffffffff" android: gravity = "center_vertical" android: id = "@ id / carrierLabel" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: singleLine = "true" />
<ImageView android: id = "@ id / operatorLogoIcon" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: src = "@ drawable / tw_stat_notify_operator_logo" />
<ImageView android: id = "@ id / operatorLogoIcon_org" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: src = "@ drawable / tw_stat_notify_operator_logo_org" />
<ViewStub android: id = "@ id / ticker_stub" android: layout = "@ layout / status_bar_ticker" android: inflatedId = "@ id / ticker" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
</ LinearLayout>
</ LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>

We collectSystemUI
Parseframework-res.apk
Open upres / values ​​/ dimens
Change the value to 40
<dimen name = "status_bar_height">40.0dip</ dimen>

We collectframework-res.apk

Important!
Before replacing, check id! Ie if the code is present in my id, which is not you, remove or mount it as ids.xml
Conversely, if you have the code contains some or id, then paste it into my code, otherwise it will "fall" SystemUI.
Before handling be sure to make a backup!



Sources and Acknowledgments:


Post has been editedmadgit - 08.06.17, 17:49



Rep: (44)
Recent Panel
MIUI6


Screenshots
My
Attached Image
Attached Image

Original MIUI 6Attached Image


Instruction
Because I have a screen resolution of 480x854 all done under the permission
So the same version of Android 4.2.2 (this statement is exactly the work at 4.1-4.4, 5-6 Androyd not sure it will work)

And so, let's start:
1. For those who want to blur the background doing all of these instructions:For instructions on editing the system resources (Post K1S # 43566168)

2.Razbiraem SystemUI.apk and open the file res / layout / status_bar_recent_panel.xml and replace everything in it
With blurred background
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.recent.RecentsPanelView android: id = "@ id / recents_root" android: layout_width = "fill_parent" android: layout_height = "fill_parent" systemui: recentItemLayout = "@ layout / status_bar_recent_item"
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: systemui = "http: //schemas.android..s/com.android.systemui">
<com.acer.incallui.BlurImageView android: id = "@ id / backgroundImageView" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: scaleType = "centerCrop" />
<FrameLayout android: id = "@ id / recents_bg_protect" android: background = "# 70000000" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_centerVertical = "true">
<com.android.systemui.recent.RecentsHorizontalScrollView android: layout_gravity = "center" android: id = "@ id / recents_container" android: scrollbars = "none" android: fadingEdge = "none" android: fadingEdgeLength = "0.0dip" android: clipChildren = "false" android: clipToPadding = "false" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_marginRight = "0.0dip" android: stackFromBottom = "true" android: divider = "@ null">
<LinearLayout android: orientation = "horizontal" android: id = "@ id / recents_linear_layout" android: clipChildren = "false" android: clipToPadding = "false" android: layout_width = "fill_parent" android: layout_height = "wrap_content" />
</com.android.systemui.recent.RecentsHorizontalScrollView>
</ Framelifeout>
<include android: id = "@ id / recents_no_apps" android: visibility = "invisible" android: layout_width = "fill_parent" android: layout_height = "fill_parent" layout = "@ layout / status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>


Without background blur
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.recent.RecentsPanelView android: id = "@ id / recents_root" android: layout_width = "fill_parent" android: layout_height = "fill_parent" systemui: recentItemLayout = "@ layout / status_bar_recent_item"
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: systemui = "http: //schemas.android..s/com.android.systemui">
<FrameLayout android: id = "@ id / recents_bg_protect" android: background = "# 70000000" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_centerVertical = "true">
<com.android.systemui.recent.RecentsHorizontalScrollView android: layout_gravity = "center" android: id = "@ id / recents_container" android: scrollbars = "none" android: fadingEdge = "none" android: fadingEdgeLength = "0.0dip" android: clipChildren = "false" android: clipToPadding = "false" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_marginRight = "0.0dip" android: stackFromBottom = "true" android: divider = "@ null">
<LinearLayout android: orientation = "horizontal" android: id = "@ id / recents_linear_layout" android: clipChildren = "false" android: clipToPadding = "false" android: layout_width = "fill_parent" android: layout_height = "wrap_content" />
</com.android.systemui.recent.RecentsHorizontalScrollView>
</ Framelifeout>
<include android: id = "@ id / recents_no_apps" android: visibility = "invisible" android: layout_width = "fill_parent" android: layout_height = "fill_parent" layout = "@ layout / status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>


3.Otkryvaem file res / layout / status_bar_recent_item.xml and replace everything in it
Code:
<? xml version = "1.0" encoding = "utf-8"?>
<FrameLayout android: paddingLeft = "@ dimen / status_bar_recents_item_padding" android: paddingTop = "@ dimen / status_bar_recents_item_padding" android: paddingRight = "@ dimen / status_bar_recents_item_padding" android: clipChildren = "false" android: layout_width = "fill_parent" android: layout_height = " wrap_content "android: importantForAccessibility =" no "
xmlns: android = "http://schemas.android.com/apk/res/android">
<LinearLayout android: layout_gravity = "center_vertical" android: orientation = "vertical" android: id = "@ id / recent_item" android: clipChildren = "false" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<View android: layout_width = "fill_parent" android: layout_height = "85.0dip" />
<FrameLayout android: id = "@ id / app_thumbnail" android: background = "@ drawable / recents_thumbnail_bg" android: visibility = "invisible" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginLeft = "@ dimen / status_bar_recents_thumbnail_left_margin "android: foreground =" @ drawable / recents_thumbnail_fg "android: layout_toRightOf =" @ id / app_label "android: layout_alignParentTop =" true ">
<ImageView android: id = "@ id / app_thumbnail_image" android: layout_width = "@ dimen / status_bar_recents_thumbnail_width" android: layout_height = "@ dimen / status_bar_recents_thumbnail_height" />
</ Framelifeout>
<LinearLayout android: orientation = "horizontal" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<ImageView android: id = "@ id / app_icon" android: visibility = "invisible" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginLeft = "28.0dip" android: layout_marginTop = "@ dimen / status_bar_recents_app_icon_top_margin" android: scaleType = "centerInside" android: adjustViewBounds = "true" android: maxWidth = "@ dimen / status_bar_recents_app_icon_max_width" android: maxHeight = "@ dimen / status_bar_recents_app_icon_max_height" />
<TextView android: textSize = "@ dimen / status_bar_recents_app_label_text_size" android: textColor = "@ color / status_bar_recents_app_label_color" android: ellipsize = "marquee" android: id = "@ id / app_label" android: fadingEdge = "horizontal" android: fadingEdgeLength = " @ dimen / status_bar_recents_text_fading_edge_length "android: layout_width =" @ dimen / status_bar_recents_app_label_width "android: layout_height =" wrap_content "android: layout_marginLeft =" @ dimen / status_bar_recents_app_label_left_margin "android: layout_marginTop =" 25.0dip "android: scrollHorizontally =" true "android: singleLine = "true" android: layout_alignRight = "@ id / app_icon" android: layout_alignParentLeft = "true" android: importantForAccessibility = "no" />
<TextView android: textSize = "@ dimen / status_bar_recents_app_description_text_size" android: ellipsize = "marquee" android: id = "@ id / app_description" android: fadingEdge = "horizontal" android: fadingEdgeLength = "@ dimen / status_bar_recents_text_fading_edge_length" android: layout_width = " @ dimen / status_bar_recents_app_label_width "android: layout_height =" wrap_content "android: layout_marginLeft =" @ dimen / status_bar_recents_app_label_left_margin "android: layout_marginTop =" 25.0dip "android: scrollHorizontally =" true "android: singleLine =" true "android: layout_alignParentLeft =" true "/>
<View android: id = "@ id / recents_callout_line" android: background = "@ drawable / recents_callout_line" android: layout_width = "0.0dip" android: layout_height = "0.0dip" android: layout_marginLeft = "@ dimen / status_bar_recents_app_label_left_margin" android: layout_marginTop = "3.0dip" android: layout_marginRight = "3.0dip" android: layout_below = "@ id / app_label" android: layout_alignParentLeft = "true" />
</ LinearLayout>
</ LinearLayout>
</ Framelifeout>

Line responsible for the indentation from the top is highlighted in green, red Isolation of what needs to be changed
4.Otkryvaem file res / values ​​/ bools.xml and finds this line
It:
<bool name = "config_recents_thumbnail_image_fits_to_xy">false</ bool>

Change false to true
5.Otkryvaem file res / values ​​/ styles.xml
Are looking for:
<style name = "RecentsStyle" parent = "@ android: style / Theme.Holo.Wallpaper.NoTitleBar">

And add to this style are:
<item name = "android: windowFullscreen">true</ item>

So we hid the status bar
6.Otkryvaem file res / values ​​/ dimens.xml
Here are these lines to this form
<dimen name = "status_bar_recents_thumbnail_width">168.0dip</ dimen>
<dimen name = "status_bar_recents_thumbnail_height">298.0dip</ dimen>
<dimen name = "status_bar_recents_item_padding">5.0dip</ dimen>

7.Sobiraem!
8.Razbiraem framework-res.apk and open the file res / values ​​/ dimens.xml
Here are these lines to this form
<dimen name = "status_bar_recents_thumbnail_width">168.0dip</ dimen>
<dimen name = "status_bar_recents_thumbnail_height">298.0dip</ dimen>



If something did not finish wrote, please report it to koumiss)))


Post has been editedDimar - 11.05.16, 06:33
Reason for editing: Template



Rep: (1003)
A small addition to Addition to the digital network level in dBm in the status bar and ASU

Add the correct translation for various languages ​​(Including English and Russian)

Description
In Settings \ res \ values ​​\ strings.xml add the line

<string name = "show_signalUni_in_statusbar">Show SignalUni in statusbar</ string>
<string name = "show_signalUni_in_statusbar_summary">Digital networks indicators dBm and ASU in the panel will be visible or hidden after a reboot</ string>

In Settings \ res \ values-ru \ strings.xml add the line

<string name = "show_signalUni_in_statusbar">Mapping the digital signal</ string>
<string name = "show_signalUni_in_statusbar_summary">Digital networks indicators dBm and ASU in the panel will be visible or hidden after a reboot</ string>

In Settings \ res \ xml \ display_settings.xml add the line

<ru.nialon.EditTextSignalUni.Settings.CheckBoxCustom android: title = "@ string / show_signalUni_in_statusbar" android: key = "adi_signaluni_show" android: summary = "@ string / show_signalUni_in_statusbar_summary" android: defaultValue = "true" />


Post has been editedsantehmen - 11.05.16, 08:51
Reason for editing: Editing a post



Rep: (184)
Supplement toClear all button in running + RAM strip for 4.4.2 on the mediatek platform


Description
Made and tested on 4.4.2 Kitkata on other versions do not know.
Pereprobyval all manual button chiski and they came to my ustroystvai and decided to fix nedostatki.Sut additions - inBabe manualI was not satisfied with something that does not show the correct RAM, do not like the gray background, well design and clean buttons here and decided to fix it.

Instruction
1) Make allby manual
2) decompile ready SystemUI, download the archiveAttached fileres_2.zip(27.63 KB)
, Throwing everything into folders, computer and everything is ready, it will be like in the screenshots

Screenshots
Attached Image
Attached Image
Attached Image

Addition


Post has been editedKolbas - 05.12.16, 18:43
Reason for editing: Supplement



Rep: (102)
Supplement for (ALLIV OS CARRIER LABEL & CARRIER LOGO)

Screenshots
Attached Image
Attached Image
Attached Image
Add Russian and Ukrainian
Translation made for themselves.
- This is download and unzip foldersAttached filesettings.zip(2.81 KB)

- This will add to the replacement of the previous lines in the values ​​/ string.xml
<string name = "carrier_options_category_title">Status Bar Carrier Label</ string>
<string name = "carrier_options"><b>Carrier Label</ b></ string>
<string name = "show_status_bar_carrier_title">Show or hide carrier label</ string>
<string name = "show_status_bar_carrier_summary">Show carrier in status bar</ string>
<string name = "custom_carrier_label_title">Custom carrier label</ string>
<string name = "custom_carrier_label_explain">Please enter a new label. Leave blank to revert to stock label.</ string>
<string name = "custom_carrier_label_notset">Custom label currently not set</ string>
<string name = "status_bar_carrier_color">Carrier label color</ string>
<string name = "status_bar_carrier_size">Carrier label size</ string>
<string name = "status_bar_carrier_text_style">Carrier label text style</ string>
<string name = "left_logo">Left Logo</ string>
<string name = "left_logo_color">Left Logo Color</ string>
<string name = "left_logo_color_summary">hange Logo Carrier Color</ string>
<string name = "right_logo">Right Logo</ string>
<string name = "right_logo_color">Right Logo Color</ string>
<string name = "right_logo_color_summary">hange Logo Carrier Color</ string>
<string name = "carrier_name">Carrier Name</ string>

- It Add to values-ru / string.xml
<string name = "carrier_options_category_title">LOGO NOTICE</ string>
<string name = "carrier_options"><b>Notifications</ b></ string>
<string name = "show_status_bar_carrier_title">Logo notice</ string>
<string name = "show_status_bar_carrier_summary">Enable or disable permanent notice Logo</ string>
<string name = "custom_carrier_label_title">The text in the status bar</ string>
<string name = "custom_carrier_label_explain">Please enter the new text.</ string>
<string name = "custom_carrier_label_notset">Logo notification is not set at this time.</ string>
<string name = "status_bar_carrier_color">Color text notifications</ string>
<string name = "status_bar_carrier_size">The size of the notification text</ string>
<string name = "status_bar_carrier_text_style">Font style text notification</ string>
<string name = "left_logo">notification to the left</ string>
<string name = "left_logo_color">Color Logo Left</ string>
<string name = "left_logo_color_summary">Set the color for the left notice</ string>
<string name = "right_logo">notification of the right</ string>
<string name = "right_logo_color">Color Logo Right</ string>
<string name = "right_logo_color_summary">Set the color for the notification rules</ string>
<string name = "carrier_name">text notification</ string>

- It is added to values-uk / string.xml
<string name = "carrier_options_category_title">"LOGO Notification</ string>
����<string name = "carrier_options"><b>Notification</ b></ string>
����<string name = "show_status_bar_carrier_title">Logo Notification</ string>
����<string name = "show_status_bar_carrier_summary">Uvіmknuti abo vimknuti postіyne Logo Notification</ string>
����<string name = "custom_carrier_label_title">Text in a row will</ string>
����<string name = "custom_carrier_label_explain">Whether weasel, vvedіt Novi text.</ string>
����<string name = "custom_carrier_label_notset">Logo Notification not vstanovleno in Danian hour.</ string>
����<string name = "status_bar_carrier_color">Kolіr text Notification</ string>
����<string name = "status_bar_carrier_size">Rozmіr text Notification</ string>
����<string name = "status_bar_carrier_text_style">Font style of text Notification</ string>
����<string name = "left_logo">Notification zlіva</ string>
����<string name = "left_logo_color">Kolіr Logo zlіva</ string>
����<string name = "left_logo_color_summary">Vstanoviti kolіr for lіvogo Notification</ string>
����<string name = "right_logo">Notification to the right</ string>
����<string name = "right_logo_color">Kolіr Logo Right</ string>
����<string name = "right_logo_color_summary">Vstanoviti kolіr right-Notification</ string>
����<string name = "carrier_name">TEKSTOVi Notification</ string>

We collect and replace.


Post has been editedjamesblunt1234 @ - 12.05.16, 12:20



Rep: (25)
Addition to the instructions

For instructions on editing the system resources (Post kolbas # 49535769)

Description
As the author of the post above is not screwed manualy.V instructions from the very first post, APK met, but did not work delete function swipe from one app spiska.V post above, no band RAM, a working button and swipe delete.
The essence of my post, adding a frame bar and landing on his seat button (because of the post above, the icon is very large and close to the middle of the screen) .Sdelal on MTK 4.4.4, under 5 inches 720h1280, working xhdpi folder.

Instruction
1_Operatsii ALL, both from the post above links.
2_Fayly with replacement from the post above.
3_Popravlyaem falyly of layout and layout-land, or rather etot- (agold_status_bar_recent_panel.xml).
We find in the file:
<ImageButton android: layout_gravity = "bottom | left | center" android: id = "@ id / app_clear" android: background = "# 00000000" android: layout_width = "120.0dip" android: layout_height = "100.0dip" android: src = "@ drawable / zzzz_agold_app_clear_button" android: scaleType = "centerInside" android: layout_below = "@ id / memory_progress" android: layout_centerInParent = "false" />

We change:
<ImageButton android: layout_gravity = "bottom | left | center" android: id = "@ id / app_clear" android: background = "# 00000000" android: layout_width = "50.0dip" android: layout_height = "50.0dip" android: src = "@ drawable / zzzz_agold_app_clear_button" android: scaleType = "center" android: layout_alignParentBottom = "true" />


In these files, if you need a frame bar, before that:
<include android: id = "@ id / recents_no_apps" android: visibility = "invisible" android: layout_width = "fill_parent" android: layout_height = "fill_parent" layout = "@ layout / status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>

We put it:
<LinearLayout android: orientation = "horizontal" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_marginTop = "30.0dip" android: layout_weight = "1.0">
<in.panic.xperience.aokpram android: layout_width = "fill_parent" android: layout_height = "30.0dip" />
</ LinearLayout>


android: layout_marginTop = "30.0dip" (offset from the top of the screen)

In the res / values ​​/ string.xml
<string name = "service_background_processes">% 1 $ s free</ string>
<string name = "service_foreground_processes">% 1 $ s used</ string>

In the res / values-ru / string.xml
<string name = "service_background_processes">% 1 $ s free</ string>
<string name = "service_foreground_processes">% 1 $ s busy</ string>


Archive with barom--framesAttached fileA.O.K.P Ram Bar.zip(16.78 Kb)

Archive icons under xhdpi (if needed) -Attached fileres_icon.zip(12.34 KB)


We collect, sign, optimize, replace, reboot, polzumsya.

Screenshots
Attached Image
Attached Image




Rep: (158)
Remove the operator name in the status bar + operator logo instead of the name, firmware JOYOS 2.3.7

Description-instructions
Instead of the name of the operator may write his word or insert your picture
Go along the waySystemUI \ res \ layout \ status_bar.xml
find the line
change to
<com.android.systemui.statusbar.NewOperatorText android: textAppearance = "@ android: style / TextAppearance.StatusBar.Icon" android: textSize = "14.0dip" android: gravity = "center" android: id = "@ id / battery_text" android: layout_width = "wrap_content" android: layout_height = "fill_parent" />
Change to
<com.android.systemui.statusbar.NewOperatorText android: textAppearance = "@ android: style / TextAppearance.StatusBar.Icon" android: textSize = "14.0dip" android: gravity = "center" android: id = "@ id / battery_text" android: layout_width = "0.0dip" android: layout_height = "0.0dip" />

Above we see the line
<com.android.systemui.statusbar.CmSignalText android: textAppearance = "@ android: style / TextAppearance.StatusBar.Icon" android: gravity = "center_vertical" android: orientation = "horizontal" android: paddingRight = "2.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" />

Insert the line below it
To write his name of the operator
<TextView android: textSize = "13.0dip" android: typeface = "monospace" android: textstyle = "bold" android: textColor = "# ffffffff" android: background = "# 00000000" android: paddingTop = "3.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: text = "iPhone" />

Where the android: text =iPhonetheir word
For the operator logo write below the operator name string
<ImageView android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: src = "@ drawable / ios" />

Where android: src = "@ drawable /ios"Logo or necessary to us a picture

Screenshots
Attached Image
Attached Image


Post has been editedPetrik_89 - 14.05.16, 11:22



Rep: (1130)
Supplement for Android 5.x.x, 6.x.x Add the item "Startup" in the "Settings"

What are the additions:

- The essence of all that I was not comfortable when the label was in the main settings menu. I'm the better to put it in place"Security" "Device Administration" . Just a little font is not what it wanted to go see.
Let's start:
  1. Smali can be done under 5.x.x and 6.x.x itself is described in the basic instructions. You can take them out of this Lent, they are for 5.x.x
  2. ATSettings / res / values ​​/ strings.xml: add the line:
    <string name = "autostarts_summary">Manage the startup applications.</ string>

    ATSettings / res / values-ru / strings.xml: add the line:
    <string name = "autostarts_summary">Manage the startup applications.</ string>

  3. ATSettings / res / xml / any place convenient , Add.
    <Preference android: persistent = "false" android: title = "@ string / autostarts_title" android: key = "autostarts" android: summary = "@ string / autostarts_summary" android: fragment = "com.android.settings.autostarts.LewaManageAutostarts" />

    I have added tosecurity_settings_misc In the column:
    <PreferenceCategory android: persistent = "false" android: title = "@ string / device_admin_title" android: key = "device_admin_category">

    It looked like this:
    <PreferenceCategory android: persistent = "false" android: title = "@ string / device_admin_title" android: key = "device_admin_category">
    <Preference android: persistent = "false" android: title = "@ string / manage_device_admin" android: key = "manage_device_admin" android: summary = "@ string / manage_device_admin_summary" android: fragment = "com.android.settings.DeviceAdminSettings" />
    <Preference android: persistent = "false" android: title = "@ string / autostarts_title" android: key = "autostarts" android: summary = "@ string / autostarts_summary" android: fragment = "com.android.settings.autostarts.LewaManageAutostarts" />
    <SwitchPreference android: persistent = "false" android: title = "@ string / install_applications" android: key = "toggle_install_applications" android: summaryOn = "@ string / install_unknown_applications" android: summaryOff = "@ string / install_unknown_applications" />
    </ PreferenceCategory>

    This item replacesSettings / res / xml / settings_headers.xml: and Settings / res / xml / dashboard_categories.xml

  4. Icons can not throw in Settings, they still will not be visible.
  5. Open upautostarts_settings_header.xml from the archive, and delete android: icon = "@ drawable / ic_settings_autostarts" If not removed, in the assembly will swear that there is no image.
  6. Adjusted the font, it takes inSettings \ res \ values ​​\ styles.xml In the end, add the following code:
    <style name = "TextAppearance.autostarts" parent = "@ style / TextAppearance">
    <item name = "android: textSize">16.0sp</ item>
    <item name = "android: textStyle">normal</ item>
    <item name = "android: textColor"># ff414141</ item>
    </ style>

    Then go toSettings / res / layout / and replace manage_autostarts_item.xml the one that in my archive.

Screenshot paragraph.
Attached Image
Attached Image

Attached ImageAttached fileAvtozagruzka_ (files + manual) .rar(14.68 KB)

Sincerely, Dj_GraFlY : thank_you:


Post has been editedDJ_GraFlY - 14.05.16, 19:02



Rep: (848)
Memory and Processor
In point "About phone"
android 5.1.x CM12.1

Did onSamsung - GT-I9300 Galaxy S-III, CM12.1
It will be like in the screenshot
a little bit later

NOTE: We need the files Settings.apk unpack it and proceed to INSTRUCTIONS We work with ApkTool-2.0.3_1101 or ApkTool-2.0.3
INSTRUCTIONS
ATTENTION:
For those who have the following lines:
Settings \ res \ xml \device_info_settings.xml
<PreferenceScreen android: title = "@ string / device_feedback" android: key = "device_feedback" />
<Preference android: title = "@ string / device_name" android: key = "device_name" android: summary = "@ string / device_info_default" style = "android:? PreferenceInformationStyle" />
<Preference android: title = "@ string / device_model" android: key = "device_model" android: summary = "@ string / device_info_default" style = "android:? PreferenceInformationStyle" />
<Preference android: title = "@ string / mod_version" android: key = "mod_version" android: summary = "@ string / mod_version_default" style = "android:? PreferenceInformationStyle" />
<Preference android: title = "@ string / firmware_version" android: key = "firmware_version" android: summary = "@ string / device_info_default" style = "? Android: preferenceInformationStyle" />
<Preference android: title = "@ string / security_patch" android: key = "security_patch" android: summary = "@ string / device_info_default" style = "android:? PreferenceInformationStyle" />
<Preference android: title = "@ string / fcc_equipment_id" android: key = "fcc_equipment_id" android: summary = "@ string / device_info_default" style = "? Android: preferenceInformationStyle" />
<Preference android: title = "@ string / baseband_version" android: key = "baseband_version" android: summary = "@ string / device_info_default" style = "? Android: preferenceInformationStyle" />
<Preference android: title = "@ string / kernel_version" android: key = "kernel_version" android: summary = "@ string / device_info_default" style = "? Android: preferenceInformationStyle" />
<Preference android: title = "@ string / build_date" android: key = "build_date" android: summary = "@ string / build_date_default" style = "android:? PreferenceInformationStyle" />
<Preference android: title = "@ string / build_number" android: key = "build_number" android: summary = "@ string / device_info_default" style = "? Android: preferenceInformationStyle" />
<Preference android: title = "@ string / selinux_status" android: key = "selinux_status" android: summary = "@ string / selinux_status_enforcing" style = "? Android: preferenceInformationStyle" />

If they do not, below there is an archive, in which two files1 - the original, 2 - modified. Can you compare the two files, and who understands the code smali , The method method public onCreate Add all that is connected with the ( "device_cpu", "device_memory")
WHERE:
.restart local v1 # "cpuInfo": Ljava / lang / String;
.restart local v4 # "memInfo": Ljava / lang / String;

I was just, I changed the method to method.

Settings \ res \ xml \device_info_settings.xml
Are looking for:
<Preference android: title = "@ string / build_number" android: key = "build_number" android: summary = "@ string / device_info_default" style = "? Android: preferenceInformationStyle" />

Above it is inserted:
<Preference android: title = "@ string / cpu_info" android: key = "device_cpu" android: summary = "@ string / device_info_default" style = "android:? PreferenceInformationStyle" />
<Preference android: title = "@ string / mem_info" android: key = "device_memory" android: summary = "@ string / device_info_default" style = "android:? PreferenceInformationStyle" />


Settings \ res \ values ​​\strings.xml
<string name = "cpu_info">CPU</ string>
<string name = "mem_info">Ram</ string>


Settings \ res \ values-ru \strings.xml
<string name = "cpu_info">CPU</ string>
<string name = "mem_info">Ram</ string>


Compile the application again and to assign him decompileID file


Settings \ smali \ com \ android \ settings \DeviceInfoSettings.smali
[B] This method I changed completely, as said above [b] (method public onCreate )
We are looking for a method:
.method public onCreate (Landroid / os / Bundle;) V

Change it to:
.method public onCreate (Landroid / os / Bundle;) V
.locals 14
.param p1, "icicle" # Landroid / os / Bundle;

.prologue
.line 116
invoke-super {p0, p1}, Lcom / android / settings / Setting [COLOR = red] [/ COLOR] sPreferenceFragment; ->onCreate (Landroid / os / Bundle;) V

.line 118
const v11, 0x7f06001b

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->addPreferencesFromResource (I) V

.line 120
const-string v11, "firmware_version"

sget-object v12, Landroid / os / Build $ VERSION; ->RELEASE: Ljava / lang / String;

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 121
const-string v11, "firmware_version"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v11

const / 4 v12, 0x1

invoke-virtual {v11, v12}, Landroid / preference / Preference; ->setEnabled (Z) V

.line 122
sget-object v6, Landroid / os / Build $ VERSION; ->SECURITY_PATCH: Ljava / lang / String;

.line 123
.local v6, "patch": Ljava / lang / String;
const-string v11, ""

invoke-virtual {v11, v6}, Ljava / lang / String; ->equals (Ljava / lang / Object;) Z

move-result v11

if-nez v11,: cond_5

.line 125
: try_start_0
new-instance v10, Ljava / text / SimpleDateFormat;

const-string v11, "yyyy-MM-dd"

invoke-direct {v10, v11}, Ljava / text / SimpleDateFormat; -><init>(Ljava / lang / String;) V

.line 126
.local v10, "template": Ljava / text / SimpleDateFormat;
invoke-virtual {v10, v6}, Ljava / text / SimpleDateFormat; ->parse (Ljava / lang / String;) Ljava / util / Date;

move-result-object v7

.line 127
.local v7, "patchDate": Ljava / util / Date;
invoke-static {}, Ljava / util / Locale; ->getDefault () Ljava / util / Locale;

move-result-object v11

const-string v12, "dMMMMyyyy"

invoke-static {v11, v12}, Landroid / text / format / DateFormat; ->getBestDateTimePattern (Ljava / util / Locale; Ljava / lang / String;) Ljava / lang / String;

move-result-object v2

.line 128
.local v2, "format": Ljava / lang / String;
invoke-static {v2, v7}, Landroid / text / format / DateFormat; ->format (Ljava / lang / CharSequence; Ljava / util / Date;) Ljava / lang / CharSequence;

move-result-object v11

invoke-interface {v11}, Ljava / lang / CharSequence; ->toString () Ljava / lang / String;
: try_end_0
.catch Ljava / text / ParseException; {: Try_start_0 ..: try_end_0}: catch_0

move-result-object v6

.line 132
.end local v2 # "format": Ljava / lang / String;
.end local v7 # "patchDate": Ljava / util / Date;
.end local v10 # "template": Ljava / text / SimpleDateFormat;
: goto_0
const-string v11, "security_patch"

invoke-direct {p0, v11, v6}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 136
: goto_1
const-string v11, "baseband_version"

const-string v12, "gsm.version.baseband"

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setValueSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 137
const-string v11, "fcc_equipment_id"

const-string v12, "ro.ril.fccid"

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setValueSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 138
const-string v11, "device_model"

sget-object v12, Landroid / os / Build; ->MODEL: Ljava / lang / String;

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 139
const-string v11, "build_number"

sget-object v12, Landroid / os / Build; ->DISPLAY: Ljava / lang / String;

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 140
const-string v11, "build_number"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v11

const / 4 v12, 0x1

invoke-virtual {v11, v12}, Landroid / preference / Preference; ->setEnabled (Z) V

.line 141
const-string v11, "kernel_version"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v11

invoke-static {}, Lcom / android / settings / DeviceInfoSettings; ->getFormattedKernelVersion () Ljava / lang / String;

move-result-object v12

invoke-virtual {v11, v12}, Landroid / preference / Preference; ->setSummary (Ljava / lang / CharSequence;) V

.line 142
const-string v11, "mod_version"

const-string v12, "ro.cm.display.version"

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setValueSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 143
const-string v11, "mod_version"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v11

const / 4 v12, 0x1

invoke-virtual {v11, v12}, Landroid / preference / Preference; ->setEnabled (Z) V

.line 144
const-string v11, "build_date"

const-string v12, "ro.build.date"

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setValueSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 146
invoke-static {}, Landroid / os / SELinux; ->isSELinuxEnabled () Z

move-result v11

if-nez v11,: cond_6

.line 147
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getResources () Landroid / content / res / Resources;

move-result-object v11

const v12, 0x7f090c0b

invoke-virtual {v11, v12}, Landroid / content / res / Resources; ->getString (I) Ljava / lang / String;

move-result-object v9

.line 148
.local v9, "status": Ljava / lang / String;
const-string v11, "selinux_status"

invoke-direct {p0, v11, v9}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 154
.end local v9 # "status": Ljava / lang / String;
: cond_0
: goto_2
const-string v11, "device_name"

sget-object v12, Landroid / os / Build; ->PRODUCT: Ljava / lang / String;

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 155
const-string v11, "device_name"

invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getResources () Landroid / content / res / Resources;

move-result-object v12

const v13, 0x7f0d000f

invoke-virtual {v12, v13}, Landroid / content / res / Resources; ->getBoolean (I) Z

move-result v12

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->removePreferenceIfBoolFalse (Ljava / lang / String; Z) V

.line 159
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "selinux_status"

const-string v13, "ro.build.selinux"

invoke-direct {p0, v11, v12, v13}, Lcom / android / settings / DeviceInfoSettings; ->removePreferenceIfPropertyMissing (Landroid / preference / PreferenceGroup; Ljava / lang / String; Ljava / lang / String;) V

.line 163
invoke-direct {p0}, Lcom / android / settings / DeviceInfoSettings; ->getCPUInfo () Ljava / lang / String;

move-result-object v1

.line 164
.local v1, "cpuInfo": Ljava / lang / String;
invoke-direct {p0}, Lcom / android / settings / DeviceInfoSettings; ->getMemInfo () Ljava / lang / String;

move-result-object v4

.line 166
.local v4, "memInfo": Ljava / lang / String;
if-eqz v1,: cond_7

.line 167
const-string v11, "device_cpu"

invoke-direct {p0, v11, v1}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 172
: goto_3
if-eqz v4,: cond_8

.line 173
const-string v11, "device_memory"

invoke-direct {p0, v11, v4}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

.line 179
: goto_4
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "safetylegal"

const-string v13, "ro.url.safetylegal"

invoke-direct {p0, v11, v12, v13}, Lcom / android / settings / DeviceInfoSettings; ->removePreferenceIfPropertyMissing (Landroid / preference / PreferenceGroup; Ljava / lang / String; Ljava / lang / String;) V

.line 183
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "fcc_equipment_id"

const-string v13, "ro.ril.fccid"

invoke-direct {p0, v11, v12, v13}, Lcom / android / settings / DeviceInfoSettings; ->removePreferenceIfPropertyMissing (Landroid / preference / PreferenceGroup; Ljava / lang / String; Ljava / lang / String;) V

.line 187
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getActivity () Landroid / app / Activity;

move-result-object v11

invoke-static {v11}, Lcom / android / settings / Utils; ->isWifiOnly (Landroid / content / Context;) Z

move-result v11

if-nez v11,: cond_1

invoke-static {}, Landroid / telephony / TelephonyManager; ->getDefault () Landroid / telephony / TelephonyManager;

move-result-object v11

invoke-virtual {v11}, Landroid / telephony / TelephonyManager; ->getPhoneCount () I

move-result v11

const / 4 v12, 0x1

if-le v11, v12,: cond_2

: cond_1
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getActivity () Landroid / app / Activity;

move-result-object v11

invoke-static {v11}, Lcom / android / settings / Utils; ->showSimCardTile (Landroid / content / Context;) Z

move-result v11

if-nez v11,: cond_2

.line 190
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "baseband_version"

invoke-virtual {p0, v12}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v12

invoke-virtual {v11, v12}, Landroid / preference / PreferenceScreen; ->removePreference (Landroid / preference / Preference;) Z

.line 194
: cond_2
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getActivity () Landroid / app / Activity;

move-result-object v11

invoke-static {v11}, Lcom / android / settings / DeviceInfoSettings; ->getFeedbackReporterPackage (Landroid / content / Context;) Ljava / lang / String;

move-result-object v11

invoke-static {v11}, Landroid / text / TextUtils; ->isEmpty (Ljava / lang / CharSequence;) Z

move-result v11

if-eqz v11,: cond_3

.line 195
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "device_feedback"

invoke-virtual {p0, v12}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v12

invoke-virtual {v11, v12}, Landroid / preference / PreferenceScreen; ->removePreference (Landroid / preference / Preference;) Z

.line 202
: cond_3
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getActivity () Landroid / app / Activity;

move-result-object v0

.line 204
.local v0, "act": Landroid / app / Activity;
const-string v11, "container"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v5

check-cast v5, Landroid / preference / PreferenceGroup;

.line 205
.local v5, "parentPreference": Landroid / preference / PreferenceGroup;
const-string v11, "terms"

const / 4 v12, 0x1

invoke-static {v0, v5, v11, v12}, Lcom / android / settings / Utils; ->updatePreferenceToSpecificActivityOrRemove (Landroid / content / Context; Landroid / preference / PreferenceGroup; Ljava / lang / String; I) Z

.line 207
const-string v11, "license"

const / 4 v12, 0x1

invoke-static {v0, v5, v11, v12}, Lcom / android / settings / Utils; ->updatePreferenceToSpecificActivityOrRemove (Landroid / content / Context; Landroid / preference / PreferenceGroup; Ljava / lang / String; I) Z

.line 209
const-string v11, "copyright"

const / 4 v12, 0x1

invoke-static {v0, v5, v11, v12}, Lcom / android / settings / Utils; ->updatePreferenceToSpecificActivityOrRemove (Landroid / content / Context; Landroid / preference / PreferenceGroup; Ljava / lang / String; I) Z

.line 211
const-string v11, "webview_license"

const / 4 v12, 0x1

invoke-static {v0, v5, v11, v12}, Lcom / android / settings / Utils; ->updatePreferenceToSpecificActivityOrRemove (Landroid / content / Context; Landroid / preference / PreferenceGroup; Ljava / lang / String; I) Z

.line 215
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v5

.line 216
invoke-static {}, Landroid / os / UserHandle; ->myUserId () I

move-result v11

if-nez v11,: cond_9

.line 217
const-string v11, "system_update_settings"

const / 4 v12, 0x1

invoke-static {v0, v5, v11, v12}, Lcom / android / settings / Utils; ->updatePreferenceToSpecificActivityOrRemove (Landroid / content / Context; Landroid / preference / PreferenceGroup; Ljava / lang / String; I) Z

.line 226
: goto_5
const-string v11, "additional_system_update_settings"

invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getResources () Landroid / content / res / Resources;

move-result-object v12

const v13, 0x7f0d0003

invoke-virtual {v12, v13}, Landroid / content / res / Resources; ->getBoolean (I) Z

move-result v12

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->removePreferenceIfBoolFalse (Ljava / lang / String; Z) V

.line 230
new-instance v3, Landroid / content / Intent;

const-string v11, "android.settings.SHOW_REGULATORY_INFO"

invoke-direct {v3, v11}, Landroid / content / Intent; -><init>(Ljava / lang / String;) V

.line 231
.local v3, "intent": Landroid / content / Intent;
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPackageManager () Landroid / content / pm / PackageManager;

move-result-object v11

const / 4 v12, 0x0

invoke-virtual {v11, v3, v12}, Landroid / content / pm / PackageManager; ->queryIntentActivities (Landroid / content / Intent; I) Ljava / util / List;

move-result-object v11

invoke-interface {v11}, Ljava / util / List; ->isEmpty () Z

move-result v11

if-eqz v11,: cond_4

.line 232
const-string v11, "regulatory_info"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v8

.line 233
.local v8, "pref": Landroid / preference / Preference;
if-eqz v8,: cond_4

.line 234
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

invoke-virtual {v11, v8}, Landroid / preference / PreferenceScreen; ->removePreference (Landroid / preference / Preference;) Z

.line 238
.end local v8 # "pref": Landroid / preference / Preference;
: cond_4
const-string v11, "advanced_mode"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v11

check-cast v11, Lcom / android / settings / cyanogenmod / CMSecureSettingSwitchPreference;

iput-object v11, p0, Lcom / android / settings / DeviceInfoSettings; ->mAdvancedSettings: Lcom / android / settings / cyanogenmod / CMSecureSettingSwitchPreference;

.line 240
const-string v12, "advanced_mode"

invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getResources () Landroid / content / res / Resources;

move-result-object v11

const v13, 0x11200c0

invoke-virtual {v11, v13}, Landroid / content / res / Resources; ->getBoolean (I) Z

move-result v11

if-nez v11,: cond_a

const / 4 v11, 0x1

: goto_6
invoke-direct {p0, v12, v11}, Lcom / android / settings / DeviceInfoSettings; ->removePreferenceIfBoolFalse (Ljava / lang / String; Z) V

.line 242
return-void

.line 134
.end local v0 # "act": Landroid / app / Activity;
.end local v1 # "cpuInfo": Ljava / lang / String;
.end local v3 # "intent": Landroid / content / Intent;
.end local v4 # "memInfo": Ljava / lang / String;
.end local v5 # "parentPreference": Landroid / preference / PreferenceGroup;
: cond_5
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "security_patch"

invoke-virtual {p0, v12}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v12

invoke-virtual {v11, v12}, Landroid / preference / PreferenceScreen; ->removePreference (Landroid / preference / Preference;) Z

goto / 16: goto_1

.line 149
: cond_6
invoke-static {}, Landroid / os / SELinux; ->isSELinuxEnforced () Z

move-result v11

if-nez v11,: cond_0

.line 150
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getResources () Landroid / content / res / Resources;

move-result-object v11

const v12, 0x7f090c0c

invoke-virtual {v11, v12}, Landroid / content / res / Resources; ->getString (I) Ljava / lang / String;

move-result-object v9

.line 151
.restart local v9 # "status": Ljava / lang / String;
const-string v11, "selinux_status"

invoke-direct {p0, v11, v9}, Lcom / android / settings / DeviceInfoSettings; ->setStringSummary (Ljava / lang / String; Ljava / lang / String;) V

goto / 16: goto_2

.line 169
.end local v9 # "status": Ljava / lang / String;
.restart local v1 # "cpuInfo": Ljava / lang / String;
.restart local v4 # "memInfo": Ljava / lang / String;
: cond_7
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "device_cpu"

invoke-virtual {p0, v12}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v12

invoke-virtual {v11, v12}, Landroid / preference / PreferenceScreen; ->removePreference (Landroid / preference / Preference;) Z

goto / 16: goto_3

.line 175
: cond_8
invoke-virtual {p0}, Lcom / android / settings / DeviceInfoSettings; ->getPreferenceScreen () Landroid / preference / PreferenceScreen;

move-result-object v11

const-string v12, "device_memory"

invoke-virtual {p0, v12}, Lcom / android / settings / DeviceInfoSettings; ->findPreference (Ljava / lang / CharSequence;) Landroid / preference / Preference;

move-result-object v12

invoke-virtual {v11, v12}, Landroid / preference / PreferenceScreen; ->removePreference (Landroid / preference / Preference;) Z

goto / 16: goto_4

.line 222
.restart local v0 # "act": Landroid / app / Activity;
.restart local v5 # "parentPreference": Landroid / preference / PreferenceGroup;
: cond_9
const-string v11, "system_update_settings"

invoke-virtual {p0, v11}, Lcom / android / settings / DeviceInfoSettings; ->removePreference (Ljava / lang / String;) V

goto / 16: goto_5

.line 240
.restart local v3 # "intent": Landroid / content / Intent;
: cond_a
const / 4 v11,0x0

goto: goto_6

.line 129
.end local v0 # "act": Landroid / app / Activity;
.end local v1 # "cpuInfo": Ljava / lang / String;
.end local v3 # "intent": Landroid / content / Intent;
.end local v4 # "memInfo": Ljava / lang / String;
.end local v5 # "parentPreference": Landroid / preference / PreferenceGroup;
: catch_0
move-exception v11

goto / 16: goto_0
.end method


WHERE:
0x7f06001b - <public type = "xml" name = "device_info_settings"
0x7f090c0b - <public type = "string" name = "selinux_status_disabled"
0x7f0d000f - <public type = "bool" name = "config_displayDeviceName"
0x7f0d0003 - <public type = "bool" name = "config_additional_system_update_setting_enable"
0x11200c0 - <public type = "bool" name = "config_advancedSettingsMode" -framework-res
0x7f090c0c - <public type = "string" name = "selinux_status_permissive"

We are looking for a method:
.method private static getFeedbackReporterPackage (Landroid / content / Context;) Ljava / lang / String;

Above it is inserted:
.method private getCPUInfo () Ljava / lang / String;
.locals 6

.prologue
const / 4 v5, -0x1

.line 583
const / 4 v2, 0x0

.line 606
.local v2, "result": Ljava / lang / String;
: try_start_0
new-instance v1, Ljava / io / BufferedReader;

new-instance v3, Ljava / io / FileReader;

const-string v4, "/ proc / cpuinfo"

invoke-direct {v3, v4}, Ljava / io / FileReader; -><init>(Ljava / lang / String;) V

const / 16 v4, 0x100

invoke-direct {v1, v3, v4}, Ljava / io / BufferedReader; -><init>(Ljava / io / Reader; I) V

.line 608
.local v1, "reader": Ljava / io / BufferedReader;
invoke-virtual {v1}, Ljava / io / BufferedReader; ->readLine () Ljava / lang / String;

move-result-object v0

.line 610
.local v0, "Line": Ljava / lang / String;
: goto_0
if-eqz v0,: cond_1

.line 611
const-string v3, "model name"

invoke-virtual {v0, v3}, Ljava / lang / String; ->indexOf (Ljava / lang / String;) I

move-result v3

if-ne v3, v5,: cond_0

const-string v3, "Processor"

invoke-virtual {v0, v3}, Ljava / lang / String; ->indexOf (Ljava / lang / String;) I

move-result v3

if-ne v3, v5,: cond_0

.line 613
invoke-virtual {v1}, Ljava / io / BufferedReader; ->readLine () Ljava / lang / String;

move-result-object v0

goto: goto_0

.line 615
: cond_0
const-string v3, ":"

invoke-virtual {v0, v3}, Ljava / lang / String; ->split (Ljava / lang / String;) [Ljava / lang / String;

move-result-object v3

const / 4 v4, 0x1

aget-object v3, v3, v4

invoke-virtual {v3}, Ljava / lang / String; ->trim () Ljava / lang / String;

move-result-object v2

.line 620
: cond_1
invoke-virtual {v1}, Ljava / io / BufferedReader; ->close () V
: try_end_0
.catch Ljava / io / IOException; {: Try_start_0 ..: try_end_0}: catch_0

.line 624
.end local v0 # "Line": Ljava / lang / String;
.end local v1 # "reader": Ljava / io / BufferedReader;
: goto_1
return object v2

.line 622
: catch_0
move-exception v3

goto: goto_1
.end method


We are looking for a method:
.method private static readLine (Ljava / lang / String;) Ljava / lang / String;

Above it is inserted:
.method private getMemInfo () Ljava / lang / String;
.locals 8

.prologue
.line 561
const / 4 v2, 0x0

.line 570
.local v2, "result": Ljava / lang / String;
: try_start_0
const-string v3, "/ proc / meminfo"

invoke-static {v3}, Lcom / android / settings / DeviceInfoSettings; ->readLine (Ljava / lang / String;) Ljava / lang / String;

move-result-object v0

.line 571
.local v0, "firstLine": Ljava / lang / String;
if-eqz v0,: cond_0

.line 572
const-string v3, "\\ s +"

invoke-virtual {v0, v3}, Ljava / lang / String; ->split (Ljava / lang / String;) [Ljava / lang / String;

move-result-object v1

.line 573
.local v1, "parts": [Ljava / lang / String;
array-length v3, v1

const / 4 v4, 0x3

if-ne v3, v4,: cond_0

.line 574
new-instance v3, Ljava / lang / StringBuilder;

invoke-direct {v3}, Ljava / lang / StringBuilder; -><init>() V

const / 4 v4, 0x1

aget-object v4, v1, v4

invoke-static {v4}, Ljava / lang / Long; ->parseLong (Ljava / lang / String;) J

move-result-wide v4

const-wide / 16 v6, 0x400

div-long / 2addr v4, v6

invoke-virtual {v3, v4, v5}, Ljava / lang / StringBuilder; ->append (J) Ljava / lang / StringBuilder;

move-result-object v3

const-string v4, "MB"

invoke-virtual {v3, v4}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v3

invoke-virtual {v3}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;
: try_end_0
.catch Ljava / io / IOException; {: Try_start_0 ..: try_end_0}: catch_0

move-result-object v2

.line 579
.end local v0 # "firstLine": Ljava / lang / String;
.end local v1 # "parts": [Ljava / lang / String;
: cond_0
: goto_0
return object v2

.line 577
: catch_0
move-exception v3

goto: goto_0
.end method


FILE:



Rep: (268)
Settings in the style of android l

This was done on 4.4.4 CM11

Instruction
1) Parse settings.apk
2) UnpackAttached fileres.rar(382 bytes)

3) Go to res / values ​​/ styles
this style
<style name = "Theme.Settings" parent = "@ android: style / Theme.Holo">

completely change to
<style name = "Theme.Settings" parent = "@ android: style / Theme.Holo.Light">
<item name = "android: actionBarStyle">@ style / Widget.Settings</ item>
<item name = "apnPreferenceStyle">@ Style / ApnPreference</ item>
<item name = "ic_menu_add">@ Drawable / ic_menu_add_dark</ item>
<item name = "ic_menu_moreoverflow">@android: drawable / ic_menu_moreoverflow_holo_dark</ item>
<item name = "ic_wps">@ Drawable / ic_wps_dark</ item>
<item name = "wifi_signal">@ Drawable / wifi_signal_dark</ item>
</ style>

and at the end before
</ resources>

we insert
<style name = "Widget.Settings" parent = "@ android: style / Widget.Holo.ActionBar.Solid">
<item name = "android: background">@ Drawable / action_Bar</ item>
</ style>

4) who should do further switchestyk
5) settings.apk finished, collect
6) parse framework-res.apk
7) unpackAttached fileframework.rar(1.2 KB)

8) res / values ​​/ colors add
<color name = "text_separator"># ff43a047</ color>

9) res / values ​​/ styles
styles to the form
<style name = "Widget.TextView.ListSeparator" parent = "@ style / Widget.TextView">
<item name = "textSize">14.0sp</ item>
<item name = "textStyle">bold</ item>
<item name = "textColor">@ Color / text_separator</ item>
<item name = "gravity">center_vertical</ item>
<item name = "background">@ Drawable / dark_header_dither</ item>
<item name = "layout_width">fill_parent</ item>
<item name = "layout_height">wrap_content</ item>
<item name = "paddingStart">8.0dip</ item>
</ style>
<style name = "Widget.TextView.ListSeparator.White" parent = "@ style / Widget.TextView.ListSeparator">
<item name = "textColor">@ Color / text_separator</ item>
<item name = "background">@ Drawable / light_header_dither</ item>
</ style>

10) All Gonna check

Result
Attached Image

Addition


Post has been editedDimar - 17.05.16, 16:00
Reason for editing: Supplement



Rep: (268)
Round notification icons in the curtain

Manual
1) Parse the framework-res
2) UnpackAttached fileres.rar(1.13 KB)

3) The res / values ​​/ drawables
line to the form
<item type = "drawable" name = "notification_template_icon_bg">@ Drawable / notif_icon_bg</ item>
<item type = "drawable" name = "notification_template_icon_low_bg">@ Drawable / notif_icon_bg</ item>

4) All

Result
Attached Image


Post has been editedAnton 982 - 28.03.17, 15:02
Reason for editing: In the catalog!



Rep: (184)
Replacing a tile holder of the flashlight, it is like additionReplacing tiles in the blind

The version apktool (1.5.2), made at 4.4.2 AOSP and KitKat
Description
I replaced the I do not need toglOWNER Did not like the fact that the language of the manual there is only one which propishish color and clicking on the Toggle distinguish ispavil this defect
Instruction
explanations do not write if you want see in mana
of the files, we need only the light madeTorch.apkthrow it in / system / app
Icon want my or his anyAttached fileres.zip(1.1 KB)

and smiledAttached filesmali.zip(1.49 KB)

Open SystemUI \ res \ layout \quick_settings_tile_user.xml and leads to the mind, I hid the icon, label and added a flashlight according to the above mana as amended:
<? 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">
<ImageView android: id = "@ id / user_imageview" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "0.0dip" android: src = "@ drawable / ic_qs_default_user" android: scaleType = "fitXY" />
<TextView android: ellipsize = "end" android: gravity = "center" android: layout_gravity = "bottom | center" android: id = "@ id / user_textview" android: layout_width = "wrap_content" android: layout_height = "0.0dip" android : text = "@ string / quick_settings_user_label" android: singleLine = "false" style = "@ style / TextAppearance.QuickSettings.TileView.User" />
<aaa.sk0t.ui.MultyBtn android: layout_gravity = "top | center" android: tag = "com.farproc.nexustorch.NexusTorchActivity" android: background = "@ drawable / qs_tile_background" android: paddingBottom = "10.0dip" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: contentDescription = "com.farproc.nexustorch" />
<LinearLayout android: gravity = "center" android: layout_gravity = "center" android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<ImageView android: layout_gravity = "center" android: paddingBottom = "10.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / ic_qs_torch" />
<TextView android: gravity = "center" android: layout_gravity = "center" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: text = "@ string / flashlight" style = "@ style / TextAppearance.QuickSettings.TileView "/>
</ LinearLayout>
</ Framelifeout>

Open and add: SystemUI \ res \ values ​​\strings.xml
<string name = "flashlight">FLASHLIGHT</ string>
in Eng. localization: SystemUI \ res \ values-ru \ strings.xml
<string name = "flashlight">TORCH</ string>
and Ukrain. localization: SystemUI \ res \ values-uk \ strings.xml
<string name = "flashlight">LIHTAPIK</ string>
In printsepe everything is ready, but I imagine even changed the number of tiles was 3, I did 6 and lanshavtnom at turn was 6 I did the same to 11 was etozhe if you can do in: SystemUI \ res \ values ​​\ integers in this line
<integer name = "quick_settings_num_columns">
no change to the number of tiles and the necessity
in lanshavtnom mode SystemUI \ res \ values-land \integers in line takoyzhe
<integer name = "quick_settings_num_columns">
the required number of tiles
Result: tiles takogozhe color and change the language changes the language) Scrin
IT WAS :
Attached Image
Attached Image

BECAME :
Attached Image
Attached Image


Post has been editedKolbas - 16.05.16, 13:42
Reason for editing: Added screenshots



Rep: (483)
A little addition toAdd a music visualizer in the curtain with the setting

Description
The bottom line is that I decided to add a renderer in navbar (which is on the screen, rather than on the device)
Maybe someone prigoditsya.Otkryvaem navigation_bar.xml and seek
<com.android.systemui.statusbar.policy.DeadZone android: layout_gravity = "top" android: id = "@ id / deadzone" android: clickable = "true" android: layout_width = "fill_parent" android: layout_height = "@ dimen / navigation_bar_deadzone_size "/>

once inserted beneath this line
<com.adi.rom.interface.MusicEqualizerVisualizer android: layout_gravity = "bottom" android: id = "@ + id / new_visualizer_view_panel" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: layout_marginBottom = "0.0dip">
<FrameLayout android: id = "@ + id / new_custom_visualizer_view_panel" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.adi.rom.interface.VisualizerView android: id = "@ + id / new_custom_visualizer_view" android: visibility = "gone" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
</ Framelifeout>
</com.adi.rom.interface.MusicEqualizerVisualizer>

Gotovo.Sobiraem SystemUI and change the system!

Screenshots
I am sure there is no need


Post has been editedPomidor666 - 16.05.16, 12:45



Rep: (500)
Setting the Recent panel in the main settings menu

From Android 5.0 and higher

Description: A very simple way to display the operating button "Close all" in the menu of recent applications, as well as configure some of the subtleties.
Instruction
DecompileSettings.apk open dashboard_categories.xml along the way: Settings / res / xml / And paste this code:
<dashboard-tile android: icon = "@ drawable / ic_Recenty" android: title = "@ string / Recenty">
<intent android: targetPackage = "eu.chainfire.recently" android: action = "android.intent.action.MAIN" android: targetClass = "eu.chainfire.recently.SettingsActivity" />
</ dashboard-tile>

For example after the line
<dashboard-tile android: icon = "@ drawable / ic_settings_applications" android: id = "@ id / application_settings" android: title = "@ string / applications_settings" android: fragment = "com.android.settings.applications.ManageApplications" />

ATstrings.xml along the way: Settings / res / values ​​/ add:
<string name = "Recenty">Recent Settings panel</ string>

ATstrings.xml along the way: Settings / res / values-ru / add:
<string name = "Recenty">Customize the Recent Panel</ string>

The icon of the file put in a folderdrawable-xhdpi-v4 (Specifically in the display which corresponds to the resolution) along the path: Settings / res / Attached fileic_Recenty.zip (2.11 KB)

CompileSettings.apk and throws in

Download the application and put in asystem / app Attached fileRecent.apk (1.26 MB)


Result
Attached Image
Attached Image
Attached Image


Post has been editedAnton 982 - 28.03.17, 15:03
Reason for editing: In the catalog!



Rep: (187)
ssh server, client, mc and java scripts (BeanShell)
ssh server, client, by mc
1) Place the archive sshd-mc.tar.gz to folder / system on the phone
2) connect toroot adb
3) to execute the command
cd / system && tar -zxpf sshd-mc.tar.gz
4) Reload this phone
5) add content~ / .Ssh / id_rsa.pub(By computer) in/data/.ssh/authorized_keys(on the phone)
6a) can now be connected to the computer to the phone team (if your phone has an address)
ssh root @ ip_addres_of_phone
6b) or (if the phone is connected via the adb)
adb forward tcp: 2222 tcp: 22
ssh -p 2222 root @ localhost
Remarks
1) You can also go to the phone inmcon a computer through the menusftporfishBy typing in it
root @ ip_addres_of_phone
or
root @ localhost: 2222
respectively
Scripts in Java (BeanShell)
0) Download files
1) copy of the system files for the appropriate ways and give them the appropriate rights and permissions
2) with the command
bsh
you can connect to BeanShell interactive console and execute commands directly on Java
3) or via commands
bshs /full/path/to/file.bsh
You can run the execution file file.bsh, for example, samples


Post has been editedAnton 982 - 30.03.17, 12:03
Reason for editing: In the catalog!



Rep: (268)

Manual
1) In the framework-res.apk / res / values ​​/ dimens.xml
this
<dimen name = "preference_fragment_padding_side">16.0dip</ dimen>
<dimen name = "preference_screen_header_padding_side">16.0dip</ dimen>

change to
<dimen name = "preference_fragment_padding_side">0.0dip</ dimen>
<dimen name = "preference_screen_header_padding_side">0.0dip</ dimen>

that is, instead of 16 values ​​set 0
2) All

What happened
Attached Image



Rep: (268)
Alert style android l

This was done on the android version 4.4.4

Manual
1) work with framework-res.apk
2) res / values ​​/ styles
to the form styles
<style name = "TextAppearance.StatusBar.EventContent" parent = "@ style / TextAppearance.StatusBar">
<item name = "textSize">@ dimen / notification_text_size</ item>
<item name = "textColor"># ff000400</ item>
</ style>
<style name = "TextAppearance.StatusBar.EventContent.Title" parent = "@ style / TextAppearance.StatusBar.EventContent">
<item name = "textSize">@ dimen / notification_title_text_size</ item>
<item name = "textStyle">bold</ item>
<item name = "textColor"># ff000400</ item>
<item name = "fontFamily">sans-serif-light</ item>
</ style>

respectively, is the color of the text
<item name = "textColor"># ff000400</ item>

3) repaint the picture in the res / drawable-hdpi (I have this chart, all in different ways)
these in any color, I have a white
notification_bg_low_normal.9
notification_bg_low_pressed.9
notification_bg_normal.9
notification_bg_normal_pressed.9

Here are my readyAttached filefayly.rar(1.17 KB)

4) then do ittyk
5) All

Result
Attached Image

Addition


Post has been editedDimar - 21.05.16, 18:06
Reason for editing: Edit



Rep: (1517)
How do I see smali and what do I know about them


I will try to continue the work started by the SW.sk0t here For instructions on editing the system resources (Post sk0t # 25053973)
I apologize if something is repeated from the specified instructions.

I want to say at once that I am an amateur in these matters, I do not know any java, nor the right terms, etc. Therefore, the following are my thoughts in their own words, which may be erroneous. In this regard, my opus is not for professionals who understand in smali much more than me and use the correct terminology. But I'll be glad to constructive criticism and comments from them, and that will help me, and for those who will benefit from this "work", to better understand how to work with smali.

Very, very much I do not know. Therefore, if nothing is written below that you would like to know, so I do not know this, or forgot to write :)
I will fill up as far as possible.

Registers. Very important!
Registers - I would say that it is in the memory cell designed for storing and reading of these numerical values, and links to various objects.
Hereinafter, the objects I understand everything that is not a numerical value.
Without registers nowhere. Everything that happens to your device - passes through the registers.
Registers are designated v0, v1, etc., p0, p1, etc.
Register holds a 32-bit value (0xffffffff). If the operation is performed with 64-bit values ​​are used two successive register.
With vX registers can operate within a single method. With pX registers can operate within a number of methods of a class (smali).
All input data in a method call (input variables, parameters) transmitted to it from the outside. Inside this method, they fall into the registers pX.
All registers which are additionally used in a method, designated vX.
Inside the method registers pX content usually does not change.
Examples on fingers
1. You set the challenge: how much is 2 + 4?
What happens in mind: the values ​​2 and 4 are placed in a memory location (register), and the method is called "addition".
Further in the method, these registers (p0 and p1) are read, are added and the sum is placed into register v0.
After the method returns v0 register.
2. complicate the problem: how much is 2 + 4, and which will be equal to the product of the sum by 3?
Our mental activities: value of 2, 3 and 4 are placed in memory (registers) and the method is called "solution to the problem."
Further in this method registers p0 and p1 is read, and the method is called "addition". The method returns the result and store it into register v0. Next, take a value from a register v0 and of p2 and execute "multiplication." The obtained result is placed into register v1. Next are output method "solution to the problem," the values ​​of v0 and v1 registers.
Now I say that the examples are given only for the understanding and have nothing to do with real smali, because, firstly, the operations of addition, multiplication, and others are performed without invoking methods, and, secondly, the method can not return just two values, only if by preserving in the field, but more on that later.
3. Example of pX register in different methods of smali.
Some head (deputy. Dean for ideology) set the slave (the elder group), which in turn is the leader of the group, the task group to conduct a survey on the application form and return the stack of completed questionnaires. We have a method call "Carry out anonymous survey group B (Form profiles - input variable) stack profiles - returned by the result" (about the methods will be more fully below). For elder profile falls into the register let p0. He makes a copy of the questionnaire and gives their students the group, ie causing the order Methods "Questioning Ivanov (Form profiles) filled questionnaire", "Survey Petrova (Form profiles) filled questionnaire" etc. Once distributed the questionnaires, it answers the questions in the questionnaire itself, which uses vX several registers, which uses only himself and no one about their content will not tell. The number of such registers, he defines himself. Let's go back to Ivanov. Profile, which was already in a register in the parent p0 method (for elder) also falls in the register p0 for him, he can fill also uses its registers vX, is not disclosed to others. But Petrov, receiving p0's method called "Hey freshman, fill in this paper, as I have a smoke (the questionnaire) completed application form." That is, the shape of the profiles registers p0 p0 elder through register Petrov misses the register p0 Freshman. Sam Peter is not soared to the account profiles and, accordingly, their registers vX does not use. Something like this.

VX registers are actively written, rewritten inside the method, and can be specified once and before the end of the method. This depends on the developer.
For example, I, by force of habit, I try registers v0-v3 leave for frequent use for intermediate calculations and registers with a higher number
used for the values ​​of objects that are necessary in the method for large parts of the code unchanged.

With the registers need to be very careful. Since the use of any available register for their own purposes could lead to overwrite the existing it has the necessary information.
If you add some code in smali and you need to use registers, you can add the right amount of registers to the amount that has already been reserved in this method. But you can do without the addition, and to find "free" in the place of the code register.
How to find "free" Register? Let me explain easier. We need to look at the code below (here below for further understand and will not placed below smali, and in order of performance-sensitive string of unconditional and conditional branches) which registers are used, and which have not.
For example, at the beginning of the method and immediately before the line return-void will be "free", all registered registers. Before the line return v0 or return-object v0 will be free all reserved local registers, except v0, since it contains information that is returned by the method. You can also use registers that are below the code occur first and are not enclosed in curly brackets in statements that begin with: move, iget, sget, aget, add, sub, div, mul, and, or, and some others, which is saved values ​​in this register. But you can not use registers, standing first in the if statements, iput, sput and others, which reads the contents of the register.
For example:
const v2, 0x2

iget v3, p0, Lcom / fmd / statusbarcolor / color; ->TransitionStep: I

if-ge v3, v2,: cond_2e

iget v1, p0, Lcom / fmd / statusbarcolor / color; ->PrevColor: I

invoke-static {v7, v1, v3, v2}, Lcom / fmd / statusbarcolor / color; ->getStepColor (IIII) I

move-result v0

## here registers v0 and v3 "busy" since the next line is used v3 (v3 to the value 1 is added and the result is stored again in v3), v0 below is used for storing its value in the field TransitionTempColor: I; "Free" registers v1, v2, since the lower code value is placed in v1 0x8, v2 placed in value from the isGradientEnabled: I is not important that these registers were previously

add-int / lit8 v3, v3, 0x1

iput v3, p0, Lcom / fmd / statusbarcolor / color; ->TransitionStep: I

: goto_9
iput v0, p0, Lcom / fmd / statusbarcolor / color; ->TransitionTempColor: I

invoke-virtual {p0, v0}, Lcom / fmd / statusbarcolor / color; ->setBackgroundColor (I) V

goto: goto_a

## look at the continuation of the code after the tag: goto_a
## ...

: goto_a
iget v3, p0, Lcom / fmd / statusbarcolor / color; ->isLauncher: I

if-eqz v3,: cond_34
## that there was no strange errors, do not forget to view the continuation and after the conditional jump labels: cond_XX

const v1,0x8

const v0, 0x7f0c00fe

invoke-virtual {p0, v0}, Lcom / fmd / statusbarcolor / color; ->findViewById (I) Landroid / view / View;

move-result-object v0

iget v2, p0, Lcom / fmd / statusbarcolor / color; ->isGradientEnabled: I

The number of registers reserved in this method is defined in the second line method: .locals X or H. .registers
The difference between them is that .locals corresponds to the number of local (internal) vX registers and .registers - everyone: pX, and vX.
Counting from zero, so the number should be 1 greater than the upper rooms used by the registers. For example, in the method of the greatest number of register v7, means must be .locals 8. Or the method of the greatest number of registers v6 and p2, means must be either 7 or .locals .registers 10. However, not all registers pX can be used in the method, and the need to reserve them in any way. Therefore, the number is calculated by the number passed to the "input" method of alternating + 1 (why one would see Methods).
For example, for the method .method public constructor<init>(Landroid / content / Context; Landroid / util / AttributeSet;) V used 2 + 1 = 3 registers: p0, p1 and p2.

Another thing I can say about the registers. If they are used in the method of more than 16 (including vX and pX), the fact that the method worked, it is necessary to make additional gestures.
Namely, before calling methods to transfer the contents of registers of the registers and pX vX numbers above 15 (as the count zero, then v15 - is the 16th register of the account) vX registers with indices below 15.
move-object / from16 v0, p0 ## move the object

move / from16 v1, v32 ## move numerical value

invoke-virtual {v0, v1}, L bla bla bla ->MyMethod (I) V

Registers pX follow registers vX, i.e. even if you have the greatest vX register number does not exceed 15, but uses much pX registers that their total amount is more than 16, you'll have to endure pX registers, which together with vX beyond the first 16 registers. For example, a method uses 14 registers vX (.locals 14) and it is transferred to the input parameter 3 (+1 for no static methods comprising current class). It turns out that registers p0 and p1 fall in the number of first registers 16, and p2 and p3 no. Therefore, they have to transfer into registers vX numbers below 15 before each use, p2 and p3 registers.

I note that if the registers are not placed in a row in the braces, the value of the first of these changes, with some exceptions (operation puts the contents in the fields in the arrays and the like - with the word operations put in the title), and next (if not repeated) remain unchanged. If the registers are enclosed in curly brackets, that is passed as input parameters when calling the method, then, as a rule, after the manner in which they do not change the content (there are times when everything is inside a method they change).
For example,
const v0, 0x0 ## into register v0 room number. v0 changes register.

add-int v3, v2, v1 ## Addition register values ​​v1 and v2, the result is placed into register v3. Registers v1 and v2 are unchanged

but
add-int v3, v3, v1 adding ## register values ​​v1 and v3, the result is placed into register v3. Register remains unchanged v1, v3 register after using it overwrites the initial value (the result is placed there)

add-int / 2addr v3, v1 ## analog of the previous line - Addition register values ​​v1 and v3, the result is placed into register v3. v1 register remains unchanged

move v1, v2 ## movement (room) register value v2 to v1. v2 register remains unchanged. It is often used to make a "copy" to register its operations with the change, without losing the original meaning

iput v0, p0 ... sput v0, p0 ... aput v0, v1, v2, etc. Register ## value v0 is placed in the box, the end of a string or array. Value v0 does not vary.

invoke-virtual {p0, v1, v2} ... ## call the method with the input parameters v1, v2. After the contents of the method v1 and v2 typically will be the same as before the method call.



Fields
Fields declared in the beginning of the class (smali) .field word further type modifier access, etc., a field name:. Type values ​​in categories # static fields and # instance fields.
Field as a register is used to store therein and reading therefrom of values ​​and references to objects, but unlike a register, it is available not only within each particular method, but any other method of class (within a smali), and, if you allow class modifiers and field access methods from other classes.
Values ​​are placed in the field of the register and are read out of the register via operators: iput, sput, iget, sget - if the field is placed or read numerical value, iput-object, sput-object, iget-object, sget-object - if placed or read an object reference in the field. As you can see, the first letter corresponds to the type of field operators: i - instance, s - static.
For a logical (boolean) values ​​(Z) used iget-boolean or iput-boolean.

Access Modifiers: public, private, protected - define (limit) the area where you can get access to this field:
public - field available to the public of any class (not sure, but in my opinion, and the class itself must also have a modifier public);
private - the field is available only within a given class;
protected - the field is available within a given and child classes.
Those. if you want the field to be available from other classes (smali), you need to specify the public, if the field is only used within the same class, then private.
Examples of color.smali DRC from:
Announcement fields
.field private mDefaultDisplay: Landroid / view / Display; # Is used only in color.smali

.field public mIsFullScreen: I # is used in a different class - color $ Receiver.smali

Writing, reading
iput-object v0, p0, Lcom / fmd / statusbarcolor / color; ->mLockPatternUtils: Lcom / android / internal / widget / LockPatternUtils; ## stores the object - a reference to the class from the registry v0

iget-object v0, v3, Lcom / fmd / statusbarcolor / color; ->Updater: Landroid / os / Handler; ## Reads an object - a reference to the class register v0

sget-object v3, Landroid / graphics / Bitmap $ Config; ->ARGB_8888: Landroid / graphics / Bitmap $ Config; ## reads the object from the static field in the register v3

iput v0, p0, Lcom / fmd / statusbarcolor / color; ->NumberOfPointsForMonitoring: I ## stores the integer value from the register v0

iget v0, p0, Lcom / fmd / statusbarcolor / color; ->ScaleFactor: I ## read the integer value into register v0

Since the fields are only used for temporary storage of information, they can be performed only two operations: read and write.
Take the example of a spoiler above the line:
iput-object v0, p0, Lcom / fmd / statusbarcolor / color; ->mLockPatternUtils: Lcom / android / internal / widget / LockPatternUtils;
As already mentioned this command to save an object in the field. But look at it in detail:
First comes the instruction (command statement): the first letter i said that working with the field instance, s - Static, then put - (translated as "put") said that retain value in this field, get - (in translation " get ") - which reads the value of the field.
The following fields for instance two registers for static - one: first - the register whose contents are stored (put) in the field or in which read (get) the value of the field; second (for instance) register contains a reference to a class in which it is declared field (if this field is declared in this smali, then the second will likely register p0).
Next is the path to smali (class), which announced this field. Note the contents of the second register (which goes before) for instance fields must match, otherwise it would be a mistake.
Furthermore, "->"(Arrow) does not know the meaning for me so used to the convenience of separation methods of names and fields on behalf of the class.
And finally, the field itself: the field name followed by a colon and the type of content. Note the contents of the first register must comply with the specified type, otherwise it would be a mistake.
Those. for the given line, we have to keep the register v0 object type Lcom / android / internal / widget / LockPatternUtils; in mLockPatternUtils field located (declared) in class (smali) Lcom / fmd / statusbarcolor / color;


Methods
Method - routine or procedure (at the time did not understand the difference between them, because until now, and I can not distinguish one from the other) performing a separate code in accordance with transmitted to him the original data (input variables) and return (or not return, but produces defined action) result.
The method of its announcement begins. For instance,
.method public registerReceiver (Landroid / content / Context; Landroid / content / BroadcastReceiver;) V
Here, as we see, in fact the word .method, then the access modifier (similar to the fields), after the name of the method with an indication of the type of each input variable in parentheses, and the return type.
Return values ​​can be:
V - does not return anything,
I, F, J, and other characters - value type (float, integer, long, etc.)
Something similar to the path that starts and ends on L; - object (an object reference).

The second line of the method - the announcement number of registers used in this method .locals or .registers (see Registers.).
Further - description parameters (input) .param method or .parameter. Depending on the version of the APK tool'a, these lines may not be.
Next is the method code. About code execution method will be lower.
Ends method smali line .end method
EXAMPLE method of color.smali
.method public registerReceiver (Landroid / content / Context; Landroid / content / BroadcastReceiver;) V ## advertisement method (the method returns nothing)
.locals 2 ## ad the number of registers used in the method (2 regstra using: v0 and v1, except those used three p0, p1 and p2)
.param p1, "context" # Landroid / content / Context; ## describes the parameters (as seen, not all parameters are described)

.prologue ## method code
new-instance v0, Landroid / content / IntentFilter;

invoke-direct {v0}, Landroid / content / IntentFilter; -><init>() V

const-string v1, "FMD.StatusbarExpandedOpened"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v1, "FMD.StatusbarExpandedClosed"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v1, "android.intent.action.SCREEN_OFF"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v1, "android.intent.action.SCREEN_ON"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v1, "FMD.ActivityFlags"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v1, "FMD.Recents"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v1, "FMD.MediaPlayer"

invoke-virtual {v0, v1}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

invoke-virtual {p1, p2, v0}, Landroid / content / Context; ->registerReceiver (Landroid / content / BroadcastReceiver; Landroid / content / IntentFilter;) Landroid / content / Intent;

return-void
.end method ## the end of the method


Methods are direct, static, virtual, interface, abstract, native (about the last three species almost do not know yet). In smali met field (category) with the comments: # direct methods, # virtual methods. direct and static methods are placed in the category of # direct methods; all (probably) remaining in the # virtual methods, and perhaps there are other categories that I did not come across.
The difference between the static and virtual methods that I noticed:
The virtual methods p0 register contains the current class that is specified in the very first row Smal. That allows the method to work in the fields with this class, namely, to keep them and read data from them using iput operators, iget; virtual call other methods of the class.
The values ​​passed to the method as input variables (call them so), if they are, fall into the registers p1, p2, etc.
Static methods of the current class does not contain, so they if not impossible, is more problematic to work with fields and virtual methods. The values ​​passed to the method as input variables (call them so), if they are, fall into the registers p0, p1, etc.
About other differences until no idea.

Now, about the execution of code in the method.
Code is executed sequentially in the method. The first line, then the second and so on with all the conditional and unconditional jumps.
If within a method called another method, after the last executed line following the call to this method. For the method returns a result - this line move-result vX or move-result-object vX, depending on what the method returns.
When unconditional jumps (goto: goto_XX) code is executed after the label: goto_XX.
When a conditional jump (if take it to them packed-switch and sparse-switch), if the condition is satisfied, the code is executed after the corresponding label (: cond_XX,: sswitch_XX and: pswitch_XX), if not satisfied then the following after line conditions.
Ends execution of the method return-void command (if the method does not return) or return vX or return-object vX (if returns a numerical value or object).
When branching algorithm running program is sometimes very difficult to understand it. Therefore, if you can not keep in mind all the conditional and unconditional jumps, do not hesitate to take a pencil and paper and draw rectangles, diamonds, arrows :)
EXAMPLE block diagram of one of the intermediate versions SetColor method of DRC :)
Attached Image

The list of operations used in methods in smali, cm. Below under spoiler codes Dalvik operations.


Codes Dalvik operations
I do not know how to make a table directly in the message, so I spread as a separate file.
Attached fileCodes Dalvik.pdf operations(125.48 KB)

If this initiative (continued) is for someone interesting and useful, it would be more productive and easier for me to write about a particular issue, than to invent what to write more.

Supplements (series "Notes on smali")


Post has been editedAlex & rK - 30.06.18, 12:48
Reason for editing: Added a link to the Add-ons


Full version    

Help     rules

Time is now: 17/06/20, 18:11