droid4 alpine-usage

login

after you insert the sd card to the phone, turn it on and wait couple of minute, you supposed to see the login section that look like that:
Welcome to Alpine Linux 3.10
Kernel 5.4.2-00083-gf1a2fbd56a1d on an armv7l (/dev/tty1)

droid4 login:

you need to insert the username(“root”) and press enter then you will see:
Password:
type your password and than enter.
if you succeed login, you’ll see:
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See .

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

droid4:~#

this is the linux prompt. now you ready to write commands.

use phone options

run commands from the computer and use the phone as mass storage device

to run commands from the computer via ssh, we first need to configure the ip of the droid4 device to 10.0.1.1 on the computer. you can configure your computer to do this automatically by the commands(on the PC):
sudo touch /etc/udev/scripts/droid4 /etc/udev/rules.d/90-local.rules
sudo chmod 646 /etc/udev/scripts/droid4 /etc/udev/rules.d/90-local.rules /etc/network/interfaces
echo '#!/bin/bash' > /etc/udev/scripts/droid4
echo "ifconfig droid4 10.0.1.1 netmask 255.255.255.0" >> /etc/udev/scripts/droid4
sudo chmod 755 /etc/udev/scripts/droid4 echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="usb", ATTRS{serial}=="0000:00:1d.0",ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="usb*", NAME="droid4" , RUN+="/etc/udev/scripts/droid4"' >> /etc/udev/rules.d/90-local.rules
echo -e "auto usb\niface droid4 inet static\n address 10.0.1.1\n netmask 255.255.255.0" >> /etc/network/interfaces sudo chmod 644 /etc/network/interfaces /etc/udev/rules.d/90-local.rules

and then reboot the computer.
now connect your device to the computer via usb cable and you will see the second partition of the sd card(“user_data”).
type in the pc (or “ssh root@droid4″ if you added the line:”10.0.1.2 droid4” in /etc/hosts):
ssh root@10.0.1.2
you supposed to see again the login section.
after that you login(the same action like in the login part[the first part] of the guide). you can continue to type the following commands from your pc through the ssh secction.
you can stop this functionality and turn them on again by the commands(in the device or in the ssh section):
turn on:
/etc/init.d/droid4-usb start
turn off:
/etc/init.d/droid4-usb stop
you can also set if the functionality will be on or off at boot time by the commands:
automatically on:
rc-update add droid4-usb default
automatically off:
rc-update del droid4-usb default

cantrol the device

set the leds keyboard/RGB/screen button etc,

you can change the brightness light of the keyboard or the button leds, it can get in value from 0(off) to 255(max) and you can do it by the commands:
set keyboard brightness:
droid4-leds -s 255 keyboard
droid4-leds -s 150 keyboard

set screen button brightness:
droid4-leds -s 200 buttons
droid4-leds -f buttons

for more option you can see the help for the script:
droid4-leds --help

vibratory

vibrate:
droid4-vibrator
or(you can replace “1000” with the time in microsecond you want to vibrate):
droid4-vibrator 1000

checking the battery status

you can check the power supply parameters by the commands:
charging/discharging:
cat /sys/class/power_supply/battery/status
charge level:
cat /sys/class/power_supply/battery/capacity_level
voltage and current:
cat /sys/class/power_supply/battery/voltage_now
cat /sys/class/power_supply/battery/current_now

missing symbols

to type symbols that are missing on the keyboard you can press on the “OK” key on the keyboard and the numbers will change to the missing symbols.
[1-‘Escape’, 2-‘;’, 3-‘:’, 4-‘|’, 5-‘`’, 6-‘~’, 7-‘{‘, 8-‘}’, 9-‘[‘, 0-‘]’, /-‘\’]

power saving

for power saving you can press on the power button.
you can see the level of power saving by the command:
droid4-pm -l
for more option you can see the help for the script:
droid4-pm --help

audio

you can also change the audio setting:
set volume(get values between 0%-100%):
amixer set "HiFi" 100%
amixer set "HiFi" 0%
amixer set "HiFi" 50%

diseble speaker:
amixer set "Speaker Right" off
set speaker for music:
amixer set "Speaker Right" HiFi
enable headset:
amixer set "Headset Right" HiFi
amixer set "Headset Left" HiFi
disable headset:
amixer set "Headset Right" off
amixer set "Headset Left" off
now you can play by the command(you can replace “/usr/share/sounds/alsa/Front_Center.wav” with the file you want to play):
play /usr/share/sounds/alsa/Front_Center.wav
config audio for voice call:
(at the boot time the audio set automatically for voice call with default setting. if this not happen you can do it manually by the command:/etc/init.d/droid4-startup start you can change that behavior by the command:droid4-startup configure [init list])
set microphone and volume(get values between 0%-100%):
amixer set "Call Noise Cancellation" unmute
amixer set "Call" 100%
amixer set "Mic2" 40%
amixer set "Left" "Mic 2"
amixer set "Voice" 55%
amixer set "Call Output" Speakerphone

set speaker for voice call:
amixer set "Speaker Right" "Voice"

use modem options

start the modem

the modem automatically. you can change the behavior by the commands: automatically on:
rc-update add droid4-modem-app default
automatically off:
rc-update del droid4-modem-app default
you also can turn it on/off by yourself with the commands:
turn on:
/etc/init.d/droid4-modem-app start
turn off:
/etc/init.d/droid4-modem-app stop

read sms

you get notify on sms by vibratory and blue len will turn on
you can read the sms by the command:
droid4-modem sms
to see only unread sms:
droid4-modem sms -u
to mark the unread sms as read:
droid4-modem sms -m
for more option you can see the help for the script:
droid4-modem sms --help

send sms

replace the “hellow world” part in your message and the “85290000000” part with destination international number of the sms, with the country code included(e.g if your international number is +85290000000 you need to type “85290000000”):
droid4-modem send -p "85290000000" "hellow world"
you can send also by name if you insert it in the phonebook(droid4-modem phonebook --help):
droid4-modem send -n "nickname" "hellow world"
for more option you can see the help for the script:
droid4-modem send --help

voice call

incomming call

you will get notify on incomming call by vibratory, blue len will turn on and the number will appear on the screen
you can answer to the call by press on the volum up buttons or by the command:
droid4-modem -a
to hang up the phone by press on the volum down buttons or by the command:
droid4-modem -g
to turn off the blue led:
droid4-modem -o
for more option you can see the help for the script:
droid4-modem --help

dial

to dial replace the “85290000000” part with destination number you want to call.
call with calling line id:
droid4-modem call 85290000000
call by name:
echo "droid4-modem call -n "nickname"
and again you can hang up the phone by:
echo "ATH" > /dev/motmdm1
you can see the call history by the command:
droid4-modem history
for more option you can see the help for the script:
droid4-modem history --help