[HELP] Problem Installing Firefox OS on LG Optimus L3 - Firefox OS General

Hi all! I want to install Firefox OS on my LG Optimus L3 (a non-supported device) but someone created the Manifest file for my device. You can see it here: github.com/fergy/B2G/blob/master/optimus-l3.xml
The problem is that I've followed the official guide in developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build and I don't know how to proceed after downloading the optimus-l3.xml file that he created. I follow the guide properly until the "Configuring B2G for your device" chapter. Could you explain how to continue and what are the necessary steps?
Thank you very much for your excellent work and for your help. Bye!

I cloned B2G from mozilla-b2g then fixed config.sh:
Code:
#!/bin/bash
REPO=${REPO:-./repo}
sync_flags=""
repo_sync() {
rm -rf .repo/manifest* &&
$REPO init -u $GITREPO -b $BRANCH -m $1.xml &&
$REPO sync $sync_flags
ret=$?
if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
rm -rf $GIT_TEMP_REPO
fi
if [ $ret -ne 0 ]; then
echo Repo sync failed
exit -1
fi
}
case `uname` in
"Darwin")
# Should also work on other BSDs
CORE_COUNT=`sysctl -n hw.ncpu`
;;
"Linux")
CORE_COUNT=`grep processor /proc/cpuinfo | wc -l`
;;
*)
echo Unsupported platform: `uname`
exit -1
esac
GITREPO=${GITREPO:-"git://github.com/fergy/B2G"}
BRANCH=master
while [ $# -ge 1 ]; do
case $1 in
-d|-l|-f|-n|-c|-q)
sync_flags="$sync_flags $1"
shift
;;
--help|-h)
# The main case statement will give a usage message.
break
;;
-*)
echo "$0: unrecognized option $1" >&2
exit 1
;;
*)
break
;;
esac
done
GIT_TEMP_REPO="tmp_manifest_repo"
if [ -n "$2" ]; then
GITREPO=$GIT_TEMP_REPO
rm -rf $GITREPO &&
git init $GITREPO &&
cp $2 $GITREPO/$1.xml &&
cd $GITREPO &&
git add $1.xml &&
git commit -m "manifest" &&
git branch -m $BRANCH &&
cd ..
fi
echo MAKE_FLAGS=-j$((CORE_COUNT + 2)) > .tmp-config
echo GECKO_OBJDIR=$PWD/objdir-gecko >> .tmp-config
echo DEVICE_NAME=$1 >> .tmp-config
case "$1" in
"galaxy-s2")
echo DEVICE=galaxys2 >> .tmp-config &&
repo_sync $1
;;
"galaxy-nexus")
echo DEVICE=maguro >> .tmp-config &&
repo_sync $1
;;
"nexus-4")
echo DEVICE=mako >> .tmp-config &&
repo_sync nexus-4
;;
"optimus-l3")
echo DEVICE=e400 >> .tmp-config &&
repo_sync $1
;;
"nexus-s")
echo DEVICE=crespo >> .tmp-config &&
repo_sync $1
;;
"nexus-s-4g")
echo DEVICE=crespo4g >> .tmp-config &&
repo_sync $1
;;
"otoro"|"unagi"|"keon"|"inari"|"leo"|"hamachi"|"peak"|"helix"|"wasabi")
echo DEVICE=$1 >> .tmp-config &&
repo_sync $1
;;
"tara")
echo DEVICE=sp8810ea >> .tmp-config &&
echo LUNCH=sp8810eabase-eng >> .tmp-config &&
repo_sync $1
;;
"pandaboard")
echo DEVICE=panda >> .tmp-config &&
repo_sync $1
;;
"emulator"|"emulator-jb")
echo DEVICE=generic >> .tmp-config &&
echo LUNCH=full-eng >> .tmp-config &&
repo_sync $1
;;
"emulator-x86"|"emulator-x86-jb")
echo DEVICE=generic_x86 >> .tmp-config &&
echo LUNCH=full_x86-eng >> .tmp-config &&
repo_sync $1
;;
*)
echo "Usage: $0 [-cdflnq] (device name)"
echo "Flags are passed through to |./repo sync|."
echo
echo Valid devices to configure are:
echo - galaxy-s2
echo - galaxy-nexus
echo - nexus-4
echo - nexus-s
echo - nexus-s-4g
echo - otoro
echo - unagi
echo - inari
echo - keon
echo - peak
echo - leo
echo - hamachi
echo - helix
echo - wasabi
echo - tara
echo - pandaboard
echo - emulator
echo - emulator-jb
echo - emulator-x86
echo - emulator-x86-jb
exit -1
;;
esac
if [ $? -ne 0 ]; then
echo Configuration failed
exit -1
fi
mv .tmp-config .config
echo Run \|./build.sh\| to start building
and now downloading the source tree... let's check if it completes well

gellmar said:
I cloned B2G from mozilla-b2g then fixed config.sh:
Code:
#!/bin/bash
REPO=${REPO:-./repo}
sync_flags=""
repo_sync() {
rm -rf .repo/manifest* &&
$REPO init -u $GITREPO -b $BRANCH -m $1.xml &&
$REPO sync $sync_flags
ret=$?
if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
rm -rf $GIT_TEMP_REPO
fi
if [ $ret -ne 0 ]; then
echo Repo sync failed
exit -1
fi
}
case `uname` in
"Darwin")
# Should also work on other BSDs
CORE_COUNT=`sysctl -n hw.ncpu`
;;
"Linux")
CORE_COUNT=`grep processor /proc/cpuinfo | wc -l`
;;
*)
echo Unsupported platform: `uname`
exit -1
esac
GITREPO=${GITREPO:-"git://github.com/fergy/B2G"}
BRANCH=master
while [ $# -ge 1 ]; do
case $1 in
-d|-l|-f|-n|-c|-q)
sync_flags="$sync_flags $1"
shift
;;
--help|-h)
# The main case statement will give a usage message.
break
;;
-*)
echo "$0: unrecognized option $1" >&2
exit 1
;;
*)
break
;;
esac
done
GIT_TEMP_REPO="tmp_manifest_repo"
if [ -n "$2" ]; then
GITREPO=$GIT_TEMP_REPO
rm -rf $GITREPO &&
git init $GITREPO &&
cp $2 $GITREPO/$1.xml &&
cd $GITREPO &&
git add $1.xml &&
git commit -m "manifest" &&
git branch -m $BRANCH &&
cd ..
fi
echo MAKE_FLAGS=-j$((CORE_COUNT + 2)) > .tmp-config
echo GECKO_OBJDIR=$PWD/objdir-gecko >> .tmp-config
echo DEVICE_NAME=$1 >> .tmp-config
case "$1" in
"galaxy-s2")
echo DEVICE=galaxys2 >> .tmp-config &&
repo_sync $1
;;
"galaxy-nexus")
echo DEVICE=maguro >> .tmp-config &&
repo_sync $1
;;
"nexus-4")
echo DEVICE=mako >> .tmp-config &&
repo_sync nexus-4
;;
"optimus-l3")
echo DEVICE=e400 >> .tmp-config &&
repo_sync $1
;;
"nexus-s")
echo DEVICE=crespo >> .tmp-config &&
repo_sync $1
;;
"nexus-s-4g")
echo DEVICE=crespo4g >> .tmp-config &&
repo_sync $1
;;
"otoro"|"unagi"|"keon"|"inari"|"leo"|"hamachi"|"peak"|"helix"|"wasabi")
echo DEVICE=$1 >> .tmp-config &&
repo_sync $1
;;
"tara")
echo DEVICE=sp8810ea >> .tmp-config &&
echo LUNCH=sp8810eabase-eng >> .tmp-config &&
repo_sync $1
;;
"pandaboard")
echo DEVICE=panda >> .tmp-config &&
repo_sync $1
;;
"emulator"|"emulator-jb")
echo DEVICE=generic >> .tmp-config &&
echo LUNCH=full-eng >> .tmp-config &&
repo_sync $1
;;
"emulator-x86"|"emulator-x86-jb")
echo DEVICE=generic_x86 >> .tmp-config &&
echo LUNCH=full_x86-eng >> .tmp-config &&
repo_sync $1
;;
*)
echo "Usage: $0 [-cdflnq] (device name)"
echo "Flags are passed through to |./repo sync|."
echo
echo Valid devices to configure are:
echo - galaxy-s2
echo - galaxy-nexus
echo - nexus-4
echo - nexus-s
echo - nexus-s-4g
echo - otoro
echo - unagi
echo - inari
echo - keon
echo - peak
echo - leo
echo - hamachi
echo - helix
echo - wasabi
echo - tara
echo - pandaboard
echo - emulator
echo - emulator-jb
echo - emulator-x86
echo - emulator-x86-jb
exit -1
;;
esac
if [ $? -ne 0 ]; then
echo Configuration failed
exit -1
fi
mv .tmp-config .config
echo Run \|./build.sh\| to start building
and now downloading the source tree... let's check if it completes well
Click to expand...
Click to collapse
good morning, hello friend, first congratulate you on your work, I still, as I have a lg400, I've been looking at this pots, and wanted preguntart, possible?

gellmar said:
I cloned B2G from mozilla-b2g then fixed config.sh:
Code:
#!/bin/bash
REPO=${REPO:-./repo}
sync_flags=""
repo_sync() {
rm -rf .repo/manifest* &&
$REPO init -u $GITREPO -b $BRANCH -m $1.xml &&
$REPO sync $sync_flags
ret=$?
if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
rm -rf $GIT_TEMP_REPO
fi
if [ $ret -ne 0 ]; then
echo Repo sync failed
exit -1
fi
}
case `uname` in
"Darwin")
# Should also work on other BSDs
CORE_COUNT=`sysctl -n hw.ncpu`
;;
"Linux")
CORE_COUNT=`grep processor /proc/cpuinfo | wc -l`
;;
*)
echo Unsupported platform: `uname`
exit -1
esac
GITREPO=${GITREPO:-"git://github.com/fergy/B2G"}
BRANCH=master
while [ $# -ge 1 ]; do
case $1 in
-d|-l|-f|-n|-c|-q)
sync_flags="$sync_flags $1"
shift
;;
--help|-h)
# The main case statement will give a usage message.
break
;;
-*)
echo "$0: unrecognized option $1" >&2
exit 1
;;
*)
break
;;
esac
done
GIT_TEMP_REPO="tmp_manifest_repo"
if [ -n "$2" ]; then
GITREPO=$GIT_TEMP_REPO
rm -rf $GITREPO &&
git init $GITREPO &&
cp $2 $GITREPO/$1.xml &&
cd $GITREPO &&
git add $1.xml &&
git commit -m "manifest" &&
git branch -m $BRANCH &&
cd ..
fi
echo MAKE_FLAGS=-j$((CORE_COUNT + 2)) > .tmp-config
echo GECKO_OBJDIR=$PWD/objdir-gecko >> .tmp-config
echo DEVICE_NAME=$1 >> .tmp-config
case "$1" in
"galaxy-s2")
echo DEVICE=galaxys2 >> .tmp-config &&
repo_sync $1
;;
"galaxy-nexus")
echo DEVICE=maguro >> .tmp-config &&
repo_sync $1
;;
"nexus-4")
echo DEVICE=mako >> .tmp-config &&
repo_sync nexus-4
;;
"optimus-l3")
echo DEVICE=e400 >> .tmp-config &&
repo_sync $1
;;
"nexus-s")
echo DEVICE=crespo >> .tmp-config &&
repo_sync $1
;;
"nexus-s-4g")
echo DEVICE=crespo4g >> .tmp-config &&
repo_sync $1
;;
"otoro"|"unagi"|"keon"|"inari"|"leo"|"hamachi"|"peak"|"helix"|"wasabi")
echo DEVICE=$1 >> .tmp-config &&
repo_sync $1
;;
"tara")
echo DEVICE=sp8810ea >> .tmp-config &&
echo LUNCH=sp8810eabase-eng >> .tmp-config &&
repo_sync $1
;;
"pandaboard")
echo DEVICE=panda >> .tmp-config &&
repo_sync $1
;;
"emulator"|"emulator-jb")
echo DEVICE=generic >> .tmp-config &&
echo LUNCH=full-eng >> .tmp-config &&
repo_sync $1
;;
"emulator-x86"|"emulator-x86-jb")
echo DEVICE=generic_x86 >> .tmp-config &&
echo LUNCH=full_x86-eng >> .tmp-config &&
repo_sync $1
;;
*)
echo "Usage: $0 [-cdflnq] (device name)"
echo "Flags are passed through to |./repo sync|."
echo
echo Valid devices to configure are:
echo - galaxy-s2
echo - galaxy-nexus
echo - nexus-4
echo - nexus-s
echo - nexus-s-4g
echo - otoro
echo - unagi
echo - inari
echo - keon
echo - peak
echo - leo
echo - hamachi
echo - helix
echo - wasabi
echo - tara
echo - pandaboard
echo - emulator
echo - emulator-jb
echo - emulator-x86
echo - emulator-x86-jb
exit -1
;;
esac
if [ $? -ne 0 ]; then
echo Configuration failed
exit -1
fi
mv .tmp-config .config
echo Run \|./build.sh\| to start building
and now downloading the source tree... let's check if it completes well
Click to expand...
Click to collapse
any success?

Related

[Q]zipalign on boot code

Hey there
I just found out that robocik zipalign on boot code was as same as maxisma ones
robocik​
Code:
#!/system/bin/sh
# Automatic ZipAlign by Wes Garner
# ZipAlign files in /data that have not been previously ZipAligned (using md5sum)
# Thanks to oknowton for the changes
# Changelog:
# 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton)
# 1.0 (11/30/09) Original
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /system/sd/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
else
echo ZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
Maxisma​
Code:
#!/system/bin/sh
echo "++++ ZIP ALIGNMENT PROCESS STARTING ++++"
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting DC Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /data/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC | tee -a $LOG_FILE;
fi;
else
echo DCZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo "++++ ZIP ALIGNMENT PROCESS FINISHED ++++"
I have bold the differences between this two codes
So are this two codes work the same? Does it need /system/bin/sh in order to run the command line? If I change the #!/system/bin/sh (the first line) to #!/system/xbin/bash,will it work too? If I have don't have the bash file in /system/xbin/ ,will it work too? Are bash and sh the same?
BTW,erasmux's boot OC pack also included a 09betterzipalign in it (he said it wasn't his)
Here is the code
Code:
#!/system/xbin/bash
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
SYSTEM=$(mount|grep "/system "|awk '{ print $1 }')
function mountrw {
mount | grep "/system " | grep rw >/dev/null || mount -o remount,rw $SYSTEM /system
}
function mountro {
mount | grep "/system " | grep ro >/dev/null || mount -o remount,ro $SYSTEM /system
}
[ -e $LOG_FILE ] && rm $LOG_FILE
[ -f $ZIPALIGNDB ] || touch $ZIPALIGNDB
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app /data/app-private ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
mountrw
cp -f -p /cache/$APK $APK
rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done
done
mountro
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
the first line is #!/system/xbin/bash,so it needs the bash file in the /system/xbin folder in order to work,rite? Is it the same as robocik and maxisma code?
What is this?
make something clear!!
robocik's script looks for apks to zipalign at "/system/sd/app/"
while Maxisma's looks at "/data/app/"
When looking at the dirs, robably robocik's mounts things as well in another script. Maybe apps2sd?
The first long line is quite unimportant, it just states "hey I'm zipalign and ready to work", with different names/texts.
I believed bash was based on sh, can't tell for sure. I always learned to follow the sh guidelines to get max compability. Maybe some linux-expert can tell you for sure, or just try to google it a little
riemervdzee said:
robocik's script looks for apks to zipalign at "/system/sd/app/"
while Maxisma's looks at "/data/app/"
When looking at the dirs, robably robocik's mounts things as well in another script. Maybe apps2sd?
The first long line is quite unimportant, it just states "hey I'm zipalign and ready to work", with different names/texts.
I believed bash was based on sh, can't tell for sure. I always learned to follow the sh guidelines to get max compability. Maybe some linux-expert can tell you for sure, or just try to google it a little
Click to expand...
Click to collapse
After some hours of research,I found out most of the ROM in XDA all include sh file (I didn't check all of it but most of them included sh file) but not all included bash file (10 out of 4 rom included bash file),this means in order to run the code,I need bash file in xbin (did a adb logcat and found out a line that says busybox runparts - blah blah blah /system/etc/init.d/09betterzipalign [the one that has #!/system/xbin/bash line on it] error running something like that)
BTW,robocik and maxisma one are almost the same,how can robocik ones can zipalign /system/sd/app/,he didn't change the code or anything,just type in the log file,thats all...
One more thing,y can't we run zipalign-on-boot on all the apps that were installed through the Android Market or wasn't installed on the /data/app?
Ng LC said:
Hey there
I just found out that robocik zipalign on boot code was as same as maxisma ones
robocik​
Code:
#!/system/bin/sh
# Automatic ZipAlign by Wes Garner
# ZipAlign files in /data that have not been previously ZipAligned (using md5sum)
# Thanks to oknowton for the changes
# Changelog:
# 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton)
# 1.0 (11/30/09) Original
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /system/sd/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
else
echo ZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
Maxisma​
Code:
#!/system/bin/sh
echo "++++ ZIP ALIGNMENT PROCESS STARTING ++++"
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting DC Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /data/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC | tee -a $LOG_FILE;
fi;
else
echo DCZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo "++++ ZIP ALIGNMENT PROCESS FINISHED ++++"
I have bold the differences between this two codes
So are this two codes work the same? Does it need /system/bin/sh in order to run the command line? If I change the #!/system/bin/sh (the first line) to #!/system/xbin/bash,will it work too? If I have don't have the bash file in /system/xbin/ ,will it work too? Are bash and sh the same?
BTW,erasmux's boot OC pack also included a 09betterzipalign in it (he said it wasn't his)
Here is the code
Code:
#!/system/xbin/bash
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
SYSTEM=$(mount|grep "/system "|awk '{ print $1 }')
function mountrw {
mount | grep "/system " | grep rw >/dev/null || mount -o remount,rw $SYSTEM /system
}
function mountro {
mount | grep "/system " | grep ro >/dev/null || mount -o remount,ro $SYSTEM /system
}
[ -e $LOG_FILE ] && rm $LOG_FILE
[ -f $ZIPALIGNDB ] || touch $ZIPALIGNDB
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app /data/app-private ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
mountrw
cp -f -p /cache/$APK $APK
rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done
done
mountro
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
the first line is #!/system/xbin/bash,so it needs the bash file in the /system/xbin folder in order to work,rite? Is it the same as robocik and maxisma code?
Click to expand...
Click to collapse
Thanks mate, getting this error
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 24: tee: command not found
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 15: tee: command not found
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 16: basename: command not found
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 15: basename: command not found
Any idea?

[DEV/TOOL] Automated(ish) T-Mobile Theme Generator

A script I've been working on for a couple of days. Still a work in progress so if you suck less, I could use improvements. It's real simple:
** Put this script in a stock theme template like Cyanbread
1.) Place a source ROM you want to theme for, the base ROM/THROM you're taking images from and a stock theme template (like Cyanbread) and set them in the script at the top.
2.) Modify the script as needed (it's not done as of this writing) and set verbosity out the output, etc.
2.) Run the script and it will do the work
The code should be pretty self explanatory and I'll update it as I go. Just about finished at this point.
Screenshot shows you what it does
Code:
#!/bin/bash
# ------------------------- Set theme name TODO
# themeName=$(cat Android.mk | grep LOCAL_PACKAGE_NAME | sed 's/^LOCAL_PACKAGE_NAME\s:=\s//g')
# read -p "Enter theme name. Enter for default [$themeName]: " REPLY
# REPLY=${REPLY:-$themeName}
# echo "Theme name is $themeName"
# ------------------------- for testing to spare the parameters
SRCROM="ABSOLUTE/PATH/TO/ROOT/OF/SOURCEROM"
BASEROM="ABSOLUTE/PATH/TO/ROOT/OF/BASEROM/YOURE/THEMING/FOR"
# my example:
# SRCROM=~/GBSense2.1/
# BASEROM=~/cm_glacier_full-42/
# running this script from ~/haxzamatic-Templatebread--918313e/
DSTROM=$(pwd)
LOGFILE=$DSTROM/logfile.log
decompile_rom(){
cd $1/app
if [ ! -d $1/app/Browser/ ]; then # need apktool for drawables
#apktool if framework/framework_res.apk
#if [ -e framework/com.htc.resources.apk ]; then
# apktool if framework/com.htc.resources.apk
#fi
for i in `ls $1/app/*.apk`; do echo "Decompiling $i"; apktool d $i; done
cd ../framework
for i in `ls $1/framework/*.apk`; do echo "Decompiling $i"; apktool d $i; done
else
echo "Already decompiled"
fi
}
decompile_rom $SRCROM/system
decompile_rom $BASEROM/system
cd $DSTROM
rm $DSTROM/res/xml/*.xml
echo "" > appendleftovers.tmp
# ------------------------- Log file purge and title
cat <<EOF > $LOGFILE
*********************************************************
Missing files from $SRCROM
*********************************************************
EOF
# ------------------------- Redirections.xml
cat <<EOF > res/xml/redirections.xml
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:pluto="http://www.w3.org/2001/pluto.html">
EOF
# ------------------------- Android.xml
echo "<resource-redirections>">$DSTROM/res/xml/android.xml
# ------------------------- Main Loop
find "$BASEROM" -type f -name "*.png" | while read fimg; do
# ------------------------- Base Params
FIMGFNAME=$(cat $(dirname $fimg)"/../../apktool.yml" | grep "apkFileName" | sed 's/apkFileName:\s//g' | sed 's/\.apk//g' )
FIMGPNAME=$(cat $(dirname $fimg)"/../../AndroidManifest.xml" | grep "package" | tr " " "\n" | grep package= | cut -d \" -f 2)
if [ $FIMGPNAME = "android" ]; then FIMGPNAME=framework_res; fi
FIMGDNAME=$(echo $(dirname $fimg) | sed "s/\(.*\)\///" )
cd $DSTROM
if [ "$FIMGFNAME" = "framework-res" ] || [ "$FIMGFNAME" = "com.htc.resources" ]; then wp="framework"
else wp="app"
fi
# -------------------------
SRCFILEPATH=$SRCROM/system/$wp/$FIMGFNAME/res/$FIMGDNAME/$DESTFILE
SRCFILENAME=$(echo $(basename $fimg))
DSTFILEPATH=$DSTROM/system/$wp/$FIMGFNAME/res/$FIMGDNAME/$DESTFILE
DSTFILENAME=$(echo $(echo $FIMGPNAME|sed 's/\./_/g')"_$(basename $fimg)")
BSEFILEPATH=$BASEROM/system/$wp/$FIMGFNAME/res/$FIMGDNAME/$DESTFILE
BSEFILENAME=$(echo $(basename $fimg))
# -------------------------
[ -d res ] || mkdir res
[ -d res/$FIMGDNAME ] || mkdir res/$FIMGDNAME
# -------------------------
if [ -f $SRCFILEPATH$SRCFILENAME ]; then
echo "cp $SRCFILEPATH$SRCFILENAME $DSTROM/res/$FIMGDNAME/$DSTFILENAME"
cp $SRCFILEPATH$SRCFILENAME $DSTROM/res/$FIMGDNAME/$DSTFILENAME
# ------------------------- Redirections.xml
thispname=$(cat $(dirname $fimg)"/../../AndroidManifest.xml" | grep "package" | tr " " "\n" | grep package= | cut -d \" -f 2)
if ! grep -iq $thispname $DSTROM/res/xml/redirections.xml ; then
echo "<package-redirections android:name=\"$thispname\" android:minSdkVersion=\"7\" android:resource=\"@xml/$(echo $thispname|sed 's/\./_/g')\" />" >>$DSTROM/res/xml/redirections.xml
fi
# ------------------------- Android.xml
drawrsrc=$(echo $SRCFILENAME | sed 's/\(.*\)\..*/\1/' | sed 's/\.9//g')
drawrdst=$(echo $DSTFILENAME | sed 's/\(.*\)\..*/\1/' | sed 's/\.9//g')
echo "<item name=\"@drawable/$drawrsrc\">@drawable/$drawrdst</item>" >>$DSTROM/res/xml/android.xml
# ------------------------- Package Redirections
drawrfnamenoext=$(echo $drawrsrc | sed 's/\./_/g')
dstfilenameparsed=$(echo $drawrdst | sed 's/\./_/g')
dstredirfname=`echo "$DSTROM/res/xml/$(echo $FIMGPNAME | sed 's/\./_/g').xml"`
if [ ! -f $dstredirfname ]; then
cat <<EOF > $dstredirfname
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
EOF
echo "$dstredirfname" >> appendleftovers.tmp
fi
echo "<item name=\"drawable/$drawrfnamenoext\">@drawable/$dstfilenameparsed</item>" >>$dstredirfname
else
echo "[MISSING]: $SRCFILEPATH$SRCFILENAME" >> $LOGFILE
#echo "1.) $fimg" >> $LOGFILE
#echo "2.) $FIMGFNAME" >> $LOGFILE
#echo "3.) $FIMGPNAME" >> $LOGFILE
#echo "4.) $FIMGDNAME" >> $LOGFILE
#echo "5.) $SRCFILEPATH" >> $LOGFILE
#echo "6.) $SRCFILENAME" >> $LOGFILE
#echo "7.) $DSTFILEPATH" >> $LOGFILE
#echo "8.) $DSTFILENAME" >> $LOGFILE
#echo "9.) $BSEFILEPATH" >> $LOGFILE
#echo "10.)$BSEFILENAME" >> $LOGFILE
#echo "------------------------------" >> $LOGFILE
fi
# echo "1.) $fimg"
# echo "2.) $FIMGFNAME"
# echo "3.) $FIMGPNAME"
# echo "4.) $FIMGDNAME"
# echo "5.) $SRCFILEPATH"
# echo "6.) $SRCFILENAME"
# echo "7.) $DSTFILEPATH"
# echo "8.) $DSTFILENAME"
# echo "9.) $BSEFILEPATH"
# echo "10.)$BSEFILENAME"
# echo "------------------------------"
# ------------------------- Example output:
# 1.) ~/cm_glacier_full-42/system/app/Browser/res/drawable-hdpi/fav_icn_background.png
# 2.) Browser
# 3.) com.android.browser
# 4.) drawable-hdpi
# 5.) ~/GBSense2.1/system/app/Browser/res/drawable-hdpi/
# 6.) fav_icn_background.png
# 7.) ~/haxzamatic-Templatebread--918313e/system/app/Browser/res/drawable-hdpi/
# 8.) com_android_browser_fav_icn_background.png
# 9.) ~/cm_glacier_full-42/system/app/Browser/res/drawable-hdpi/
# 10.)fav_icn_background.png
done
# ------------------------- Close out the XML tags
echo "</resource-redirections>">>$DSTROM/res/xml/android.xml
echo "</theme-redirections>">>$DSTROM/res/xml/redirections.xml
cat $DSTROM/appendleftovers.tmp | while read thistmp; do
echo "</resource-redirections>" >> $thistmp
done
rm $DSTROM/appendleftovers.tmp
echo "FINISHED:::::::::::::::::::::::::::::::::::::::::::::::::::::::"
reserved for spam

[DEV\HELP] ICS Optimization Script

I have written a script that lets all users to customize the official ICS released by Huawei. I have tested the script but it does not work, so i want to share my work to find my errors and to help other users to optimize their phone.
I need someone who knows how to write scripts in bash......this is the script:
Code:
#! /system/bin/sh
################################
# ICS Optimizer #
# #
# by matteof93 #
################################
mount -o remount,rw -t yaffs2 /dev/block/mmcblk0 /system
main_menu()
{
clear
echo "-----------------------------------------------------"
echo "- ICS Optimizer Script -"
echo "-----------------------------------------------------"
echo "01. Unlock FPS"
echo "02. Change CPU scheduler"
echo "03. Enable Jit"
echo "04. Change Dalvik VM heapsize"
echo "05. Force Launcher in memory"
echo "06. Disable Bootanimation"
echo "07. Increase touch and scrolling responsiveness"
echo "08. Apply other build.prop tweaks"
echo "09. Prepare Android for optimization process"
echo "10. Restore defaults"
echo
echo "11. Reboot"
echo
echo "12. Exit"
echo "----------------------------"
echo -n "Select an option: "
read unlockfps
case $unlockfps in
01)
unlockfps
;;
02)
scheduler
;;
03)
jit
;;
04)
changedalvik
;;
05)
launchermemory
;;
06)
bootanimation
;;
07)
increaseresponsiveness
;;
08)
othertweaks
;;
09)
prepareandroid
;;
10)
resotredefaultsettings
;;
11)
rebootxx
;;
12)
exitxx
esac
}
main_menu
echo "Invalid Option!"
read -p "Press ENTER to continue..."
clear
main_menu
#######################################################################
noop(){
clear
cp /sdcard/ICS-Optimization-Script/Schedulers/Noop/06scheduler /system/etc/init.d
cd /system/etc/init.d
chmod 777 06scheduler
echo "Scheduler changed..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
scheduler
}
cfq(){
clear
cp /sdcard/ICS-Optimization-Script/Schedulers/Cfq/06scheduler
/system/etc/init.d
cd /system/etc/init.d
chmod 777 06scheduler
echo "Scheduler chenged..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
scheduler
}
scheduler()
{
clear
echo "-----------------------------------------------------"
echo "- CPU Scheduler Changer -"
echo "-----------------------------------------------------"
echo "01. Noop"
echo "02. Cfq"
echo
echo "03. Main Menu"
echo "----------------------------"
echo -n "Select an option: "
read noop
case $noop in
01)
noop
;;
02)
cfq
;;
03)
main menu
esac
}
#######################################################################
removefpslimit()
{
clear
cp /sdcard/ICS-Optimization-Script/UnlockFPS/08uncapfps /system/etc/init.d
cd /system/etc/init.d
chmod 777 08uncapfps
echo "FPS Unlocked..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
unlockfps
}
unlockfps()
{
clear
echo "-----------------------------------------------------"
echo "- Unlock FPS -"
echo "-----------------------------------------------------"
echo "01. Remove FPS limit"
echo
echo "02. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read removefpslimit
case $removefpslimit in
01)
removefpslimit
;;
02)
main menu
esac
}
#######################################################################
enablejit()
{
clear
echo "#Jit enabled" | tee -a /system/build.prop
echo "dalvik.vm.execution-mode=int:jit" | tee -a /system/build.prop
echo "Jit enabled..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
jit
}
disablejit()
{
clear
sed -i '/#Jit enabled/d' /system/build.prop
sed -i '/dalvik.vm.execution-mode=int:jit/d' /system/build.prop
echo "Jit disabled..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
jit
}
jit()
{
clear
echo "-----------------------------------------------------"
echo "- Enable Jit -"
echo "-----------------------------------------------------"
echo "01. Enable Jit"
echo "02. Disable Jit"
echo
echo "03. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read enablejit
case $enablejit in
01)
enablejit
;;
02)
disablejit
;;
03)
main menu
esac
}
#######################################################################
prepareandroid()
{
clear
cp /system/build.prop /sdcard/build.prop
mv /sdcard/build.prop /sdcard/build.prop.bak
mkdir /system/etc/init.d
echo "Android System prepared to optimization..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
main_menu
}
#######################################################################
dalvik64()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=64m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
dalvik48()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=48m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=48m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
dalvik32()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=32m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=32m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
dalvik24()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=24m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=24m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
dalvik16()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=16m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=16m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
dalvik12()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=12m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=12m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
restoredefault()
{
clear
cd /system
sed -i 's/dalvik.vm.heapstartsize=5m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=12m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=16m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=24m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=32m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=48m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapstartsize=64m/dalvik.vm.heapstartsize=5m/g' build.prop
sed -i 's/dalvik.vm.heapsize=12m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=16m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=24m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=32m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=48m /dalvik.vm.heapsize=64m/g' build.prop
sed -i 's/dalvik.vm.heapsize=64m /dalvik.vm.heapsize=64m/g' build.prop
echo "Dalvik VM heapsize value has been changed..."
echo "Please Reboot..."
read -p "Press ENTER to continue..."
clear
changedalvik
}
changedalvik()
{
clear
echo "-----------------------------------------------------"
echo "- Dalvik VM heapsize changer -"
echo "-----------------------------------------------------"
echo "01. Set Dalvik VM heapsize to 48"
echo "02. Set Dalvik VM heapsize to 32"
echo "03. Set Dalvik VM heapsize to 24"
echo "04. Set Dalvik VM heapsize to 16"
echo "05. Set Dalvik VM heapsize to 12"
echo "06. Restore default Dalvik VM heapsize value"
echo
echo "07. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read dalvik48
case $dalvik48 in
01)
dalvik48
;;
02)
dalvik32
;;
03)
dalvik24
;;
04)
dalvik16
;;
05)
dalvik12
;;
06)
restoredefault
;;
07)
main menu
esac
}
#######################################################################
launchermemoryin()
{
clear
echo "#Force Launcher in memory" | tee -a /system/build.prop
echo "ro.home_app_adj=1" | tee -a /system/build.prop
echo "Launcher forced in memory..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
launchermemory
}
launchermemoryout()
{
clear
sed -i '/#Force Launcher in memory/d' /system/build.prop
sed -i '/ro.home_app_adj=1/d' /system/build.prop
echo "Launcher forced in memory..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
launchermemory
}
launchermemory()
{
clear
echo "-----------------------------------------------------"
echo "- Force Launcher in memory -"
echo "-----------------------------------------------------"
echo "01. Force Launcher in memory"
echo "02. Remove Launcher from memory"
echo
echo "03. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read launchermemoryin
case $launchermemoryin in
01)
launchermemoryin
;;
02)
launchermemoryout
;;
03)
main menu
esac
}
#######################################################################
nobootanimation()
{
clear
echo "#Bootanimation disabled" | tee -a /system/build.prop
echo "debug.sf.nobootanimation=1" | tee -a /system/build.prop
echo "Bootanimation disabled..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
bootanimation
}
bootanimationon()
{
clear
sed -i '/#Bootanimation disabled/d' /system/build.prop
sed -i '/debug.sf.nobootanimation=1/d' /system/build.prop
echo "Bootanimation enabled..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
bootanimation
}
bootanimation()
{
clear
echo "-----------------------------------------------------"
echo "- Enable\Disable Bootanimation -"
echo "-----------------------------------------------------"
echo "01. Disable Bootanimation"
echo "02. Enable Bootanimation"
echo
echo "03. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read nobootanimation
case $nobootanimation in
01)
nobootanimation
;;
02)
bootanimationon
;;
03)
main menu
esac
}
#######################################################################
applytweaks()
{
clear
echo "#Increase Touch\Scrolling responsiveness" | tee -a /system/build.prop
echo "windowsmgr.max_events_per_sec=150" | tee -a /system/build.prop
echo "video.accelerate.hw=1" | tee -a /system/build.prop
echo "debug.performance.tuning=1" | tee -a /system/build.prop
echo "ro.min.fling_velocity=8000" | tee -a /system/build.prop
sed -i 's/ro.max.fling_velocity=4000/ro.max.fling_velocity=12000/g' build.prop
echo "Tweaks applied..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
increaseresponsiveness
}
defaults()
{
clear
sed -i '/#Increase Touch\Scrolling responsiveness/d' /system/build.prop
sed -i '/windowsmgr.max_events_per_sec=150/d' /system/build.prop
sed -i '/video.accelerate.hw=1/d' /system/build.prop
sed -i '/debug.performance.tuning=1/d' /system/build.prop
sed -i '/ro.min.fling_velocity=8000/d' /system/build.prop
sed -i 's/ro.max.fling_velocity=12000/ro.max.fling_velocity=4000/g' build.prop
echo "default settings restored..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
increaseresponsiveness
}
increaseresponsiveness()
{
clear
echo "-----------------------------------------------------"
echo "- Touch\Scrolling responsiveness -"
echo "-----------------------------------------------------"
echo "01. Apply tweaks"
echo "02. Restore default"
echo
echo "03. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read applytweaks
case $applytweaks in
01)
applytweaks
;;
02)
defaults
;;
03)
main menu
esac
}
#######################################################################
applyothertweaks()
{
echo "#Other tweaks" | tee -a /system/build.prop
echo "wifi.supplicant_scan_interval=180" | tee -a /system/build.prop
sed -i 's/ro.config.hw_RemindWifiToPdp=true/ro.config.hw_RemindWifiToPdp=false/g' build.prop
echo "Tweaks applied..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
othertweaks
}
restoreothertweaks()
{
sed -i 's/ro.config.hw_RemindWifiToPdp=false/ro.config.hw_RemindWifiToPdp=true/g' build.prop
sed -i '/#Other tweaks/d' /system/build.prop
sed -i '/wifi.supplicant_scan_interval=180/d' /system/build.prop
echo "default settings restored..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
othertweaks
}
othertweaks()
{
clear
echo "-----------------------------------------------------"
echo "- Other Tweaks -"
echo "-----------------------------------------------------"
echo "01. Apply tweaks"
echo "02. Restore default"
echo
echo "03. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read applyothertweaks
case $applyothertweaks in
01)
applyothertweaks
;;
02)
restoreothertweaks
;;
03)
main menu
esac
}
#######################################################################
restoredefaultsettings2()
{
clear
rm /system/build.prop
cp /sdcard/build.prop.bak /system
mv /system/build.prop.bak /system/build.prop
rmdir /system/etc/init.d
echo "default settings restored..."
echo "Reboot to apply the new settings..."
read -p "Press ENTER to continue..."
clear
restoredefaultsettings
}
restoredefaultsettings()
{
clear
echo "-----------------------------------------------------"
echo "- Restore Default Settings -"
echo "-----------------------------------------------------"
echo "01. Restore default settings"
echo
echo "02. Main Menu"
echo "--------------------------"
echo -n "Select an option: "
read restoredefaultsettings2
case $restoredefaultsettings2 in
01)
restoredefaultsettings2
;;
02)
main menu
esac
}
#######################################################################
rebootxx()
{
clear
echo "Rebooting..."
reboot
}
exitxx()
{
clear
echo "Bye!"
exit
}
actually it does not work.....there are some errors.
is there someone that can help me????
No scripts - no problems
It's better to be done by editing system files by changing values to that you need.
Waiting for CWM...
Light rom - good rom!
Init.d support is dissabled in stock rom's. You should enable it first.
Sent from my ragelis
bronxitas said:
No scripts - no problems
It's better to be done by editing system files by changing values to that you need.
Waiting for CWM...
Light rom - good rom!
Init.d support is dissabled in stock rom's. You should enable it first.
Sent from my ragelis
Click to expand...
Click to collapse
you do not need init.d support to run this script. you need simply busybox and script manager.
I'm doing all mod's without script if it's possible. Scripts are early stage of mod'ing
Sent from my ragelis
Chenged?
Sent from my U8800-51 using xda premium
i have left this project....

Firefox os samsung devices PORT

Hi there xda-developers.
I'm facing errors on porting i9300 firefox os on GonkHal.cpp.
I'm trying also porting for armv6-vfp.
So, I'll explain how i've done the things until now.
Also too for rockchip mk3066.
i9300 GonkHal.cpp error:
Code:
G/gecko/hal/gonk/GonkHal.cpp
make[6]: *** [GonkHal.o] Error 1
make[5]: *** [hal/compile] Error 2
make[4]: *** [compile] Error 2
make[3]: *** [default] Error 2
make[2]: *** [realbuild] Error 2
make[1]: *** [build] Error 2
make: *** [out/target/product/i9300/obj/DATA/gecko_intermediates/gecko] Error 2
Something went wrong. Try building manually with -j1 to get human-readable messages.
I cannot find the issue on it.
I need help.
Code:
git clone https://github.com/feherneoh/B2G.git B2G_samsung
cd B2G_samsung
replace config.sh for the following down code.
rm config.sh
./config.sh i9300
or
./config.sh spica
then
./build.sh
config.sh new file code inside:
Code:
#!/bin/bash
REPO=${REPO:-./repo}
sync_flags=""
repo_sync() {
if [ -e .repo/project.list ]
then
DIRLIST=$(cat .repo/project.list)
for PROJECT in $DIRLIST;
do
rm -rf $PROJECT
done
fi
rm -rf .repo/manifest* &&
$REPO init -u $GITREPO -b $BRANCH -m $1.xml &&
$REPO sync $sync_flags
ret=$?
if [ "$GITREPO" = "$GIT_TEMP_REPO" ]; then
rm -rf $GIT_TEMP_REPO
fi
if [ $ret -ne 0 ]; then
echo Repo sync failed
exit -1
fi
}
case `uname` in
"Darwin")
# Should also work on other BSDs
CORE_COUNT=`sysctl -n hw.ncpu`
;;
"Linux")
CORE_COUNT=`grep processor /proc/cpuinfo | wc -l`
;;
*)
echo Unsupported platform: `uname`
exit -1
esac
GITREPO=${GITREPO:-"git://github.com/vic3t3chn0/repo-manifests"}
BRANCH=${BRANCH:-b2g-cm9}
while [ $# -ge 1 ]; do
case $1 in
-d|-l|-f|-n|-c|-q)
sync_flags="$sync_flags $1"
shift
;;
--help|-h)
# The main case statement will give a usage message.
break
;;
-*)
echo "$0: unrecognized option $1" >&2
exit 1
;;
*)
break
;;
esac
done
GIT_TEMP_REPO="tmp_manifest_repo"
if [ -n "$2" ]; then
GITREPO=$GIT_TEMP_REPO
rm -rf $GITREPO &&
git init $GITREPO &&
cp $2 $GITREPO/$1.xml &&
cd $GITREPO &&
git add $1.xml &&
git commit -m "manifest" &&
git branch -m $BRANCH &&
cd ..
fi
echo MAKE_FLAGS=-j$((CORE_COUNT + 2)) > .tmp-config
echo GECKO_OBJDIR=$PWD/objdir-gecko >> .tmp-config
echo DEVICE_NAME=$1 >> .tmp-config
case "$1" in
"anzu")
echo DEVICE=anzu >> .tmp-config &&
echo LUNCH=full_anzu-eng >> .tmp-config &&
repo_sync $1
;;
"aoba")
echo DEVICE=aoba >> .tmp-config &&
echo LUNCH=full_aoba-eng >> .tmp-config &&
repo_sync $1
;;
"c800")
echo DEVICE=c800 >> .tmp-config &&
echo LUNCH=full_c800-eng >> .tmp-config &&
repo_sync $1
;;
"coconut")
echo DEVICE=coconut >> .tmp-config &&
echo LUNCH=full_coconut-eng >> .tmp-config &&
repo_sync $1
;;
"e400")
echo DEVICE=e400 >> .tmp-config &&
echo LUNCH=full_e400-eng >> .tmp-config &&
repo_sync $1
;;
"e739")
echo DEVICE=e739 >> .tmp-config &&
echo LUNCH=full_e739-eng >> .tmp-config &&
repo_sync $1
;;
"es209ra")
echo DEVICE=es209ra >> .tmp-config &&
echo LUNCH=es209ra-eng >> .tmp-config &&
repo_sync $1
;;
"haida")
echo DEVICE=haida >> .tmp-config &&
echo LUNCH=full_haida-eng >> .tmp-config &&
repo_sync $1
;;
"hallon")
echo DEVICE=hallon >> .tmp-config &&
echo LUNCH=full_hallon-eng >> .tmp-config &&
repo_sync $1
;;
"hikari")
echo DEVICE=hikari >> .tmp-config &&
echo LUNCH=full_hikari-eng >> .tmp-config &&
repo_sync $1
;;
"iyokan")
echo DEVICE=iyokan >> .tmp-config &&
echo LUNCH=full_iyokan-eng >> .tmp-config &&
repo_sync $1
;;
"i9000")
echo DEVICE=galaxysmtd >> .tmp-config &&
echo LUNCH=full_galaxysmtd-eng >> .tmp-config &&
repo_sync $1
;;
"i9300")
echo DEVICE=i9300 >> .tmp-config &&
echo LUNCH=full_i9300-eng >> .tmp-config &&
repo_sync $1
;;
"kumquat")
echo DEVICE=kumquat >> .tmp-config &&
echo LUNCH=full_kumquat-eng >> .tmp-config &&
repo_sync $1
;;
"kumquat_ste")
echo DEVICE=kumquat >> .tmp-config &&
echo LUNCH=full_kumquat-eng >> .tmp-config &&
repo_sync $1
;;
"lotus")
echo DEVICE=lotus >> .tmp-config &&
echo LUNCH=full_lotus-eng >> .tmp-config &&
repo_sync $1
;;
"lotus_ste")
echo DEVICE=lotus >> .tmp-config &&
echo LUNCH=full_lotus-eng >> .tmp-config &&
repo_sync $1
;;
"mango")
echo DEVICE=mango >> .tmp-config &&
echo LUNCH=full_mango-eng >> .tmp-config &&
repo_sync $1
;;
"nozomi")
echo DEVICE=nozomi >> .tmp-config &&
echo LUNCH=full_nozomi-eng >> .tmp-config &&
repo_sync $1
;;
"nypon")
echo DEVICE=nypon >> .tmp-config &&
echo LUNCH=full_nypon-eng >> .tmp-config &&
repo_sync $1
;;
"nypon_ste")
echo DEVICE=nypon >> .tmp-config &&
echo LUNCH=full_nypon-eng >> .tmp-config &&
repo_sync $1
;;
"p700")
echo DEVICE=p700 >> .tmp-config &&
echo LUNCH=full_p700-eng >> .tmp-config &&
repo_sync $1
;;
"p3110")
echo DEVICE=p3110 >> .tmp-config &&
echo LUNCH=full_p3110-eng >> .tmp-config &&
repo_sync $1
;;
"pepper")
echo DEVICE=pepper >> .tmp-config &&
echo LUNCH=full_pepper-eng >> .tmp-config &&
repo_sync $1
;;
"pepper_ste")
echo DEVICE=pepper >> .tmp-config &&
echo LUNCH=full_pepper-eng >> .tmp-config &&
repo_sync $1
;;
"satsuma")
echo DEVICE=satsuma >> .tmp-config &&
echo LUNCH=full_satsuma-eng >> .tmp-config &&
repo_sync $1
;;
"smultron")
echo DEVICE=smultron >> .tmp-config &&
echo LUNCH=full_smultron-eng >> .tmp-config &&
repo_sync $1
;;
"urushi")
echo DEVICE=urushi >> .tmp-config &&
echo LUNCH=full_urushi-eng >> .tmp-config &&
repo_sync $1
;;
"zeus")
echo DEVICE=zeus >> .tmp-config &&
echo LUNCH=full_zeus-eng >> .tmp-config &&
repo_sync $1
;;
"zeusc")
echo DEVICE=zeusc >> .tmp-config &&
echo LUNCH=full_zeusc-eng >> .tmp-config &&
repo_sync $1
;;
"spica")
echo DEVICE=spica >> .tmp-config &&
echo LUNCH=full_spica-eng >> .tmp-config &&
repo_sync $1
;;
"wave")
echo DEVICE=wave >> .tmp-config &&
echo LUNCH=full_wave-eng >> .tmp-config &&
repo_sync $1
;;
*)
echo "Usage: $0 [-cdflnq] (device name)"
echo "Flags are passed through to |./repo sync|."
echo
echo Valid devices to configure are:
echo +--LG
echo - c800
echo - e400
echo - e739
echo - p700
echo +--Sony Ericsson
echo - anzu
echo - coconut
echo - es209ra
echo - haida
echo - hallon
echo - iyokan
echo - mango
echo - satsuma
echo - smultron
echo - urushi
echo - zeus
echo - zeusc
echo +--Sony
echo - aoba
echo - hikari
echo - kumquat
echo - kumquat_ste
echo - lotus
echo - lotus_ste
echo - nozomi
echo - nypon
echo - nypon_ste
echo - pepper
echo - pepper_ste
echo +--Samsung
echo - i9000
echo - i9300
echo - p3110
echo - spica
echo - wave
exit -1
;;
esac
if [ $? -ne 0 ]; then
echo Configuration failed
exit -1
fi
mv .tmp-config .config
./patch.sh
echo Run \|./build.sh\| to start building
armv6 and armv6-vfp code:
armv6.mk:
Code:
# Configuration for Linux on ARM.
# Generating binaries for the ARMv6 architecture and higher
#
ARCH_ARM_HAVE_THUMB_SUPPORT := true
ARCH_ARM_HAVE_FAST_INTERWORKING := true
ARCH_ARM_HAVE_64BIT_DATA := true
ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
# Note: Hard coding the 'tune' value here is probably not ideal,
# and a better solution should be found in the future.
#
arch_variant_cflags := \
-march=armv6 \
-mtune=xscale \
-D__ARM_ARCH_6__ \
-D__ARM_ARCH_6T__ \
-D__ARM_ARCH_6E__ \
-D__ARM_ARCH_6TE__
armv6-vfp code:
Code:
# At the moment, use the same settings than the one
# for armv6, since TARGET_ARCH_VARIANT := armv6-vfp
# will only be used to select an optimized VFP-capable assembly
# interpreter loop for Dalvik.
#
include $(BUILD_COMBOS)/arch/arm/armv6.mk
Copy this two .mk files into build/combo/arch/arm
We all need to try to build with my config.sh then reply all issues in this topic thread.
For rockchip rk3066:
Code:
git clone https://github.com/vic3t3chn0/radxa_rock_android.git rk3066
cd rk3066
rm -rf device && rm -rf abi
git clone https://github.com/mozilla-b2g/gaia.git gaia
git clone https://github.com/mozilla/gecko-dev.git gecko
then:
git clone https://github.com/vic3t3chn0/b2g_rk3066 b2g_rk3066
move whole folders inside b2g_rk3066 into rk3066
. build/envsetup.sh
lunch rk31sdk-eng
make
Thank you all.

[email protected]@holic help thread

This is a thirteen step program for flashaholics.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Since there is no cure for flashaholism, we may as well give those afflicted more to flash..
**ALWAYS FLASH AT YOUR OWN RISK ANYTHING THAT GETS POSTED HERE**​
Just follow these simple steps:
1. Rate this thread 5 stars
2. Subscribe to this thread
3. Tell other flashaholics to join this thread
4. Treat all flashaholics with respect
5. Be on the constant lookout for anything new and noteworthy
6. Be helpful to those afflicted by posting these new found links
7. Always use protection when flashing (have a backup)
8. Don't be discrete about your flashing adventures, share your steamy details
9. Be helpful to outsiders that aren't as flash savvy as you and answer their posts nicely
10. If you feel a member is on the wagon, help them fall off by bragging about how cool your phone is
11. Remember to follow XDA rules
12. Happy flashing!!
13. Always thank your developers, and donate if you can..
BECOME PART OF AN ADDICTIVE COMMUNITY
I'm on telegram
HELP THE COMMUNITY AND JOIN THE ROM "WIKI"
You can add your knowledge to this growing chart of roms
-JOIN HERE-​
When not flashing I will update the thread with notable links of what, where, and how to flash..
Contributors
@#sychrome#
XDA community
Get your support banners -HERE-
WE'RE HERE FOR YOUR TUNING NEEDS
KA MOD (Kernel aduitor)
http://forum.xda-developers.com/android/apps-games/kernel-adiutor-mod-singularity-kernel-t3333549
How to apply profiles
http://forum.xda-developers.com/oneplus-one/development/rom-cm-12-builds-t3045053/post68636831
Lightning Kernel profiles
http://forum.xda-developers.com/oneplus-one/general/flshholic-help-thread-t2869514/post69351130
New Kernel profiles (jgcaap rom)
http://forum.xda-developers.com/oneplus-one/general/flshholic-help-thread-t2869514/post69271814
Moriarty Kernel profiles (S.O.S. rom)
http://forum.xda-developers.com/showpost.php?p=70181339&postcount=175
Battery Savings tips
1. Keep unneeded services off (location, BT, NFC, ect..)
2. Lower the screen brightness
3. Manage your apps with greenify (many apps will abuse services if you let them)
4. Don't discharge the battery to zero, and try to keep it cool (hot batteries discharge faster)
Settings Script
WELCOME TO SETTINGS SCRIPT
This is a set scripts I started collecting and working on since my days of old using a Nexus S. It has been updated and tested 100's of times and is ready for use on the OnePlus. I am not going to claim 1000's of points gained in benchmarks, or days of battery life, but it should help balance performance and battery..
Basically it's a collection of init.d scripts to gently modify some services, system, battery and various functions. This is active at boot (assuming you have init.d support and busybox). Please don't use this with other scripts (seeder is okay). Don't operate while intoxicated or holding an iPhone..
Code:
#!/system/bin/sh
# test
if [ -f /data/Test.log ] ; then
rm /data/Test.log
fi
echo "Script is working !!!" >> /data/Test.log
echo "excecuted on $(date +"%d-%m-%Y %r" )" >> /data/Test.log
# Expand Kernel Permission
if [ -e /dev/cpuctl/apps/cpu.notify_on_migrate ]; then
chown system.system /dev/cpuctl/apps/cpu.notify_on_migrate
chmod 0666 /dev/cpuctl/apps/cpu.notify_on_migrate
fi
# Cleaner
#Interval between runs, in seconds, 172800=48 hours
RUN_EVERY=172800
busybox rm -f /data/anr/*.*
busybox rm -f /data/cache/*.*
busybox rm -f /data/log/*.*
busybox rm -f /data/local/tmp/*.*
busybox rm -f /data/mlog/*
busybox rm -f /data/tombstones/*
busybox rm -f /data/backup/pending/*
busybox rm -f /data/system/dropbox/*
busybox rm -f /cache/recovery/*
busybox rm -f /dev/log/main/*
chmod 700 /data/system/dropbox
busybox chmod 700 /data/system/usagestats
# Zipalign
# 86400=24 hours
RUN_EVERY=86400
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
if [ ! -f $ZIPALIGNDB ]; then
touch $ZIPALIGNDB;
fi;
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
cp -f -p /cache/$APK $APK
busybox rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done;
done;
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
# Renice
B=/system/xbin/busybox
( while true
do
sf=$( service list | $B grep -c "SurfaceFlinger" )
if [ $sf -eq 1 ]
then
service call SurfaceFlinger 1008 i32 1
break
else
sleep 2
fi
done
) &
# Kernel Tweaks
if [ -e /proc/sys/kernel/softlockup_panic ]
then
echo 0 > /proc/sys/kernel/softlockup_panic
fi
if [ -e /proc/sys/kernel/hung_task_timeout_secs ]
then
echo 0 > /proc/sys/kernel/hung_task_timeout_secs
fi
if [ -e /proc/sys/kernel/panic_on_oops ]
then
echo 0 > /proc/sys/kernel/panic_on_oops
fi
if [ -e /proc/sys/kernel/panic ]
then
echo 0 > /proc/sys/kernel/panic
fi
if [ -e /proc/sys/kernel/msgmni ]
then
echo 2048 > /proc/sys/kernel/msgmni
fi
if [ -e /proc/sys/kernel/msgmax ]
then
echo 64000 > /proc/sys/kernel/msgmax
fi
if [ -e /proc/sys/kernel/shmmax ]
then
echo 268435500 > /proc/sys/kernel/shmmax
fi
if [ -e /proc/sys/kernel/threads-max ]
then
echo 525810 > /proc/sys/kernel/threads-max
fi
if [ -e /proc/sys/kernel/nmi_watchdog ]; then
echo "0" > /proc/sys/kernel/nmi_watchdog;
sysctl -e -w kernel.nmi_watchdog=0;
fi;
if [ -e /proc/sys/vm/drop_caches ]; then
echo "3" > /proc/sys/vm/drop_caches;
sysctl -e -w vm.drop_caches=3;
fi;
#fsync
if [ -e /sys/devices/virtual/misc/fsynccontrol/fsync_enabled ]; then
echo "0" > /sys/devices/virtual/misc/fsynccontrol/fsync_enabled;
fi;
if [ -e /sys/class/misc/fsynccontrol/fsync_enabled ]; then
echo "0" > /sys/class/misc/fsynccontrol/fsync_enabled;
fi;
if [ -e /sys/module/sync/parameters/fsync ]; then
echo "0" > /sys/module/sync/parameters/fsync;
fi;
if [ -e /sys/module/sync/parameters/fsync_enabled ]; then
echo "0" > /sys/module/sync/parameters/fsync_enabled;
echo "N" > /sys/module/sync/parameters/fsync_enabled;
fi;
# Disable Sleepers
echo "NO_NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NORMALIZED_SLEEPER" > /sys/kernel/debug/sched_features;
# Kill Media Tweak
LOG=/data/mediaserver_log.txt;
supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };";
if [ "$SDK" -le "18" ]; then
if [ "$SDK" -gt "10" ]; then
echo "Mediaserver kill" >> $LOG;
busybox killall -9 android.process.media;
busybox killall -9 mediaserver;
fi;
fi;
# Vsync tweak
if [ -e /sys/kernel/debug/msm_fb/0/vsync_enable ]; then
echo 0 > /sys/kernel/debug/msm_fb/0/vsync_enable
fi;
#Sqlite
# Log file location
LOG_FILE=/data/sqlite.log
#Interval between SQLite3 runs, in seconds, 604800=1 week
RUN_EVERY=604800
# Get the last modify date of the Log file, if the file does not exist, set value to 0
if [ -e $LOG_FILE ]; then
LASTRUN=`stat -t $LOG_FILE | awk '{print $14}'`
else
LASTRUN=0
fi;
# Get current date in epoch format
CURRDATE=`date +%s`
# Check the interval
INTERVAL=$(expr $CURRDATE - $LASTRUN)
# If interval is more than the set one, then run the main script
if [ $INTERVAL -gt $RUN_EVERY ]; then
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
echo "SQLite database VACUUM and REINDEX started at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for i in `busybox find /d* -iname "*.db"`;
do /system/xbin/sqlite3 $i 'VACUUM;';
resVac=$?
if [ $resVac == 0 ]; then
resVac="SUCCESS";
else
resVac="ERRCODE-$resVac";
fi;
/system/xbin/sqlite3 $i 'REINDEX;';
resIndex=$?
if [ $resIndex == 0 ]; then
resIndex="SUCCESS";
else
resIndex="ERRCODE-$resIndex";
fi;
echo "Database $i: VACUUM=$resVac REINDEX=$resIndex" | tee -a $LOG_FILE;
done
echo "SQLite database VACUUM and REINDEX finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
fi;
#Lcd power
if [ -e /sys/class/lcd/panel/power_reduce ]; then
echo "LCD power reduce detected. Activating..";
echo "1" > /sys/class/lcd/panel/power_reduce;
fi;
# Properties tweak
setprop ro.kernel.android.checkjni 0
setprop debug.kill_allocating_task 0
setprop dev.pm.dyn_samplingrate 1
setprop pm.sleep_mode 1
setprop persist.sys.purgeable_assets 1
setprop persist.cust.tel.eons 1
setprop ro.ril.enable.amr.wideband 1
setprop ro.ril.transmitpower true
setprop ro.ril.sensor.sleep.control 1
setprop ro.config.combined_signal true
setprop ro.ril.hep 1
setprop wifi.supplicant_scan_interval 300
setprop cm.filesystem.ready 1
setprop persist.service.pcsync.enable 0
setprop persist.service.lgospd.enable 0
setprop ro.min_pointer_dur 1
setprop ro.sys.fw.bg_apps_limit 6
setprop ro.lcd_min_brightness 1
setprop persist.sys.use_dithering 0
setprop persist.sys.use_16bpp_alpha 1
setprop ro.max.fling_velocity 20000
setprop ro.min.fling_velocity 10000
#Ext4 mount
# Log file location
LOG_FILE=/data/fsck.log
if ( mount | grep -w ext4 ) then
echo "EXT4 Partition Found!"
echo "Remounting..."
mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /cache /cache;
mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /data /data;
mount >> /data/fsck.log;
else
echo "EXT4 Partition Not Found!"
fi;
echo "Script finished"
FLASH AT YOUR OWN RISK
INSTALLATION:
**Requires BusyBox and init.d support**
(For some Nougat roms emulation of init.d may be nessesary, use KA mod, or another app for init.d emulation..)
Just flash in recovery, no extra steps required to enjoy..
It removes the old version, so flash and forget, it also survives a dirty flash (v5.5+)..
This has been tested, but no guarantees for protection from aliens or ninjas..
SPECIAL THANKS TO: @h-cspu @7u5h4r @Stone_88@ashutoshmn @Purerawenergy and @maxed4901 for helping me improve it..
Unless there's a bug fix or something I like, this won't get updated further.. NO ETAS
DOWNLOAD(s)
https://www.androidfilehost.com/?w=files&flid=123565
SCRIPTS & UNINSTALLER
LATEST UPDATE
VERSION: 6.1 SS Beta 08/04/2017
VERSION: 3.1 SS Stable 08/04/2017
Enjoy
Mine
CARBON
DOWNLOAD
Normal ext4 Debloated, with Android L keyboard and MiXplorer
Converted F2FS Converted, debloated, with Android L keyboard and MiXplorer.. THIS DOES NOT NEED A KERNEL FLASHED OVER THIS it is an "all in one" convert and is complete..
Original from Moonlight Original with extra Chinese apps
Not mine
yeeeaaaaaa
Sent from my 1+1
Thank you so much for bringing us carbon!
For the spreadsheet, it requires access. Don't forget to change the permissions
You need permission
Want in? Ask the owner for access, or switch to an account with permission. Learn more
Click to expand...
Click to collapse
zephiK said:
For the spreadsheet, it requires access. Don't forget to change the permissions
Click to expand...
Click to collapse
I'll get that fixed, its a work in progress..
Sent from my One using XDA Premium 4 mobile app
My name is ninjanurse, and I am a [email protected]@holic
Sent from my One A0001 using Tapatalk
welcome, ninjanurse
Sent from my 1+1
ninjanurse said:
My name is ninjanurse, and I am a [email protected]@holic
Sent from my One A0001 using Tapatalk
Click to expand...
Click to collapse
I think you need to tell the group about your latest flashing exploits, and don't forget to brag..
Sent from my One using XDA Premium 4 mobile app
Hello i am primo14z
and i can't stand to have one ROM to much time :/
so ya they say that first step is to face yourself with the problem , so I am a [email protected]@holic
i tryed Carbon ROM and i must say works great, but doesn't have that special something why would i make it my daily
I'm a [email protected]@holic as well, dansou901 is my name. My method of getting along is having multirom installed, it helps alot with all the flashing...
dansou901 said:
I'm a [email protected]@holic as well, dansou901 is my name. My method of getting along is having multirom installed, it helps alot with all the flashing...
Click to expand...
Click to collapse
I wonder if multirom works on f2fs?..
**using that search thingy, it turns out that multirom does indeed support f2fs..
Sent from my One using XDA Premium 4 mobile app
Setting.Out said:
I wonder if multirom works on f2fs?..
**using that search thingy, it turns out that multirom does indeed support f2fs..
MultiROM really helps me to stay a real [email protected]@holic, why choose a rom of choice.. I can have them all...
Click to expand...
Click to collapse
ninjanurse said:
Setting.Out said:
I wonder if multirom works on f2fs?..
**using that search thingy, it turns out that multirom does indeed support f2fs..
MultiROM really helps me to stay a real [email protected]@holic, why choose a rom of choice.. I can have them all...
Click to expand...
Click to collapse
As long as you don't run out of storage space...
Click to expand...
Click to collapse
ninjanurse said:
As long as you don't run out of storage space...
Click to expand...
Click to collapse
Binge and purge!!..
Sent from my A0001 using XDA Premium 4 mobile app
I just moved back to ext4 from f2fs.. For a Flashaholic that was a long time to be limited in how and when you can flash.. I was going through withdrawls, so I flashed 4 roms 3 recoveries and 1 kernel along with gapps and the lot as well.. AHHHH... Much better.. And honestly, I know that f2fs is supposed to be faster, but even if it is, I want a bit more freedom to flash.. I'm not saying I won't try it again, but not for a while..
I will have some updated links to websites/roms this week as well as more than just a shell of a chart.. I think the chart(s) will really help others see what a rom has to offer..

Categories

Resources