Switching to MiniFlux (RSS)
Recently I have gotten into self hosting. I thought it would be expensive and difficult to set up, but I was wrong. You can still host a lot of stuff even on small (and free) ec2 instances! So, I hosted my own password manager and RSS feed. I’ll probably make a blog about password managers next! Getting back to the topic, For the people who don’t know what RSS is, it is a protocol which basically allows you to fetch blog content and read it in your own reader. You can also use it to aggregate your own sources of information instead of an algorithm choosing it for you. There are some Pros and Cons of getting your news this way but for me I prefer the algorithm-less experience. It allows me to choose what I want and not what some corporate overload has choosen for me. Moreover, I also found some diverse and interesting topics while searching for rss feeds 😉 and I learnt about ooh.directory which allowed me to find some really cool people. ...
Make GSI RW (For Ext4)
With TWRP/OFRP adb shell lptools resize product_a 335872 # Do not change this value lptools resize system_a 5368709120 #4617089843 or 5368709120 (4.3GB or 5GB system) With Fastbootd fastboot resize-logical-partition system_a 5368709120 #(For 5GB) Reboot Recovery/Fastbootd after this Flash product_gsi e2fsck -f /dev/block/by-name/system resize2fs /dev/block/by-name/system 5G e2fsck -E unshare_blocks /dev/block/by-name-system
Create Swapfile
Swapfile and swap-partitions are rarely used now-a-days. But they still have one major use case which is hibernation. Use the following Commands to create and enable swapfile Commands sudo fallocate -l 6G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile then change fstab (/etc/fstab) so it automatically mounts your swap file on startup /swapfile none swap sw 0 0 Afterward, check if your swap file is operating properly with htop. Swap can degrade SSD performance overtime so keep that in mind. ...
Using Fingerprint for Sudo Password
Typing sudo password again and again becomes very frustrating at times. But there is a solution to this madness. You can use fingerprint for this process. This post has been inspired by krdrag0n’s tweet. For Linux Debian/Ubuntu Based Distros Run sudo pam-auth-update And use the space bar to enable Fingerprint authentication in the dialog Arch Based Distros Install fprintd and imagemagick Note: Some devices may require a different fork of libfprint.See Here Enroll fingerprint with fprint-enroll Append these lines to /etc/pam.d/sudo auth required pam_env.so auth sufficient pam_fprintd.so auth sufficient pam_unix.so try_first_pass likeauth nullok auth required pam_deny.so For Mac Add auth sufficient pam_tid.so to /etc/pam.d/sudo
Useful Adb Commands
Backup Apks Get list of installed apps adb shell pm list packages -f -3 Fetch Apks of all Installed Apps for APP in $(adb shell pm list packages -3 -f) do adb pull $( echo ${APP} | sed "s/^package://" | sed "s/base.apk=/base.apk /").apk done Fetch Apk of One App adb pull /data/app/appFolderNameHere/base.apk app.apk Getting Partitions Imgs Backup adb pull /dev/block/by-name/SYSTEM system.img Restore adb push system.img /sdcard/ Then dd if=/sdcard/system.img of=/dev/block/by-name/SYSTEM Logcat adb logcat -v color ...
Installing Windows Only Using CMD
The Installer Download and Launch the Windows Installer. Launch Command Prompt with Shift+F10 Partitioning List Disks with list disk Select desired disk with sel disk # Check to verify there is NO partitions list partition (Optional) Delete any existing partitions del part # NOTE: THIS ERASES ALL DATA You can also use clean for deleting all partions. Check to verify DISK is GPT list disk and use convert gpt If GPT is not Enabled Create Boot partition create partition efi size=100 Create Data partition create partition primary size=* Select Boot sel partition 1 Format Boot format fs=FAT32 quick Assign Boot partition assign letter=g: Select Data sel par 2 Format Data format fs=NTFS quick Assign Data partition assign letter=c: NOTE: You may need to UNASSIGN an existing C: drive Selecting Windows Version to Install DISM is the tool that is actually used to install windows. You can use the following command to get index# of the Windows Version you want to install. ...
Optimizing Linux Boot Time
Boot time is how much time it takes to boot your computer when you press your power button. A lot of things can slow down your boot on Linux. In this article we will discuss this in detail. Systemd optimizations Disabling unnecessary services systemd-analyze is a command available on systemd distros (which most distros are). It shows which service is using more time to load and you can disable that service. Just don’t disable any important service or your computer won’t boot at all. You can also use the sub-command systemd-analyze blame for more clearer output. ...
The Problem With Smart Televisions
The Problem Televisions started as an easy to use device, you just pressed a button, and a channel played. Now-a-days, Television has been transformed into “SmartTV” Full of Ads, Tracking Built-In (as a feature btw) and Bloated UI Optimizing Electronics The reason TVs feel bloated and laggy is because the tech companies just bundle the TV with a bunch of bloat that uses more resources than necessary. You can optimize your electronic device by removing bloat and can make your TV somewhat useable. Bloat takes up space and use that precious memory and CPU power. ...
Disable Core Dumps
Setting Limits Edit /etc/security/limits.conf Append the following lines * hard core 0 * soft core 0 Disabling setgid and setuid programs from core dumping Edit /etc/sysctl.d/9999-disable-core-dump.conf or /etc/sysctl.conf Append the following lines fs.suid.dumpable=0 kernel.core_pattern= |/bin/false
Build.prop Tweaks
Build.Prop Tweaks # enable software keys qemu.hw.mainkeys=0 # Quick Power On ro.config.hw_quickpoweron=true # Disable Error reporting profiler.force_disable_err_rpt=1 profiler.force_disable_ulog=1 ro.kernel.android.checkjni=0 ro.kernel.checkjni=0 # Disable GPS Entirely ro.com.google.locationfeatures=0 ro.com.google.networklocation=0 # Advanced (Not Recommended) ro.config.nocheckin=1 persist.android.strictmode=0 ro.secure=0 dalvik.vm.verify-bytecode=false dalvik.vm.dexopt-flags=m=y,v=n,o=v logcat.live=disable ro.boot.selinux=permissive androidboot.selinux=permissive persist.android.strictmode=0 persist.selinux.enforcing=0 ro.build.selinux.enforce=0 security.perf_harden=0 selinux.reload_policy=0 selinux.sec.restorecon=0 ro.adb.secure=0 # Disable Boot Animation debug.sf.nobootanimation=1 # Networking net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 # Disable SIM Functionality persist.telephony.support.ipv6=0 persist.radio.apm_sim_not_pwdn=0 # Disable Sensors ro.qti.sensors.pedometer=false ro.qti.sensors.step_counter=false ro.qti.sensors.step_detector=false ro.qti.sensors.facing=false ro.qti.sensors.pick_up=false keyguard.no_require_sim=true # Disable Audio Warnings audio.safemedia.bypass=true audio.safemedia.force=false # Disable Stupid port shuffling in wireless Adb (Android 10 and above) service.adb.tls.port=5555 service.adb.tcp.port=5555