Skip to content

Instantly share code, notes, and snippets.

@ISTweak
ISTweak / gist:5841340
Created June 22, 2013 15:46
gcc4.7.4でも起動しない
diff --git a/Makefile b/Makefile
index 7108249..ce504d3 100644
--- a/Makefile
+++ b/Makefile
@@ -171,6 +171,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh[234].*/sh/ )
+SUBARCH := arm
# Cross compiling and selecting different set of gcc/bin-utils
# http://cubeundcube.blogspot.jp/2013/07/xperia-gx-so-04d-sx-so-05djelly.html
# 上記のツールのソースからアドレスをコピペしました
# main.cはrootでコマンド実行出来るようにてきとーにコピペしました
#
--- android_device_database/device_database.c Thu Jul 04 09:03:00 2013
+++ device_database/device_database.c Wed Jul 03 23:47:26 2013
@@ -674,6 +674,17 @@
},
{
@ISTweak
ISTweak / gist:5927179
Created July 4, 2013 12:15
IS15SH010004
--- dev1534.tmp/device_database-8362d21-left.c Thu Jul 04 21:11:24 2013
+++ device_database/device_database.c Thu Jul 04 21:03:20 2013
@@ -273,6 +273,17 @@
},
{
+ .device_id = DEVICE_IS15SH_01_00_04,
+ .device = "IS15SH",
+ .build_id = "01.00.04",
+
@ISTweak
ISTweak / gist:5942477
Created July 7, 2013 06:00
IS15SH MIYABI
<4>[ 102.838165] mmcblk0:1: protect status -30 sector 282624, nr 8, blocks 8
<3>[ 102.838195] end_request: I/O error, dev mmcblk0, sector 282624
<3>[ 102.838256] Buffer I/O error on device mmcblk0p11, logical block 0
<4>[ 102.838317] lost page write due to I/O error on mmcblk0p11
<6>[ 102.838470] EXT4-fs (mmcblk0p11): re-mounted. Opts: user_xattr,barrier=1,data=ordered
<4>[ 120.052032] mmcblk0:1: protect status -30 sector 287232, nr 8, blocks 8
<3>[ 120.052093] end_request: I/O error, dev mmcblk0, sector 287232
<3>[ 120.052124] Buffer I/O error on device mmcblk0p11, logical block 576
<4>[ 120.052185] lost page write due to I/O error on mmcblk0p11
<3>[ 120.052307] JBD2: I/O error detected when updating journal superblock for mmcblk0p11-8.
@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'));
}
}
@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: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: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"
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);
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を追いかけます。