Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for cativatemmtd #2

Open
wants to merge 5 commits into
base: jb-4.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified jb_combo_c/files/init
Binary file not shown.
12 changes: 12 additions & 0 deletions jb_combo_c/ics_init/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ on early-init

# create mountpoints
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
# Create mountpoint so Dalvik can mark as slave in zygotes.
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028

# Allow system UID to setenforce and set booleans.
chown system system /selinux/enforce
chown system system /sys/fs/selinux/enforce
chown -R system system /selinux/booleans
chown -R system system /sys/fs/selinux/booleans
chown system system /selinux/commit_pending_bools
chown system system /sys/fs/selinux/commit_pending_bools

# Allow system UID to setenforce and set booleans.
chown system system /selinux/enforce
Expand Down Expand Up @@ -70,6 +81,7 @@ loglevel 3

# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
# Ensure permissions are set appropriately after device early-init.
mkdir /storage 0050 root sdcard_r

# Directory for putting things only root should see.
Expand Down
Empty file modified jb_combo_c/ics_init/ueventd.aries.rc
100644 → 100755
Empty file.
Empty file modified jb_combo_c/ics_init/ueventd.goldfish.rc
100644 → 100755
Empty file.
Empty file modified jb_combo_c/ics_init/ueventd.rc
100644 → 100755
Empty file.
10 changes: 5 additions & 5 deletions jb_combo_c/ics_rec_init/default.prop
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ ro.build.type=userdebug
ro.build.user=jenkins
ro.build.host=cyanogenmod
ro.build.tags=test-keys
ro.product.model=SGH-I897
ro.product.model=GT-I9000
ro.product.brand=samsung
ro.product.name=full_captivatemtd
ro.product.device=captivatemtd
ro.product.name=GT-I9000
ro.product.device=GT-I9000
ro.product.board=aries
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
Expand All @@ -34,12 +34,12 @@ ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=s5pc110
# ro.build.product is obsolete; use ro.product.device
ro.build.product=captivatemtd
ro.build.product=GT-I9000
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=GT-I9000-user 2.3.5 GINGERBREAD XXJVT release-keys
ro.build.fingerprint=samsung/GT-I9000/GT-I9000:2.3.5/GINGERBREAD/XXJVT:user/release-keys
ro.build.characteristics=default
ro.cm.device=captivatemtd
ro.cm.device=galaxysmtd
# end build properties
#
# system.prop for smdkc110
Expand Down
Empty file modified jb_combo_c/ics_rec_init/lpm.rc
100644 → 100755
Empty file.
Binary file modified jb_combo_c/ics_rec_init/sbin/adbd
Binary file not shown.
Binary file modified jb_combo_c/ics_rec_init/sbin/e2fsck
Binary file not shown.
1 change: 0 additions & 1 deletion jb_combo_c/ics_rec_init/sbin/mke2fs

This file was deleted.

Binary file added jb_combo_c/ics_rec_init/sbin/mke2fs
Binary file not shown.
29 changes: 20 additions & 9 deletions jb_combo_c/ics_rec_init/sbin/setupdatadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ PATH=/system/bin/:/system/xbin/

function migrate_datadata {
# Migrate data from /datadata to /data/data
if test -h /data/data ; then
rm /data/data
mkdir /data/data
chown system.system /data/data
chmod 0771 /data/data
cp -a /datadata/* /data/data/
if test -d /datadata/com.android.settings ; then
busybox mv -f /datadata/* /data/data/
# FIXME: restorecon might not restore the same context as original
# (remove when busybox has SELinux support)
restorecon -r /data/data
touch /data/data/.nodatadata
rm -r /data/data/lost+found
busybox umount /datadata
Expand All @@ -27,10 +26,15 @@ function migrate_cache {
if test -e /data/data/$1 ; then
if ! test -h /data/data/$1/cache ; then
OWNER="`ls -ld /data/data/$1/ | awk '{print $3}'`"
CONTEXT="`ls -Zd /data/data/$1/ | awk '{print $4}'`"
rm -r /data/data2/$1 # In case it exists
mkdir -p /data/data2/$1
chmod 751 /data/data2/$1
chcon $CONTEXT /data/data2/$1
busybox mv -f /data/data/$1/cache /data/data2/$1/
# FIXME: restorecon might not restore the same context as original
# (remove when busybox has SELinux support)
restorecon -r /data/data2/$1/*
ln -s /data/data2/$1/cache /data/data/$1/cache
chown $OWNER.$OWNER /data/data2/$1 /data/data2/$1/cache
busybox chown -h $OWNER.$OWNER /data/data/$1/cache
Expand All @@ -47,14 +51,21 @@ function migrate_cache {
CRYPTO_STATE="`getprop ro.crypto.state`"
VOLD_DECRYPT="`getprop vold.decrypt`"

if test -h /data/data ; then
# Handle pre-CM 10.2 symlink
rm /data/data
mkdir /data/data
chown system.system /data/data
chmod 0771 /data/data
fi

if test "$CRYPTO_STATE" = "unencrypted" ; then
if test "$VOLD_DECRYPT" = "" ; then
# Normal unencrypted boot
if test -e /data/data/.nodatadata ; then
if test -e /datadata/.nodatadata || test -e /data/data/.nodatadata ; then
migrate_datadata
else
rmdir /data/data
ln -s /datadata /data/data
mount -o bind /datadata /data/data

# Migrate download provider's cache out of /data/data because that's where market stores its downloads
migrate_cache com.android.providers.downloads
Expand Down
Binary file modified jb_combo_c/ics_rec_init/sbin/tune2fs
Binary file not shown.
Binary file modified jb_combo_v/files/init
Binary file not shown.
14 changes: 6 additions & 8 deletions jb_combo_v/ics_init/init.aries.gps.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
# conflicting with the default GPS init. (i.e. Vibrant)
#

# ST-Ericsson GNS7560
service gpsd /system/vendor/bin/gpsd
service gpsd /system/vendor/bin/gpsd -c /vendor/etc/gps.xml
class late_start
socket gps seqpacket 0660 gps system
user gps
group system inet
oneshot

on post-fs-data
mkdir /data/gps 775 gps system
# create data/gps for GPS demon
mkdir /data/gps 700 gps system
chown gps system /data/gps
chown gps gps /sys/class/sec/gps/GPS_PWR_EN/value
chmod 664 /sys/class/sec/gps/GPS_PWR_EN/value
chown gps gps /sys/class/sec/gps/GPS_nRST/value
chmod 664 /sys/class/sec/gps/GPS_nRST/value
chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
12 changes: 12 additions & 0 deletions jb_combo_v/ics_init/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ on early-init

# create mountpoints
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
# Create mountpoint so Dalvik can mark as slave in zygotes.
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028

# Allow system UID to setenforce and set booleans.
chown system system /selinux/enforce
chown system system /sys/fs/selinux/enforce
chown -R system system /selinux/booleans
chown -R system system /sys/fs/selinux/booleans
chown system system /selinux/commit_pending_bools
chown system system /sys/fs/selinux/commit_pending_bools

# Allow system UID to setenforce and set booleans.
chown system system /selinux/enforce
Expand Down Expand Up @@ -70,6 +81,7 @@ loglevel 3

# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
# Ensure permissions are set appropriately after device early-init.
mkdir /storage 0050 root sdcard_r

# Directory for putting things only root should see.
Expand Down
Empty file modified jb_combo_v/ics_init/lpm.rc
100644 → 100755
Empty file.
Empty file modified jb_combo_v/ics_init/ueventd.aries.rc
100644 → 100755
Empty file.
Empty file modified jb_combo_v/ics_init/ueventd.goldfish.rc
100644 → 100755
Empty file.
Empty file modified jb_combo_v/ics_init/ueventd.rc
100644 → 100755
Empty file.
14 changes: 7 additions & 7 deletions jb_combo_v/ics_rec_init/default.prop
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ ro.build.type=userdebug
ro.build.user=jenkins
ro.build.host=cyanogenmod
ro.build.tags=test-keys
ro.product.model=SGH-T959
ro.product.model=GT-I9000
ro.product.brand=samsung
ro.product.name=SGH-T959
ro.product.device=SGH-T959
ro.product.name=GT-I9000
ro.product.device=GT-I9000
ro.product.board=aries
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
Expand All @@ -34,12 +34,12 @@ ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=s5pc110
# ro.build.product is obsolete; use ro.product.device
ro.build.product=SGH-T959
ro.build.product=GT-I9000
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=soju-user 2.3.5 GINGERBREAD XXJVT release-keys
ro.build.fingerprint=google/soju/crespo:2.3.4/GRJ22/121341:user/release-keys
ro.build.description=GT-I9000-user 2.3.5 GINGERBREAD XXJVT release-keys
ro.build.fingerprint=samsung/GT-I9000/GT-I9000:2.3.5/GINGERBREAD/XXJVT:user/release-keys
ro.build.characteristics=default
ro.cm.device=vibrantmtd
ro.cm.device=galaxysmtd
# end build properties
#
# system.prop for smdkc110
Expand Down
1 change: 0 additions & 1 deletion jb_combo_v/ics_rec_init/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ service ueventd /sbin/ueventd
critical

service recovery /sbin/recovery

service setup_adbd /sbin/setup_adbd
oneshot

Expand Down
Empty file modified jb_combo_v/ics_rec_init/lpm.rc
100644 → 100755
Empty file.
Binary file modified jb_combo_v/ics_rec_init/sbin/adbd
Binary file not shown.
Binary file modified jb_combo_v/ics_rec_init/sbin/e2fsck
Binary file not shown.
1 change: 0 additions & 1 deletion jb_combo_v/ics_rec_init/sbin/mke2fs

This file was deleted.

Binary file added jb_combo_v/ics_rec_init/sbin/mke2fs
Binary file not shown.
29 changes: 20 additions & 9 deletions jb_combo_v/ics_rec_init/sbin/setupdatadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ PATH=/system/bin/:/system/xbin/

function migrate_datadata {
# Migrate data from /datadata to /data/data
if test -h /data/data ; then
rm /data/data
mkdir /data/data
chown system.system /data/data
chmod 0771 /data/data
cp -a /datadata/* /data/data/
if test -d /datadata/com.android.settings ; then
busybox mv -f /datadata/* /data/data/
# FIXME: restorecon might not restore the same context as original
# (remove when busybox has SELinux support)
restorecon -r /data/data
touch /data/data/.nodatadata
rm -r /data/data/lost+found
busybox umount /datadata
Expand All @@ -27,10 +26,15 @@ function migrate_cache {
if test -e /data/data/$1 ; then
if ! test -h /data/data/$1/cache ; then
OWNER="`ls -ld /data/data/$1/ | awk '{print $3}'`"
CONTEXT="`ls -Zd /data/data/$1/ | awk '{print $4}'`"
rm -r /data/data2/$1 # In case it exists
mkdir -p /data/data2/$1
chmod 751 /data/data2/$1
chcon $CONTEXT /data/data2/$1
busybox mv -f /data/data/$1/cache /data/data2/$1/
# FIXME: restorecon might not restore the same context as original
# (remove when busybox has SELinux support)
restorecon -r /data/data2/$1/*
ln -s /data/data2/$1/cache /data/data/$1/cache
chown $OWNER.$OWNER /data/data2/$1 /data/data2/$1/cache
busybox chown -h $OWNER.$OWNER /data/data/$1/cache
Expand All @@ -47,14 +51,21 @@ function migrate_cache {
CRYPTO_STATE="`getprop ro.crypto.state`"
VOLD_DECRYPT="`getprop vold.decrypt`"

if test -h /data/data ; then
# Handle pre-CM 10.2 symlink
rm /data/data
mkdir /data/data
chown system.system /data/data
chmod 0771 /data/data
fi

if test "$CRYPTO_STATE" = "unencrypted" ; then
if test "$VOLD_DECRYPT" = "" ; then
# Normal unencrypted boot
if test -e /data/data/.nodatadata ; then
if test -e /datadata/.nodatadata || test -e /data/data/.nodatadata ; then
migrate_datadata
else
rmdir /data/data
ln -s /datadata /data/data
mount -o bind /datadata /data/data

# Migrate download provider's cache out of /data/data because that's where market stores its downloads
migrate_cache com.android.providers.downloads
Expand Down
Binary file modified jb_combo_v/ics_rec_init/sbin/tune2fs
Binary file not shown.