Skip to content

Instantly share code, notes, and snippets.

View manojrege's full-sized avatar

Manoj R. Rege manojrege

  • EMnify GmbH
  • Berlin, DE
View GitHub Profile
@manojrege
manojrege / 50-cloud-init.yml
Created December 28, 2019 12:48
Netplan configuration to assign multiple IPs to EC2 instance using DHCP
network:
version: 2
ethernets:
eth0:
dhcp4: true
match:
macaddress: <MAC_ADDRESS_1>
set-name: eth0
eth1:
dhcp4: true

Devices

List all connected devices - adb devices

Select a particular device - adb -s <device name> <command>

Shell

Android shell - adb shell

@manojrege
manojrege / .gitignore
Created October 7, 2017 06:48
.gitignore for LaTeX
.DS_Store
*.aux
*.bbl
*.blg
*.idx
*.lof
*.log
*.lot
*.md
*.out
@manojrege
manojrege / Ping-in-Android-Emulator.md
Last active March 28, 2023 23:36
Enable Ping and ICMP on Android Emulator

For those of you who know, ping utility does not work on Android Emulator. This is because emulator has no ICMP support on QEMU with user mode networking. QEMU user networking mode details can be found here. The solution to get ping working on emulator is by adding another virtual network interface on the emulator.

We start with installing uml-utilities package on the host machine.

apt-get install uml-utilities

This would enable us to create a virtual interface on the underlying host. A virtual interface on the host can be created using following command

tunctl -u $(USER_NAME) -t tap0

@manojrege
manojrege / prep-env-buildIperf.sh
Last active March 24, 2023 18:08
Setup build environment for cross-compiling IPerf for Android
#!/bin/sh
# Host system
export HOST_SYS=x86_64-linux-gnu
# This is a symlink pointing to the real Android NDK r10e
export NDK=/home/ubuntu/android-ndk
# Use clang for the build
export GCC_VER=clang