This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{thread::sleep, time::Duration}; | |
| use anyhow::{Ok, Result}; | |
| use image::{EncodableLayout, ImageReader}; | |
| use serialport::{SerialPort, new}; | |
| enum DisplayCommand { | |
| Clear = 102, | |
| ScreenOff = 108, | |
| ScreenOn = 109, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial | |
| import PIL | |
| import PIL.ImageFile | |
| from typing import Iterator, Literal, Tuple | |
| from enum import IntEnum | |
| import numpy as np | |
| from PIL import Image, GifImagePlugin, ImageChops, ImageSequence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt install -y wget apt-transport-https gpg | |
| curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public \ | |
| | gpg --dearmor \ | |
| | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null | |
| echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" \ | |
| | tee /etc/apt/sources.list.d/adoptium.list | |
| sudo apt install temurin-21-jdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adb shell am clear-debug-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo nano /etc/sysctl.d/60-apparmor-namespace.conf | |
| kernel.apparmor_restrict_unprivileged_userns=0 | |
| export ALLOW_MISSING_DEPENDENCIES=true | |
| export SKIP_ABI_CHECKS=true | |
| export TARGET_RELEASE=trunk_staging | |
| build_build_var_cache | |
| lunch 10 | |
| launch_cvd --daemon --noenable_sandbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt install simg2img | |
| simg2img system.img s.img | |
| mkdir system | |
| sudo mount -o ro,loop s.img system |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins { | |
| id("com.android.library") | |
| id("org.jetbrains.kotlin.android") | |
| id("maven-publish") | |
| } | |
| publishing { | |
| repositories { | |
| maven { | |
| name = "GitHubPackages" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| make javac-check-framework | |
| out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar | |
| Use classes.jar instead of classes-header.jar | |
| https://github.com/JetpackDuba/android-jar-with-hidden-api/blob/master/generate_custom_android_jar.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal const val CENTER_CUT_PERCENTAGE = 0.02F | |
| internal const val IMAGE_RADIUS_PERCENTAGE = 0.4F | |
| @Composable | |
| fun CenterRotatable( | |
| content: @Composable () -> Unit, | |
| ) { | |
| var angle by remember { mutableStateOf(0F) } | |
| var windowCenterPosition by remember { mutableStateOf(Offset.Zero) } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup lang="ts"> | |
| defineProps({ | |
| modelValue: { | |
| required: true, | |
| type: Number | |
| }, | |
| maxPage: { | |
| required: true, | |
| type: Number | |
| }, |