File: mobile-root

package info (click to toggle)
qcom-phone-utils 0.4.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212 kB
  • sloc: sh: 441; ansic: 123; makefile: 14
file content (37 lines) | stat: -rwxr-xr-x 872 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -e

PREREQS=""
case $1 in
    prereqs) echo "${PREREQS}"; exit 0;;
esac

. /scripts/functions

# Parse command-line arguments for mobile-specific ones
for x in $(cat /proc/cmdline); do
    case $x in
        mobile.ro)
            # Android bootloaders might append "ro" or "rw" after our own
            # command-line, this makes sure we can force one of those
            # regardless of what the bootloader does
            REALRO=y
            ;;
        mobile.rw)
            REALRO=n
            ;;
        mobile.root=*)
            REALROOT=${x#mobile.root=}
            ;;
    esac
done

if [ -n "${REALROOT}" ]; then
    log_success_msg "Changing ROOT to ${REALROOT}"
    echo "ROOT=${REALROOT}" >> /conf/param.conf
    echo "MOBILE_ROOT=y" >> /conf/param.conf
fi

if [ -n "${REALRO}" ]; then
    echo "readonly=${REALRO}" >> /conf/param.conf
fi