Difference between revisions of "Motorola Droid 4"
|Line 67:||Line 67:|
| Gyro || N/A ||
| Gyro || N/A ||
| Proximity sensor ||
| Proximity sensor || ||
| Ambient Light Sensor || Yes ||
| Ambient Light Sensor || Yes ||
Revision as of 11:08, 18 December 2020
|Kernel version||5.9.0||Mainline + some patches not yet in mainline - see https://github.com/maemo-leste/droid4-linux|
|Serial||Yes||On MicroUSB port, requires special cable|
|Micro USB||Yes||OTG and USB network|
|Keyboard||Yes||Slightly modified keyboard layout, see https://www.spinics.net/lists/linux-omap/msg135137.html (TLDR; Shift key produces CTRL, SYM produces ALT, and Caps lock produces SHIFT)|
|3D Acceleration||Yes||PowerVR SGX540 (closed driver) - https://github.com/maemo-leste/pvr-omap4/|
|Audio||Yes||Switch around in alsamixer to get the right outputs working ('Speaker Right' set to 'HiFi' and 'HiFi' set to above 0 gets you output)|
|2G/3G data||Yes||Works with ofono, no UI yet - see https://github.com/maemo-leste/connui-cellular/|
|SMS||Yes||Works with ofono. Needs Leste UI|
|Phone calls||Yes||Works with ofono (good call quality, too), needs Leste UI|
|Bluetooth||Yes||Needs firmware - install latest firmware-ti-connectivity - See also https://github.com/maemo-leste/bugtracker/issues/290. Due to interference with WiFi, load driver manually, AFTER wifi module loaded|
|FM Transmitter||No||Apparently exists, and will need serdev kernel modules/drivers|
|FM Receiver||Not yet|
|Accelerometer||Yes||Available in /sys, and as input device via iio-uinput|
|Compass||Yes||Available in /sys (after loading ak8975 module. No Leste integration applications using it yet)|
|Ambient Light Sensor||Yes|
|HDMI-out||Yes||No UI integration|
|GPS||Yes||Works with gpsd but is not integrated yet, see GPS|
|Infrared||N/A||Missing in hardware|
|Idle power consumption||~120mW||Needs sim inserted|
- Droid4 with fully charged battery
- MicroUSB cable
- MicroSD card
- Host Linux or Windows system
- Android Tools: fastboot
- Flashing tools:
- XZ Utils and coreutils for Linux
- Etcher for Windows
Download from https://maedevu.maemo.org/images/droid4/
- Latest maemo-leste-1.0-armhf-droid4-*.img.xz
Download from https://github.com/tmlind/droid4-kexecboot.git
Check what kernel version your Android OS runs. For this go to Settings -> About phone. Slide to the bottom, where you can see "Kernel version". If you have at least 3.0.8, you may skip "Updating Android" step below.
- Create a working directory with above mentioned files in it
- unzip VRZ_XT894_9.8.2O-72_VZW-18-8_CFC.xml.zip
- Power off Droid4 and connect it to the host machine with MicroUSB cable
- Start the device in fastboot mode. For this press power button and bottom volume key simultaneously and release them after a second.
Updating Android. This will reinstall the Android OS on your device, deleting all user data. Do a backup, if you want to save something. When everything is ready, go to the working directory mentioned above and run:
pushd VRZ_XT894_9.8.2O-72_VZW-18-8_CFC.xml sudo bash ../flash-droid-4-fw.sh popd
Now, assuming you are in the working directory, install kexecboot:
sudo fastboot flash mbm VRZ_XT894_9.8.2O-72_VZW-18-8_CFC.xml/allow-mbmloader-flashing-mbm.bin sudo fastboot reboot-bootloader sudo fastboot flash bpsw droid4-kexecboot.img sudo fastboot flash utags utags-mmcblk1p13.bin sudo fastboot reboot
If you did "Updating Android" the device should run the firstboot steps. If you didn't, the device should reboot and show kexecboot menu for a few seconds before it boots to Android.
Now, flash the Maemo Leste image to your sdcard:
xzcat maemo-leste-1.0-armhf-droid4-20190227.img.xz | sudo dd status=progress bs=1M of=/dev/MICROSDCARD-DEVICE sync
On Windows: Use Etcher
Wait for sync to complete and insert MicroSD card into Droid4. Reboot the device and select Maemo Leste from the kexecboot menu.
You should now see Maemo Leste booting up, and it will show you hildon-desktop after a minute.
Normally you can just apt update && apt dist-upgrade to update to the latest version. If for some reason this fails:
- Poweroff device, grab the SD card
- Backup any important files
- Grab the latest image from https://phoenix.maemo.org/view/Images/
- Write it as before : xzcat maemo-leste-1.0-armhf-droid4-20190227.img.xz | sudo dd status=progress bs=1M of=/dev/MICROSDCARD-DEVICE
The battery in Droid4 is not easily removable. If you got the device stuck, use this combo: power button + bottom volume key. You should hold them for about 7 seconds. Droid4 will then reboot.
If Maemo is still running, you can also hold just the power button for ~10 seconds, and the device will run poweroff.
Some users reported that Bluetooth kernel module interfere badly with the WiFi driver on their devices. Blacklisting the module may help if you have such problems:
echo "blacklist hci_uart" >> /etc/modprobe.d/blacklist.conf
As explained at http://muru.com/linux/d4 , the Droid 4 exposes a serial console on the USB port. You can construct the required cable easily by following the instructions there. If you have old Nokia CA-42 or DKU-5 cables, then you can use them with the Droid 4, using instructions at https://jethomson.wordpress.com/2010/02/21/diy-usb-to-serial-cable-for-3usd/
While using the serial cable, if you lose the connection, the following may help:
18:43 < tmlind> sicelo: hmm the uart debug cable multiplexing still has issues, if the uart disappears during boot it should come back with the console login propt later 18:45 < tmlind> try plugging in a pc usb cable then back to uart cable in case that might help
Stuff to try
Adding this in rc.local above the exit 0 gets you some blinkenlights to watschen und relaxen.
echo cpu > /sys/class/leds/lm3532::kbd_backlight/trigger # gets you a cpu activity monitor on the keyboard backlight echo mmc0 > /sys/class/leds/shift-key-light/trigger # gets you a 'hdd led' of the SD card on the capslock light
Make Audio Automaticaly set up (Temporary Solution)
Adding this in /etc/rc.local above the exit 0 to make audio work from boot.
amixer cset numid=22 HiFi #set left speaker to HiFi amixer cset numid=21 HiFi #set right speaker to HiFi amixer cset numid=26 HiFi #set left headset to HiFi amixer cset numid=25 HiFi #set right headset to HiFi amixer cset numid=1 50% #set HiFi volumes to 50%
The WL1285C Wifi chip in the droid 4 has no onboard nvmem to save its calibration parameters or its MAC address. Instead it gets these parameters from a configuration file provided by the kernel. By default a generic file is provided but for optimal range and a correct persistent MAC address a calibration procedure must be performed.
Install necessary tools:
apt-get install ti-utils-wilink6 droid4-wlanconfig
Make sure there is a SIM in the phone.
Run this over SSH:
Read modem output: # cat /dev/motmdm1 & Online modem: # printf "AT+CFUN=1\r" > /dev/motmdm1 Connect to network: # printf "AT+COPS=1\r" > /dev/motmdm1 Print connected network: # printf "AT+COPS?\r" > /dev/motmdm1 Not sure, do it anyway: # printf "AT+SCRN=0\r" > /dev/motmdm1 Dial a number: # printf "ATD+1234567890\r" > /dev/motmdm1 Hang up: # printf "ATH\r" > /dev/motmdm1 Answer incoming call: # printf "ATA\r" > /dev/motmdm1
Audio wise, in alsamixer, make sure echo cancellation is turned on. I had to set Call out to "speakerphone" and set the right speaker to "voice" codec, and set volume for both call and voice to something non-zero.
22:12 < pave1> qmicli -d /dev/cdc-wdm0 --wds-follow-network --wds-start-network=apn=internet.t-mobile.cz 22:12 < pave1> route del default 22:12 < pave1> sudo ifconfig wwan0 up 22:12 < pave1> dhclient wwan0
modprobe gnss-motmdm and point gpsd to use /dev/gnss0
22:30 < tmlind> hmm there's a probably kernel gnss bug for gsp access fyi, you can currently only open one connection before you have to restart gpsd :)
Can try to
mkfifo /tmp/gps cat /dev/gnss0 > /tmp/gps Then point gpsd to use /tmp/gps
22:45 < tmlind> fyi, here's how to send USSD to query balance for example: printf "AT+CUSD=1,#999#,0\r" > /dev/motmdm1 22:47 < tmlind> fyi, for parsing incoming USSD, this web interface works if set to utf-8: https://www.mobilefish.com/services/latin_utf_base64_to_hex/latin_utf_base64_to_hex.php#text_hex_output