Thread: Tools Duokan 2013
View Single Post
Old 01-06-2012, 09:21 PM   #217
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,643
Karma: 1928003
Join Date: Mar 2011
Location: T黵kiye
Device: Kindle 5.3.7
As stated here Lite folder seem to be unnecessary for the new OS. Then you can delete it.
On the other hand uninstalling and re-installing process has a risk: you may need to return your Kindle to factory default to install for the first time again.

This is the whole installing script:
Spoiler:
Code:
#!/bin/sh

#version 1117

DUOKAN_SYS_PATH="/DuoKan"
SYS_LITE_PATH="/test/DKLite"
DUOKAN_USER_PATH="/mnt/us/DK_System/xKindle"
LITE_USER_PATH="/mnt/us/DK_System/Lite"

DUOKAN_TAG="duokan"

#killall the app before installation happening 
kill -9 `ps -A | grep ebook | awk '{print $1}'`
kill -9 `ps -A | grep KindleApp | awk '{print $1}'`
kill -9 `ps -A | grep UsbSignal.bin | awk '{print $1}'`
kill -9 `ps -A | grep BatterySignal.bin | awk '{print $1}'`
kill -9 `ps -A | grep notCharging.bin| awk '{print $1}'`
kill -9 `ps -A | grep Charging.bin| awk '{print $1}'`
kill -9 `ps -A | grep PowerState.bin| awk '{print $1}'`
kill -9 `ps -A | grep suspending.bin| awk '{print $1}'`
killall -9 lipc-wait-event
lipc-set-prop com.lab126.powerd preventScreenSaver 0

mntroot rw

#rm all old DuoKan script
rm -f /etc/rc5.d/S79switch 
rm -f /etc/rc5.d/S95dkupdate 
rm -f /etc/rc5.d/duokantag 
rm -f /etc/rc5.d/rundk.sh 
rm -f /etc/rc5.d/S96rundk
rm -f /etc/rc5.d/S95framework
rm -f /etc/rc5.d/s95framework
rm -f /etc/rcS.d/S79switch
rm -f /etc/rcS.d/S95DK_switch
ln -s /etc/init.d/framework /etc/rc5.d/S95framework

rm -f /etc/init.d/DK_update
rm -f /etc/init.d/DK_switch
rm -f /etc/init.d/DK_run

rm -f /etc/rc5.d/S79DK_update
rm -f /etc/rc5.d/S95DK_switch
rm -f /etc/rc5.d/S96DK_run

sync

cp /mnt/us/DK_System/install/DK_update 	/etc/init.d/DK_update
cp /mnt/us/DK_System/install/DK_switch 	/etc/init.d/DK_switch
cp /mnt/us/DK_System/install/DK_run    	/etc/init.d/DK_run
sync

chmod +x /etc/init.d/DK_update
chmod +x /etc/init.d/DK_switch
chmod +x /etc/init.d/DK_run

ln -s /etc/init.d/DK_update /etc/rc5.d/S79DK_update
ln -s /etc/init.d/DK_switch /etc/rc5.d/S95DK_switch
ln -s /etc/init.d/framework /etc/rc5.d/S95framework
ln -s /etc/init.d/DK_run 	/etc/rc5.d/S96DK_run 

sync

		
mntroot rw
rm /core.* -f
mntroot rw
rm -rf $SYS_LITE_PATH/* 
rm -rf $DUOKAN_SYS_PATH/* 

mntroot rw
mkdir -p $DUOKAN_SYS_PATH

mntroot rw
mv $DUOKAN_USER_PATH/KindleApp $DUOKAN_SYS_PATH/KindleApp
chmod +x $DUOKAN_SYS_PATH/KindleApp

mntroot rw
mv $DUOKAN_USER_PATH/mplayer $DUOKAN_SYS_PATH/mplayer
chmod +x $DUOKAN_SYS_PATH/mplayer

mntroot rw
mv $DUOKAN_USER_PATH/miniftpd $DUOKAN_SYS_PATH/miniftpd
chmod +x $DUOKAN_SYS_PATH/miniftpd

mntroot rw
mv $DUOKAN_USER_PATH/miniftpd.conf $DUOKAN_SYS_PATH/miniftpd.conf

mntroot rw
mv $DUOKAN_USER_PATH/LayoutDemo.txt $DUOKAN_SYS_PATH/LayoutDemo.txt

mntroot rw
mv $DUOKAN_USER_PATH/ntpdate 	$DUOKAN_SYS_PATH/ntpdate
chmod +x $DUOKAN_SYS_PATH/ntpdate

mntroot rw
mv $DUOKAN_USER_PATH/UsbSignal.bin $DUOKAN_SYS_PATH/UsbSignal.bin
chmod +x $DUOKAN_SYS_PATH/UsbSignal.bin

mntroot rw
mv $DUOKAN_USER_PATH/BatterySignal.bin $DUOKAN_SYS_PATH/BatterySignal.bin
chmod +x $DUOKAN_SYS_PATH/BatterySignal.bin
	
mntroot rw
mv $DUOKAN_USER_PATH/Charging.bin $DUOKAN_SYS_PATH/Charging.bin
chmod +x $DUOKAN_SYS_PATH/Charging.bin
	
mntroot rw
mv $DUOKAN_USER_PATH/notCharging.bin $DUOKAN_SYS_PATH/notCharging.bin
chmod +x $DUOKAN_SYS_PATH/notCharging.bin	
	
mntroot rw
mv $DUOKAN_USER_PATH/PowerState.bin $DUOKAN_SYS_PATH/PowerState.bin
chmod +x $DUOKAN_SYS_PATH/PowerState.bin
	
mntroot rw
mv $DUOKAN_USER_PATH/suspending.bin $DUOKAN_SYS_PATH/suspending.bin
chmod +x $DUOKAN_SYS_PATH/suspending.bin
	
mntroot rw
mv $DUOKAN_USER_PATH/lib $DUOKAN_SYS_PATH/
				
mntroot rw
chmod +x $DUOKAN_USER_PATH/installlib.sh
$DUOKAN_USER_PATH/installlib.sh
rm $DUOKAN_USER_PATH/installlib.sh
sync
				
#TODO: 假如用户放太多垃圾在拷贝的子目录,会让系统区空间
mntroot rw
#copy all pic to system
mkdir -p $DUOKAN_SYS_PATH/res
cp $DUOKAN_USER_PATH/res/* 			$DUOKAN_SYS_PATH/res
rm $DUOKAN_USER_PATH/res/*

mkdir -p $DUOKAN_SYS_PATH/res/py
cp -r $DUOKAN_USER_PATH/res/py/* $DUOKAN_SYS_PATH/res/py
rm -rf $DUOKAN_USER_PATH/res/py/
sync
	
mkdir -p $DUOKAN_SYS_PATH/res/sysfonts
cp -r  $DUOKAN_USER_PATH/res/sysfonts/* $DUOKAN_SYS_PATH/res/sysfonts
rm -rf $DUOKAN_USER_PATH/res/sysfonts/
sync
	
mkdir -p $DUOKAN_SYS_PATH/res/CssAliases
cp $DUOKAN_USER_PATH/res/CssAliases/Aliases $DUOKAN_SYS_PATH/res/CssAliases
rm -rf $DUOKAN_USER_PATH/res/CssAliases/Aliases
sync

#copy resource of kernel to system
mkdir -p $DUOKAN_SYS_PATH/Resource
cp $DUOKAN_USER_PATH/Resource/* $DUOKAN_SYS_PATH/Resource
rm $DUOKAN_USER_PATH/Resource/*

mkdir -p $DUOKAN_SYS_PATH/Resource/CIDToUnicode
cp -r $DUOKAN_USER_PATH/Resource/CIDToUnicode/* $DUOKAN_SYS_PATH/Resource/CIDToUnicode
rm -rf $DUOKAN_USER_PATH/Resource/CIDToUnicode
sync

mkdir -p $DUOKAN_SYS_PATH/Resource/CMap
cp -r $DUOKAN_USER_PATH/Resource/CMap/* $DUOKAN_SYS_PATH/Resource/CMap
rm -rf $DUOKAN_USER_PATH/Resource/CMap
sync

mkdir -p $DUOKAN_SYS_PATH/Resource/CodeConvert
cp -r $DUOKAN_USER_PATH/Resource/CodeConvert/* $DUOKAN_SYS_PATH/Resource/CodeConvert
rm -rf $DUOKAN_USER_PATH/Resource/CodeConvert
sync

mkdir -p $DUOKAN_SYS_PATH/Resource/GuessLanguage
cp -r $DUOKAN_USER_PATH/Resource/GuessLanguage/* $DUOKAN_SYS_PATH/Resource/GuessLanguage
rm -rf $DUOKAN_USER_PATH/Resource/GuessLanguage
sync

mkdir -p $DUOKAN_SYS_PATH/Resource/Hyphen
cp -r $DUOKAN_USER_PATH/Resource/Hyphen/* $DUOKAN_SYS_PATH/Resource/Hyphen
rm -rf $DUOKAN_USER_PATH/Resource/Hyphen
rm -rf $DUOKAN_USER_PATH/Resource
sync

chmod +x $DUOKAN_USER_PATH/python/bin/iconv
sync

mkdir -p $DUOKAN_USER_PATH/res/ScreenSaver
mkdir -p $DUOKAN_USER_PATH/res/UserScreenSaver
mkdir -p $DUOKAN_USER_PATH/res/language 
mkdir -p $DUOKAN_USER_PATH/res/dict
mkdir -p $DUOKAN_USER_PATH/res/userfonts
mkdir -p $DUOKAN_USER_PATH/SQMData
sync



#clean it for next update
#mv $DUOKAN_USER_PATH/res/ScreenSaver/*  $DUOKAN_USER_PATH/res/UserScreenSaver

##Duokan duocuments
mkdir -p /mnt/us/DK_Documents
mkdir -p /mnt/us/DK_Download
mkdir -p /mnt/us/DK_News
mkdir -p /mnt/us/DK_Sync

#merge Lite Configuration
cp -r $LITE_USER_PATH/res/dict/* 			$DUOKAN_USER_PATH/res/dict
cp -r $LITE_USER_PATH/res/ScreenSaver/* 	$DUOKAN_USER_PATH/res/ScreenSaver
cp -r $LITE_USER_PATH/res/userfonts/* 		$DUOKAN_USER_PATH/res/userfonts
cp -r $LITE_USER_PATH/SQMData/* 			$DUOKAN_USER_PATH/SQMData
cp -r $LITE_USER_PATH/config.ini 			$DUOKAN_USER_PATH/


sync

#clean the script
rm /mnt/us/DK_System/install/liteinstall.sh
rm /mnt/us/DK_System/install/DuoKanInstall.sh


mntroot ro

# open the firewall for Linux, need to reboot
if test $( grep  "\-A INPUT \-i wlan0 \-j ACCEPT"  /etc/sysconfig/iptables| wc -l) -eq 0
then
	sleep 3
	mntroot rw
	cp /mnt/us/DK_System/install/iptables 	/etc/sysconfig/iptables
	reboot
	exit
fi


if test $( pgrep -f "KindleApp" | wc -l) -eq 0  &&  test $( pgrep -f "ebook" | wc -l) -eq 0  
then
	sleep 3
	/etc/rc5.d/S96DK_run  $DUOKAN_TAG &
fi
thomass is offline   Reply With Quote