Skip to content

Instantly share code, notes, and snippets.

diff --git a/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt b/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt
index 16ac44a..61d77ca 100644
--- a/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt
+++ b/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt
@@ -55,7 +55,11 @@ class SearchRepositoriesViewModel(private val repository: GithubRepository) : Vi
if (before == null) {
// we're at the beginning of the list
- return@insertSeparators UiModel.SeparatorItem("${after.roundedStarCount}0.000+ stars")
+ if (after.roundedStarCount >= 1) {
* Download magisk.zip and unzip
* Rename x86/magiskboot to x86/magiskboot.real
* Add x86/magiskboot
* Add x86/mboot (https://github.com/shakalaca/MagiskOnIntelDevices/raw/master/mboot)
* ZIP and update from MagiskManager custom channel (modify https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/debug.json)
@shakalaca
shakalaca / 2-mount
Last active March 28, 2020 03:59
init in initrd.img of Android x86 project
#
# By Chih-Wei Huang <cwhuang@linux.org.tw>
# Last updated 2017/04/23
#
# License: GNU Public License
# We explicitely grant the right to use the scripts
# with Android-x86 project.
#
mount_data()
diff --git a/device.mk b/device.mk
index ccae932..bd368db 100644
--- a/device.mk
+++ b/device.mk
@@ -243,6 +243,10 @@ PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/rootdir/init.qcom.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.usb.rc \
$(DEVICE_PATH)/rootdir/ueventd.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc
+# Ramdisk (First stage mount)
+PRODUCT_COPY_FILES += \
diff --git a/device.mk b/device.mk
index f1399b1..4cfc595 100644
--- a/device.mk
+++ b/device.mk
@@ -47,6 +47,9 @@ PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile
# for gms modules.
PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/rootdir/etc/fstab.mako:$(TARGET_COPY_OUT_RAMDISK)/fstab.mako
@shakalaca
shakalaca / Vagrantfile
Created January 18, 2020 07:08
Vagrant setup for building Magisk
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
#include <dirent.h>
#include <stdio.h>
#include <unistd.h>
int main() {
DIR* dir = opendir(".");
int ret = 0;
char buf[4096];
symlink("/root/v86d", "test");
@shakalaca
shakalaca / twinapps_required_apps.xml
Created November 11, 2019 07:31
給 ZenUI 4.0 之後應用分身使用的 app 支援設定檔
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="twinapps_required_apps">
<item>com.android.vending</item>
<item>com.google.android.gms</item>
<item>jp.naver.line.android|Line: Free Calls &amp; Messages</item>
<item>com.facebook.katana|Facebook</item>
<item>com.facebook.orca|Messenger - Text and Video Chat for Free</item>
<item>com.tencent.mm|WeChat</item>
<item>com.whatsapp|WhatsApp Messenger</item>
<?xml version="1.0" encoding="utf-8"?>
<config>
<feature name="com.google.android.feature.PIXEL_2019_EXPERIENCE" />
</config>
@shakalaca
shakalaca / cpio.patch
Created August 20, 2019 11:05
build mkbootfs (Android Q)
diff --git a/cpio/Makefile b/cpio/Makefile
new file mode 100644
index 000000000..c6b24f135
--- /dev/null
+++ b/cpio/Makefile
@@ -0,0 +1,42 @@
+####################
+# COMPILER
+####################
+CC=gcc