Skip to content

Instantly share code, notes, and snippets.

View mohancm's full-sized avatar
👋
Hello World!

Mohan C M mohancm

👋
Hello World!
View GitHub Profile

Flashing GSI on Pixel devices

1. reboot device to bootloader

adb reboot bootloader

2. boot into fastboot mode

fastboot reboot fastboot

3. erase the old system image

fastboot erase system

[
{
"id": 1,
"author": "Dalai Lama",
"message": "The purpose of our lives is to be happy."
},
{
"id": 2,
"author": "John Lennon",
"message": "Life is what happens when you're busy making other plans."
// adding android.car as Library aka Jar file.
val sdkDir = android.sdkDirectory.canonicalPath
val androidCarJar = "$sdkDir/platforms/android-33/optional/android.car.jar"
implementation(files(androidCarJar))
@mohancm
mohancm / android_keystore.txt
Last active April 19, 2023 08:32
generating keystore using platform keys:
# Platform keys can be found in $ANDROID_ROOT/build/target/product/security/
required files:
- platform.x509.pem
- platform.pk8
# command in linux with JAVA setup
openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.key
openssl pkcs12 -export -in platform.x509.pem -inkey platform.key -name platform -out platform.pem -password pass:mohan100
{
"response":[
{
"datetime":1674488271,
"filename":"ota-update-package.zip",
"id":"5eb63bbbe01eeed093cb22bb8f5acdc3",
"type":"OS",
"size":314572800,
"url":"https://example.com/ota-package.zip",
"version":"10"
@mohancm
mohancm / event_model.dart
Last active July 6, 2019 06:11
Flutter Events
// To parse this JSON data, do
//
// final event = eventFromJson(jsonString);
import 'dart:convert';
List<Event> eventFromJson(String str) => new List<Event>.from(json.decode(str).map((x) => Event.fromJson(x)));
String eventToJson(List<Event> data) => json.encode(new List<dynamic>.from(data.map((x) => x.toJson())));
@mohancm
mohancm / Byobu.txt
Last active September 14, 2018 19:27
Byobu Uses the Function keys (From F1 to F12)
Basic Commands:
CTRL+D => Exit Byobu and close all of your sessions
F2 => Create New screen
F3 and F4 => to Navigate to left or right screen.
ALT+F6 => will detach all the connections to Byobu except the current one.
More Information:
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-byobu-for-terminal-management-on-ubuntu-16-04