Skip to content

Instantly share code, notes, and snippets.

netsh http add urlacl url=http://+:80/ sddl="D:(A;;GX;;;AU)"
netsh advfirewall firewall add rule name="StreamingServer" dir=in action=allow protocol=TCP localport=8080
netsh advfirewall firewall add rule name="WebServer" dir=in action=allow protocol=TCP localport=80
@ljubisa987
ljubisa987 / SQLiteDebugADB
Created February 15, 2018 11:37 — forked from davetrux/SQLiteDebugADB
Verbose Logging of SQLite statements in Android
adb shell setprop log.tag.SQLiteLog V
adb shell setprop log.tag.SQLiteStatements V
adb shell stop
adb shell start
@ljubisa987
ljubisa987 / SQLiteDebugADB
Created February 15, 2018 11:37 — forked from davetrux/SQLiteDebugADB
Verbose Logging of SQLite statements in Android
adb shell setprop log.tag.SQLiteLog V
adb shell setprop log.tag.SQLiteStatements V
adb shell stop
adb shell start
@ljubisa987
ljubisa987 / adb_rotate.sh
Created October 30, 2016 22:22 — forked from alekswn/adb_rotate.sh
Android: screen rotation from ADB
#!/bin/sh
if [ -z $1 ]
then
echo "Usage: $0 { p | l | a }. p - portrait, l - landscape, a - auto"
elif [[ $1 == a* ]]
then
echo "Turning on automatic rotation"
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:1
else
@ljubisa987
ljubisa987 / gist:929642901340b0d6e4235c81d1eebd3c
Created October 30, 2016 22:17
Pulling SQLite database off Android using ADB without root
# Step 1:
# (may need -s <device_id> if multiple devices connected
adb backup -f /tmp/data.ab -noapk com.package
# Step 2:
# When prompted, use the phone to give permission for the backup, and **leave the password blank**
# Step 3:
dd if=/tmp/data.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf -
@ljubisa987
ljubisa987 / gist:e33cd5597da07172c55d
Last active July 26, 2021 18:02
TextInputLayout temporary workaround for hint not showing on initial load for SDK > 20
import android.content.Context;
import android.graphics.Canvas;
import android.support.design.widget.TextInputLayout;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
public class CustomTextInputLayout extends TextInputLayout {