Friday, April 29, 2016

Linux - Check if Android Studio emulator using KVM or not

$ lsof -e /run/user/1000/gvfs | grep /dev/kvm
qemu-syst 14818                 kripx   26u      CHR             10,232        0t0        564 /dev/kvm
QXcbEvent 14818 14842           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14868           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14869           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14870           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14871           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14872           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14873           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14874           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14875           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
threaded- 14818 14876           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14877           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14878           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14898           kripx   26u      CHR             10,232        0t0        564 /dev/kvm
MainLoopT 14818 14899           kripx   26u      CHR             10,232        0t0        564 /dev/kvm

Wednesday, April 20, 2016

Linux - Random MAC address at boot (systemd)

1. Determine you wireless adapter name:
$ iwconfig | grep 802.11bg

2. Create and edit /etc/systemd/system/macspoof@.service file for a new startup service as superuser / root
[Unit]
Description=macchanger on %I
Wants=network-pre.target
Before=network-pre.target
After=sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/usr/bin/macchanger -r %I
Type=oneshot

[Install]
WantedBy=multi-user.target

3. Enable this script run each time you linux is booted
$ sudo systemctl enable macspoof@wlp2s0.service
* Note : Please replace "wlp2s0" with you adapter card name on step 1

4. Now reboot you computer and after booted, check you current MAC address:
$ macchanger --show wlp2s0
Current MAC:   ea:f7:07:3f:fa:b8 (unknown)
Permanent MAC: 25:7d:9f:uc:k7:c0 (Intel Corporate)

Linux - Installing GitKraken from tar.gz files

This is simple tutorial how to install GitKraken version 1.1.0 for my laptop which using Gnu/Linux Fedora 23 x86_64


$ wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
$ tar -xvzf gitkraken-amd64.tar.gz 
$ sudo rsync -va --delete-after GitKraken/ /opt/GitKraken/

Sunday, April 3, 2016

Gradle.properties configuration for UTHM internal network

Arghh..my bad, I spend 3 hours figure why my gradle unable to fetch dependencies from Maven / JCentral repository for my Android project. To keep it short (Yes! I'm so busy) I put my gradle.properties configuration file here. It will pass proxy exception for both JVM and Gradle then...boom, now gradle able to fetch and sync dependency file.

Notes : I also put gradle for parallel compilation, allowing demon daemon (for faster build process) and increase JVM max heap size..