-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd77275
commit d613f97
Showing
41 changed files
with
564 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
wallpaper: default | ||
theme: default_dark | ||
splash_time: 3000 | ||
splash_time: 3000 | ||
update: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,180 @@ | ||
#!/bin/bash | ||
#!/bin/bash | ||
|
||
echo "" | ||
# update | ||
sudo apt-get update -y | ||
|
||
# installing libs | ||
sudo apt-get install mono-complete -y | ||
sudo apt install xorg xserver-xorg xinit cmake git -y | ||
sudo apt-get install --reinstall libgtk2.0-0 -y | ||
sudo apt-get install paplay -y | ||
|
||
|
||
# setting correct perms | ||
sudo chmod +rx /usr/share/d3m0n | ||
sudo chmod +rx /usr/share/d3m0n/* | ||
sudo chmod +rx /usr/share/d3m0n/display/* | ||
sudo chmod +rx /usr/share/d3m0n/apps/* | ||
sudo chmod +rx /usr/share/d3m0n/ssh | ||
sudo chmod +rx /usr/share/d3m0n/ssh/* | ||
|
||
|
||
|
||
# creating display driver | ||
sudo mkdir /usr/share/d3m0n/display/source | ||
cd /usr/share/d3m0n/display/source | ||
sudo git clone https://github.com/juj/fbcp-ili9341.git | ||
cd fbcp-ili9341 | ||
sudo mkdir build | ||
cd build | ||
sudo cmake ../ -DILI9341=ON -DDISPLAY_ROTATE_180_DEGREES=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSPI_BUS_CLOCK_DIVISOR=6 -DSTATISTICS=0 | ||
sudo make -j | ||
sudo cp ./fbcp-ili9341 /usr/share/d3m0n/display/fbcp-ili9341 | ||
|
||
cd ~ | ||
|
||
# formating boot config file | ||
sudo rm -rf /boot/config.txt | ||
|
||
sudo echo "# For more options and information see | ||
# http://rpf.io/configtxt | ||
# Some settings may impact device functionality. See link above for details | ||
# uncomment if you get no picture on HDMI for a default safe mode | ||
#hdmi_safe=1 | ||
# uncomment the following to adjust overscan. Use positive numbers if console | ||
# goes off screen, and negative if there is too much border | ||
#overscan_left=16 | ||
#overscan_right=16 | ||
#overscan_top=16 | ||
#overscan_bottom=16 | ||
# uncomment to force a console size. By default it will be display's size minus | ||
# overscan. | ||
#framebuffer_width=1280 | ||
#framebuffer_height=720 | ||
# uncomment if hdmi display is not detected and composite is being output | ||
hdmi_force_hotplug=1 | ||
display_lcd_rotate=1 | ||
display_hdmi_rotate=1 | ||
# uncomment to force a specific HDMI mode (this will force VGA) | ||
#hdmi_group=1 | ||
#hdmi_mode=1 | ||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in | ||
# DMT (computer monitor) modes | ||
#hdmi_drive=2 | ||
# uncomment to increase signal to HDMI, if you have interference, blanking, or | ||
# no display | ||
#config_hdmi_boost=4 | ||
# uncomment for composite PAL | ||
#sdtv_mode=2 | ||
#uncomment to overclock the arm. 700 MHz is the default. | ||
#arm_freq=800 | ||
# Uncomment some or all of these to enable the optional hardware interfaces | ||
dtparam=i2c_arm=on | ||
#dtparam=i2s=on | ||
dtparam=spi=on | ||
# Uncomment this to enable infrared communication. | ||
#dtoverlay=gpio-ir,gpio_pin=17 | ||
#dtoverlay=gpio-ir-tx,gpio_pin=18 | ||
# Additional overlays and parameters are documented /boot/overlays/README | ||
# Enable audio (loads snd_bcm2835) | ||
dtparam=audio=on | ||
# Automatically load overlays for detected cameras | ||
start_x=1 | ||
# Automatically load overlays for detected DSI displays | ||
display_auto_detect=1 | ||
# Enable DRM VC4 V3D driver | ||
#dtoverlay=vc4-kms-v3d | ||
max_framebuffers=2 | ||
# Disable compensation for displays with overscan | ||
disable_overscan=1 | ||
[cm4] | ||
# Enable host mode on the 2711 built-in XHCI USB controller. | ||
# This line should be removed if the legacy DWC2 controller is required | ||
# (e.g. for USB device mode) or if USB support is not required. | ||
otg_mode=1 | ||
[all] | ||
[pi4] | ||
dtoverlay=vc4-fkms-v3d | ||
# Run as fast as firmware / board allows | ||
arm_boost=1 | ||
[all] | ||
#framebuffer_width=240 | ||
#framebuffer_height=320 | ||
hdmi_cvt=480 640 60 2 1 | ||
hdmi_group=2 | ||
hdmi_mode=87 | ||
hdmi_drive=2 | ||
gpu_mem=128 | ||
# power optimisation | ||
dtparam=act_led_trigger=none | ||
dtparam=act_led_activelow=on | ||
dtoverlay=disable-bt | ||
# enable serial communication | ||
enable_uart=1 | ||
dtoverlay=pi3-miniuart-bt" > /boot/config.txt | ||
|
||
# also delete this console=serial0, 115200 in /boot/cmdline.txt | ||
|
||
|
||
|
||
|
||
|
||
sudo rm -rf /etc/rc.local | ||
|
||
echo "#!/bin/sh -e | ||
# | ||
# rc.local | ||
# | ||
# This script is executed at the end of each multiuser runlevel. | ||
# Make sure that the script will "exit 0" on success or any other | ||
# value on error. | ||
# | ||
# In order to enable or disable this script just change the execution | ||
# bits. | ||
# | ||
# By default this script does nothing. | ||
sudo bash /usr/share/d3m0n/startup.sh & | ||
exit 0" > /etc/rc.local | ||
|
||
sudo chmod +x /etc/rc.local | ||
|
||
|
||
echo "Banner /usr/share/d3m0n/ssh/banner" >> /etc/ssh/sshd_config | ||
|
||
|
||
|
||
# enable autologin | ||
cat > /etc/systemd/system/[email protected]/autologin.conf << EOF | ||
[Service] | ||
ExecStart= | ||
ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM | ||
EOF | ||
|
||
|
||
sudo reboot now | ||
|
||
exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
\e[33m██████╗ ██████╗ ███╗ ███╗ ██████╗ ███╗ ██╗ | ||
██████╗ ██████╗ ███╗ ███╗ ██████╗ ███╗ ██╗ | ||
██╔══██╗╚════██╗████╗ ████║██╔═████╗████╗ ██║ | ||
██║ ██║ █████╔╝██╔████╔██║██║██╔██║██╔██╗ ██║ | ||
██║ ██║ ╚═══██╗██║╚██╔╝██║████╔╝██║██║╚██╗██║ | ||
██║ ██║ █████╔╝ ██╔████╔██║██║██╔██║██╔██╗ ██║ | ||
██║ ██║ ╚═══██╗ ██║╚██╔╝██║████╔╝██║██║╚██╗██║ | ||
██████╔╝██████╔╝██║ ╚═╝ ██║╚██████╔╝██║ ╚████║ | ||
╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ | ||
\e[31mmade by \e[32m4re5 group | ||
\e[4;31mthe first hacking cellular phone\e[0m | ||
made by 4re5 group | ||
the first hacking cellular phone |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,51 @@ | ||
#!/bin/bash | ||
# d3m0n_os startup object (executed in /etc/rc.local) | ||
|
||
xrandr --output Screen1 --mode 640x480 | ||
# optimize d3m0n phone | ||
# ref https://www.cnx-software.com/2021/12/09/raspberry-pi-zero-2-w-power-consumption/ | ||
echo none | sudo tee /sys/class/leds/led0/trigger | ||
echo 1 | sudo tee /sys/class/leds/led0/brightness | ||
|
||
|
||
# setup display | ||
sudo xinit & | ||
export DISPLAY=:0 | ||
|
||
# xrandr --output default --mode 640x480 | ||
|
||
# setup TFT screen driver | ||
sudo bash /usr/share/d3m0n/display/run.sh & | ||
|
||
# display infos on tty1 | ||
printf "\n" | ||
printf "\n" | ||
printf "[ \033[0;32mOK\033[0m ] d3m0n started successfully\n" | ||
|
||
# print IP address | ||
_IP=$(hostname -I) || true | ||
if [ "$_IP" ]; then | ||
printf "Current IP address is %s\n" "$_IP" | ||
fi | ||
print "\n" | ||
printf "\n" | ||
printf "\n" | ||
|
||
|
||
# display image | ||
# sudo fbi -d /dev/fb0 -T 1 --fitwidth --noverbose splash.png | ||
|
||
# manually setup command | ||
# sudo apt install p7zip-full -y && wget 192.168.43.89:8000/d3m0n.7z && sudo 7z x -r -aoa d3m0n.7z -o/usr/share/d3m0n && sudo bash /usr/share/d3m0n/firstboot.sh | ||
|
||
# sudo X -nocursor -s 0 -dpms& | ||
export DISPLAY=:0 | ||
sudo mono /usr/share/d3m0n/apps/d3m0n.exe& | ||
|
||
|
||
# sudo xvfb-run -n 0 -s "-screen 0 480x640x16" sudo mono /usr/share/d3m0n/apps/d3m0n.exe | ||
# sudo xvfb-run --auto-servernum --server-num=1 sudo mono d3m0n.exe & | ||
|
||
bash /usr/share/d3m0n/display/run.sh | ||
mono /usr/share/d3m0n/apps/d3m0n.exe | ||
# screenshot sudo xwd -display :0 -root -silent | convert xwd:- png:/tmp/screenshot.png | ||
# display build cmake ../ -DILI9341=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSPI_BUS_CLOCK_DIVISOR=6 -DSTATISTICS=number | ||
|
||
exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: testapp | ||
package: com.4re5.d3m0n.test | ||
icon: default | ||
perms: none | ||
start_path: /path/to | ||
category: test |
4 changes: 4 additions & 0 deletions
4
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/defs/file.write
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
logn("let's goooo", "red"); | ||
lol="lol"; | ||
logn("lol is equal to: $lol", "green");}; |
3 changes: 3 additions & 0 deletions
3
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/layouts/main.layout
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# d3m0n layout | ||
|
||
Window: width="100%"; height="100%"; title="test"; bg_color="orange"; topbar="false"; |
3 changes: 3 additions & 0 deletions
3
...usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/ressources/icons8-cercle-64.pngZone.Identifier
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ZoneTransfer] | ||
ZoneId=3 | ||
HostUrl=about:internet |
Binary file added
BIN
+892 Bytes
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/ressources/shoot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/ressources/test.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace myNamespace | ||
{ | ||
public class myclass | ||
{ | ||
public static void myFunct(string text, int integ) | ||
{ | ||
MessageBox.Show(text+(50+integ).ToString()); | ||
} | ||
} | ||
} |
Binary file not shown.
1 change: 1 addition & 0 deletions
1
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/src/events/main.src/Window.OnCreate
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
logn("[o] loaded test", "orange"); SystemDef(); |
1 change: 1 addition & 0 deletions
1
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/src/events/main.src/shoot.OnClick
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alert("hello world! you've clicked shoot"); |
6 changes: 6 additions & 0 deletions
6
rootfs/usr/share/d3m0n/temp/5vsvcZFR5R3XXBpsy9xn/src/main.src
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# d3m0n source | ||
|
||
Window.OnCreate => logn("[o] loaded test", "orange"); SystemDef(); | ||
# [$ressources/test.dll,myNamespace,myclass,myFunct(a, b)]; | ||
|
||
shoot.OnClick => alert("hello world! you've clicked shoot"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def myfunc{ logn("let's goooo", "red"); lol="lol"; logn("lol is equal to: $lol", "green");} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: contacts | ||
package: com.4re5.d3m0n.contacts | ||
icon: contacts | ||
perms: none | ||
start_path: /path/to | ||
category: communication |
3 changes: 3 additions & 0 deletions
3
rootfs/usr/share/d3m0n/temp/RH6jjizJkHNTnXctu07j/src/main.src
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# d3m0n source | ||
|
||
Window.OnCreate => logn("[o] loaded contacts", "orange"); |
16 changes: 16 additions & 0 deletions
16
rootfs/usr/share/d3m0n/temp/dbriFvAP5ythkgSXHhde/README.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# official d3m0n photo app | ||
|
||
test command | ||
sudo raspistill -o test.jpg -w 480 -h 640 -q 100 -t 1 -n | ||
-n = no preview | ||
-t = preview timout | ||
-o = output | ||
-w = width | ||
-h = height | ||
|
||
Can overlay preview on top of photo app? | ||
-p = Preview window settings <'x,y,w,h'> | ||
|
||
|
||
# video | ||
raspivid -o Desktop/video.h264 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: camera | ||
package: com.4re5.d3m0n.camera | ||
icon: camera | ||
perms: sudo | ||
start_path: /path/to | ||
category: photo |
9 changes: 9 additions & 0 deletions
9
rootfs/usr/share/d3m0n/temp/dbriFvAP5ythkgSXHhde/layouts/main.layout
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# d3m0n layout | ||
|
||
Window: width="100%"; height="100%"; title="camera"; bg_color="black"; topbar="false"; | ||
|
||
Image: name="shoot"; src="$ressources/shoot.png"; width="50"; height="50"; position="bottom"; margin_bottom="10"; bg_color="25, 25, 25"; mode="stretch"; | ||
|
||
Rect: name="camera_bg"; bg_color="black"; width="100%"; height="73%"; | ||
|
||
Rect: name="camera_shoot"; bg_color="25, 25, 25"; width="100%"; position="bottom"; height="27%"; |
5 changes: 5 additions & 0 deletions
5
rootfs/usr/share/d3m0n/temp/dbriFvAP5ythkgSXHhde/layouts/test.layout
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# d3m0n layout | ||
|
||
Window: width="100%"; height="100%"; bg_color="lime"; name="TestWindow"; | ||
|
||
Text: name="my Text :p"; color="orange"; position="50, 50"; |
3 changes: 3 additions & 0 deletions
3
...usr/share/d3m0n/temp/dbriFvAP5ythkgSXHhde/ressources/icons8-cercle-64.pngZone.Identifier
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ZoneTransfer] | ||
ZoneId=3 | ||
HostUrl=about:internet |
Binary file added
BIN
+892 Bytes
rootfs/usr/share/d3m0n/temp/dbriFvAP5ythkgSXHhde/ressources/shoot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
rootfs/usr/share/d3m0n/temp/dbriFvAP5ythkgSXHhde/src/main.src
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# d3m0n source | ||
|
||
Window.OnCreate => logn("[o] loaded camera", "orange"); | ||
|
||
shoot.OnClick => display($layouts/test.layout); alert("hello world! you've clicked shoot"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def myfunc{ logn("let's goooo", "red"); lol="lol"; logn("lol is equal to: $lol", "green");} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: messages | ||
package: com.4re5.d3m0n.messages | ||
icon: messages | ||
perms: none | ||
start_path: /path/to | ||
category: communication |
Oops, something went wrong.