Device-specific Tweaks Management Service (Tweakster)

GSoC 2025 Project Proposal

Name and Contact Information

About Me

I am a computer engineering student with a strong passion for low-level and systems programming. My technical interests focus on operating systems, embedded systems, and the Linux ecosystem.

Project Title

Device-specific Tweaks Management Service (Tweakster)

Synopsis

Problem Description

As the number of non-x86 Linux-capable devices grows rapidly (especially ARM64 laptops, phones, and tablets), the current approach of providing device-specific Debian packages for configuration tweaks doesn't scale efficiently. This project aims to develop a flexible tweaks management service called "Tweakster" that will identify the device it's running on, select the appropriate tweaks based on configuration files, and dynamically install them to the system. This solution will unify device detection, streamline configuration deployment, and ultimately ease support for new devices in Debian.

Problem Analysis

The current state of device-specific tweaks in Debian follows a static packaging model that presents some challenges:

  1. Scalability Issues: Each new device requires a new Debian package, leading to an unhandleable number of packages as more devices are supported.

  2. Maintenance Burden: Updates need to be propagated across multiple packages, increasing maintenance workload.

  3. Generic Image Limitations: The previous two issues are slowdowning creating a universally deployable system image for all devices.

Project Impact and Benefits to Debian

Short-term Benefits

  1. More Device Support: New devices can be supported with just configuration changes rather than new packages.

  2. Reduced Package Duplication: Common tweaks can be shared across devices.

Long-term Benefits

  1. Scalability: Support for hundreds of devices without package explosion.

  2. Generic Image Viability: A single system image can adapt to multiple devices(good step towards Debian universal system philosophy).

  3. Upstream Integration: Potential for upstream developers to Debian's device handling infrastructure.

Note:

Detailed Technical Approach

Proposed Architecture

Tweakster will follow a service-based approach with these key components:

  1. Device Identification

    • Hardware detection using device tree
    • Mapping detected hardware to device profiles
  2. Tweaks Selection

    • Checking the config and internally lists all needed tweaks
    • Coping those tweaks to temporary file.
    • Arrange those tweaks in an approperiate order
    • Conflict resolution for overlapping tweaks
  3. Package Generation

    • Dynamicly creating debian/ directory
    • Taking benifit of debhelper functionality for near automatic service management
    • Proper handling of various tweak types (udev rules, systemd services, gsettings, etc.)
    • Handeling corner cases that debhelper cannot handle yet.
  4. Installation and Verification

    • Package building via dpkg-buildpackage
    • Safe installation of generated package

Implementation Strategy

The service will be developed in Rust, building upon the existing Tweakster prototype. The implementation will follow these phases:

  1. Device Detection

    • Relying on current detection routine as it works well enough for ?DeviceTree-based devices

  2. Configuration System Improvement

    • Extend the existing TOML configuration format to support inheritance and overrides
    • Implement validation for configuration files
  3. Package Generation

    • Create a temporary directory, coping prepared tweaks in this folder, create debian/ directory
    • Integrate with debhelper tools programmatically and benifit form its automation for different tweak types (systemd, udev, gsettings, etc.)
    • Write domain-specific code for more specialized tweaks that out of debhelper scope
  4. System Integration

    • Design it as a systemd service that runs on first boot (as for now, this could be changed)
    • Secure package installation process to make sure successful installation

Technical Challenges and Solutions

Challenge : Dynamic Package Generation (Critical Part) Creating proper Debian package at runtime requires careful handling of packaging conventions.

Solution:

Existing Implementations

I've analyzed several repositories that currently manage device-specific tweaks:

  1. DebianOnMobile/mobile-tweaks: Contains general mobile-oriented tweaks.

  2. Mobian/mobian-tweaks: Base mobile adaptations for the Mobian distribution.

  3. Mobian/devices/*: Device-specific packages for ?PinePhone, ?PineTab, and Librem 5.

These repositories follow different approaches but share common patterns:

Prototype Analysis

I've also analyzed the existing Tweakster prototype and found it provides a solid foundation:

However, it currently lacks:

Deliverables

  1. Tweakster Service

    • Dynamic package generation and installation
    • Wide error handling and logging
  2. Documentation

    • Technical design document
    • Manual for how Tweakster work(If needed)
  3. Initial Tweaks Repository

    • Refactored existing tweaks for compatibility with the new service at least for one device

Project Timeline & Workflow

Phase 1: Research and Design (Weeks 1-2)

Phase 2: Core Implementation (Weeks 3-6)

Phase 3: Integration and Testing (Weeks 7-9)

Phase 4: Refinement, Documentation & Final Submission (Weeks 10-12)

Communication Plan

Why Debian

I've always wondered how things work internally inside my computer, how each component communicate with other components and alot other questions. Those questions by time got answered one by one when first time I interacted with my first Debian based ditro (Ubuntu). i got fascinated with how brilliant with how each single unit i learned of align perfectly with the entire system. so decided i want to contribute to the source itself, contributing to Debian means: answering my remain question, deepen my graps of how the system interacts both as units and whole, and helping improving debian would help improve debian user experience and my experince itself, since i become a debian user. The project's commitment to free software, and technical excellence aligns perfectly with my values as a developer.

This project specifically interests me because it addresses real challenges in adapting software for diverse hardware, connecting alot of areas such as hardware and system level software an area where my interest in systems programming can be meaningfully improve.

My Skills and Relevant Experience

Technical Skills

Learning Experience

I've prepared for this project by:

Other Commitments

During the period 20 May - 3 June, I will have my final exams, so my productivity will be reduced during that period. However, I plan to cover that shortage before and after the exams. After the academic semester is finished, I will be able to dedicate 35-40 hours per week to this project. I have no other major commitments (as of the time I write this proposal; if there are any changes, I will present it)

I recognize that open-source development requires consistent effort and communication, and I am fully prepared to maintain this level of engagement throughout the entire process.

References

  1. Mobile Tweaks

  2. Tweakster Prototype

  3. Mobian device specific tweaks

  4. Debhelper documentation

  5. Debian Policy Manual

  6. Systemd First Boot documentation

  7. Tweaks data for reference only