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: (4571)
Catalog instructions, the first part


General information about applications and work with them
Framework
Multimedia

Post has been editedWasherron в„ў - 08.07.20, 22:38
Reason for edit: Removed Zipalign on Android 8+



Rep: (621)
Catalog instructions, the second part


SystemUI
Connection
Other




Post has been editedArt2000 - 05.04.20, 14:31
Reason for editing: Updating the catalog



Rep: (232)
Directory instruction, the third part


Settings

Post has been editedArt2000 - 26.01.20, 10:39
Reason for editing: Updating the catalog



Rep: (4404)
How I edit the system apk for example framework-res.apk


miniFAQ
Instruction
I use my own tools to work with apktool.jar.
A ready-made kit that includes everything you need to disassemble apk files
(except files from your firmware) you can take it in my signature
or at the end of this message


If not already installedJdk download and install
Unpack the archiveApkTools.rar to the root of the disk C: \ and open the folder ApkTools
Copy the file to this folderframework-res.apk from its firmware
Now you need to install the framework for your firmware so that you can disassemble all the system apk
(This operation must be done once for each firmware)
Drag the fileframework-res.apk on file apktool-if.cmd
Screen
Attached Image
we get such a window
Screen
Attached Image
for HTC owners and firmware with SENSE, the same should be done with the file com.htc.resources.apk, for SAMSUNG - twframework-res.apk, Motorola - blur-res.apk and moto-res.apk, LG - lge- res.apk, Sony Ericsson - SemcGenericUxpRes.apk
Simply put - if in a foldersystem / framework /In addition to framework-res.apk, there are apk files - they also need to be installed.
Now you can disassemble any system apk, which we will do:
Drag the fileframework-res.apk on file apktool-d.cmd
Screen
Attached Image
we get such a window and a folderframework-res
Screen
Attached Image
In this folder, our parsedframework-res.apk
Screen
Attached Image
Change what you need and drag the folderframework-res on file apktool-b.cmd
Screen
Attached Image
we get such a window
Screen
Attached Image
Open withWinrar and the source file framework-res.apk and open the folderframework-res / build / apk
Screen
Attached Image
Moving through folders, transfer the modified files to the windowWinrar a, choose compression ratio in dialog
UsualorWithout compressiondepending on how the file is in the archive
Screen
Attached Image
If editedxml in folders values added or deleted images - resources.arscit is necessary to change
because it contains all the foldersvalues and file public.xml in which all resources are assigned IDs.
In other words, in the collected apk all papaks starting withvalues are in the file resources.arsc and folder smali - in file classes.dex

What to do to see the beginning of the apk build log in case of errors
Attached Image

Attached Image

Frequent errors
Disassembling
W: Cant find 9patch chunk in file: "drawable-mdpi / status_bar_item_app_background_normal.9.png". Renaming it to * .png.
When building a bunch of errors such a plan
C: \ ApkTools \ framework-res \ res \ values ​​\ public.xml: 3390: error: Public symbol drawable / usb_android
It means that someone before you replaced in apk images containing 9patch with ordinary ones
Decision
The most correct way is to disassemble the stock (original), and change the files in your
If for some reason you have no stock - you can take files in android-sdk (C: \ android-sdk-windows \ platforms \ android-10 \ data \ res \ drawable-hdpi)
Copy them into the folder of your parsed application and delete the same files without9 (who created apktool)
You can also check the hidden files.* .bak (create some text editors when editing * .xml files)
I will explain a little how 0 size files are obtained:
apktool finds an image in the apk file status_bar_item_app_background_normal.9.png and
creates a file in the destination folderstatus_bar_item_app_background_normal.9.png by size 0 bytes so that
then fill it with a decoded image with9patch .
Then it turns out that the image does not contain9patch and writes
W: Cant find 9patch chunk in file: "drawable-mdpi / status_bar_item_app_background_normal.9.png". Renaming it to * .png.
renames it tostatus_bar_item_app_background_normal.png and copies to the destination folder
As a result, in the final folder two images
status_bar_item_app_background_normal.9.png - the size 0 bytes and status_bar_item_app_background_normal.png - the size of the hopping something bytes


Problems when building framework-res.apk
When building framework-res.apk from ICS, there are problems with such a plan
D: \ system \ framework \ framework-res \ res \ values ​​\ plurals.xml: 79: error: Multiple substitutions specified in non-positional format; Did you mean to add the formatted = "false" attribute?
D: \ system \ framework \ framework-res \ res \ values ​​\ plurals.xml: 79: error: Found tag</ item>where</ plurals>is expected

Decision:
79 line this<item quantity = "other">% d of% d</ item>
change to<item quantity = "other">%1$d of%2$d</ item>
in all folders
After that, everything is going to
Script for automatic replacement% d of% d on % 1 $ d of% 2 $ d in all plurals.xml Attached fileplurals_repl.rar (1.25 KB)
Move folderframework-res on the script, wait for the confirmation label)

Problems when building Phone.apk
MistakeMultiple substitutions specified in non-positional format; Did you mean to add the formatted = "false" attribute?
at assemblyPhone.apk usually means that there is a non-escaped percent symbol in the specified files / lines "%"
To fix it, you need to shield the icon in the specified file / line% (%%) but only if there are no characters after it d, s, or numbers
that is, if there is in this line% 1 $ d - there is no need to screen
(% 2 $ d%) and here you need (% 2 $ d%%)

Example
<string name = "throttle_time_frame_subtext">"% 1 $ d%del ciclo transcurrido.
PrСѓ pernodo en% 2 $ d dРЅas (% 3 $ s) "</ string>

after% there is a space to fix
<string name = "throttle_time_frame_subtext">"% 1 $ d%%del ciclo transcurrido.
PrСѓ pernodo en% 2 $ d dРЅas (% 3 $ s) "</ string>

Script for automatic replacementAttached filepercent_repl.rar(1.27 KB)
Move folderPhone on the script wait for confirmation signs

How to replace the system apk on the phone
For this you need a file manager with supportroot and the ability to assign rights, for example ES File Explorer
  • We copy apk in phone to SD card
  • We copyapk from SD card to folder/ system
  • Expose forapk rights 644 (see fig.)
  • Moving apk to folder/ system / appor/ system / framework
Move from/ systemnecessary because apk can be used at the moment and the system will not allow to replace it when copying
Attached Image
Attached Image

Pro 9-patch
9-patch - this is an image with built-in markers that make the system
understands which part of the image to stretch and in which part of the image to place the content
To create a 9-patch for the image, a transparent frame of 1 pixel is drawn around it, in which the markers are put in black
(In the Android SDK, in the tools folder, there is a filedraw9patch.bat (see fig.), which performs this operation and gives a preview of the stretching)
Next to embed a 9-patch into an image, it should be assembled as part of the project inapktool or eclipse
Attached Image

How to properly edit images containing 9-patch
The best way to edit these images is to use the icon editor.
To begin, parse apk as described above.
open the image of interest in the icon editor and select the part that does not contain markers (frame, 1 pixel thick with black dots / stripes)
Attached Image

Apply the effect, in this case "Coloring"
Attached Image

We save, not forgetting to check availability.9 before png

Pro odex files
Apk consists of two parts:Interface (pictures and xml) and executable code (classes.dex)
When you first start the application, the system reads the file.classes.dex , optimizes it for this device,
and puts indalvik-cache and on subsequent launches uses the file from dalvik-cache (if a classes.dex did not change).
Ifclasses.dex changed - optimizes and overwrites again.
In odexed firmware fileclasses.dex already optimized and moved from apk to file [apk name] .odex ,
What allow:
1. Save a place in the section/ data ( dalvik-cache usually located there)
2. Accelerate the first launch of the phone (as there is no need to optimize the system files)
3. Restrict the ability to change the interface to any diggers, since
When optimizing filesodex get dependencies on other files odex
The chain of dependencies looks like this:
core.odex ->bouncycastle.odex ->ext.odex ->framework.odex ->android.policy.odex ->services.odex ->core-junit.odex ->other odex files in the app and framework folders
When changing one of these odex files, all files to the right of it should be re-optimized.
However, there is a solution: if you enter a checksum from the old odex file, the system eats it and will not choke
Below is the archive forClockWorkMod Recovery which of your jar or apk will create the correct odex file
All you need to do is open the archive in WinRAR, go to the tmp / MOD / folder and put your jar or apk (you can do several things)
in the appropriate folder app or framework and sign the archive
After applying the archive inCWM Recovery , a folder will appear on the memory card (/ sdcard) odexer in which there will be ready-to-use files and
archives for CWM Recovery with modified files and rollback files
Attached fileodexer4_update.zip(1.69 MB)

For the idea and the initial implementation, you can say thanks to me,
For completion and adaptation for most devicesthankspeakfinist1

What did you change in my apk, or how to compare folders and files.
To compare folders and files, it’s best to useTotal commander
Screen
Attached Image
The algorithm is simple:
- We disassemble the original and modified apk
- Open the folder with the source in one pane, the other with the modified apk
- Click on the menuInstruments -> Sync directories
- Check that the settings were as in the screenshot above.
- We press the buttonCompare top left
- Right-click on a pair of different files and in the opened menu select the itemCompare left and right files or keys Ctrl + F3
Screen
Attached Image
The differences stand out red by color

Apktool Versions
.: ApkTools1.3.2 :. Attached fileApkTools.zip (5.2 MB)
(To change filesAndroid 1.6 - 2.3.7 )
.: ApkTools1.4.3 :. Attached fileApkTools143.rar (3.55 MB)
(To change filesAndroid 4 ICS )08/15/2012 - fixed the error "bad magic value"
.: ApkTools1.5.2 :. Attached fileApkTools152.rar (3.27 MB)
(SupportAndroid 4.2 JellyBean ) experimental version
Since dearBrut.all for a long time did not update their wondrous creation - apktool.jar
comrade withXDA under the name iBotPeaches continued development.
You can view the list of changes and download the latest version fromXDA
Seventh beta.: ApkTools2.0.0b7 :. Attached fileApkTools200b7.rar (7.14 MB)

Attached fileapktool_lolly.zip(11.34 MB)

Seventh beta with a modified build script.: ApkTools2.0.0b7m2 :. Attached fileApkTools200b7m2.rar (7.36 MB)
!!! For apk from firmware !!!After assembly, a folder appearssys with a system apk or jar ready to be loaded into the phone
(the contents of the original folder are copied to the apk folder of the dist folder, namely, the manifest and signature)Not recommended for use when disassembling
Ninth beta.: ApkTools2.0.0b9 :. Attached fileApkTools200b9.rar (8.13 MB)

Ninth beta with a modified build script (description above).: ApkTools2.0.0b9m :. Attached fileApkTools200b9m.rar (8.35 MB)

Problems when working with Android 5.0 Lollipop
DeodexForART (Lollipop) _v2.2.2Old link deleted - irrelevant!


Post has been editedArtyom - 28.05.16, 11:03



Rep: (4404)
Change the font color of notifications, hours, dates, etc. - on white


Description, instruction
framework-res.apk / res / layout /status_bar.xml
Code
<? xml version = "1.0" encoding = "UTF-8"?>
<com.android.server.status.StatusBarView android: orientation = "vertical" android: background = "@ drawable / statusbar_background" android: focusable = "true" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android ">
<LinearLayout android: orientation = "horizontal" android: id = "@ id / icons" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.server.status.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: paddingLeft = "6.0dip" android: layout_width = "0.0dip" android : layout_height = "fill_parent" android: layout_weight = "1.0" android: layout_alignParentLeft = "true" />
<LinearLayout android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / statusIcons" android: paddingRight = "6.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_alignParentRight = "true" />
</ LinearLayout>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / ticker" android: paddingLeft = "6.0dip" android: animationCache = "false" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<ImageSwitcher android: id = "@ id / tickerIcon" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_marginRight = "8.0dip">
<com.android.server.status.AnimatedImageView android: layout_width = "25.0dip" android: layout_height = "25.0dip" />
<com.android.server.status.AnimatedImageView android: layout_width = "25.0dip" android: layout_height = "25.0dip" />
</ ImageSwitcher>
<com.android.server.status.TickerView android: id = "@ id / tickerText" android: paddingTop = "2.0dip" android: paddingRight = "10.0dip" android: layout_width = "0.0dip" android: layout_height = "wrap_content" android: layout_weight = "1.0">
<! - The next 2 lines are the color of messages with the status bar closed ->
<Textviewandroid: textColor = "# ff5babe8" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: singleLine = "true" />
<Textviewandroid: textColor = "# ff5babe8" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: singleLine = "true" />
</com.android.server.status.TickerView>
</ LinearLayout>
<! - Next line color of date ->
<com.android.server.status.DateView android: textSize = "16.0sp" android: textstyle = "bold"android: textColor = "# ff5babe8" android: gravity = "left | center" android: id = "@ id / date" android: background = "@ drawable / statusbar_background" android: paddingLeft = "6.0px" android: paddingRight = "6.0px" android: layout_width = " wrap_content "android: layout_height =" fill_parent "android: singleLine =" true "/>
</com.android.server.status.StatusBarView>

framework-res.apk / res / layout /status_bar_expanded.xml
Code
<? xml version = "1.0" encoding = "UTF-8"?>
<com.android.server.status.ExpandedView android: orientation = "vertical" android: background = "@ drawable / status_bar_background" android: focusable = "true" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android ">
<LinearLayout android: orientation = "horizontal" android: background = "@ drawable / status_bar_header_background" android: paddingTop = "3.0dip" android: paddingRight = "3.0dip" android: paddingBottom = "5.0dip" android: layout_width = "fill_parent" android : layout_height = "wrap_content">
<LinearLayout android: layout_gravity = "center_vertical" android: orientation = "vertical" android: paddingBottom = "1.0dip" android: layout_width = "0.0dip" android: layout_height = "wrap_content" android: layout_marginLeft = "5.0dip" android: layout_marginTop = "1.0dip" android: layout_weight = "1.0">
<! - Next 2 lines operator color ->
<TextView android: textAppearance = "? TextAppearanceLarge"android: textColor = "# ff092e4b" android: shadowColor = "# ff5babe8" android: shadowRadius = "1.5" android: layout_gravity = "center_vertical" android: id = "@ id / plmnLabel" android: paddingLeft = "4.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<TextView android: textAppearance = "? TextAppearanceLarge"android: textColor = "# ff092e4b" android: shadowColor = "# ff5babe8" android: shadowRadius = "1.5" android: layout_gravity = "center_vertical" android: id = "@ id / spnLabel" android: paddingLeft = "4.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ LinearLayout>
<! - The next line is the text color on the "Clear" button ->
<TextView android: textSize = "14.0sp"android: textColor = "# ff000000" android: layout_gravity = "center_vertical" android: id = "@ id / clear_all_button" android: background = "@ drawable / btn_default_small" android: paddingLeft = "15.0dip" android: paddingRight = "15.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginTop = "4.0dip" android: layout_marginBottom = "1.0dip" android: text = "@ string / status_bar_clear_all_button" style = "? buttonStyle" />
</ LinearLayout>
<FrameLayout android: layout_width = "fill_parent" android: layout_height = "wrap_content">
<ScrollView android: id = "@ id / scroll" android: fadingEdge = "none" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_weight = "1.0">
<com.android.server.status.NotificationLinearLayout android: orientation = "vertical" android: id = "@ id / notificationLinearLayout" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_weight = "1.0">
<! - The next line is the color of the header "No notification" ->
<TextView android: textAppearance = "@ style / TextAppearance.StatusBarTitle"android: textColor = "# ff5babe8" android: id = "@ id / noNotificationsTitle" android: background = "@ drawable / title_bar_portrait" android: paddingLeft = "5.0dip" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: text = "@ string / status_bar_no_notifications_title "/>
<! - The next line is the color of the title "Current" ->
<TextView android: textAppearance = "@ style / TextAppearance.StatusBarTitle"android: textColor = "# ff5babe8" android: id = "@ id / ongoingTitle" android: background = "@ drawable / title_bar_portrait" android: paddingLeft = "5.0dip" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: text = "@ string / status_bar_ongoing_events_title "/>
<LinearLayout android: orientation = "vertical" android: id = "@ id / ongoingItems" android: layout_width = "fill_parent" android: layout_height = "wrap_content" />
<! - The next line the color of the title "Recent" ->
<TextView android: textAppearance = "@ style / TextAppearance.StatusBarTitle"android: textColor = "# ff5babe8" android: id = "@ id / latestTitle" android: background = "@ drawable / title_bar_portrait" android: paddingLeft = "5.0dip" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: text = "@ string / status_bar_latest_events_title "/>
<LinearLayout android: orientation = "vertical" android: id = "@ id / latestItems" android: layout_width = "fill_parent" android: layout_height = "wrap_content" />
</com.android.server.status.NotificationLinearLayout>
</ ScrollView>
<ImageView android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: src = "@ drawable / title_bar_shadow" android: scaleType = "fitXY" />
</ Framelifeout>
</com.android.server.status.ExpandedView>

The color of the clock is services.jar or services.odex watchhere


Post has been editedDimar - 16.01.16, 10:59



Rep: (103)
Table of color in HEX.

Screenshot
Attached Image


Post has been editedDimar - 23.01.16, 16:24



Rep: (574)
Instructions for changing the color of the inscriptions in the Settings menu (small font)


Description, instructions
Instruction
Go along the path framework-res \ res \ layout and make changes in the following files:
1)preference.xml
<TextView android: textAppearance = "? TextAppearanceSmall"android: textColor = "# ff4a9e00" android: id = "@ id / summary" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: maxLines = "4" android: layout_below = "@ id / title" android: layout_alignLeft = "@ id / title "/>
This line will not be there, so we add
2)preference_child.xml
<TextView android: textAppearance = "? TextAppearanceSmall"android: textColor = "# ff4a9e00" android: id = "@ id / summary" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: maxLines = "2" android: layout_below = "@ id / title" android: layout_alignLeft = "@ id / title "/>
3)preference_information.xml
<TextView android: textAppearance = "? TextAppearanceSmall"android: textColor = "# ff4a9e00" android: id = "@ id / summary" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: maxLines = "2" android: layout_below = "@ id / title" android: layout_alignLeft = "@ id / title "/>

Instructions for Samsung phones
The instruction is a little easier.
Follow the path:\ ApkTools \ framework-res \ res \ color
Open the file:zzz_tw_secondary_text_sub.xml
<? xml version = "1.0" encoding = "UTF-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android ">
<item android: state_window_focused = "false" android: state_enabled = "false" android: color = "# ffb4b4b4" />
<item android: state_window_focused = "false" android: color = "# ff46aeff " />
<item android: state_enabled = "false" android: state_selected = "true" android: color = "# ffb4b4b4" />
<item android: state_enabled = "false" android: state_pressed = "true" android: color = "# ffb4b4b4" />
<item android: state_enabled = "false" android: color = "# ffb4b4b4" />
<item android: state_pressed = "true" android: color = "# ffffffff" />
<item android: state_selected = "true" android: color = "# ffffffff" />
<item android: color = "# ff46aeff " />
</ selector>

And we change the highlighted one to its color, where the first 2 characters of ff are transparency, the rest is color
#ff 46aeff

Screenshot
Attached Image


Post has been editedDimar - 23.01.16, 16:18
Reason for editing: Template



Rep: (574)
How to make an index from an ordinary picture


Instruction
One day, each of you will ask this question: "Why when opening some pictures fromframework_res.apk we see some kind of stain remotely similar to what is needed "
The fact is that some pictures -indexed.
Take for example this oneAttached Image(index) and if you open it through Photoshop CS we will see this -Attached Imageand if the open image opens as it should, then you cannot change it.

To make the picture not lose its primary shape and be editable, let's do the following:

1) Take the desired icon and open it throughMicrosoft Office Pictures Manager ;
2) NextPicture --> Colour and change for example intensity on 1 and then on 0; (i.e. we do nothing);
3) PushFile --> Save ;
4) Done;

PS. My instruction, I myself was looking for a solution to this problem and did not expect it to work out. I searched using a spear method))


Post has been editedDimar - 12.11.15, 20:32



Rep: (351)
Old TV animation (on and off)

Actual for Android 2.3, and for sure for CyanogenMod.
Description
Let me explain why on and off.
Climbed the Internet, everywhere mentions only about this line and video with animation when you turn it off and on. But I’m only when you turn it off and not quite as it is on video. The connection happens as usual. Maybe I’m in the firmware, I don’t know. Try it.

Instruction
In the settings of CyanogenMod \ the screen should be ticked opposite the animation on and off
To enable this effect, you need to change the res \ values ​​\ bools.xml file in the framework-res.apk file
the string
<bool name = "config_animateScreenLights">true</ bool>
on
<bool name = "config_animateScreenLights">false</ bool>

Addition


Post has been editedDimar - 03.11.15, 21:44
Reason for editing: *



Rep: (1321)
Curtain transparency on android 2.2-4.0


Instruction
In most cases, it is enough to make a transparent image of status_bar_background.png, lies in framework-res.apk.
But, sometimes, in particular, I had a problem with Tab, I had to edit status_bar_tracking.xml (in 2.3 it is in SystemUI.apk; in 2.2. In framework-res.apk)
Added parameterandroid: background = "# 00000000"
<? xml version = "1.0" encoding = "UTF-8"?>
<com.android.systemui.statusbar.TrackingView android: orientation = "vertical"android: background = "# 00000000"android: paddingLeft = "0.0px" android: paddingRight = "0.0px" android: paddingBottom = "0.0px" android: focusable = "true" android: visibility = "gone" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android ">
<Viewandroid: background = "# 00000000"android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_weight = "1.0" />
<com.android.systemui.statusbar.CloseDragHandle android: orientation = "vertical" android: id = "@ id / close" android: layout_width = "fill_parent" android: layout_height = "wrap_content">
<ImageView android: layout_gravity = "bottom" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: src = "@ drawable / status_bar_close_on" android: scaleType = "fitXY" />
</com.android.systemui.statusbar.CloseDragHandle>
</com.android.systemui.statusbar.TrackingView>

Supplement from sk0t
If methodden339, does not roll (it happens),
Open the file:
for 2.3SystemUI.apk / smali / com / android / systemui / statusbar /StatusBarService.smali
We are looking for a methodaddStatusBarView () and there is a line in it
invoke-direct / range {v0 .. v5}, Landroid / view / WindowManager $ LayoutParams; -><init>(IiIII) v

there must be a line before this lineconst / 4 v5, 0x2 change to const / 4 v5, -0x3

for 2.2services.jar / smali / com / android / server / status /StatusBarService.smali
Are looking foriputv7, p0, Lcom / android / server / status / StatusBarService; ->mPixelFormat: I
there must be a line before this lineconst / 4v7, 0x2 change to const / 4v7, -0x3
red digit can be any other

Color in the curtain,in 4 android specified in SystemUI.apk \ res \ values ​​\ drawables.xml<item type = "drawable" name = "notification_tracking_bg"> #00000000 </ item>


Post has been editedDimar - 12.04.16, 19:49
Reason for editing: *



Rep: (4404)
How to determine the percentage of transparency.

Example,<color name = "menu_background">#b2000000 </ color> ?
b2 = ?%
b2 (hex) = 178 (dec)
178/(255/100) = 69.8
about 70%
DEC - HEX Compliance Table
Attached Image


Post has been editedDimar - 17.02.16, 18:04



Rep: (4404)
Correct display of the clock in the center

Instruction
The initial layout is as follows:
Attached Image
<? xml version = "1.0" encoding = "UTF-8"?>
<com.android.systemui.statusbar.StatusBarView android: orientation = "vertical" android: background = "# ff000000" android: focusable = "true" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android">
<LinearLayout android: orientation = "horizontal" android: id = "@ id / icons" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: paddingLeft = "6.0dip" android: layout_width = "0.0dip" android : layout_height = "fill_parent" android: layout_weight = "1.0" android: layout_alignParentLeft = "true" />
<LinearLayout android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / statusIcons" android: paddingRight = "6.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_alignParentRight = "true" />
<com.android.systemui.statusbar.Clock android: textAppearance = "@ android: style / TextAppearance.StatusBar.Icon" android: gravity = "left | center" android: paddingRight = "6.0dip" android: layout_width = "wrap_content" android : layout_height = "fill_parent" android: singleLine = "true" />
</ LinearLayout>

Layaut of notification icons is stretched to all available space, Layauts of status icons and hours are stretched by content

The method describedheremakes the layout like this:
Attached Image
<? xml version = "1.0" encoding = "UTF-8"?>
<com.android.systemui.statusbar.StatusBarView android: orientation = "vertical" android: background = "# ff000000" android: focusable = "true" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android">
<LinearLayout android: gravity = "center" android: orientation = "horizontal" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.Clock android: textAppearance = "@ android: style / TextAppearance. = "fill_parent" android: singleLine = "true" />
</ LinearLayout>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / icons" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: paddingLeft = "6.0dip" android: layout_width = "0.0dip" android : layout_height = "fill_parent" android: layout_weight = "1.0" android: layout_alignParentLeft = "true" />
<LinearLayout android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / statusIcons" android: paddingRight = "6.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: layout_alignParentRight = "true" />
</ LinearLayout>

then, there is a lajaut added, which is stretched to the full width, to which the clock is evened, centered
status and notification icons are displayed on top of this lyaut
If there are many icons, they close the clock.

So that they do not close the clock, you need to make a layout such
Attached Image
You can do it this way.
<? xml version = "1.0" encoding = "UTF-8"?>
<com.android.systemui.statusbar.StatusBarView android: orientation = "vertical" android: background = "# ff000000" android: focusable = "true" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android">
<LinearLayout android: orientation = "horizontal" android: id = "@ id / icons" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: paddingLeft = "6.0dip" android: layout_width = "0.0dip" android : layout_height = "fill_parent" android: layout_weight = "1.0" android: layout_alignParentLeft = "true" />
<com.android.systemui.statusbar.Clock android: textAppearance = "@ android: style / TextAppearance.StatusBar.Icon" android: gravity = "left | center" android: paddingRight = "6.0dip" android: layout_width = "wrap_content" android : layout_height = "fill_parent" android: singleLine = "true" />
<LinearLayout android: gravity = "right | center" android: orientation = "horizontal" android: id = "@ id / statusIcons" android: paddingRight = "6.0dip" android: layout_width = "0.0dip" android: layout_height = "fill_parent" android: layout_weight = "1.0" android: layout_alignParentRight = "true" />
</ LinearLayout>

Move row<com.android.systemui.statusbar.Clock line up so it is between the lines @ id / notificationIcons and @ id / statusIcons
In line@ id / statusIcons change:
android: gravity = "center_vertical" -> android: gravity = "right | center"
android: layout_width = "wrap_content" -> android: layout_width = "0.0dip"
and addandroid: layout_weight = "1.0"


Post has been editedDimar - 05.11.15, 20:12
Reason for editing: *



Rep: (4404)
Quicksettings panel in the status bar


Option 1
Archive with the necessary filesAttached fileqs.rar(67.48 KB)
Instruction
1. DisassembleSystemUI.apk
2. Folder contentsmali , drawable-hdpi and layout from the archive add to the appropriate folder
3. Add to filestatus_bar_expanded.xml the string
<include layout = "@ layout / quickpanel_quick_settings" />
before strings
<LinearLayout android: orientation = "horizontal" android: background = "@ drawable / status_bar_header_background" android: paddingTop = "3.0dip" android: paddingRight = "@ dimen / clear_button_padding_right" android: paddingBottom = "5.0dip" android: layout_width = "fill_parent "android: layout_height =" wrap_content ">
<com.android.systemui.statusbar.CarrierLabel android: layout_gravity = "center_vertical" android: orientation = "vertical" android: id = "@ id / carrierLabel" android: paddingBottom = "1.0dip" android: layout_width = "0.0dip" android : layout_height = "wrap_content" android: layout_marginLeft = "5.0dip" android: layout_marginTop = "1.0dip" android: layout_weight = "1.0">
4. Addlinesofstrings.xml , ids.xml and colors.xml to corresponding files in folders values
5. Collect
6. Disassemble the resulting folderdist
7. Copy the replacement filedist / SystemUI / res / values ​​/public.xml to folderres / values ​​/
8. Delete foldersbuild and dist
9. Open foldersmali / com / android / systemui / statusbar / quickpanel /and in files:
- AutoRotationSettingButton.smali
- BluetoothSettingButton.smali
- FlightSettingButton.smali
- GpsSettingButton.smali
- MobileDataSettingButton.smali
- SoundSettingButton.smali
- SyncSettingButton.smali
- VibrateSettingButton.smali
- WifiSettingButton.smali
Change in methodsupdateIconsAndTextColor and updateResources all meanings " 0x7f0 ..... "on your ownres / values ​​/ public.xml
For convenience, they are all labeled "#quickpanel _... "
10. Assemble
11. In the original, replace with files from the folder.build / apk /
- resources.arsc (without compression)
- classes.dex (normal compression)
- res / layout /status_bar_expanded.xml (normal compression)
Add files from folderbuild / apk /
- res / drawable-hdpi /quickpanel _ *. png (without compression)
- res / layout /quickpanel_quick_settings.xml (normal compression)
Result
Attached Image
Attached Image


Option 2 with auto brightness button and brightness slider
Required filesAttached fileqp.rar(81.2 KB)
Instruction
1. DisassembleSystemUI.apk
2. Folder contentsmali , drawable-hdpi and layout from the archive add to the appropriate folder
3. Add to filestatus_bar_expanded.xml lines
<include layout = "@ layout / qp_quick_settings" />
<include layout = "@ layout / qp_brightness" />
after the lines
<LinearLayout android: orientation = "vertical"
4. Addlinesofstrings.xml and colors.xml to corresponding files in folders values
5. Collect
6. Disassemble the resulting folderdist
7. Copy the replacement filedist / SystemUI / res / values ​​/public.xml to folderres / values ​​/
8. Delete foldersbuild and dist
9. Open foldersmali / com / android / systemui / statusbar / quickpanel /and in the fileQPids.smali
Change all values ​​"0x7f0 ..... "on your ownres / values ​​/ public.xml
Example
String in public.xml
<public type = "drawable" name = "qp_icon_wifi_on "id =" 0x7f020139 " />
Code in smali
const-string v0, "qp_icon_wifi_on"

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

move-result v0

if-eqz v0,: cond_17

const v0, 0x7f020139
10. Assemble
11. In the original, replace with files from the folder.build / apk /
- resources.arsc (without compression)
- classes.dex (normal compression)
- res / layout /status_bar_expanded.xml (normal compression)
Add files from folderbuild / apk /
- res / drawable-hdpi /qp _ *. png (without compression)
- res / layout /qp _ *. xml (normal compression)
Result
Attached Image
Attached Image
Attached Image


Post has been editedDimar - 05.11.15, 20:17



Rep: (524)
How to make a transparent background settings and not only in Anroid 4.0+


Instruction
1) Disassemble framework-res.apk
2) Moving along the pathres / valuesand openstyles.xml

Looking for a sectorTheme.Holo
<style name = "Theme.Holo" parent = "@ style / Theme">


In this sector we need to find the lines:
<item name = "colorBackground">@ color / background_holo_dark</ item>

we change it to
<item name = "colorBackground">@ color / transparent</ item>

and
<item name = "windowShowWallpaper">false</ item>

This line is changed to
<item name = "windowShowWallpaper">true</ item>


All finished with xml. Now you need the background picture itself. It will be a substrate that is already in ICS and does not need to be created, you just need to edit it. Actually it can be repainted to anything just like that, but in order to achieve transparency you need to pick styles.xml.
So this substrate is always inres / drawable-nodpiand she is calledbackground_holo_dark.png.We edit it as we like, making it at least barely transparent, at least transparent at all.

Done! You can collect framework-res.apk and upload it to your phone if it were not for oneBUT

3) Having collected the framework-res and installing it on the phone, it will be possible to find that when you open a pop-up window, it does not open over the existing one, but goes to a new page, i.e. it will not float on top of the main, but on top of the empty wallpaper. It looks, in my opinion, it is not very beautiful and very very unusual. Exactly the same situation is observed with the keyboard.
It is solved simply, we are looking for everything in the same styles.xml blockTheme.Holo.DialogandTheme.Holo.InputMethod
<style name = "Theme.Holo.Dialog" parent = "@ style / Theme.Holo">

<style name = "Theme.Holo.InputMethod" parent = "@ style / Theme.Holo.Light.Panel">


In both blocks you need to add only one line:
<item name = "android: windowShowWallpaper">false</ item>

Everything. Now the windows will normally open on top of each other :)
4) We assemble framework-res, flash and rejoice.

If during the assembly process .apk crawl errors -read it firstandthisjust ask a question
Thanks for some info.ZduneX25

Screenshots of what happened
Attached Image
Attached Image
Attached Image
Attached Image

Addition


Post has been editedDimar - 03.11.15, 18:39
Reason for editing: ****



Rep: (4404)
Panellidroid in the status bar



14 customizable buttons
Here You can download the package to perform the following actions automatically (Recommended)

Archive with the necessary files
Attached fileqp.rar(153.7 KB)

For Android 4Attached fileqp4.rar(155.76 KB)

Option without flashlightAttached filenoflash.rar(177.46 KB)

Instruction
1. DisassembleSystemUI.apk
2. Folder contentdrawable-hdpi (mdpi) and layout from the archive add to the appropriate folder
3. Add to fileres / layout / status_bar_expanded.xml the string
<include layout = "@ layout / qp_layout" />
after the lines
<com.android.systemui.statusbar.ExpandedView android: orientation = "vertical" android: focusable = "true" android: descendantFocusability = "afterDescendants"
xmlns: android = "http://schemas.android.com/apk/res/android">
4. Addlinesofstrings.xml and arrays.xml to corresponding files in folders values
5. Collect
6. Disassemble the resulting folderdist
7. Copy the replacement filedist / SystemUI / res / values ​​/public.xml to folderres / values ​​/
8. Delete foldersbuild and dist
9. Folder Contentssmali from archive add to folderSystemUI / smali
10. Scriptqp_repl.js from the archive put next to the folder SystemUI and run double click (as an application)
Wait for the script to finish ("Done" sign)
11. Assemble
12. In the original, replace with files from the folder.build / apk /
- resources.arsc (without compression)
- classes.dex (normal compression)
- res / layout /status_bar_expanded.xml (normal compression)
Add files from folderbuild / apk /
- res / drawable-hdpi /qp _ *. png (without compression)
- res / layout /qp _ *. xml (normal compression)
Result
Attached Image
Attached Image

Attached ImageAttached Image
Setup programAttached fileQuickPanelSettings.apk(54.36 KB)
Russian version setup programs here

Screen brightness slider
(When auto brightness is hidden)
Required filesAttached fileslider.rar(6.55 KB)
Instruction
1. DisassembleSystemUI.apk
2. Folder contentsmali , drawable-hdpi and layout from the archive add to the appropriate folder
3. Add to filestatus_bar_expanded.xml the string
<include layout = "@ layout / qp_brightness" />
after line
<include layout = "@ layout / qp_layout" />
4. Assemble
5. In the original, replace the files from the folderbuild / apk /
- resources.arsc (without compression)
- classes.dex (normal compression)
- res / layout /status_bar_expanded.xml (normal compression)
Add files from folderbuild / apk /
- res / drawable-hdpi /qp_brightness _ *. png (without compression)
- res / layout /qp_brightness.xml (normal compression)
Result
Attached Image
Attached Image
Attached Image

Slider for phones without a light sensor (not hidden) can be takenhere
Nastor @ 06/08/2012, 09:39*
Sk0t, Is it possible to modify the brightness slider so that when you click on the icons on the left and right of the slider, the brightness immediately switches to min. and max.?
here is a modifiedAttached fileslider_btn.rar(7.78 KB)

Added another buttonSettings (Pressing - launching the QuickPanelSettings.apk setup program if it is installed otherwise - launching the system settings, long pressing - launching the system settings)
Screen
Attached Image
Required files Attached fileqp415.rar (158.5 KB)

Setup programAttached fileQuickPanelSettings15.apk(55.16 KB)
Russian version setup programs here

additionally


Post has been editedArt2000 - 04.06.18, 10:56
Reason for editing: *



Rep: (4404)
We remove the error log through the terminal


su
logcat>/sdcard/1.txt
wait for 5 seconds, close the terminal, unload it from memory (Settings ->applications ->application management ->terminal ->stop)

Post has been editedDimar - 14.02.16, 19:19



Rep: (129)
Automation package for the implementation of the Lidroid panel in the statusbar ("curtain").

SCRIPT PACKAGE FOR AUTOMATION OF SYSTEMUI CHANGE UNDER LIDROID В© SpellCaster

Automatesinstruction from sk0t

Description
Supports launch not from the current directory, as well as from directories with spaces and non-Latin characters
Pictures available on HDPI screens only.

Requirements for work:
* Installed Java (JDK)http://www.oracle.com/technetwork/java/jav...oads/index.html
Requirements for installing a modified apk:
* On the target device - the rights of the root and write access to the / system / app

COMPOSITION PACKAGE:

Initial data
\ qp_flash \ - * modified * package of file replacements from sk0t for the panel with a flashlight (* 1)
\ qp_noflash \ - * modified * file replacement package from sk0t for a panel without a flashlight (* 1)
\ framework \ - empty folder for framework files

Instruments
Tools are downloaded separately from here:https://github.com/spellcaster/Android_APKT...hive/master.zip. Extract the FILES to the package directory.

\ SysUI_worker.bat - main script
\ qpid_repl.js - script to replace the id in qpids.smali (run from SysUI_worker)
\ xml_add.js - script for xml manipulations (started from SysUI_worker)

Miscellanea:
\ README - this file
\ QuickPanelSettings.apk is an application for customizing the displayed indicators (you can also download fromsavagemessiahzine.com: see the link above)

(* 1) Source versions are here:Editing framework-res.apk (Post # 12602328). The modification is to make qp_ * flash \ res \ values-ru \ strings.xml real XML (add root XML node). The sets of files laid out by sk0t without this modification WILL NOT BE WORKED HERE.

APPLICATION
  1. Place package files in a separate directory.
  2. Download the archive with the tools (utilities) from here:https://github.com/spellcaster/Android_APKT...hive/master.zip, extract the files to the package directory (i.e., the tool files should lie next to the package files).
  3. Download from the target device files /system/framework/*.apk (ALL files with apk! Extension) (place in the \ framework folder) and /system/app/SystemUI.apk, place next to the Package files.
  4. Run SysUI_worker.bat
  5. Specify mode: with or without a flashlight
  6. To begin to try to perform in automatic mode (Step = 0). Step mode - for debugging if errors occur
  7. If all is well, the script finishes without error, and the resulting application will be saved as SystemUI_mod.apk. If things are bad :) - will be given an error. It is advisable to try to understand themselves (for example, if an error in the assembly - check out what it swears, perhaps with modifications, mistakes were made). If you can not - you need to copy a complete log of the launch (right mouse button - Edit - Mark, select all the text from the start of the script, press Enter) and post it in this topic onsavagemessiahzine.com. You can ask me in PM, but that doesn't make much sense, because I have little knowledge of the nature of the process, just automated the sk0t instruction. T.ch. Be prepared to redirect to the same topic :).
  8. Write from the SystemUI_mod.apk recovery to the target device in / system / app (rename it to SystemUI.apk). Overload the device.
  9. Through adb it is done like this:
    • adb reboot recovery
    • mount / system via the recovery interface (should somehow be executed by a command, mount something there, but reluctance to search)
    • adb push SystemUI_mod.apk /system/app/SystemUI.apk
    • adb reboot

    It is possible and "on the hot" - adb push SystemUI_mod.apk /system/app/SystemUI.apk with the device turned on and loaded, but there is a danger of glitches.
  10. If com.android.statusbar launch errors occur, view the log (run in the terminal emulator on the target device or via adb shell)
    • logcat
    • Save log to file:
    • logcat>/sdcard/err.log

  11. Put the application QuickPanelSettings


Note
NOTE

Default for disassembly-assembly apk files (including framework) uses a more recent version of aapt.exe SDK. Version of a set of apktool can not handle non-standard names of resources (such as drawable-sw600dp-mdpi - an error type "invalid resource directory name: ... \ SystemUI \ res / values-sw600dp-port"), so the version of the SDK more omnivorous. However, if this version gives you an error during disassembly or assembly, you can try to use apktool version. To do this, open APK_worker.bat in a text editor and uncomment the line ":: set AAPT = aapt_Custom.exe" (just remove the characters "::").

NOTE 2

used binary files:
apktool.jar, aapt_Custom.exe:http://code.google.com/p/android-apktool/
7za.exe:http://www.7-zip.org/download.html
aapt_SDK.exe:http://developer.android.com/sdk/index.html(taken from Android SDK)
qp_flash, qp_noflash:Editing framework-res.apk (Post # 12602328)(!!! require modification - see above !!!)


Update from 05/28/2012:
  • Support for unlimited number of framework files (now they need to be placed in a separate folder)
  • A more correct method of placing the panel itself
  • Localization support (all \ res \ values ​​* directories are processed - however this required minor changes in the source package, so now they are slightly incompatible). If anyone is interested
    The changes are to make res \ values ​​* \ strings.xml real xml, that is, adding a header and the root element resources.



Update from 08/14/2012:
  • Image support for mdpi, ldpi resolutions (!!! there are NO images in the archive !!!)
  • Minor fixes and improvements


Update from 20/08/2012:
  • Support for modifications without a flashlight, the choice of the presence of a flashlight - through the interface
  • Many improvements


Update from 20/08/2012:
  • Support for modifications without a flashlight, the choice of the presence of a flashlight - through the interface
  • Many improvements


Update from 05/12/2012:
  • Removed dependency on current directory (work with absolute paths)
  • Aapt from SDK is used instead of apktool version (it can handle non-standard resource names). You can use the apktool version back by editing APK_worker.bat. Also, aapt.exe is now copied from the desired file each time it is run.
  • Startup support not from the current directory (... / systemui_panel_pack / APK_worker.bat) and from the directory with spaces and non-Latin characters


Update from 12/19/2012:
  • Before exiting the script, remove the frameworks (cleaning for themselves)
  • A separate repository has been created for this package; for third-party utilities - one more. Now you need to download archives from both repositories and extract the files in one directory.


Update from 10/01/2013:
  • Fixed bug: deleting the SystemUI folder and installing frames before each step


Crawled links


Post has been editedDimar - 05.11.15, 21:21
Reason for editing: *



Rep: (4404)
Power Menu for Android 4 ICS

Everything after “# "- these are my comments, you do not need to add them
Work with framework-res.apk
1. We disassembleframework-res.apk

1.1 Add toframework-res / res / drawable-hdpithree pictures
ic_lock_reboot.png
ic_lock_recovery.png
ic_lock_download.png

Add toframework-res / res / values ​​/strings.xml three lines:
Code
<string name = "global_action_reboot">Reboot</ string>
<string name = "global_action_recovery">Recovery</ string>
<string name = "global_action_download">Download</ string>

Add toframework-res / res / values-en /strings.xml three lines:
Code
<string name = "global_action_reboot">Reboot</ string>
<string name = "global_action_recovery">Recovery</ string>
<string name = "global_action_download">Firmware</ string>
We collect framework-res.apk
Go to the folderframework-res / dist
And parse the framework-res.apk lying there (in this apk, the correct IDs for the added lines / pictures are already assigned)
we copy with replacement fileframework-res / dist / framework-res / res / values ​​/public.xml
to folderframework-res / res / values ​​/, open it and look for added lines / images
Code
<public type = "string" name = "global_action_reboot" id = "0x01040699" />
<public type = "string" name = "global_action_recovery" id = "0x01040697" />
<public type = "string" name = "global_action_download" id = "0x01040698" />
...
<public type = "drawable" name = "ic_lock_reboot" id = "0x01080995" />
<public type = "drawable" name = "ic_lock_recovery" id = "0x01080996" />
<public type = "drawable" name = "ic_lock_download" id = "0x01080994" />
Remember found ID

1.2 Openframework-res / res / values-en /strings.xml
If there is a “Restart” item in the dialog, we are looking for the “Restart” line.
<string name = "global_action_restart">Restart</ string>
rememberglobal_action_restart
If not, look for the string "Shutdown"
<string name = "global_action_power_off">Power off</ string>
rememberglobal_action_power_off
Open upframework-res / res / values ​​/public.xml
We are looking for the memorizedglobal_action_restart ( global_action_power_off )
<public type = "string" name = "global_action_power_off" id = "0x0104016c" />
<public type = "string" name = "global_action_restart" id = "0x0104016d" />

Remember the ID found104016d ( 104016c )

We collect framework-res.apk, in the original we changeresources.arsc and add pictures to res / drawable-hdpi
Work with android.policy.jar
2. We disassemble android.policy.jar (same as apk using ApkTools)

Open upandroid.policy / smali / com / android / internal / policy / impl /GlobalActions.smali
We are looking for memorized in paragraph 1.2 ID104016d ( 104016c )
Code
.line 304
new-instance v0, Lcom / android / internal / policy / impl / GlobalActions $ 4;

const v1,0x10806f2

const v2, 0x104016c # this is global_action_power_off (Power Off)

invoke-direct {v0, p0, v1, v2}, Lcom / android / internal / policy / impl / GlobalActions $ 4; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V

iput-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mPowerOff: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

.line 327
new-instance v0, Lcom / android / internal / policy / impl / GlobalActions $ 5;

const v1,0x10806f3

const v2.0x104016d # this is global_action_restart (Restart)

invoke-direct {v0, p0, v1, v2}, Lcom / android / internal / policy / impl / GlobalActions $ 5; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V

iput-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;
From here we see that for shutdown at us answersGlobalActions $ 4 for restart GlobalActions $ 5
If there is a reboot
Open the fileandroid.policy / smali / com / android / internal / policy / impl /GlobalActions $ 5.smali
We are looking for the wordreboot
const-string v1, "GlobalActions restart"

const / 4 v2, 0x1

invoke-static {v0, v1, v2}, Lcom / android / internal / app / ShutdownThread; ->reboot (Landroid / content / Context; Ljava / lang / String; Z) V
Changeconst-string v1, "GlobalActions restart" on const-string v1, "recovery"
Change all wordsGlobalActions $5 on GlobalActions $16
Save asGlobalActions $ 16 (I have the last GlobalActions file $ 15, that is, one more), remember
Further in the same file we changeconst-string v1, "recovery" on const-string v1, "download"
Change all wordsGlobalActions $16 on GlobalActions $17
Save asGlobalActions $ 17 remember

If there is no reboot:
Open the fileandroid.policy / smali / com / android / internal / policy / impl /GlobalActions $ 4.smali
We are looking for the wordshutdown
move-result-object v0

const / 4 v1, 0x1

invoke-static {v0, v1}, Lcom / android / internal / app / ShutdownThread; ->shutdown (Landroid / content / Context; Z) V
Change the stringinvoke-static {v0, v1}, Lcom / android / internal / app / ShutdownThread; ->shutdown(Landroid / content / Context; Z) V So:
invoke-static {v0,v2,v1}, Lcom / android / internal / app / ShutdownThread; ->reboot(Landroid / content / Context;Ljava / lang / String;Z) V
Before this line add the lineconst-string v2, "now"
A few lines above change.locals2 on .locals3
Change all wordsGlobalActions $4 on GlobalActions $16
Save asGlobalActions $ 16 (I have the last GlobalActions file $ 15, that is, one more), remember
Next, we changeconst-string v2, "now" on const-string v2, "recovery"
Change all wordsGlobalActions $16 on GlobalActions $17
Save asGlobalActions $ 17 remember
Next, we changeconst-string v2, "recovery" on const-string v2, "download"
Change all wordsGlobalActions $17 on GlobalActions $18
Save asGlobalActions $ 18 remember

Open againandroid.policy / smali / com / android / internal / policy / impl /GlobalActions.smali
We are looking for the wordnew-array
If there is a string new-array
const / 4 v0, 0x5 # Number of points

new-array v0, v0, [Lcom / android / internal / policy / impl / GlobalActions $ Action;
Changeconst/4v0, 0x5 on const v0, 0x7
after linenew-array items are being added
const / 4 v1, 0x0 # sequence number

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mAccessiblityShortcut: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

aput-object v2, v0, v1

iget-object v1, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mPowerOff: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

aput-object v1, v0, v9 # v9 is defined at the beginning of the method as 0x1

const / 4 v1, 0x2 # sequence number

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mDataModeToggle: Lcom / android / internal / policy / impl / GlobalActions $ ToggleAction;

aput-object v2, v0, v1

const / 4 v1, 0x3 # ordinal

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mAirplaneModeOn: Lcom / android / internal / policy / impl / GlobalActions $ ToggleAction;

aput-object v2, v0, v1

const / 4 v1, 0x4 # ordinal

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

aput-object v2, v0, v1
Copy the last 3 lines and paste immediately after this code 2 times
const / 4 v1,0x0

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mAccessiblityShortcut: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

aput-object v2, v0, v1

iget-object v1, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mPowerOff: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

aput-object v1, v0, v9

const / 4 v1,0x2

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mDataModeToggle: Lcom / android / internal / policy / impl / GlobalActions $ ToggleAction;

aput-object v2, v0, v1

const / 4 v1,0x3

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mAirplaneModeOn: Lcom / android / internal / policy / impl / GlobalActions $ ToggleAction;

aput-object v2, v0, v1

const / 4 v1,0x4

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

aput-object v2, v0, v1

const / 4 v1, 0x5 # Replacing 0x4 ->0x5

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRecovery: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction; # Replacing mRestart ->mRecovery

aput-object v2, v0, v1

const / 4 v1, 0x6 # Replacing 0x4 ->0x6

iget-object v2, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mDownload: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction; # Replacing mRestart ->mDownload

aput-object v2, v0, v1
We are looking for a string from the beginning of the file.mRestart (mPowerOff)
.field private mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;
copy it and paste it immediately after it 2 (3) times
.field private mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

.field private mRecovery: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction; # Replacing mRestart ->mRecovery

.field private mDownload: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction; # Replacing mRestart ->mDownload
We are looking for the same line further
.line 327
new-instance v0, Lcom / android / internal / policy / impl / GlobalActions $ 5;

const v1,0x10806f3

const v2,0x104016d

invoke-direct {v0, p0, v1, v2}, Lcom / android / internal / policy / impl / GlobalActions $ 5; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V

iput-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;
Copy these lines and paste them 2 (3) times right after them
.line 327
new-instance v0, Lcom / android / internal / policy / impl / GlobalActions $ 5;

const v1,0x10806f3

const v2,0x104016d

invoke-direct {v0, p0, v1, v2}, Lcom / android / internal / policy / impl / GlobalActions $ 5; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V

iput-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRestart: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction;

.line 327
new-instance v0, Lcom / android / internal / policy / impl / GlobalActions $ 16; # Replacing $ 5 -> $16

const v1, 0x1080996 # Replacement 0x10806f3 ->0x1080996 (ic_lock_recovery)

const v2.0x1040697 # Replacement 0x104016d ->0x1040697 (global_action_recovery)

invoke-direct {v0, p0, v1, v2}, Lcom / android / internal / policy / impl / GlobalActions $ 16; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V # Replacing $ 5 -> $16

iput-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mRecovery: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction; # Replacing mRestart ->mRecovery

.line 327
new-instance v0, Lcom / android / internal / policy / impl / GlobalActions $ 17; # Replacing $ 5 -> $17

const v1, 0x1080994 # Replacement 0x10806f3 ->0x1080994 (ic_lock_download)

const v2.0x1040698 # Replacement 0x104016d ->0x1040698 (global_action_download)

invoke-direct {v0, p0, v1, v2}, Lcom / android / internal / policy / impl / GlobalActions $ 17; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V # Replacing $ 5 -> $17

iput-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mDownload: Lcom / android / internal / policy / impl / GlobalActions $ SinglePressAction; # Replacing mRestart ->mDownload
If there is no new-array line
We are looking for memorized in paragraph 1.2 ID104016d ( 104016c )
.line 163
iget-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mItems: Ljava / util / ArrayList;

new-instance v1, Lcom / android / internal / policy / impl / GlobalActions $ 5;

const v2,0x1080030

const v3, 0x104016d

invoke-direct {v1, p0, v2, v3}, Lcom / android / internal / policy / impl / GlobalActions $ 5; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V

invoke-virtual {v0, v1}, Ljava / util / ArrayList; ->add (Ljava / lang / Object;) Z
Copy these lines (from the .line line to the .line line), paste right after them 3 times and change
.line 163
iget-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mItems: Ljava / util / ArrayList;

new-instance v1, Lcom / android / internal / policy / impl / GlobalActions $ 5;

const v2,0x1080030

const v3, 0x104016d

invoke-direct {v1, p0, v2, v3}, Lcom / android / internal / policy / impl / GlobalActions $ 5; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V

invoke-virtual {v0, v1}, Ljava / util / ArrayList; ->add (Ljava / lang / Object;) Z

.line 163
iget-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mItems: Ljava / util / ArrayList;

new-instance v1, Lcom / android / internal / policy / impl / GlobalActions $ 16; # Replacing $ 5 -> $16

const v2.0x1080030 # Replacement 0x1080030 ->0x1080995 (ic_lock_reboot)

const v3, 0x104016d # Replacement 0x104016d ->0x1040699 (global_action_reboot)

invoke-direct {v1, p0, v2, v3}, Lcom / android / internal / policy / impl / GlobalActions $ 16; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V # Replacing $ 5 -> $16

invoke-virtual {v0, v1}, Ljava / util / ArrayList; ->add (Ljava / lang / Object;) Z

.line 163
iget-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mItems: Ljava / util / ArrayList;

new-instance v1, Lcom / android / internal / policy / impl / GlobalActions $ 17; # Replacing $ 5 -> $17

const v2.0x1080030 # Replacement 0x1080030 ->0x1080996 (ic_lock_recovery)

const v3, 0x104016d # Replacement 0x104016d ->0x1040697 (global_action_recovery)

invoke-direct {v1, p0, v2, v3}, Lcom / android / internal / policy / impl / GlobalActions $ 17; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V # Replacing $ 5 -> $17

invoke-virtual {v0, v1}, Ljava / util / ArrayList; ->add (Ljava / lang / Object;) Z

.line 163
iget-object v0, p0, Lcom / android / internal / policy / impl / GlobalActions; ->mItems: Ljava / util / ArrayList;

new-instance v1, Lcom / android / internal / policy / impl / GlobalActions $ 18; # Replacing $ 5 -> $18

const v2.0x1080030 # Replacement 0x1080030 ->0x1080994 (ic_lock_download)

const v3, 0x104016d # Replacement 0x104016d ->0x1040698 (global_action_download)

invoke-direct {v1, p0, v2, v3}, Lcom / android / internal / policy / impl / GlobalActions $ 18; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V # Replacing $ 5 -> $18

invoke-virtual {v0, v1}, Ljava / util / ArrayList; ->add (Ljava / lang / Object;) Z
Everything, we collect, we replace in a body, we use
Screen
Attached Image


For Sony / Sony Ericsson owners -read info

Post has been editedDimar - 05.11.15, 21:34
Reason for editing: *



Rep: (419)
How to replace the modified framework-res.apk
android 2.x.x


Instruction
In general, here -Attached fileframework-updater.zip(154.52 KB)
Put your modifiedframework-res.apk to folder system / framework / inside the archive and install the resulting archive through the recovery (CWM). :)

Or if there is:
- Root
- Installed Busybox
- Installed terminal in the phone
You can do this:
1. Copy to the root of the SD card - your modifiedframework-res.apk and reframe.sh from the archive below.
2. Enter in the phone terminal:
su
sh /sdcard/reframe.sh

3. The phone will reboot.
Is done. Oldframework-res.apk will be saved on a flash drive under the name framework-res.apk.orig

Attached fileframework-updater.zip(154.52 KB)
Attached filereframe.rar(510 bytes)


Post has been editedDimar - 12.04.16, 19:51
Reason for editing: *



Rep: (34)
Transparent status bar for tablet ICS 4.0.x


SystemUI.apk / smali / com / android / systemui / statusbar / StatusBar.smali
Are looking for
const / 16 v16, 0x4

invoke-direct / range {v11 .. v16}, Landroid / view / WindowManager $ LayoutParams; -><init>(IiIII) v


Change to

const / 16 v16, -0x3

invoke-direct / range {v11 .. v16}, Landroid / view / WindowManager $ LayoutParams; -><init>(IiIII) v


SystemUI.apk / res / values-sw600dp*/drawables.xml * More values-sw720dp depending on the screen ..
are looking for

<item type = "drawable" name = "status_bar_background"># ff000000</ item>


Change to

Fully transparent:
<item type = "drawable" name = "status_bar_background"># 00FFFFFF</ item>


50% transparent:
<item type = "drawable" name = "status_bar_background"># 7f000000</ item>


SystemUI.apk \ res \ layout-sw600dp \ status_bar.xml

Find
android: background = "# ff000000"

Change to
android: background = "# 7f000000"
- 50%

Screenshot
Attached Image


Thanks: sk0t, mythtrandyr

Post has been editedDimar - 03.11.15, 22:49
Reason for editing: *


Full version    

Help     rules

Time is now: 01/08/20, 20:43