Developer Notes & Programming Ideas

RWB Tech Lab – Developer Notes & Discussion

Welcome to my open developer notebook.

This page is a place where I share short programming notes, experiments, ideas, discoveries and experiences from my work with Python, Android, Linux and other technology.

Not everything published here will be a complete project or a full tutorial. Sometimes it may simply be a useful code idea, something I discovered while testing an application, a programming problem I solved, or an interesting observation about computers and mobile development.

I have been interested in computers and programming since the early days of home computers, and today I continue experimenting with modern tools, Python, Android devices, Linux and AI-assisted development through RWB Tech Lab.

Visitors are welcome to join the discussion.

If you have a suggestion, another solution, a question, or simply want to share your own experience, feel free to leave a comment.

The goal is simple:

Learn, experiment, share ideas and have fun with technology.

— Robert William
RWB Tech Lab

Python Note #001 – Checking RAM and Storage on Android

I recently created a small Python utility for my Google Pixel 10, which I use as one of my development devices at RWB Tech Lab.

The purpose was simple: I wanted to see how much RAM and storage Android reports, together with some useful system information such as CPU cores, Android version, kernel and Python version.

The program was tested in Pydroid 3 on my Google Pixel 10.

import os
import platform
import psutil
import subprocess


def get_android_property(prop):
    try:
        return subprocess.check_output(
            ["getprop", prop],
            text=True
        ).strip()
    except Exception:
        return "Unknown"


print("RWB PHONE INFO")
print("=" * 40)

# Device information
manufacturer = get_android_property("ro.product.manufacturer")
model = get_android_property("ro.product.model")
device = get_android_property("ro.product.device")

print(f"Manufacturer : {manufacturer}")
print(f"Model        : {model}")
print(f"Device       : {device}")

# Android information
android_version = get_android_property("ro.build.version.release")
sdk_version = get_android_property("ro.build.version.sdk")
build_id = get_android_property("ro.build.id")

print(f"Android      : {android_version}")
print(f"SDK          : {sdk_version}")
print(f"Build        : {build_id}")

# Python and system
print(f"Architecture : {platform.machine()}")
print(f"Kernel       : {platform.release()}")
print(f"Python       : {platform.python_version()}")

# CPU
print(f"CPU cores    : {psutil.cpu_count(logical=True)}")

# RAM
ram = psutil.virtual_memory()

print("\nRAM")
print("-" * 40)
print(f"Total        : {ram.total / 1024**3:.1f} GB")
print(f"Used         : {ram.used / 1024**3:.1f} GB")
print(f"Available    : {ram.available / 1024**3:.1f} GB")
print(f"Usage        : {ram.percent:.1f}%")

# Storage
storage = psutil.disk_usage("/")

print("\nSTORAGE")
print("-" * 40)
print(f"Total        : {storage.total / 1024**3:.1f} GB")
print(f"Used         : {storage.used / 1024**3:.1f} GB")
print(f"Free         : {storage.free / 1024**3:.1f} GB")
print(f"Usage        : {storage.percent:.1f}%")

On my Pixel 10, the program reported approximately:

  • RAM: 11.3 GB total
  • RAM used: 9.5 GB
  • RAM available: 1.8 GB
  • CPU: 8 cores
  • Storage: 228.4 GB available to Android
  • Storage used: around 38 GB
  • Android: Android 16
  • SDK: 36
  • Architecture: aarch64
  • Python: 3.13.13

The internal device name reported by Android is frankel.

One interesting thing is that a phone sold as a 12 GB / 256 GB device does not normally show exactly 12 GB RAM or 256 GB usable storage inside the operating system. Some capacity is reserved or used by the system.

This little program became RWB Phone Info, one of my small Python experiments for Android.

It is a good example of how Python can also be useful for exploring the hardware and operating system of a mobile device.

If you test the code on another Android phone, feel free to leave a comment with your results.

— Robert William
RWB Tech Lab

Lämna ett svar

Din e-postadress kommer inte publiceras. Obligatoriska fält är märkta *