X39.io
A fancy world of magic, unicorns and a raging lazy dev

So ... you want to install a custom OS on your android phone ...
by X39


First of all: Congratulations! You chose a path full of pain, violence and incompetent idiots who do competent stuff ...

Want an example? Well ... if you are not by any chance using a mainstream-mainstream device (eg. Galaxy S4) you are fucked. Plan to buy at least one 64GB SD-Card as you most likely wont find any version of TWRP (the most common tool used for backup etc.) compatible with your phone AND up to date so that you can directly transfer to your PC.

Alternativly buy a USB-OTG cable, again it takes time for it to arrive on amazon or for you to find in your local electronics market ...

But what to do if you want to flash right now?

Well ... Skip Backup ... because for some reason those mind-dead developers thought it would be a great idea to write a comprehensive guide on how to build it on your own ... just ... that you cannot understand anything of it unless you ever build anything on your own.

Chances are you already did build something using make and eg. gcc, congratulations, the guide still is complete utter shit for you unless you did so for android :)

So you seek out again for the internet for more help...

New guide, new luck. This time, it tells you it is a step by step guide for people who have little to no experience in buidling android but want to LEARN how to do it ...

that LEARN already is a great indicator what is following ... a comprehensive guide how to do exactly nothing on a linux system ...

majority of those ppl facing problems here will be neither using LINUX nor they have ANY experience or ANY interest in learning how to build shit! FOR FUCK SAKE YOU MORONS ... you do stuff normal people want to use. You write guides for developers that are trying to get into that field. You do literally EVERYTHING to prevent ppl from using your shit clean thus they get frustrated and for fuck sake i exactly know that you hate those people for asking after they did not understood your "very comprehensive non-step-by-step guide to LEARN"

so ... here is what you have to do to actually avoid questions like that ...

  1. Write an actual step by step guide For some reason ... the knowledge about what a step by step guide is and why it is needed got lost somewhere in the eternal void of the internet ... so here is quickly a reminder: Step by Step guide can be done by setting up a new system (eg. in a VM, my comprehensive guide is: use apt to install it faggots) and then writing down EVERY interaction one does! Every mouse click, every input hell even if you move windows it can get important for the user (before you actually do this: DO NOT ... ppl tend to know how to handle windows). Also ... do not expect people to have your system, expect the major system to be used! The majority of people uses MS WINDOWS not any unix variant so fucking write your step by step guide from that perspective ... you only can build using linux? Then fucking write that down! Tell people they shall check out a step by step guide about how to install linux in a VM ...
  2. Fire whoever was responsible for the old guide Seriously ... whoever is too stupid to do the most simple thing in the world but rather writes down garbage for people who would ask for such things in IRC channels or EMAIL lists ... is not supposed to do any public relations shit.
  3. Clean up your pages simple example? Needed TWRP and lineageos for my SM-T560... there are multiple variants of this tablet out there, lineageos has no way to check for the modelnum whilst TWRP lists a magic SM-T560NU ... the dump idiot now thinks "ohhh thats mine!" but he is wrong like usual as the NU variant is qualcomm based ... incompatible stuff ya know ... so add more manifacturer info ... for fuck sake PLEASE how hard is it?! your whole page contains useless info but adding those things you need at build time anyways you cannot add?

If you follow theese 3 tiny steps, you are one step closer to actually being useful ...

Now here is my comprehensive guide to fix that whole shit for any tablet:

  1. Ignore those fuckheads and backup manually, either by your tablets manufacturer tool (giving you some crypting garbage backup you cannot use) or by downloading every file via eg. adb or another tool of your choice (google file transfer android and it should show up plenty)
  2. Make sure you actually backed up everything, no going back from here
  3. Try to find the right lineageos release for your phone ... use google to get the matching name for your modelnumber (do not just check the box as that is most likely not the full describor and there are differences in the models)
  4. Follow the actually really good guide of lineageos for your device (in case you need to get out of the download mode: PRESS ALL KEYS FOR ~5 SECONDS)
  5. Avoid using heimdall as it is a garbage tool (use odin)
  6. Burn your smartphone/tablet because nothing works
  7. Sleep a night
  8. Realize you slept over due to phone being still in recovery mode
  9. Repeat step 1-6 until it works
  10. Congratulations: you forgot to add google apps

I like trains - Today: Useful error messages
by X39


'malloc': 'void *(std::size_t)' differs in levels of indirection from 'void *(std::size_t)'

About the OnePlus5 and their first come last serve policy
by X39


I usually keep calm when things do not go as expected ... but this time? This time it is too much!

I ordered the OnePlus 5 as my new smartphone on tuesday and ... the entire delivery is a disaster ...

First you discover that ppl who ordered a half day after you, who patiently watched the livestream for that bloody damn fucking "access code" so that you could order the doomed phone, not only have their phone already sent, no! They also already received it.

Then after contacting the support, and ranting in reddit about that they fucked up their order sorting, your phone finally gets shipped. But wait! There is more!

Now that it finally got on the way to you, you feel kinda happy it arrived in the DHL HUB and you think "now nothing can go wrong, everything will be fine from here" but well ... not here, not now

"Technical issues" prevent further processing ... something that seems to be common with the OnePlus releases

so you start getting angry and contact DHL just to discover that finding the right contact formular is a mess ... after an hour of searching the right one you finally sent the message to them

hours later, still no reply ... you contact the one plus support and ask them .. they just say "our logistic specialist is on it" and thats it ... case closed, nothing to do ...

you start considering calling the support hotline but as angry as you are right now, you know you would just start yelling after 2 minutes when they repeat those default questions again and again and again and again just because they want to get you done ...

so here i am now ... fucking angry and writing a rant to calm down ... i am pissed, and already considered to cancel my OnePlus 5 and just grab ... idk ... a nokia ... one of the ancient ones

at last, this is the worst experience i EVER had with with delivery especially when it gets as expensive as it is right now (>500€ for that fucking phone) things like this are not acceptable ...

anyway ... i need to get back to F5ing my email inbox

A quick update about my modding & tool activities
by X39


Recently checked the different sources again and noticed: i got various questions about XInsurgency, ArmA-UI-Editor, ...

soooo ... why are all theese things "dead"?

well ... first of all: they are not dead, they are on hold. Currently, there are higher priorities then a free non-money bringing hobby ...

what does that mean?

I am currently busy ... and cannot work on my projects :3

i do when i find spare time ... but most things are just waaaayyy to big to simply throw out an update here and there .. do not worry ... i will continue sooner or later ... but right now ... there is simply no way for me to spend more time in my hobby

kindly regards, X39

HTTPS enabled again
by X39


Implementing LUA 5.3 with custom C functions
by X39


I recently had to implement a script language to make developing new "features" for my lil IRC bot more simple.

turned out this was more complicated then i initially thought ... the different stackoverflow pages and tutorials for the various things required all talk about different versions which differ highly as mostly deprecated functions have been used ... sooo lets start telling you how you also can use LUA :)

Preparations

As with pretty much everything, you have to prepare your LUA object before you actually can use it. Preparing means in this context:

  • create the LUA Virtual Machine
  • load the different libraries

should not be that hard right? well ... you are right :)

first of all, you have to include the lua headers

#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>

when this is done, you have to create your LUA-VM and save it to a variable by using lua_State *LUAVM = luaL_newstate()

Now that you finally got your LUA object initialized, open the libraries you want to use. The default ones can be loaded via luaL_openlibs(LUAVM)

and thats it :)

Your very own C-Functions in LUA

Now this topic ... this was really a hard one ...

the documentation is kinda good but also a gigantic beast ... hard to google, harder to understand properly unless you read everything ...

soooooooo ... lets get trhough it quickly :)

first of all, let me introduce you to the LUA-Function callback int lh_your_fnc(lua_State *L). This little function head will be your best friend for all theese nasty C functions you want to create. The return value will tell lua if there is a return value on the stack (1) or not (0) and the lua_State variable will contain the VM that is calling that specific function.

Lets write a little test function that does nothing but printing something to stdout :)

int lh_hello_world(lua_State *L)
{
    printf("hello world\n");
}

the question now is: how to call this function from within lua? well: you either have to put theese into a separated library and use require to load them or you have to load them manually

but how does that work? that is where the different versions will fuck around with your google searches and where i will help you :)

First you will need to create a new lua function int lh_my_lib(lua_State *L) in which you create a new luaL_Reg structure. That luaL_Reg structure will contain your different functions and has to end with a { NULL, NULL } entry. When created, you have to pass it to the luaL_newlib function to create the table for your library and then return a 1 as result for that function as you left something on the stack. Now lets throw this together for our hello_world function:

int lh_my_lib(lua_State *L)
{
    static const struct luaL_Reg my_lib[] = {
        { "helloworld", lh_hello_world },
        { NULL, NULL }
    };
    luaL_newlib(L, my_lib);
    return 1;
}

but hold on! we are not yet done! To now get it into your VM, you have to "assign" it a global variable ^^

this is done by calling luaL_requiref(LUAVM, "testlib", lh_my_lib, 1) which is basically the C variant of the require function in LUA.

After all this, you finally can call the helloworld function by using testlib.helloworld() in lua :)

Moved Server
by X39


You might have noticed a few changes on the webpage (eg. HTTPS currently is no longer working .... gahhahah :3)

those changes come due to a server change

i threw away that crap which is no longer needed (eg. the WIKI) and just kept the "important" stuff also now using nginx ... but thats not interesting for this specific webpage :P (but thats the reason why there is no HTTPS yet ^^')

everything else should work like usual however, if you expecience any error, please e-mail me or write me a PN on the usual sources

Redesign
by X39


Hello there

as you, the visitor, might have noticed, i changed a "few" things on my webpage in regards of the design

first of all: this wont be the last change loads of back-end code is getting rewritten ... but well ... for now, try hovering the bar at the top :)

X39