2019-11-18 22:33:27 +03:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
mobile.device.name = "google-walleye";
|
2020-05-24 00:27:57 +03:00
|
|
|
mobile.device.identity = {
|
2020-04-04 07:23:51 +03:00
|
|
|
name = "Pixel 2";
|
2020-05-24 00:27:57 +03:00
|
|
|
manufacturer = "Google";
|
|
|
|
};
|
|
|
|
|
2019-11-18 22:33:27 +03:00
|
|
|
mobile.hardware = {
|
|
|
|
soc = "qualcomm-msm8998";
|
|
|
|
ram = 1024 * 4;
|
|
|
|
screen = {
|
|
|
|
width = 1080; height = 1920;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-05-25 01:39:14 +03:00
|
|
|
mobile.boot.stage-1 = {
|
2020-10-03 02:47:13 +03:00
|
|
|
kernel.package = pkgs.callPackage ./kernel { };
|
2020-05-25 01:39:14 +03:00
|
|
|
};
|
|
|
|
|
2020-05-24 09:44:11 +03:00
|
|
|
mobile.system.android = {
|
|
|
|
# This device has an A/B partition scheme
|
|
|
|
ab_partitions = true;
|
|
|
|
|
|
|
|
bootimg.flash = {
|
|
|
|
offset_base = "0x00000000";
|
|
|
|
offset_kernel = "0x00008000";
|
|
|
|
offset_ramdisk = "0x01000000";
|
|
|
|
offset_second = "0x00f00000";
|
|
|
|
offset_tags = "0x00000100";
|
|
|
|
pagesize = "4096";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mobile.system.vendor.partition = "/dev/disk/by-partlabel/vendor_a";
|
|
|
|
|
2020-05-24 01:14:10 +03:00
|
|
|
boot.kernelParams = [
|
|
|
|
# From TWRP
|
|
|
|
"androidboot.hardware=walleye"
|
|
|
|
"androidboot.console=ttyMSM0"
|
|
|
|
"lpm_levels.sleep_disabled=1"
|
|
|
|
"user_debug=31"
|
|
|
|
"msm_rtb.filter=0x37"
|
|
|
|
"ehci-hcd.park=3"
|
|
|
|
"service_locator.enable=1"
|
|
|
|
"swiotlb=2048"
|
|
|
|
"firmware_class.path=/vendor/firmware"
|
|
|
|
"loop.max_part=7"
|
|
|
|
"raid=noautodetect"
|
|
|
|
"androidboot.fastboot=1"
|
|
|
|
"buildvariant=eng"
|
|
|
|
|
|
|
|
# Using `quiet` fixes early framebuffer init, for stage-1
|
|
|
|
"quiet"
|
|
|
|
];
|
|
|
|
|
2019-11-18 22:33:27 +03:00
|
|
|
mobile.system.type = "android";
|
2020-01-13 01:18:56 +03:00
|
|
|
|
2020-01-14 01:57:48 +03:00
|
|
|
mobile.usb.mode = "gadgetfs";
|
2020-01-13 01:18:56 +03:00
|
|
|
# Google
|
|
|
|
mobile.usb.idVendor = "18D1";
|
|
|
|
# "Nexus 4"
|
|
|
|
mobile.usb.idProduct = "D001";
|
2020-05-24 09:44:11 +03:00
|
|
|
|
|
|
|
mobile.usb.gadgetfs.functions = {
|
|
|
|
rndis = "gsi.rndis";
|
2021-01-28 01:57:52 +03:00
|
|
|
adb = "ffs.adb";
|
2020-05-24 09:44:11 +03:00
|
|
|
};
|
2019-11-18 22:33:27 +03:00
|
|
|
}
|