Skip to content

Instantly share code, notes, and snippets.

@mridang
mridang / ImageBuilder.java
Created March 19, 2016 15:10
Gasflow Notification Icon Generator
package com.mridang.dashbar;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Typeface;
import android.os.Environment;
@mridang
mridang / dhcout.smali
Created March 29, 2015 09:44
Enables HTTP debug logging to any decompiled APK
.method public static dhcout()V
.locals 2
.prologue
.line 63
const-string v0, "org.apache.http.wire"
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
move-result-object v0
@mridang
mridang / version.py
Last active August 29, 2015 14:04
Automatically increment version-number in the Android Manifest XML file.
#!/usr/bin/env python
"""
This script is used to compare the version-number and version-code in the the
manifest XML file of the Android project, with the number of the current tag of
the git branch.
The idea is that when the version-code in the XML file is 0.3, the tag of the
current branch is also at 0.3.
In the event the tag is one version behind the version-code, the script can
automatically increment the version-code and the version number.
The version-code is a decimal beginning from 0.0 with each release adding a 0.1
@mridang
mridang / barebones.sh
Last active December 28, 2015 21:09
Cleans up the useless applications from Cyanogenmod to barebone it.
adb root
adb remount
adb shell "rm -f /system/app/SoundRecorder.apk"
adb shell "rm -f /system/app/CMWallpapers.apk"
adb shell "rm -f /system/app/DSPManagerexit.apk"
adb shell "rm -f /system/app/Apollo.apk"
adb shell "rm -f /system/app/MagicSmokeWallpapers.apk"
adb shell "rm -f /system/app/VideoEditor.apk"
adb shell "rm -f /system/app/GenieWidget.apk"
adb shell "rm -f /system/app/VisualizationWallpapers.apk"