Remove operator boot animation i.e. plus in Android – Samsung device

First of all You should have root on device, second be able to change your partition on android device to status as: writeable (posted few posts ago what is the command for it).

I assume all is set. Now go in adb shell as a root to : /system/media/

When You call to list files, You will get two interesting files:

-rw------- root     root        69056 2016-12-26 01:42 bootsamsung.qmg
-rw-r--r-- root     root        69056 2016-06-02 17:23 bootsamsungloop.qmg

First is the first static or animating animation, second is the loop. Usually it is like:

-show anoying operator animation
-show after that samsung animation

What to do is to backup first file, and copy the second one but renaming it like the backuped file, which is here “bootsamsung”.

As a result there will be two files as above, but both will do the same animation.

Notepad++ with regex, re-using match variables

Here is an simple example how to use regex in notepad++ with reusing selected match variables.

For example we have special code for simulating gcm notifications. We would like to see it in pretty style.
To achieve this we must to move all elements with minus to the new lines. How to do it? Here is the solution.

We have this string:
adb shell am broadcast -a -c -n --es "aaa" "123" --es "mmm" "bla bla bla" --es "sss" "321" --es "from" "111" --es "type" "yesterday" --es "collapse_key" "do_not_collapse"

By using bellow command in notepad++:

Searching text:


Replace with:


We get the quite pretty result:

adb shell am broadcast
--es "aaa" "123"
--es "mmm" "bla bla bla"
--es "sss" "321"
--es "from" "111"
--es "type" "yesterday"
--es "collapse_key" "do_not_collapse"

Change time in genymotion emulator – simple java app

I made app in executable jar java file for setting time in genymotion emulator.

Here is simple java code and compiled app for setting time in genymotion app. Below code I showed how the app looks like and also added ready jar app to download.


public class SetTimeInGenyMotion {
private JTextField textField1;
private JButton getTimeInProperButton;
private JButton setTimeInProperButton;
private JButton getTimeAndSetButton;
private JPanel panel1;
public static final String FORMAT = "YYYYMMDD.HHmmss";

public static void main(String[] args) {
new SetTimeInGenyMotion().doStuff();

private void doStuff() {

getTimeInProperButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

setTimeInProperButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String time = textField1.getText();

getTimeAndSetButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String time = getTime();


private void showWindow() {
JFrame frame = new JFrame("SetTimeInGenyMotion");
frame.setMinimumSize(new Dimension(680, 0));

private void setTime(String time) {
try {
String command = "adb shell date -s " + time;

Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(command);
BufferedReader br = new BufferedReader(new InputStreamReader(pr.getErrorStream(), "UTF-8"));
String l = "";

while ((l = br.readLine()) != null) {

} catch (IOException e1) {

private String getTime() {
//adb shell date -s YYYYMMDD.HHmmss

String format = "YYYYMMdd.HHmmss";
Calendar instance = Calendar.getInstance();
String time = getDate(instance.getTimeInMillis(), format);
return time;

public static String getDate(long milliSeconds, String dateFormat) {
// Create a DateFormatter object for displaying date in specified format.
SimpleDateFormat formatter = new SimpleDateFormat(dateFormat);
// Create a calendar object that will convert the date and time value in milliseconds to date.
Calendar calendar = Calendar.getInstance();
return formatter.format(calendar.getTime());

Zrzut ekranu 2015-06-03 11.58.59


Working example – changing drawable background in runtime, dynamically

Here is a short example code how to do it:
I’ve created xml file shape.xml and one method for flexible changing color of shape.


<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="" >
<solid android:color="@android:color/holo_blue_bright" />
<corners android:radius="30dp" />
android:width="15dp" />

And here is a method for flexible changing color:

Continue reading “Working example – changing drawable background in runtime, dynamically”

Smaller ratingboard with clickable area

During my one day project for a client I had to use (I hate it) android’s ratingbar component. One of the pointed task in project was to use a bit smaller object with 5 stars than it is as default. What is more it had to be place it in every item in listview.
So what’s the problem? “All you have to do is to use param


” – I thought. But it has not been the final solution yet..

Continue reading “Smaller ratingboard with clickable area”