/*
adb shell monkey --port 1080
adb forward tcp:1080 tcp:1080
telnet 127.0.0.1 1080
sleep 300
quit
done
type string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dotenv | |
dotenv.load_dotenv() | |
import sys | |
import os | |
import openai | |
openai.api_key = os.environ['OPENAI_KEY'] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Assist Calendar | |
author: Piitaya | |
description: Use Assist and a calendar to schedule actions in natural language. | |
domain: automation | |
input: | |
calendar: | |
name: Calendar | |
description: All events in this calendar will be processed by Assist | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Optional_Motion Light Switch Blueprint Automation | |
description: "# Optional_Motion Light Switch Blueprint Automation V:1.3\n | |
Is my take on Light Profiles with Automations. This version has the following profiles;\n | |
- Bright - (For Day time & Events, I need to be Awake; Bright eyed & bushy tailed).\n | |
- Dimmed - (For after sunset & before sunrise when i'm (still) thinking about bed, but I will want to be able to read the Funny pages).\n | |
- Night-Light - (For bed/sleep time, & you don't want to wake everyone else up, but you still want to see in an emergency; how to get to the Fridge)\n | |
- Colour-Loop - (Was to be Aurora-Australis, but colour-loop is easier to remember).\n | |
- Circadian - (For the rest of the house at night, & to get everyone in sync @ night with you).\n | |
- Adaptive - (This works really well with a bed/sleep input_boolean).\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Tuya Zigbee Mini Remote | |
description: "Blueprint for use with Tuya Zigbee Mini Remote (YSR-MINI-Z) on Zigbee2MQTT" | |
domain: automation | |
input: | |
switch: | |
name: Tuya Zigbee Mini Remote | |
description: Aqara switch to use | |
selector: | |
entity: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reads analog data using an ads1115. Three moisture sensors and a battery sensor. | |
# Goes to sleep for an hour at a time. | |
# Uses a helper input_boolean to keep it from going to sleep, in case you want to update it. | |
esphome: | |
name: moisture-1 | |
platform: ESP32 | |
board: esp32dev | |
on_boot: | |
then: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Nag | |
description: Sends nagging messages on a schedule | |
domain: automation | |
input: | |
datetime: | |
name: Datetime | |
description: Input to monitor | |
selector: | |
entity: |
Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell
and then run-as com.mypackage
( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs
),
but on a production release app downloaded from an app store you're most likely to see:
run-as: Package 'com.mypackage' is not debuggable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""pyvbox: Capture network traffic from adapter. | |
""" | |
import os | |
import time | |
import virtualbox | |
# Assume machine is already running. | |
vbox = virtualbox.VirtualBox() | |
machine = vbox.find_machine("win7") | |
session = machine.create_session() |