Posted by alex on Aug 7th, 2017


This is a replica of a Milky Way's style Stargate and the SGC ramp. My goal was to design something that is both easy to print and easy to assemble. Some trade-offs had to be made, for example the symbols and textures are all simplified so they can print correctly on smaller printers. Initially I wanted to post this project on thingiverse, and I still might, but I have yet to write detailed assembly instructions and for the time being I still wanted to showcase this project. This post includes all the design files, the stl, the arduino code, a few photos, and some notes on assembly but it is by no means a step-by-step guide.


Conception, Printing, and Assembly

The 3D models have been designed in 123D Design which, in retrospect, was a poor choice for this project. It is extremely slow on complex sketches such as the symbols ring. On top of that it was recently discontinued! I am unaware of any method to export to Fusion 360 in a format that is editable but you can still download 123D for free if you wish to edit my designs.


Cura 2.5 was used to generate the GCode with the following settings:

  • Layer height: 0.1
  • Infill: 100%
  • Temperature: 210C/60C
  • Speed: 60mm/s
  • Support: Only "gate - back" and "gate - front" (I strongly recommend "Support Interface" for easy removal)

The printer used was a Monoprice Select Mini and the material was Hatchbox grey PLA (white for the chevrons). I designed everything with a 120x120mm printer in mind and the STL will give you a 117mm(4.6") gate diameter. If you decide to resize it, special attention might be needed for the motor gear.

To assemble the project you will only need glue and I recommend Loctite 401 or low temperature hot glue. The starting friction of PLA on PLA is quite high and your stepper might have an issue starting. I suggest using a paper ring that sits between the symbols ring and the back rail so that it's not PLA against PLA. Grease or oil might also work.



(7.74 MB)



(14.26 MB)


Posted by alex on Nov 24th, 2014

Android reserves a certain percentage of the data partition for itself to make sure apps won't run out of working space (Receiving SMS, emails, call logs, etc). On phones with no external storage it means that when you are down to 10% free OR 500MB (whichever is smaller) you won't be able to update/install anything, even if it's only a couple kilobytes. It's really annoying for devices with 4-8GB to lose 500MB like that.

IMPORTANT: If you have plenty of space available and yet have the insufficient storage error, you should look elsewhere to fix your issue. The following guide is only to reclaim the 10% remaining, not fix Play Store issues. The procedure should work with any Android 4.x, but it was tested only on stock Moto G and LG G1.

How to

Before starting you need to choose how much space you wish to reserve for Android. You can choose a percentage, a size, or both (the system will pick the smallest value). This guide uses 100MB and 2%, change values accordingly. You need to be rooted. Procedure overview (step-by-step below):

Database Path: /data/data/com.android.providers.settings/databases/settings.db

Insert rows in table: global

name value
sys_storage_threshold_percentage 2



Note: In older Android the table might be named secure. If that is the case please replace global by secure in the following instructions. Thanks to Patrick in the comments!


Using a sqlite3 editor:
  1. Get a rooted sqlite3 editor from the play store. I tested this procedure successfully with SQLite Debugger and aSQLiteManager. SQLite Master Pro is easier to use but not free.
  2. Open the aforementioned database.
  3. Navigate to the table named global.
  4. Insert the rows as specified. (when inserting only fill name/value, leave the remaining fields empty)
  5. reboot!
Using the command line:
  1. You will need a rooted phone with sqlite3. If you do not have the sqlite3 command installed, try this one or try the Sqlite3 installer.
  2. Connect to your phone via adb shell or use a root terminal emulator.
  3. # sqlite3 /data/data/com.android.providers.settings/databases/settings.db
    SQLite version 3.8.6 2014-08-15 11:46:33
    Enter ".help" for usage hints.
    sqlite> replace into global (name, value) values('sys_storage_threshold_percentage', '2');
    sqlite> replace into global (name, value) values('sys_storage_threshold_max_bytes', '104857600');
    sqlite> .quit
    # reboot


You should be able to install more apps now :)


Look further

A quick note about the table name first: I instructed you to insert lines in the "global" table. I believe the proper place for all Android is the "secure" table and "global" has the ability to override settings from "secure". I have not tested recent Android 4+ with "secure" instead of "global", that's why I kept "global" above.

Here's some technical info if you want to patch at the rom level or write an xposed mod or whatever:

I tracked the check down to getMemThreshold() in DeviceStorageMonitorService.java.

private long getMemThreshold() {
     long value = Settings.Secure.getInt(
         if(localLOGV) Slog.v(TAG, "Threshold Percentage="+value);
         value *= mTotalMemory;
         long maxValue = Settings.Secure.getInt(
    //evaluate threshold value
    return value < maxValue ? value : maxValue;

The default value is specified earlier in the same file:

private static final int DEFAULT_THRESHOLD_PERCENTAGE = 10;
private static final int DEFAULT_THRESHOLD_MAX_BYTES = 500*1024*1024; // 500MB

The setting key can be found in frameworks/base/core/java/android/provider/Settings.java

The installer calls it from PackageManagerService.java in checkFreeStorage()


Method with Tasker:

(From Daniel in the comments.)

For those having tasker it is even easier:

Task with this 2 actions:

  1. Run shell (under code) - enter the following values
    1. Command: sqlite3 /data/data/com.android.providers.settings/databases/settings.db "replace into global (name, value) values('sys_storage_threshold_percentage', '2')";
    2. Tick "use root"
    3. If you want you can save the error output and display it with a notify action
  2.  2nd action same but put this command:
    1. sqlite3 /data/data/com.android.providers.settings/databases/settings.db "replace into global (name, value) values('sys_storage_threshold_max_bytes', '104857600')";

Run the task and reboot ...

Posted by alex on Jul 1st, 2014

(11.71 KB)
PbCounter is a small Windows utility that counts how many times each mouse button and each keyboard key is pressed. With these statistics it does three things:

  • Display the counters, obviously :)
  • Create an heat map to put in evidence the most used keys on your keyboard
  • Upload the statistics at regular interval to a web page of your choice (an example PHP script here)

It is purposely compatible with scripts made for Mousotron. It takes less than 3MB of ram and uses very little CPU. Configuration can be done by editing the INI file, more information included in the help file. Important: While it tracks how many times each key is pressed, it doesn't record what you type (it is not a keylogger).

(22.49 KB)

The program is free to use and modify under the MIT license. If you want to compile it you will need PureBasic 5+ (The demo won't work as PbCounter uses the win32 API).


Tags: Click counter, Mouse Spy, Keyboard activity, Statistics

Posted by alex on Jun 13th, 2014

Here's a short overview of the Montreal Mini Maker Faire 2014. As usual, pictures are provided by Pascal :)

Go to Top