All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
This file contains 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
#include <unistd.h> | |
#include <string> | |
#include <cinttypes> | |
#include <android/log.h> | |
#include <sys/system_properties.h> | |
using namespace std; | |
extern "C" { |
This file contains 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
/* Partial implementation from https://zhuanlan.zhihu.com/p/33612593 */ | |
import _ from 'lodash'; | |
/* 标点 */ | |
const punctuationRegex = /\p{Punctuation}/u; | |
/* 空格 */ | |
const spaceRegex = /\p{Separator}/u; | |
/* CJK 字符,中日韩 */ | |
const cjkRegex = /\p{Script=Han}|\p{Script=Katakana}|\p{Script=Hiragana}|\p{Script=Hangul}/u; |
This file contains 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
token = new Binder(); | |
try { | |
Context _context = android.app.ActivityThread.systemMain().getSystemContext(); | |
final Context context = new ContextWrapper(_context) { | |
@Override | |
public Object getSystemService(String name) { | |
if (Context.WINDOW_SERVICE.equals(name)) { | |
WindowManager wm = (WindowManager) super.getSystemService(name); | |
if (wm != null) { | |
((android.view.WindowManagerImpl) wm).setDefaultToken(token); |
This file contains 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
/* | |
* Copyright 2017 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | |
* except in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the | |
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
Convention | Example | General Meaning |
---|---|---|
to_*() |
str::to_string() |
A conversion from one type to another that may have an allocation or computation cost. Usually a Borrowed type to Owned type. |
as_*() |
String::as_str() |
Convert an Owned type into a Borrowed type. It is usually cheap (maybe even zero-cost) to use this function. |
into_*() |
String::into_bytes() |
Consume a type T and convert it into an Owned type U . |
from_*() |
SocketAddr::from_str() |
Create an Owned type from an Owned or Borrowed type. |
*_mut() |
str::split_at_mut() |
Denotes a mutable reference. |
try_*() |
usize::try_from() |
Method will return a Result or Option type. Usually Result . |
with_*() |
Vec::with_capacity() |
A constructor that has one or more parameters used to configure the type. |
This file contains 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
#include <linux/module.h> | |
#include <linux/printk.h> | |
#include <linux/fs.h> | |
#include <linux/sched.h> | |
#include <asm/unistd.h> | |
#include <asm/pgtable_types.h> | |
#include <linux/highmem.h> | |
#include "hook_function_ptr.h" |