[VRTHEME][JB 4.1.2 LSx] Change updater-script & installtheme.sh [FOR 2dn ROM Only] - Galaxy S II Themes and Apps

[VRTHEME][JB 4.1.2 LSx] Change updater-script & installtheme.sh [FOR 2dn ROM Only]
VRTHEME FILES for 2ND ROM ONLY
Original user of S2 I9100 JB 4.1.2 ROM on 2ND ROM, i also want to use Themes and Mods for JB 4.1.2 LSx ROM i found on XDA I9100 threads.
Most are based on http://forum.xda-developers.com/showthread.php?t=1207017 .
To flash them on 2nd ROM, again we have to re-script updater-script and installtheme.sh scripts.
REMEMBER, when we use a 4.1.2 JB ROM as second rom, most of the files which are in /preload/symlink/system/app/* are finaly placed in /data/sec_data/*
so we have to use this PATH in updater-script and installtheme.sh .
In most of the themed ZIP original file we find on XDA, some apks system are in /system/app or /preload/symlink/system/app , be carrefull of this,
in VR-Themed ZIP file we want to moddify for 2nd ROM , sometimes, we have to move /preload/symlink/system/app/xxxxxxxx.apk in /vrtheme/system/app/xxxxxxxx.apk before using it.
so, about using the original VR-Theme or VR-Mod zipped files found on XDA, my different purposes for theming are :
if system files are in /preload/symlink/system/app , they will be themed in /data/sec_data
if system files are in /preload/symlink/system/app , they will be themed in /preload/symlink/system/app (if you use on 1rst ROM)
if system files are in /system/app , they will be themed if they are in /system/app or /data/sec_data/ or /preload/symlink/system/app too
At my sens, the only way to have an error is to put some xxxxxxx.apk folders in /vrtheme/system/app/
which are in fact LNs files in /system/app/ on TEL, (in 2nd ROM, partition /system/ = /preload/ !)
Another way to undertand it, it's that there is no way to destroy symlinked files in /system/app/* (on tel) because no files from /vrtheme/system/app are unknow from you, (the only files we find in are managed by you, by deplacing some themed xxxxxxxx.apk folder from /preload/symplink/system/app, because ROM on TELhave on 2nd ROM too. On another terms too, we can manage apks systems files in /data/sec_data/* instead of /system/app/* (preload/app/*) so only xxxxxxxx.apk directories which are volontary in /vrtheme/system/app/* would be themed in /system/app/ on your 2nd ROM.
for example, flashbarservice.apk can be found sometimes in/system/app and sometimes in /data/sec_data/
Anyway you have to ALWAYS verify the xxxxxxxx.apk directories placement in the Original ZIP Theme or Mod file before flashing it
i think my updater-script and installtheme.sh are also fonctional for apks in /data/app/
Remember that generaly, a file xxxxxxxx.apk is patched on phone only if it exist a ZIP folder named xxxxxxxx.apk in /vrtheme/system/app/, /vrtheme/system/framework/, /vrtheme/preload/symlink/system/app/, /vrtheme/data/app or now /vrtheme/data/sec_data/ , and in the TEL, in /system/app/ , /preload/symlink/system/app/ , /system/framework/ , /data/app/ and /data/sec_data/
Give a try on my sample MIX here : https://mega.co.nz/#F!bhww0QYT!L2cnHS84iZJC7aCvdTmFjg
updater-script and installtheme.sh in attachments are to replace those in your original theme or mod files you find , at the same place which there are , to avoid the desired theme or mod in your 2nd ROM.
(delete ".pdf" at the of name file to use it)
i try to be explicit as i can with my (very limited) bad school english
Thanks.
New Update V2 version of this particular updater-script, only for file which are in \vrtheme\data\sec_data\, (and usual \vrtheme\system\app\ and \vrtheme\system\framework\ for sure)
Version before managed \vrtheme\preload\symlink\system\app\ so it was a waste of space in sdcard, i reduce that because THIS IS only for second rom usage, so update if you use.
lines from new updater-script :
package_extract_dir("vrtheme/data/app", "/sdcard/vrtheme/data/app");
package_extract_dir("vrtheme/data/sec_data", "/sdcard/vrtheme/data/sec_data");
package_extract_dir("vrtheme/system/app", "/sdcard/vrtheme/system/app");
package_extract_dir("vrtheme/system/framework", "/sdcard/vrtheme/system/framework");
NO PRELOD here.
Thanks

toolpack and how to for 2nd ROM ONLY
hope it's the best how too i post for adapt mod and vrtheme for 2nd ROM use !
{
"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"
}
updater-script details :
HTML:
ui_print("");
ui_print(" Mounting Filesystems... ");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p12", "/preload");
ui_print("");
ui_print(" Clearing dalvik-cache... ");
delete_recursive("/data/dalvik-cache");
ui_print("");
ui_print(" Flashing new extra files before vrtheme them... ");
package_extract_dir("system/app", "/system/app");
package_extract_dir("data/sec_data", "/data/sec_data");
package_extract_file("vrtheme/symlink_data-data_sec_to_system_app", "/tmp/symlink_data-data_sec_to_system_app");
set_perm(0, 0, 0777, "/tmp/symlink_data-data_sec_to_system_app");
run_program("/tmp/symlink_data-data_sec_to_system_app");
set_perm_recursive(0, 0, 0755, 0644, "/data/sec_data");
ui_print("......extracting.vrtheme.to.sdcard.....");
package_extract_dir("vrtheme/data/app", "/sdcard/vrtheme/data/app");
package_extract_dir("vrtheme/data/sec_data", "/sdcard/vrtheme/data/sec_data");
package_extract_dir("vrtheme/system/app", "/sdcard/vrtheme/system/app");
package_extract_dir("vrtheme/system/framework", "/sdcard/vrtheme/system/framework");
ui_print("......extracting.files.to.work.....");
package_extract_file("vrtheme/installtheme.sh", "/sdcard/vrtheme/installtheme.sh");
package_extract_file("vrtheme/cleanup.sh", "/sdcard/vrtheme/cleanup.sh");
package_extract_file("vrtheme/zipalign", "/sdcard/vrtheme/zipalign");
package_extract_file("vrtheme/zip", "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
ui_print("..now.patching.with.installthem.sh....");
run_program("/sdcard/vrtheme/installtheme.sh");
ui_print(" Cleaning up... ");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
run_program("/sbin/umount", "/preload");
Installtheme.sh detail :
HTML:
#!/sbin/sh
# Copyright VillainROM 2011. All Rights Reserved
# cleanup from last time
[ -d /sdcard/vrtheme-backup ] && rm -r /sdcard/vrtheme-backup
# we need to first go through each file in the "app" folder, and for each one present, apply the modified theme to the APK
# let us copy each original APK here first.
echo "Processing /system/app/"
busybox mkdir -p /sdcard/vrtheme-backup/system/app
busybox mkdir -p /sdcard/vrtheme/apply/system/app
cd /sdcard/vrtheme/system/app/
for f in $(ls)
do
echo "Processing $f"
cp /system/app/$f /sdcard/vrtheme/apply/system/app/
cp /system/app/$f /sdcard/vrtheme-backup/system/app/
done
echo "Backups done for system apps"
# repeat for /preload/symlink/system/app now
[ -d /sdcard/vrtheme/preload/symlink/system/app ] && preload=1 || preload=0
if [ "$preload" -eq "1" ]; then
echo "Processing /preload/symlink/system/app/"
busybox mkdir -p /sdcard/vrtheme-backup/preload/symlink/system/app
busybox mkdir -p /sdcard/vrtheme/apply/preload/symlink/system/app
cd /sdcard/vrtheme/preload/symlink/system/app/
for f in $(ls)
do
echo "Processing $f"
cp /preload/symlink/system/app/$f /sdcard/vrtheme/apply/preload/symlink/system/app/
cp /preload/symlink/system/app/$f /sdcard/vrtheme-backup/preload/symlink/system/app/
done
echo "Backups done for preload apps"
fi
# repeat for /system/framework now
[ -d /sdcard/vrtheme/system/framework ] && framework=1 || framework=0
if [ "$framework" -eq "1" ]; then
echo "Processing /system/framework"
busybox mkdir -p /sdcard/vrtheme-backup/system/framework
busybox mkdir -p /sdcard/vrtheme/apply/system/framework
cd /sdcard/vrtheme/system/framework
for f in $(ls)
do
echo "Processing $f"
cp /system/framework/$f /sdcard/vrtheme/apply/system/framework/
cp /system/framework/$f /sdcard/vrtheme-backup/system/framework/
done
echo "Backups done for frameworks"
fi
# repeat for /data/sec_data now
[ -d /sdcard/vrtheme/data/sec_data ] && datasecapps=1 || datasecapps=0
if [ "$datasecapps" -eq "1" ]; then
echo "Processing /data/sec_data/"
busybox mkdir -p /sdcard/vrtheme-backup/data/sec_data/
busybox mkdir -p /sdcard/vrtheme/apply/data/sec_data/
cd /sdcard/vrtheme/data/sec_data/
for f in $(ls)
do
echo "Processing $f"
cp /data/sec_data/$f /sdcard/vrtheme/apply/data/sec_data/
cp /data/sec_data/$f /sdcard/vrtheme-backup/data/sec_data/
done
echo "Backups done for data sec data"
fi
# repeat for /data/app now
[ -d /sdcard/vrtheme/data/app ] && dataapps=1 || dataapps=0
if [ "$dataapps" -eq "1" ]; then
echo "Processing /data/app/"
busybox mkdir -p /sdcard/vrtheme-backup/data/app/
busybox mkdir -p /sdcard/vrtheme/apply/data/app/
cd /sdcard/vrtheme/data/app/
for f in $(ls)
do
echo "Processing $f"
cp /data/app/$f /sdcard/vrtheme/apply/data/app/
cp /data/app/$f /sdcard/vrtheme-backup/data/app/
done
echo "Backups done for data app"
fi
# for each of the system apps needing processed
cd /sdcard/vrtheme/apply/system/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/system/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/app/$f *
done
echo "Patched system files"
if [ "$preload" -eq "1" ]; then
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/preload/symlink/system/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/preload/symlink/system/app/$f *
done
echo "Patched preload files"
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/system/framework/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/framework/$f *
done
echo "Patched framework files"
fi
if [ "$datasecapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/sec_data/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/data/sec_data/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/sec_data/$f *
done
echo "Patched sec data files"
fi
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/data/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/app/$f *
done
echo "Patched data app files"
fi
# and now time to zipalign
cd /sdcard/vrtheme/apply/system/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
if [ "$preload" -eq "1" ]; then
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$datasecapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/sec_data/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
# time to now move each new app back to its original location
cd /sdcard/vrtheme/apply/system/app/aligned/
cp * /system/app/
chmod 644 /system/app/*
if [ "$preload" -eq "1" ]; then
cd /sdcard/vrtheme/apply/preload/symlink/system/app/aligned/
cp * /preload/symlink/system/app/
chmod 644 /preload/symlink/system/app/*
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/aligned/
cp * /system/framework/
chmod 644 /system/framework/*
fi
if [ "$datasecapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/sec_data/aligned/
cp * /data/sec_data/
chmod 644 /data/sec_data/*
fi
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/aligned/
cp * /data/app/
chmod 644 /data/app/*
fi
# Do not remove the credits from this, it's called being a douche
echo "VillainTheme is done"
# we are all done now
Cleanup.sh detail :
#!/sbin/sh
rm -rf /sdcard/vrtheme/
echo "Cleanup complete"

Hi readers !
post 1 updated.

Related

[Q] Odexing MIUIv4 or other ICS ROM

hello i trying to ODEX my MIUIv4 (ICS 4.0.4) but i had some troubles:
there is my script for odexing:
Code:
#/sbin/sh
D=/data
E=/sddata
S=/system
SD=/sdcard
bbcmd="busybox"
bbcat="$bbcmd cat"
bbgrep="$bbcmd grep"
bbsed="$bbcmd sed"
SYSTARGET="/system"
OPTTEMP="/tmp"
$bbcmd chmod 777 $OPTTEMP/{busybox,dexopt_wrapper,zip,zipalign}
mount -o rw /system
mount -o rw /data
mount -o rw /cache
local zip="$OPTTEMP/zip"
local zipalign="$OPTTEMP/zipalign"
local dexopt_wrapper="$OPTTEMP/dexopt_wrapper"
local bootclpath="/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar"
# change to system/framework and process EVERY jar IN ORDER OF BOOTCLASSPATH!
cd /system/framework
indir=$(pwd)
for filename in \
core.jar core-junit.jar miui-framework.jar bouncycastle.jar ext.jar framework.jar android.policy.jar services.jar apache-xml.jar filterfw.jar \
am.jar ime.jar android.test.runner.jar input.jar javax.obex.jar monkey.jar pm.jar svc.jar bmgr.jar com.android.location.provider.jar com.android.future.usb.accessory.jar com.google.android.maps.jar com.google.android.media.effects.jar com.google.widevine.software.drm.jar
do
name=${filename%.jar}
$bbcmd cp -f $filename $OPTTEMP/$filename
$dexopt_wrapper $filename $name.odex $bootclpath > /dev/null 2>&1
if [ $? -eq 0 ]
then
$zip -d $filename classes.dex > /dev/null 2>&1
$bbcmd cp -f $name.odex $OPTTEMP/$name.odex
echo "$filename - done."
else
$bbcmd rm *.odex
$bbcmd cp -f $OPTTEMP/*.jar $indir/
echo "Framework file $filename failled. Cannot Complete."
echo "System has been restored."
return 1;
fi
done
$zipalign 4 framework-res.apk framework-res.apk.align > /dev/null 2>&1
$bbcmd mv -f framework-res.apk.align framework-res.apk
$zipalign 4 framework-miui-res.apk framework-miui-res.align > /dev/null 2>&1
$bbcmd mv -f framework-miui-res.align framework-miui-res.apk
cd /system/app
indir=$(pwd)
# Process apks from system/app that are normally odexed
for filename in *.apk
do
name=${filename%.apk}
$dexopt_wrapper $filename $name.odex $bootclpath > /dev/null 2>&1
if [ $? -eq 0 ]
then
$zip -d $filename classes.dex > /dev/null 2>&1
$zipalign 4 $filename $filename.align > /dev/null 2>&1
$bbcmd mv -f $filename.align $filename
echo "$filename - done."
fi
done
$bbcmd find /system/framework -type f -exec chmod 644 {} \;
$bbcmd find /system/app -type f -exec chmod 644 {} \;
[ -d /cache/dalvik-cache ] && $bbcmd rm -rf /cache/dalvik-cache/*
[ -d /data/dalvik-cache ] && $bbcmd rm -rf /data/dalvik-cache/*
return 0;
and i had errors in android.policy, framework, services .odex files

[Q] Help needed in system reformatting

Hello XDA!
I've been messing around with my Samsung Galaxy Gio (GT-S5660). I was trying to make a custom ROM for it. Not really custom, I just wanted to customize a stock ROM by updating system apps like Google Play, YouTube, etc... and removing bloatware...
After several hours trying to make a working ZIP image using the Android Kitchen to use with CWM (I had a nightmare with updater-script and update-binary)... Deodexed + zipaligned and everything went fine... I realized that I'm running out of space in /data while trying to restore my installed apps and figured out that it got something to do with deodexing so I made an odexed + non-zipaligned ROM and flashed it. Now having shortage in /system.
I reverted to the stock Odin-flashable ROM and was shocked that the system size is actually "smaller". I think that got to do with the ext4 formatting of the /dev/block(s)
I used this "format.sh" script bundled with "mkfs.ext4":
Code:
#!/sbin/busybox sh
# Ketut Putu Kumajaya, Jan 2012
# taken from ext4 tools script, copyright Chainfire
OUTFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3);
progress() {
if [ $OUTFD != "" ]; then
echo -e "progress ${1} ${2} " 1>&$OUTFD;
fi;
}
set_progress() {
if [ $OUTFD != "" ]; then
echo -e "set_progress ${1} " 1>&$OUTFD;
fi;
}
ui_print() {
if [ $OUTFD != "" ]; then
echo "ui_print ${1} " 1>&$OUTFD;
echo "ui_print " 1>&$OUTFD;
else
echo "${1}";
fi;
}
format_to_ext4() {
MOUNTPOINT=${1};
BLOCKDEV=${2};
SIZE=${3};
EXTRA=${4};
cd /;
umount $MOUNTPOINT;
/tmp/mkfs.ext4 -T ext4 -b 4096 -m 0 -J size=$SIZE -O ^resize_inode,^ext_attr,^huge_file$EXTRA $BLOCKDEV;
/sbin/tune2fs -c 100 -i 100d -m 0 $BLOCKDEV;
sync;
}
progress 0.25 300;
ui_print "Formating /system";
format_to_ext4 "/system" "/dev/block/stl12" "4" ",^has_journal"
set_progress 0.50;
progress 0.25 300;
ui_print "Formating /data";
format_to_ext4 "/data" "/dev/block/stl13" "16" ",^has_journal"
set_progress 0.75;
progress 0.25 300;
ui_print "Formating /cache";
format_to_ext4 "/cache" "/dev/block/stl14" "4" ",^has_journal"
set_progress 1.00;
#progress 0.25 300;
#ui_print "Formating /sd-ext";
#format_to_ext4 "/sd-ext" "/dev/block/mmcblk0p2" "16" ""
#set_progress 1.00;
ui_print "Formating done !";
# system --> data=journal, not supported
# cache --> data=writeback, not supported
And this is the start of my "updater-script" code:
Code:
package_extract_file("format.sh", "/tmp/format.sh");
package_extract_file("mkfs.ext4", "/tmp/mkfs.ext4");
set_perm(0, 0, 0755, "/tmp/format.sh");
set_perm(0, 0, 0755, "/tmp/mkfs.ext4");
run_program("/tmp/format.sh");
delete("/tmp/format.sh");
delete("/tmp/mkfs.ext4");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
Look, this doesn't have anything to do with the apps' sizes as the difference is relatively large for an old device (~25MB).
Now what can I do? How can I reformat the system to stock and flash again?
PS. Im not a n00b nor a dev.
Thanks much in advance!
TytanSlayer said:
Hello XDA!
I've been messing around with my Samsung Galaxy Gio (GT-S5660). I was trying to make a custom ROM for it. Not really custom, I just wanted to customize a stock ROM by updating system apps like Google Play, YouTube, etc... and removing bloatware...
After several hours trying to make a working ZIP image using the Android Kitchen to use with CWM (I had a nightmare with updater-script and update-binary)... Deodexed + zipaligned and everything went fine... I realized that I'm running out of space in /data while trying to restore my installed apps and figured out that it got something to do with deodexing so I made an odexed + non-zipaligned ROM and flashed it. Now having shortage in /system.
I reverted to the stock Odin-flashable ROM and was shocked that the system size is actually "smaller". I think that got to do with the ext4 formatting of the /dev/block(s)
I used this "format.sh" script bundled with "mkfs.ext4":
Code:
#!/sbin/busybox sh
# Ketut Putu Kumajaya, Jan 2012
# taken from ext4 tools script, copyright Chainfire
OUTFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3);
progress() {
if [ $OUTFD != "" ]; then
echo -e "progress ${1} ${2} " 1>&$OUTFD;
fi;
}
set_progress() {
if [ $OUTFD != "" ]; then
echo -e "set_progress ${1} " 1>&$OUTFD;
fi;
}
ui_print() {
if [ $OUTFD != "" ]; then
echo "ui_print ${1} " 1>&$OUTFD;
echo "ui_print " 1>&$OUTFD;
else
echo "${1}";
fi;
}
format_to_ext4() {
MOUNTPOINT=${1};
BLOCKDEV=${2};
SIZE=${3};
EXTRA=${4};
cd /;
umount $MOUNTPOINT;
/tmp/mkfs.ext4 -T ext4 -b 4096 -m 0 -J size=$SIZE -O ^resize_inode,^ext_attr,^huge_file$EXTRA $BLOCKDEV;
/sbin/tune2fs -c 100 -i 100d -m 0 $BLOCKDEV;
sync;
}
progress 0.25 300;
ui_print "Formating /system";
format_to_ext4 "/system" "/dev/block/stl12" "4" ",^has_journal"
set_progress 0.50;
progress 0.25 300;
ui_print "Formating /data";
format_to_ext4 "/data" "/dev/block/stl13" "16" ",^has_journal"
set_progress 0.75;
progress 0.25 300;
ui_print "Formating /cache";
format_to_ext4 "/cache" "/dev/block/stl14" "4" ",^has_journal"
set_progress 1.00;
#progress 0.25 300;
#ui_print "Formating /sd-ext";
#format_to_ext4 "/sd-ext" "/dev/block/mmcblk0p2" "16" ""
#set_progress 1.00;
ui_print "Formating done !";
# system --> data=journal, not supported
# cache --> data=writeback, not supported
And this is the start of my "updater-script" code:
Code:
package_extract_file("format.sh", "/tmp/format.sh");
package_extract_file("mkfs.ext4", "/tmp/mkfs.ext4");
set_perm(0, 0, 0755, "/tmp/format.sh");
set_perm(0, 0, 0755, "/tmp/mkfs.ext4");
run_program("/tmp/format.sh");
delete("/tmp/format.sh");
delete("/tmp/mkfs.ext4");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
Look, this doesn't have anything to do with the apps' sizes as the difference is relatively large for an old device (~25MB).
Now what can I do? How can I reformat the system to stock and flash again?
PS. Im not a n00b nor a dev.
Thanks much in advance!
Click to expand...
Click to collapse
ive also used deoxwd from peteragent5 its work fine and great its 2.3.6 but yes its consume a big amount of internal memory so I've change my rom and use some other custom rom's

[VRTHEME][DUALBOOT][SEC_DATA][JB4.1.2]New installtheme.sh for 2nd ROM[NEATROM-AROMA]

Hi All,
You all know my interest to port rom and mod cwm flasher we all find and test in both XDA Galaxy S II Android Developmentand AND Galaxy S II Themes and Apps threads for 2nd rom with Dorimanx kernel v8.xx embedded
so some dualbooters want to use some mods and themes they find and they cant because most (for not sayinf all) are script for 1rst rom usage.
I see a great mod that i can purpose here for your 2nd rom, depends what you have in your 2nd rom, see end of this unique post dedicated to @Jeetu NEATROM-AROMA GREAT MOD
So let's have a see about existensZ
Most MODS are based on VRTHEME script, which original is :
Code:
#!/sbin/sh
# Copyright VillainROM 2011. All Rights Reserved
# cleanup from last time
[ -d /sdcard/vrtheme-backup ] && rm -r /sdcard/vrtheme-backup
# we need to first go through each file in the "app" folder
# and for each one present,
# apply the modified theme to the APK
# let us copy each original APK here first.
[COLOR="Navy"]echo "Processing /preload/symlink/system/app/"
busybox mkdir -p /sdcard/vrtheme-backup/preload/symlink/system/app
busybox mkdir -p /sdcard/vrtheme/apply/preload/symlink/system/app
cd /sdcard/vrtheme/preload/symlink/system/app/
for f in $(ls)
do
echo "Processing $f"
cp /preload/symlink/system/app/$f /sdcard/vrtheme/apply/preload/symlink/system/app/
cp /preload/symlink/system/app/$f /sdcard/vrtheme-backup/preload/symlink/system/app/
done
echo "Backups done for system apps"
# repeat for /system/framework now
[ -d /sdcard/vrtheme/system/framework ] && framework=1 || framework=0
if [ "$framework" -eq "1" ]; then
echo "Processing /system/framework"
busybox mkdir -p /sdcard/vrtheme-backup/system/framework
busybox mkdir -p /sdcard/vrtheme/apply/system/framework
cd /sdcard/vrtheme/system/framework
for f in $(ls)
do
echo "Processing $f"
cp /system/framework/$f /sdcard/vrtheme/apply/system/framework/
cp /system/framework/$f /sdcard/vrtheme-backup/system/framework/
done
echo "Backups done for frameworks"
fi
# repeat for /data/app now
[ -d /sdcard/vrtheme/data ] && dataapps=1 || dataapps=0
if [ "$dataapps" -eq "1" ]; then
echo "Processing /data/app/"
busybox mkdir -p /sdcard/vrtheme-backup/data/app
busybox mkdir -p /sdcard/vrtheme/apply/data/app
cd /sdcard/vrtheme/data/app/
for f in $(ls)
do
echo "Processing $f"
cp /data/app/$f /sdcard/vrtheme/apply/data/app/
cp /data/app/$f /sdcard/vrtheme-backup/data/app/
done
echo "Backups done for data apps"
fi[/COLOR]
[COLOR="DarkGreen"]# for each of the system apps needing processed
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/preload/symlink/system/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/preload/symlink/system/app/$f *
done
echo "Patched system files"
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/data/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/app/$f *
done
echo "Patched data files"
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/system/framework/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/framework/$f *
done
echo "Patched framework files"
fi[/COLOR]
[COLOR="DarkRed"]# and now time to zipalign
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi[/COLOR]
[COLOR="Indigo"]# time to now move each new app back to its original location
cd /sdcard/vrtheme/apply/preload/symlink/system/app/aligned/
cp * /preload/symlink/system/app/
chmod 644 /preload/symlink/system/app/*
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/aligned/
cp * /data/app/
chmod 644 /data/app/*
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/aligned/
cp * /system/framework/
chmod 644 /system/framework/*
fi
# Do not remove the credits from this, it's called being a douche
echo "VillainTheme is done"
# we are all done now[/COLOR]
- in this script, there are 4 parts :
1 - making a backup of all original APKs to be modded by flasher (a simple cp command for each APK).
by order : preload/symlink/system/app, system/framework and data/app
2 - moding process with a zip command to merge vrtheme folder copyied before during updater-script execution in original APK (copyied before too) to need to be modded.
by order : preload/symlink/system/app, data/app and system/framework.
3 - zipalign process of the APKs freshly modded.
by order : preload/symlink/system/app, data/app and system/framework.
4 - copy of the news modded APKs in their original folder respectively.
by order : preload/symlink/system/app, data/app and system/framework.
To mod an APK, installtheme uses zip command to merge a folder copyied in sdcard during flash process, in it. ,Fortunaly and we know that, all APKs files are structured like ZIP files .
Its the updater-script that copy each structure APKs folder of all apks to be modded in the rom in the external SDCARD. In the past , i change these few lines in updater-script but now, it's not necessary with this NEW METHOD.
The only line we have to modify in the updater-script from a VRTHEME MOD ZIP file we want to see run in 2nd rom are the lines relative to the destination folder of the copy of real apks that have to been changed or added by DEV on you rom during its flash. As for a flash a modded ZIP ROM for 2nd rom, updater-script from MODs need to be modified to copy /preload/symlink/system/app from ZIP MOD to /data/sec_data/ folder of 2nd rom, that's all. Its the same if the MOD have an AROMA installer embedded (+ vrtheme folder, like last @Jeetu great mods).
So, according you have your good updater-script of your new mod for 2nd rom usage you want, you can replace installtheme.sh in ZIP MOD by those in attachment "new-installtheme_For2ndRomONLY.sh", and for all mod you will find in future and you want to use in your 2nd rom, use this.
the 3 images below show you what i have done :
To make this run in 2nd ROM, we have to make some little changes, exactly 4 lines in the installtheme.sh script, according we know how to mod updater-script in an another thread or as i explain in this post....but it's not the purpose here.
{
"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"
}
above, backup of apks to be modded, i correct 2 lines from original, copy (cp) each apk to be merged by zip command adding a folder in it, from /data/sec_data/ instead of /preload/symlink/system/app/ if we were in 1rst rom. 2nd rom uses /data/sec_data/ instead of /preload/ partition folder.
Above,no changes in these two processes in one image : zip command on each apk to be modded and zipalign process for each of them after.
Above again, just 2 lines touched, copy back the new zipalinged apks in original folder of rom, instead of /preload/symlink/system/app , we put them in /data/sec_data/ folder of 2nd rom.
in attachment, FOR TEST, find 3 files for the very great AROMA MOD for NeatROM from @Jeetu.
if you havent NeatROM in 2nd rom you could find one shared here (thanks to @nik60), with kernel @dorimanx v8.xx runing here
Special thanks to @_Sale_ for his great NEATROM.
Donwload "1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf", rename it "updater-script" and put it in \NEATROM_AROMA\META-INF\com\google\android\ folder of NEATROM-AROMA.ZIP from @Jeetu, here.
Download "2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf", rename it "installtheme.sh" and put it in \NEATROM_AROMA\vrtheme\ folder of NEATROM-AROMA.ZIP from Jeetu too.
Download "3-For2ndRomONLY-create_preload_symlinks.pdf" , rename it "create_preload_symlinks" and to put in \NEATROM_AROMA.zip\Jeetu\ folder of NEATROM-AROMA.ZIP from Jeetu too.
thanks.
test and report
Thanks i missed here
Once again great work mate!! Thanks a lot
Check your PM
ok I download
"1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf"
"2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf"
"3-For2ndRomONLY-create_preload_symlinks.pdf"
rename it as updater-script, installtheme.sh and create_preload_symlinks
then I replace it in zip as you say ,flash and got no statusbar,only Back To Kill and Bootanimation are in my phone from mod
duhhh said:
ok I download
"1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf"
"2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf"
"3-For2ndRomONLY-create_preload_symlinks.pdf"
rename it as updater-script, installtheme.sh and create_preload_symlinks
then I replace it in zip as you say ,flash and got no statusbar,only Back To Kill and Bootanimation are in my phone from mod
Click to expand...
Click to collapse
Have you enough space in your external card ? And can you retry with this one? I correct some "/" in some package_extract_dir lines...
thanks
now all mod's works,but again don't have statusbar :crying:
duhhh said:
now all mod's works,but again don't have statusbar :crying:
Click to expand...
Click to collapse
Can you put here the aroma log you can save at end of proces ?
I cry for u too
Sent from my GT-I9100 using Tapatalk 2
status 0
installation aborted
duhhh said:
status 0
installation aborted
Click to expand...
Click to collapse
Did you choose 23 aokp trans ?
Sent from my GT-I9100 using Tapatalk 2
fla**** again and now
status 0
installation finished
no statusbar
yes I choose 23 aokp trans
duhhh said:
fla**** again and now
status 0
installation finished
no statusbar
yes I choose 23 aokp trans
Click to expand...
Click to collapse
Make space on external and choose another systemui because aokp you choose put sysyemui.apk in system/app folder instead of preload/.... /app so I make the same instead of data/sec_data. Choose another systemui and I check that for 23 aokp trans
finaly test this new one in attachments
Sent from my GT-I9100 using Tapatalk 2
all works except 23 aokp trans
duhhh said:
all works except 23 aokp trans
Click to expand...
Click to collapse
can you take and test corrected_II i post .
i put systemui.apk from 23 aokp trans in the good folder.
if 23AOKPTRANS works, i update OP
thanks.
Troubadour666 said:
can you take and test corrected_II i post .
i put systemui.apk from 23 aokp trans in the good folder.
if 23AOKPTRANS works, i update OP
thanks.
Click to expand...
Click to collapse
23AOKPTRANS=no statusbar
sry
i think there is an incompatibility with this 23AOKPtrans and the vrtheme applyied after in updater-script, according choices you make after 23 aokp in Aroma menu display....
i post here a result of test with aroma vivek buildv7 rom from @corruptionfreeindia and 23 aokp trans works but there are some more file added by DEV to make it work, not only systemui.apk and i dont know realy if @Jeetu does the same with vrtheme choice in its aroma after we choose 23 aokp trans. i'm not sure to be understand with my bad english
thanks.
I went to see that there are 2 version of installtheme.sh in XDA for VRTHEME files
one manage /system/app/ folder and we know that in this folder there are the "ln" files from /preload/symlink/system/app/ , dont know if this can be useful to submit this remark
fortunaly, in the two scripts, /preload/symlink/system/app/ is the 1rst folder where APKs are to be themed 1rst , i dont know too if this could have impact on jb sammy 4.1.2 rom.
and fortunaly too, the use of each other depends of managment folder in the flasher, we have the choice to put /xxxxxxxx.apk/ folder to be merge during installtheme process in /vrtheme/preload/...../app/ or /system/app/
image of comparison :
in attachments, the two installtheme.sh scripts i can find.
thanks again.
Is it possible to use dual boot with Gingerbread and jellybean ? I wanna keep GB cause of wifi adhoc support...

[mod][tweaks]*liquid speed*[ics,jb]][28/09/2013]][prop]

Code:
* Your warranty is now void..
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, you getting dumped or you getting fired because your phone
* bootloops and alarm does not go off. Please do some research if you have any
* YOU are choosing to make these modifications.
{
"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"
}
Requirements :-
- Android 4.0+
- Custom kernel (with init.d support)
- Root and Busybox installed
- 3MB of free space in "/system".
Feature :-
- Full memory management.
- kernel tweaks and improvements for better performance and battery life.
- Entropy generator engine used to reduce lags.
- Zipalign apps in "/system" and apps in "/data" every 48 hours which result in less RAM usage.
- Sqlite optimizations and faster database access.
- CPU governors tweaks and improvements for better performance and battery life.
- Increased SD Card read-ahead cache to 2048 KB .
- Ad blocking.
- Default.prop tweaks and improvements.
- Cleans log files and tombstones at every boot.
- Many other tweaks for better performance and battery life!
Steps :-
- go to system/etc/init.d/delete all files in it
- Download the zip
- Flash zip via recovery
- Feel the difference (1st boot may take time)
User praise :-
Code:
$lim $hady :- Awesome....!!!!!!!!!
One word Awesome....!!!!
Playing Subway Surfers without a Single Lag... Feels like my phone is running on GB..
Code:
skaloyskie :- Thanks man! I've noticed that my phone suffered less lag even I'm using Opera mini (Multi-tabbed browsing) and downloading movies via torrent. Nice share!
Code:
iossux :- U rock bro really boosted my performance
Some part of my Default .prop
#enable harware egl profile
debug.egl.profiler=1
#16BIT transparency , Smother Scrolling
persist.sys.use_16bpp_alpha=1
#debug.composition.type=gpu
debug.composition.type=c2d
debug.performance.tuning=1
debug.enabletr=true
debug.qctwa.preservebuf=1
dev.pm.dyn_samplingrate=1
video.accelerate.hw=1
ro.vold.umsdirtyratio=20
debug.overlayui.enable=1
debug.egl.hw=1
ro.fb.mode=1
hw3d.force=1
persist.sys.composition.type=c2d
persist.sys.ui.hw=1
ro.sf.compbypass.enable=0
#Enable tile rendering
debug.enabletr=true
persist.sys.composition.type=gpu
#3d performance
persist.android.strictmode=0
ro.min_pointer_dur=1
ro.secure=0
#Media quality
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.media.dec.aud.wma.enabled=1
ro.media.dec.vid.wmv.enabled=1
ro.media.cam.preview.fps=0
ro.media.codec_priority_for_thumb=so
#Speed liquid
persist.service.lgospd.enable=0
persist.service.pcsync.enable=0
# For sensor sleep control
ro.ril.sensor.sleep.control=1
#loggers
ro.config.htc.nocheckin=1
ro.config.nocheckin=1
profiler.force_disable_ulog=1
profiler.force_disable_err_rpt=1
#Scrolling
windowsmgr.max_events_per_sec=90
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
#battery saver
ro.ril.disable.power.collapse=1
pm.sleep_mode=1
usb_wakeup=enable
proximity_incall=enable
power_supply.wakeup=enable
ro.config.hw_power_saving=1
ro.config.hw_fast_dormancy=1
ro.config.hw_quickpoweron=true
persist.sys.use_dithering=0
#improve battery under no signal -- need test
ro.mot.eri.losalert.delay=1000
#net speedtweaks
net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.hspda=4096,87380,256960,4096,16 384,256960
net.tcp.buffersize.hspa=4096,87380,256960,4096,163 84,256960
#streaming faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
media.stagefright.enable-aac=true
media.stagefright.enable-qcp=true
media.stagefright.enable-record=true
Some part of INIT.D :-
# Disable Logger
busybox rm /dev/log/main
# Busybox Remounting
busybox mount -o remount,noatime,barrier=0,nobh /system
busybox mount -o remount,noatime,barrier=0,nobh /data
busybox mount -o remount,noatime,barrier=0,nobh /cache
echo "Mounted Busybox"
# clearing junk files
busybox find /data/data -type d -iname "*cache*" -exec busybox rm -f {}/* ';' -exec echo "Cleared {}" ';'
rm -f /data/local/*.apk
rm -f /data/local/tmp/*.apk
rm -f /data/*.log
rm -f /data/log/*.log
rm -f /cache/*.*
rm -f /cache/recovery/*.*
rm -f /data/system/dropbox/*.txt
rm -f /data/backup/pending/*.tmp
rm -f /data/tombstones/*.*
echo "Junk cleared"
# Defrag Database Files
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
# Move Dalvik-Cache To Cache Partition
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 4000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
echo "Moved Dalvik-Cache To Cache Partition"
# Mod: Battery
setprop wifi.supplicant_scan_interval=180
setprop pm.sleep_mode=1
setprop ro.ril.disable.power.collapse=1
# Mod: Performance
setprop ro.kernel.android.checkjni=0
setprop persist.sys.purgeable_assets=1
setprop debug.sf.hw=1
setprop ro.telephony.call_ring.delay=0
setprop ro.foreground_app_mem=1280
setprop ro.visible_app_mem=2560
setprop ro.perceptible_app_mem=3840
setprop ro.heavy_weight_app_mem=6400
setprop ro.secondary_server_mem=7680
setprop ro.backup_app_mem=8960
setprop ro.home_app_mem=2048
setprop ro.hidden_app_mem=12800
setprop ro.content_provider_mem=15360
setprop ro.empty_app_mem=20480
setprop ro.foreground_app_adj=0
setprop ro.visible_app_adj=1
setprop ro.perceptible_app_adj=2
setprop ro.heavy_weight_app_adj=4
setprop ro.secondary_server_adj=5
setprop ro.backup_app_adj=6
setprop ro.home_app_adj=1
setprop ro.hidden_app_min_adj=7
setprop ro.empty_app_adj=15
# Mod: Graphics
setprop debug.performance.tuning=1
setprop video.accelerate.hw=1
setprop ro.media.dec.jpeg.memcap=8000000
setprop ro.media.enc.hprof.vid.bps=8000000
setprop persist.sys.use_dithering 1
# Touch Screen Sensitivity
echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
# Renice Apps
renice -20 `pidof com.android.phone`
renice -19 `pidof com.android.inputmethod.latin`
renice -19 `pidof com.swype.android.inputmethod`
renice -17 `pidof com.android.systemui`
renice -9 `pidof com.android.settings`
renice -9 `pidof com.android.vending`
renice -6 `pidof com.sec.android.app.camera`
renice -6 `pidof com.sec.android.app.fm`
renice -6 `pidof com.google.android.apps.maps`
renice -4 `pidof com.google.android.apps.googlevoice`
renice -3 `pidof android.process.media`
# SqLite Optimize
for i in \
`busybox find /data -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
if [ -d "/dbdata" ]; then
for i in \
`busybox find /dbdata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
if [ -d "/datadata" ]; then
for i in \
`busybox find /datadata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
for i in \
`busybox find /sdcard -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
echo "SqLite Database Optimized"
echo "System Optimized And Boosted at $( date +"%m-%d-%Y %H:%M:%S" )"
function mountrw {
mount|grep "/system "|grep rw >/dev/null
[ $? -eq 1 ] && mount -o remount,rw $(mount|grep "/system "|awk '{ print $1 }') /system
}
function mountro {
mount|grep "/system "|grep ro >/dev/null
[ $? -eq 1 ] && mount -o remount,ro $(mount|grep "/system "|awk '{ print $1 }') /system
}
echo " Starting package optimization"
echo "Starting ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )"
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
mountrw;
echo ZipAligning $(basename $apk)
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC;
fi;
else
echo Velocity ZipAlign already completed on $apk
fi;
done;
for apk in /data/app/*.apk ; do
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk)
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC
fi;
else
echo Velocity ZipAlign already completed on $apk
fi;
done;
mountro;
echo "ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )"
Tested on Xperia S thnxx to EXBLAZE ​
credits
persanno
exblaze
kuro
Works with trinity kernel and ROM,now testing
Sent from my LT26ii using XDA Premium 4 mobile app
red-Tequila said:
Works with trinity kernel and ROM,now testing
Sent from my LT26ii using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Trinity ROM and kernel already has many tweaks applied in it.. You don't need to try any.. If u have a Stock ROM without any mods, but with some custom kernel, then try this..
sudhindrakv said:
Trinity ROM and kernel already has many tweaks applied in it.. You don't need to try any.. If u have a Stock ROM without any mods, but with some custom kernel, they try this..
Click to expand...
Click to collapse
Trinity Rom has tweaks but they are not enabled by default as in init.d does not run at boot... It never did in his previous roms either, and I don't think he is to bothered to fix it!
Sent from my LT26i using xda premium
Damoedge said:
Trinity Rom has tweaks but they are not enabled by default as in init.d does not run at boot... It never did in his previous roms either, and I don't think he is to bothered to fix it!
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
Yes. Its your choice in Aroma to select which kind of tweaks you need.. Anyway try this.. Do have a backup.. Lets not spam this thread.. There's another thread to discuss about Trinity ROM..
Damoedge said:
Trinity Rom has tweaks but they are not enabled by default as in init.d does not run at boot... It never did in his previous roms either, and I don't think he is to bothered to fix it!
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
Hi, Just like.I.said, Ive added Init.d enabler on. 3.6 via.Settings.apk
Even you install this tweak it will never work, unless you enabled some required perm. For the init.d files
Sent from my LT26ii using xda app-developers app
TrinityHaxxorX said:
Hi, Just like.I.said, Ive added Init.d enabler on. 3.6 via.Settings.apk
Even you install this tweak it will never work, unless you enabled some required perm. For the init.d files
Sent from my LT26ii using xda app-developers app
Click to expand...
Click to collapse
You are referring on your ROM or you genaralise?
If you are using stock ROM, rooted and deodexed I don't see why it shouldn't work (at least some part of it)
Sent from my LT26i using Tapatalk 4
TrinityHaxxorX said:
Even you install this tweak it will never work, unless you enabled some required perm. For the init.d files
Sent from my LT26ii using xda app-developers app
Click to expand...
Click to collapse
So you are saying that this will not work??
Sent from my LT26i using xda premium
Man I doubt about it cause I installed and notice more fluidity,however about bb..
Sent from my LT26ii using XDA Premium 4 mobile app
I still haven't tried but guys, when you try it, test firmly.
Every device will fly after restart - when you restart it - your RAM gets cleared and device will work softer and faster.
Try to see what's happening after one or two hours - don't fall on placebo effect afrer restart.
And please, don't get me wrong, I'm not saying it doesn't work, I haven't tried it yet.
I'm just saying how to test
Sent from my LT26i using Tapatalk 4
Tested. Well done. I report two bugs, some apps does not start automatically after a reboot,like Antitirus,etc. and photos won't open from Album Widget, only from the album itself.Anyway, good job, waiting for a stable version,until then, I'm back to my backup.
sure
Mr.AnakinSkywalker said:
Tested. Well done. I report two bugs, some apps does not start automatically after a reboot,like Antitirus,etc. and photos won't open from Album Widget, only from the album itself.Anyway, good job, waiting for a stable version,until then, I'm back to my backup.
Click to expand...
Click to collapse
as i dont own this device i cannot test it many times on friends mobile
need some tester/devs from this thread
BOSS said:
as i dont own this device i cannot test it many times on friends mobile
need some tester/devs from this thread
Click to expand...
Click to collapse
I understand, at least for now we know two bugs on SONY XPERIA S
Does it work on CM ? haahah newbie question but does it?
uDroid said:
Does it work on CM ? haahah newbie question but does it?
Click to expand...
Click to collapse
I dont think so
Pls read the op
Sent from my LT26i using Tapatalk 4
Rangeeshnathan said:
I dont think so
Pls read the op
Sent from my LT26i using Tapatalk 4
Click to expand...
Click to collapse
im sorry but i tested it and it works i guess.
i feel the difference.
whaiting for XPERIA Z version

[SCRIPT][BACKUP][TOOL]Preserve addon , dpi , Xposed app_process /system files

Hi,
i flash many roms and sometimes after new rom flashed , i see dpi preserved my change before flash, even some rom preserve xposed framework still activated...maybe you have experience with some other backup/restore /system files during flash, maybe have you another idea to preserve some stuff.
For my part, i make a new backuptool.sh and backuptool.functions scripts compiled with some i find over roms i tried....
We have:
save dpi
save xposed framework
save addond
i think in red are the line you can personalize, i hope you know what to do with.
backuptool.sh
Code:
#!/sbin/sh
#
# Backup and restore addon /system files
#
export C=/tmp/backup
export S=/system
[COLOR="Red"]export V=what you want[/COLOR]
persist_props="ro.sf.lcd_density"
sysroot="/system"
saveroot="/tmp/save"
# Preserve DPI
save_props()
{
rm -f "$saveroot/prop"
for prop in $persist_props; do
echo "save_props: $prop"
grep "^$prop=" "$sysroot/build.prop" >> "$saveroot/prop"
done
}
# Restore DPI
restore_props()
{
local sedargs
sedargs="-i"
for prop in $(cat $saveroot/prop); do
echo "restore_props: $prop"
k=$(echo $prop | cut -d'=' -f1)
sedargs="$sedargs s/^$k=.*/$prop/"
done
sed $sedargs "$sysroot/build.prop"
}
# Backup Xposed Framework (bin/app_process)
xposed_backup()
{
if [ -f /system/bin/app_process.orig ]
then
cp /system/bin/app_process /tmp/backup/
fi
}
# Restore Xposed Framework (bin/app_process)
xposed_restore()
{
if [ -f /tmp/backup/app_process ]
then
mv /system/bin/app_process /system/bin/app_process.orig
cp /tmp/backup/app_process /system/bin/
fi
}
# Preserve /system/addon.d in /tmp/addon.d
preserve_addon_d() {
mkdir -p /tmp/addon.d/
cp -a /system/addon.d/* /tmp/addon.d/
chmod 755 /tmp/addon.d/*.sh
}
# Restore /system/addon.d in /tmp/addon.d
restore_addon_d() {
cp -a /tmp/addon.d/* /system/addon.d/
rm -rf /tmp/addon.d/
}
[COLOR="Red"]# Proceed only if /system is the expected major and minor version
check_prereq() {
if ( ! grep -q "^ro.cm.version=$V.*" /system/build.prop ); then
echo "Not backing up files from incompatible version: $V"
return 0
fi
return 1
}[/COLOR]
check_blacklist() {
if [ -f /system/addon.d/blacklist ];then
## Discard any known bad backup scripts
cd /$1/addon.d/
for f in *sh; do
s=$(md5sum $f | awk {'print $1'})
grep -q $s /system/addon.d/blacklist && rm -f $f
done
fi
}
check_whitelist() {
found=0
if [ -f /system/addon.d/whitelist ];then
## forcefully keep any version-independent stuff
cd /$1/addon.d/
for f in *sh; do
s=$(md5sum $f | awk {'print $1'})
grep -q $s /system/addon.d/whitelist
if [ $? -eq 0 ]; then
found=1
else
rm -f $f
fi
done
fi
return $found
}
mkdir -p $saveroot
# Execute /system/addon.d/*.sh scripts with $1 parameter
run_stage() {
for script in $(find /tmp/addon.d/ -name '*.sh' |sort -n); do
$script $1
done
}
case "$1" in
backup)
save_props
mkdir -p $C
[COLOR="Red"]# if check_prereq; then[/COLOR]
if check_whitelist system; then
exit 127
fi
[COLOR="Red"]# fi[/COLOR]
check_blacklist system
xposed_backup
preserve_addon_d
run_stage pre-backup
run_stage backup
run_stage post-backup
;;
restore)
restore_props
[COLOR="Red"]# if check_prereq; then[/COLOR]
if check_whitelist tmp; then
exit 127
fi
[COLOR="Red"]# fi[/COLOR]
check_blacklist tmp
xposed_restore
run_stage pre-restore
run_stage restore
run_stage post-restore
restore_addon_d
rm -rf $C
rm -rf /data/data/android.pacstats
sync
;;
*)
echo "Usage: $0 {backup|restore}"
exit 1
esac
exit 0
backuptool.functions
Code:
#!/sbin/sh
#
# Functions for backuptool.sh
#
export C=/tmp/backup
export S=/system
export V=what you want
backup_file() {
if [ -e "$1" ]; then
local F=`basename "$1"`
local D=`dirname "$1"`
# dont backup any apps that have odex files, they are useless
if ( echo "$F" | grep -q "\.apk$" ) && [ -e `echo "$1" | sed -e 's/\.apk$/\.odex/'` ]; then
echo "Skipping odexed apk $1";
else
mkdir -p "$C/$D"
cp -p $1 "$C/$D/$F"
fi
fi
}
restore_file() {
local FILE=`basename "$1"`
local DIR=`dirname "$1"`
if [ -e "$C/$DIR/$FILE" ]; then
if [ ! -d "$DIR" ]; then
mkdir -p "$DIR";
fi
cp -p "$C/$DIR/$FILE" "$1";
if [ -n "$2" ]; then
echo "Deleting obsolete file $2"
rm "$2";
fi
fi
}
the files in attachments. just remove ".txt' at end to use them as well.
thanks.

Categories

Resources