Skip to content

Instantly share code, notes, and snippets.

View tdrkDev's full-sized avatar
:shipit:
bro...

Roman Rihter tdrkDev

:shipit:
bro...
View GitHub Profile
@tdrkDev
tdrkDev / adb-temp
Created August 5, 2023 21:49
ADB (Termux) temperature monitor
#!/bin/bash
TEST_RUN_FILE="$HOME/Downloads/alo.txt"
TEST_RUN=
round() {
printf '%.0f' "$1"
}
get_stats() {
@tdrkDev
tdrkDev / PdkUtil.java
Last active March 7, 2024 20:49
Samsung Camera reverse engineering notes. See SemCameraParameter.java for more in-depth notes.
package com.samsung.galaxytrash;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.params.OutputConfiguration;
import android.os.Build;
import android.util.Log;
import android.util.Size;
import dalvik.system.PathClassLoader;
import java.lang.reflect.Constructor;
@tdrkDev
tdrkDev / guide.md
Last active April 25, 2022 21:23
Installing Windows 10 on Meizu M6 Note

WARNING

At first I 'll say that Windows 10 will be booted in VM (VM will be running natively on phone).

Windows 10 is not usable for anything other than just having fun with the fact that it's booted on M6 note.

PHONE WILL LAG AND FREEZE A LOT WHILE WINDOWS IS RUNNING.

Guide

Requirements

--------- beginning of main
03-03 02:24:08.327 413 413 W auditd : type=2000 audit(0.0:1): initialized
03-03 02:24:11.643 413 413 I auditd : type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
03-03 02:24:11.665 1 1 I init : type=1400 audit(0.0:3): avc: denied { setcheckreqprot } for scontext=u:r:init:s0 tcontext=u:object_r:kernel:s0 tclass=security permissive=1
03-03 02:24:11.823 1 1 I init : type=1400 audit(0.0:4): avc: denied { module_request } for kmod="fs-functionfs" scontext=u:r:init:s0 tcontext=u:r:kernel:s0 tclass=system permissive=1
03-03 02:24:11.823 412 412 I kworker/u16:2: type=1400 audit(0.0:5): avc: denied { execute } for name="busybox" dev="rootfs" ino=13203 scontext=u:r:kernel:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1
03-03 02:24:11.823 412 412 I kworker/u16:2: type=1400 audit(0.0:6): avc: denied { execute_no_trans } for path="/sbin/busybox" dev="rootfs" ino=13203 scontext=u:r:kernel:s0 tcontext=u:object_r:rootfs:s0 tclass
[ 0.000000] OF: reserved mem: invalid size property in 'mem_dump_region' node.
[ 0.191337] smd_channel_probe_now: allocation table not initialized
[ 0.192192] smd_channel_probe_now: allocation table not initialized
[ 0.192715] smd_channel_probe_now: allocation table not initialized
[ 0.230100] msm8953-pinctrl 1000000.pinctrl: invalid resource
[ 0.255080] cpu-clock-8953 b114000.qcom,cpu-clock-8953: Get vdd-pwrcl regulator!!!
[ 0.306242] pll_is_pll_locked_8996: DSI PLL ndx=1 status=0 failed to Lock
[ 0.313250] arm-smmu 1c40000.arm,smmu-kgsl: Couldn't get clock: gpu_ahb_clk
[ 0.313848] arm-smmu 1e00000.qcom,iommu: found 32 context interrupt(s) but have 30 context banks. assuming 30 context interrupts.
[ 0.323818] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: Bus driver not ready.[ 0.324129] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: Bus driver not ready.[ 0.324553] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_cli
@tdrkDev
tdrkDev / m6 note R RIL log
Created September 6, 2021 15:55
SIM, IMEI, baseband version dead
This file has been truncated, but you can view the full file.
--------- beginning of kernel
03-19 09:24:44.701 0 0 I : Booting Linux on physical CPU 0x0
03-19 09:24:44.701 0 0 I : Linux version 4.9.273-meizusucks/6b5f1b118ba3++ (nobody@android-build) (Android (6877366 based on r383902b1) clang version 11.0.2 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79)) #56 SMP PREEMPT Sun Aug 15 17:06:22 MSK 2021
03-19 09:24:44.701 0 0 I Boot CPU: AArch64 Processor [410fd034]
03-19 09:24:44.701 0 0 I Machine : Qualcomm Technologies, Inc. MSM8953 + PMI8950 QRD SKU3
03-19 09:24:44.701 0 0 I core_ctl: disable_cpumask=0-7
03-19 09:24:44.701 0 0 I efi : Getting EFI parameters from FDT:
03-19 09:24:44.701 0 0 I efi : UEFI not found.
03-19 09:24:44.701 0 0 I Reserved memory: created CMA memory pool at 0x00000000c7800000, size 8 MiB
03-19 09:24:44.701 0 0 I OF : reserved mem: initialized node adsp_shmem_device_region@0xc0100000, compatible i
@tdrkDev
tdrkDev / Dart serial read with linux commands.dart
Created August 18, 2021 20:45
I know this is shitty and that it is not working.
import 'dart:async';
import 'dart:convert';
import 'dart:io';
class Serial2IO {
// Default: ttyUSB0
static final String _serialPort = "/dev/ttyUSB2";
// Request serial data via Linux commands... yeah...
static Future<Map<String, dynamic>?> request(
diff -ruN NVIDIA-Linux-x86_64-340.108/kernel/nv-drm.c Patchedfor510/kernel/nv-drm.c
--- NVIDIA-Linux-x86_64-340.108/kernel/nv-drm.c 2020-11-29 13:16:00.788410148 +0300
+++ Patched-for-5.10/kernel/nv-drm.c 2020-11-29 13:05:44.628654208 +0300
@@ -365,7 +365,7 @@
struct nv_gem_object *nv_obj = container_of(obj, struct nv_gem_object, base);
int page_count = obj->size >> PAGE_SHIFT;
- return drm_prime_pages_to_sg(nv_obj->pages, page_count);
+ return drm_prime_pages_to_sg(nv_obj->base.dev, nv_obj->pages, page_count);
}
This file has been truncated, but you can view the full file.
--------- beginning of kernel
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001e94) caused undefined instruction on CPU 3
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001e94) caused undefined instruction on CPU 2
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001eb5) caused undefined instruction on CPU 3
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001eb5) caused undefined instruction on CPU 2
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001e95) caused undefined instruction on CPU 3
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001e95) caused undefined instruction on CPU 2
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001ef0) caused undefined instruction on CPU 3
01-01 00:18:29.971 0 0 W hw-breakpoint: Debug register access (0xee001ef0) caused undefined instruction on CPU 2
01-01 00:18:29.971 0
#!/bin/bash
if [ $UID != "0" ]; then
echo "ERROR: You must run this script as root!"
exit 1
fi
echo "Install Java 8 for Android versions lower than Q? (y/N)"
echo -n "$0> "
read installJava
case "$installJava" in