Skip to content

Instantly share code, notes, and snippets.

View zlocate's full-sized avatar

Denis zlocate

View GitHub Profile

Preface

Genymotion recently moved root access behind a paywall, making it a premium feature. However, if you're using Genymotion for Android development, testing, or educational purposes, having root access can be essential. Root access allows developers to access deeper functionality, test root-only features, and explore Android's internals without restrictions.

The good news is that with a bit of work, you can still enable root on a Genymotion emulator if you have access to its disk image and platform keys. This guide walks you through the process of adding a custom system app, RootToggle, which will allow you to switch root access on and off without needing Genymotion's paid root access feature.

This Gist details the steps to compile, sign, and install RootToggle as a system app in a Genymotion emulator by directly modifying the emulator's disk image IN LINUX (use a virtual machine on Windows to do that).


@zlocate
zlocate / gist:8ea109508d3b16010a8620ecec90bb85
Created January 3, 2025 00:49 — forked from tsjnachos117/gist:8231f9f8ed08968cc5f1a7f4d3e06b0e
Get KDE Connect battery info (from desktop/laptop)

I find the ability to get my android devices' battery info on my desktops via cli to be extremely convenient. I used to be able to this with KDE Connect easily, but things have just changed. Since I can't find any documentation on how to do this, and since I just stumbled on the answer myself, I though I might share what I know here. Please note that in the examples below, I will be using {device-id} as a placeholder for the string that KDE Connect uses to identify to my devices.

That said, I used to be able to get my various devices' battery status through gdbus through the following:

    gdbus call --session --dest org.kde.kdeconnect --object-path /modules/kdeconnect/devices/{device-id} --method org.kde.kdeconnect.device.battery.charge

However on Arch, I now get the following error: Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownInterface: No such interface 'org.kde.kdeconnect.device.battery' at object path '/modules/kdeconnect/devices/b04294f19e8767f5'. I don't get this message on Ubuntu 2

#!/usr/bin/env python3
import time
import requests
import sys
from datetime import datetime, timezone
from dateutil import parser
import re
if len(sys.argv) != 4:
@zlocate
zlocate / git-config-user-for-remote.md
Created November 10, 2023 23:17 — forked from BadgerCode/git-config-user-for-remote.md
Use different emails for different git repositories

Edit ~/.gitconfig

[user]
        email = [email protected]
        name = Michael Hawkins
[includeIf "hasconfig:remote.*.url:[email protected]:YOUR_COMPANY_NAME/**"]
        path = ~/Documents/Projects/Work/.gitconfig
@zlocate
zlocate / alibaba-vendor.md
Created June 15, 2023 12:20 — forked from emilio-martinez/alibaba-vendor.md
Topin 365GPS Server config

365GPS office address Contact: Erik Liu Address: 505 Block B, Donglian Building, Chuangye Second Road, Baoan District, Shenzhen, Guangdong, China(广东省深圳市宝安区创业二路东联大厦B座505,洪浪北地铁站旁) Mobile/ wechat/ whatsapp: +86-13480999031
Alibaba: 365gps.en.alibaba.com Skype: topin.sales
E-mail: [email protected]

============================================================= Hi