Skip to content

Instantly share code, notes, and snippets.

View libxzr's full-sized avatar

LibXZR libxzr

  • localhost
  • 12:33 (UTC +08:00)
View GitHub Profile
First go here:
https://wiki.codeaurora.org/xwiki/bin/QAEP/release
This site gives information about all msm soc release details with tag + android version
Search your msm here.. Check the latest one and look for correct android version and mark that tag.
Now open one of the following links (dependent on your linux kernel version)
@libxzr
libxzr / calling-service
Last active October 21, 2018 05:08
Android floating window
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(Build.VERSION.SDK_INT>=23){
if(Settings.canDrawOverlays(context)){
context.startService(new Intent(MainActivity.THIS, PerfmonService.class));
}
else {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
intent.setData(Uri.parse("package:" + context.getPackageName()));

Introduction

Google has traditionally been against upgrading the compiler as it comes with new warnings and potentially changes behavior. However, these are actually good reasons to upgrade, they help shake out undefined behavior.

Process

In order to compile with a newer version of GCC, you'll need to do a few modifications to your kernel in addition to a new toolchain. I recommend using the ones available from Bootlin.

  1. Remove gcc-wrapper and any instances of -Werror: gcc-wrapper is CAF's shitty way of enabling -Werror, which is unnecessary since regular -Werror will suffice. We need to remove it for the time being because there will be new warnings to fix. Pick Google's revert of it (3.18, 4.4) then remove any other instances of -Werror (such as in prima, qcacld-2.0, and qc
@libxzr
libxzr / code
Created June 22, 2019 14:06
Android studio external tools running javah
三个参数:
Program:$JDKPath$\bin\javah.exe (设置jdk中javah的路径)
Arguments:-classpath $ModuleFileDir$\src\main\java -jni -d
$ModuleFileDir$\src\main\jni $FileClass$
-classpath java代码类目录 -jni -d h头文件生成的目录 $FileClass$