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: (621)
Line by line lockscreen description


lockscreen
<? xml version = "1.0" encoding = "utf-8"?>
<RelativeLayout android: gravity = "center_horizontal" # container full screen
android: id = "@ id / root"
android: background = "# 70000000"# background image transparency # 00000000 - transparent
android: layout_width = "fill_parent"# stretched to full screen width
android: layout_height = "fill_parent"# stretched to full screen height
xmlns: android = "http://schemas.android.com/apk/res/android "
xmlns: tabunlock = "http://schemas.android.com/apk/res/com.android.tabunlock ">
------------------
<TextView android: textAppearance = "? Android: textAppearanceMedium"# operator name (here)
android: ellipsize = "marquee"# with long title scrolls in a string
android: gravity = "bottom | right | center"# position in the container (in the button | on the right | center)
<! - android: gravity = "center" -># position in the container in the center
android: id = "@ id / carrier"
android: layout_width = "wrap_content"# required width to fill
android: layout_height = "wrap_content"# required height to fill
android: layout_marginTop = "2.0dip"# indents on top
android: layout_marginRight = "8.0dip"# indent right
android: singleLine = "true"# scrolls in the true row — yes, false — no
android: layout_alignParentTop = "true"# alignment ?
android: layout_alignParentRight = "true" /># right alignment
<! - android: layout_centerHorizontal = "true" -># centered
------------------
<com.lge.internal.widget.Andy_DigitalClock android: id = "@ id / time"#clock
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_marginLeft = "20.0dip"# replace the line below
<! - android: layout_centerHorizontal = "true" -># centered
android: layout_marginTop = "52.0dip"
android: layout_marginBottom = "4.0dip"
android: layout_below = "@ id / carrier">
------------------
<TextView android: textAppearance = "? Android: textAppearanceMedium" #
android: textSize = "100.0sp"# size of hours
android: gravity = "bottom" android: id = "@ id / timeDisplay"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: shadowColor = "# c0000000"# watch shadow color
android: shadowDx = "0.0"
android: shadowDy = "0.0"
android: shadowRadius = "3.0" /># radius of watch shadow


Post has been editedDimar - 29.11.15, 17:20



Rep: (4404)
Curtain button to launch any application installed on the phone

For Android 2.3 - 4.1Attached fileaaa4.1.rar(1.25 KB)
For Android 4.2Attached fileaaa4.2.rar(1.25 KB)
Howto
  • The contents of the archive put in the folder smali
  • In Layaut, where we want to see the button, we write the string
    <aaa.sk0t.ui.MultyBtn android: layout_width = "32.0dip" android: layout_height = "32.0dip" android: background = "@ drawable /ic_notify_quickbtn" android: tag = ". Settings" android: contentDescription = "com.android.settings" />
  • In the folder with the pictures putic_notify_quickbtn.png

android: contentDescription - is responsible for the package (see the parameter in the manifest of the desired application package )
android: tag - is responsible for the class (see the parameter in the manifest of the desired application android: name )
In this case, configured to launch the Settings application.
After clicking hides the curtain


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



Rep: (228)
Adding a ScreenShot item to the Power Menu

I decided to share how I implemented it on my android 2.2 (where practically nothing wants to work from what works on the android versions above). After a long search and unsuccessful attempts, I still managed to find an effective wayprehistory. Push, or the starting point of steel instructionsScreenShot in the Power MenuandAdd screenshot option in power menu. Successfully tested on several devices from different manufacturers
How does it look from me
Attached ImageAttached Image

Instruction
Before you start!
Download the archive below, we put the screenshot in it in / system / bin / and in the terminal set them right
chmod 02755 / system / bin / screenshot

1. execute the command
screenshot /mnt/sdcard/screenshot_00.png
Go to the root of the sd card and see if the screenshot_00.png file was created there. If there is such a file and everything is fine with it (full screen shot), you can proceed to the points below. If there is no such file, then sorry, this method will not work for you.
2. (checking the relevance (performance) of busybox)
execute the command
mkdir -p / mnt / sdcard / 111
go and see whether folder 111 is created in the root of the memory card. If yes then all the buzz remove it
rm -r / mnt / sdcard / 111
and move on. If the terminal swears and a folder is created in the root of the memory card, p instead of 111, then you have an old and stupid version of busybox. It is necessary to replace the current version, you can do it withBusybox reinstaller(version of BusyBox v1.21.0.svs) after replacing the update-binary with the one taken from the firmware for your device.

And so we need two files from the firmware.framework-res.apk and android.policy.jar
  1. Editing framework-res.apk
    Unpacking framework-res.apk
    go toframework-res \ res \ values ​​\ strings.xml
    Add a string
    <string name = "global_action_screenshot">Screenshot</ string>

    go toframework-res \ res \ values-ru \ strings.xml
    Add a string
    <string name = "global_action_screenshot">Screenshot</ string>

    Now we need to get the ID for the registered lines. In order not to arrange dances with a tambourine and not to turn your brain into a huge calculator, you just need to collect all this through ApkTools, but later.
    Now we need to add a picture that will be displayed in the menu (we take one of the ones below or ours) we adjust it in size (to match the rest of the pictures in the menu) and rename it to screenshot.png. And again, we need not just to add it, but to get an ID; for this, we are doing a trick similar to the previous one. Move onframework-res \ res \ drawable-mdpior drawable-hdpi depends on your OS and put our picture and collect framework-res.
    Then go toframework-res \ distand parse the resulting framework-res.apk (rename it so that there are no conflicts with an existing folder, for example in framework.apk). From the main framework-res folder we delete the build and dist folders. Go toframework \ res \ values ​​\and transfer from there public.xml in a similar way to the main folder framework-res. Open framework-res \ res \ values ​​\ public.xml and use the search to find the lines in an open document
    <public type = "drawable" name = "screenshot" id = "0x02020769" />
    <public type = "string" name = "global_action_screenshot" id = "0x020a019d" />
    Where0x020a019dand0x02020769IDs of interest to us write them down (with the drawable and string marks so as not to get confused) and delete the framework folder. Everyone is now collecting the framework-res (I hope you have already walked around enough on this topic and know how to do it correctly) with it.

  2. Editing android.policy.jar
    Parse (or better deodexing) android.policy.jar
    move onandroid.policy \ smali \ com \ android \ internal \ policy \ impland openGlobalActions.smali . Now to decide what we are looking for, we count how many points you have now in Power menu . And so we will proceed from the fact that you (as I did) 6 points means in the open GlobalActions.smali look for the string
    .line 365 - .line number can and most likely will be different
    const / 4 v0, 0x6
    Here begins the list of Power Menu items and 0x6this is their current amount. We add a new item and accordingly increase their number by one 0x7rule
    .line 365
    const / 4 v0, 0x7
    there is now determined by what account our item will be (let it be the third). We find const / 4 v1, 0x2 - (this is the third item, the numbering starts from 0) and change the value in it and in all subsequent menu items to one + (more)
    const / 4 v1,0x3
    const / 4 v1,0x4
    const / 4 v1,0x5
    const / 4 v1, 0x6 - I recall the numbering of the points goes from zero, which means the seventh point will be 0x6 per unit - (less).

    Now beforeconst / 4 v1,0x3add code
    const / 4 v1,0x2

    new-instance v2, Lcom / android / internal / policy / impl / GlobalActions $ 20;

    const v3, #id pictures drawable that we wrote down. If the ID looks like this 0x020a019d then remove before the number 2 zero 0x20a019d

    const v4, #id strings

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

    aput-object v2, v0, v1

    to make it all look like this
    const / 4 v1,0x2

    new-instance v2, Lcom / android / internal / policy / impl / GlobalActions $ 20;

    const v3, 0x2020769

    const v4,0x20a019d

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

    aput-object v2, v0, v1

    const / 4 v1, 0x3 - the former 0x2 before which we add the code
    Now hereandroid.policy \ smali \ com \ android \ internal \ policy \ implfrom the archive below addGlobalActions $ 20.smali . Not closing GlobalActions.smali we find a string in it
    invoke-static {v1}, Lcom / android / internal / policy / impl / GlobalActions; ->access $ 000 (Lcom / android / internal / policy / impl / GlobalActions;) Landroid / content / Context;
    if the value in it you do not have access $ 000 then open addedGlobalActions $ 20.smali and we change it in the corresponding line for what you have (for example, as I have access $ 200); otherwise, when you press the Power Menu button, the device will reboot or even worse.
    Excellent assemble (we code) our android.policy.jar back

If you have an android 4.x.x, then regarding editing android.policy.jar, this information will be useful to youPower Menu for Android 4 ICS

Required files: Attached fileScreen_tools.zip (29.22 KB)

Now we put the files from the ScreenCapture archive and the screenshot in the firmware in / system / bin / and in the terminal set them right
chmod 02755 / system / bin / screenshot
chmod 02755 / system / bin / ScreenCapture
CMScreenshot.apk file put in / system / app / well, and 644 rights to it.
Now we replace in the system framework-res.apk and android.policy.jar with the ones we collected. Reboot and enjoy;).

Details: Screenshots are saved to the memory card in the / DCIM / Screenshots / folder. In the CMScreenshot.apk application, the path to this folder was corrected (without this, the application was lost in three pines and could not find a way out).
Sample Images
Attached ImageAttached ImageAttached Image
Attached ImageAttached Image
Attached Image

Acknowledgments
S0bes,for his instruction andShehroz2009, for adjusting the control script.


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



Rep: (1049)
WIFI toggle button in curtain bar status for tablets (tablet ui) from Android 4.x
(tested on 4.0.3, 4.1.1, 4.2.2)


Tablet owners, when opening the curtain of the system bar, see the first item - WIFI, which is a link to the WIFI item in the settings. (see screenshot)
Attached Image


And it didn’t bother me at all until I tried CyanogenMod, which also has a WIFI switch on this item.
We will do it. (see screenshot)
Attached Image


What do you need? It is assumed that a person ALREADY knows how to disassemble and assemble apk. We work with SystemUI.apk
1) Open the file /res/values/ids.xml
Add a string
<item type = "id" name = "wifi_checkbox">false</ item>

We assemble, disassemble.
2) Open /res/values/public.xml
We are looking for a new line
<public type = "id" name = "wifi_checkbox" id = "0x7f0c00a6" />
Remember the number 0x7f0c00a6
3) Open the file:
For JB /res/layout/system_bar_settings_view.xml
For ICS /res/layout-sw600dp/status_bar_settings_view.xml (maybe the folder will be like this - layout-sw720dp)
We are looking for something like this code
<LinearLayout android: id = "@ id / network" style = "@ style / SystemBarPanelSettingsRow">
<ImageView android: id = "@ id / network_icon" android: src = "@ drawable / ic_sysbar_wifi_on" style = "@ style / SystemBarPanelSettingsIcon" />
<TextView android: id = "@ id / network_label" android: text = "@string / status_bar_settings_wifi_button" style = "@ style / SystemBarPanelSettingsContents" />
</ LinearLayout>


Add this line
<Switch android: layout_gravity = "center_vertical" android: id = "@ id / wifi_checkbox" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "5.0dip" />


We get this code
<LinearLayout android: id = "@ id / network" style = "@ style / SystemBarPanelSettingsRow">
<ImageView android: id = "@ id / network_icon" android: src = "@ drawable / ic_sysbar_wifi_on" style = "@ style / SystemBarPanelSettingsIcon" />
<TextView android: id = "@ id / network_label" android: text = "@string / status_bar_settings_wifi_button" style = "@ style / SystemBarPanelSettingsContents" />
<Switch android: layout_gravity = "center_vertical" android: id = "@ id / wifi_checkbox" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "5.0dip" />
</ LinearLayout>



4) Open the file \ smali \ com \ android \ systemui \ statusbar \ tablet \ SettingsView.smali
There will have to show imagination, since this file is different for everyone.
We are looking for (at the very beginning) a block# instance fields
We add after those lines that there is such:
.field mWifi: Lcom / android / systemui / statusbar / policy / WifiController;
We get something like this
# instance fields
.field mAirplane: Lcom / android / systemui / statusbar / policy / AirplaneModeController;

.field mBrightness: Lcom / android / systemui / statusbar / policy / BrightnessController;

.field mDoNotDisturb: Lcom / android / systemui / statusbar / policy / DoNotDisturbController;

.field mRotate: Lcom / android / systemui / statusbar / policy / AutoRotateController;

.field mRotationLockContainer: Landroid / view / View;

.field mRotationLockSeparator: Landroid / view / View;

.field mWifi: Lcom / android / systemui / statusbar / policy / WifiController;


# direct methods



5) We are looking for a method.method private onClickNetwork () V
Remove ALL method from .method private onClickNetwork () V to .end method inclusive
6) We are looking for a method.method public onClick (Landroid / view / View;) V
In it we lookabout such code
.line 108
: sswitch_8
invoke-direct {v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->onClickNetwork () V

goto: goto_7

.line 111
: sswitch_c
invoke-direct {v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->onClickSettings () V

goto: goto_7


Delete the lines:
invoke-direct {v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->onClickNetwork () V
goto: goto_7

We get this code:
.line 108
: sswitch_8

.line 111
: sswitch_c
invoke-direct {v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->onClickSettings () V

goto: goto_7



7) We are looking for a method.method protected onFinishInflate () V
We add the following code in it:
.line 72
new-instance v2, Lcom / android / systemui / statusbar / policy / WifiController;

const v1,0x7f0c00a6

invoke-virtual {v4, v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->findViewById (I) Landroid / view / View;

move-result-object v1

check-cast v1, Landroid / widget / CompoundButton;

invoke-direct {v2, v0, v1}, Lcom / android / systemui / statusbar / policy / WifiController; -><init>(Landroid / content / Context; Landroid / widget / CompoundButton;) V

iput-object v2, v4, Lcom / android / systemui / statusbar / tablet / SettingsView; ->mWifi: Lcom / android / systemui / statusbar / policy / WifiController;


8) hereATTENTION on:
const v1,0x7f0c00a6 here we write YOUR ID, which is remembered in the public.xml step " 2) "
Pay attention to what numbers next to the invoke-virtual and iput-object in the adjacent blocks of YOUR file.
invoke-virtual{v4, v1}
iput-objectv2, v4
EG:
If we have a block
.line 69
new-instance v2, Lcom / android / systemui / statusbar / policy / AutoRotateController;

const v1,0x7f0e0087

invoke-virtual {v5, v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->findViewById (I) Landroid / view / View;

move-result-object v1

check-cast v1, Landroid / widget / CompoundButton;

invoke-direct {v2, v0, v1}, Lcom / android / systemui / statusbar / policy / AutoRotateController; -><init>(Landroid / content / Context; Landroid / widget / CompoundButton;) V

iput-object v2, v5, Lcom / android / systemui / statusbar / tablet / SettingsView; ->mRotate: Lcom / android / systemui / statusbar / policy / AutoRotateController;


invoke-virtual {v5, v1}
iput-object v2, v5
DIGITS v5, v1 and v2, v5 respectively, THEN we fix the digits of MY code (point7) ) on these v5, v1 and v2, v5 respectively - such as in YOUR
EG AFTER CORRECTION:
invoke-virtual {v5, v1}, Lcom / android / systemui / statusbar / tablet / SettingsView; ->findViewById (I) Landroid / view / View;

move-result-object v1

check-cast v1, Landroid / widget / CompoundButton;

invoke-direct {v2, v0, v1}, Lcom / android / systemui / statusbar / policy / WifiController; -><init>(Landroid / content / Context; Landroid / widget / CompoundButton;) V

iput-object v2, v5, Lcom / android / systemui / statusbar / tablet / SettingsView; ->mWifi: Lcom / android / systemui / statusbar / policy / WifiController;


8) Copy files from attachment along the path \ smali \ com \ android \ systemui \ statusbar \ policy \
Attached fileWifiController.rar(3.03 KB)

9) We collect SystemUI.apk - we copy into the device and see the result. :-)


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



Rep: (2953)
A little Linux rights permissions guide (Android)

“Permissions of files and directories”

Description
--- All forbidden
--x Read and write prohibited, execution allowed
-w- Reading and execution prohibited; writing allowed
-wx Reading is forbidden, writing and execution are allowed.
r-- Read allowed, no write and execute allowed.
r-x Read and execute allowed, no write allowed.
rw- Read and write allowed, execution not allowed
rwx All allowed

***************************************************************************


A couple of good examples:

w-r – r– or 644 - the file is readable by all. The owner has the right to write to the file.
rw-rw-rw- or 666 - read and write access to the file is available to all.
rwxr-xr-x or 755 - read the directory and look for files in it can all. The owner of the directory can modify existing files, delete them and create new ones.
rwxrwxrwx or 777 - write, read and execute in the directory are allowed to all.

Calculation example:
- - 0
r - 4
w - 2
x - 1

Now, to find out the desired number, we summarize the numbers corresponding to the letters.
For example:
rwx = 4 + 2 + 1 = 7
–X = 0 + 0 + 1 = 1
r-x = 4 + 0 + 1 = 5, etc.


You can see the file permissions using the console (terminal emulator). For example, go to any directory. Let it besystem Enter the command ls -l and see what's interesting there.


Post has been editedDimar - 27.01.16, 10:26
Reason for editing: Spoiler



Rep: (52)
Battery% in status bar


Instruction
  1. Download and unpackAttached fileBatteryPercentage.rar(2.12 KB)

  2. Using ApkTools, we decompileSystemUI.apk and copy the contents of the archive into the smali folder;
  3. Open upstatus_bar.xml (SystemUI / res / layout);
  4. Looking for the string:
    <ImageView android: id = "@ id / battery" android: paddingLeft = "4.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
    and add the following before it:
    <com.erryy. BatteryText android: textSize = "14.0dip" android: textColor = "@ * android: color / holo_blue_light" android: gravity = "center" android: paddingLeft = "4.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" />

  5. Save the changes and compile.

What should happen
Attached Image

*Original theme
* Tested and working on ICS


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



Rep: (564)
Transparent status bar on the tablet (android 4.1.2).


The instructions were taken as a basis.
Transparent statusbar on Jelly Bean
Another solution for statusbar transparency(only here we edit the filecom / android / systemui / statusbar / tablet / TabletStatusBar.smali ) the way together.
But the transparency parameter itselfdrawables.xml not set in <item type = "drawable" name = "status_bar_background"> and in line <item type = "drawable" name = "system_bar_background"> put # 5a101010 .
But one status bar without a transparent settings panel does not look very
But indrawables.xml this is not set, as in almost everything else (in my case), I had to dig into the folder layout file system_bar_notification_panel.xml responsible for the transparency of the settings, namely the change
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.tablet.NotificationPanel android: gravity = "right" android: id = "@ id / content_parent" android: layout_width = "fill_parent" android: layout_height = "fill_parent"
xmlns: android = "http://schemas.android.com/apk/res/android "
xmlns: systemui = "http://schemas.android.com/apk/res/com.android.systemui ">
<Space android: id = "@ id / system_bar_notification_panel_bottom_space" android: layout_width = "478.0dip" android: layout_height = "56.0dip" android: layout_alignParentRight = "true" android: layout_alignParentBottom = "true" />
<LinearLayout android: orientation = "vertical" android: id = "@ id / content_frame"android: background = "@ drawable / notification_panel_bg"android: paddingBottom = "8.0dip" android: layout_width = "478.0dip" android: layout_height = "wrap_content" android: layout_above = "@ id / system_bar_notification_panel_bottom_space" android: layout_alignParentRight = "true">
<include android: layout_width = "fill_parent" android: layout_height = "130.0dip" android: layout_weight = "0.0" android: layout_above = "@ id / content_frame" android: layout_alignParentRight = "true" layout = "@ layout / system_bar_notification_panel_title" />
<ScrollView android: id = "@ id / notification_scroller" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_weight = "1.0">
<com.android.systemui.statusbar.policy.NotificationRowLayout android: gravity = "bottom | center" android: id = "@ id / content" android: focusable = "true" android: clickable = "true" android: descendantFocusability = "afterDescendants "android: layout_width =" fill_parent "android: layout_height =" wrap_content "systemui: rowHeight =" @ dimen / notification_row_min_height "/>
</ ScrollView>
</ LinearLayout>
</com.android.systemui.statusbar.tablet.NotificationPanel>

On thisandroid: background = "# 7a000000"

But sometimes notifications still pop up. Two files are responsible for this, the firstsystem_bar_ticker_compat.xml we rule it
<? xml version = "1.0" encoding = "utf-8"?>
<LinearLayout android: gravity = "bottom" android: orientation = "horizontal" android: layout_width = "fill_parent" android: layout_height = "fill_parent"
xmlns: android = "http://schemas.android.com/apk/res/android ">
<ImageView android: id = "@ id / large_icon" android: visibility = "gone" android: layout_width = "@ * android: dimen / notification_large_icon_width" android: layout_height = "@ * android: dimen / notification_large_icon_height" android: scaleType = "center "/>
<Linearlayoutandroid: background = "@ drawable / system_bar_ticker_background"android: layout_width = "wrap_content" android: layout_height = "@ * android: dimen / system_bar_height" android: layout_weight = "1.0">
<ImageView android: id = "@ id / left_icon" android: visibility = "gone" android: layout_width = "64.0dip" android: layout_height = "fill_parent" android: scaleType = "center" />
<TextView android: textAppearance = "@ * android: style / TextAppearance.StatusBar.Ticker" android: gravity = "center_vertical" android: layout_gravity = "center_vertical" android: id = "@ id / text" android: layout_width = "fill_parent" android : layout_height = "fill_parent" android: layout_marginLeft = "12.0dip" android: maxLines = "2" />
<ImageView android: id = "@ id / right_icon" android: visibility = "gone" android: layout_width = "64.0dip" android: layout_height = "fill_parent" android: scaleType = "center" />
</ LinearLayout>
</ LinearLayout>

On thisandroid: background = "# 7a000000"

Secondsystem_bar_ticker_panel.xml we rule it
<? xml version = "1.0" encoding = "utf-8"?>
<RelativeLayout android: layout_width = "fill_parent" android: layout_height = "fill_parent"
xmlns: android = "http://schemas.android.com/apk/res/android ">
<Viewandroid: background = "@ drawable / system_bar_ticker_background"android: clickable = "false" android: layout_width = "fill_parent" android: layout_height = "@ * android: dimen / system_bar_height" android: layout_alignParentLeft = "true" android: layout_alignParentBottom = "true" />
<ImageView android: id = "@ id / large_icon" android: visibility = "gone" android: layout_width = "@ * android: dimen / notification_large_icon_height" android: layout_height = "@ * android: dimen / notification_large_icon_width" android: scaleType = "center "android: layout_alignParentLeft =" true "android: layout_alignParentBottom =" true "/>
<FrameLayout android: id = "@ id / ticker_expanded" android: layout_width = "fill_parent" android: layout_height = "@ * android: dimen / system_bar_height" android: layout_weight = "1.0" android: layout_toRightOf = "@ id / large_icon" android: layout_alignParentBottom = "true" android: layout_alignWithParentIfMissing = "true" />
</ RelativeLayout>

On thisandroid: background = "# 7a000000"

It turns out so.
Attached Image

Question to the guru how to fix it (I want to make it transparent too)? This notification from applications, etc. All the layout has already rummaged, where to dig?
Screen
Attached Image

The answer found thankssagitt67 open com / android / systemui / statusbar / tablet / NotificationPanel.smali and we are looking for
invoke-virtual {v0, v1}, Landroid / view / View; ->setAlpha (F) V

And before that we see
const / high16 v1,0x3f80

The last two digits are the degree of transparency, I set0x3f30


Post has been editedDimar - 08.11.15, 08:39
Reason for editing: *



Rep: (564)
Supplement toHow to make a transparent background settings and not only in Anroid 4.0+

Instruction
Change the background in the settings on your picture. , a good attempt, but there is one thing, the background changes in all applications that use this theme.
In general, here is a real solution that will help change the background in almost any application individually.
Well, if it comes toSetting.apk then he will be an example.
We work with framework-res.apk
Open upres / values ​​/ style.xml and add to the very end before the last line </ resources> this
<style name = "Theme.Holo.Setting" parent = "@ style / Theme.Holo">
<item name = "colorBackground">@ color / transparent</ item>
<item name = "windowBackground">@ drawable / screen_background_dark_transparent</ item>"
</ style>

And add a picture giving her a namescreen_background_dark_transparent.png your screen size (minus statusbar), along the way res \ drawable-mdpi \
Thus, we created a new style taking the standardTheme.Holo and adding new values.

We collectframework-res.apk and what we got is used as framework for apktool .
We work with setting.apk
Everything is simple, openAndroidManifest.xml and look for a topic that he uses, I used Theme.Holo therefore, it is spelled out higher as ethanolum.
We are looking for it
<application android: theme = "@ * android: style / Theme.Holo" ........................

And change it
<application android: theme = "@ * android: style / Theme.Holo.Setting"


We collect and throws both .apk in the device. So you can create any topic for any application.


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



Rep: (1321)
Change the height of the lower bar.

In the SystemUI.apk dimens.xml string<item type = "dimen" name = "navigation_bar_size">@ * android: dimen / navigation_bar_height</ item>
The value leads in framework-res \ res \ values ​​\ dimens.xml<dimen name = "navigation_bar_height">48.0dip</ dimen>
It is necessary to change this value.

Post has been editedDimar - 08.11.15, 08:43
Reason for editing: *



Rep: (4404)
How to hide and show the statusbar item in real time for Android 4 and above


Instruction
To hide / show the statusbar element, we need to generate some event.
When this event occurs, depending on the setting, the item will be shown or hidden.
Let us analyze this process by the example of hiding the battery in the status bar
Add a battery hide / show functionality to the SystemUI
SystemUI
We disassemble SystemUI.apk
Everything will happen in the resulting SystemUI folder, so all the paths are written relative to it.
To hide / show a battery, we need to know its id
Open upres / layout /status_bar.xml and see the line
<ImageView android: id = "@ id / battery" android: paddingLeft = "4.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
then id it battery
Open upres / values ​​/public.xml and look for a string with type id and by name battery
<public type = "id" name = "battery" id = "0x7f0e002a" />

remember found id7f0e002a (you may have a different id)
Now we need to write a method that will hide or show the battery depending on the setting.
Call itzBatteryVis
open upsmali / com / android / systemui / statusbar / phone /PhoneStatusBar.smali and at the very end of the file we write
Code
.method zBatteryVis () V
.locals 0

.prologue

return-void
.end method
This is our workpiece and we need to fill it.
The first thing we need to do is read the setting that stores the value that determines whether or not to show the element.
For this we needsetup name , default value (if there is no such setting) and ContentResolver
To getContentResolver we will need Context
The name of the settingsb_batt , the value of this setting can be 1 (show) or 0 (hide)
The default value will be 1 (show)
ButContext You need to search in the same smali file, and at the beginning of the line should be iget-object, and at the end of the Context
Search by wordContext and find the string
iget-object v1, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mContext: Landroid / content / Context;
copy it and paste it into our method after the line .prologue and change v1 to v0
Code
.method zBatteryVis () V
.locals 0

.prologue
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mContext: Landroid / content / Context;

return-void
.end method

This string means that we have received the context and written it to the register.v0
now we can getContentResolver write further
invoke-virtual {v0}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v0
GotContentResolver and write it to the register v0 instead of Context
further setting name in registerv1
const-string v1, "sb_batt"
default value to register v2
const / 4 v2, 0x1
and actually getting the setting value and writing it to the register v0
invoke-static {v0, v1, v2}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0
What happened
.method zBatteryVis () V
.locals 0

.prologue
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mContext: Landroid / content / Context;

invoke-virtual {v0}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v0

const-string v1, "sb_batt"

const / 4 v2, 0x1

invoke-static {v0, v1, v2}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0

return-void
.end method
now we have in the register v0 setting value

Well, now we need to access the element by id
For example, take the clock reference, which is exactly in this smali file.
In the way described first we find the id of the clock, I have it7f0e002b
We are looking for the file smali word 0x7f0e002b and find such a code
Code
iget-object v1, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;

const v2,0x7f0e002b

invoke-virtual {v1, v2}, Lcom / android / systemui / statusbar / phone / PhoneStatBarView; ->findViewById (I) Landroid / view / View;

move-result-object v0
Copy it and paste it into our method after move-result v0, but change 0x7f0e002b to the id of our battery, memorized at the beginning 0x7f0e002a
and in the last line of v0 on v1, so that the setting value that we have in register v0 does not get stuck
What happened
.method zBatteryVis () V
.locals 0

.prologue
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mContext: Landroid / content / Context;

invoke-virtual {v0}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v0

const-string v1, "sb_batt"

const / 4 v2, 0x1

invoke-static {v0, v1, v2}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0

iget-object v1, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;

const v2,0x7f0e002a

invoke-virtual {v1, v2}, Lcom / android / systemui / statusbar / phone / PhoneStatBarView; ->findViewById (I) Landroid / view / View;

move-result-object v1

return-void
.end method

And now we add the code to hide the element, we write after move-result-object v1
const v2,0x8

invoke-virtual {v1, v2}, Landroid / view / View; ->setVisibility (I) V
in the register v2 we have the number 8, which corresponds to android: visibility = "gone", that is, it hides the element
and it remains to make a choice based on the value of the parameter, which is in register v0, we write further
if-nez v0,: cond_0
if the value in the register v0 does not equal 0 go to the label: cond_0
after the return-void line we write
Code
: cond_0

const v2,0x0

goto: goto_0
in the register v2 we have the digit 0, which corresponds to android: visibility = "visible", that is, it shows the element
and before the line invoke-virtual {v1, v2}, Landroid / view / View; ->setVisibility (I) V write
: goto_0
It turns out that, depending on the value of register v0, we register in register v2 0 or 8
Now we count the registers that we used: v0, v1, v2 - only 3
change .locals 0 to .locals 3
What happened
.method zBatteryVis () V
.locals 3

.prologue
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mContext: Landroid / content / Context;

invoke-virtual {v0}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v0

const-string v1, "sb_batt"

const / 4 v2, 0x1

invoke-static {v0, v1, v2}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0

iget-object v1, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;

const v2,0x7f0e002a

invoke-virtual {v1, v2}, Lcom / android / systemui / statusbar / phone / PhoneStatBarView; ->findViewById (I) Landroid / view / View;

move-result-object v1

if-nez v0,: cond_0

const v2,0x8

: goto_0
invoke-virtual {v1, v2}, Landroid / view / View; ->setVisibility (I) V

return-void
: cond_0

const v2,0x0

goto: goto_0
.end method
With method finished

Now it needs to be called at the initial loading of the statusbar and each time by the event
Initial loading of the statusbar occurs in the methodmakeStatusBarView () Landroid / view / View
To run our method, you need to see how a similar method is run from a method.makeStatusBarView () Landroid / view / View
for example methodupdateRecentsPanel () V find it in the method makeStatusBarView () Landroid / view / View
invoke-virtual / range {p0 .. p0}, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->updateRecentsPanel () V
copy the string and paste it in front of the string return object in the method makeStatusBarView () Landroid / view / View and change updateRecentsPanel on zBatteryVis
What happened
invoke-virtual / range {p0 .. p0}, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->zBatteryVis () V

.line 475
return object v8

When loading done, now you need an event
First register our event in BroadcastResiver
We look above in the same method lines starting withandroid.intent.action it will be for example
Code
.line 450
const-string v13, "android.intent.action.CLOSE_SYSTEM_DIALOGS"

invoke-virtual {v4, v13}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V
we copy these lines, we insert immediately after them and we changeandroid.intent.action.CLOSE_SYSTEM_DIALOGS on aaa.our.settings.BATTERY_VIS
Code
.line 450
const-string v13, "android.intent.action.CLOSE_SYSTEM_DIALOGS"

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

.line 450
const-string v13, "aaa.our.settings.BATTERY_VIS"

invoke-virtual {v4, v13}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V
Event registered, now we need to find the file in which these events are processed
To do this, look for the string starting atiput-object and ending on mBroadcastReceiver : Landroid / content / BroadcastReceiver;
we find such code
invoke-direct {v0, p0}, Lcom / android / systemui / statusbar / phone / PhoneStatBar $ 7; -><init>(Lcom / android / systemui / statusbar / phone / PhoneStatusBar;) V

iput-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mBroadcastReceiver: Landroid / content / BroadcastReceiver;
In the top line you can see in which file the received event is processed -PhoneStatusBar $ 7
open upsmali / com / android / systemui / statusbar / phone /PhoneStatusBar $ 7.smali and we are looking for a method onReceive (Landroid / content / Context; Landroid / content / Intent;) V
in this method, look for the stringreturn-void
after it should be similar to this code
Code
: goto_0
return-void

.line 2423
: cond_3
const-string v6, "android.intent.action.SKIN_CHANGED"

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

move-result v6

if-eqz v6,: cond_4
we copy these lines, we correct here: cond_3 on : cond_3a , paste in front of these lines the ones that are copied, change android.intent.action.SKIN_CHANGED on our aaa.our.settings.BATTERY_VIS change in inserted strings : cond_4 on : cond_3a and after if-eqz v6,: cond_3a add row goto: goto_0 (label: goto_0 is in front of the return-void line)
What happened
: goto_0
return-void

.line 2423
: cond_3
const-string v6, "aaa.our.settings.BATTERY_VIS" #Change

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

move-result v6

if-eqz v6,: cond_3a # CHANGE

goto: goto_0 # CHANGE

.line 2423
: cond_3a #Change
const-string v6, "android.intent.action.SKIN_CHANGED"

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

move-result v6

if-eqz v6,: cond_4
Now it remains only to spy as from this file run a method similar to ours, for example, takeupdateResources () V
.line 2429
iget-object v6, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar $ 7; ->this $ 0: Lcom / android / systemui / statusbar / phone / PhoneStatusBar;

invoke-virtual {v6}, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->updateResources () V
Copy these lines, paste into our block before the line.goto: goto_0 and change updateResources on zBatteryVis
What happened
: goto_0
return-void

.line 2423
: cond_3
const-string v6, "aaa.our.settings.BATTERY_VIS"

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

move-result v6

if-eqz v6,: cond_3a

.line 2429
iget-object v6, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar $ 7; ->this $ 0: Lcom / android / systemui / statusbar / phone / PhoneStatusBar;

invoke-virtual {v6}, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->zBatteryVis () V # CHANGE

goto: goto_0

.line 2423
: cond_3a
const-string v6, "android.intent.action.SKIN_CHANGED"

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

move-result v6

if-eqz v6,: cond_4
On this with SystemUI finished
We collect apk and we change in the initialclasses.dex

Now we need to add a setting and make it so that when it changes, our alert will be sent.aaa.our.settings.BATTERY_VIS
Easy way
Download this apkAttached fileUniPrefs.apk(165.06 KB)
parse it and open the fileres / values ​​/strings.xml
Add strings
Code
<string name = "battery_title">Battery in statusbar</ string>
<string name = "battery_summ_off">DISABLED</ string>
<string name = "battery_summ_on">ENABLED</ string>
open the fileres / values-ru /strings.xml
Add strings
Code
<string name = "battery_title">Battery in the status bar</ string>
<string name = "battery_summ_off">HIDDEN</ string>
<string name = "battery_summ_on">PRESENT</ string>
open the fileres / xml /prefs.xml and see such a string
<ui.CheckBoxPreference android: title = "CheckBoxPreference" android: key = "test_pref" android: summaryOn = "ENABLED" android: summaryOff = "DISABLED" uni: broadcast = "aaa.bbb.ccc.TEST_BROADCAST" />
change it so
<ui.CheckBoxPreference android: title = "@ string / battery_title" android: key = "sb_batt" android: summaryOn = "@ string / battery_summ_on" android: summaryOff = "@ string / battery_summ_off" uni: broadcast = "aaa.our.settings .BATTERY_VIS "/>
We collect apk, go to the folderUniPrefs / dist /, we sign (we drag on the Sign.cmd file) turned out there UniPrefs.apk and install it in the phone
What should happen
Attached Image
Attached Image
Now add a call to this apk in the general settings
Parse Settings.apk and openSettings / res / xml /settings_headers.xml
paste after line
<header android: title = "@ string / header_category_device" />
following lines
<header android: icon = "@ drawable / ic_settings_display" android: title = "My Setting">
<intent android: targetPackage = "aaa.sk0t.uniprefs" android: targetClass = "aaa.sk0t.uniprefs.Main" />
</ header>
We collect, we change in the original apkres / xml /settings_headers.xml , replace apk in the phone
Result
Attached Image

Now we will hide UniPrefs from all programs.
Open UniPrefs / AndroidManifest.xml and delete the line
<category android: name = "android.intent.category.LAUNCHER" />
We collect, sign, install in the phone
Now apk can not be opened in any way, except from the Settings application

Tricky way
We disassemble Settings.apk
Everything will happen in the resulting Settings folder, so all the paths are written relative to it.
To begin, add our setup in xml
Open upres / xml /display_settings.xml and look for the string starting at <CheckBoxPreference , for example
<CheckBoxPreference android: persistent = "false" android: title = "@ string / notification_pulse_title" android: key = "notification_pulse" />
copy it and paste it at the end, before the last line </ PreferenceScreen>
Replace it@ string / notification_pulse_title on Battery is visible , notification_pulse on our sb_batt and remove the parameter android: persistent = "false" (prohibits saving setting value)
<CheckBoxPreference android: title = "Battery is visible" android: key = "sb_batt" />
Now we need a sample for which we will process our settings.
Let it be a string withandroid: key = "notification_pulse" (which we copied), since it is also a CheckBox, we remember notification_pulse
Open the file smali / com / android / settings / DisplaySettings.smali and look for the line in itnotification_pulse
Code
.line 157
const-string v6, "notification_pulse"

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

move-result-object v6

check-cast v6, Landroid / preference / CheckBoxPreference;

iput-object v6, p0, Lcom / android / settings / DisplaySettings; ->mNotificationPulse: Landroid / preference / CheckBoxPreference;
We copy these lines and paste in front of them, but we changenotification_pulse on sb_batt and mNotificationPulse on mSbBatt
Code
.line 157
const-string v6, "sb_batt" #Change

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

move-result-object v6

check-cast v6, Landroid / preference / CheckBoxPreference;

iput-object v6, p0, Lcom / android / settings / DisplaySettings; ->mSbBatt: Landroid / preference / CheckBoxPreference; #CHANGE
We are looking for the file first linemNotificationPulse find
.field private mNotificationPulse: Landroid / preference / CheckBoxPreference;
copy and paste before this line and change mNotificationPulse on mSbBatt
Code
.field private mSbBatt: Landroid / preference / CheckBoxPreference;

.field private mNotificationPulse: Landroid / preference / CheckBoxPreference;
Next, look for a methodonPreferenceTreeClick and in this method look for the string mNotificationPulse Find similar code
Code
: cond_3
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mNotificationPulse: Landroid / preference / CheckBoxPreference;

if-ne p2, v6,: cond_0

.line 437
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mNotificationPulse: Landroid / preference / CheckBoxPreference;

invoke-virtual {v6}, Landroid / preference / CheckBoxPreference; ->isChecked () Z

move-result v2

.line 438
.local v2, value: Z
invoke-virtual {p0}, Lcom / android / settings / DisplaySettings; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v6

const-string v7, "notification_light_pulse"

if-eqz v2,: cond_4

move v4, v5

: cond_4
invoke-static {v6, v7, v4}, Landroid / provider / Settings $ System; ->putInt (Landroid / content / ContentResolver; Ljava / lang / String; I) Z

goto: goto_1
Copy these lines, change here: cond_3 on : cond_3a , paste the copied lines before these lines and change them in the inserted lines : cond_0 on : cond_3a , mNotificationPulse on mSbBatt (2 times), notification_light_pulse on sb_batt , : cond_4 on : cond_4a (2 times) and goto: goto_1 on goto: goto_0
What happened
: cond_3
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mSbBatt: Landroid / preference / CheckBoxPreference; #CHANGE

if-ne p2, v6,: cond_3a # CHANGE

.line 437
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mSbBatt: Landroid / preference / CheckBoxPreference; #CHANGE

invoke-virtual {v6}, Landroid / preference / CheckBoxPreference; ->isChecked () Z

move-result v2

.line 438
.local v2, value: Z
invoke-virtual {p0}, Lcom / android / settings / DisplaySettings; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v6

const-string v7, "sb_batt" #Change

if-eqz v2,: cond_4a #Change

move v4, v5

: cond_4a #Change
invoke-static {v6, v7, v4}, Landroid / provider / Settings $ System; ->putInt (Landroid / content / ContentResolver; Ljava / lang / String; I) Z

goto: goto_0 # CHANGE

###### LINE BELOW INSERTED UPPER #######
: cond_3a #Change
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mNotificationPulse: Landroid / preference / CheckBoxPreference;

if-ne p2, v6,: cond_0
and now before the linegoto: goto_0 insert this code
Code
const-string v0, "aaa.our.settings.BATTERY_VIS"

new-instance v1, Landroid / content / Intent;

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

.line 73
.local v1, intent: Landroid / content / Intent;
invoke-virtual {p0}, Lcom / android / settings / DisplaySettings; ->getActivity () Landroid / app / Activity;

move-result-object v0

invoke-virtual {v0, v1}, Landroid / app / Activity; ->sendBroadcast (Landroid / content / Intent;) V
and changev0 on v6 and v1 on v7 (registers from the top line invoke-static { v6 , v7 , v4}, Landroid / provider / Settings $ System; ->putInt (Landroid / content / ContentResolver; Ljava / lang / String; I) Z)
What happened
: cond_3
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mSbBatt: Landroid / preference / CheckBoxPreference;

if-ne p2, v6,: cond_3a

.line 437
iget-object v6, p0, Lcom / android / settings / DisplaySettings; ->mSbBatt: Landroid / preference / CheckBoxPreference;

invoke-virtual {v6}, Landroid / preference / CheckBoxPreference; ->isChecked () Z

move-result v2

.line 438
.local v2, value: Z
invoke-virtual {p0}, Lcom / android / settings / DisplaySettings; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v6

const-string v7, "sb_batt"

if-eqz v2,: cond_4a

move v4, v5

: cond_4a
invoke-static {v6, v7, v4}, Landroid / provider / Settings $ System; ->putInt (Landroid / content / ContentResolver; Ljava / lang / String; I) Z

const-string v6, "aaa.our.settings.BATTERY_VIS" #Change

new-instance v7, Landroid / content / Intent; #CHANGE

invoke-direct {v7, v6}, Landroid / content / Intent; -><init>(Ljava / lang / String;) V # CHANGE

.line 73
.local v7, intent: Landroid / content / Intent; #CHANGE
invoke-virtual {p0}, Lcom / android / settings / DisplaySettings; ->getActivity () Landroid / app / Activity;

move-result-object v6 #Change

invoke-virtual {v6, v7}, Landroid / app / Activity; ->sendBroadcast (Landroid / content / Intent;) V # CHANGE

goto: goto_0
That's all, collect, change in the original apk classes.dex andres / xml /display_settings.xml , replace apk in the phone

Result
Attached Image
Attached Image

An example of using this instruction:Sony Ericsson XPERIA arc - Decorations (Post # 25329717)


Post has been editedDimar - 08.11.15, 14:09
Reason for editing: *



Rep: (4404)
Curtain transparency on 4.1.2


Look at PhoneStatusBar.smali like this
Code
invoke-direct {v11, v12}, Lcom / android / systemui / statusbar / phone / PhoneStatusBar $ FastColorDrawable; -><init>(I) v

invoke-virtual {v10, v11}, Landroid / view / View; ->setBackground (Landroid / graphics / drawable / Drawable;) V
That is, the first line should bePhoneStatusBar $ FastColorDrawable
and in the nextsetBackground
Delete the line wheresetBackground
I have this code met 2 times in the file

Post has been editedDimar - 08.11.15, 09:06
Reason for editing: *



Rep: (182)
How to add items: Reboot and Recovery in Power-menu.
The device on which everything was tested: Fly IQ245 Wizard Plus Android: 2.3.6


In general, sat about 2 hours above "Advanced Power Menu "I was looking for any instructions and nothing helped.
Instruction
1) File editing: framework-res.apk
The first : Disassemble APKTOOL flamework-res.apk.
The second : We go along the way "framework-res.apk \ values ​​\ strings.xml" Add this to the end of string.xml:
<string name = "reboot">Reboot</ string>
<string name = "reboot_recovery">Recovery</ string>

Third : We go along the way: "framework-res \ values-ru \ strings.xml" Add this to the end of string.xml:
<string name = "reboot">Reboot</ string>
<string name = "reboot_recovery">Recovery</ string>

The words "Reboot" and "Recovery" can be changed as you wish, since this will be displayed.
Fourth : We go along the way "framework-res \ res \ values ​​\ ids.xml" Add this to the end of ids.xml:
<item type = "id" name = "reboot">false</ item>
<item type = "id" name = "reboot_recovery">false</ item>

These lines will automatically write us the ID in public.xml
Insert icons called reboot.png and recovery.png
Fifth : Putting together the framework-res folder
Sixth : We pass along the way "framework-res \ dist \ apk \ framework-res.apk" Opens with the archiver, for example: "WinRAR" and from the old framework-res.apk we insert META-INF, AndroidManifest.xml without compression into apk, which is in the folder "framework-res \ dist \ apk"
Seventh : We pull out the new framework-res.apk on the desktop, and delete the framework-res, framework-res.apk from the "ApkTool" folder.
Eighth : We parse the new apk which is on the desktop.
Ninth : Go to the "framework-res \ res \ values ​​\ public.xml" and look for the lines:
<public type = "string" name = "reboot"
<public type = "string" name = "reboot_recovery"

And we are looking for more codes:
<public type = "drawable" name = "reboot"
<public type = "drawable" name = "recovery"

And do not close public.xml

2) Editing android.policy.jar
The first : Download this archive here: Attached filePOWER_MENU.zip (2.24 MB)

The second : Create for example on drive C a folder, better than Latin, for example Android
Third : Files that downloaded are placed in the Android folder
Fourth : Run the command line (cmd). You can through the key Win + R, enter cmd
Fifth : Go to folder
cd c: \ Android
(or another way, to your folder with files), without Latin.
Sixth : Rename the android.policy.jar file to android.policy.rar and extract the file "classes.dex"
Seventh : Insert the "classes.dex" file into the Android folder you created earlier
Eighth : We write in the command line:
java -jar baksmali.jar -o classout / classes.dex
And wait for the "classes" folder to appear.
Ninth : Open "com \ android \ internal \ policy \ impl \ GlobalActions.smali" and replace line 436 with
const / 4 v0, 0x3

on
const / 4 v0, 0x5

Tenth : Insert the following line in line 462 (original line 462 will become line 486). Do not forget to insert the identifiers of the inserted strings in the "string" and "public" !!!
const / 4 v1,0x3
new-instance v2, Lcom / android / internal / policy / impl / GlobalActions $ 7;
const v3, 0x10803e0 #id from the line:<public type = "drawable" name = "reboot"
const v4, 0x104039d #id from the line:<public type = "string" name = "reboot"
invoke-direct {v2, p0, v3, v4}, Lcom / android / internal / policy / impl / GlobalActions $ 7; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V
aput-object v2, v0, v1
const / 4 v1,0x4
new-instance v2, Lcom / android / internal / policy / impl / GlobalActions $ 8;
const v3, 0x10803e1 #id from the line:<public type = "drawable" name = "recovery"
const v4, 0x104039c #id from the line:<public type = "string" name = "reboot_recovery"
invoke-direct {v2, p0, v3, v4}, Lcom / android / internal / policy / impl / GlobalActions $ 8; -><init>(Lcom / android / internal / policy / impl / GlobalActions; II) V
aput-object v2, v0, v1

Eleventh : Rename second copy to "GlobalActions $ 8.smali". Open the renamed copy, look for all references to "GlobalActions $ 3.smali" and rename them to "GlobalActions $ 8.smali". Change the line:
const / 4 v1, 0x1
invoke-static {v0, v1}, Lcom / android / internal / app / ShutdownThread; ->shutdown (Landroid / content / Context; Z) V

on
const / 4 v1, 0x1
const-string v2, "recovery"
invoke-static {v0, v2, v1}, Lcom / android / internal / app / ShutdownThread; ->reboot (Landroid / content / Context; Ljava / lang / String; Z) V

Twelfth : We write in the command line:
java -Xmx512M -jar smali.jar classout / -o new-classes.dex

After that, a new file will appear in our folder.new-classes.dex , rename it to classes.dex, open android.policy.rar , replace the old file with the old classex.dex [Uncompressed!], rename android.policy.rar at android.policy.jar and that's it!

This is just to listen
It is possible to build framework-res.apk in the old fashioned way, build / apk, it's just easier for me.

The instruction author:Themployday
Screenshot
Attached Image


Post has been editedDimar - 08.11.15, 16:50
Reason for editing: *



Rep: (4404)
How to understand smali
Memo for codes (English)
Here I want to tell everything that I know about smali-files
So, let's begin.
Registers
In smali everything is tied to registers (v0, v1, v2, etc.)
const v0,0x140
Registers are variables that are used and accessible only within a method.

Fields
There are still fields.
.field mIconSize: I
Fields are also variables, but unlike registers, they are available in any method of the current class,
that is, the field value can be set in one method and read this value in another. However, the method cannot directly work with a field, but you can put its value in the register.

Method
Methods can return a value or return nothing.
The method consists of an ad.
.method public showClock (Z) V

declarations of the number of registers involved in the method
.locals 3

method parameter descriptions
.parameter "show"

section for setting constants (registers not changing throughout the whole method)
.prologue

method itself and return the result
return v0

or if the method does not return a result
return-void

Also, the methods use conditional
if-eqz v0,: cond_0

and unconditional transitions
goto: goto_0

Consider the ShowClock method from PhoneStatusBar.smali
Code
.method public showClock (Z) V # method declaration
.locals 3 # Number of registers
.parameter "show" # Parameter description

.prologue # Constants section (not used here)
.line 1184 # Lines of this type (.line ...) are debug information and do not affect anything
iget-object v1, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; -> mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; # Get the value of the mStatusBarView field (there is a link to the statusbar container) and enter it into the v1 register

const v2, 0x7f0e002b # Enter 7f0e002b (this is the id of the clock element) in the v2 register

invoke-virtual {v1, v2}, Lcom / android / systemui / statusbar / phone / PhoneStatBarView; -> findViewById (I) Landroid / view / View; # Run the findViewById method with the parameters in the registers v1 and v2, it will return a reference to the statusbar item (clock)

move-result-object v0 # Write the result of the method (reference to the clock) to the register v0

.line 1185
.local v0, clock: Landroid / view / View; # This is also debug info.
if-eqz v0,: cond_0 # This is a conditional transition, if the value in the register v0 is zero (if equivalent zero), the transition to the label: cond_0 (here if the element is not found)

.line 1186
if-eqz p1,: cond_1 # This is a conditional transition, if in the first parameter (p1) the value is zero, the transition to the label: cond_1

const / 4 v1, 0x0 # Write 0 to register v1 (for display)

: goto_0 # Unconditional jump label
invoke-virtual {v0, v1}, Landroid / view / View; -> setVisibility (I) V # Set the visibility (v1) of the object (v0), 0 matches visible (visible), 8 matches gone (hidden)

.line 1188
: cond_0 # Conditional Jump Label
return-void # end of method

.line 1186
: cond_1 # conditional label
const / 16 v1, 0x8 # Enter 8 into register v1 (to hide)

goto: goto_0 # Unconditional jump to goto_0 label
.end method
Consider how the method works.
If the method is called with the parameterfalse - showClock (false), then
code execution, reaching the lineif-eqz p1,: cond_1 will go to the label : cond_1 (since false is equivalent to 0)
further in the register v1 will be entered 8 (const / 16 v1, 0x8), and then on an unconditional transitiongoto: goto_0 will return to the main stream of code execution, bypassing the line in which 0 (const / 4 v1, 0x0) is entered into the v1 register,
then the element will be hidden (since register v1 contains 8) and the execution of the code will end on the linereturn-void
If the same method is called with the parametertrue - showClock (true), then
code execution, reaching the lineif-eqz p1,: cond_1 will not go to the label : cond_1 (since true is not equivalent to 0)
then the register v1 will be entered 0 (const / 4 v1, 0x0), and then the element will be shown (since register v1 contains 0)
and the code execution will end on linereturn-void

I will replenish as much as

Post has been editedsk0t - 29.11.13, 13:59
Reason for editing: + from DodgeWooW



Rep: (53)
Change the color of windows and text in the reboot menu

how to change the text color in the add-ons, the "Widgets" window, change the color from black to white on the buttons, change the text color in the title, change the color of the small text in the "Phone Settings" menu

Instruction
Change the text color in the add.
1
(part 1)
Parse framework-res.apk and go to the res / color folder and open "primary_text_light_disable_only"
There will be about such lines
<? xml version = "1.0" encoding = "utf-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android">
<item android: state_enabled = "false" android: color = "@ color / bright_foreground_light_disabled" />
<item android: color = "@ color / bright_foreground_light" />
</ selector>

and all the wordslightchange todark
should go something like this
<? xml version = "1.0" encoding = "utf-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android">
<item android: state_enabled = "false" android: color = "@ color / bright_foreground_dark_disabled" />
<item android: color = "@ color / bright_foreground_dark" />
</ selector>

save, collect.
As a result, we changed the black color to white.
(part 2)
Change the font color in the add-ons to your
parse framework-res.apk, open the res / color / primary_text_light_disable_only.xml folder
we see about such lines
<? xml version = "1.0" encoding = "utf-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android">
<item android: state_enabled = "false" android: color = "@ color / bright_foreground_light_disabled" />
<item android: color = "@ color / bright_foreground_light" />
</ selector>

and copy "bright_foreground_light_disabled"
go back to the res folder and open the values ​​folder
open colors.xml in it and paste the text that you copied "bright_foreground_light_disabled" into the search
I found this line
<color name = "bright_foreground_light_disabled">#80000000</ color>

and then change to any color
>#80000000<

save, collect.


Change the font color in the "Widgets" window, action alerts and so on.
2
change the font color in the "Widgets" window, action alerts, and so on.
disassemble framework-res.apk
go to the res / values ​​folder and open the text document styles.xml and search for strings
<style name = "TextAppearance.Large.Inverse" parent = "@ style / TextAppearance.Large">
<item name = "textColor">? textColorPrimaryInverse</ item>
<item name = "textColorHint">? textColorHintInverse</ item>

Where"textColor">? textColorPrimaryInverse) text color (it is Black by default) change it to white
in line
<item name = "textColor">? textColorPrimaryInverse</ item>

"textColor">? textColorPrimaryInversechange to"textColor">? textColorPrimary
save, collect.


Change the text color on the buttons from black to white
3
change the color of the text on the buttons from black to white
disassemble framework-res.apk
and go to the res / values ​​folder and open the text document styles.xml
there we find the string
<style name = "Widget.Button" parent = "@ style / Widget">

and under it through one line we find the line
<item name = "textColor">@ color / primary_text_light</ item>

and changeprimary_text_lightonprimary_text_dark
changed just one wordlightondark
save, collect and in the end we left white text on the buttons

Change header color
4
change header color
disassemble framework-res.apk
go to the res / layout folder there we find a text document alert_dialog.xml
open it
find the line
<com.android.internal.widget.DialogTitle android: ellipsize = "end" android: id = "@ id / alertTitle" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: singleLine = "true" style = " ? textAppearanceLarge "/>

afterandroid: id = "@ id / alertTitle"we insertandroid: textSize = "17.0sp" android: textstyle = "normal" android: textColor = "# ffffffff"and remove at the end of the linestyle = "? textAppearanceLarge"
should log in like this
<com.android.internal.widget.DialogTitle android: ellipsize = "end" android: id = "@ id / alertTitle" android: textSize = "17.0sp" android: textstyle = "normal" android: textColor = "# ff00A3F8" android : layout_width = "fill_parent" android: layout_height = "wrap_content" android: singleLine = "true" />

changing valueandroid: textColor = "# ffffffff"for the color you need
save, collect

replacing the color of small text in the "Phone Settings" menu
5(part 1)
replacing the color of small text in the "Phone Settings" menu
parse the framework and go to the res / color folder and open the text document secondary_text_light_nodisable
I have it looks like this
<? xml version = "1.0" encoding = "utf-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android">
<item android: state_selected = "true" android: color = "@ color / dim_foreground_light_inverse" />
<item android: color = "@ color / dim_foreground_light" />
</ selector>

if we want to change it to white, we also write instead of the wordlightworddark
should go like this
<? xml version = "1.0" encoding = "utf-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android">
<item android: state_selected = "true" android: color = "@ color / dim_foreground_dark_inverse" />
<item android: color = "@ color / dim_foreground_dark" />
</ selector>

save, collect.
(part 2)
parse the framework and go to the res / color folder and open the text document secondary_text_light_nodisable
I have it looks like this
<? xml version = "1.0" encoding = "utf-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android">
<item android: state_selected = "true" android: color = "@ color / dim_foreground_light_inverse" />
<item android: color = "@ color / dim_foreground_light" />
</ selector>

we copy
dim_foreground_light_inverse

go back to the res folder and go to the values ​​folder and open the text document colors.xml there and find the copied text there
dim_foreground_light_inverse

I found this line
<color name = "dim_foreground_light_inverse">#ffbebebebe</ color>

and
>#ffbebebebe<
change to your text
save, collect.

Screenshots
Attached ImageAttached Image
Theme is based onandroid 2.3in styleICS
Who is interested in how to change the background as on the screenshots, download the archive, disassemble the framework-res and throw the files with the replacement and collect.

Attached files

Attached fileres.zip(13.98 KB)


Post has been editedFashionon - 20.02.16, 21:46



Rep: (1049)
Layouts Description


android: paddingLeft = "6.0dip" left margin
android: paddingRight = "6.0dip" same but right
android: paddingTop = "2.0dip" on top
android: paddingBottom = "1.0dip" below

android: layout_width = "fill_parent" width of an item or container
fill_parent completely fills the container
wrap_content - across content width
android: layout_height = "fill_parent" has the same parameters as the width (above)

You can also specify the parameter in quotes
dp - (Density-independent Pixels) - an abstract unit, based on screen density. On devices with 160dpi screen: 1dp = 1px. This relationship will change on the screen with different density, not necessarily in direct proportion. This ensures the consistency of the interface elements of size on different devices. sp - (Scale-independent Pixels) - a unit of measurement similar to dp, but it is also taking into account the scale custom font settings. px - pixels. It is not recommended to use this unit as well as a representation of the element may vary depending on the device. So if we set the width 100px element, on devices with 320x240 screen it is almost split-screen, and on devices 800x480 - less than a quarter of the screen. mm - millimeters in - inches pt - (points) 1/72 inch


android: gravity = "center_vertical" element orientation
center_vertical vertically centered
android: gravity = "bottom | center" regarding the parameter abovedown | centered

android: layout_marginLeft = "8.0dip" offset left
android: layout_marginRight = "8.0dip" shift right
android: layout_marginTop = "8.0dip" offset up
android: layout_marginBottom = "8.0dip" offset down
More detail and clearhere


Post has been editedDimar - 17.11.15, 21:25



Rep: (691)
Highlighting the bottom of the curtain when it is closed


Instruction
The development is not mine, attached from another site link attachedBottom backlight illumination
not a lot of fixes.

will work withSystemUI.apk, we sort it out accordingly.
In the drawable-hdpi or drawable-mdpi folder (depending on your screen) we find and delete the picture status_bar_close_on.9.png
Create two pictures calling themstatus_bar_close_on1.pngandstatus_bar_close_on2.pngAs large as the one that was removed. and put in the appropriate folder (drawable-hdpi or drawable-mdpi).
the point is that when you click on the lower part of the status of the bar, there is a change in the picture.
Now we create a background - this will be a file for switching pictures and we will call itstatus_bar_close_bg.xmland put it in a folder in a place with pictures (drawable-hdpi or drawable-mdpi).
status_bar_close_bg
<? xml version = "1.0" encoding = "utf-8"?>
<selector xmlns: android = "http://schemas.android.com/apk/res/android ">
<item android: state_pressed = "true" android: drawable = "@ drawable / status_bar_close_on2" />
<item android: drawable = "@ drawable / status_bar_close_on1" />
</ selector>

Now rule the filestatus_bar_tracking.xml
are looking for
<com.android.systemui.statusbar.phone.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.phone.CloseDragHandle>

and change to
change to:
<com.android.systemui.statusbar.phone.CloseDragHandle android: orientation = "vertical" android: id = "@ id / close" android: layout_width = "fill_parent" android: layout_height = "wrap_content">
<ImageView android: clickable = "true" android: layout_gravity = "bottom" android: layout_width = "fill_parent" android: layout_height = "wrap_content"android: background = "@ drawable / status_bar_close_bg"android: scaleType = "fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>

Pay attention to the line: com.android.systemui.statusbar.phone.CloseDragHandleyou may have a different path, but the meaning is the same.
We collect SystemUI.apk and install it from under the mod.
Result (screenshots)
screenshots
openAttached Imageat closingAttached Image

there is no such thing on the site can someone come in handy.
if something is wrong you can delete.
ready file
Attached filestatus_bar_close_bg.xml(267 bytes)


P.S
If in the SystemUI.apk application ONLY ONE FOLDERdrawable-hdpi or drawable-mdpiThe status_bar_close_on.9.png image is not necessary to delete. Let it be, if you delete something when building apktool, it will swear, because its ID is registered in public.xml. If there are two such folders, then one can be deleted.


Post has been editedDimar - 08.11.15, 16:53
Reason for editing: *



Rep: (2953)
Structure and purpose of folders and files in Android

Description
Since Android is based on Linux, this article is relevant for all Linux systems (Ubuntu, etc.).

/ - The root folder.
/ bin - folder containing executable files and links to executable files. Executable files are programs that run at system startup, as well as the most necessary programs that are accessible to all. Example: ls, mount, pwd, unzip.
/ data - a folder with data about synchronization and accounts, passwords to wifi access points and vpn settings, etc.
/ data / app - folder containing installed programs and games.
/ data / data - folder containing application data, their settings, game saves and other information.
/ data / dalvik-cache - program cache area for the Dalvik program. Dalvik is a Java virtual machine, which is the basis for the work of programs with * .apk extension. In order to make the launch of programs faster - their cache is created.
/ dev - a folder containing files of various devices, both real and virtual, as well as those devices that are not there, but which could be.
/ etc - folder containing the configuration files used when loading the operating system and in the process of various programs.
/ lib - a folder containing libraries of functions necessary for various programs and the C compiler, as well as modules (device drivers) connected to the kernel.
/ lib / modules / - a folder comprising modules (device drivers) of the core, which have the extension .ko. In this folder, the subfolders arranged that coincide with kernels (e.g., 2.6.32.9-default), which were installed in the system. That is, for each kernel version has its own set of modules. This is very important and you need to pay attention to it. Often when compiling the kernel to forget to change the version of the new boot kernel modules using the previous version and the system will not boot. The current version of the kernel can be found on command uname -r, returned version necessarily coincide with the name of one of the folders in the / lib / modules /.
/ mnt - contains folders for temporarily mounted file systems.
/ proc - a virtual folder containing all the details of the Android system, including the kernel, processes, and configuration parameters.
More details folder / proc
/ Proc - virtual file system that contains all the information about the Android system, including core processes, configuration parameters, hardware information. All files in the / proc are also virtual, and does not actually take place in the memory (so the size of the file is 0 bytes), the operating system creates them "on the fly" when a user tries to read them. Any manipulation in the folder / proc are only possible with root privileges. / Proc file system can be viewed as an interface to the internal data structures in the Android kernel. This interface allows you to obtain information about the system and change some parameters to the kernel at the time of the Android operating.

Many programs collect information from files in / proc, format them and output the result to the user (top, ps and others). There is a special folder / proc / sys in the / proc file system. It allows you to view kernel parameters and change these parameters on the fly without rebooting the system.

The virtual system / proc files are not intended to be viewed with a regular text editor, as this may violate the integrity of the kernel data. To do this, use the echo and cat commands.
/ proc / nnnn - virtual folders with numbers correspond to each process running in the system.
/ proc / net is a virtual folder containing information about networks.
/ proc / net / dev is a virtual file containing information about each network device.
/ proc / sys is a virtual folder containing kernel configuration parameters.
/ proc / meminfo is a virtual file containing memory information (to view this information, type the following command: cat / proc / meminfo).
/ proc / version - a virtual file containing information about the Android kernel version (cat / proc / version command).
/ proc / cmdline is a virtual file containing information about the parameters passed to the kernel during the boot (command cat / proc / cmdline).
/ proc / cpuinfo is a virtual file containing information about the processor.
/ proc / loadavg - a virtual file containing information about the average processor load; its information includes: CPU utilization in the last minute, in the last 5 minutes, and in the last 10 minutes, as well as the number of current processes.
/ proc / stat is a virtual file containing information about statistics related to the previous system load.
/ proc / uptime is a virtual file containing only two numbers: how many seconds the machine has been working and how many seconds it has been idle.
/ proc / devices - a virtual file containing information about all configured and loaded character and block devices at the moment.
/ proc / ioports is a virtual file containing information about input / output ports (I / O communications) used by devices.
/ proc / filesystems is a virtual file containing information about all file systems that are supported by the kernel.
/ proc / mounts is a virtual file containing information about all mount points used in the device.
/ proc / partitions is a virtual file containing information about all sections.
/ proc / swaps is a virtual file containing information about all swap spaces (swap space).

/ sbin - folder containing executable files of programs that are designed to manage the system itself. Example: ifconfig, man, mdev, vconfig.
/ sdcard - a folder containing files and folders on the SD memory card (if installed).
/ sys folder containing the actual system configuration at the current time. / sys is very closely related to udev if you connect (disconnect) devices, the contents of the / sys directory change dynamically. You can look at an example. Run the ls / sys / bus / usb / devices / command to view the current usb devices in the system. Now connect the flash drive and execute the command ls / sys / bus / usb / devices / again. You will see that now there are more devices.
/ system - a folder containing system files and folders with data and everything necessary for the operation of the Android OS.
/ system / app - a folder containing system applications (SMS, phone, calendar, settings, etc.), as well as applications installed by the device manufacturer (branded widgets, live wallpapers, etc.).
/ system / fonts - folder with system fonts.
/ system / media - a folder containing standard melodies of calls, notifications, alarms and interface sounds, as well as boot animation (bootanimation).
/system/build.prop - a file containing a huge number of settings, such as the density of the screen, the delay time of the proximity sensor, the wifi control, the name and manufacturer of the device, and many other parameters.


Post has been editedsasha9182 - 27.02.16, 14:47
Reason for editing: Removed under spoiler



Rep: (574)
The name of the operator in the status bar CyanogenMod 10.1-10.2
(also suitable for version 10.1)

The instruction is not mine, I decided to share the long-awaited find from the spaces of the XDA forumA source:The name of the operator in the status bar CyanogenMod

Instruction
1) We decompile the SystemUI.apk file
2) Follow the path SystemUI.apk \ res \ layout \ status_bar.xml
3) Add after the lines

<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android: id = "@ id / status_bar" android: background = "@ drawable / status_bar_background" android: focusable = "true" android: fitsSystemWindows = "true" android: descendantFocusability = " afterDescendants "android: layout_width =" fill_parent "android: layout_height =" fill_parent "
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: systemui = "http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android: id = "@ id / notification_lights_out" android: paddingLeft = "6.0dip" 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 "/>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / status_bar_contents" android: paddingLeft = "6.0dip" android: paddingRight = "6.0dip" android: layout_width = "fill_parent" android: layout_height = "fill_parent">
<LinearLayout android: orientation = "horizontal" android: id = "@ id / notification_icon_area" android: layout_width = "0.0dip" android: layout_height = "fill_parent" android: layout_weight = "1.0">

The following code:
<com.android.systemui.statusbar.phone.CarrierLabel android: textAppearance = "@ style / TextAppearance.StatusBar.Clock" android: gravity = "left | center" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: singleLine = "true" />

4) Save the changes.
5) Download the archive Carrier_Label.zip and add files from it in the following way:SystemUI \ smali \ com \ android \ systemui \ statusbar \ phone Attached fileCarrier_Labe.zip (3k)

6) We collect apk file and replace the original files with modified ones.

SystemUI.apk \ res \ layout \ status_bar.xml
SystemUI.apk \ classex.dex
(smali folder is inside this file)

Result
Attached Image


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



Rep: (621)
Replacing BootAnimation via framework-res.apk with LG


Requires minimal knowledge of Photoshop (Windows), GIMP (Linux).
Instruction
We decompile framework-res.apk and immediately compile, in the unpacked frame there will be a folder assets / images there will be a folder in which two files will be the firstandroid-logo-mask.png second gradient android-logo-shine.png .
Attached ImageAttached Image

Change to your inscription "Hello", for example. Change the color of the gradient, if desired. Open the source framework-res.apk in WinRar and drag the two files into the folderassets / images without compression.
Throw RootExplorer into the System folder on the phone and change permissions
permissions
Attached Image
Transfer to the framework folder and reboot the phone. Everything.
My files:
Attached ImageAttached Image

Hastily made Shin could do better: D
When I'm onOXIGEN "sat", I must admitcoolfirmware, I was terribly infuriated by the acid-green color of the boot.
Yes, they asked a question 100,500 times — he asked him half a year ago, until he dug, he didn't. I read 100,500 times the question and there is not a single answer, the locals sent the bootanimation topic.Not interested .
I almost forgot in my ANDROID caption I erased the letter N and put a hyphen, it turned out A-DROID.
Result
Attached Image


Post has been editedDimar - 12.11.15, 22:09
Reason for editing: *



Rep: (621)
Remove the standard switch panel in the curtain
Collected links from different topics in one post to speed up the search.


Huawei U8860 Honor
author: Demonis go over

LG
Optimus one
SystemUI.apk. res / layout / status_bar_expanded .xml
replace the parameter in the line android: layout_height with "0.0dip "
<LinearLayout android: gravity = "center" android: orientation = "horizontal" android: id = "@ id / quick_setting" android: background = "# ff000000" android: layout_width = "fill_parent" android:layout_height = "0.0dip "[/ b]>

Optimus black
author:asot go over

Optimus Link Dual P698
author:wmk go over

Prestigio MultiPhone 4000 DUO
author: Dimar
SystemUI / res / layout /statusbar_notify .xml
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.StatusBarNotifyView android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "wrap_content"
xmlns: android = "http://schemas.android.com/apk/res/android ">
<LinearLayout android: orientation = "horizontal" android: background = "# 00000000" android: layout_width = "fill_parent" android: layout_height = "0.0dip ">
<TextView android: textSize = "0.0sp" android: gravity = "center_horizontal" android: id = "@ id / wifi" android: background = "@ drawable / status_bar_icon_bk3" android: clickable = "true" android: layout_width = "80.0dip "android: layout_height =" wrap_content "android: singleLine =" true "android: drawableTop =" @ drawable / status_bar_wifi_close "android: layout_weight =" 1.0 "/>
</ LinearLayout>
<LinearLayout android: orientation = "horizontal" android: background = "# 00000000" android: layout_width = "fill_parent" android: layout_height = "0.0dip ">
<TextView android: textSize = "0.0sp" android: textColor = "# ffffffff" android: gravity = "center_horizontal" android: id = "@ id / uim_sim_select" android: background = "@ drawable / status_bar_icon_bk3" android: clickable = "true "android: layout_width =" 80.0dip "android: layout_height =" wrap_content "android: singleLine =" true "android: drawableTop =" @ drawable / status_bar_sim_select "android: layout_weight =" 1.0 "/>

Runbo x5
author: nastor go over

Samsung galaxy ace
author: misha1996 go over

Sony Xperia SL
author: sc0t SystemUI / smali / com / android / systemui / statusbar / phone / PhoneStatusBar.smali
Delete rows
const v6,0x7f03001c
invoke-static {v0, v6, v11}, Landroid / view / View; ->inflate (Landroid / content / Context; ILandroid / view / ViewGroup;) Landroid / view / View;
move-result-object v5
check-cast v5, Lcom / lidroid / systemui / quickpanel / PowerWidget;
invoke-virtual {v5}, Lcom / lidroid / systemui / quickpanel / PowerWidget; ->setupWidget () V
iget-object v6, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mExpandedView: Lcom / android / systemui / statusbar / phone / ExpandedView;
invoke-virtual {v6, v5, v11}, Lcom / android / systemui / statusbar / phone / ExpandedView; ->addView (Landroid / view / View; I) V
a source

teXet TM-3204R
author: Dimar Go to

The method is suitable for almost all devices
author:sc0t editing in StatusBarService.smali go over


Post has been editedDimar - 27.02.16, 14:57
Reason for editing: Corrected spoiler headers


Full version    

Help     rules

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