Skip to content

Instantly share code, notes, and snippets.

// apply this script into the build.gradle of modules which you have applied protobuf plugin
// also, this can be used to workaround others plugins not supporting macOS M1 soc, e.g. AndResGuard
// to support AndResGuard, append `|| it.name == "AndResGuardLocatorSevenZip"`
// to the configuration matching condition sentence
configurations.matching {
it.name.startsWith("protobufToolsLocator_")
}.configureEach {
withDependencies { deps ->
deps.matching { it instanceof ExternalDependency }.configureEach {
it.artifacts.each {
@solohsu
solohsu / stacktrace.txt
Created February 28, 2019 03:46
EdXposed IllegalAccessError
9400-9400/? E/AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
java.lang.IllegalAccessError: Illegal class access: 'EdHooker89' attempting to access 'com.android.server.usage.AppStandbyController$Injector' (declaration of 'EdHooker89' appears in Anonymous-DexFile@0x7bfad7f000-0x7bfad7f8ac)
at EdHooker89.hook(Unknown Source:116)
at com.android.server.usage.AppStandbyController.<init>(AppStandbyController.java:312)
at com.android.server.usage.UsageStatsService.onStart(UsageStatsService.java:165)
at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:126)
at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:113)
at com.android.server.SystemServer.startCoreServices(SystemServer.java:736)
at com.android.server.SystemServer.run(SystemServer.java:456)
at com.android.server.SystemServer.main(SystemServer.java:302)
@solohsu
solohsu / ActivityThread.java
Last active February 19, 2019 18:06
OnePlus Android Pie bootloop
public static boolean inCompatConfigList(int type, String verifyStr) {
try {
return getPackageManager().inCompatConfigList(type, verifyStr);
} catch (Exception e) {
return false;
} catch (LinkageError e2) {
return false;
}
}
2019-02-17 21:27:11.069 14662-14662/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 84)
2019-02-17 21:27:11.069 14662-14662/? E/ServiceManager: error in getService
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:1177)
at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:125)
at android.os.ServiceManager.rawGetService(ServiceManager.java:253)
at android.os.ServiceManager.getService(ServiceManager.java:124)
at android.app.ActivityThread.getPackageManager(ActivityThread.java:2038)
at android.app.ActivityThread.inCompatConfigList(ActivityThread.java:6905)
@solohsu
solohsu / gist:ae3ea33e1af3ba186861ef96198e4399
Created February 13, 2019 11:43
Lucky Patcher bootloop
692-692/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 84)
692-692/? E/ServiceManager: error in getService
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:1177)
at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:125)
at android.os.ServiceManager.rawGetService(ServiceManager.java:253)
at android.os.ServiceManager.getService(ServiceManager.java:124)
at android.app.ActivityThread.getPackageManager(ActivityThread.java:2038)
at android.app.ActivityThread.inCompatConfigList(ActivityThread.java:6905)
@solohsu
solohsu / GC_CRASH.txt
Created January 21, 2019 18:50
Crash logs
--------- beginning of crash
2019-01-22 02:38:55.043 8033-8043/? A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x92f7 in tid 8043 (HeapTaskDaemon), pid 8033 (com.tencent.mm)
2019-01-22 02:38:54.655 8033-8041/? W/System: A resource failed to call close.
2019-01-22 02:38:55.102 8086-8086/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2019-01-22 02:38:55.103 961-961/? I//system/bin/tombstoned: received crash request for pid 8043
2019-01-22 02:38:55.104 8086-8086/? I/crash_dump32: performing dump of process 8033 (target tid = 8043)
2019-01-22 02:38:55.132 8086-8086/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-01-22 02:38:55.132 8086-8086/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus5T/OnePlus5T:9/PKQ1.180716.001/1901020001:user/release-keys'
2019-01-22 02:38:55.132 8086-8086/? A/DEBUG: Revision: '0'
2019-01-22 02:38:55.132 8086-8086/? A/DEBUG: ABI: 'arm'
@solohsu
solohsu / mm_qrcode.png
Last active January 21, 2019 06:00
Misc
mm_qrcode.png
/*
Copyright (C) 2016-2017 Lawiusz Fras
This file is part of lockscreenvisualizerxposed.
lockscreenvisualizerxposed is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
lockscreenvisualizerxposed 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
@solohsu
solohsu / WidthAutoAdjustLinearLayout.java
Created September 9, 2016 07:42
WidthAutoAdjustLinearLayout
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
/**
* 根据可以完整显示的所有子view的总宽度自动调整自身的宽度.
* <p/>
* 当第n个childView可以完整显示,第n+1个childView无法完整显示时,不显示n+1及其以后的childView,
* 并将宽度调整为n个childView的总宽度.