ipython
import rglob
android-1.6_r1.4
rglob.lcount("/home/chris/aosp_android-1.6_r1.4/", "*.java")
2687649
rglob.lcount("/home/chris/aosp_android-1.6_r1.4/", "*.cpp")
1994029
#!/bin/sh | |
# | |
# 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 | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' |
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." |
adb shell dumpsys procstats --hours 3 | |
adb shell dumpsys meminfo | |
adb shell dumpsys activity | |
#get com.android content providers | |
adb shell dumpsys | grep Provider{ | grep com.android | |
#call logs | |
adb shell content query --uri content://call_log/calls |
adb -d shell am force-stop com.android.Settings | |
adb -d shell am startservice com.android.Settings/com.android.Settings.ServiceName | |
#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 "com.android.server/com.android.server.MasterClearReceiver" -a android.intent.action.FACTORY_RESET" |
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. |
alias randman='dir="/bin"; man $(ls $dir |sed -n "$(echo $(( $RANDOM % $(ls $dir |wc -l | awk "{ print $1; }" ) + 1 )) )p")' |
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 com.android.commands.content;" in /frameworks/base/cmds/content/ | |
Usese "final class ContentProviderProxy implements IContentProvider" in ContentProviderProxy.java |
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 |
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 |