Multidomains are basically synonyms

So I have a website with a DomainserverPlan from a webhosting company. Let us say it is called www.abc.com. Under this I can install Content Management Systems like WordPress etc.

Now I can buy Domainonly. Which is I buy a url www.xyz.com.This doesn’t come with a server, hence I need to reorder it under my Domainserver plan.

Hence, I reorder www.xyz.com under www.abc.com under the root (/) folder. Which basically means that whether I type www.abc.com or www.xyz.com, the same content will show up, which is available on the index.php page.

In other words the two urls are interchangeable.

What i then do is that since the content of www.xyz.com is different from www.abc.com, both of them will have their data in two separate folder /xyz and /abc.

I then modify the .htaccess so that the when url is www.abc.com, it is redirected to www.abc.com/abc/ folder & when url is www.xyz.com, it is redirected to www.abc.com/xyz/ (or www.xyz.com/xyz/).

Below is the .htaccess code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?abc.com$
RewriteRule ^(/)?$ abc [L]

RewriteCond %{HTTP_HOST} ^(www.)?xyz.com$
RewriteRule ^(/)?$ http://www.xyz.com/xyz [L]

 

 

Classpath definition for command line execution of Java Programs

I was trying to execute a really simple program in my Intellij IDE:

package com.example;

public class TestCLI {

    public static void main(String args[]) {
        for (int i = 0; i < args.length; i++) {
            System.out.println("args[" + i + "]: " +
                    args[i]);
        }
    }

}

Executing this program with
java TestCLI anti dote
We will see the following output:
args[0]: anti
args[1]: dote

My problem with the command line, was that it was constantly throwing an error at me:

Fehler: Hauptklasse com.example.TestCLI konnte nicht gefunden oder geladen werden

Error: Could not find or load main class com.example.TestCLI

The problem is that Intellij stores the complied classes (.class files) in another “out” directory, whereas the .java files stay in the “src” directory.

So then I had to rewrite the java command as

java -classpath C:\Users\XXXXX\IdeaProjects\Examples\out\production\Examples com.example.TestCLI anti dote

Here it is interesting to note that the folder “Examples” is the Project folder. Which further divides itself into src and out folders. The classpath has to refer to out\production\Examples.

The actual path of the class com\example\TestCLI.class has to be rewritten as com.example.TestCLI and then the parameters “anti” and “dote” are added.

Custom Rom Xperia Z5 E6653

Here’s the thing. Installing a custom rom on a Sony phone is painful. Really painful. Especially the Z5 is badly supported. I intend to only provide an overview here. The Internet will give you all the details. You just need to google the right key words.

Here’s how to go about it:

On your phone:

  1. Under Settings>Security set Unknown Sources to true.
  2. Enable USB Debugging under Developer Options. If you are not a developer, then click on the build number several times to enable Developer Options.

On your computer(Windows):

  1. Download and install Minimal ADB and Fastboot. The other variant is to have android studio installed. What does all this mean? ADB stands for Android Debug Bridge. You can push (“flash”) software from your computer into the phone, when you have ADB and Fastboot installed.
  2. Check if this works – How? Open the cmd line application and then type “adb devices”. You should see a alphanumeric number with the word device.
  3. You need to also download a driver, called a fastboot driver “S1 Fastboot Driver” or “ADB Interface Driver” and install it. Now how do you install it? This isn’t really a piece of cake. On the cmd prompt type “adb reboot-bootloader”. You will enter into the fastboot mode on the phone, with the blue led light. On your computer under “Device Manager” you will see that you have a new device (under “Other Devices”) with an exclamation mark. You need to then chose to install the driver. Select the driver “ADB Interface”.
  4. Once the driver is installed, when you type “fastboot devices” you will see the same thing, when you typed “adb devices” when the device was on.

Now you need to download certain softwares: We need a way to break into the kernel and install TWRP Recovery. When you have recovery installed you can then install the custom roms.

So download:

  1. E6653 Kernel boot image. –> Save on Minimal ADB Fastboot folder
  2. TWRP for E6653 ( I use 3.1.1) –> Save on Minimal ADB Fastboot folder
  3. Lineage OS –> Save on phone SD Card
  4. Gapps (arm 64) –> Save on phone SD Card

 

Now we have to load through fastboot the kernel and recovery:

  1. Go to command line. (Your phone is in fastboot mode -> switched off with blue light on)
  2. type in “fastboot flash boot boot.img” so that you can install the kernel/boot
  3. type in “fastboot flash recovery recovery.img” so that you can install twrp
  4. then type “fastboot reboot”
  5. When the led turns yellow, press the volume up button. You will then enter TWRP.
  6. If you are unable to enter TWRP then its mostly because of a shitty version of the kernel or twrp that you flashed. Since there are so many places, where you could possible download this stuff.. and several versions..its hard to say ( at least I am not technically capable of pinpointing the error)
  7. In TWRP install the two zip files – first lineageos then gapps.
  8. That’s it. Reboot.

If you want to now Root your LineageOS Sony Xperia z5 E6653, then you need to save SuperSU.zip file (v2.79 is compatible with LineageOS 14.1) on SD Card. Then you can go into TWRP.

How to get into recovery mode? In Developer Options, set “Advanced Restart” to true. Then when you press the power button and select restart, you will get options to go into Recovery or Bootloader etc. Then you can go into recovery.

Once in recovery, we just need to install the supersu_Vx.xx.zip file. The phone might boot a couple of times before it finally loads. Download the apps SuperSU and Rootchecker from playstore and run them.

If you are unable to go to recovery, then its again a problem with your TWRP version/Compatibility. So go back to fastboot and flash another version and try your luck.

That’s about it. It’s been a nerve wracking two days to get this far.

Please note, that Sony’s camera and audio quality are LOST when you install Lineage OS. Your Speakers will shrill loudly and your camera might be taking too bright photos. But now you have your freedom. Is the choice worthwhile? Only time will tell.