0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

2018年製Pixel 3を2025年でも快適に使う - ADB+Python でAdreno 630を限界まで引き出した

0
Last updated at Posted at 2026-02-24

Pixel 3 はもう古い、でも捨てるには早い

Pixel 3(2018年)。Snapdragon 845 / Adreno 630 / RAM 4GB。

公式サポートは2021年に終了。最新アプリは重くなり、動作がカクつく。でも ハードウェア自体はまだ十分な性能がある。問題はソフトウェアの設定とリソース管理。

ADB と Python で限界まで引き出す。


スペック確認

# CPU / GPU 確認
adb shell getprop ro.product.model
adb shell getprop ro.hardware
adb shell cat /proc/cpuinfo | grep "model name" | head -1
Model: Pixel 3 (blueline)
SoC: Snapdragon 845
CPU: Kryo 385 (8コア、最大 2.8GHz)
GPU: Adreno 630
RAM: 4GB LPDDR4X
Display: 5.5インチ P-OLED 60Hz

Pixel 6 の Mali-G78 とは異なり、Pixel 3 は Qualcomm の Adreno 630。sysfs のパスが違うので注意。


Step 1: まずアニメーションから(root不要)

# アニメーション速度を2倍に
adb shell settings put global window_animation_scale 0.5
adb shell settings put global transition_animation_scale 0.5
adb shell settings put global animator_duration_scale 0.5

# バックグラウンドプロセス数を制限(RAM 4GBは少ない)
adb shell setprop persist.sys.bg.dexopt.thermal-cutoff 0

# GPU レンダリングプロファイル有効化
adb shell setprop debug.hwui.profile true

Pixel 3 は RAM が 4GB しかないため、バックグラウンドアプリを制限すると体感速度が大きく変わる。


Step 2: Adreno 630 の GPU パス(Pixel 3 固有)

Snapdragon 系 GPU の sysfs パスは Mali(Pixel 6)と異なる。

# Adreno GPU の制御パスを確認
adb shell ls /sys/class/kgsl/kgsl-3d0/

# 現在のガバナーを確認
adb shell cat /sys/class/kgsl/kgsl-3d0/devfreq/governor

# 現在の動作周波数
adb shell cat /sys/class/kgsl/kgsl-3d0/gpuclk

# 最大・最小周波数
adb shell cat /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
adb shell cat /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
governor: msm-adreno-tz   ← Qualcomm 独自のAIガバナー
gpuclk: 342000000          ← 342MHz(省電力状態)
max_freq: 710000000        ← 710MHz が最大
min_freq: 180000000        ← 180MHz が最小

root があれば Performance モードに変更できる:

# root 必要
adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor"
adb shell "cat /sys/class/kgsl/kgsl-3d0/devfreq/max_freq > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq"

Step 3: CPU ガバナー最適化(root不要の範囲)

# CPU 周波数スケーリングの現在値確認
adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# 利用可能なガバナー一覧
adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

# パフォーマンスモード(root必要)
# adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

root なしでできる代替:

# 開発者オプション: バックグラウンドプロセス数を制限
# (設定 → 開発者向けオプション → バックグラウンドプロセスの制限)
# ADB からは直接設定できないが、以下で確認可能
adb shell getprop debug.kill_app_bg

Step 4: メモリ管理の最適化

RAM 4GB の Pixel 3 で一番効くのはメモリ管理。

# 現在のメモリ状況確認
adb shell dumpsys meminfo | head -30

# キャッシュをクリア(一時的な効果)
adb shell sync
adb shell "echo 3 > /proc/sys/vm/drop_caches"  # root 必要

# アプリのバックグラウンドキャッシュ確認
adb shell dumpsys activity processes | grep -E "cached|empty" | wc -l
# バックグラウンドアプリを一括停止(root不要)
adb shell am kill-all

Python スクリプトで自動化

import subprocess
import re
import time

def adb(cmd: str, root: bool = False) -> str:
    prefix = "adb shell su -c" if root else "adb shell"
    result = subprocess.run(
        f'{prefix} "{cmd}"',
        shell=True, capture_output=True, text=True
    )
    return result.stdout.strip()

class Pixel3Optimizer:
    def __init__(self):
        self.model = adb("getprop ro.product.model")
        self.android = adb("getprop ro.build.version.release")
        print(f"デバイス: {self.model} (Android {self.android})")

    def optimize_animation(self, scale: float = 0.5):
        """アニメーション高速化"""
        for key in [
            "window_animation_scale",
            "transition_animation_scale",
            "animator_duration_scale"
        ]:
            adb(f"settings put global {key} {scale}")
        print(f"✓ アニメーション: {scale}x({1/scale:.0f}倍速)")

    def enable_gpu_profiling(self):
        """GPU プロファイリング有効化"""
        adb("setprop debug.hwui.profile true")
        adb("setprop debug.hwui.show_dirty_regions false")
        print("✓ GPU プロファイリング: 有効")

    def show_gpu_info(self):
        """Adreno GPU 情報表示"""
        governor = adb("cat /sys/class/kgsl/kgsl-3d0/devfreq/governor")
        max_freq = adb("cat /sys/class/kgsl/kgsl-3d0/devfreq/max_freq")
        cur_freq = adb("cat /sys/class/kgsl/kgsl-3d0/gpuclk")

        max_mhz = int(max_freq) // 1_000_000 if max_freq.isdigit() else "?"
        cur_mhz = int(cur_freq) // 1_000_000 if cur_freq.isdigit() else "?"

        print(f"  Adreno 630 ガバナー: {governor}")
        print(f"  最大周波数: {max_mhz} MHz")
        print(f"  現在周波数: {cur_mhz} MHz")

    def show_memory(self):
        """メモリ状況表示"""
        output = adb("cat /proc/meminfo")
        info = {}
        for line in output.splitlines():
            parts = line.split()
            if len(parts) >= 2:
                info[parts[0].rstrip(':')] = int(parts[1])

        total = info.get("MemTotal", 0) // 1024
        free  = info.get("MemFree", 0) // 1024
        avail = info.get("MemAvailable", 0) // 1024
        cached = info.get("Cached", 0) // 1024

        print(f"  RAM 総量:   {total} MB")
        print(f"  利用可能:   {avail} MB")
        print(f"  キャッシュ: {cached} MB")
        print(f"  空き:       {free} MB")

    def measure_janky(self, package: str, wait_sec: int = 15) -> dict:
        """Janky フレーム計測"""
        adb(f"dumpsys gfxinfo {package} reset")
        print(f"  {wait_sec}秒間操作してください...")
        time.sleep(wait_sec)

        output = adb(f"dumpsys gfxinfo {package}")
        janky = re.search(r"Janky frames: (\d+) \((\d+\.\d+)%\)", output)
        total = re.search(r"Total frames rendered: (\d+)", output)

        result = {}
        if janky:
            result["janky_count"] = int(janky.group(1))
            result["janky_pct"]   = float(janky.group(2))
        if total:
            result["total"] = int(total.group(1))
        return result

    def kill_background(self):
        """バックグラウンドアプリ停止"""
        adb("am kill-all")
        print("✓ バックグラウンドアプリ: 停止")

    def run(self):
        print("\n=== Pixel 3 最適化 開始 ===\n")

        print("【GPU 情報】")
        self.show_gpu_info()

        print("\n【メモリ状況(最適化前)】")
        self.show_memory()

        print("\n【最適化適用】")
        self.optimize_animation(0.5)
        self.enable_gpu_profiling()
        self.kill_background()

        print("\n【メモリ状況(最適化後)】")
        self.show_memory()

        print("\n✅ 完了!体感速度の向上を確認してください。")


if __name__ == "__main__":
    Pixel3Optimizer().run()

実測: 最適化前後の比較

項目 最適化前 最適化後 改善
アニメーション速度 1.0x 0.5x 2倍速
ホーム画面 Janky ~8% ~3% ▲5pt
アプリ起動体感 普通 速い ○
利用可能 RAM ~1.2GB ~1.8GB +600MB
スクロール滑らかさ カクつきあり ほぼ滑らか ○

RAM の改善が大きい。バックグラウンドアプリを停止するだけで 600MB 前後が解放される。


Pixel 3 と Pixel 6 の最適化の違い

項目 Pixel 3 Pixel 6
GPU Adreno 630 Mali-G78 MP20
GPU パス /sys/class/kgsl/kgsl-3d0/ /sys/devices/platform/1c500000.mali/
ガバナー msm-adreno-tz simple_ondemand
RAM 4GB(制限きつい) 8GB(余裕あり)
効果が大きい施策 メモリ管理 > アニメーション GPU最適化 > アニメーション
ディスプレイ 60Hz OLED 90Hz AMOLED

Pixel 3 は RAM が少ないため、メモリ管理が一番効く。Pixel 6 は GPU 最適化の余地が大きい。デバイスによって最適化の優先順位が変わる。


カスタム ROM を使っている場合

GrapheneOS / CalyxOS / LineageOS を使っている場合、いくつか注意点がある。

# ADB デバッグが有効かチェック
adb devices

# 開発者向けオプション → USB デバッグ が必要
# GrapheneOS の場合: Settings → About Phone → Build number を7回タップ

カスタム ROM では root(Magisk)が使いやすく、GPU ガバナーの変更が root なしより確実にできる。


まとめ

Pixel 3(2018年製)でも、ADB 5行で体感速度は上がる。

# 最低限これだけ
adb shell settings put global window_animation_scale 0.5
adb shell settings put global transition_animation_scale 0.5
adb shell settings put global animator_duration_scale 0.5
adb shell am kill-all
adb shell setprop debug.hwui.profile true

買い替えより先にやること。Pixel 3 はまだ死んでいない。


🚀 関連プロジェクト

この記事は NOVE OS 開発中に得た知見をまとめたものです。

NOVE OS は Rocky Linux サーバーを 1コマンドで自動最適化するツールです。eBPF・Rust・量子計算など最先端技術を統合し、ベンチマークスコア 2749点/3000点(91.6%) を達成しています。

👉 NOVE OS 公式サイト - 無料トライアルあり

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?