Skip to content

Instantly share code, notes, and snippets.

View pankajgangwar's full-sized avatar
🏠
Working from home

Pankaj Kumar pankajgangwar

🏠
Working from home
View GitHub Profile
@pankajgangwar
pankajgangwar / gist:59c9cbdd23ca6bad6c5bb2d5542fde06
Created February 17, 2024 11:35
C Program to find max absolute sum
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int compareIntegers(const void *a, const void *b) {
return (*(int*)a - *(int*)b);
}
int solve(int* sec_values, char* s) {
int n = strlen(s);
@pankajgangwar
pankajgangwar / native_coverage.sh
Last active March 6, 2024 22:09
How to generate native coverage on Android with soong build system.
#!/usr/bin/env bash
###### Module specific parameters starts ######
MODULE_PATH='hardware/interfaces/automotive/vehicle/2.0/default/'
MODULE_INSTALL_PATH='data/nativetest64/vehicle-tests'
INSTRUMENTED_BINARY_NAME='vehicle-tests'
REMOTE_COVERAGE_OUTPUT_DIR='/data/local/tmp/nativetest64/'
SOONG_INTERMEDIATES="out/soong/.intermediates"
GCNO_DIR="$SOONG_INTERMEDIATES/$MODULE_PATH"