Skip to content

Instantly share code, notes, and snippets.

@ISTweak
ISTweak / M5GFXtest.ino
Created April 4, 2022 08:57
M5GFXとM5.lcdの色の違い
#include <M5Stack.h>
#include <M5GFX.h>
const unsigned char sampleimg[16 * 16 * 2 + 1] =
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007"
drawCircleHelper(中心x, 中心y, 半径, 位置, 色);
90、180、270度の弧を描画
1:左上(90度)
2:右上(90度)
3:上(180度)
4:右下(90度)
5:左上右下(90度90度)
6:右(180度)
7:左下空き(270度)
8:左下(90度)
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="ISTweak/android_device_sony_dogo" path="device/sony/dogo" remote="github" revision="cm-13.0" />
<project name="ISTweak/android_device_sony_fusion3-common" path="device/sony/fusion3-common" remote="github" revision="cm-13.0" />
<project name="ISTweak/android_kernel_sony_apq8064" path="kernel/sony/apq8064" remote="github" revision="10.7.A.0.228" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_hardware_sony_thermanager" path="hardware/sony/thermanager" remote="github" />
<project name="CyanogenMod/android_external_busybox" path="external/busybox" remote="github" />
<project name="CyanogenMod/android_external_stlport" path="external/stlport" remote="github" />
<remove-project groups="pdk" name="CyanogenMod/android_bootable_recovery" path="bootable/recovery" />
//Z5 32.1.F.0.43
{ "SO-01H", "Linux version 3.10.84-perf-g19d6d92 (BuildUser@BuildHost) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Jan 25 22:47:42 2016",
{ (void*)CHECK_FLAGS_OFFSET(0xffffffc00194e590) },
(void*)0xffffffc00031191c, (void*)0xffffffc000302f38, (void*)0xffffffc001883b28,
(void*)0xffffffc001883930, (void*)0xffffffc00164ae40, (void*)0xffffffc00188047c },
static int __init enforcing_setup(char *str)
{
unsigned long enforcing;
if (!strict_strtoul(str, 0, &enforcing))
selinux_enforcing = enforcing ? 1 : 0;
return 1;
}
シンプルなenforcing_setupを追いかけます。
c0303a28 sel_write_enforce
c03048b4 selnl_notify_setenforce
c031153c selinux_status_update_setenforce
selinux_enforcing = new_value;
if (selinux_enforcing)
avc_ss_reset(0);
selnl_notify_setenforce(selinux_enforcing);
selinux_status_update_setenforce(selinux_enforcing);
@ISTweak
ISTweak / gist:c84874169293de94e0e9
Created September 17, 2014 13:38
とりあえず動いたっぽい
--- C:/Android/app/android_get_essential_address/main.c Wed Sep 17 20:56:43 2014
+++ C:/Android/app/android_get_essential_address_/main.c Wed Sep 17 22:28:26 2014
@@ -9,7 +9,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
-
+#include <dlfcn.h>
#include <sys/system_properties.h>
#include "device_database.h"
@ISTweak
ISTweak / gist:9281692
Created February 28, 2014 22:50
felica_uart_sync
--- a/include/linux/felica.h Sat Mar 01 07:44:14 2014
+++ b/include/linux/felica.h Sat Mar 01 07:05:39 2014
@@ -100,7 +100,7 @@
int felica_uart_close(struct inode *inode, struct file *file);
ssize_t felica_uart_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);
ssize_t felica_uart_write(struct file *file, const char __user *data, size_t len, loff_t *ppos);
-int felica_uart_sync(struct file *file, int datasync);
+int felica_uart_sync(struct file *file, loff_t start, loff_t end, int datasync);
long felica_uart_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
void felica_nl_init(void);
@ISTweak
ISTweak / gist:9025423
Created February 15, 2014 21:23
SDカードのマウント
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
index 81bdd10..e97283c 100644
--- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml
+++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -38,7 +38,14 @@
android:storageDescription="@string/storage_internal"
android:primary="true"
android:removable="false"
- android:allowMassStorage="true" />
+ android:allowMassStorage="false" />
@ISTweak
ISTweak / gist:7676903
Created November 27, 2013 14:50
パッチ取ってくる
<?php
$url = 'https://github.com/ISTweak/android_kernel_sharp_is05/commits/master';
set_time_limit(0);
foreach ( file($url) as $read ) {
if ( strpos($read, 'class="message"') !== false ) {
if ( preg_match('/.+<?\shref=[\'|"](.*?)[\'|"].*?>(.*?)<\/a>/', $read, $link) ) {
file_put_contents($link[2].'.patch', file_get_contents('https://github.com'.$link[1].'.patch'));
}
}