Phoenix OS on XPS 12 9250

PhoenixOS is an Android x86 project that allows Android to run natively on typical x86 based hardware. I own an XPS 12 9250 2-in-1 tablet/laptop, which I’ve installed PhoenixOS 2.3 to. My notes:

Detecting PhoenixOS hang

Initially after installation to my C drive in Windows, PhoenixOS can be selected in a Grub boot screen. However it failed to start, hanging on a “Detecting PhoenixOS…” message. There’s not much out there on this message other than a FAQ that blames drive performance. Mine’s on an SSD, so I doubted that was the problem.

Solution

I disabled BitLocker. The files placed on the my NTFS-based C: drive can’t be read by a non-windows operating system if it is encrypted by BitLocker.

Sleep works, waking does not

The XPS 9250 does go to sleep in PhoenixOS, however it freezes on waking with a black screen. Many other users with different hardware also seem to face this wake issue with PhoenixOS, however I could not find an easy fix for this.

Camera does not work

After installation, neither the front or rear cameras of the laptop work out-of-the-box. I could not find an easy fix for this.

Performance

Performance seems quite good. I installed Shooty Skies to test out gaming in PhoenixOS, and it played as one would expect from any Android tablet. General usage such as browsing seems to perform as expected.

 

Tweak Signal To Noise Target Margin on a TP-LINK TD-W8968

Modifying the Signal to Noise Margin can increase the speed of an ADSL connection at the potential detriment of stability.

One analogy I’ve read is that you can think of the Signal to Noise Margin is like the altitude at which a plane flies over the sea. As expected, the sea will have waves, and an ADSL connection will also have waves of noise (radio interference) that could cause instability. Just as flying a plane higher over the sea would protect it from colliding with a wave in the sea, the Signal to Noise Margin is the level of noise the modem is configured to be able to tolerate before disconnecting.

Here in the UK, British Telecom and its affiliates set the Signal to Noise margin at 6db if the line is performing as expected, and it will automatically adjust this to be higher during periods of instability, or when there is a fault on the line.

Some routers allow you to manually override the Signal to Noise margin. One of my routers, the TP-LINK TD-W8968 allows me to do so using the command line.

To modify the Signal to Noise margin on a TP-LINK TD-W8968:

  • Telnet to the router using a tool like Putty or Window’s command line telnet. (i.e. telnet 192.168.1.1 23) and log in with your username and password
  • Type command adsl configure –snr 50
  • Your ADSL will drop and reconnect at a higher sync rate.

When doing this, I am able to gain 1.5mbit of downstream from my 13mbit ADSL connection, however the connection becomes a bit too unstable for online gaming.

Use at your own risk!

VirtualBox VM Aborting When Mouse Enters Screen

When using the Internet Explorer VMs from modern.ie in VirtualBox 5.1.6, I encountered a strange issue. The VM boots normally, but when I interacted with it within VirtualBox the VM immediately shut down and went into an “Aborted” state. Right clicking the VM to check the logs yielded no information in particular.

After some research I found another user with a similar issue on the VirtualBox forums. In his case, updating the VirtualBox Guest Additions resolved the issue. This makes sense, as the Guest Additions currently used by the modern.ie VMs are out-of-step with the current version of VirtualBox, however this is not easy as simply clicking inside the VM results in it shutting down.

Enabling Remote Display (after installing the Proprietary VirtualBox Extension Pack) and connecting to the VM in this way works around the issue, as the Guest Extensions are not used and thus cannot crash the VM. Once connected in this way Guest Extensions can be downloaded and updated.

VirtualBox on Scaleway

Scaleway now has a very nice x86_64 offering, where one can utilize a bare metal server with up to 32GB of ram for just €0.05 an hour. One caveat of their service is that they inject their own kernel whilst the machine boots. This means that obtaining the Linux kernel headers for the kernel to compile the Virtual Box kernel module can be a bit tricky.

At the time of writing, a script included with the servers (/usr/local/sbin/oc-sync-kernel-headers) is supposed to handle syncing the currently selected kernel’s headers to the server, however this script does not work for Scaleway’s x86_64 offerings.

To get VirtualBox working on a Scaleway box:

  1. Download and extract the Kernel Sources currently used by Scaleway. At the time of writing, this is 4.4.6:
    1. sudo su
    2. cd ~
    3. wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.6.tar.xz
    4. tar xvfJ linux-4.4.6.tar.xz
  2. Place current configuration file in kernel directory
    1. zcat /proc/config.gz > linux-4.4.6/.config
  3. Compile the Kernel
    1. make -j8
      1. Replace 8 with the number of cores you would like to use
  4. Compile the Virtualbox Kernel Module
    1. export KERN_DIR=/root/linux-4.4.6/
    2. /sbin/rcvboxdrv setup

Ianloic below has mentioned that some changes were made to the .config file. One that works can be downloaded here:
https://raw.githubusercontent.com/scaleway/kernel-tools/f9c1acbfd1ff240f9c3f2b6cd50c1db5b8c01304/x86_64/4.4.4-std/.config

Thanks to Davide’s contribution in the comment section below, this has since been modified to obtain the .config file from /proc:
zcat /proc/config.gz

Yum update fails after CentOS 5 to Oracle Linux EL5 conversion

After converting an E-Business Suite virtual machine I have running at home from CentOS 5 to Oracle Linux EL5 using Oracle’s provided script, my yum update stopped working. Whenever running the command, I would get the following (truncated) output:

Running Transaction Test
Finished Transaction Test

Transaction Check Error:
file /usr/share/backgrounds/images/default-5_4.jpg from install of oracle-logos-4.9.17-10.noarch conflicts with file from package desktop-backgrounds-basic-2.0-41.el5.centos.noarch
file /usr/share/backgrounds/images/default-dual-wide.jpg from install of oracle-logos-4.9.17-10.noarch conflicts with file from package desktop-backgrounds-basic-2.0-41.el5.centos.noarch
file /usr/share/backgrounds/images/default-dual.jpg from install of oracle-logos-4.9.17-10.noarch conflicts with file from package desktop-backgrounds-basic-2.0-41.el5.centos.noarch
file /usr/share/backgrounds/images/default-wide.jpg from install of oracle-logos-4.9.17-10.noarch conflicts with file from package desktop-backgrounds-basic-2.0-41.el5.centos.noarch
file /usr/share/backgrounds/images/default.jpg from install of oracle-logos-4.9.17-10.noarch conflicts with file from package desktop-backgrounds-basic-2.0-41.el5.centos.noarch

 

Some quick googling only yielded a forum post in another language, so I had to improvise. To fix the problem, I removed the offending package and reinstalled it before running yum update:

yum erase desktop-backgrounds-basic-2.0-41.el5.centos.noarch

This uninstalled Nautilus, which is GNOME’s file manager. Simply issuing this command reinstalled Nautilus and the offending package:

yum install nautilus

Now I am able to again use yum update. Hope this helps someone else!

HTC One X blank screen after update

Recently I bought an HTC One X from AT&T to replace my iPhone. When I got it, I was prompted to update to the new update released by HTC on August 8th, 2012. Unfortunately after the update and after the reboot, I was left with an inoperable phone! The screen was black and the only thing that could be done was to hold down the power button to reset the phone. I tried a factory reset by going into the boot loader (HBoot), but no luck!

After reading some posts suggesting a factory reset from HBoot that did not help I tried reflashing the update using HTC’s RUU utility. The patch that includes the utility can be downloaded at http://dl3.htc.com/application/htc_one_x_RUU_2.20.502.7_att_us_08022012.exe (linked from the HTC One X support page).

Luckily, reflashing fixed my issue! Hopefully this helps someone else with the same issue not spend an hour on the phone with AT&T.

Disabling VT-X in VirtualBox (on Linux)

While trying to create a new Virtual Machine to install EBS on my home Ubuntu server, I received error messages saying “VT-X is unavailable (VERR_VMX_NO_VMX)” upon booting the new VM. This error message makes sense  because my home server uses an old Core2Duo processor that does not have VT-X extensions.

In the VirtualBox GUI, however, the extensions tab where this feature could be disabled was greyed out (presumably due to my processor’s lack of the feature).

At first, at the recommendation of the top pages on google for the error message, I tried modifying this line in VM’s my .vbox file:

<HardwareVirtEx enabled=”true” exclusive=”true“/>
to:
<HardwareVirtEx enabled=”false“/>

When I restarted the virtual machine, however, the file would change itself back.

While it’s not very well documented, rather than editing the configuration file, it is a better idea to issue the following commands (replace EBS with your VM’s name):

VBoxManage modifyvm EBS –hwvirtex off
VBoxManage modifyvm EBS –vtxvpid off

These commands will use the VBoxManage command to properly change the configuration file and allow the VM to boot without VT-X extensions.

Applying a Credit Memo to an Invoice – ARP_PROCESS_APPLICATION.CM_APPLICATION

Recently I was required to find a way to apply a Credit Memo to a Oracle Account Receivables Transaction (such as an Invoice, or Debit Memo). Unfortunately, there is not a whole lot of documentation available showing how to accomplish this. Many users on OTN Forums, such as this forum post, also have had this requirement, but need an example.

In this post I will make an example I created public. Disclaimer: This is provided with no warranty and is hereby released under the BSD 3 permissive license. In short, you can do what you please with the example and the code, but I take no responsibility and provide no warranty for its use.

The R12 Accounts Receivables Reference Guide explains a public API called AR_CM_APPLICATION_PUB.ACTIVITY_APPLICATION(). This API is documented and intended for use in customizations involving Credit Memo application. However, this API only allows you to apply a Credit Memo to a Receivables Activity. An invoice is not a Receivables Activity, and this is not how Credit Memos are applied when using the Application to apply them to an invoice.

Enter ARP_PROCESS_APPLICATION.CM_APPLICATION(). This package and procedure exists in the APPS schema and according to some it is used by the Accounts Receivables Transaction forms for Credit Memo Application (Receivables Manager -> Transactions -> Transactions Summary). This package and procedure is a Private API and is not actually intended for use by customizations. That being said, you may have no choice but to use it; just make sure you realize that the API could change at any time, and Oracle will not support its use.

A quick analysis of the code shows that ARP_PROCESS_APPLICATION.CM_APPLICATION() does a small amount of validation of input and inserts a row into table APPS.AR_RECEIVABLE_APPLICATIONS. To get the proper input for this procedure, query this table to see examples of Credit Memo applications already made in your Development Instance. My example, apply_credit_memo_test.sql, should help you come up with an anonymous block to apply a Credit Memo to an Invoice.

Feel free to post in comments if you have any questions!

Edit: If you are receiving no data found errors, please try initializing an apps session and mo variables as Muhammad Hasan mentions below in the comments. His example:

mo_global.init(‘AR’);
fnd_global.apps_initialize(2691, 20678, 222);
mo_global.set_policy_context(‘S’, 247);

Quick and Dirty Anonymous Block for outputting FND_MSG_PUB error logs

While working on some PL/SQL code developed to call EBS Accounts Receivables APIs, I’ve found a code snippet on Oracle CRM Blog useful for outputting errors logged by Accounts Receivables APIs. Below is an anonymous block that includes this snippet of code, ready to be copied and pasted into SQL Developer to quickly output errors generated by Oracle Applications. I usually add this to the bottom of my Unit Testing scripts for easy debugging.

Hope it helps someone!

set serveroutput on
declare
  out_message varchar2(2048);
  i number;
  l_msg_index_OUT number;
begin
  IF ( FND_MSG_PUB.Count_Msg > 0) THEN
    FOR i IN 1..FND_MSG_PUB.Count_Msg LOOP
      FND_MSG_PUB.Get(p_msg_index => i,
        p_encoded => 'F',
        p_data => out_message,
        p_msg_index_OUT => l_msg_index_OUT );
      dbms_output.put_line('l_msg_data :' ||out_message);
    END LOOP;
  ELSE
  dbms_output.put_line('No errors to output.');
  END IF;
end;

Credit to Oracle CRM Blog for the body of the Anonymous Block.

JDeveloper – Updating a ViewObject’s Query Offline

While maintaining some JAX-WS Web Services I built using ADF Business Components (such as View Objects, Entity Objects, Application Modules, etc), I found a way to edit a View Object’s query without having a connection to the JDeveloper project’s database. This is useful for me because I work from home and do not always have easy access to the databases we work with, but still want to get a bit of work done, but it’s not quite obvious you can do this without directly editing the XML file.

To edit a ViewObject’s query offline:

  1. Open the View Object
  2. Go to the Query side tab
  3. Click the pencil icon above the query to open the query (you’ll be told you’re not connected– click OK)
  4. Make your changes and press Apply or OK.
  5. Here you’ll be told you’re not connected again, close the window by pressing X, but don’t click ok.
If you follow the instructions above, particularly closing the dialog rather than pressing OK, your ViewObject’s query should be edited! Just make sure to test it when you have access to the database again!

 

Screenshot of Offline View Object editing

Make sure not to press OK here! Just close the dialog.