UPDATE 5.5.2015: Thanks to Simos Xenitellis for finding out how the WiFi test works.
The bq Aquaris E4.5 Ubuntu Edition has a “hidden” Factory Mode. You can access it by doing the following:
Power off the device
Press the POWER and VOLUME DOWN buttons for more than ten seconds. The device will boot while you press the buttons, so keep pressing!
The following menu will be shown:
You can select an option using the VOLUME UP and VOLUME DOWN buttons, and execute it using by pressing the POWER button. You can exit from a sub-menu by pressing the VOLUME UP button for a couple of seconds. If you see a blue bar with options on the bottom of the screen, a POWER button press will select the option in the middle and a long press on the VOLUME UP button will select the option on the right, usually labeled “Back”.
This option will offer you manual tests of the device hardware. Each test is for a specific hardware item, e.g. the touch screen, the backlight or the modems, and after the test you can select “Test Pass” or “Test Fail”. The results of your answers will be shown in a report later.
The following tests are currently offered on my device:
Keys: Will test the three hardware buttons.
Touch Panel: Will run through several touch panel tests, you have to touch every red box to turn it green.
Backlight Level: Displays several images, switch through them using the volume buttons.
Memory Card: Detects internal and external flash memory and the detected capacity.
SIM Detect: Tests both SIM slots for detected SIM cards.
Signaling Test: You can start an emergency call. Probably not a good idea.
Vibrator: The phone vibrates until one of the two Pass/Fail options is selected.
LED: You can turn on the LED in different colors.
RTC: Sets the clock to a couple seconds before midnight, and when it passes midnight, the alarm goes off. Pretty loud!
Loopback-PhoneMic_SpeakerLR: Tests audio loopback. Very loud!
Ringtone: Plays an annoying beep through the speakers, very loud!
Receiver: Plays an annoying beep through the small ear speaker.
Speaker OC Test: Plays an annoying beep through the speakers, very loud!
Headset: You can play the annoying beep through the headset or test headset microphone loopback. Requires a plugged-in headset.
G-Sensor: Displays the current gravity sensor values. If you put the phone on a table, the third value should be around +9.81. If you put the telephone in different positions, the status of each axis will change from “in testing” to “pass”.
G-Sensor cali: You can calibrate the gravity sensor.
M-Sensor: Displays the current magnetical sensor values. As you turn the phone around its axes, the values will change. The value for Y was about 25 when I put the phone on a table and pointed it north.
ALS/PS: Shows the ambient light sensor (ALS) and proximity sensor (PS) values. Try moving your hand closer to the two sensors right near the receiver. If I cover both sensors with my hand, the ALS reports 0h (dark) and the PS goes up to 3FFh (near).
PS cali: Cover the PS with your hand and select “Do calibration”. After that the value should be 0 when there is nothing in front of it and 1023 if the sensor is covered.
Gyroscope: Displays the current gyroscope (rotation speed) sensor values.
Gyroscope cali: Allows one to calibrate the gyroscope. I think this needs an actual mechanical testbench to be accurate.
Main Camera: Take a picture using the main camera.
Sub Camera: Take a picture using the front-facing sub camera.
Strobe: Flashes the LED strobe.
GPS: Tries to get a GPS fix and allows to restart the GPS in “Hot” or “Cold” mode. Obviously doesn’t use A-GPS, it took about 190 seconds to get a fix on my first try. When a fix is acquired, the string “fixed” is shown and the “TTFF(s)” value stops updating, see the screenshot below.
FM Radio: Tunes the FM radio to 88, 98.7 or 108 MHz if the headset is plugged in.
Bluetooth: Will initialize Bluetooth and start a scan for nearby devices.
Wi-Fi: Starts the WiFi module and starts scanning for open accesspoints, then connects to the first one it finds.
USB: Checks if the USB port is connected in slave mode.
OTG: Displays the current USB-On-the-Go status, e.g. if the device is acting as a slave or a host.
Battery & Charger: Displays extensive information about the battery and charger, e.g. voltage, temperature, current and PMIC chip status.
Idle current. The screen just goes blank after a few seconds and the menu comes back again after a button press. Maybe it puts the phone to sleep so the idle current can be measured using (external) equipment?
This is a screenshot of the GPS test:
These are some of the test pictures for “Backlight Level”:
This will just run through all tests one after the other. It takes quite long.
Lists all previous answers to all tests. A “Test Pass” will result in a green entry, a “Test Fail” in a red one. Unanswered tests are black.
Displays the hardware/software versions of various components and the modem IMEIs. On my device the information is as follows:
While in Factory mode, the phone shows up with the following profile on the USB bus:
The USB ID is different than the normal one. So the device seems to be produced by HTC for bq and exports two devices: an USB storage class device labeled “Linux File-CD Gadget”, and an ACM serial communication device. The storage device cannot be mounted in my setup, it fails with “no medium found on /dev/sdc”. The ACM device is recognized by ADB and can be used if the ADB server is started as root, or if the access rights to the USB device are set correctly (e.g. using an udev rule).
Now let’s open an ADB shell while the phone is in factory mode:
I have no idea why some of the parameters appear twice in the cmdline.
Looks like the device booted the default kernel, but boot_reason=0 instead of the boot_reason=4 on normal startup.
Let’s look at the process list:
The Factory Mode environment consists of the /system/bin/factory process and a short list of other processes, mainly ADB and MediaTek drivers. /system/bin/factory is written in C++, directly accesses /dev/graphics/fb0 and, as expected, links against pretty much every hardware access library on the system:
If you find out more about the Factory Mode on this device, please find me on Launchpad.net and get in contact.