diff --git "a/_posts/2021-06-05-\350\247\243\345\214\205Arcaea_NS.md" "b/_posts/2021-06-05-\350\247\243\345\214\205Arcaea_NS.md" index 0b86dde..f2c9470 100644 --- "a/_posts/2021-06-05-\350\247\243\345\214\205Arcaea_NS.md" +++ "b/_posts/2021-06-05-\350\247\243\345\214\205Arcaea_NS.md" @@ -8,7 +8,7 @@ redirect_from: --- ### 你需要的文件 -([点我下载](/files/ARCAEA_SWITCH_DEPACK.zip)) +([点我下载](https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/ARCAEA_SWITCH_DEPACK.zip)) ![需要的文件列表:我提供的工具箱、Arcaea的nsp文件、我提供的py文件](https://i.loli.net/2021/06/05/Czkpi627l4yFdTv.png) diff --git "a/_posts/2021-07-25-Arcaea\347\232\204\344\270\200\344\272\233\347\240\264\350\247\243\350\256\260\345\275\225.md" "b/_posts/2021-07-25-Arcaea\347\232\204\344\270\200\344\272\233\347\240\264\350\247\243\350\256\260\345\275\225.md" index d16047a..fc41d40 100644 --- "a/_posts/2021-07-25-Arcaea\347\232\204\344\270\200\344\272\233\347\240\264\350\247\243\350\256\260\345\275\225.md" +++ "b/_posts/2021-07-25-Arcaea\347\232\204\344\270\200\344\272\233\347\240\264\350\247\243\350\256\260\345\275\225.md" @@ -48,7 +48,7 @@ redirect_from: 由于目标是`aarch64`架构,所以需要多架构的gdb(这也就是不用Windows的原因)。执行`sudo apt install gdb-multiarch`,随后执行`gdb-multiarch`以确定安装成功 -gdbserver可以在[Android NDK](https://developer.android.google.cn/ndk/downloads?hl=zh-cn)的`prebuilt/android-arm64/gdbserver/`目录下找到,也可以用[我上传的版本](/files/gdbserver)(gdbserver 7.11 for arm64,来自NDK 19c for linux) +gdbserver可以在[Android NDK](https://developer.android.google.cn/ndk/downloads?hl=zh-cn)的`prebuilt/android-arm64/gdbserver/`目录下找到,也可以用[我上传的版本](https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/gdbserver)(gdbserver 7.11 for arm64,来自NDK 19c for linux) 把gdbserver丢到`/data/local/tmp/`目录下,赋予777权限 diff --git "a/_posts/2022-12-20-\344\270\272\345\256\211\345\215\223\347\274\226\350\257\221SELinux\347\233\270\345\205\263\345\267\245\345\205\267.md" "b/_posts/2022-12-20-\344\270\272\345\256\211\345\215\223\347\274\226\350\257\221SELinux\347\233\270\345\205\263\345\267\245\345\205\267.md" index f65dc1a..cb0d1f0 100644 --- "a/_posts/2022-12-20-\344\270\272\345\256\211\345\215\223\347\274\226\350\257\221SELinux\347\233\270\345\205\263\345\267\245\345\205\267.md" +++ "b/_posts/2022-12-20-\344\270\272\345\256\211\345\215\223\347\274\226\350\257\221SELinux\347\233\270\345\205\263\345\267\245\345\205\267.md" @@ -31,7 +31,7 @@ cd selinux 编译过程会遇到一堆坑,这里我已经整合成了diff,可以如下方式打补丁: ```shell -wget https://young-lord.github.io/files/selinux-compile-termux.diff +wget https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/selinux-compile-termux.diff git apply selinux-compile-termux.diff ``` diff --git "a/_posts/2023-01-31-\345\260\217\347\261\263Mix2S\344\277\256\346\224\271\345\274\200\346\234\272\347\254\254\344\270\200\345\261\217.md" "b/_posts/2023-01-31-\345\260\217\347\261\263Mix2S\344\277\256\346\224\271\345\274\200\346\234\272\347\254\254\344\270\200\345\261\217.md" index 6b286b3..f9de7e7 100644 --- "a/_posts/2023-01-31-\345\260\217\347\261\263Mix2S\344\277\256\346\224\271\345\274\200\346\234\272\347\254\254\344\270\200\345\261\217.md" +++ "b/_posts/2023-01-31-\345\260\217\347\261\263Mix2S\344\277\256\346\224\271\345\274\200\346\234\272\347\254\254\344\270\200\345\261\217.md" @@ -21,7 +21,7 @@ su -c dd if=/dev/block/by-name/logo of=logo.orig.bak 在Termux中执行以下操作前,请确保Termux已经安装Python 3并且被授予了root权限。 -下载[这个文件](/files/mix2s_logo_modify.py),在与此文件相同目录放置以下文件(不放置则表示不替换此项)。**注意,此处的bmp文件尺寸必须与原文件尺寸一致,色深必须为24bit!** +下载[这个文件](https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/mix2s_logo_modify.py),在与此文件相同目录放置以下文件(不放置则表示不替换此项)。**注意,此处的bmp文件尺寸必须与原文件尺寸一致,色深必须为24bit!** - logo1.bmp(最早显示,没有“已解锁”标志的第一屏)(1080x2160,竖向) - logo2.bmp(在logo1.bmp大概0.2秒后显示,有“已解锁”标志的第一屏)(1080x2160,竖向) @@ -41,7 +41,7 @@ python3 mix2s_logo_modify.py 一些相关命令: ```shell -wget https://young-lord.github.io/files/mix2s_logo_modify.py +wget https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/mix2s_logo_modify.py convert logo1.png logo1.bmp mogrify -format bmp *.png exiftool *.bmp diff --git "a/_posts/2023-07-10-\345\256\211\345\215\223\344\275\277\347\224\250PN532\350\257\273\345\206\231NFC.md" "b/_posts/2023-07-10-\345\256\211\345\215\223\344\275\277\347\224\250PN532\350\257\273\345\206\231NFC.md" index 2036eab..da26752 100644 --- "a/_posts/2023-07-10-\345\256\211\345\215\223\344\275\277\347\224\250PN532\350\257\273\345\206\231NFC.md" +++ "b/_posts/2023-07-10-\345\256\211\345\215\223\344\275\277\347\224\250PN532\350\257\273\345\206\231NFC.md" @@ -168,11 +168,11 @@ make make完成后,你可以得到`client/`目录,`cd`进入此目录。 -下载`txt_to_bin.py`(本文件由Copilot Chat转换为Python 3代码),并将`0x1111aaaa_003A.txt`转换为`1111aaaa_generated.bin`,重命名为`nonces.bin`丢到`client/`目录下。 +下载[nfc_txt_to_bin.py](https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/nfc_txttobin.py),并将`0x1111aaaa_003A.txt`转换为`1111aaaa_generated.bin`,重命名为`nonces.bin`丢到`client/`目录下。 ```shell cd client -wget https://young-lord.github.io/files/nfc_txttobin.py +wget https://github.com/Young-Lord/Young-Lord.github.io/releases/download/assets/nfc_txttobin.py python3 nfc_txttobin.py 0x1111aaaa_003A.txt 1111aaaa mv 1111aaaa_generated.bin nonces.bin # 进入交互式命令行,串口号相关报错不用理 diff --git a/files/ARCAEA_SWITCH_DEPACK.zip b/files/ARCAEA_SWITCH_DEPACK.zip deleted file mode 100644 index c8ed835..0000000 Binary files a/files/ARCAEA_SWITCH_DEPACK.zip and /dev/null differ diff --git a/files/gdbserver b/files/gdbserver deleted file mode 100644 index 48dfff9..0000000 Binary files a/files/gdbserver and /dev/null differ diff --git a/files/mix2s_logo_modify.py b/files/mix2s_logo_modify.py deleted file mode 100755 index 32163e7..0000000 --- a/files/mix2s_logo_modify.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/python3 -import os -OFFSET_MIX_LOCKED = 20480 -OFFSET_MIX_UNLOCKED = 9076736 -OFFSET_FASTBOOT = 7020544 # 注意这个尺寸比较小 -OFFSET_BROKEN = 16076800 -files = (OFFSET_MIX_LOCKED,OFFSET_MIX_UNLOCKED,OFFSET_FASTBOOT,OFFSET_BROKEN) -temp_file ="logo_orig_py" -os.system(f"su -c dd if=/dev/block/by-name/logo of={temp_file}") -os.system(f"su -c chmod 666 {temp_file}") -ofa=9076736 -f1=open(temp_file,"r+b") -for i in range(len(files)): - newfile = f"logo{i+1}.bmp" - if os.path.isfile(newfile): - f2=open(newfile,"rb") - kk=f2.read() - f2.close() - f1.seek(files[i]) - f1.write(kk) - else: - print(newfile, "not found, pass.") -f1.close(); -os.system(f"su -c dd of=/dev/block/by-name/logo if={temp_file}") - -""" -su -c dd if=/dev/block/by-name/logo of=logo_orig_py -# binwalk logo_orig_py - -python - -o=[20480, 9076736, 7020544, 16076800] -f1=open("logo_orig_py","rb") -for i in o: - f2=open(f"logo_{i}.bmp","wb") - f1.seek(i) - f2.write(f1.read()) - f2.close() - -f1.close() -exit() - -file *.bmp -""" \ No newline at end of file diff --git a/files/nfc_txttobin.py b/files/nfc_txttobin.py deleted file mode 100644 index 60eb1fe..0000000 --- a/files/nfc_txttobin.py +++ /dev/null @@ -1,59 +0,0 @@ -import sys -if len(sys.argv) < 3: - print("Usage: txttobin.py ") - print("Example: txttobin.py 0x7052c102_003B.txt 7052c102") - sys.exit(1) - -data = open(sys.argv[1], 'rb').readlines() -uid = sys.argv[2] -def parity(x): - return ("{0:08b}".format(x).count('1') & 1) - -fp = open(uid+'_generated.bin','wb') -fp.write(bytes.fromhex(uid)+b"\x00"*2) -bits = 0 -pbits = 0 -for l in data: - if bits == 8: - fp.write(bytes([pbits])) - bits = 0 - pbits = 0 - hexbytes = list(filter(None, l.strip().split(b' '))) - bits += 4 - for x in hexbytes: - b = int(x.replace(b'!', b''), 16) - p = parity(b) - if b'!' not in x: - p^=1 - pbits <<= 1 - pbits |= p - fp.write(bytes([b])) - -''' -Modified by GitHub @Young-Lord, https://young-lord.github.io - -License -------- - -MIT license - -Copyright (c) 2015-2016 Aram Verstegen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -''' \ No newline at end of file diff --git a/files/selinux-compile-termux.diff b/files/selinux-compile-termux.diff deleted file mode 100644 index c58a3fd..0000000 --- a/files/selinux-compile-termux.diff +++ /dev/null @@ -1,184 +0,0 @@ -diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile -index 04bf4f2..b656718 100644 ---- a/libselinux/src/Makefile -+++ b/libselinux/src/Makefile -@@ -86,8 +86,8 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi - -Wno-missing-field-initializers -Wno-sign-compare \ - -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) \ - -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \ -- -fasynchronous-unwind-tables -fdiagnostics-show-option -funit-at-a-time \ -- -Werror -Wno-aggregate-return -Wno-redundant-decls \ -+ -fasynchronous-unwind-tables -fdiagnostics-show-option \ -+ -Wno-aggregate-return -Wno-redundant-decls -Wno-int-conversion -fPIC \ - $(EXTRA_CFLAGS) - - LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=libselinux.map,-z,defs,-z,relro -@@ -174,8 +174,8 @@ $(SWIGRUBYCOUT): $(SWIGRUBYIF) - install: all - test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR) - install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR) -- test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR) -- install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR) -+# test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR) -+# install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR) - test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig - install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig - ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET) -diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c -index 9dd6be8..3486ce1 100644 ---- a/libselinux/src/selinux_restorecon.c -+++ b/libselinux/src/selinux_restorecon.c -@@ -6,6 +6,7 @@ - * See selinux_restorecon(3) for details. - */ - -+#include "strverscmp.c" - #include - #include - #include -diff --git a/libselinux/src/strverscmp.c b/libselinux/src/strverscmp.c -new file mode 100644 -index 0000000..34fecff ---- /dev/null -+++ b/libselinux/src/strverscmp.c -@@ -0,0 +1,112 @@ -+/* Compare strings while treating digits characters numerically. -+ Copyright (C) 1997-2022 Free Software Foundation, Inc. -+ This file is part of the libiberty library. -+ Contributed by Jean-François Bignolles , 1997. -+ -+ Libiberty is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ Libiberty is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ 02110-1301 USA. */ -+ -+ -+/* states: S_N: normal, S_I: comparing integral part, S_F: comparing -+ fractional parts, S_Z: idem but with leading Zeroes only */ -+#define S_N 0x0 -+#define S_I 0x4 -+#define S_F 0x8 -+#define S_Z 0xC -+ -+/* result_type: CMP: return diff; LEN: compare using len_diff/diff */ -+#define CMP 2 -+#define LEN 3 -+ -+ -+/* Compare S1 and S2 as strings holding indices/version numbers, -+ returning less than, equal to or greater than zero if S1 is less than, -+ equal to or greater than S2 (for more info, see the Glibc texinfo doc). */ -+ -+static int ISDIGIT(const char c1){ -+/*IT RUNS AND THATS ENOUGH*/ -+if('0'<=c1 && c1<='9'){return 0;} -+return 1; -+} -+ -+static int -+strverscmp (const char *s1, const char *s2) -+{ -+ const unsigned char *p1 = (const unsigned char *) s1; -+ const unsigned char *p2 = (const unsigned char *) s2; -+ unsigned char c1, c2; -+ int state; -+ int diff; -+ -+ /* Symbol(s) 0 [1-9] others (padding) -+ Transition (10) 0 (01) d (00) x (11) - */ -+ static const unsigned int next_state[] = -+ { -+ /* state x d 0 - */ -+ /* S_N */ S_N, S_I, S_Z, S_N, -+ /* S_I */ S_N, S_I, S_I, S_I, -+ /* S_F */ S_N, S_F, S_F, S_F, -+ /* S_Z */ S_N, S_F, S_Z, S_Z -+ }; -+ -+ static const int result_type[] = -+ { -+ /* state x/x x/d x/0 x/- d/x d/d d/0 d/- -+ 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */ -+ -+ /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, -+ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, -+ /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP, -+ +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, -+ /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, -+ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, -+ /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP, -+ -1, CMP, CMP, CMP -+ }; -+ -+ if (p1 == p2) -+ return 0; -+ -+ c1 = *p1++; -+ c2 = *p2++; -+ /* Hint: '0' is a digit too. */ -+ state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0)); -+ -+ while ((diff = c1 - c2) == 0 && c1 != '\0') -+ { -+ state = next_state[state]; -+ c1 = *p1++; -+ c2 = *p2++; -+ state |= (c1 == '0') + (ISDIGIT (c1) != 0); -+ } -+ -+ state = result_type[state << 2 | (((c2 == '0') + (ISDIGIT (c2) != 0)))]; -+ -+ switch (state) -+ { -+ case CMP: -+ return diff; -+ -+ case LEN: -+ while (ISDIGIT (*p1++)) -+ if (!ISDIGIT (*p2++)) -+ return 1; -+ -+ return ISDIGIT (*p2) ? -1 : diff; -+ -+ default: -+ return state; -+ } -+} -diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile -index 801066c..f3cedc1 100644 ---- a/libselinux/utils/Makefile -+++ b/libselinux/utils/Makefile -@@ -32,7 +32,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi - -Wno-missing-field-initializers -Wno-sign-compare \ - -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \ - -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \ -- -fasynchronous-unwind-tables -fdiagnostics-show-option -funit-at-a-time \ -+ -fasynchronous-unwind-tables -fdiagnostics-show-option \ - -Werror -Wno-aggregate-return -Wno-redundant-decls -Wstrict-overflow=5 \ - $(EXTRA_CFLAGS) - -diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile -index 13410c6..4a49511 100644 ---- a/libsepol/src/Makefile -+++ b/libsepol/src/Makefile -@@ -87,8 +87,8 @@ endif - install: all - test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR) - install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR) -- test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR) -- install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR) -+# test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR) -+# install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR) - test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig - install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig - $(LN) -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)