Skip to content

Instantly share code, notes, and snippets.

Avatar
✍️
Studying !

Aki Akianonymus

✍️
Studying !
View GitHub Profile
@Akianonymus
Akianonymus / create_multiple_profiles.md
Last active May 12, 2022
Create multiple profiles for ISLAND app
View create_multiple_profiles.md

Setup multiple island spaces

Warning: Must have an work profile already setup

So that we can modify fw.sys.max_profiles to allow more work profiles

resetprop ro.debuggable 1 
am restart
@Akianonymus
Akianonymus / utils.lua
Last active Aug 19, 2021
Lua functions
View utils.lua
-- https://www.codegrepper.com/code-examples/lua/lua+how+to+print+a+table
local function print_table(node, indent)
local cache, stack, output = {}, {}, {}
local depth = 1
local output_str = "{\n"
indent = indent or " "
while true do
local size = 0
for k, v in pairs(node) do
@Akianonymus
Akianonymus / utils.sh
Last active Jul 14, 2022
Some shell functions
View utils.sh
###################################################
# Convert bytes to human readable form
# Required Arguments: 1
# ${1} = Positive integer ( bytes )
# Result: Print human readable form.
# Reference:
# https://unix.stackexchange.com/a/259254
###################################################
_bytes_to_human() {
b_bytes_to_human="$(printf "%.0f\n" "${1:-0}")" s_bytes_to_human=0
@Akianonymus
Akianonymus / parse_config.sh
Last active Jun 5, 2021
Parse key=val config file
View parse_config.sh
parse_config() {
_config_file="${1:?Error: Profile config file}"
# check if the config file accessible
[ -r "${_config_file}" ] || {
printf "%s\n" "Error: Given config file ( ${_config_file} ) is not readable."
return 1
}
# Setting 'IFS' tells 'read' where to split the string.
View install-shfmt.sh
#!/usr/bin/env bash
CURRENT_SHELL="${SHELL##*/}"
case "$CURRENT_SHELL" in
'bash') SHELL_FILE="$(ls "$HOME"/.bashrc)" ;;
'zsh') SHELL_FILE="$(ls "$HOME"/.zshrc)" ;;
*) echo "Not a supported shell" && exit 1 ;;
esac
case "$(uname -m)" in
'armv7l') ARCH=arm ;;
@Akianonymus
Akianonymus / remove-hd-icon.md
Created Dec 4, 2019
Remove HD ICON ( IMS )
View remove-hd-icon.md

Steps to remove persistent ims HD icon from notification bar.

Decompile ims.apk using apktool.

Go to decompiled folder, run below commands:

sed -i 's|.*device_is_hd_capable.*|    \<string name="device_is_hd_capable" /\>|g'  $(find -type f | grep strings.xml)
View Force-isRadioTechLte-to-true.patch
From edb28acbe2253bfcc49cbb6e7e1faf60ed04ed97 Mon Sep 17 00:00:00 2001
From: Akianonymus <anonymus.aki@gmail.com>
Date: Thu, 21 Mar 2019 06:54:03 +0530
Subject: [PATCH] Force isRadioTechLte to true
---
.../com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java b/src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java