Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

SmartPack/KernelProfiler

Repository files navigation

Important Notice: The development of this project is abandoned.

Download

Requirements

  • ROOT Access
  • Kernel-level support

Features

  • Switch between profiles (no limit) provided by the kernel developer in one click (for users).
  • Apply default profile, pre-defined by the developer or assigned by the user, on boot
  • Completely (almost) customise the interface of app in accordance with kernel (for developers).
  • Easily create profiles and necessary configuration file within the app (for developers).

How to add support in kernel

Kernel Profiler expects a configuration file (kernelprofiler.json) and one or more profiles (basically shell scripts) in certain specific structure placed inside "/data/kernel_profiler".

Structure of kernelprofiler.json

kernelprofiler.json necessorily contains a title string as well as a number of optional strings to properly identify a specific kernel. An example kernelprofiler.json can be found here.

  • "title": "Title of your kernel". The "title" should be a string from your kernel's "uname -a". It will be later matched on your user's devices, and also be displayed as app's main title. Please note that it is the only way of app to distinguish a supported kernel and should be done carefully.

  • "description": "A short description (in one line) about your kernel". Please note that the "description" string will be also displayed in app along with the main title.

  • "default": "The exact name of the default profile including .sh extension".

  • "developer": "The identity (name, pet name or anything similar) of the developer". Please note that the "developer" string will be displayed in app along with a © symbol (bottom part of app).

  • "support": "A link to the discussion page or a support group of your kernel". Please note that the "support" string will be linked to the app's settings menu.

  • "donations": "A link to send donations to the developer". Please note that the "donations" string will also be linked to the app's settings menu.

Structure of profiles (shell scripts)

App considers any properly formatted shell script as a profile. Optionally, the developer may add a line starting with "# Description=" somewhere in the profile so that the app will recognize and display it as the profile description. An example profile can be found here.

How to integrate into an Anykernel zip

Adding the following lines into anykernel.sh after placing all the support files, such as a properly formatted kernelprofiler.json and one or more profile scripts, into ramdisk/kernel_profiler, allow you to inject Kernel Profiler support upon kernel installation.

if [ -e $ramdisk/kernel_profiler ]; then
	# Inject Kernel Profiler support
	if [ -e /data/kernel_profiler ]; then
		# Remove old files
		rm -rf /data/kernel_profiler/*
		mv $ramdisk/kernel_profiler/* /data/kernel_profiler/
	else
		mv ramdisk/kernel_profiler/ /data/
	fi
fi

The following commit shall be used for further reference

Translations

Please help me to translate this app. The original english string of this app is available at

https://github.com/SmartPack/KernelProfiler/blob/master/app/src/main/res/values/strings.xml

Donations

If you like to appreciate my work, please consider donating to me (either via PayPal, or Ko-fi, or by purchasing the SmartPack Donation Package from playstore) as it is helpful to continue my projects more active, although it is not at all necessary. Please Note: Purchasing SmartPack Donation Package will remove Ads on this app.

Credits

License

Copyright (C) 2021-2022 sunilpaulmathew <[email protected]>

Kernel Profiler is a free softwares: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

Kernel Profiler is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along
with Kernel Profiler. If not, see <http://www.gnu.org/licenses/>.