Upgrading ElementalX, Android and Magisk on Google Pixel 2 on MacOS X

This is almost for sure the wrong way to do things, but this is my current process (as of apr 22, 2018) to upgrade my phone when new android releases are out, and/or new elemental x.


***IMPORTANT: REMOVE ‘-w’ from the ‘fastboot update’ line in the flash-all.sh (this will stop it from wiping the device).

  • Make sure you have already downloaded the latest Magisk ZIP (should be under ‘/sdcard/MagiskManager’, ex. ‘Magisk-v15.2.zip’)
  • Power off device
  • unzip the image.zip file
    # unzip image-walleye-opm2.171019.029.b1.zip
  • Boot the device into fastboot (power + down)
  • Run flash-all.sh
    # flash-all.sh
  • Let phone boot into the OS
  • Power off
  • Boot the device into fastboot (power + down)
  • Then, boot twrp
    # fastboot boot *TWRP.img path*
  • put in your password for twrp encryption and let it load into TWRP
  • now push your files to your pixel 2
    # adb push ElementalX-P2-1.05.zip /sdcard/Download
    # adb push Magisk-VERSION.zip /sdcard/Download
    # adb push /latest/release/boot.img /sdcard/Download
  • now click install, and install your files. install magisk and elementalx
  • wipe dalvik and cache, then reboot to system
  • open magisk check if rooted
  • if not, then install, patch boot file, pick boot.img and then
    # adb pull /sdcard/MagiskManager/patched_boot.img
    # adb reboot bootloader
    # fastboot flash boot patched_boot.img
    # fastboot reboot
  • Reboot the phone


Perform the same steps as above, but just do the elementalX portion.


If anyone knows a better, quicker, way please let me know cause this is kinda annoying 🙂

Radeon RX 580 on Hackintosh OSX 10.13.4 Automatically Rotate Screen on Boot

Recently I got an ASUS Radeon RX 580 to replace an NVidia Card I was tired of fighting and trying to make work properly. As it turns out, no video card is very easy to get working with Hackintosh!

Anyway, today the problem was after finally getting two monitors working the secondary monitor was booting with a weird rotation and was a pain in the ass to change each time I logged in because the mouse was about 5″ off location on that screen.

There must be a way to automate it, thought I.

Here’s how I did it.

# cd ~/Documents/Source
# git clone https://github.com/CdLbB/fb-rotate.git
# cd fb-rotate
# gcc -w -o fb-rotate fb-rotate.c -framework IOKit -framework ApplicationServices
# nano /Users/YOURUSERNAME/Library/LaunchAgents/com.YOURCOMPUTERNAME.fb-rotate.plist

put this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
<plist version="1.0">

then get the list of your screens

# /Users/YOURUSERNAME/Documents/Source/fb-rotate/fb-rotate -l

Which will output something like this

Display ID Resolution
 0xb430e32 1920x1080 [main display]
 0x2b287c4c 1200x1920

Take note of the screen you want to automatically rotate on boot. Copy the 0x00000 number.

# nano ~/Documents/Source/rotate.sh

And put fb-rotate command into the file

/Users/YOURUSERNAME/Documents/Source/fb-rotate/fb-rotate -d 0X_YOURIDHERE -r 0
/Users/YOURUSERNAME/Documents/Source/fb-rotate/fb-rotate -d 0X_YOURIDHERE -r 270

then make it executable

chmod +x ~/Documents/Source/rotate.sh

Now on your next reboot, it should auto flip your monitor the orientation you want. Obviously not a super elegant solution, but, whatever it’s done right, and, it work

If you want to test your scripts here they are testing:

to load:

launchctl load com.YOURUSERNAME.fb-rotate

to unload:

launchctl unload com.YOURUSERNAME.fb-rotate.plist

Making a cheap bookshelf using milk-crates

A couple weekends ago, my fiance and myself came up with the idea to make custom bookshelf using milk-crates. We didn’t actually have any milk crates, so we had to scour sites like Kijiji and Craigslist to find people in our area giving them away, or selling them cheaply. We also aquired some from a small corner store we visit frequently, first for free, then having to pay small amounts for them until we cleared them out!

Making this bookshelf will be pretty straightforward, and you don’t need many tools or additional items to make it. And, all you really need for this design is a total of 6 milk crates. However, this can change based on your design or what you plan on extending it to. 

First we had to figure out how wide the two milkcrates pushed together would be, so my fiance decided to use a small lighter to visualize the width before heading over to the home store. Not sure if this is the best method, but it seemed to work – lol!

So, let’s get down to business and start building this thing!

Here’s the list of stuff we had to procure.

  • Box of 1.5″ by 1/4″ stove bolts, with nuts. We got the box of 100 total nuts and bolts.
  • Box of 5/16″ fender washers (small hole, big disc)
  • Drill + drill bit (depending on bolt location)
  • Vice Grips, Wrench or (ugh!) Pliers to hold the bolt
  • 1 or 2 bottles of spray paint of your choosing. We picked Gold cause bling!

Now that you have parts procured and ready

So, now you’re going to want to lay out your shelf. Make sure to keep in mind that you may need to get it up, and down stairs or around tight corners. So, don’t make it too long, or, assemble it in it’s final resting place.

For our design, we chose to make a ‘staircase’ or ‘triangle’ out of the milk-crates, using 6 crates in total. This allows us to have it sitting in a triangle formation on the ground with shoe or other storage below, and 6 large spaces for books that will show up on an angle. You could also put it in a ‘staircase’ format up the wall, and have top shelves available for plants or other accessories.

You can do stepped shelves
Or, be fun like us and do a triangular shape !

So, once you have your design finalized (maybe you want to make an atari spaceship, or a rectangle, or whatever) lay out your milk crates in the design you want to get together.

Figure out where you want to put the bolts into the milk crates that will join them together securely, and easily. We chose to put 3 bolts per join, so in total we used this to secure ours (6 join spots):

  • 18 Bolts
  • 18 Nuts
  • 18 Washers

This is what we did to join ours together

First, we held them together and drilled a hole for the bolts.
Then, we tightened down with a screwdriver and vice-grips, or whatever they are called 🙂
Ended up looking like this, nice and tight!

What did it all cost?

  • Milk Crates – Free + $10
  • 2 Cans of spray paint  – $25.58
  • Fender Washers – $11.65 (50 qty) ($4.14 cost for the whole shelf)
  • Stove Bolts + Nuts – $15.61 (100 qty)  ($2.88 cost for this whole shelf)

Grand total of $42.60 with plenty of nuts/bolts/washers for more shelves!