IPC in Android

Android and Linux systems rely on various communication methods for processes and threads to interact. Linux provides several IPC (Inter-Process Communication) mechanisms such as pipes, message queues, shared memory, sockets, semaphores, and signals. Android adds its own Binder IPC mechanism, which is widely used for communication between system components and apps. The Zygote process uses sockets for communication, while higher-level services (System Server, Media Server, Apps) primarily use Binder. For communication within the same process, especially between threads, Android uses the Handler message mechanism. ...

June 17, 2025 · 2 min

ssh audit

Overview ssh-audit is a tool for ssh server & client configuration auditing(banner, key exchange, encryption, mac, compression, compatibility, security, etc). Installation On Arch pacman -S ssh-audit pip pip3 install ssh-audit Generic - Download and extract tarball from release Usage ./ssh-audit.py 192.168.101.201 References https://github.com/jtesta/ssh-audit https://www.ssh-audit.com/hardening_guides.html

May 20, 2025 · 1 min

NFS

Install nfs-kernel-server mkdir ~/Public Export the rootfs folder Add the following entry to /etc/exports: /home/rishav/Public *(rw,async,nohide,insecure,no_root_squash,no_subtree_check) Update the NFS server’s exports sudo exportfs -arv Make the NFS server serve over UDP Add the following to /etc/nfs.conf [nfsd] udp=y vers2=y Restart the NFS server systemctl restart nfs-server.service

May 15, 2025 · 1 min

Format Comparison

Compression Format Comparison Format Compression Ratio Speed (Compression/ Decompression) Encryption Speciality/Uniqueness Open Source/ License gz (.gz) Moderate Fast / Fast No native (use gpg) Widely supported and fast for most general uses. Yes GNU GPL bzip2 (.bz2) Better than gzip Slow / Moderate No native (use gpg) Higher compression ratio and robust error detection. Yes BSD xz (.xz) Best Very slow / Fast No native (use gpg) Highest compression ratio; slow compression speed. Yes GNU GPL zip (.zip) Moderate Fast / Fast Built-in encryption Commonly used with built-in encryption and wide software support. Yes Various (Info-ZIP) tar (.tar) Depends on method Fast (archive only) / Fast (archive only) No native (use gpg) Primarily used for archiving; compression depends on additional tools. Yes GNU GPL 7z (.7z) Excellent Moderate / Slow at high settings AES-256 encryption Excellent compression with advanced encryption options. Yes LGPL rar (.rar) Good Moderate / Moderate AES-256 encryption Includes error recovery and strong encryption; proprietary format. No Proprietary lzma (.lzma) Very high Very slow / Moderate No native (use gpg) High compression ratio with reliable decompression; requires separate decompressor. Yes GNU GPL Key Points gz (.gz): Well-rounded for speed and compatibility, commonly used for general purposes. bzip2 (.bz2): Provides a higher compression ratio compared to gzip, though slower. xz (.xz): Offers the best compression ratio but at the cost of slower compression speed. zip (.zip): Convenient with built-in encryption and broad compatibility. tar (.tar): Primarily an archiving format; often used in combination with other compression methods. 7z (.7z): Excellent compression and strong encryption; requires specific software for full support. rar (.rar): Known for robust recovery features and encryption, but is proprietary. lzma (.lzma): Delivers a high compression ratio and reliable decompression, though it’s slow.

August 7, 2024 · 2 min

CU (call up another system)

Official Description The cu command is used to call up another system and act as a dial-in terminal (mostly on a serial line ie. serial monitor). It can also do simple file transfers with no error checking. cu is part of the UUCP(Unix to Unix Copy Program) source but has been split into its own package because it can be useful even if you do not do uucp. Usage Start ...

June 18, 2024 · 1 min

Man Pages

Sections Executable programs or shell commands System calls (functions provided by the kernel) Library calls (functions within program libraries) Special files (usually found in /dev) File formats and conventions, e.g. /etc/passwd Games Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7), man-pages(7) System administration commands (usually only for root) Kernel routines (Non standard) To see if any COMMAND has available sections use whatis of man -f man -f COMMAND

October 18, 2022 · 1 min

Introduction to Linux

What is Operating System ? An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. What is Kernel? The kernel is a part of operating system which has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory,[2] and facilitates interactions between hardware and software components. What is Linux? Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance. ...

July 12, 2022 · 6 min

Compile your Custom Linux Kernel

Preparation Install Dependencies sudo pacman -S base-devel xmlto kmod inetutils bc libelf git --needed Downloading source and local setup It is recommended to create a separate build directory for your kernel(s). In this example, the directory kernelbuild will be created in the home directory: mkdir ~/kernelbuild cd ~/kernelbuild Goto kernel.org and download kernel source wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.14.5.tar.xz Note: you can verify signature of the downloaded tarball if you want Extract tarball tar -xvJf linux-5.14.5.tar.xz Check ...

September 17, 2021 · 3 min

xfiles

.xinitrc The ~/.xinitrc file is a shell script read by xinit and by its front-end startx. It is mainly used to execute desktop environments, window managers and other programs when starting the X server (e.g., starting daemons and setting environment variables). .xprofiles An xprofile file, ~/.xprofile and /etc/xprofile, allows you to execute commands at the beginning of the X user session - before the window manager is started. .Xresources Xresources is a user-level configuration dotfile, typically located at ~/.Xresources. It can be used to set X resources, which are configuration parameters for X client applications. (xrdb ~/.Xresources) ...

September 14, 2021 · 1 min

Packages I use in any Linux based OS

Packages on Arch pacstrap base linux-lts linux-lts-headers base-devel btrfs btrfs-progs vim networkmanager grub efibootmgr intel-ucode Utils mtpfs : Reading and Writing from any MTP device ntfs-3g : NTFS filesystem driver and utilities gvfs-mtp : Virtual filesystem implementation for GIO (MTP backend; Android, media player) gvfs-gphoto2 : Virtual filesystem implementation for GIO (gphoto2 backend; PTP camera, MTP media player) nfs-utils : Support programs for Network File Systems tlp : Linux Advanced Power Management powertop : A tool to diagnose issues with power consumption and power management python-pip : The PyPA recommended tool for installing Python packages jre8-openjdk : OpenJDK Java 8 full runtime environment jre8-openjdk-headless : OpenJDK Java 8 headless runtime environment wget : Network utility to retrieve files from the Web gnome-keyring : Stores passwords and encryption keys Arch # Filesystem Support pacman -S mtpfs ntfs-3g gvfs-mtp gvfs-gphoto2 # Power Management pacman -S tlp powertop # Development pacman -S python-pip jre8-openjdk jre8-openjdk-headless wget gnome-keyring xorg libx11 : X11 client-side library xorg-xinit : X.Org initialisation program libxinerama : X11 Xinerama extension library libxft : FreeType-based font drawing library for X xorg-server : Xorg X server xorg-xrandr : Primitive command line interface to RandR extension xorg-xrdb : X server resource database utility xorg-xinput : Small commandline tool to configure devices xorg-xbacklight : RandR-based backlight control application xf86-video-intel : X.org Intel i810/i830/i915/945G/G965+ video drivers xclip : Command line interface to the X11 clipboard Arch pacman -S libx11 xorg-xinit libxinerama libxft xorg-server xorg-xrandr xorg-xrdb xorg-xinput xorg-xbacklight xclip pacman -S xf86-video-intel yay -S libxft-bgra-git Gentoo emerge x11-libs/libX11 x11-base/xorg-server x11-libs/libXrandr x11-libs/libXinerama x11-libs/libXft x11-apps/xinit x11-apps/xrdb x11-apps/mesa-progs x11-apps/xrandr x11-misc/unclutter x11-misc/xclip Basic picom : X compositor that may fix tearing issues unclutter : A small program for hiding the mouse cursor os-prober : Utility to detect other OSes on a set of drives man-db : A utility for reading man pages bash-completion : Programmable completion for the bash shell zsh-completions : Additional completion definitions for Zsh zip,unzip,tar,bzip2,atool,unrar : Compression utils Arch pacman -S picom unclutter os-prober man-db bash-completion zsh-completions pacman -S atool zip unzip tar bzip2 gzip lzip unrar Fonts noto-fonts : Google Noto TTF fonts noto-fonts-cjk : Google Noto CJK fonts ttf-joypixels : Emoji as a Service (formerly EmojiOne) Arch pacman -S noto-fonts ttf-joypixels ...

April 12, 2021 · 5 min