Skip to content

Commit

Permalink
init Pico 4 Fun
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitasius committed Sep 1, 2024
0 parents commit 17375ff
Show file tree
Hide file tree
Showing 54 changed files with 904 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/build-TL-v1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Minimal Android CI Workflow

on:
pull_request:
branches: [ master ]
types: [ closed ]
concurrency:
group: pico4fun_build_concurrency
cancel-in-progress: true
jobs:
test:
if: github.event.pull_request.merged == true
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up AWS Coretto 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
architecture: x64
- name: Run Tests
run: bash ./gradlew test --stacktrace
apk:
name: Generate APK
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up AWS Coretto 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
architecture: x64
- name: Build APK
run: bash ./gradlew assembleRelease
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: apk
path: app/build/outputs/apk/release/app-release.apk
release:
name: Release APK
needs: apk
# if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download APK from build
uses: actions/download-artifact@v1
with:
name: apk
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TNAME }}${{ env.AARCH }}
release_name: ${{ env.RNAME }}
- name: Upload Release APK
id: upload_release_asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: apk/app-release.apk
asset_name: ${{ env.TNAME }}${{ env.AARCH }}.apk
asset_content_type: application/gzip
env:
RNAME: Pico 4 Fun
TNAME: pico4fun_1.0.0_r1_
AARCH: arm64_v8a
36 changes: 36 additions & 0 deletions .github/workflows/test-TL-v1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Minimal Android CI Workflow

on:
pull_request:
branches: [ master ]
types: [ opened, synchronize ]
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up AWS Coretto 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
architecture: x64
- name: Run Tests
run: bash ./gradlew test --stacktrace
apk:
name: Generate APK
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up AWS Coretto 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
architecture: x64
- name: Build APK
run: bash ./gradlew assembleRelease
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Pico 4 Fun

![Manual tests](app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp)

Disclaimer:
> play and/or use at your own risk. Only you are responsable for VR damage, brain damage or any burned stuff or whatever
> it can fuckup!
## That app allow you to access:

* android settings menu
* and you can tune it as any android
* manual tests menu
* here you can override fan settings via MCU Fan and do whatever you want, haha
* full factory tests menu
* to play or kill your Pico

## Whats the difference?

* opensource stuff, check the core bruh/sis
* apk are build by github actions, not by dev
* pretty small size, just a dog was added

## How to install

* go to [releases](https://github.com/nikitasius/Pico4Fun/releases/latest)
* download APK and copy on your Pico 4
* install it via filemanager
* click on a pomeranian!

## Screenshots

### Launcher

![Launcher](screenshots/Screenshot_2024-09-01_19-46-33.png)

### Main App

![Main App](screenshots/Screenshot_2024-09-01_19-46-57.png)

### Android settings

![Android settings](screenshots/Screenshot_2024-09-01_19-47-41.png)

### Manual tests menu & MCU Fan section

![Manual tests](screenshots/Screenshot_2024-09-01_19-47-26.png)

### Full factory tests

![Full factory tests](screenshots/Screenshot_2024-09-01_19-47-13.png)
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
47 changes: 47 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
plugins {
id("com.android.application")
}

android {
namespace = "com.evildayz.code.pico4fun"
compileSdk = 34

defaultConfig {
applicationId = "com.evildayz.code.pico4fun"
minSdk = 29
targetSdk = 34
versionCode = 1001
versionName = "1.0.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
create("release") {
storeFile = file("../fuckthesystem.jks")
storePassword = "fuckthesystem"
keyAlias = "fuckthesystem"
keyPassword = "fuckthesystem"
}
}

buildTypes {
release {
isMinifyEnabled = false
signingConfig = signingConfigs.get("release")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
25 changes: 25 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.evildayz.code.pico4fun">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Pico4Fun"
tools:targetApi="34">
<meta-data android:name="pvr.display.orientation" android:value="180"/>
<meta-data android:name="pico.vr.position" android:value="near"/>
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions app/src/main/java/com/evildayz/code/pico4fun/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package com.evildayz.code.pico4fun;

import android.content.ComponentName;
import android.content.Intent;
import android.provider.Settings;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button androidsettings = (Button) findViewById(R.id.androidsettings);
Button manualtests = (Button) findViewById(R.id.manualtests);
Button factorytest = (Button) findViewById(R.id.factorytest);

androidsettings.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(Settings.ACTION_SETTINGS));
}
});

manualtests.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
ComponentName cm = new ComponentName("com.picovr.factorytest", "com.picovr.factorytest.PicoFactoryTestManualActivity");
intent.setComponent(cm);
intent.setAction("android.intent.action.VIEW");
startActivity(intent);
}
});

factorytest.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
ComponentName cm = new ComponentName("com.picovr.factorytest", "com.picovr.factorytest.setting.PicoSettingMainActivity");
intent.setComponent(cm);
intent.setAction("android.intent.action.VIEW");
startActivity(intent);
}
});
}
}
Loading

0 comments on commit 17375ff

Please sign in to comment.