HACKNORRIS PAGE.

my recommended apps (visit on your responsibility cause very work in POGress) page

MAIN MENU:
github library fix
android tutorial (copied from old blog)
spooky life
quick game engines
about author
friends

open this page on your phone:





fixing nosniff block when using github code as library


as far we know, github blocks raw code usage as http requests by using nosniff attribute. also website named rawgit stopped working too.

right now the only way to access library on github is to use pages feature (note - you need to have administrator access to a repo and be ble to turn on pages for repo with library)

how to do it then?

  1. firstly go to repository settings
  2. enable pages on root of branch your library is in
  3. github pages links look like: (user).github.io/(repo)/(file) , so for example an css stylesheet link might look like : https://user.github.io/library/main.css
  4. assemble such link and update your codes

why does it work? if you make a webpage on github you arent forced to put all your code into single html file. github respects that you might link subfiles to a main index.html or other sub-webpage. when you use a link from pages feature github doesnt have any way to check if you use that library inside page on same repo or outside but because its intended to display pages, even with external files so it cant enable nosniff mode cause otherwise pages could broke (and only index.html site could be then displayed).




android tutorial (copied from old blog):


and yes - we take android as linux OS (because it IS based on linux, just very modified and might not contain all core commands + google changed filesystem a little).

phone running android might boot in few states. they are : system (only if operating system is properly installed), bootloader/fastboot (common while installing recovery via desktop pc), bootanimation (while operating system throws errors and cant boot it properly) and recovery. default android recovery is a menu to which you can have access by presing buttons when you reboot your phone (usually vol down/up + power) and have options to restore system, update and sometimes even fix it quickly . here we will focus on custom recovery (bootloader-installable) named TWRP (but practically similar method can be used to madify device also with other recoveries, like CWM or even stock/default).

android OS filesystem structure:

/

data (here are all user apps and data of it)

dev (here structure is same or similar to linux - contains hardware devices stored as files with some drivers)

storage (list of hard drives connected to phone both with internal storage)

root (home user for system administrator. mostly empty)

system (contains system modifications of manufacturer or custom roms, like bootanimation, some apps or fonts. also some hardware device configurations in build.prop and addon.d)

sys (contains kernel and its modules)

cache (contains OS and recovery cache)

mnt (contains list of all mount points and its contents - shortcuts)

sometimes android OS'es might contain also other folders like opt, persist, sdcard and so on. it depends on manufacturer, ROM (even stock roms are different !!! ) and hardware.

most oftenly modded android parts :

system apps (arent deinstallable by default, have some more permissions than apk files or apps installed from stores)

bootanimation.zip

addon.d and build.prop

fonts and ringtones

also deinstalling core apps and installing + modifying busybox (cli tools)

(ofcourse all other parts of android OS are modifiable)

recovery.zip basic file structure:

/

META-INF

/

(list of certificates)

com

/

google

/

android

/

updater-script and update-binary (both are needed)

 

yes this file structure is very basic. just saying - any of mods you want to install you need to add folders in root zip directory. like:

/

META-INF

sys

system

dev

 

okey. so now we know basics. lets start programming.

updater-script is made in edify language and managed by update-binary in same directory.

every updater-script ends with empty line and doesn't start with any initial lines like common programming languages (just make file and literally start programming), every commands from these below ends with a semicolon (famous ' ; ' ) and new line.

edify referece explained:

getprop(property name) - checks for property in build.prop and returns ts value (eg. device name)

mount("filesystem type", "name of partition, mostly EMMC", "path to device file", "place it should be mounted") - mounts specified device as a folder. where it'll will be mounted - it depends on device

is_mounted("mount point") - checks if mount point exist in specified directory

unmount("mount point") - unmounts path from device (removes folder which mount command mounted)

format("filesystem type", "name of partition", "path to current device file") - formats selected partition to other or same type. erases content of partition.

ui_print("text") - displays text in user console.

package_extract_dir("folder in recovery.zip", "folder in system") - extracts folders from recovery.zip to system

package_extract_file("file in recovery.zip", "folder to place file into system") - extracts selected file from recovery.zip to system

symlink("symlink name or path", "file path", "optionally other file pathes", "", "" ... ) - symlinks folders or files to a file

delete("file path") - removes files or empty folders

delete_recursive("folder path") - removes files and folders (even non-empty, including its content)

set_perm("user id", "group id", "user permissions", "group permissions", "file or folder path") - changes user's permissions to files and folders (does NOT include subfolders)

set_perm_recursive("user id", "group id", "user permissions", "group permissions", "file or folder path") - changes user's permissions to files and folders (includes subfolders)

show_progress("size of progressbar defined in fraction", "duration - how long") - shows progress in recovery screen (oftenly at bottom)

set_progress("size of progress") - sets recovery' progressbar to defined size

write_raw_image(image.img , partition) - flashes selected partition (same way as bootloader)

wipe_cache() - resets cache (mostly temporary variables, useful to run when script ends)

abort() - leave script alone and leave it (ends script)

sleep(time) - waits specified time

run_program(program path [program args , , , ]) runs a custom bash script with passed arguments (so you can extend elify to custom linux commands)

read_file(path and name) - returns contents of specified file

for comparing is_mounted() and getprop() you can use double & like here:

is_mounted() && extract_package_dir()

where it checks if is_mounted() returns true and extracts files or

is_mounted() || mount()

where it checks if file is not mounted.

to compare output from getprop() we can compare it to a value and then pass to if condition. like here:

 

getprop() == device;

device || abort()

 

will stop if device doesnt match device name.

 

use these, cause otherwise these actions will become useless...

 

if you want to make your own update/recovery zip you need to also sign it and properly package (zip file, no compression/store). basic recovery/update zip contents are here (signed) : https://codeberg.org/hacknorris/twrp-template using language above and archive (in store mode).




spooky life:


okay, decided here to throw all weird things from my life. maybe someone will even take it for a game or something. I DONT CARE. just wanted to say. and yes all things below happened to me in real life unless said otherwise. might update list if something else will happen : i hope i wont get haunted or thrown into other dimension by posting this... please God.



quick game engines:


small thing about small game engines.

as far we know i recently took part in 3 hours game jams. maybe i wasnt first but here are tools which will drastically smaller you game making progress.
first engine i want to mention is pocket platformer, its a very underrated engine not even listed in game engines tab on itch. maybe its for platformers but even for such engine we have many options - custom graphics, resizable canvas, infinite number of levels, custom "doors" what makes it possible to even create a metroidavia clone. also - there are few hidden settings in player panel (like speed or jump height) and also other settings in advanced options under canvas color (it makes it even possible to define different sprite size than default)

next game engine in which games should be done rather quickly is mosi its mostly for rpg games although because its made very closely to bitsy engine its possible to create almost anything. there is only one con for this engine - lacking script documentation. okay, and maybe no grid inside drawing panels what makes it harder to create games in bigger sprite/world sizes but this second is solvable either by having luck OR taking a ruler (so we can live with it).

third one i wanted to mention is bitsy 3D what? bitsy is in 3d? yes as you see, as for 3d engine its quite quickly to make a game i think. and as we know bitsy we know how far we can go with it...

and also honorable mentions to gameboy studio cause maybe it isnt for making games quickly but its very similar to other game engines here as for being retro engine.

and one NOT honorable mention - gdevelop cause maybe it have enough tools BUT: doesnt have graphics editor, might be harder to use and... even if its opensource engine they only use discord for their support. i got ban at them few years ago. this blog entry was just to warn you before you use it. i dont recommend.
you can use these instead (although these, same as gdevelop, arent quick game engines, just simplified normal ones...):
ct.js
microstudio
godot



i am hacknorris. my profiles:
mastodon't
gibhub
its itchin' me...
mailing to meeeee

yet more info? i like xkcd, metallica, retro music and such games too, what for askin more?

yet more? really? take this : website




my frens •w• :
gameplayergoatslivekitten.exeeaxlukemŁukasz D. Maciek DelmanowskiR. L. Dane
















































bottom text