Sxmo Nexus 7 2012 rev. E1565 wifi 3G kernel-5.15.0-rc4-next-20211011-postmarketos-grate

LuxiTD
18/7/2021 3:2Phản hồi: 0
Sxmo Nexus 7 2012 rev. E1565 wifi 3G kernel-5.15.0-rc4-next-20211011-postmarketos-grate
DE Sxmo(gần giống i3wm) lên nexus 7 2012 wifi/3G 8Gb/16Gb/32Gb asus-grouper(trên 300 thiết bị được hỗ trợ ngay thời điểm này) mainline kernel linux 5.14-rc3-next-grate

https://twitter.com/postmarketOS

postmarketOS (🐘 @postmarketOS@fosstodon.org) (@postmarketOS) on X

Not using Twitter anymore, find postmarketOS on Mastodon: https://t.co/HKN1qTRwE3
twitter.com


Trước tiên kiểm tra máy là PM269 hay E1565 bằng cách:

Variants

  • grouper rev. PM269 - without GSM (oldest)
  • grouper rev. E1565 - without GSM (modern revision)
  • tilapia rev. E1565 - with GSM

Do I have grouper or tilapia?


TWRP (adb shell) $ grep androidboot.baseband=unknown /proc/cmdline && echo grouper || echo tilapia

Which hardware revision of grouper do I have?

TWRP (adb shell) $ find /sys/devices/ | grep -c max776 && echo You have E1565



TWRP (adb shell) $ find /sys/devices/ | grep -c tps6591 && echo You have PM269

Để PC nhận Nexus 7 2012 và flash kernel và push rootfs nhanh thì nên rút hết các thiết bị usb khác ngoài Nexus 7



Thêm repositories để cài package trong terminal

$ nano /etc/apk/repositories

Bỏ dấu “#” trước http://dl-cdn.alpinelinux.org/alpine/edge/testing/
Index of /alpine/edge/testing/
dl-cdn.alpinelinux.org


Cài pmbootstrap trên alpine linux trên user đã tạo, chú ý các bước

Quảng cáo


$ sudo apk add python3 coreutils procps git android-tools pmbootstrap

$ pmbootstrap init

$ […]: edge

$ […]: mainline

$ […]: asus

$ […]: grouper

Quảng cáo


$ […]: e1565 (PM269 như trên)

$ […]: sxmo

$ […, extra packages]: nano,vim

$ pmbootstrap status

$ pmbootstrap --details-to-stdout install --android-recovery-zip --recovery-install-partition=data

$ pmbootstrap export

File .img, kernel và .zip trong home/<username>/.local/var/pmbootstrap/ thư mục chroot-buildroot-armv7/var/lib và chroot-asus-grouper/boot hoặc chroot-asus-grouper/home/<user>/

Root và unlock bootloader Nexus 7 dùng tool

http://www.mediafire.com/file/d9kssrtg1dtnx3l/NRT_v2.1.9.sfx.zip/file

Cài đặt và mở TWRP-3.3.1-0-grouper.img tải tại đây:

https://dl.twrp.me/grouper/

Download TWRP for grouper

Download TWRP Open Recovery for grouper
dl.twrp.me


*** CÀI ĐẶT VÀO /userdata partition ***

Phải sửa file deviceinfo trong:

$ nano /home/<username>/.local/var/pmbootstrap/cache_git/pmaports/device/testing/deviceinfo

Sửa dòng: deviceinfo_flash_fastboot_max_size="650" thành "13773" (Nexus 7 8gb là 5829,
nexus 7 32gb là 27944)

Flash kernel vào boot partition trên máy:

$ pmbootstrap flasher flash_kernel

Mở TWRP trên nexus 7(nhấn nút nguồn + nút giảm âm lượng) và cắm vào máy tính, làm theo các bước sau:

(computer) $ adb shell
(twrp) $ df # look for the data partition. should be something like /dev/block/mmcblk0p9 or p10 with /data next to it
(twrp) $ umount /dev/block/mmcblk0p__ <- fill paron number
(twrp) $ umount /dev/block/mmcblk0p__ <- fill paron number # again, it can be mounted as /sdcard and as /data
(computer again) $ adb push /tmp/postmarketOS-export/asus-grouper.img /dev/block/mmcblk0p__ <- fill partition number

Với điều kiện:
grouper(bản wifi) /dev/block/mmcblk0p9
tilapia(bản 3G) /dev/block/mmcblk0p10

Config sysctl.conf có sự chỉnh sửa theo KTweak trên github của tytydraco (xda-developers)

Tham khảo:
https://github.com/tytydraco/KTweak/tree/latency

GitHub - tytydraco/KTweak at latency

A no-nonsense kernel tweak script for Linux and Android systems, backed by evidence. - GitHub - tytydraco/KTweak at latency
github.com


$ sudo nano /etc/sysctl.conf

# content of this file will override /etc/sysctl.d/*

vm.swappiness=100
vm.vfs_cache_pressure=100
vm.dirty_background_ratio=0
vm.dirty_ratio=0
vm.dirty_background_bytes = 11758094
vm.dirty_bytes = 23516188
vm.dirty_writeback_centisecs=400
vm.dirty_expire_centisecs=200
vm.lowmem_reserve_ratio=32 32
vm.min_free_kbytes=3072
vm.user_reserve_kbytes=6144
vm.admin_reserve_kbytes=3072
vm.panic_on_oom=0
vm.overcommit_memory=1
vm.overcommit_ratio=50
vm.drop_caches=3
vm.laptop_mode=10
vm.mmap_min_addr=4096
vm.oom_kill_allocating_task=0
vm.extfrag_threshold=500
vm.oom_dump_tasks=1
vm.page-cluster=3
vm.stat_interval=10
vm.compact_unevictable_allowed=0
vm.highmem_is_dirtyable=0

kernel.panic=10
kernel.panic_on_oops=1
kernel.tainted = 0
kernel.ctrl-alt-del = 1
kernel.threads-max = 15503
kernel.random.write_wakeup_threshold = 128
kernel.usermodehelper.bset=4294967295 4294967295
kernel.usermodehelper.inheritable=4294967295 4294967295
kernel.printk = 15 4 1 7
kernel.kptr_restrict = 2
kernel.randomize_va_space = 2
kernel.perf_event_paranoid = 3
kernel.keys.root_maxkeys=200
kernel.keys.root_maxbytes=20000
kernel.perf_event_paranoid=1
kernel.perf_cpu_time_max_percent=3
kernel.shmmax=268435456
kernel.shmall=2097152
kernel.msgmni=2048
kernel.msgmax=64000
kernel.sem=500 512000 64 2048
kernel.auto_msgmni=1
kernel.sched_child_runs_first=1
kernel.hung_task_timeout_secs=0

fs.file-max = 99222
fs.epoll.max_user_watches = 138922

net.core.somaxconn = 128
net.core.wmem_max = 131072
net.core.rmem_max = 131072
net.core.wmem_default = 112640
net.core.rmem_default = 112640
net.core.warnings = 1

net.ipv4.tcp_ecn=1
net.ipv4.tcp_fastopen=3
net.ipv4.tcp_timestamps=0
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_wmem=1536 21845 131072
net.ipv4.tcp_rmem=1536 21845 131072

$ sudo sysctl -p

$ sudo nano /etc/local.d/cpufreq.start

# Set the governor to ondemand for all processors
for cpu in /sys/devices/system/cpu/cpufreq/policy*; do
echo ondemand > ${cpu}/scaling_governor
done

# Reduce the boost ignore_nice_load to 0
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

# Reduce the boost io_is_busy to 0
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy

# Reduce the boost powersave_bias to 0 <-- tăng giảm xung của cpu/gpu
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias

# Reduce the boost sampling_down_factor to 2
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

# Reduce the boost sampling_rate to 20000
echo 20000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate

# Reduce the boost threshold to 75%
echo 75 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

for queue in /sys/block/*/queue
do
# Choose the first governor available
avail_scheds="$(cat "$queue/scheduler")"
for sched in cfq noop kyber bfq mq-deadline none
do
if [[ "$avail_scheds" == *"$sched"* ]]
then
echo "$sched" > "$queue/scheduler"
break
fi
done

# Do not use I/O as a source of randomness
# echo 0 > "$queue/add_random"

# Disable I/O statistics accounting
echo 0 > "$queue/iostats"

# Reduce heuristic read-ahead in exchange for I/O latency
echo 256 > "$queue/read_ahead_kb"

# Reduce the maximum number of I/O requests in exchange for latency
echo 512 > "$queue/nr_requests"

echo 128 > "$queue/max_sectors_kb"

echo 2 > "$queue/rq_affinity"
done

$ sudo chmod +x /etc/local.d/cpufreq.start
$ sudo rc-update add local default
$ sudo lbu commit

Chia sẻ

Xu hướng

Xu hướng

Bài mới









  • Chịu trách nhiệm nội dung: Trần Mạnh Hiệp
  • © 2024 Công ty Cổ phần MXH Tinh Tế
  • Địa chỉ: Số 70 Bà Huyện Thanh Quan, P. Võ Thị Sáu, Quận 3, TPHCM
  • Số điện thoại: 02822460095
  • MST: 0313255119
  • Giấy phép thiết lập MXH số 11/GP-BTTTT, Ký ngày: 08/01/2019