Tools Tab Menu

A Tools tab consist of Smali Color Conversion, Hex convertor, Logcat monitor (discussed in debugging post) and Clipboard manager.

We will cover each of these tool usage.

Smali Color Conversion

When you actually write an app in Studio, you know that all colors for the app theming are stored in color.xml under values folder in hex. In your code if you have referred any color from color.xml using tag R.id.white or anything in your Java file, after when you compile it all details of these are stored to R$color.smali. One example of code is given below

.class public final Lcom/vk/sdk/R$color;
.super Ljava/lang/Object;
.source "R.java"
.....
.....
# static fields
.field public static final abc_background_cache_hint_selector_material_dark:I = 0x7f050047

.field public static final abc_background_cache_hint_selector_material_light:I = 0x7f050048

.field public static final abc_input_method_navigation_guard:I = 0x7f050017

.field public static final abc_primary_text_disable_only_material_dark:I = 0x7f050049

.field public static final abc_primary_text_disable_only_material_light:I = 0x7f05004a

.field public static final abc_primary_text_material_dark:I = 0x7f05004b

.field public static final abc_primary_text_material_light:I = 0x7f05004c

.field public static final abc_search_url_text:I = 0x7f05004d

Here those colors are not in hex but in special format (actually not really). That’s why we call it smali color codes, in ADK you can use this tool to view these colors. Also you can generate them.

From here in the first box you have enter on of these color (for eg: 0x7f05004dthen click on show button to view the color in the box. And to generate one of these click on generate button, it will show a color dialog where you can choose color from gradients or use color picker to pick one.

Hex Convertor

This tool will allow you to convert string to hex and vice-versa (useful in smali editing).

The first box is where you have to enter text in hex format or string then click on respective button. If you have enter a string click on second button, if it is in hex then click on hexadecimal.

Assembly Converter

A tool which is used to get hex values for Assembly language instructions. Specially for those who uses IDA Pro often. Read here for more info.

s8

Clipboard Monitor

This is one of the useful tool. It keeps the track of your clipboard activities within the tool, if you have cut or copied something from editor window. You can see those strings in clipboard bar (Note: if you have copied text containing multiple lines, the first line will set as item text in clipboard monitor)

The use of this is you can easily save your clipboard and add those text to your file by dragging. This example will show you how

Also you can view the whole text of the clipboard item by hovering your mouse to the item.

Leave a comment

Design a site like this with WordPress.com
Get started