Tizen - Galaxy S III General

As tizen source is available now I wondered if anyone has taken a look at it yet.
I prepared my machine to start building it and test it.
Will publish updates in this thread.
Sent from my GT-I9300 using xda premium

Another mobile OS. Like there isnt enough already.

Subscribe
Tapatalk 2-vel küldve az én GT-I9300-ről

As far as I have read the new phone with Tizen which Samsung will release (i9500) uses the i9300 modem.
Looking at the structure, used kernel etc now.
For building a kickstart file is used, it is looking like this:
Code:
# -*-mic2-options-*- -f loop [email protected]@-rs.tar.gz -*-mic2-options-*-
#
# Do not Edit! Generated by:
# kickstarter.py
#
lang en_US.UTF-8
keyboard us
timezone --utc America/Los_Angeles
# ROOT fs partition
#part / --size=800 --ondisk mmcblk0p --fstype=ext4 --label=platform
# Use larger partition for creation, and will be shrinked at last, workaround of libzypp bug
#part / --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=platform
# DATA partition
#part /opt/ --size=1800 --ondisk mmcblk0p --fstype=ext4 --label=data
# ROOT fs partition
part / --size=1700 --ondisk mmcblk0p --fstype=ext4 --label=platform
# DATA partition
part /opt/ --size=3000 --ondisk mmcblk0p --fstype=ext4 --label=data
# UMS partition
part /opt/media/ --size=300 --ondisk mmcblk0p --fstype=vfat --label=ums
rootpw tizen
bootloader --timeout=0 --append="rootdelay=5"
desktop --autologinuser=root
user --name root --groups audio,video --password ''
repo --name=Tizen-main --baseurl=https://download.tizen.org/snapshots/trunk/common/@[email protected]/repos/main/armv7l/packages/ --save --ssl_verify=no
repo --name=Tizen-base --baseurl=https://download.tizen.org/snapshots/trunk/common/@[email protected]/repos/base/armv7l/packages/ --save --ssl_verify=no
%packages
@tizen-c210
@tizen-bootstrap
-glib2-static
-gettext-tools
-eglibc-utils
-imake
-giflib-utils
-brcm-gps-daemon
-insserv
%end
%prepackages
libgcc
eglibc
sqlite
zlib
libpython
libdlog
libcap
libattr
default-files-slp
busybox
python-base
libacl
glib2
tzdata-slp
vconf
libxml2
heynoti
openssl
shared-mime-info
libudev
security-server
dbus-libs
cert-svc
libsecurity-server-client
%end
%post
echo 'kickstart post script start'
if [ -d /etc/init.d ]; then
cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
fi
rm -rf /etc/init.d*
ln -sf /etc/rc.d/init.d /etc/init.d
# Without this line the rpm don't get the architecture right.
echo -n 'armv7l-meego-linux' > /etc/rpm/platform
ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
ail_initdb
/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
cat > /usr/bin/press << EOF
#!/bin/sh
JUNK="SLP"
[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
echo "Press return key to stop scripts"
read -t \$TIMEOUT JUNK
exit \$?
EOF
chmod +x /usr/bin/press
ln -s /opt/etc/X11/xkb /usr/share/X11
echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
rm -rf /usr/include
rm -rf /usr/share/man
rm -rf /usr/share/doc
MAJOR="2"
MINOR="0"
cat >/etc/info.ini <<EOF
[Version]
Major=$MAJOR;
Minor=$MINOR;
Build=TIZEN_`date +%Y%m%d`_1;
Order=;
[Build]
Date=`date +%Y.%m.%d`;
Time=`date +%H:%M:%S`;
EOF
ln -sf /etc/info.ini /opt/etc/info.ini
ln -sf /etc/info.ini /usr/etc/info.ini
mkdir -p /home/app
cp -a /etc/skel/.e /home/app/
chown -R 5000:5000 /home/app
chmod 0755 /home/app
chown -R 5000:5000 /opt/home/app
chmod 0755 /opt/home/app
cat > /usr/lib/systemd/system/usb-debug.service << EOF
[Unit]
Description=Start usb networking for debugging
ConditionPathExists=/sys/devices/platform/usb_mode/UsbMenuSel
[Service]
Type=oneshot
RemainAfterExit=yes
Environment=PATH=/bin:/sbin
ExecStart=/bin/bash -c 'echo 4 > /sys/devices/platform/usb_mode/UsbMenuSel'
ExecStart=/sbin/ifconfig usb0 192.168.129.3 netmask 255.255.255.0
ExecStop=/bin/bash -c 'echo 0 > /sys/devices/platform/usb_mode/UsbMenuSel'
#
# We now don't launch this USB mode hack by default. If you need that, run this:
# systemctl enable usb-debug.service
# or create a link manually like below:
# ln -s ../usb-debug.service /usr/lib/systemd/system/basic.target.wants/usb-debug.service
#
[Install]
WantedBy=basic.target
EOF
# required for the connman systemd service
cat > /etc/sysconfig/connman << EOF
OPTIONS="-W wext"
EOF
# required for the wpa_supplicant systemd service
cat > /etc/sysconfig/wpa_supplicant << EOF
OPTIONS="-Dwext"
EOF
ldconfig
rpm --rebuilddb
echo 'kickstart post script end'
%end
%post --nochroot
%end

News ?

It is nice Android to have competition but from what I saw on youtube Tizen is just android stuck at version 2.3. Is there anything new except that there will be no native apps?

gud to here that
now wating for ur good work

Related

[HOWTO + BLACKHAWK ROM] Galaxy Ace firmware in ext4 format

Just want to share my command list to convert Galaxy Ace firmware from rfs to ext4.
Code:
cd /home/user/rfs2ext4
dd if=/dev/zero of=system.rfs bs=4096 count=53696
losetup /dev/loop0 system.rfs
mkfs.ext4 -T ext4 -b 4096 -m 0 -J size=4 -O ^resize_inode,^ext_attr,^huge_file,^has_journal /dev/loop0
tune2fs -c 100 -i 100d -m 0 /dev/loop0
mkdir /tmp/ext4
sudo mount /dev/loop0 /tmp/ext4
chmod 755 fix-*.sh
cp fix-*.sh /tmp
mkdir /tmp/rfs
sudo mount -o loop source/system.rfs /tmp/rfs
sudo cp -a /tmp/rfs/* /tmp/ext4
cd /tmp/ext4
sudo ../fix-system.sh
cd /home/user/rfs2ext4
sudo umount /tmp/ext4
sudo umount /tmp/rfs
dd if=/dev/zero of=data.rfs bs=4096 count=46400
losetup /dev/loop0 data.rfs
mkfs.ext4 -T ext4 -b 4096 -m 0 -J size=16 -O ^resize_inode,^ext_attr,^huge_file /dev/loop0
tune2fs -c 100 -i 100d -m 0 /dev/loop0
mount /dev/loop0 /tmp/ext4
sudo mount -o loop source/data.rfs /tmp/rfs
sudo cp -a /tmp/rfs/* /tmp/ext4
cd /tmp/ext4
sudo ../fix-data.sh
cd /home/user/rfs2ext4
sudo umount /tmp/ext4
sudo umount /tmp/rfs
dd if=/dev/zero of=csc.rfs bs=4096 count=6464
losetup /dev/loop0 csc.rfs
mkfs.ext4 -T ext4 -b 4096 -m 0 -J size=4 -O ^resize_inode,^ext_attr,^huge_file /dev/loop0
tune2fs -c 100 -i 100d -m 0 /dev/loop0
mount /dev/loop0 /tmp/ext4
sudo mount -o loop source/csc.rfs /tmp/rfs
sudo cp -a /tmp/rfs/* /tmp/ext4
cd /tmp/ext4
sudo ../fix-csc.sh
cd /home/user/rfs2ext4
sudo umount /tmp/ext4
sudo umount /tmp/rfs
tar -H ustar -c boot.img recovery.img data.rfs system.rfs > CODE_S5830XWKPN_CL375596_REV03_blackhawk.tar
md5sum -t CODE_S5830XWKPN_CL375596_REV03_blackhawk.tar >> CODE_S5830XWKPN_CL375596_REV03_blackhawk.tar
mv CODE_S5830XWKPN_CL375596_REV03_blackhawk.tar CODE_S5830XWKPN_CL375596_REV03_blackhawk.tar.md5
tar -H ustar -c csc.rfs > CSC_S5830OXXKP7_CL375596_REV03_blackhawk.tar
md5sum -t CSC_S5830OXXKP7_CL375596_REV03_blackhawk.tar >> CSC_S5830OXXKP7_CL375596_REV03_blackhawk.tar
mv CSC_S5830OXXKP7_CL375596_REV03_blackhawk.tar CSC_S5830OXXKP7_CL375596_REV03_blackhawk.tar.md5
tar -H ustar -c arm11boot mibib oemsbl qcsbl > APBOOT_S5830XWKPN_CL375596_REV03.tar
md5sum -t APBOOT_S5830XWKPN_CL375596_REV03.tar >> APBOOT_S5830XWKPN_CL375596_REV03.tar
mv APBOOT_S5830XWKPN_CL375596_REV03.tar CAPBOOT_S5830XWKPN_CL375596_REV03.tar.md5
tar -H ustar -c amss > MODEM_S5830XWKP6_CL375596_REV03.tar
md5sum -t MODEM_S5830XWKP6_CL375596_REV03.tar >> MODEM_S5830XWKP6_CL375596_REV03.tar
mv MODEM_S5830XWKP6_CL375596_REV03.tar MODEM_S5830XWKP6_CL375596_REV03.tar.md5
fix-system.sh script, not perfect but work
Code:
#!/bin/sh
rm -f bin/cat
rm -f bin/chmod
rm -f bin/chown
rm -f bin/cmp
rm -f bin/date
rm -f bin/dd
rm -f bin/df
rm -f bin/dmesg
rm -f bin/getevent
rm -f bin/getprop
rm -f bin/hd
rm -f bin/id
rm -f bin/ifconfig
rm -f bin/iftop
rm -f bin/insmod
rm -f bin/ioctl
rm -f bin/ionice
rm -f bin/kill
rm -f bin/ln
rm -f bin/log
rm -f bin/ls
rm -f bin/lsmod
rm -f bin/lsof
rm -f bin/mkdir
rm -f bin/mount
rm -f bin/mv
rm -f bin/nandread
rm -f bin/netstat
rm -f bin/newfs_msdos
rm -f bin/notify
rm -f bin/printenv
rm -f bin/ps
rm -f bin/reboot
rm -f bin/renice
rm -f bin/rm
rm -f bin/rmdir
rm -f bin/rmmod
rm -f bin/route
rm -f bin/schedtop
rm -f bin/sendevent
rm -f bin/setconsole
rm -f bin/setprop
rm -f bin/sleep
rm -f bin/smd
rm -f bin/start
rm -f bin/stop
rm -f bin/sync
rm -f bin/top
rm -f bin/umount
rm -f bin/uptime
rm -f bin/vmstat
rm -f bin/watchprops
rm -f bin/wipe
rm -f bin/dumpmesg
mkdir -p etc/init.d
mkdir -p sd
chown -R 0:0 .
for i in $( find . ); do
if [ -d $i ]; then
chmod 755 $i
else
chmod 644 $i
fi
done
chown -R 0:0 etc/init.d
chmod -R 777 etc/init.d
chown -R 0:2000 bin
chmod -R 755 bin
chown 0:3003 bin/ip
chmod 6755 bin/ip
chown 0:3003 bin/netcfg
chmod 2750 bin/netcfg
chown 0:3004 bin/ping
chmod 2755 bin/ping
chown 0:2000 bin/run-as
chmod 6750 bin/run-as
chown -R 1002:1002 etc/bluetooth
chmod -R 440 etc/bluetooth
chown 0:0 etc/bluetooth
chmod 755 etc/bluetooth
chown 1000:1000 etc/bluetooth/auto_pairing.conf
chmod 640 etc/bluetooth/auto_pairing.conf
chown 3002:3002 etc/bluetooth/blacklist.conf
chmod 444 etc/bluetooth/blacklist.conf
chown 1002:1002 etc/dbus.conf
chmod 440 etc/dbus.conf
chown 1014:2000 etc/dhcpcd/dhcpcd-run-hooks
chmod 550 etc/dhcpcd/dhcpcd-run-hooks
chown 0:2000 etc/init.goldfish.sh
chmod 550 etc/init.goldfish.sh
chown -R 0:0 etc/ppp
chmod -R 555 etc/ppp
chmod 0755 etc/ppp
chown -R 0:2000 xbin
chmod -R 755 xbin
# For pre-rooted firmware
if [ -f xbin/su ]; then
chmod 4755 xbin/su
fi
if [ -f xbin/sqlite3 ]; then
chmod 4755 xbin/sqlite3
fi
if [ -f bin/su ]; then
chmod 4755 bin/su
fi
if [ -f bin/sqlite3 ]; then
chmod 4755 bin/sqlite3
fi
cd bin
ln -s toolbox cat
ln -s toolbox chmod
ln -s toolbox chown
ln -s toolbox cmp
ln -s toolbox date
ln -s toolbox dd
ln -s toolbox df
ln -s toolbox dmesg
ln -s toolbox getevent
ln -s toolbox getprop
ln -s toolbox hd
ln -s toolbox id
ln -s toolbox ifconfig
ln -s toolbox iftop
ln -s toolbox insmod
ln -s toolbox ioctl
ln -s toolbox ionice
ln -s toolbox kill
ln -s toolbox ln
ln -s toolbox log
ln -s toolbox ls
ln -s toolbox lsmod
ln -s toolbox lsof
ln -s toolbox mkdir
ln -s toolbox mount
ln -s toolbox mv
ln -s toolbox nandread
ln -s toolbox netstat
ln -s toolbox newfs_msdos
ln -s toolbox notify
ln -s toolbox printenv
ln -s toolbox ps
ln -s toolbox reboot
ln -s toolbox renice
ln -s toolbox rm
ln -s toolbox rmdir
ln -s toolbox rmmod
ln -s toolbox route
ln -s toolbox schedtop
ln -s toolbox sendevent
ln -s toolbox setconsole
ln -s toolbox setprop
ln -s toolbox sleep
ln -s toolbox smd
ln -s toolbox start
ln -s toolbox stop
ln -s toolbox sync
ln -s toolbox top
ln -s toolbox umount
ln -s toolbox uptime
ln -s toolbox vmstat
ln -s toolbox watchprops
ln -s toolbox wipe
ln -s dumpstate dumpmesg
cd ../
fix-data.sh script:
Code:
#!/bin/sh
if [ -d data_test ]; then
rm -rf data_test
fi
if [ -d kernel-tests ]; then
rm -rf kernel-tests
fi
if [ -d local ]; then
rm -rf local
fi
if [ -d qmi_test ]; then
rm -rf qmi_test
fi
chown -R 1013:1000 .
chmod -R 777 .
fix-csc.sh script:
Code:
#!/bin/sh
chown -R 0:0 .
for i in $( find . ); do
if [ -d $i ]; then
chmod 755 $i
else
chmod 644 $i
fi
done
chown 1000:2001 recovery
CSC updater script:
Code:
#!/sbin/busybox sh
usage="usage: sec_csc <sales code>"
if [ "$(id | grep -c root)" != "1" ]; then
echo "You have no permission to run sec_csc."
exit 1;
fi
if ! [ "$1" = "" ]; then
if [ -d /system/csc/$1 ]; then
echo -n "Apply $1 sales code? y/N: "
read answer
if [ "$answer" = "y" ]; then
/sbin/busybox mount -o rw,remount /system
cp -f /system/csc/$1/system/CSCFiles.txt /system/
cp -f /system/csc/$1/system/CSCVersion.txt /system/
cp -f /system/csc/$1/system/csc/* /system/csc/
rm -f /data/property/persist.sys.country
rm -f /data/property/persist.sys.language
rm -f /data/property/persist.sys.localevar
echo -n $1 > /proc/LinuStoreIII/efs_info
setprop ril.sales_code $1
/sbin/busybox mount -o ro,remount /system
echo "Turn off and then turn on your phone"
echo "using the dedicated power button to"
echo "apply the new CSC."
fi
else
echo "$1 sales code not found."
fi
else
echo $usage
fi
Q: What's really above scripts do?
A: I do not directly use system.rfs (in rfs format) but making a new system.rfs in ext4 format. Copying the whole contents of the old system.rfs (rfs) into the new system.rfs (ext4), make modifications in the system.rfs (ext4) mount point, and then fix the access rights. Using ext3 format is also not problems as long as you use boot and recovery image that support ext3 and ext4 filesystems. After all the modifications, do not forget to umount both image.
Q: Why?
A: RFS filesystem in linux read as FAT filesystem. FAT filesystem permissions can not be set correctly according to the needs of the operating system (in this case Android). You're lucky if you modify the firmware and do not occur bootloop
Q: Is Odin support *.rfs formatted in ext4?
A: Odin raw writes the filesystem partition, no matter the form as long as *.rfs no larger than the physical partition.
Q: Does this really work?
A: You can try If you want to take the risk why not try XWKPN firmware already formatted to ext4 in ODIN package as follows:
S5830XWKPN_S5830XWKP6_S5830OXXKP7_blackhawk.rar (137.59 MB)
Password: ketut.kumajaya
Inside the package:
CF-Root-S5830 v3.7 b81 candidate
deodexed and zipaligned /system/app and /system/framework, thanks to dsixda
cifs (Samba/Windows share) and tun (openVPN) kernel modules included
BLN service support, modified services.jar. Thanks to neldar
Android Scribble 2.0 boot animation from here, thanks to GLa'DOS
multi CSC taken from XWKPN (Europe?) and DXKC1 (Asia?), XSE sales code (Indonesia as default country)
csc.rfs, data.rfs and system.rfs in ext4 format, no need to convert filesystem manually using ext4 Manager
keep application and themes as a plain XWPKN
DT apps2sd included, a modified version special for CF-Root-S5830. You can find the original Darktremor apps2sd here, thanks to tkirton.
ODIN fullpack, the safest way to flash Samsung firmware
Instructions:
Follow these instructions to the letter. Do not touch any buttons or checkboxes that are not listed below to touch!
Decompress S5830XWKPN_S5830XWKP6_S5830OXXKP7_blackhawk.rar
(USB) Disconnect your phone from your computer
Start ODIN v4.38
Click the OPS button, and select Cooper_v1.0.ops
Click the BOOT button, and select APBOOT_S5830XWKPN_CL375596_REV03.tar.md5
Click the Phone button, and select MODEM_S5830XWKP6_CL375596_REV03.tar.md5
Click the PDA button, and select CODE_S5830XWKPN_CL375596_REV03_blackhawk.tar.md5
Click the CSC button, and select CSC_S5830OXXKP7_CL375596_REV03_blackhawk.tar.md5
Put your phone in download mode
(USB) Connect the phone to your computer
Click the START button
Wait for the phone to reboot
No need to wipe the /data and /cache partitions, has been automatically when flashing.
Done
If you expect a better benchmark results. Enable "Media: Stagefright" on "Tweak Manager" and make sure you do not select "CPU: Conservative gov.".
UPDATE:
- Samsung keyboard have more language
- A new script to apply your CSC, run it over "adb shell" or Terminal Emulator or ConnectBot. For example to apply SER (Russia?) sales code:
Code:
sec_csc SER
To activate your new sales code, you must power off and then power on your phone using the dedicated power button.
Apply this update over CWM or CWM Manager app.
Wow sweet i might make a video for this
Thanks any ways
Script updated for pre-rooted firmware.
Maybe I should show the results to get people interested
You are the real dev, ketut.kumajaya!
Thanks for sharing such a great guide to us...
Hey, I think this guide can be applied to build a CWM-flashable ROM
fla.sh said:
You are the real dev, ketut.kumajaya!
Thanks for sharing such a great guide to us...
Hey, I think this guide can be applied to build a CWM-flashable ROM
Click to expand...
Click to collapse
Your welcome!
fix-system.sh and fix-csc.sh updated for better/faster recursive chmod.
CWM flashable? Of course yes, my fix-*.sh scripts is a bash port of dsixda/tools/update_files
Examples of ROM which all *.rfs formatted as ext4 filesystem. Do not expect too much from a ROM made in two short days after work But read the features
Password: ketut.kumajaya
ask how to flash?
wow..what a great work...i gotta try this...do i need to flash KPN 2.3.3 first then i can use this? can i flash this one from froyo for example? is this ROM already included check RAM script or something like that?
sorry for my bad english
LeimRen said:
wow..what a great work...i gotta try this...do i need to flash KPN 2.3.3 first then i can use this? can i flash this one from froyo for example? is this ROM already included check RAM script or something like that?
sorry for my bad english
Click to expand...
Click to collapse
You have to full flash (BOOT, Phone, PDA, CSC) your phone using ODIN. You can flash your own sec_csc.zip (extracted from csc.rfs using WinImage or MagicISO or linux) then. This firmware have all CF-Root- S5830 have, incl. CF-Root-S5830 CWM4 recovery b79 (b78 have CSC flashing error). The boot image using a modified version CF-Root-S5830 b80 for fast boot and apply ondemand CPU governer after boot complete. Fast boot but better battery life. If you need more efficient battery usage, set CPU governer to conservative using Tweak Manager. CF-Root-S5830 installed by default, /res/misc cleared so the boot image freeing some memory.
ketut.kumajaya said:
You have to full flash (BOOT, Phone, PDA, CSC) your phone using ODIN. You can flash your own sec_csc.zip (extracted from csc.rfs using WinImage or MagicISO or linux) then. This firmware have all CF-Root- S5830 have, incl. CF-Root-S5830 CWM4 recovery b79 (b78 have CSC flashing error). The boot image using a modified version CF-Root-S5830 b80 for fast boot and apply ondemand CPU governer after boot complete. Fast boot but better battery life. If you need more efficient battery usage, set CPU governer to conservative using Tweak Manager. CF-Root-S5830 installed by default, /res/misc cleared so the boot image freeing some memory.
Click to expand...
Click to collapse
okay...thanks for the explanation, sir...downloading now....
LeimRen said:
okay...thanks for the explanation, sir...downloading now....
Click to expand...
Click to collapse
You're welcome! For ROM modificator (what I have call you), feel free to use my ROM as your template. I purposely did not make many changes in the userspace, but the core only. A proper credit for me is enough
wow! this rom is blazing fast. imo, this is much faster and smoother than coderomv2x.2v.
thanks for your great work my friend. i'll test this rom further and report if i find any bugs ^^
AdobongKamote said:
wow! this rom is blazing fast. imo, this is much faster and smoother than coderomv2x.2v.
thanks for your great work my friend. i'll test this rom further and report if i find any bugs ^^
Click to expand...
Click to collapse
Your first post? Thanks for your report.
ketut.kumajaya said:
Your first post? Thanks for your report.
Click to expand...
Click to collapse
yeah. i registered just to thank you for your great efforts
Hey guys,
sorry for that question, but what's the password to decompress the archive?
Sprint82 said:
Hey guys,
sorry for that question, but what's the password to decompress the archive?
Click to expand...
Click to collapse
that should be indicated on the first page.
HINT: it's the dev's username
lol
can it be so easy?
Thanks
Then, I give it a try
Thanks Ketut.kumajaya for this. Actually, this modified KPN should have its very own thread. It's fast and by far one of the best ROM out there for the Ace.
http://www.multiupload.com/S6JSJSSZF2
works for my phone, thanks so much!
just one question (I may sound dumb asking this, but I seriously have no idea), but how do I access app2sd?
chinoyray said:
Thanks Ketut.kumajaya for this. Actually, this modified KPN should have its very own thread. It's fast and by far one of the best ROM out there for the Ace.
http://www.multiupload.com/S6JSJSSZF2
Click to expand...
Click to collapse
It's just part of my tutorial on converting rfs to ext4. Incidentally CF-Root-S5830 also from me, then this is the official combination of KPN and CF-Root-S5830

Boot Process research based on 2.2.3 Verizon WebDoctor

WIP research into HP Pre* boot process
Theoretical plan: port user-part to compatible droid - Pre3["rib"/"mantaray"]->XperiaRay["ST18i"]
Well, upstart scripts are complete... now for tracking dbus/luna services that are needed for the port to run..
Kernel configs:
linux-*/arch/arm/configs/rib_defconfig = pre3
linux-*/arch/arm/configs/semc_urushi_defconfig = xperia_ray
Device highlights:
sony: CONFIG_INPUT_APDS9702 (proximity filter)
sony: CONFIG_MDDI_NOVATEK_PANEL_SHARP_LS033T3LX01 (sharp display)
sony: CONFIG_MDDI_NOVATEK_PANEL_TMD_LT033MDV1000 (tmds controller)
sony: CONFIG_SND_MSM_MVS7x30_SOC (integrated audio)
sony: CONFIG_TI1271 (wifi)
sony: CONFIG_TOUCHSCREEN_CLEARPAD_I2C (synaptics clearpad)
palm: CONFIG_MT9P013 (5MP cmos)
palm: CONFIG_PMIC8058_UPL (qualcomm power management)
palm: CONFIG_SND_SOC_WM8994 (wolfson micro, 24bit 4-chan dac, 2-chan adc, 100dB SNR, Nice !)
palm: CONFIG_TOUCHSCREEN_CY8CTMA300 (cypress)
palm pre3 = "rib" or "mantaray"
WIFI: Pre3 -> Atheros 6K ar6000 driver = ar6k, non-upstream!, hardcoded in PmWifiService
Pre(1) -> Marvell sd8686 sd8xxx driver
Seems the biggest problem will be porting the WiFi manager, to make TexasInstruments 1271 look like an Atheros 6k series..
palm devices:
castle == Pre
pixie == Pixi ?
broadway == Pre2?
mantaray == Pre3
windsornot
topaz == TouchPad
opal
What do EVT1 EVT2 EVT3 / DVT1 DVT2 DVT3 mean ?
What are "opal" and "windsornot" devices ?
actual bootup code
Code:
/sbin/mkbootfs.sh -- or/and -- /sbin/tcpostflash.sh
for initrd...
cp /sbin/boot-init /sbin/init
/sbin/boot-init
echo "Mounting proc filesystem"
mount -t proc none /proc
echo "Mounting sysfs filesystem"
mount -t sysfs none /sys
echo "Creating /dev"
mount -t tmpfs -o mode=0755 none /dev
echo "Creating/Mounting /dev/pts"
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 none /dev/pts
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/fb c 29 0
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
mknod /dev/urandom c 1 9
mknod /dev/mmcblk0 b 179 0
mknod /dev/mmcblk0p1 b 179 1
mknod /dev/mmcblk0p2 b 179 2
mknod /dev/mmcblk0p3 b 179 3
mknod /dev/mmcblk0p4 b 179 4
mknod /dev/mmcblk0p5 b 179 5
mknod /dev/mmcblk0p6 b 179 6
mknod /dev/mmcblk0p7 b 179 7
mknod /dev/mmcblk0p8 b 179 8
mknod /dev/mmcblk0p9 b 179 9
mknod /dev/mmcblk0p10 b 179 10
mknod /dev/mmcblk0p11 b 179 11
mknod /dev/mmcblk0p12 b 179 12
mknod /dev/mmcblk0p13 b 179 13
mknod /dev/mmcblk0p14 b 179 14
mknod /dev/mmcblk0p15 b 179 15
lvm.static vgscan --ignorelockingfailure
lvm.static lvchange -ay --ignorelockingfailure /dev/mapper/store-root
mount -o ro /dev/mapper/store-root /realroot
/sbin/pivot_root /realroot /realroot/boot
umount /boot/dev/pts
umount /boot/dev
umount /boot/proc
umount /boot/sys
export EARLY_BOOT_STOP=`date -U`
exec /sbin/init
/sbin/init
/sbin/upstart -s /usr/sbin/setcpushares-upstart
(setcpusharesupstart sets up cgroup for every new task,
based with /etc/default/cpushareholder)
upstart config from dir <- /etc/event.d
upstart emits "startup" ->
/etc/event.d/rcS is started
telinit 2 -> emit "runlevel 2"
emit "stopping/stopped rcS"
"runlevel 2" -> /etc/event.d/banner
/etc/init.d/banner start
echo "Please wait: booting..." > $vtmaster
emit "stopping/stopped banner"
"stopped banner" -> /etc/event.d/sysfs
/etc/init.d/sysfs.sh start
mount -t proc proc /proc
mount sysfs /sys -t sysfs
echo 1 > /proc/sys/vm/oom_dump_tasks
emit "stopping/stopped sysfs"
"stopped sysfs" -> /etc/event.d/udev
/etc/init.d/udev start
mountpoint -q /dev/
echo "Starting the hotplug events dispatcher" "udevd"
## not loading as no /etc/event.d/udevd
# udevd --daemon
mkdir -p /dev/.udev/ /dev/.udev/db/ /dev/.udev/queue/ /dev/.udevdb/
make_extra_nodes (based on /etc/udev/links.conf)
echo "Synthesizing the initial hotplug events"
udevtrigger --subsystem-nomatch=platform --subsystem-nomatch=backlight
echo "Waiting for /dev to be fully populated"
udevsettle --timeout=$udevd_timeout
chmod 1777 /dev/shm
emit "stopping/stopped udev"
"stopped udev" -> /etc/event.d/alignment
echo "3" > /proc/cpu/alignment
emit "stopping/stopped alignment"
"stopped alignment" -> /etc/event.d/modutils
/etc/init.d/modutils.sh start
echo "Calculating module dependencies ..."
depmod -Ae
echo -n "Loading modules: "
foreach $module $args in /etc/modules
modprobe $module $args
emit "stopping/stopped modutils"
"stopped modutils" -> /etc/event.d/cgroups
. /etc/default/cpushareholder
cpushareholder_init
mkdir -p /dev/cpuacct
mount -t cgroup -o cpu,cpuacct none /dev/cpuacct
mkdir -p /dev/cpuacct/UX/APP
mkdir -p /dev/cpuacct/REST/BG
...
echo 7500 > /dev/cpuacct/UX/cpu.shares
echo 2500 > /dev/cpuacct/REST/cpu.shares
for $taskid in /dev/cpuacct/tasks
echo $taskid > /dev/cpuacct/REST/DAEMONS
emit "stopping/stopped cgroups"
"stopped cgroups" -> /etc/event.d/mountall
/etc/init.d/mountall.sh start
. /etc/default/rcS
. /etc/default/mount_checks
MOUNT_STAMP=/var/umount.stamp
WIPE_FLAGS_FILE=/var/.flags/on_mount
echo "$0: Mounting local filesystems..."
lvm.static vgscan --ignorelockingfailure
lvm.static vgchange -ay --ignorelockingfailure
echo "$0: vgscan/vgchange done" > /dev/kmsg
fsck -y -v /dev/mapper/store-root/var 2>&1 #/var with /dev/store
#fsck -y -v /dev/mmcblk0p3 2>&1 #/var without /dev/store
echo "$0: fsck of /var done" > /dev/kmsg
mount -a -t nonfs,vfat,ext3,tmpfs
# means NOnfs,NOvfat,NOext3,NOtmpfs: man mount
mount /var
if "mount /var" errors, do fixup:
/usr/sbin/fixup_partition.sh --mountpoint /var
umount -f /dev/mapper/store-var # up to 5 times in a loop
fsck -y /dev/mapper/store-var
mount /dev/mapper/store-var
echo "$0: /var mounted" > /dev/kmsg
clock_from_var.sh
hwclock -s -u #only do the following updates if hardware time is wrong
if (hw_time is wrong)
#date -S -s `date -d $(cat /etc/version) "+%s"`
date -S -s `cat /var/preferences/com.palm.power/time_saver`
echo "$0: set clock from $TIME_SRC: $(date)" > /dev/kmsg
hwclock -w -u
else
echo "$0: using /dev/rtc time: $(date)" > /dev/kmsg
lunaprop -n com.palm.system -m -s last_umount_clean [0|1 :/var/umount.stamp exists]
check that all /var/* are directories
if not_dir($path) rm -f $path;mkdir -p $path
if no_clean_mount() fixup_partition.sh --mountpoint /var/log --force-fsck
if exists /var/.rootfs_fsck fixup_partition.sh --device=/dev/mapper/store-media --force-fsck
rm -f /media/internal/FSCK*.REC # FAT lost blocks
rm -f /var/tmp; mkdir -p /var/tmp #reset /var/tmp as a directory and not a symlink
mount -a -t vfat,ext3,tmpfs #mount the automounted fs
echo "$0: rest mounted" > /dev/kmsg
check if everything mounted nicely. if not: fixup_partition.sh them
echo "$0: filesystem checking done" > /dev/kmsg
setup_cryptofs # based on /etc/cryptofs.conf, http://reboot78.re.funpic.de/cryptofs/
mkdir /media/internal/.palm
mountcfs -s /media/internal/.palm/.cryptofs -m /media/cryptofs -k /media/internal/.palm
cryptofs -o nonempty -o allow_other -s -r [params].. # based on .cryptofs
echo "$0: setup_cryptofs done" > /dev/kmsg
lunaprop -n com.palm.system -m -s media_fixed_how 1 # result from fixup_partitions on media partition
report reboot reasons: lines that start with "reason" in /var/umount.stamp
echo $REASON | rdx_reporter -F -C "rebooter" -c "rebooter" -d "$0"
rm -rf /var/lock/*
if any errors on "fsck /var"
echo "encountered error running fsck on /var: $VARFSCKRES $VARFSCK" \ ## res=error code, varfsck=output
| rdx_reporter -F -C "Fsck Error" -c "Fsck Error" -d "$Fsck error"
if error=4 (MAJOR ERROR) -> echo $error >/var/log/.fsck_error
date > /var/log/var_fsck.log
echo $VARFSCK >> /var/log/var_fsck.log ## last fsck output
... skipped developer-only rw rootfs stuff, reboting for rw-check and rm'ing /boot/uImage if error
touch /var/log/var_fsck.log /var/log/root_fsck.log
cat /var/log/var_fsck.log /var/log/root_fsck.log > /var/log/fsck.log
echo "$0: done reporting fsck results" > /dev/kmsg
run-parts /etc/init.d/postmountall.d:
check_initctl
if not_pipe(/dev/initctl) -> rm -f /dev/initctl; mknod -m 600 /dev/initctl p
keep_klog
cd /var/log
mv klog_1.txt.gz klog_2.txt.gz
klog last |gzip -c > klog_1.txt.gz # klog buffer from previous boot
dmesg -s 100000 | gzip -c > dmesg.txt.gz
kernel_lastboot
rdx_reporter $args ## nothing to report in clean case
lnsasetup
. /etc/default/lnsa.sh
mkdir -p /var/palm/system-services
mkdir -p /var/palm/ls2/roles
mkdir -p /var/palm/event.d
echo 'exec /bin/true' >/tmp/lnsa_marker
cp /tmp/lnsa_marker /var/palm/event.d/;msa_marker # actually, cp to tmp, sync, mv tmp real
rm /tmp/lnsa_marker
initctl newdir /var/palm/event.d ## add dir other than /etc/init.d to list, could trigger
logmods
mkdir -p /dev/logdir
mmc_protect
no "mmc_protect" binary => does nothing
report_lostandfound
for each path=("lost+found" dir) found on any mounted partition,
ls -lA $path | rdx_reporter ...
touch $path/_landf_rdxd_reported_marker_ ## so it doesn't report again
rm_varlogtmp
rm -rf /var/log/temp
runlevel
touch /var/run/utmp
runlevel --set 2 ## might trigger something, but probably doesn't
scaling
echo ondemandtcl >/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
kill -USR1 1 ## for bootloggerd ?
echo "$0 done" > /dev/kmsg
mkdir -p /var/preferences
chown root /var/preferences
chmod 777 /var/preferences
mkdir -p /var/home/root
mkdir -p /var/tmp
emit "stopping/stopped mountall"
"stopped mountall" -> swaphack, tokens, timezone, watchdogd
-> /etc/event.d/swaphack
/etc/init.d/swaphack.sh
if /var/swap -> rm /var/swap # using /dev/store/swap now !
if !/dev/store/swap
dd if=/dev/zero of=/dev/store/swap bs=100663296 count=1 # 96MB of swap
mkswap /dev/store/swap
echo cfq > /sys/block/mmcblk0/queue/scheduler
echo 6000 > /proc/sys/vm/dirty_expire_centisecs
swapon /dev/store/swap
emit "stopping/stopped swaphack" -> compcache
/etc/event.d/compcache
swapoff -a
sleep 1
modprobe xvmalloc
modprobe ramzswap memlimit_kb=25600 backing_swap=/dev/store/swap
sleep 3
swapon /dev/ramzswap0 -p 100
emit "stopping/stopped compcache" -> no listeners
-> /etc/event.d/timezone
no /usr/bin/tzset -> do nothing
emit "stopping/stopped timezone" -> no listeners
-> /etc/event.d/watchdogd
/sbin/watchdogd #respawn
talks to /dev/watchdog, pings every X seconds
emit "stopping/stopped watchdogd" -> no listeners
-> /etc/event.d/tokens
/sbin/tokens --mount #trenchcoat=storage flasher + tokens=fs-tokens supports omap24xx,omap34xx,msm,tegra
source: http://subversion.palm.com/main/nova/palm/trenchcoat/submissions/132.4/trenchcoat.c
reads /dev/tokens -> OEM Data:
ProductName,Modem,RAMSize,FlashSize,HwoRev,BToADDR,WIFIoADDR,ProdSN,ProductSKU
emit "stopping/stopped tokens" -> /etc/event.d/populate-volatile
/etc/init.d/populate-volatile.sh start
/sbin/popvol < /etc/default/popvol.d/* # actually, for file in `ls`...
/etc/default/popvol.d/00_core
mkdir|/var/backups|0|0|0755
mkdir|/var/cache|0|0|0755
mkdir|/var/lib|0|0|0755
mkdir|/var/lib/ipkg|0|0|0755
mkdir|/var/lib/misc|0|0|0755
mkdir|/var/lib/software|0|0|0755
mkdir|/var/lib/software/ModemFiles|0|0|0755
mkdir|/var/lib/software/SessionFiles|0|0|0755
mkdir|/var/lib/software/tmp|0|0|0755
mkdir|/var/lib/update|0|0|0755
mkdir|/var/local|0|0|02755
mkdir|/var/lock|0|0|01777
mkdir|/var/lock/subsys|0|0|0755
mkdir|/var/log|0|0|0755
mkdir|/var/run|0|0|0755
mkdir|/var/spool|0|0|0755
mkdir|/tmp|0|0|01777
touch|/var/run/utmp|0|0|0644
touch|/var/log/wtmp|0|0|0644
mknod|/dev/heap|0|0|1|5|020644
/etc/default/popvol.d/01_pulse
mkdir|/var/run/pulse|31|31|0755
/etc/default/popvol.d/02_jail
mkdir|/var/palm|0|0|0755
mkdir|/var/palm/jail|0|0|0755
mkdir|/var/palm/data|0|0|0755
emit "stopping/stopped populate-volatile" -> devpts, minicore2
-> /etc/event.d/minicore2 # everything disabled, so doing nothing much
echo "" > /proc/sys/kernel/minicore_pattern
echo "" > /proc/sys/kernel/core_pattern
emit "stopping/stopped minicore2" -> no listeners
-> /etc/init.d/devpts.sh start
mknod -m 666 /dev/ptmx c 5 2
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts -ogid=5,mode=620 ## 5="tty", 600='mesg n' default
emit "stopping/stopped devpts" -> hostname
-> /etc/init.d/hostname.sh start
hostname -F /etc/hostname # "webos-device"
emit "stopping/stopped hostname" -> pmsyslogd, pmklogd, urandom, usbctrl
-> /etc/event.d/pmsyslogd #PmLogDaemon, logs to /var/log/messages
/usr/bin/pmsyslogd -z -f 6 -m # UTZ/C tstamp, usec resolution, monotonic
emit "stopping/stopped pmsyslogd" -> no listeners
-> /etc/event.d/pmklogd # logs to /var/log/pmklogd.log
/usr/bin/pmklogd -n -d 1 #startup delay=1sec, "-n"=run in foreground??
emit "stopping/stopped pmklogd" -> no listeners
-> /etc/event.d/urandom
/etc/init.d/urandom start
echo "Initializing random number generator..."
cat /var/lib/urandom/random-seed >/dev/urandom
emit "stopping/stopped urandom" -> no listeners
-> /etc/event.d/usbctrl
if usbnet enabled
/sbin/modprobe -q g_composite product=0x101 #0x103 for armv6l
else if novacom enabled
/sbin/modprobe -q g_composite product=0x8002 #0x8012 for armv6l
else #(normal)
/sbin/modprobe -q g_composite product=0x8004 #0x8012 for armv6l
emit "stopping/stopped usbctrl" -> networking
-> /etc/event.d/networking
/etc/init.d/networking start
ifup -a -f # /etc/network/interfaces - auto=lo,usb0:1
echo "done."
emit "stopping/stopped networking" -> bootmisc
=========== AT THIS STAGE, ONLY BOOTMISC THREAD EXECUTION CONTINUES ============
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-> /etc/init.d/bootmisc.sh start
if "OMAP3430" matches /proc/cpuinfo
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
## needs to be set twice, board bug
chmod 666 /dev/tty[p-za-e][0-9a-f]
chown root:tty /dev/tty[p-za-e][0-9a-f]
if /etc/ld.so.cache symlinks to /var/cache/ld.so.cache
/sbin/ldconfig -C /var/cache/ld.so.cache
else
rm -f /var/cache/ld.so.cache
emit "stopping/stopped bootmisc" -> novacomd, ls-hubd_private, ttyS2
-> /etc/event.d/ttyS2
/sbin/getty console 115200 vt100
-> /etc/event.d/novacomd
#no /var/gadget/novacom_enabled => do nothing
#otherwise: mkdir /dev/gadget; mount -tgadgetfs /dev/gadget; /sbin/novacomd
emit "stopping/stopped novacomd"
-> /etc/event.d/ls-hubd_private #ls=LunaService
/usr/bin/ls-hubd --conf /etc/ls2/ls-private.conf --pmloglib
# /home/reviewdaemon/projects/nova/oe/BUILD-mantaray/work/luna-service2-2.0.0-131.2/131.2/src/hub/conf.c
#/usr/bin/ls-monitor /usr/bin/LunaSysMgr js, using /tmp/com.palm.private_hub
# UGLY HACK!!!!: /sbin/initctl emit --no-wait %s-ready
/sbin/initctl emit --no-wait ls-hubd_private-ready
..emit "ls-hubd_private-ready" -> /etc/event.d/ls-hubd_public
"ls-hubd_private-ready" ->
-> /etc/event.d/ls-hubd_public
/usr/bin/ls-hubd --public --conf /etc/ls2/ls-public.conf --pmloglib
/sbin/initctl emit --no-wait ls-hubd_private-ready
..emit "ls-hubd_public-ready" -> finish, node_fork_server
..at some point.. emit "stopping/stopped ls-hubd_public" -> ls-hubd_public_watchdog
-> /etc/event.d/ls-hubd_public_watchdog
/usr/sbin/reboot_ls-hubd_if.sh ${EXIT_STATUS} ls-hubd_public
..at some point.. emit "stopping/stopped ls-hubd_private" -> ls-hubd_private_watchdog
-> /etc/event.d/ls-hubd_private_watchdog
/usr/sbin/reboot_ls-hubd_if.sh ${EXIT_STATUS} ls-hubd_private
=========== AT THIS STAGE, PRV/PUB LS ARE RUNNING AND ONLY ONE UPSTART SIGNAL thread REMAINS ============
continuation of upstart scripts after Luna Service hub is started
Code:
"ls-hubd_public-ready" (emitted using /sbin/initctl from within /usr/bin/ls-hubd)
-> finish, node_fork_server
-> /etc/event.d/node_fork_server
if memtotal from /proc/meminfo >524288 (512M)
mkdir -p /var/palm/node
touch /var/palm/node/fork
/usr/palm/nodejs/node --max_old_space_size=23068672 /usr/palm/nodejs/fork_server.js ## 23068672=22MB
/sbin/initctl emit --no-wait node_fork_server-ready
else /sbin/initctl emit node_fork_server-ready
emit "node_fork_server-ready" -> no listeners
..emit "stopping/stopped node_fork_server" -> no listeners
-> /etc/event.d/finish
# record upstart timing for boottime tracking.
# $EARLY_BOOT_PID is set in /sbin/boot-init, ran from /sbin/tcpostflash.sh, /sbin/mkbootfs.sh, /sbin/upstart
mkdir -p /tmp/misc-props
echo -n $EARLY_BOOT_PID > /tmp/misc-props/pids.early_start
echo -n $EARLY_BOOT_START > /tmp/misc-props/timing.early_start
echo -n $EARLY_BOOT_STOP > /tmp/misc-props/timing.early_stop
echo -n $UPSTART_STARTTIME > /tmp/misc-props/timing.upstart_begin
echo -n $$ > /tmp/misc-props/pids.upstart_finish
echo -n `date -U` > /tmp/misc-props/timing.upstart_finish
/etc/init.d/bootmark.sh start
echo (16_random_bytes_in_hex) > /var/log/bootmark
run-parts /etc/event.d/finish-poststart.d
/etc/event.d/finish-poststart.d/001-mountcrypt
/usr/bin/mountcrypt /dev/mapper/store-mojodb store-cryptodb /dev/mapper/store-filecache store-cryptofilecache
mount /var/db
mount /var/file-cache
/etc/event.d/finish-poststart.d/020-setup_jails
rm -f /etc/nojail
emit "stopping/stopped finish" ->
logctld, configurator, mojodb, powerlog, PmNetConfigManager, pulseaudio, LunaDownloadMgr,
eventreporter, powerd, rdxd, lnsawait, Qmuxd, bluetooth, fontconfig_cache, certstoreinit,
tempdb, qcomm_rmt_storage, keymanager, filecache, hidd, memchute, passthrud, ossinfo,
mediaserver, audiod, PmModemEfsLogger, extractfs, TelephonyInterfaceLayer
-> TelephonyInterfaceLayer (no listeners for stop signals)
exec /usr/bin/PmWsfDaemon -c /etc/til.d/tilwsf.conf # /usr/lib/libTelephonyInterfaceLayer.so, -c /etc/til.d/til.conf
#Src/Core/NativeHost/BladeLoaderDl.cpp:101 dlopen()
#Src/Core/NativeHost/BladeLoaderDl.cpp:373 Calling %s to create service blade
#Luna Type=LunaTelephony,LunaMessaging ServiceName=com.palm.telephony
#LaunchCodeExternalApp=com.palm.app.phonediag
#LaunchCodeExternalAppCodesCdma=786;3836;33284;3282;477;673;123;889;8378;3366;\
#..72346;633;8766;87633;2539;7738;66236;2833766;28337633;
#LaunchCodeExternalAppCodesGsm=786;
#LunaMessaging ServiceName=com.palm.messagingrouter Interface=LunaInterfaceSms
#services supported by the GSM phone
#THandlersGsm=ServiceStateGsm;ServiceCallGsm;ServiceSmsGsm;ServiceLbsGsm;ServiceAudioGsm;
#..ServiceDeviceUsageGsm;ServiceSsGsm;ServiceDeviceCfgGsm;ServiceDataGsm;
#PHandlers=ServiceSim;ServicePower;ServiceSpb;ServiceStk;
# sprint verizon bellmo chinatel
-> extractfs (no listeners for stop signals)
mkdir -p /var/luna/data/extractfs
/usr/bin/extractfs -f /var/luna/data/extractfs #something to do with image extraction
umount -f /var/luna/data/extractfs
-> PmModemEfsLogger (no stop listeners)
# no modem in /proc/cmdline for normal users => not doing anything, otherwise PmModemEfsLogger would log ramdump etc
-> audiod (no stop listeners)
/usr/sbin/audiod -n -1 # com.palm.audio version 368.49, uses /etc/audio/{a,b,c}/global.conf
#/home/reviewdaemon/projects/nova/oe/BUILD-mantaray/staging/
#..arm-none-linux-gnueabi/include/boost/dynamic_bitset/dynamic_bitset.hpp etc
-> mediaserver (no stop listeners)
ionice -c1 /usr/bin/mediaserver --gst-debug=1 # version 428.51, should have been --gst-debug-level=1
-> ossinfo (no stop listeners) #copies PDF to media partition
cp /usr/lib/ossinfo/Open\ Source\ Information.pdf /media/internal/Open\ Source\ Information.pdf
-> passthrud (no stop listeners) #com.palm.usbpassthrough
#/usr/bin/start-passthrud # would run if had /var/preferences/com.palm.usbpassthrough/passthrud.conf
-> memchute (no stop listeners)
echo "0,85,95,114,120" > /sys/module/lowmemnotify/parameters/thresholds_enter
echo "0,80,90,108,112" > /sys/module/lowmemnotify/parameters/thresholds_leave
/usr/sbin/memchute # kills top 5 memory-using-procs if >THRESHOLD when low on memory
-> hidd (no stop listeners)
mkdir -p /dev/cgroup/input
echo $$ > /dev/cgroup/input/tasks #current process id
/usr/bin/hidd -v -f /etc/hidd/HidPlugins.xml --output-syslog
#plugins: keypad,touchpanel,accelerometer,compass,proximity,lightg,AVrcp(bluetooth),inputdev
-> keymanager (no listeners)
/usr/bin/keymanager -c '{"log":{"appender":{"type":"syslog"},"levels":{"default":"warning","keymanager":"info"}}}'
#using /var/palm/data/keys.db, /var/palm/data/otakeys.db, 4809febfe1df7d2a108fddc388cdb29e
#.. store-cryptodb.key, store-cryptofilecache.key, /var/luna/data/.passcode, "please", "youdidntsaythemagicword"
#does sql-style db work: SELECT id,ownerID,keyID,data,keysize,type,scope,hash FROM keytable WHERE id = ?
#.. SELECT id FROM keytable WHERE ownerId LIKE ?
# "EJGlZxDhLvgXn+p/K9s8gQ==" (base64)
-> qcomm_rmt_storage (no listeners)
/usr/sbin/qcom_rmt_storage /dev/mmcblk0p7 /dev/mmcblk0p8
#uses /dev/rmt_storage, /boot/modem_fs1, /boot/modem_fs2
-> tempdb (no listeners)
#does nothing!
-> certstoreinit (no listeners)
mkdir -p /var/ssl/crl
zcat /etc/ssl/crl/*.gz >/var/ssl/crl/crl-bundle.crl
mkdir -p /var/ssl/trustedcerts
cd /var/ssl/trustedcerts && tar xzf /etc/ssl/certs/calinks.tgz
mkdir -p /var/ssl/public
echo '01' > /var/ssl/serial
mkdir -p /var/ssl/certs
mkdir -p /var/ssl/private
touch /var/ssl/index.txt
luna-send -n 1 luna://com.palm.certificatemanager/addcrl \
'{"url":"http://crl.palm-contentid.pp.trustcenter.de/crl/v2/palmcontentid-CA-I.crl"}'
-> bluetooth (no listeners)
/usr/bin/BluetoothMonitor
-> Qmuxd (no listeners)
/usr/bin/Qmuxd #RMNET qmi connection
-> lnsawait (no listeners)
# "preventing started event from going out" ?
initctl status lnsa_marker
if no status -> loop. otherwise return ok
# should return nonzero since /var/palm/event.d was added to initctl dirs previously
# during mountall->mountall.sh->postmountall.d/lnsasetup
-> rdxd (no listeners)
/usr/bin/rdxd -s #Remote Diagnostics (incl. Telephony)
#uses /etc/rdxd.conf, /usr/lib/rdxd/*.sh scripts
-> powerd (no listeners)
mkdir -p /var/preferences/com.palm.power
cp /usr/var/preferences/com.palm.power /var/preferences/com.palm.power #use cp tmp;sync;mv tmp real
#config /sys/ parameters for PM on msm8x60, not applicable to phones
#for other devices seems there's nothing extra to do
-> eventreporter (no listeners)
/usr/bin/eventreporterserver #uses /tmp/evts.sock, /tmp/events.dat, JSON messages
-> LunaDownloadMgr (no listeners)
mkdir -p /dev/cgroup/web
echo $$ >/dev/cgroup/web/tasks # puts current process into web cgroup, later done with setcpushares-task
env CHARSET="UTF-8" /usr/bin/LunaDownloadMgr # ionice -c 3 on TouchPad (topaz)
# palm://com.palm.connectionmanager/setnovacommode {"isEnabled":true, "bypassFirstUse":false}
# palm://com.palm.connectionmanager/getStatus {"subscribe":true}
# palm://com.palm.bus/signal/registerServerStatus {"serviceName":"com.palm.connectionmanager", "subscribe":true}
# palm://com.palm.lunabus/signal/addmatch {"category":"/storaged", "method":"MSMAvail"}
# .. {"category":"/storaged", "method":"MSMProgress"}
# .. {"category":"/storaged", "method":"MSMEntry"}
# .. {"category":"/storaged", "method":"MSMFscking"}
# uses curl for downloads, /etc/palm/downloadManager.conf, /etc/palm/downloadManager-platform.conf
# logs into db: "DELETE FROM DownloadHistory WHERE owner = %", "DELETE FROM DownloadHistory WHERE ticket = %lu"
-> powerlog (no listeners)
/usr/sbin/powerlog -i 60 -c $CPUCOUNT -f $FREQ_COUNT -m
# cpucount = cpus, freq_count=number of freqs, -i60=60seconds, -m=topmemusers
-> mojodb (no listeners)
/usr/bin/mojodb-luna -c /etc/palm/mojodb.conf /var/db #version 1.9-52.16-mantaray, using /tmp/mojodb/tempdb_init
-> logctld (no listeners)
/usr/bin/logctld -v
#GPS: /var/log/gpsfixes, /var/log/gpsfixes_*.csv
#calls /sbin/logctld_clear_all.sh, /sbin/logctld_collect_all.sh
#palm://com.palm.service.collectlogs/autosend
-> pulseaudio
mkdir -p /home/root/.pulse
ionice -c1 /usr/bin/pulseaudio --log-target=syslog
#uses /etc/pulse/system.pa , /etc/pulse/default.pa, /etc/pulse/daemon.conf, /usr/lib/pulse-0.9.22/modules
#compiled using: /home/reviewdaemon/projects/nova/oe/BUILD-mantaray/staging/arm-none-linux-gnueabi/include
#.. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fno-strict-aliasing
#.. -fno-inline-functions -g -ffast-math -D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
emit "started pulseaudio" -> systemsoundsloader
->> systemsoundsloader (no listeners)
/usr/bin/systemSoundsLoader #loadSystemSounds from /usr/share/systemsounds/* or *-ondemand.pcm
-> fontconfig_cache
ionice -c 3 nice -n 20 fc-cache #run cache rebuild as nicely as possible
touch /var/cache/fontconfig/cached
emit "stopped fontconfig_cache" -> browserserver, smartkey
->>smartkey (no listeners)
mkdir -p /dev/cgroup/web
echo $$ > /dev/cgroup/web/tasks # this process goes into web cgroup
/usr/bin/SmartKeyService #SpellChecker - find best candidates based on dictionary, score map, frequency map
#uses XT9: /usr/palm/smartkey/XT9, /etc/palm/smartkey.conf
->>browserserver (no listeners)
export LD_PRELOAD="/usr/lib/libptmalloc3.so" #use custom malloc for browser
mkdir -p /dev/cgroup/web
echo $$ > /dev/cgroup/web/tasks # files this process into web control group
/usr/bin/BrowserServer #version 2.0.0-237.13, -d 30000 on TouchPad (topaz) +browserservermojo
#uses /var/luna/data/browser/icons, /var/palm/data/browser-cookies.db /dev/msm_vidc_dec /dev/pmem_adsp
chmod -R g+w /var/ssl
chown -R root.luna /var/ssl
chown luna:luna -R /var/palm/data/http_* /var/palm/data/https_*
chmod -R o+rwx /var/palm/data/http_* /var/palm/data/https_*
#conf from /etc/palm/browser-app.conf, /etc/palm/browser-app-platform.conf, /etc/ssl/openssl.cnf
-> filecache
/usr/bin/filecache -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"default\":\"warning\"}}}
emit "started filecache" -> LunaSysService, LunaUniversalSearchMgr
->>LunaSysService
/usr/bin/LunaSysService
#uses /usr/lib/luna/customization/region.json, /etc/palm/region.json,
#.. /usr/lib/luna/customization/locale.txt, /etc/palm/locale.txt,
#.. /etc/palm/defaultPreferences.txt, /etc/palm/defaultPreferences-platform.txt
#.. /usr/lib/luna/customization/cust-preferences.txt, /etc/palm/CustomerCareNumber.txt
#.. /var/luna/preferences/systemprefs.db, systemprefs_backup.db
# does ntp time update from ntp0.palmws.com (ntpdate -bqu)
#.. /etc/palm/palm-customization-info
->>LunaUniversalSearchMgr (no listeners)
export LD_PRELOAD=/usr/lib/libmemcpy.so
/usr/bin/LunaUniversalSearchMgr
# addDBSearchItem/removeDBSearchItem, modifyActionProvider
# /usr/lib/luna/customization/resources/*/UniversalSearchList.json
# SELECT value FROM SearchPreference WHERE key=%Q
# CREATE TABLE IF NOT EXISTS SearchList (id TEXT, category TEXT, displayName TEXT, iconFilePath TEXT, url TEXT,
# suggestURL TEXT, launchParam TEXT, type TEXT, enabled INTEGER, version INTEGER, PRIMARY KEY(id, category) );
# CREATE TABLE IF NOT EXISTS DBSearchList (id TEXT PRIMARY KEY, category TEXT, displayName TEXT,
# iconFilePath TEXT, url TEXT, launchParam TEXT, launchParamDbField TEXT, dbQuery TEXT, displayFields TEXT,
# batchQuery INTEGER, enabled INTEGER, version INTEGER );
# CREATE TABLE IF NOT EXISTS SearchPreference (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,
# value TEXT);
-> PmNetConfigManager
/usr/bin/PmNetConfigManager
#logs to /tmp/netconfigmanager.log
#interfaces with netfilter, iptables, enabling/disabling nat, routes, mtu clamping:
# /usr/sbin/iptables -D FORWARD -t mangle -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# /usr/sbin/iptables -A FORWARD -t mangle -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# /usr/sbin/iptables -t nat --flush
# RTSP: /usr/sbin/iptables -I INPUT -p udp --sport 6970:6999 -j ACCEPT
# mDNS: /usr/sbin/iptables -I OUTPUT -p udp -m udp --dport 5353 -o %s -j DROP
# NAT: /usr/sbin/iptables -t nat -I POSTROUTING -o %s -j MASQUERADE
# /sbin/dhclient -d -cf /etc/pmnetconfig/webOsDhclient.conf -sf /etc/pmnetconfig/webOsDhclient-script -lf -pf ..
# /usr/bin/ntpdate -uq %s pool.ntp.org
# traceroute,ping,arping, wifi authenticator,tether, /etc/pmnetconfig/staticroutes, novacom
# /sbin/sysctl -n -e -q -p /etc/pmnetconfig/netsysctrl.conf
# /sbin/ip rule flush; /proc/sys/net/ipv4/route/flush
emit "started PmNetConfigManager" -> mdnsd, PmWiFiService
->>mdnsd (no listeners)
/usr/sbin/mdnsd -debug # mDNSResponder-258.14, /etc/mdnsd.conf -> /var/log/mdnsd.log
# services url: http://www.dns-sd.org/ServiceTypes.html
->>PmWifiService (no listeners)
check if /dev/tokens/WIFIoADDR exists
/usr/bin/PmWiFiService
# hardwired for Atheros AR6000:
# insmod /lib/modules/`uname -r`/kernel/net/wifi/ar6000.ko || rmmod ar6000
# /tmp/ath6k/token_bdata.SD32.bin || /var/preferences/com.palm.wifi/skip-token-caldata
# ath6k/hw2.1.1/bdata.SD32.bin ath6k/hw2.1.1/3g_bdata.SD32.bin ath6k/hw2.1.1/lte_bdata.SD32.bin
# /lib/firmware/ath6k
# uses /usr/sbin/wpa_supplicant and hostapd
# /sbin/dhclient -cf /etc/PmWiFiDhclient.conf -sf /etc/PmWiFiDhclient-script -lf -pf /var/run/dhclient.eth0.pid
-> configurator
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbkinds","filecache"]}' # triggers service launch?
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbpermissions"]}' # triggers service launch?
initctl emit datastore-initialized
-> "datastore-initialized" -> /etc/event.d/activitymanager
->>activitymanager # manages activity lists, cgroup priorities
/usr/bin/activitymanager -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"default\":\"warning\"}}}
/sbin/initctl emit activitymanager-ready
-> "activitymanager-ready" -> configurator-async, filenotifyd, UpdateDaemon
->>configurator-async (no listeners)
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}' #triggers service?
->>filenotifyd (no listeners)
ionice -c2 -n7 /usr/bin/filenotifyd
# create table if not exists files (path TEXT UNIQUE ON CONFLICT REPLACE,
# size INTEGER, modified INTEGER)
# create table if not exists actions (revision INTEGER PRIMARY KEY AUTOINCREMENT,
# action_type INTEGER, size INTEGER, modified INTEGER, path TEXT, new_path TEXT)
# insert into files (path, size, modified) values (?,?,?) // insert
# select size, modified from files where path=? // get
# delete from files where path=? // remove
# update files set path=? where path=? // rename
# select path, size, modified from files where path like ? // directory list
# insert into actions (action_type, size, modified, path, new_path) values (?,?,?,?,?)
# select revision, action_type, size, modified, path, new_path from actions
# where revision >= ? order by revision asc limit ?
# select count(*) from action
# delete from actions where revision < ?
->>UpdateDaemon (no listeners)
/usr/bin/UpdateDaemon
# mount /var/lib/update
# tar xvzf /var/lib/update/data.tar.gz -m --no-same-owner --no-same-permissions
# OmaDm [-set_domain|-client|-task|-server|-prepare]
# server: https://ps.palmws.com/palmcsext/swupdateserver
# curl proxy: 68.28.31.33:80 (sprint), headers
# Expect: Cache-Control: no-cache
# User-Agent: palm/1.0 // InitHeader ?
# User-Agent: HTTP SyncML Client [en] (WinNT; I)
# Accept-Language: en
# Accept: application/vnd.syncml.dm+xml
# Content-Type: application/vnd.syncml.dm+xml
# Accept-Charset: utf-8
# x-syncml-hmac: algorithm= , username=" ", mac=
# name: omadm.swupdate.palm.com
# password: serverguestpassword
# name: guest
# passwird: guestpassword
# extra ips: 68.28.15.12, 68.28.31.12, 63.168.238.41, 68.168.229.130
# /var/lib/update/PmUpdater // /usr/bin/PmUpdater exists
#/usr/bin/mmipkg, /sbin/tellbootie
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}' # triggers service launch?
emit "stopped configurator" -> LunaSysMgr, PmWanDaemon
->>PmWanDaemon (no listeners)
/usr/bin/PmWsfDaemon -c /etc/wan.d/wan.conf # load /usr/lib/libPmWsfWanBlade.so
# set up wan connection, check TETH-ENTITLEMENT
->>LunaSysMgr
emit "started LunaSysMgr" -> CustomizationService, firstuse-createDefaultAccount,
mediasyncexporter, pubsubservice, vpnremover-eventd
->> CustomizationService (no listeners)
luna-send -n 1 luna://com.palm.lunabus/signal/registerServerStatus '{"serviceName":"com.palm.systemservice","subscribe":true}'
# up to 3 times, 10sec retry, until "connected" in output
luna-send -n 1 luna://com.palm.service.customization/customize '{}'
# up to 4 times, 15sec retry, until "connected" in output
->> firstuse-createDefaultAccount (no listeners)
luna-send -n 1 palm://com.palm.accountservices/createNovaAccount '{"createDefaultAccount":true}'
->> mediasyncexporter (no listeners)
if exists /media/internal/iPod_Control # means there is media data to export
luna-send -i -n 1 palm://com.palm.activitymanager/create \
'{"start":true, \
"type":{"priority":"lowest"}, \
"activity":{"name":"mediasyncexporter", "description": "export media sync data to standard media files", \
"callback": {"method": "palm://com.palm.mediasyncexporter/export", "params": {}}}}'
->> pubsubservice (no listeners)
/usr/bin/pubsubservice #uses /var/pubsub/cache, /var/pubsub/pubsubhandlers.conf, /etc/palm/pubsub_handlers/
# most probably uses xmpp protocol, jabber server j005.palmws.com, http://jabber.org/protocol/pubsub#node_config
# docs here: http://xmpp.org/extensions/xep-0060.html
->> vpnremover-eventd (no listeners)
# ! removes the VPN Service App/Framework from App Catalog !
luna-send -n 1 palm://com.palm.appinstaller/remove '{"packageName": "com.palm.app.vpn"}'
luna-send -n 1 palm://com.palm.appinstaller/remove '{"packageName": "com.palm.app.vpnframework"}'
echo "1" > /proc/sys/vm/overcommit_memory
mkdir -p /var/luna/preferences
mkdir -p /dev/cgroups/ui /dev/cgroups/application /dev/cgroups/focused /dev/cgroups/unfocused \
/dev/cgroups/unfocused/none /dev/cgroups/unfocused/lowest /dev/cgroups/unfocused/low /dev/cgroups/unfocused/normal \
/dev/cgroups/unfocused/high /dev/cgroups/unfocused/highest
/bin/echo $$ > /dev/cgroups/ui/tasks
/bin/echo 18432 > /dev/cgroups/ui/cpu.shares
export LD_PRELOAD="/usr/lib/libptmalloc3.so"
/usr/bin/LunaSysMgr -s [if first-time, add "-u minimal -a com.palm.app.firstuse"]
# use /etc/palm/luna.conf /etc/palm/luna-platform.conf
# application paths defined:
# /var/luna/applications/ /var/palm/data/com.palm.appInstallService /media/cryptofs/apps
# usr/palm/applications usr/palm/packages usr/palm/services
# /media/cryptofs/apps/usr/lib/ipkg/info /media/cryptofs/tmp
# /usr/luna/launchpoints/ /var/luna/launchpoints/
# /usr/lib/luna/system/luna-systemui/ /usr/lib/luna/system/luna-applauncher/
# /usr/palm/sysmgr/images/ /usr/palm/sysmgr/localization /usr/palm/sysmgr-cust/localization
# /var/luna/preferences/
# /usr/palm/command-resource-handlers.json /var/usr/palm/command-resource-handlers-active.json
# SysMgr compiled against Qt 4.6.1, HW egl render mode
# /usr/bin/jailer -t -i %s (launching processes) with LD_PRELOAD libpvrtc.so
# deals with cards and card-processes/subsumers
/sbin/initctl emit first-use-finished
emit "first-use-finished" -> configurator (already ran)
/sbin/initctl emit --no-wait LunaSysMgr-ready
emit "LunaSysMgr-ready" -> LunaReady, tap2share
->> tap2share (no listeners)
/usr/sbin/tap2shared #/dev/a6_[0-9] or a23 device for transfers, topaz has back and rear A6
->> LunaReady
mkdir -p /dev/cgroups/application
/bin/echo $(pidof WebAppMgr) > /dev/cgroups/application/tasks
/bin/echo 2048 > /dev/cgroups/ui/cpu.shares
emit "started LunaReady" -> customization-install
->> customization-install
# call customization service to install any stub apps
luna-send -n 1 -a com.palm.service.customization palm://com.palm.service.customization/postFirstUseInstall '{}'
# hack to turn on wifi after first use the first time only
luna-send -n 1 -a com.palm.service.customization palm://com.palm.wifi/setstate '{ "state": "enabled" }'
# create a semaphore so that the app install and the wifi setting only ever run one time
touch /var/luna/data/Customization/postfirstuse_complete.txt
======================= UPSTART SCRIPTS END HERE =================================
--
luna-send uses liblunaservice.so which uses the previously-started ls-hub for message transfer
/var/preferences/com.palm.bus/public_bus_default
/tmp/com.palm.private_hub /tmp/com.palm.public_hub
HUB_INET_ADDRESS
192.168.2.101:4412 192.168.2.101:4411 127.0.0.1:4412 127.0.0.1:4411
com.palm.configurator = /usr/share/dbus-1/system-services/com.palm.configurator.service
TODO: d-bus/luna services statup...
silvioster said:
palm devices:
castle == Pre
pixie == Pixi ?
broadway == Pre2?
mantaray == Pre3
windsornot
topaz == TouchPad
opal
What do EVT1 EVT2 EVT3 / DVT1 DVT2 DVT3 mean ?
What are "opal" and "windsornot" devices ?
Click to expand...
Click to collapse
broadway = Veer
roadrunner = Pre2
opal = TouchPad Go (7 inch)
windsornot = never released device
EVT = early prototypes
DVT = later prototypes, close to production.
-- Rod
silvioster said:
WIFI: Pre3 -> Atheros 6K ar6000 driver = ar6k, non-upstream!, hardcoded in PmWifiService
Pre(1) -> Marvell sd8686 sd8xxx driver
Seems the biggest problem will be porting the WiFi manager, to make TexasInstruments 1271 look like an Atheros 6k series..
Click to expand...
Click to collapse
ar6k is upstream in the staging branch since 2.6.37 according this :
lxr.free-electrons.com/source/drivers/staging/ath6kl/htc2/AR6000/ar6k.c?v=2.6.37;a=arm

Arch linux chroot

I started using Arch some months ago and I really enjoying it. Coming from a released based distro, it feels really nice been able to choose exactly what you want to run in your system and always have the packages up to date. For a while I have been planning on running ubuntu in my transformer but I just don't feel too comfortable with ubuntu , so decided to run arch in my transformer. I couldn't find a tutorial so I scavenged the net and found bits and peace that I put together to make this tutorial. What I like about arch is that I am in control of my system and I can run exactly what I want, thanks awesomely documented Arch!
This is a tutorial that will show you how to run Arch Linux in a chrooted environment within your Asus Tarsnformer. I will not provide a simple script that if you run it will do everything for you, instead I will teach you how to make your own installation by grabbing all necessary elements.
You will need:
Arch Live image: Go to http://archlinuxarm.org/developers/downloads and grab the omap 3/4 package.
Install environment: It can be your internal storage or a sd/micro card. Here I will show how to use the micro sd card.
Script for starting the chroot: I grabbed mine from http://forum.xda-developers.com/showthread.php?t=1517993&highlight=chroot and did some modifications. Thanks-miska-
Rooted Asus Transformer(Prime?) with Terminal: You need root to mount the file system and loop devices. In theory this should work in the Prime too.
Linux Machine
Step 1:
For installing arch in a (micro)sd card (I prefer micro as I don't need the dock for using it), first you need to format the card and make two partitions. (I used gparted) Make one partition fat and assign a small amount of space(I have a 4gb micro and assigned 128mb to the fat partition), then make the rest ext4. Make sure the fat partition is first and the ext one is second.
Step 2:
Now as root you need to extract the package in the ext partition of your card. REMEMBER to be root, I got stuck thinking there was something wrong with the package I downloaded but it was that I was unpacking as normal user.
Code:
# tar -c /path/to/extpartition -xzf ArchLinuxARM-omap-smp-latest.tar.gz
Now you have a arch environment in your (micro)sd card.
Step 3:
In your asus transformer create a folder called 'arch' in the root of your internal storage.
Code:
#mkdir /sdcard/arch
Or use a file manager.
Now place this script somewhere in your transformer, I usually keep it in /sdcard/Downloads
Code:
#!/bin/sh
# Modify this according to your needs
DEVICE="/dev/block/mmcblk1p2"
LOOP="no"
# Maybe this as well
MNT_PATH="/mnt/sdcard/arch"
# Modify only if you know, what are you doing
BINDS="dev dev/pts proc sys mnt/sdcard"
ANDROID_BINDS=" /system /data "
TMPS="tmp var/tmp var/log var/run"
MY_MOUNTS=""
unset PS1
# Helper functions
die() {
echo " $1"
exit 1
}
safe_mount() {
mkdir -p "$MNT_PATH""$2"
if [ "$3" ]; then
OPTION=" $3 "
else
OPTION=""
fi
if [ -z "`mount | grep " $MNT_PATH$2 "`" ]; then
mount $OPTION "$1" "$MNT_PATH$2" || die "Can't mount $2!!!"
fi
MY_MOUNTS="$MNT_PATH$2 $MY_MOUNTS"
}
# Real work
[ "`whoami || echo root`" = "root" ] || die "You must be root first!"
LOOP_ARG=""
[ "$LOOP" = "no" ] || LOOP_ARG=" -o loop "
safe_mount $DEVICE "" "$LOOP_ARG -t ext4 "
for i in $BINDS; do
safe_mount "/$i" "/$i" " -o bind "
done
if [ -d /Removable ]; then
for i in /Removable/*; do
[ -d "$i" ] && safe_mount $i /mnt$i " -o bind "
done
fi
for i in $ANDROID_BINDS; do
safe_mount $i /mnt/android$i " -o bind "
done
for i in $TMPS; do
safe_mount none /$i " -t tmpfs "
done
mount -o remount,ro "$MNT_PATH"
chroot "$MNT_PATH" /sbin/fsck.ext2 -y "$DEVICE"
mount -o remount,rw "$MNT_PATH"
# Tweak configuration of the chroot during first start
#if [ \! -f "$MNT_PATH"/etc/profile.d/tweak.sh ]; then
#mkdir -p "$MNT_PATH"/home/opensuse
echo 'nameserver 8.8.8.8' > "$MNT_PATH"/etc/resolv.conf
#echo 'net:x:3003:root,opensuse' >> "$MNT_PATH"/etc/group
#echo 'opensuse:x:1000:100::/home/opensuse:/bin/bash' >> "$MNT_PATH"/etc/passwd
#echo 'opensuse:$1$joWqOQdr$YsapocP32UtdiR3PKBXVM1:15395:0:::::' \
# >> "$MNT_PATH"/etc/shadow
#sed -i 's|^root:.*|root:$1$joWqOQdr$YsapocP32UtdiR3PKBXVM1:15395:0:::::|' \
# "$MNT_PATH"/etc/shadow
#echo '#!/bin/sh
#export TERM=linux
#export LANG="en_US.utf-8"
#export EDITOR="busybox vi"
#alias vi="busybox vi"
#precmd() { :; }
#if [ "`whoami`" = root ]; then
# export HOME=/root
# export USER=root
# hostname -F /etc/HOSTNAME
#fi
#if [ -z "$CHROOTED" ]; then
# export CHROOTED=yes
# export HOME="/home/opensuse"
# export USER="opensuse"
# su opensuse
#fi
#' > "$MNT_PATH"/etc/profile.d/tweak.sh
#fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/system/xbin:/system/bin"
# Chroot
chroot "$MNT_PATH" /bin/bash
#chroot "$MNT_PATH" /root/init.sh
# Cleanup
echo "Umount everything"
for i in $MY_MOUNTS; do
umount -l $i
done
Step 4:
Chmod +x the script and run it as root.
Code:
su
#chmod +x scriptname.sh
sh scriptname.sh
The script will mount the ext partition of your (micro)sd card in /sdcard/arch and will chroot into it. It also does other really nice things, such as mounting your android partitions to /mnt so you can access them from within your arch environment. I have disabled some lines that are used to set up a some environment variables, but you should still be able to get a fully functional command-line environment and you can enable them and modify them as you want.
Step 5:
The rest is completely up to you, now you have arch running in your transformer. But what!? You need X?! really???? Ok, so lets create a vnc server so we can remote into it.
Your network connection should work, so the first thing to do is an update
Code:
#pacman -Syu
Now install xorg
Code:
#pacman -S xorg-server xorg-xinit xorg-twm xorg-xclock xterm
Now install a vncserver
Code:
#pacman -S tightvnc
And now this is the tricky part(And I spent a lot of time in this).
I grabbed this script from the UbuntuInstaller post. This is the script they use for setting a resolution at each boot. What I did was to remove the resolution prompt and fix the resolution to 1280x752(fullscreen) and remove some ubuntu stuff. I also added an export for HOME and USER that will allow you to run 'vncserver' as root.
Code:
#!/bin/bash
#############################################
# Asks User to screen size and saves as REZ #
#############################################
#echo "Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:"
#read REZ
###########################################
# Tidy up previous LXDE and DBUS sessions #
###########################################
#rm /tmp/.X* > /dev/null 2>&1
#rm /tmp/.X11-unix/X* > /dev/null 2>&1
#rm /root/.vnc/localhost* > /dev/null 2>&1
#rm /var/run/dbus/pid > /dev/null 2>&1
############################################################
# enable workaround for upstart dependent installs #
# in chroot'd environment. this allows certain packages #
# that use upstart start/stop to not fail on install. #
# this means they will have to be launched manually though #
############################################################
#dpkg-divert --local --rename --add /sbin/initctl > /dev/null 2>&1
#ln -s /bin/true /sbin/initctl > /dev/null 2>&1
###############################################
# start vnc server with given resolution and #
# DBUS server, (and optionally an SSH server) #
###############################################
export HOME="/root/"
export USER="root"
vncserver :0 -geometry 1280x752
dbus-daemon --system --fork > /dev/null 2>&1
/etc/rc.d/sshd start
#echo
#echo "If you see the message 'New 'X' Desktop is localhost:0' then you are ready to VNC into your ubuntu OS.."
#echo
#echo "If VNC'ing from a different machine on the same network as the android device use the 1st address below:"
##########################################
# Output IP address of android device #
##########################################
ifconfig | grep "inet addr"
#echo
#echo "If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)"
#echo
#echo "To shut down the VNC server and exit the ubuntu environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!"
#echo
###############################################################
# Spawn and interactive shell - this effectively halts script #
# execution until the spawning shell is exited (i.e. you want #
# to shut down vncserver and exit the ubuntu environment) #
###############################################################
/bin/bash -i
#########################################
# Disable upstart workaround and #
# kill VNC server (and optionally SSH) #
# Rename used xstartup to its first file#
#########################################
vncserver -kill :0
/etc/rc.d/sshd stop
Place this script in /root/, give it the name 'init.sh' and make sure it is executable(chmod +x). Now in the previous script comment the line:
Code:
chroot "$MNT_PATH" /bin/bash
and uncomment the line
Code:
chroot "$MNT_PATH" /root/init.sh
Step 6:
Now you should be able to start a vncserver with twm as your window manager and a xterm.
You can now go to
https://wiki.archlinux.org/index.php/Desktop_Environment
or
https://wiki.archlinux.org/index.php/Window_Manager
and set up the desktop environment that you like the most.
Remember that you need to set up the graphical environment to start manually and not at boot. In a normal environment you would usually use 'startx' which will read the .xinitrc file and run the programs from there. In our case put everything that needs to go into .xinitrc into ~/.vnc/xstartup. An example of my ~/.vnc/xstartup
Code:
#!/bin/bash
xrdb $HOME/.Xresources
exec startfluxblox
This will start an empty fluxbox window manager.

JB system.img, root, bloatware, power saving

I have downloaded and installed JB and made a script to root system.img with SuperSu, remove some Bloatware and install BusyBox.
for app in AccuweatherWidget.apk AccuweatherWidget_Main.apk AccuweatherWidget_Main.odex AccuweatherWidget.odex AllshareMediaServer.apk AllshareMediaServer.odex AllshareService.apk AllshareService.odex AnalogClockSimple.apk AnalogClockSimple.odex AnalogClockUnique.apk AnalogClockUnique.odex ChatON_MARKET.apk DigitalClock.apk DigitalClock.odex DualClockAnalog.apk DualClockAnalog.odex DualClockDigital.apk DualClockDigital.odex FmRadio.apk FmRadio.odex FotaClient.apk FotaClient.odex GoogleSearchWidget.apk GoogleSearchWidget.odex Kies.apk Kies.odex kieswifi.apk kieswifi.odex MediaUploader.apk Microbes.apk Microbes.odex MobileTrackerEngineTwo.apk MobileTrackerEngineTwo.odex MusicFX.apk MusicFX.odex MusicPlayer.apk MusicPlayer.odex PanningTryActually.apk PanningTryActually.odex PickUpTutorial.apk PickUpTutorial.odex PlusOne.apk PolarisViewer.apk SamsungApps.apk SamsungAppsUNA3.apk Samsungservice.apk SamsungWidget_ProgramMonitor.apk SamsungWidget_ProgramMonitor.odex sCloudBackupApp.apk sCloudBackupProvider.apk sCloudDataRelay.apk sCloudDataSync.apk sCloudSyncBrowser.apk sCloudSyncCalendar.apk sCloudSyncContacts.apk SecCalculator2.apk SecCalculator2.odex SecDownloadProviderUi.apk SecDownloadProviderUi.odex SecEmail.apk SecEmail.odex SecExchange.apk SecExchange.odex SecFileShareClient.apk SecFileShareClient.odex SecFileShareServer.apk SecFileShareServer.odex SecHTMLViewer.apk SecHTMLViewer.odex SecMiniDiary_WVGA.apk SecNoteMyFiles.apk SecNoteMyFiles.odex SNS.apk SPPPushClient_Prod.apk Street.apk Swype.apk SyncmlDM.apk Talk.apk talkback.apk VoiceSearchStub.apk voice_talk_U1.apk YahoonewsWidget.apk YahoonewsWidget.odex YahoostockWidget.apk YahoostockWidget.odex ; do
if [ -e "system/app/$app" ] || [ -h "system/app/$app" ] ; then
rm "system/app/$app"
fi
done
Is there more Bloatware that can be safely removed?
install -m 6755 ../UPDATE-SuperSU-v1.00/system/xbin/su system/xbin/
install -m 755 busybox system/bin/
for app in '[' '[[' ash awk base64 basename blkid bunzip2 bzcat bzip2 cal cat chat chattr chgrp chmod chown chroot chrt cksum clear comm cp crond crontab cut date dd depmod devmem df diff dirname dmesg dnsd dnsdomainname dos2unix du echo egrep env ether-wake expand expr fakeidentd fdflush fdformat fdisk fgrep find fold free freeramdisk fsck fsync ftpd ftpget ftpput getopt grep groups gunzip gzip hd head hexdump hostid hostname httpd hwclock id ifconfig ifenslave inetd inotifyd insmod install ionice iostat ip ipaddr ipcalc iplink iproute iprule iptunnel kill killall killall5 less ln logname losetup ls lsattr lsmod lsof lsusb lzop lzopcat md5sum microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.vfat mknod mkswap modinfo modprobe more mount mountpoint mt mv nameif nanddump nandwrite nc netstat nice nmeter nslookup ntpd od patch pgrep pidof ping ping6 pkill pmap powertop printenv printf ps pscan pwd rdate rdev readahead realpath renice reset rev rfkill rm rmdir rmmod route run-parts script scriptreplay sed seq setkeycodes setlogcons setsid sha1sum sha256sum sha3sum sha512sum showkey sleep smemcap sort split stat strings stty sum swapoff swapon sync sysctl tac tail tar tee telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 tty ttysize tunctl umount uname uncompress unexpand uniq unix2dos unlzop unzip uptime usleep uudecode uuencode vconfig vi watch wc wget which who whoami whois xargs zcat ; do
[ -e "system/bin/$app" ] || ln -s busybox "system/bin/$app"
done
echo -e 'nameserver 8.8.4.4\nnameserver 8.8.8.8' >system/etc/resolv.conf
chmod 644 system/etc/resolv.conf
Power consumption of JB was initially very high, I brought it down quite a bit by
echo "dalvik.vm.execution-mode=int:jit" >>/system/build.prop
and at every boot:
echo noop >/sys/block/mmcblk0/queue/scheduler
echo noop >/sys/block/mmcblk0boot0/queue/scheduler
echo noop >/sys/block/mmcblk0boot1/queue/scheduler
echo noop >/sys/block/mmcblk1/queue/scheduler
echo conservative >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 >/sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo 20 >/sys/devices/system/cpu/cpufreq/conservative/freq_step
Is there some rc.local equivalent I can place these commands?
I would also like to replace some stock apps (GMS_Maps.apk Gmail.apk GmsCore.apk Phonesky.apk YouTube.apk) in system.img with updated versions, but this causes the device not to boot with some DRM errors to be seen in logcat. Integrating these with Titanium Backup into the running system works fine.
Tom
Help you this thread?
http://forum.xda-developers.com/showthread.php?t=2135528
About that power comsumption scripts.
After you implemented it, were you able to play games like " six-guns" ?
Was the device lag-free?
install -m 6755 ../UPDATE-SuperSU-v1.00/system/xbin/su system/xbin/
install -m 755 busybox system/bin/
for app in '[' '[[' ash awk base64 basename blkid bunzip2 bzcat bzip2 cal cat chat chattr chgrp chmod chown chroot chrt cksum clear comm cp crond crontab cut date dd depmod devmem df diff dirname dmesg dnsd dnsdomainname dos2unix du echo egrep env ether-wake expand expr fakeidentd fdflush fdformat fdisk fgrep find fold free freeramdisk fsck fsync ftpd ftpget ftpput getopt grep groups gunzip gzip hd head hexdump hostid hostname httpd hwclock id ifconfig ifenslave inetd inotifyd insmod install ionice iostat ip ipaddr ipcalc iplink iproute iprule iptunnel kill killall killall5 less ln logname losetup ls lsattr lsmod lsof lsusb lzop lzopcat md5sum microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.vfat mknod mkswap modinfo modprobe more mount mountpoint mt mv nameif nanddump nandwrite nc netstat nice nmeter nslookup ntpd od patch pgrep pidof ping ping6 pkill pmap powertop printenv printf ps pscan pwd rdate rdev readahead realpath renice reset rev rfkill rm rmdir rmmod route run-parts script scriptreplay sed seq setkeycodes setlogcons setsid sha1sum sha256sum sha3sum sha512sum showkey sleep smemcap sort split stat strings stty sum swapoff swapon sync sysctl tac tail tar tee telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 tty ttysize tunctl umount uname uncompress unexpand uniq unix2dos unlzop unzip uptime usleep uudecode uuencode vconfig vi watch wc wget which who whoami whois xargs zcat ; do
[ -e "system/bin/$app" ] || ln -s busybox "system/bin/$app"
done
echo -e 'nameserver 8.8.4.4\nnameserver 8.8.8.8' >system/etc/resolv.conf
chmod 644 system/etc/resolv.conf
Click to expand...
Click to collapse
What exactly does this part do ??
n2851991m said:
What exactly does this part do ??
Click to expand...
Click to collapse
Install busybox and DNS address
Sent from my GT-I9070 using xda app-developers app
Lol My bad
frapeti said:
Install busybox and DNS address
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
Noticed the first 2 lines now
Well i am gonna put the first part ( remove bloatware ) in a script and run.
Already have latest busybox so that's not needed I guess.
Off to nandroid for backup....

How to change environment variable without patch kernel ???

I want to install busybox to other path, so i need to change $PATH
but $PATH define in init.environ.rc, but this file is in ramdisk and will be rewrote on every boot
Is there any way to change it without patch kernel? because i hate screen display that "kernel is not xxxxx, set warranty bit kernel"
I tried install-recovery.sh and install-recovery-2.sh. but it not work, it may not run at every boot so install-recovery-2.sh will not be loaded
if run install-recovery-2.sh manually, create dir, install busybox and soft link is worked but still can not change $PATH...
in init.rc file, what dos "seclabel u:r:flash_recovery:s0" mean?
Code:
service flash_recovery /system/etc/install-recovery.sh
class main
seclabel u:r:flash_recovery:s0
oneshot
install-recovery.sh
Code:
#!/system/bin/sh
# If you're implementing this in a custom kernel/firmware,
# I suggest you use a different script name, and add a service
# to launch it from init.rc
# Launches SuperSU in daemon mode only on Android 4.3+.
# Nothing will happen on 4.2.x or older, unless SELinux+Enforcing.
# If you want to force loading the daemon, use "--daemon" instead
/system/xbin/daemonsu --auto-daemon &
# Some apps like to run stuff from this script as well, that will
# obviously break root - in your code, just search this file
# for "install-recovery-2.sh", and if present, write there instead.
/system/etc/install-recovery-2.sh
install-recovery-2.sh
Code:
#!/system/bin/sh
#Script for init Busybox on every boot by BZH
busybox_path=/system/etc
busybox_bin=busybox-armv7l-1221
busybox_install_path=/root/bin
$busybox_path/$busybox_bin mount -o rw,remount /
$busybox_path/$busybox_bin mkdir -p /root/bin
$busybox_path/$busybox_bin cp $busybox_path/$busybox_bin $busybox_install_path/
$busybox_path/$busybox_bin chmod -R 755 /root
$busybox_install_path/$busybox_bin --install -s $busybox_install_path/
$busybox_install_path/$busybox_bin ln -s $busybox_install_path/$busybox_bin /system/bin/busybox
$busybox_install_path/$busybox_bin ln -s $busybox_install_path/$busybox_bin /system/xbin/busybox
sync
$busybox_path/$busybox_bin mount -o ro,remount /
export PATH="/root/bin:$PATH"
up...

Categories

Resources