Skip to content

Instantly share code, notes, and snippets.


Christopher Piekarski chris-piekarski

View GitHub Profile
View android-4.1.2_r1_to_8.0.0_r36.rst
import rglob


rglob.lcount("/home/chris/aosp_android-1.6_r1.4/", "*.java")
rglob.lcount("/home/chris/aosp_android-1.6_r1.4/", "*.cpp")
chris-piekarski / pre_commit_reject_wildcard_imports
Created Feb 27, 2019
Git pre-commit hook to check for wildcard imports
View pre_commit_reject_wildcard_imports
# cp to .git/hooks
# chomd +x .git/hooks/pre_commit
# This hook checks for wildcard imports (other than kotlinx) when added to staging.
# TODO: add ktlint check
chris-piekarski / aosp_app_start_profiler
Last active Jan 31, 2022
Android app startup profiler
View aosp_app_start_profiler
From AOSP page:
"Analyzing app startup time
Use $ adb shell am start with the -P or --start-profiler option to run the profiler when your app starts.
This will start the profiler almost immediately after your process is forked from zygote, before any of your code is loaded into it."
chris-piekarski / aosp_meminfo_commands
Last active Jan 27, 2022
AOSP Memory/Content Related ADB Commands/Call Logs
View aosp_meminfo_commands
adb shell dumpsys procstats --hours 3
adb shell dumpsys meminfo
adb shell dumpsys activity
#get content providers
adb shell dumpsys | grep Provider{ | grep
#call logs
adb shell content query --uri content://call_log/calls
chris-piekarski / start_stop_services_via_adb
Last active Dec 22, 2021
android am force-stop and start services
View start_stop_services_via_adb
adb -d shell am force-stop
adb -d shell am startservice
#list intent receivers
adb shell dumpsys package com.ubnt.restapi | grep intent
adb shell pm list packages
#force factory reset
adb shell "am broadcast -n "" -a android.intent.action.FACTORY_RESET"
chris-piekarski / system_aosp_libs
Created Aug 4, 2014
Adding system shared lib to AOSP
View system_aosp_libs
See device/sample/frameworks/PlatformLibrary/README.txt
Platform Library Example
This directory contains a full example of writing your own Android platform
shared library, without changing the Android framework. It also shows how to
write JNI code for incorporating native code into the library, and a client
application that uses the library.
View gist:852572c81e195b930f297dc79c3df10f
alias randman='dir="/bin"; man $(ls $dir |sed -n "$(echo $(( $RANDOM % $(ls $dir |wc -l | awk "{ print $1; }" ) + 1 )) )p")'
chris-piekarski / adb_aosp_content
Last active Apr 12, 2021
ADB Content Command
View adb_aosp_content
adb shell content delete --uri content://settings/settings/pointer_speed
adb shell content query --uri content://settings/settings
adb shell content insert --uri content://settings/secure --bind name:s:my_number --bind value:i:24
See "package;" in /frameworks/base/cmds/content/
Usese "final class ContentProviderProxy implements IContentProvider" in
chris-piekarski / build_opencv_ARM_cross
Created Mar 23, 2020 — forked from hrshovon/build_opencv_ARM_cross
Cross compile opencv3.3.0 for your raspberry pi and similar ARM devices with python support
View build_opencv_ARM_cross
This is a note on how to cross compile opencv for pretty much any ARM device(HardFP supported in this case) and deploy. Native
compiling in ARM devices can be painfully slow and they seem to hang often during build(mine got stuck at 43%). So if you happen
to have a desktop/laptop/server running ubuntu or similar linux distro, u can build opencv in fractionth of the time taken for
native compiling without any issues.
Building opencv3 with TBB and NEON and VFP support can boost opencv performance. Thanks to Adrian at pyimagesearch for pointing
that out.
Both my PC and target machine aka orange pi zero are running ubuntu 16.04 with python2.7 and python 3.5.
Let us use the term "build machine" for your PC where you are building opencv and "target machine" for the ARM single board computer.
1.Run the following commands in both machines(I think installing these in target machine only would do) to install the necessary libraries etc.(mine worked with them,so they should be enough
chris-piekarski / repo_forall_path_example
Last active May 28, 2019
List remote project and local paths using Android repo script.
View repo_forall_path_example
repo forall -c 'echo $REPO_PROJECT $REPO_PATH'
platform/abi/cpp abi/cpp
platform/bionic bionic
device/fsl/bootloader/uboot bootable/bootloader/uboot-imx
platform/bootable/recovery bootable/recovery
platform/build build
platform/cts cts
platform/dalvik dalvik