Skip to content

Instantly share code, notes, and snippets.

@naseer
naseer / ycm_extra_conf_kernel.py
Last active June 9, 2020 06:12
YCM configuration for the Linux kernel
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
@naseer
naseer / ycm_extra_conf.py
Last active September 1, 2019 11:57
YCM configuration for Android
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
@naseer
naseer / bugreport
Created December 3, 2014 23:01
Sample bugreport
This file has been truncated, but you can view the full file.
========================================================
== dumpstate: 2014-09-24 14:42:51
========================================================
Build: shamu-userdebug L LRW80I 1452039 dev-keys
Build fingerprint: 'google/shamu/shamu:L/LRW80I/1452039:userdebug/dev-keys'
Bootloader: 0x7040
Radio: mdm
Network: (unknown)
Kernel: Linux version 3.10.40-gc290ff1 (android-build@vpbs1.mtv.corp.google.com) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Wed Sep 17 17:55:39 UTC 2014
@naseer
naseer / bugreport.md
Last active August 29, 2015 14:10
Display bugreport

##About bugreports An Android bugreport is the most standard way in the Google team to report any bugs. Typically a bugreport is taken by default at the occurence of any symptom. The bugreport covers the necessary state information that occurred at the time of the issue. It includes the kernel log, the userspace logs, and other system state. It may also include the last kernel log that occurred if the report is take after a crash.

##Getting a bugreport adb bugreport > bugreport.txt

##Sections relevant to display debugging Please refer to the sample bugreport here Apart from the kernel log and the userspace log, the bugreport has

  • dumpsys surfaceflinger (search for DUMP OF SERVICE SurfaceFlinger) - The dumpsys dumps all of the layer information
@naseer
naseer / gist:2703848
Created May 15, 2012 18:10
Sed inline replace in makefiles
find . -name "*.mk" | xargs -I{} sed -i "s/something/something else/g" {}
@naseer
naseer / gist:2703837
Created May 15, 2012 18:09
Media Scan
# Push media to sdcard and run mediascanner
adb shell am start -n com.android.development/.MediaScannerActivity
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"