[Q] BluetoothTest.apk, why does it keep calling home/somewhere? - Galaxy S 5 Q&A, Help & Troubleshooting

Hi,
I've recently purchased a Galaxy S5 and so far I have no complaints.
After doing the usual ritual - buying, recovery, rooting, debloating and securing, I've found one apk that doesn't want to stay frozen.
BluetoothTest - BluetoothTest.apk - (com.sec.android.app.bluetoothtest)
So far I've disabled the networkconnection to it so it goes nowhere, but it NetworkLogger keeps giving me a toast every few minutes with it saying that the app tries to connect to an external IP Address.
Below are the lines from the network log:
"2015-02-14 19:56:07.988" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "rmnet0" "10.171.*.*" "37660" "72.51.26.219" "80" "60"
"2015-02-15 23:57:50.446" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "50504" "54.72.188.206" "443" "60"
"2015-02-15 23:58:21.995" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "56023" "54.171.41.117" "443" "60"
"2015-02-15 23:58:21.996" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "56023" "54.171.41.117" "443" "60"
"2015-02-15 23:58:22.074" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "0" "54.195.255.128" "443" "60"
"2015-02-15 23:58:22.166" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "38475" "54.195.255.128" "443" "60"
"2015-02-15 00:35:28.010" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "57787" "74.125.136.100" "80" "52"
"2015-02-18 03:37:35.132" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "53935" "54.75.253.27" "443" "60"
"2015-02-18 03:37:35.135" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "53936" "54.75.253.27" "443" "60"
"2015-02-18 03:37:35.253" "BluetoothTest" "com.sec.android.app.bluetoothtest" "1000" "" "wlan0" "192.168.1.139" "53877" "85.205.33.144" "80" "60"
So does anyone know why it does it, and if it is safe to remove?

bump.
It has been 3 days..
Hard to believe that nobody knows anything about this.

Same here. The answer to this might be to analyse the data (if any) data sent by these webservers. I might look into that later
My blocked Samsung Bluetoothtest IP activity :
Application's Name: BluetoothTest
Total Packets Blocked: 145
[TCP]54.230.12.39:80(18)
[TCP]54.192.13.250:80(18)
[TCP]72.51.26.219:80(8)
[TCP]54.230.12.45:80(16)
[TCP]54.192.14.48:80(16)
[TCP]54.192.15.91:80(17)
[TCP]54.192.14.184:80(16)
[TCP]54.192.15.40:80(18)
[TCP]54.192.14.152:80(18)

Related

Universal Script for Android Phone

Create 00tweaks and put all the codes inside 00tweaks then put the file to system/etc/init.d
This universal script boost RAM performance.
This universal script mounts all partition as NOATIME
This universal script lessen lags on selected applications (MMS / Handcent / DialerOne)
This universal script enhances deadline scheduler
This universal script performs background process to check screen state
Click to expand...
Click to collapse
Code:
#!/system/bin/sh
#remounting the file systems with noatime and nodiratime flags to save battery and CPU cycles
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime,nodiratime $k
done
#if mounting is not successful then manual mounting will do the thing for you
mount -o remount,noatime,nodiratime auto /
mount -o remount,noatime,nodiratime auto /dev
mount -o remount,noatime,nodiratime auto /proc
mount -o remount,noatime,nodiratime auto /sys
mount -o remount,noatime,nodiratime auto /mnt/asec
mount -o remount,noatime,nodiratime auto /system
mount -o remount,noatime,nodiratime auto /data
mount -o remount,noatime,nodiratime auto /cache
mount -o remount,noatime,nodiratime auto /mnt/sdcard
mount -o remount,noatime,nodiratime auto /mnt/secure/asec
mount -o remount,noatime,nodiratime auto /mnt/sdcard/.android_secure
#flags every mounted partition as non rotational and increases it's cache size for more read speed
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $MTD $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "4096" > $j/queue/read_ahead_kb;
done
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
for a in $MTD $MMC
do
echo "512" > $a/queue/nr_requests;
done
#internet speed tweaks
echo 0 > /proc/sys/net/ipv4/tcp_timestamps;
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse;
echo 1 > /proc/sys/net/ipv4/tcp_sack;
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle;
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling;
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout;
echo 404480 > /proc/sys/net/core/wmem_max;
echo 404480 > /proc/sys/net/core/rmem_max;
echo 256960 > /proc/sys/net/core/rmem_default;
echo 256960 > /proc/sys/net/core/wmem_default;
echo 4096 16384 404480 > /proc/sys/net/ipv4/tcp_wmem;
echo 4096 87380 404480 > /proc/sys/net/ipv4/tcp_rmem;
#vm management tweaks
echo "0" > /proc/sys/vm/swappiness;
echo "95" > /proc/sys/vm/dirty_ratio;
echo "10" > /proc/sys/vm/vfs_cache_pressure;
echo "20480" > /proc/sys/vm/min_free_kbytes;
echo "1" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/laptop_mode;
echo "60000" > /proc/sys/vm/dirty_expire_centisecs;
echo "60" > /proc/sys/vm/dirty_background_ratio;
echo "6000" > /proc/sys/vm/dirty_writeback_centisecs;
echo "3" > /proc/sys/vm/drop_caches;
#kernel tweaks
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo 500 512000 64 2048 > /proc/sys/kernel/sem;
# use deadline scheduler
echo deadline > /sys/class/block/mmcblk0/queue/scheduler;
echo deadline > /sys/class/block/stl14/queue/scheduler;
echo deadline > /sys/class/block/stl13/queue/scheduler;
echo deadline > /sys/class/block/stl12/queue/scheduler;
echo 8 > /sys/class/block/mmcblk0/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl14/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl13/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl12/queue/iosched/fifo_batch;
echo 400 > /sys/class/block/mmcblk0/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl14/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl13/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl12/queue/iosched/read_expire;
echo 4 > /sys/class/block/mmcblk0/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl14/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl13/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl12/queue/iosched/writes_starved;
#setprop
setprop wifi.supplicant_scan_interval 600;
setprop windowsmgr.max_events_per_sec 260;
setprop ro.lge.proximity.delay 25;
setprop mot.proximity.delay 75;
setprop net.tcp.buffersize.default 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.wifi 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.umts 4096,87380,256960,4096,16384,256960;
setprop ro.HOME_APP_ADJ 1;
setprop ro.mot.eri.losalert.delay 1000;
setprop video.accelerate.hw 1;
setprop ro.ril.disable.power.collapse 0;
setprop pm.sleep_mode 1;
setprop media.stagefright.enable-player true;
#lowmemory
FOREGROUND_APP_MEM="2560";
VISIBLE_APP_MEM="4096";
SECONDARY_SERVER_MEM="6144";
HIDDEN_APP_MEM="17408";
CONTENT_PROVIDER_MEM="19456";
EMPTY_APP_MEM="23552";
#governor scaling awake
GOVERNOR_SCALE="ondemand";
GOVERNOR_FREQENCY_MAX="800000";
GOVERNOR_FREQENCY_MIN="245760";
SAMPLING_RATE="50000";
FREQ_STEP="40";
UP_THRESHOLD="90";
DOWN_THRESHOLD="20";
#governor scaling sleep
SLEEP_SCALE="ondemand";
SLEEP_FREQENCY_MAX="480000";
SLEEP_FREQENCY_MIN="245760";
XSAMPLING_RATE="100000";
XFREQ_STEP="15";
XUP_THRESHOLD="90";
XDOWN_THRESHOLD="20";
#locking app
LOCK_APP_IN_MEMORY_ENABLED="0"
LOCK_APP_SU="1"
LOCK_APP_DIALER="0"
LOCK_APP_MMS="0"
LOCK_APP_HANDCENT="0"
# =========
# remove lag when answering phone calls
# =========
MAX_PHONE()
{
pidphone=`pidof com.android.phone`;
if [ $pidphone ];
then
/system/xbin/echo "-17" > /proc/$pidphone/oom_adj;
renice -20 $pidphone;
if [ $MAX_APP -eq "1" ];
then
exit;
else
MAX_APP_STARTER;
MAX_APP=1;
exit;
fi;
else
sleep 3;
MAX_PHONE;
fi;
}
# =========
# remove lag from su (root)
# =========
MAX_SU()
{
pidsu=`pidof com.noshufou.android.su`;
if [ $pidsu ];
then
/system/xbin/echo "-17" > /proc/$pidsu/oom_adj;
renice -20 $pidsu;
exit;
else
sleep 3;
MAX_SU;
fi;
}
# =========
# remove lag from Clock
# =========
MAX_DIALER()
{
piddialer=`pidof kz.mek.DialerOne`;
if [ $piddialer ];
then
/system/xbin/echo "-17" > /proc/$piddialer/oom_adj;
renice -10 $piddialer;
exit;
else
sleep 3;
MAX_DIALER;
fi;
}
# =========
# remove lag from MMS
# =========
MAX_MMS()
{
pidmms=`pidof com.android.mms`;
if [ $pidmms ];
then
/system/xbin/echo "-17" > /proc/$pidmms/oom_adj;
renice -10 $pidmms;
exit;
else
sleep 3;
MAX_MMS;
fi;
}
# =========
# remove lag from HANDCENT
# =========
MAX_HANDCENT()
{
pidhandcent=`pidof com.handcent.nextsms`;
if [ $pidhandcent ];
then
/system/xbin/echo "-17" > /proc/$pidhandcent/oom_adj;
renice -10 $pidhandcent;
exit;
else
sleep 3;
MAX_HANDCENT;
fi;
}
# =========
# Background process to optimize process
# =========
MAX_APP_STARTER()
{
if [ $LOCK_APP_IN_MEMORY_ENABLED -eq "1" ];
then
if [ $LOCK_APP_SU -eq "1" ];
then
(while [ 1 ];
do
sleep 5;
MAX_SU;
done &);
fi;
if [ $LOCK_APP_MMS -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_MMS;
done &);
fi;
if [ $LOCK_APP_HANDCENT -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_HANDCENT;
done &);
fi;
if [ $LOCK_APP_DIALER -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_DIALER;
done &);
fi;
exit;
else
(while [ 1 ];
do
sleep 3;
MAX_APP_STARTER;
done &);
fi;
}
if [ $LOCK_APP_IN_MEMORY_ENABLED -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_PHONE;
done &);
fi;
GOV_MODE()
{
echo "1" >/proc/sys/vm/overcommit_memory;
echo "4" > /proc/sys/vm/min_free_order_shift;
echo $FOREGROUND_APP_MEM,$VISIBLE_APP_MEM,$SECONDARY_SERVER_MEM,$HIDDEN_APP_MEM,$CONTENT_PROVIDER_MEM,$EMPTY_APP_MEM > /sys/module/lowmemorykiller/parameters/minfree;
echo $GOVERNOR_SCALE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $GOVERNOR_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $GOVERNOR_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/sampling_rate;
echo $FREQ_STEP > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/freq_step;
echo $UP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/up_threshold;
echo $DOWN_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/down_threshold;
}
SLEEP_MODE()
{
echo "1" >/proc/sys/vm/overcommit_memory;
echo "4" > /proc/sys/vm/min_free_order_shift;
echo $FOREGROUND_APP_MEM,$VISIBLE_APP_MEM,$SECONDARY_SERVER_MEM,$HIDDEN_APP_MEM,$CONTENT_PROVIDER_MEM,$EMPTY_APP_MEM > /sys/module/lowmemorykiller/parameters/minfree;
echo $SLEEP_SCALE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $SLEEP_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $SLEEP_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $XSAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/sampling_rate;
echo $XFREQ_STEP > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/freq_step;
echo $XUP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/up_threshold;
echo $XDOWN_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/down_threshold;
}
# =========
# Background process to check screen state
# =========
(while [ 1 ];
do
STATE=`cat /sys/power/wait_for_fb_wake`;
GOV_MODE;
sleep 3;
STATE=`cat /sys/power/wait_for_fb_sleep`;
SLEEP_MODE;
sleep 3;
done &);
Some brief explanation for the contents of the script
1. /proc/sys/vm/laptop_mode
How many seconds after a read should a writeout of changed files start (this is based on the assumption that a read will cause an otherwise spun down disk to spin up again).
2. /proc/sys/vm/dirty_writeba​ck_centisecs
How often the kernel should check if there is "dirty" (changed) data to write out to disk (in centiseconds).
3./proc/sys/vm/dirty_expir​e_centisecs
How old "dirty" data should be before the kernel considers it old enough to be written to disk. It is in general a good idea to set this to the same value as dirty_writeback_centisecs above.
4./proc/sys/vm/dirty_ratio​
The maximum amount of memory (in percent) to be used to store dirty data before the process that generates the data will be forced to write it out. Setting this to a high value should not be a problem as writeouts will also occur if the system is low on memory.
5./proc/sys/vm/dirty_backg​round_ratio
The lower amount of memory (in percent) where a writeout of dirty data to disk is allowed to stop. This should be quite a bit lower than the above dirty_ratio to allow the kernel to write out chunks of dirty data in one go.
I thought I should return the Tweak Manager's 00tweaks script back to initramfs
let me give it a try
what if i already have 00tweaks? should i had this script to the current file or substitute?
Hey, the values are similar to CF-Root Great then, gonna try it out
What should I do if I want to try your script, but I have already used CF-Root With Tweak Manager that also using another script in 00tweaks file
Wow I just ran this on GSB 3.8 workshed for the eris. And WOW the phone rings on 1 1/2 rings with a ringtone and the screen lights up. Very nice work. I hope you don't mind but i posted a link from the eris fourms to this file. I been looking for for so long on how to get rid of the rintone LAG and WOW i think you got it! Thank you
How to create the script?
Thnx
A lil question, this wont collide with the V6 Supercharger?
Hey guys,
can somebody please tell me how to make a script of this? I really want to know, but i'm new to this.
I can't find anything on the "search".
Cheers
QNBT said:
A lil question, this wont collide with the V6 Supercharger?
Click to expand...
Click to collapse
I think something does because I am getting complete homescreen redraws since I started using this a couple days ago. The phone seems to boot way faster and seems to run a little better but I think there is a conflict somewhere.
Sgace said:
Hey guys,
can somebody please tell me how to make a script of this? I really want to know, but i'm new to this.
I can't find anything on the "search".
Cheers
Click to expand...
Click to collapse
You don't have to make a script just copy it all to a text document on your desktop and after you save it delete the .txt at the end. Then put it on your SD card and use Root Explorer, or similar, to move it the proper location. I set the ownership and permissions the same as other files in the same location and rebooted. Just be sure to tap the "R/W" button at the top of the screen if you are using Root Explorer so you have read/write permission to work in the folder.
PieceKeepr said:
You don't have to make a script just copy it all to a text document on your desktop and after you save it delete the .txt at the end. Then put it on your SD card and use Root Explorer, or similar, to move it the proper location. I set the ownership and permissions the same as other files in the same location and rebooted. Just be sure to tap the "R/W" button at the top of the screen if you are using Root Explorer so you have read/write permission to work in the folder.
Click to expand...
Click to collapse
Hey,
thnx man. Found notepad++ and made a text file with that.
Tried the script for a couple of ours and for my personal feeling it made my phone slower at multiple points. Also Quadrant standard gave me a lower score (11-13) then when i'm using 00tweaks/v4 tt.
So this goes out the door.
Cheers
I hate bringing things back from the dead, so I apologize in advance.
If I want just the atime section of this script, do I just keep the first part? Where does it stop?
AUTO
what does the auto do in the mounting script?

phone renicing script

here's a script that uses the busybox renicing commands to periodically boost the priority of various processes like the phone (to ensure that the delay in ringing is minimum ) and home screen (greater responsiveness hopefully) , you can use it in custom roms by just putting it in the init.d folder (if rom is desined to run scripts in the folder [conact your rom architect] ) .The commands have been modified for sony ericsson phones running the sony ericsson launcher , i had found an older xda forum that had an app that would periodically run scripts , to do a similar thing .
I think this method is lighter .
While this has nothing to with the oom values that the v6 supercharger expertly manages , it only increases the tasks priority .
If init.d isn't run on your rom you can use rom manager to run at boot
this is my first attempt at scripting , so am not responsible for any damages , but i would like your comments
ps wolfbreak your earlier rom had a similar thing in the build.prop file , but instead of using a fixed time it would run if the priority fell before threshold , am not sure of the exact command , so was wondering if you or anyone else could help me because that is way more elegant , i couldnt find it in your latest release though
pps you might have to rename the script to renicer.sh
enjoy
i think i set the priority of the google apps a little too high , will others tell me if they have a problem using standard apps like gmail etc
version 2
View attachment 70prioritizer.txt
this script is buggy if anybod can tell me whatswrong i will be thankful
nikhilshivpuja said:
View attachment 744284
this script is buggy if anybod can tell me whatswrong i will be thankful
Click to expand...
Click to collapse
I believe you set media process to high will be better if you set something like this
com.android.phone=-16
com.android.mms=-16
android.process.acore=-14
com.android.systemui=-15
android.process.media=5
system=-19
your launcher=-5
Code:
#!/system/bin/sh
#
# Znuff's proritizing script
#
# A list of priority as. Separate process names by spaces.
# Priority -18
PHONEAPP="com.android.phone"
# Priority -17
LAUNCHERAPP="com.sonyericsson.home com.android.systemui"
# Priority -16
DIALERAPP="android.process.acore"
# Priority -13
PRIO13="android.process.media mediaserver com.jb.gokeyboard"
# Priority -5
PRIO5="com.jb.gosms"
# Priority 10
PRIO10="com.google.process.gas com.google.android.as.uploader"
# Let's put our APK installer to a really low priority, so it doesn't slow down the whole system when it installs apps
# Priority 15
PRIO25="installd"
# Infinite loop
while [ 1 ]; do
/system/xbin/echo "Checking for -18"
# Priority -18
for a in $PHONEAPP; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice -18 $p;
if [ -d /proc/$p ]; then
# not a typo!
# -17 means that the OOM killer will _NEVER_ kill this app!
/system/xbin/echo "-17" > /proc/$p/oom_adj
fi
done
done
# Priority -17
for a in $LAUNCHERAPP; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice -17 $p;
if [ -d /proc/$p ]; then
# not a typo!
# -17 means that the OOM killer will _NEVER_ kill this app!
/system/xbin/echo "-17" > /proc/$p/oom_adj
fi
done
done
# Priority -16
for a in $DIALERAPP; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice -16 $p;
if [ -d /proc/$p ]; then
# not a typo!
# -17 means that the OOM killer will _NEVER_ kill this app!
/system/xbin/echo "-17" > /proc/$p/oom_adj
fi
done
done
# Priority -13
for a in $PRIO13; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice -13 $p;
# if [ -d /proc/$p ]; then
# /system/xbin/echo "-13" > /proc/$p/oom_adj
# fi
done
done
# Priority -5
for a in $PRIO5; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice -5 $p;
# if [ -d /proc/$p ]; then
# /system/xbin/echo "-5" > /proc/$p/oom_adj
# fi
done
done
# Priority 10
for a in $PRIO10; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice 10 $p;
# if [ -d /proc/$p ]; then
# /system/xbin/echo "10" > /proc/$p/oom_adj
# fi
done
done
# Priority 15
for a in $PRIO10; do
for p in $(pidof $a); do
# /system/xbin/echo "Renicing $a with pid $p"
/system/bin/renice 15 $p;
# if [ -d /proc/$p ]; then
# /system/xbin/echo "15" > /proc/$p/oom_adj
# fi
done
done
# sleep for 2 seconds, then repeat
sleep 5
done
Done for me for another device. Keep in mind you can't run this in a init.d script (the script needs to exit for init to continue, but if you run it in a infinite loop, it never exits!).
oom config is partly disabled, as you can see from the code

[MOD][GUIDE]tweak collections for build.prop/init.d

1 i DIDNT made this all tweaks ... Credit goes to their Developers...
I am not responsible for your bricked phone/sd if u pointed on me i will laugh at u
Forever king Tweaks....​
Build.prop tweaks​
1 VM Heapsize; higher the RAM
Code:
dalvik.vm.heapsize=48m
2 Good JPG quality
Code:
ro.media.enc.jpeg.quality=100
3 Render UI with GPU
Code:
debug.sf.hw=1
4 Best Scrolling
Code:
windowsmgr.max_events_per_sec=150
5 Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6 battery Saving
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
7 Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
8 Increase touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
9 Awesome photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
10 Network tweaks
Code:
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
11 Internet fast tweaks
Code:
net.tcp.buffersize.default=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.wifi=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.umts=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.gprs=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.edge=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.hspa=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.lte=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.hsdpa=6144,87380,1048576,6144,87380,1048576
net.tcp.buffersize.evdo_b=6144,87380,1048576,6144,87380,1048576
12 Fix some application issues (FC)
ro.kernel.android.checkjni=0
13 Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
14 Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
15 faster streaming
Code:
media.stagefright.enable-meta=true
media.stagefright.enable-record=false
16 Miscellaneous Tweaks for performance
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
17 Use Google DNS
Code:
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
Init.d tweaks​
(needs ROM with init.d access and busybox, open empty file, insert header "#!/system/bin/sh" and put these there, save in /system/etc/init.d and name it something like tweak1)
1 strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2 internet speed hack tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3 kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
4 vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
5 battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6 removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
7 increases cache size and increases speed
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8 SD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9 Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
10 Ondemand governor
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11 Governor Best: Minmax , SavagedZen , Smoothass , Smartass, Interactive
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12 Move dalvik-cache to cache partition
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
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
# bind mount dalvik-cache so we can still boot without the sdcard
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
13 Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
Other tweaks (not build.prop,init.d)​
1 v6 supercharger
Code:
http://forum.xda-developers.com/attachment.php?attachmentid=591730&d=1305000576
Credit- zeppelinrox
2 Use CyanogenMOD's APN list file (fully , for every operator)
Its in system>etc
3 Use uot kitchen for Theming your rom
Code:
http://uot.dakra.lt/
4 Never use Task killer............
please hit thanks and comment if you like this guide....if using in Rom proper credits to this guide!

[TESTING NEEDED][MODS]3.0.x - initrd.gz made on the fly. f2fs/ext4 MULTIBOOT

Was working with RobbieP on this (as I can't test on device) - essentially aroma config for 3.0.x kernel with initrd.gz made on the fly.
Initrd mods carried out include applying: data on ext, nativesd, directsd(w/ ext4 or f2fs) to nand initrd.gz.
Decided to come at this from a different direction (after managing to botch together a device to test on) - as I can't get the aroma prop files to play nice.
So lets start with the minor modifications needed by in the ROM
Updater script modifications (based on SlimKat - but should be universal'ish'):
Code:
...
...
...
###############
# Cleaning up #
###############
set_progress(0.95);
delete_recursive("/tmp/*");
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "2" then
ui_print("@ Cleaning up...");
ui_print(" Unmounting...");
unmount("/boot");
unmount("/boot_dir");
unmount("/system");
unmount("/data");
unmount("/DirectSD");
unmount("/DirectSystem");
unmount("/NativeSD");
ui_print(" Done.");
else
package_extract_file("kernel/initrd.gz[COLOR="red"](NAND initrd)[/COLOR]", "/boot_dir/initrd.gz");
package_extract_file("kernel/zImage", "/boot_dir/zImage");
endif;
set_progress(1.0);
ui_print("@ Installation Complete");
Edit. Going to need: delete_recursive("/tmp/*"); outside of the if;endif;
And also /boot_dir won't be made if using NAND/DataOnExt; will need to rework this and #2 to extract to /tmp after it's wiped.
And change every reference to an initrd.gz other than the NAND one to the NAND one (just to avoid confusion)
Which obviously requires an additional group in mods in aroma-config:
Code:
...
...
...
#-- Group 3
"Wipe","",2,
"Wipe Dalvik-Cache",
"Select it to wipe Dalvik-Cache.", 1,
"Wipe Data/Factory Reset",
"Select it to wipe data/factory reset.", 0,
"No Wipe",
"Select it to keep everything.", 0,
#-- Group 4
"Installing a second zip","",2,
"Installing a second zip",
"Select it if you are installing a second zip - NativeSD/DirectSD or gapps for example", 1,
"Not installing a second zip",
"Select it if installing to NAND only", 0
);
...
...
Additionally the set_build_prop_*.sh's should be replaced (or redirected in updater script) by the following:
Set_Build_Prop.sh
Code:
#!/sbin/sh
# Append " [$install_type] and [$ROM_NAME]" to the ROM name for HD2
# Modify /system/build.prop and append "[] hooks" to the end of the line of ro.build.display.id
# Created by hypoturtle
ROM_NAME=`cat '/tmp/aroma/ROM_NAME.prop' | sed 's/ROM_NAME=//g'`
install_type=` cat '/tmp/aroma/installtype.prop' | sed 's/selected.1=//g' `
type=(NAND DataOnExt NativeSD DirectSD)
install=${type[$install_type-1]}
output=`grep -i "^ro\.build\.display\.id.*\[${install}\]$" /system/build.prop`
if [ -z "$output" ]; then
sed -i '/ro\.build\.display\.id/s/$/ \['${ROM_NAME}'] ['${install}'\]/' /system/build.prop
fi
And modify DirectSD_mounter.sh so that if it doesn't mount p3 as ext4 it tries with f2fs
Code:
#!/sbin/sh
#
# DirectSD SD-EXT Mounter v1.0
# Author: tytung - xda-developers
if [ ! -d "/DirectSystem" ]; then
mkdir "/DirectSystem"
fi
if [ ! -d "/DirectData" ]; then
mkdir "/DirectData"
fi
if [ -f "/tmp/mount.prop" ]; then
rm "/tmp/mount.prop"
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p2 on /DirectSystem'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p2 /DirectSystem
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p3 /DirectData
fi
# Mount F2FS partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t f2fs /dev/block/mmcblk0p3 /DirectData
fi
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
# `echo $?` will return 0 if mount is executed successfully
if [ `echo $?` = 0 ]; then
echo 'status=mounted' > "/tmp/mount.prop"
#else
# redirect mount failed messages to aroma-config
fi
And that's it on this side. Now read #2
legacy:
Managed to fix the nativesd.sh - it was riddled with errors:
Code:
#!/sbin/sh
export ROM_NAME=` cat 'ROM_NAME.prop' | sed 's/ROM_NAME=//g' `
export install_type=` cat 'installtype.prop' | sed 's/selected.1=//g' `
export bootloader=` cat 'nfo.prop' | sed 's/bootloader=//g' `
cd /tmp/aroma
mkdir /tmp/aroma/work
cp initrd.gz initrd-test.gz
cd /tmp/aroma/work
# unzipping nand kernel and applying modifications
gzip -d -c ../initrd-test.gz | cpio -i -d
mkdir bin
cd ..
cp busybox work/bin/busybox
cp e2fsck work/bin/e2fsck
chmod 0777 work/bin/busybox
chmod 0777 work/bin/e2fsck
if [ "${install_type}" -gt 2 ]; then
sed -i '/[email protected]/s/^/#/' work/ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' work/init.rc
sed -i 's/auto/ext4/g' work/mountfs${install_type}.sh
fi
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs'${install_type}'.sh' work2/init.rc
cp mountfs${install_type}.sh work/mountfs${install_type}.sh
sed -i "s/rOm/$ROM_NAME/g" work/mountfs${install_type}.sh
chmod 0777 work/mountfs${install_type}.sh
chmod 0750 work/init.rc
chmod 0644 work/ueventd.htcleo.rc
fi
# making new ramdisk and copying to sd card
cd work2
find .| cpio -o -H newc | gzip -9 > ../initrd-done.gz
cd ..
if [ "${bootloader}" != "cLK" ]; then
cat initrd-done.gz >> 6MB
cp 6MB initrd6MB.gz
else
cp done2/initrd-done.gz /tmp/initrd.gz
fi
chmod 0777 initrd.gz
if [ "${install_type}" -lt 3 ]; then
cp initrd6MB.gz tmp/initrd.gz
else
cp initrd6MB.gz boot/initrd.gz
cp initrd6MB.gz boot_dir/initrd.gz
fi
# Copying tmp and open ramdisk folders to sdcard (NativeSD folder)
mkdir -p boot/tmp
Also this way if you want to add another way of booting all you need to do is create a mountfs.sh file and edit aroma-config.
aroma-config
Code:
### LICENSE:
#
# Copyright (C) 2011-2012 Ahmad Amarullah ( http://amarullz.com/ )
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
### FILE INFO:
#
# AROMA Installer from NexusHD2 tytung was modded by
# macs18max to include haret detection (hacked way) and
# clk nativesd sboot2. If using this please credit macs18max
#
###
##
# Forcing Device Pixelate Size
# defaut: floor( min( width, height ) / 160 )
#
ini_set("dp","3"); #-- HDPI ( 480x800 / WVGA )
##
# Initializing Rom Information
##
ini_set("rom_name", "ChauTien Slimroms 4.4.2");
ini_set("rom_version", "Build 4");
ini_set("rom_author", "Chau Truong Thinh");
ini_set("rom_device", "HTC HD2");
ini_set("rom_date", "APR. 01, 2014");
##
# Show Simple Splash
# splash( 2000, "slim");
##
# Set Small Font to Support all fonts
#
fontresload( "0", "ttf/Roboto-Regular.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" ); #-- Use sets of font (Font Family)
##
# Set Language & Font Family
#
loadlang("langs/en.lang");
fontresload( "0", "ttf/Roboto-Regular.ttf", "12" ); #-- "0" = Small Font
fontresload( "1", "ttf/Roboto-Regular.ttf", "18" ); #-- "1" = Big Font
###################################################################################################################
#
# STEP 1 - SELECT THEME
#
theme("ics");
###################################################################################################################
#
# STEP 2 - SHOW ROM INFORMATION
#
# Extract ROM_NAME.prop to /tmp/aroma/ROM_NAME.prop
ziptotmp("kernel/ROM_NAME.prop", "ROM_NAME.prop");
ziptotmp("kernel/initrd.gz", "initrd.gz");
ziptotmp("kernel/busybox", "busybox");
ziptotmp("kernel/e2fsck", "e2fsck");
ziptotmp("kernel/zImage", "zImage");
ziptotmp("kernel/mkbootimg", "mkbootimg");
ziptotmp("kernel/mkbootimg.sh", "mkbootimg.sh");
ziptotmp("kernel/mountfs2.sh", "mountfs2.sh");
ziptotmp("kernel/mountfs3.sh", "mountfs3.sh");
ziptotmp("kernel/mountfs4.sh", "mountfs4.sh");
ziptotmp("kernel/mountfs5.sh", "mountfs5.sh");
ziptotmp("kernel/6MB", "6MB");
zipexec("kernel/checksys.sh");
setvar("bootloader", file_getprop("/tmp/nfo.prop", "bootloader"));
viewbox(
#-- Title
"Welcome!",
#-- Text
"You are about to install the below ROM for <b>"+ini_get("rom_device")+"</b>.\n\n"+
" ROM Name\t: <b><#selectbg_g>"+ini_get("rom_name")+"</#></b>\n"+
" Version\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n"+
" Author\t: <b><#selectbg_g>"+ini_get("rom_author")+"</#></b>\n"+
" Update\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
"Bootloader\t: "+getvar("bootloader")+"\n\n"+
"System NAND\t: "+getdisksize("/system","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/system","m")+" MB\n\n"+
"Data NAND\t: "+getdisksize("/data","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/data","m")+" MB\n\n"+
"SD Card Size\t: "+getdisksize("/sdcard","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/sdcard","m")+" MB\n\n"+
" SD-EXT Size\t: "+getdisksize("/sd-ext","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/sd-ext","m")+" MB\n\n"+
"SD-EXT2 Size\t: "+getdisksize("/sd-ext2","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/sd-ext2","m")+" MB\n\n\n"+
"Press Next to Continue the Installation...",
#-- Icon
"icons/welcome"
);
###################################################################################################################
#
# STEP 3 - SHOW SELECTBOX - Install Type
#
selectbox(
#-- Title
"Install Type",
#-- Sub Title
"Please Select the install type:",
#-- Icon
"icons/apps",
#-- Will be saved in /tmp/aroma/installtype.prop
"installtype.prop",
#-- Group 1
"Install Location", "", 2, #-- Group 1. key = "selected.1"
"NAND",
"[email protected], [email protected], [email protected]\nFor T-Mobile USA HD2 (LEO 1024)", 0, #-- selected.1 = 1
"NAND with DataOnEXT",
"[email protected], [email protected], [email protected]\nFor EU/International HD2 (LEO 512)", 0, #-- selected.1 = 2
"NativeSD (Everything on the SD card)",
"[email protected], [email protected], [email protected]\nFor high speed read/write SD Card", 0, #-- selected.1 = 3
"DirectSD (Everything on the SD card)",
"[email protected], [email protected], [email protected]\nFor high speed read/write SD Card", 1, #-- selected.1 = 4
"DirectSD (Everything on the SD card)",
"[email protected], [email protected], [email protected]\nFor high speed read/write SD Card", 0 #-- selected.1 = 5
);
if (prop("installtype.prop", "selected.1") == "1" ||
prop("installtype.prop", "selected.1") == "2") then
writetmpfile("kernel.prop", "NAND=yes");
zipexec("kernel/nativesd.sh");
else
writetmpfile("kernel.prop", "NAND=no");
endif;
##############################
# Mount the SD-EXT partition #
##############################
if (prop("installtype.prop", "selected.1") == "2" ||
prop("installtype.prop", "selected.1") == "3") then
pleasewait("Mounting the SD-EXT Partition...");
zipexec("kernel/SD-EXT_mounter.sh");
setvar("mount_result", getvar("exec_buffer"));
zipexec("kernel/nativesd.sh");
if file_getprop("/tmp/mount.prop", "status") != "mounted" then
#######################
# No SD-EXT Partition #
#######################
# Set Next Text to 'Exit'
ini_set("text_next", "Exit");
textbox(
"Mounting SD-EXT failed!",
"Please create an EXT4 partition (mmcblk0p2) on the SD Card first.",
"icons/alert",
"Error messages:\n\n"+getvar("mount_result")
);
#-- Back to Menu
back("1");
endif;
endif;
if (prop("installtype.prop", "selected.1") == "4" ||
prop("installtype.prop", "selected.1") == "5") then
pleasewait("Mounting the SD-EXT Partition...");
zipexec("kernel/DirectSD_mounter.sh");
setvar("mount_result", getvar("exec_buffer"));
zipexec("kernel/nativesd.sh");
if file_getprop("/tmp/mount.prop", "status") != "mounted" then
#######################
# No SD-EXT Partition #
#######################
# Set Next Text to 'Exit'
ini_set("text_next", "Exit");
textbox(
"Mounting SD-EXT failed!",
"Please create an EXT4 partition (mmcblk0p2) on the SD Card first.",
"icons/alert",
"Error messages:\n\n"+getvar("mount_result")
);
#-- Back to Menu
back("1");
endif;
endif;
# Swap partition activation - run the check for sdcard swap partition
pleasewait("Checking SDCard for Swap Partition.");
zipexec("mods/swap-partition-activator/install/checkforswap.sh");
###################################################################################################################
#
# STEP 4 - SHOW SELECTBOX - ROM Mods
#
selectbox(
#-- Title
"ROM Mods",
#-- Sub Title
"Please Select the ROM Mods:",
#-- Icon
"icons/personalize",
#-- Will be saved in /tmp/aroma/mods.prop
"mods.prop",
#-- Group 1
"Default Connection Type","",2,
"RMNET Connection",
"Please Choose RMNET for MAGLDR bootloader.", iif((file_getprop("/tmp/nfo.prop", "bootloader") == "MAGLDR"), 1, 0),
"PPP Connection",
"All bootloaders support PPP.", iif((file_getprop("/tmp/nfo.prop", "bootloader") == "MAGLDR"), 0, 1),
# Group 2
"Activate RAM Pages Swapping","",2,
"Yes",
"You must have a pre-made swap partition on your SDcard!", iif((file_getprop("/tmp/checkforswap.prop", "swap.present") == "yes"), 1, 0),
"No",
"Swapping will be deactivated.\n\n", iif((file_getprop("/tmp/checkforswap.prop", "swap.present") == "no"), 1, 0),
#-- Group 3
"Wipe","",2,
"Wipe Dalvik-Cache",
"Select it to wipe Dalvik-Cache.", 1,
"Wipe Data/Factory Reset",
"Select it to wipe data/factory reset.", 0,
"No Wipe",
"Select it to keep everything.", 0
);
####################
# Installation Ready
####################
ini_set("text_next", "Install Now");
viewbox(
"Installation Ready",
"The wizard is ready to begin installation.\n\n"+
"Press <b>Install Now</b> to begin the installation.\n\n"+
"If you want to review or change any of your installation settings, press <b>Back</b> or Press Menu Key -> Quit Installation to exit the wizard.",
"@install"
);
#####################
# Start Install
#####################
ini_set("text_next", "Finish");
install(
"Installing",
"<b>"+ini_get("rom_name")+"</b> is being installed.\n\n"+
"Please wait while installation wizard installs <b>"+ini_get("rom_name")+
"</b>. This may take several minutes.",
"@install",
"The installation wizard has successfully installed <b>"+ini_get("rom_name")
);
# Set Next Text fo Exit
ini_set("text_next", "Exit");
viewbox(
"Installation Completed",
"<#080>Congratulation</#>\n\n"+
"Please press Exit and Reboot your HD2",
"icons/info"
);
Detailed rundown of process.
Aroma config copies all pertinent files to /aroma config.
Choices are made by user in aroma installer, specified mount script is run and nativesd.sh is executed as long as an install type is chosen.
Nativesd.sh reads the install type and bootloader and modifies the nand ramdisk accordingly, mkbootimg.sh is run if using clk.
Updater-script then runs - it has been stripped down so all it should do is the copying of all the other ROM stuff from the zip (system, sdcard, etc.), runs a script to copy initrd and zImage to /boot (if using magldr). Should theoretically be able to strip updater-script down further...
Attached is the modification for SlimKat - (all credits to ROM dev.)
kernel folder fully replaces the one in the ROM zip. META-INF and system are merged.
All essentially untested - will post the recovery needed for f2fs install in due course.
Edit. new zip - moved around a few things.
Edit. modified nativesd.sh on the assumption that the aroma folder can only be written to be aroma.
Code:
#!/bin/sh
export ROM_NAME=` cat 'ROM_NAME.prop' | sed 's/ROM_NAME=//g' `
export install_type=` cat 'installtype.prop' | sed 's/selected.1=//g' `
export bootloader=` cat 'nfo.prop' | sed 's/bootloader=//g' `
cp /tmp/aroma/zImage /tmp/zImage
mkdir -p /tmp/work/ing
cp /tmp/aroma/initrd.gz /tmp/initrd-test.gz
cd /tmp/work/ing
# unzipping nand kernel
gzip -d -c ../initrd-test.gz | cpio -i -d
mkdir bin
cd ..
cp /tmp/aroma/busybox ing/bin/busybox
cp /tmp/aroma/e2fsck ing/bin/e2fsck
chmod 0777 ing/bin/busybox
chmod 0777 ing/bin/e2fsck
# Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt 2 ]; then
sed -i '/[email protected]/s/^/#/' ing/ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' ing/init.rc
sed -i "s/rOm/$ROM_NAME/g" ing/mountfs${install_type}.sh
sed -i 's/auto/ext4/g' ing/mountfs${install_type}.sh
fi
# Checking if anything other than nand is to be installed
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs'${install_type}'.sh' ing/init.rc
cp /tmp/aroma/mountfs${install_type}.sh ing/mountfs${install_type}.sh
sed -i "s/rOm/$ROM_NAME/g" ing/mountfs${install_type}.sh
chmod 0777 ing/mountfs${install_type}.sh
chmod 0750 ing/init.rc
chmod 0644 ing/ueventd.htcleo.rc
fi
# Building new ramdisk
cd ing
find .| cpio -o -H newc | gzip -9 > ../initrd-done.gz
cd ..
# Checking bootloader
if [ "${bootloader}" != "cLK" ]; then
cp /tmp/aroma/6MB /tmp/work/6MB
cat initrd-done.gz >> 6MB
cp 6MB initrd6MB.gz
else
cp initrd-done.gz /tmp/initrd.gz
cp /tmp/aroma/mkbootimg /tmp/mkbootimg
cp /tmp/aroma/mkbootimg.sh /tmp/mkbootimg.sh
chmod 0755 /tmp/mkbootimg
chmod 0755 /tmp/mkbootimg.sh
exec /tmp/mkbootimg.sh
fi
#Checking if nand install
if [ "${install_type}" -lt 3 ]; then
cp initrd6MB.gz tmp/initrd.gz
else
cp initrd6MB.gz boot/initrd.gz
cp initrd6MB.gz boot_dir/initrd.gz
cp /tmp/zImage boot/zImage
cp /tmp/zImage boot_dir/zImage
fi
# Copying tmp and open ramdisk folders to sdcard (NativeSD folder)
mkdir -p boot/tmp
cp -r /tmp/* /boot/tmp/
Edit - f2fs arm binaries (v.1.2) I build are found here => http://ubuntuone.com/3EuJUW5lV9MMj1WJzhzFYo for those that know what to do with them. New zip added.
Attached is a zip that should do all the rest.
It needs to be flashed directly following a ROM with the modifications in #1
It makes us of /system/build.prop and /boot_dir, as well as /boot (and sboot if clk booting Native/DirectSD).
Contents of nativesd.sh if you're curious (was contemplating whether to make this (or a derivative thereof) into a binary and bundle it with a recovery):
Code:
#!/sbin/sh
## Bootloader check (copy of checksys.sh)
echo "bootloader=MAGLDR" > /tmp/nfo.prop
output=`grep -i "clk" /proc/cmdline`
if [ -n "$output" ]; then
echo "bootloader=cLK" > /tmp/nfo.prop
fi
[COLOR="Red"]###Should remove this haret stuff and treat it as if it's magldr...[/COLOR]
output=`grep -i "haret" /proc/cmdline`
if [ -n "$output" ]; then
echo "bootloader=HaRet" > /tmp/nfo.prop
fi
## Exporting variables
ROM_NAME=` cat /system/build.prop | grep ro.build.display.id | awk '{print $(NF-1)}' | sed 's/\(\[\|\]\)//g' `
type=` cat /system/build.prop | grep ro.build.display.id | awk '{print $(NF)}' | sed 's/\(\[\|\]\)//g' `
bootloader=` cat '/tmp/nfo.prop' | sed 's/bootloader=//g' `
## Ending if bootloader is haret
if $bootloader='HaRet' then
echo 'This does not currently work with HaRet (for now)'
exit 0
fi
## Changing install_type to numbered value
if $type='NAND' then
install_type='1'
fi
if $type='DataOnExt' then
install_type='2'
fi
if $type='NativeSD' then
install_type='3'
fi
if $type='DirectSD' then
install_type='4'
fi
## Copying zImage from /boot_dir if one wasn't added to zip
if [ ! -f "/tmp/zImage" ]; then
cp /boot_dir/zImage/ /tmp/zImage
fi
if [ ! -f "/tmp/zImage" ]; then
cp /boot_dir/initrd.gz/ /tmp/initrd.gz
fi
## Checking if zImage is for 3.0.x
if [ "md5sum /tmp/zImage | cut -d ' ' -f '1'" != "1cb7bcf80845f0178b99f7b9a5f80669" ]
then
rm /tmp/6MB
fi
## Setting up working directory
cp /tmp/initrd.gz /tmp/initrd-$ROM_NAME.gz
mkdir -p /tmp/work
cd /tmp/work
## Unzipping nand kernel
gzip -d -c ../initrd-$ROM_NAME.gz | cpio -i -d
mkdir bin
cp /tmp/busybox bin/busybox
cp /tmp/e2fsck bin/e2fsck
cp /tmp/mountfs-${install}.sh mountfs-${install}.sh
chmod 0777 mountfs${install}.sh
chmod 0777 bin/busybox
chmod 0777 bin/e2fsck
## Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt 2 ]; then
sed -i '/[email protected]/s/^/#/' ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${install}.sh
fi
## Checking if anything other than nand is to be installed
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs-'${install}'.sh' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${install}.sh
chmod 0750 init.rc
chmod 0644 ueventd.htcleo.rc
fi
# Building new ramdisk
find .| cpio -o -H newc | gzip -9 > ../initrd-done.gz
cd ..
# Checking bootloader
if [ "${bootloader}" != "cLK" ]; then
cat initrd-done.gz >> 6MB
cp 6MB /boot/initrd.gz
cp /tmp/zImage /boot/zImage
#Checking if nand install
if [ "${install_type}" -gt 2 ]; then
cp 6MB /boot_dir/initrd.gz
cp /tmp/zImage /boot_dir/zImage
fi
else
cp initrd-done.gz /tmp/initrd.gz
chmod 0755 /tmp/mkbootimg
chmod 0755 /tmp/mkbootimg.sh
exec /tmp/mkbootimg.sh
if [ "${install_type}" -lt 3 ]; then
flash_image boot /tmp/boot.img else
flash_image sboot /tmp/boot.img
fi
fi
cp /tmp/initrd-$ROM_NAME.gz /tmp/initrd.gz
rm -r /tmp/work/*
There are likely some issues. Feel free to report back.
A few things (more of use for devs I suppose): adding an initrd.gz or zImage into the zip will overwrite the one used by the previously installed ROM.
Also the only way I could come up for checking if the kernel is 3.0.x or not (and thus need the 6MB magldr offset) is using md5sum, obviously this means that this md5sum check will need to be changed for every kernel (I suppose unless there's isn't any other option I could make a whitelisted md5sum file for 3.0.x kernels and/or have devs post md5sums with there kernels).
As it is the zip attached should work with all 2.x kernels and the kernel with md5sum of 1cb7bcf80845f0178b99f7b9a5f80669.
(NB. Device died again before testing - could anyone post/PM the outcome of md5sum for any file i.e. 'md5sum /system/build.prop' - as I'm not sure if just the md5sum is outputted of if the filename is as well.)
For the moment this should work as is with cLK/magldr for DirectSD and NativeSD (need to fix for NAND/DataOnExt).
If you want use NAND/DataOnExt then add the NAND initrd.gz from desired ROM into the install folder of the zip.
NB NAND install on magldr will need a boot partion of 7.5MB (8 to be safe) - when the script is fixed that is.
Legacy
Updater-script
Code:
###
#
# AROMA Installer
# (C) 2011-2012 by Ahmad Amarullah
# amarullz - xda-developers
#
###
#
# AROMA Installer Script for
# (C) 2012-2013 by tytung - xda-developers (tytung @ gmail.com)
#
###
ui_print("------------------------------------------------");
ui_print(" ");
ui_print(" ");
ui_print("------------------------------------------------");
################
# NAND Install #
################
if file_getprop("/tmp/aroma/installtype.prop", "selected.1") == "1" then
ui_print("@ Installing to NAND...");
ui_print(" Mounting NAND partitions...");
format("yaffs2", "MTD", "system");
mount("yaffs2", "MTD", "system", "/system");
mount("yaffs2", "MTD", "userdata", "/data");
# Wipe Dalvik-Cache
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "1" then
delete_recursive("/data/dalvik-cache");
ui_print(" Dalvik-Cache wiped.");
endif;
# Wipe Data/Factory Reset
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "2" then
unmount("/data");
format("yaffs2", "MTD", "userdata");
mount("yaffs2", "MTD", "userdata", "/data");
delete_recursive("/sdcard/.android_secure");
ui_print(" Data wiped.");
endif;
show_progress(0.9, 1400);
ui_print(" Copying files...");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_dir("mods/nand", "/sdcard");
show_progress(0.1, 5);
endif;
#####################
# DataOnEXT Install #
#####################
if file_getprop("/tmp/aroma/installtype.prop", "selected.1") == "2" then
ui_print("@ Installing to NAND and SD-EXT...");
ui_print(" Mounting NAND and SD-EXT partitions...");
package_extract_file("kernel/mount_DataOnEXT.sh", "/tmp/mount_DataOnEXT.sh");
set_perm(0, 0, 0777, "/tmp/mount_DataOnEXT.sh");
run_program("/tmp/mount_DataOnEXT.sh");
if file_getprop("/tmp/nfo.prop", "DataOnEXT") == "true" then
format("yaffs2", "MTD", "system");
mount("yaffs2", "MTD", "system", "/system");
# Wipe Dalvik-Cache
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "1" then
delete_recursive("/data/dalvik-cache");
ui_print(" Dalvik-Cache wiped.");
endif;
# Wipe Data/Factory Reset
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "2" then
delete_recursive("/data");
delete_recursive("/sdcard/.android_secure");
ui_print(" Data wiped.");
endif;
show_progress(0.9, 1400);
ui_print(" Copying files...");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_dir("mods/data2ext", "/sdcard");
show_progress(0.1, 5);
# Append " [DataOnEXT]" to the ROM name
package_extract_file("mods/set_build_prop_DataOnEXT.sh", "/tmp/set_build_prop_DataOnEXT.sh");
set_perm(0, 0, 0777, "/tmp/set_build_prop_DataOnEXT.sh");
run_program("/tmp/set_build_prop_DataOnEXT.sh");
endif;
endif;
#####################################
# NAND MAGLDR or cLK Kernel install #
#####################################
if file_getprop("/tmp/aroma/kernel.prop", "NAND") == "yes" then
# check bootloader
package_extract_file("kernel/checksys.sh", "/tmp/checksys.sh");
set_perm(0, 0, 755, "/tmp/checksys.sh");
run_program("/tmp/checksys.sh");
if file_getprop("/tmp/nfo.prop", "bootloader") == "cLK" then
ui_print("@ cLK Bootloader found.");
ui_print(" Flashing cLK kernel...");
# not mounted but just in case :)
unmount("/boot");
assert(
package_extract_file("kernel/zImage", "/tmp/zImage"),
package_extract_file("kernel/mkbootimg", "/tmp/mkbootimg"),
package_extract_file("kernel/mkbootimg.sh", "/tmp/mkbootimg.sh"));
set_perm(0, 0, 0755, "/tmp/mkbootimg");
set_perm(0, 0, 0755, "/tmp/mkbootimg.sh");
assert(
run_program("/tmp/mkbootimg.sh"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
else
ui_print("@ MAGLDR Bootloader found.");
ui_print(" Flashing MAGLDR kernel...");
# prepare boot partition
format("yaffs2", "MTD", "boot");
mount("yaffs2", "MTD", "boot", "/boot");
package_extract_file("kernel/zImage", "/boot/zImage");
endif;
endif;
####################
# NativeSD Install #
####################
if file_getprop("/tmp/aroma/installtype.prop", "selected.1") == "3" then
ui_print("@ Installing to SD-EXT (NativeSD)...");
ui_print(" Checking & Mounting SD-EXT Partition...");
package_extract_file("kernel/mount_NativeSD.sh", "/tmp/mount_NativeSD.sh");
set_perm(0, 0, 0777, "/tmp/mount_NativeSD.sh");
run_program("/tmp/mount_NativeSD.sh");
if file_getprop("/tmp/nfo.prop", "NativeSD") == "true" then
# Wipe Dalvik-Cache
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "1" then
delete_recursive("/data/dalvik-cache");
ui_print(" Dalvik-Cache wiped.");
endif; # Wipe Dalvik-Cache
# Wipe Data/Factory Reset
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "2" then
delete_recursive("/data");
ui_print(" Data wiped.");
endif; # Wipe Data/Factory Reset
show_progress(0.9, 1400);
ui_print(" Copying files...");
package_extract_file("kernel/zImage", "/boot/zImage");
package_extract_file("kernel/zImage", "/boot_dir/zImage");
package_extract_dir("sdcard", "/sdcard");
package_extract_dir("mods/nativesd", "/sdcard");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_file("mods/app/NativeSDBoot.apk", "/system/app/NativeSDBoot.apk");
show_progress(0.1, 5);
# Append " [NativeSD]" to the ROM name
package_extract_file("mods/set_build_prop_NativeSD.sh", "/tmp/set_build_prop_NativeSD.sh");
set_perm(0, 0, 0777, "/tmp/set_build_prop_NativeSD.sh");
run_program("/tmp/set_build_prop_NativeSD.sh");
endif;
endif;
####################
# DirectSD Install #
####################
if file_getprop("/tmp/aroma/installtype.prop", "selected.1") == "4" || file_getprop("/tmp/aroma/installtype.prop", "selected.1") == "5" then
ui_print("@ Installing to SD-EXT (DirectSD)...");
ui_print(" Checking & Mounting SD-EXT Partition...");
package_extract_file("kernel/mount_DirectSD.sh", "/tmp/mount_DirectSD.sh");
set_perm(0, 0, 0777, "/tmp/mount_DirectSD.sh");
run_program("/tmp/mount_DirectSD.sh");
if file_getprop("/tmp/nfo.prop", "DirectSD") == "true" then
# Wipe Dalvik-Cache
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "1" then
delete_recursive("/data/dalvik-cache");
ui_print(" Dalvik-Cache wiped.");
endif; # Wipe Dalvik-Cache
# Wipe Data/Factory Reset
if file_getprop("/tmp/aroma/mods.prop", "selected.4") == "2" then
delete_recursive("/data");
ui_print(" Data wiped.");
endif; # Wipe Data/Factory Reset
show_progress(0.9, 1400);
ui_print(" Copying files...");
package_extract_file("kernel/zImage", "/boot/zImage");
package_extract_file("kernel/zImage", "/boot_dir/zImage");
package_extract_dir("sdcard", "/sdcard");
package_extract_dir("mods/DirectSD", "/sdcard");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_file("mods/app/DirectSDBoot.apk", "/system/app/DirectSDBoot.apk");
show_progress(0.1, 5);
# Append " [DirectSD]" to the ROM name
package_extract_file("mods/set_build_prop_DirectSD.sh", "/tmp/set_build_prop_DirectSD.sh");
set_perm(0, 0, 0777, "/tmp/set_build_prop_DirectSD.sh");
run_program("/tmp/set_build_prop_DirectSD.sh");
endif;
endif;
########################
# Connection Selection #
########################
set_progress(0.65);
if file_getprop("/tmp/aroma/mods.prop", "selected.1") == "1" then
delete("/system/ppp");
delete("/system/default.prop");
delete("/system/etc/init.d/97ppp");
ui_print("@ RMNET installed.");
endif;
if file_getprop("/tmp/aroma/mods.prop", "selected.1") == "2" then
package_extract_dir("mods/clk-ppp-patch", "/system");
ui_print("@ PPP installed.");
endif;
######################
# Softkeys Selection #
######################
ui_print("@ Setting Softkeys...");
if file_getprop("/tmp/aroma/mods.prop", "selected.2") == "1" then
package_extract_file("mods/enable_softkeys.sh", "/tmp/enable_softkeys.sh");
set_perm(0, 0, 755, "/tmp/enable_softkeys.sh");
run_program("/tmp/enable_softkeys.sh");
ui_print(" Softkeys enabled.");
endif;
if file_getprop("/tmp/aroma/mods.prop", "selected.2") == "2" then
package_extract_file("mods/disable_softkeys.sh", "/tmp/disable_softkeys.sh");
set_perm(0, 0, 755, "/tmp/disable_softkeys.sh");
run_program("/tmp/disable_softkeys.sh");
ui_print(" Softkeys disabled.");
endif;
########################
# SWAPPING Selection #
########################
if file_getprop("/tmp/aroma/mods.prop","selected.3") == "1" then
ui_print("@ Configuring Ram Pages Swapping...");
package_extract_file("mods/swap-partition-activator/install/installswap.sh", "/tmp/installswap.sh");
set_perm(0, 0, 0777, "/tmp/installswap.sh");
run_program("/tmp/installswap.sh");
if ( file_getprop("/tmp/hardswap.prop", "swap.present") == "yes" )
then
if ( file_getprop("/tmp/hardswap.prop", "swap.formatted") == "yes" ) then
ui_print(" Swap partition formatted.");
else
ui_print(" Error: Can't format existing swap partition!");
abort(" Aborting...");
endif;
else
ui_print(" Error: No swap partition found on SDcard!");
abort(" Aborting...");
endif;
# We're ready for the startup script to do ./swapon
package_extract_dir("mods/swap-partition-activator/etc", "/system/etc");
set_perm(0, 0, 0755, "/system/etc/init.d/99swap");
ui_print(" Swap-on script copied to /etc/init.d.");
endif;
if file_getprop("/tmp/aroma/mods.prop", "selected.3") == "2" then
ui_print(" Removing swap...");
delete("/system/etc/init.d/99swap");
ui_print(" Swap startup script deleted.");
endif;
###################
# Data apps check #
###################
set_progress(0.85);
package_extract_file("mods/check_data_apps.sh", "/tmp/check_data_apps.sh");
set_perm(0, 0, 0777, "/tmp/check_data_apps.sh");
run_program("/tmp/check_data_apps.sh");
################################
# ROM Symlinks and Permissions #
################################
ui_print("@ Setting symlinks and permissions...");
ui_print(" Setting symlinks...");
symlink("../xbin/su", "/system/bin/su");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
"/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
"/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
"/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
"/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
"/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
"/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
"/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fbsplash", "/system/xbin/fdisk", "/system/xbin/fgrep",
"/system/xbin/find", "/system/xbin/flash_lock",
"/system/xbin/flash_unlock", "/system/xbin/flashcp",
"/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
"/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
"/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
"/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
"/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
"/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/nbd-client", "/system/xbin/netstat", "/system/xbin/nice",
"/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/ntpd",
"/system/xbin/od", "/system/xbin/patch", "/system/xbin/pgrep",
"/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/pipe_progress",
"/system/xbin/pkill", "/system/xbin/pmap", "/system/xbin/poweroff",
"/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps",
"/system/xbin/pstree", "/system/xbin/pwd", "/system/xbin/pwdx",
"/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
"/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize",
"/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
"/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
"/system/xbin/rx", "/system/xbin/sed", "/system/xbin/seq",
"/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha3sum",
"/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
"/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
"/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
"/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
"/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
"/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
"/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
"/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
"/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
"/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
"/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
"/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
"/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
"/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
"/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
"/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
"/system/xbin/wget", "/system/xbin/which", "/system/xbin/whoami",
"/system/xbin/xargs", "/system/xbin/xz", "/system/xbin/xzcat",
"/system/xbin/yes",
"/system/xbin/zcat");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/system/bin/grep",
"/system/bin/hd", "/system/bin/id", "/system/bin/ifconfig",
"/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl",
"/system/bin/ionice", "/system/bin/kill", "/system/bin/ln",
"/system/bin/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mkswap", "/system/bin/mount",
"/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/r", "/system/bin/readlink",
"/system/bin/renice", "/system/bin/restorecon", "/system/bin/rm",
"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
"/system/bin/runcon", "/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",
"/system/bin/top", "/system/bin/touch", "/system/bin/umount",
"/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
ui_print(" Setting permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/addon.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 0, 0755, "/system/bin/ping");
set_perm(0, 2000, 0750, "/system/bin/run-as");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 0, 0644, "/system/vendor/lib/libbt-vendor.so");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/vendor/firmware/fw_bcm4329.bin", "/system/etc/firmware/fw_bcm4329.bin");
symlink("/system/vendor/firmware/fw_bcm4329_apsta.bin", "/system/etc/firmware/fw_bcm4329_apsta.bin");
set_perm_recursive(0, 1001, 0755, 0775, "/system/etc/ppp");
set_perm(0, 0, 04755, "/system/bin/pppd");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
ui_print(" Symlinks and permissions done.");
###############
# Cleaning up #
###############
set_progress(0.95);
ui_print("@ Cleaning up...");
delete("/tmp");
ui_print(" Unmounting...");
unmount("/boot");
unmount("/system");
unmount("/data");
unmount("/DirectSD");
ui_print(" Done.");
set_progress(1.0);
ui_print("@ Installation Complete");[/hide]
mountfs2.sh
Code:
#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /NativeSD
/bin/busybox mount -t auto -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
# mount the system data app dir
/bin/busybox mount --bind /NativeSD/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin[/hide]
mountfs5.sh
Code:
#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /DirectSystem
/bin/busybox mkdir -p /DirectData
/bin/busybox mount -t auto -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /DirectSystem
/bin/busybox mount -t f2fs -o noatime,nodiratime,nosuid,nodev,discard /dev/block/mmcblk0p3 /DirectData
# mount the system data app dir
/bin/busybox mount --bind /DirectSystem/rOm/system /system
/bin/busybox mount --bind /DirectData/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin
[/hide]
Great ...
HypoTurtle said:
Updater-script
Code:
###
#
# AROMA Installer
# (C) 2011-2012 by Ahmad Amarullah
# amarullz - xda-developers
#
###
#
# AROMA Installer Script for
# (C) 2012-2013 by tytung - xda-developers (tytung @ gmail.com)
#
###
ui_print("------------------------------------------------");
ui_print(" ");
ui_print(" ");
ui_print("------------------------------------------------");
am("/tmp/check_data_apps.sh");
################################
# ROM Symlinks and Permissions #
################################
ui_print("@ Setting symlinks and permissions...");
ui_print(" Setting symlinks...");
symlink("../xbin/su", "/system/bin/su");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
"/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
"/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
"/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
"/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
"/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
"/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
"/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fbsplash", "/system/xbin/fdisk", "/system/xbin/fgrep",
"/system/xbin/find", "/system/xbin/flash_lock",
"/system/xbin/flash_unlock", "/system/xbin/flashcp",
"/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
"/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
"/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
"/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
"/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
"/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/nbd-client", "/system/xbin/netstat", "/system/xbin/nice",
"/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/ntpd",
"/system/xbin/od", "/system/xbin/patch", "/system/xbin/pgrep",
"/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/pipe_progress",
"/system/xbin/pkill", "/system/xbin/pmap", "/system/xbin/poweroff",
"/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps",
"/system/xbin/pstree", "/system/xbin/pwd", "/system/xbin/pwdx",
"/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
"/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize",
"/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
"/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
"/system/xbin/rx", "/system/xbin/sed", "/system/xbin/seq",
"/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha3sum",
"/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
"/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
"/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
"/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
"/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
"/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
"/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
"/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
"/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
"/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
"/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
"/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
"/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
"/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
"/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
"/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
"/system/xbin/wget", "/system/xbin/which", "/system/xbin/whoami",
"/system/xbin/xargs", "/system/xbin/xz", "/system/xbin/xzcat",
"/system/xbin/yes",
"/system/xbin/zcat");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/system/bin/grep",
"/system/bin/hd", "/system/bin/id", "/system/bin/ifconfig",
"/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl",
"/system/bin/ionice", "/system/bin/kill", "/system/bin/ln",
"/system/bin/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mkswap", "/system/bin/mount",
"/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/r", "/system/bin/readlink",
"/system/bin/renice", "/system/bin/restorecon", "/system/bin/rm",
"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
"/system/bin/runcon", "/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",
"/system/bin/top", "/system/bin/touch", "/system/bin/umount",
"/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
ui_print(" Setting permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/addon.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 0, 0755, "/system/bin/ping");
set_perm(0, 2000, 0750, "/system/bin/run-as");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 0, 0644, "/system/vendor/lib/libbt-vendor.so");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/vendor/firmware/fw_bcm4329.bin", "/system/etc/firmware/fw_bcm4329.bin");
symlink("/system/vendor/firmware/fw_bcm4329_apsta.bin", "/system/etc/firmware/fw_bcm4329_apsta.bin");
set_perm_recursive(0, 1001, 0755, 0775, "/system/etc/ppp");
set_perm(0, 0, 04755, "/system/bin/pppd");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
ui_print(" Symlinks and permissions done.");
###############
# Cleaning up #
###############
set_progress(0.95);
ui_print("@ Cleaning up...");
delete("/tmp");
ui_print(" Unmounting...");
unmount("/boot");
unmount("/system");
unmount("/data");
unmount("/DirectSD");
ui_print(" Done.");
set_progress(1.0);
ui_print("@ Installation Complete");[/hide]
mountfs2.sh
Code:
#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /NativeSD
/bin/busybox mount -t auto -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
# mount the system data app dir
/bin/busybox mount --bind /NativeSD/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin[/hide]
mountfs5.sh
Code:
#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /DirectSystem
/bin/busybox mkdir -p /DirectData
/bin/busybox mount -t auto -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /DirectSystem
/bin/busybox mount -t f2fs -o noatime,nodiratime,nosuid,nodev,discard /dev/block/mmcblk0p3 /DirectData
# mount the system data app dir
/bin/busybox mount --bind /DirectSystem/rOm/system /system
/bin/busybox mount --bind /DirectData/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin
[/hide]
Click to expand...
Click to collapse
HypoTurtle said:
Was working with RobbieP on this (as I can't test on device) - essentially aroma config for 3.0.x kernel with initrd.gz made on the fly.
Initrd mods carried out include applying: data on ext, nativesd, directsd(w/ ext4 or f2fs) to nand initrd.gz.
ROM_NAME applied from ROM_NAME.prop
6MB offset applied if bootloader is magldr
Managed to fix the nativesd.sh - it was riddled with errors:
Code:
#!/bin/sh
export ROM_NAME=` cat 'ROM_NAME.prop' | sed 's/ROM_NAME=//g' `
export install_type=` cat 'installtype.prop' | sed 's/selected.1=//g' `
export bootloader=` cat 'nfo.prop' | sed 's/bootloader=//g' `
cd /tmp/aroma
mkdir /tmp/aroma/work
cp initrd.gz initrd-test.gz
cd /tmp/aroma/work
# unzipping nand kernel and applying modifications
gzip -d -c ../initrd-test.gz | cpio -i -d
mkdir bin
cd ..
cp busybox work/bin/busybox
cp e2fsck work/bin/e2fsck
chmod 0777 work/bin/busybox
chmod 0777 work/bin/e2fsck
if [ "${install_type}" -gt 2 ]; then
sed -i '/[email protected]/s/^/#/' work/ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' work/init.rc
sed -i "s/rOm/$ROM_NAME/g" work/mountfs${install_type}.sh
sed -i 's/auto/ext4/g' work/mountfs${install_type}.sh
fi
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs'${install_type}'.sh' work2/init.rc
cp mountfs${install_type}.sh work/mountfs${install_type}.sh
chmod 0777 work/mountfs${install_type}.sh
chmod 0750 work/init.rc
chmod 0644 work/ueventd.htcleo.rc
fi
# making new ramdisk and copying to sd card
cd work2
find .| cpio -o -H newc | gzip -9 > ../initrd-done.gz
cd ..
if [ "${bootloader}" != "cLK" ]; then
cat initrd-done.gz >> 6MB
cp 6MB initrd6MB.gz
else
cp done2/initrd-done.gz /tmp/initrd.gz
fi
chmod 0777 initrd.gz
if [ "${install_type}" -lt 3 ]; then
cp initrd6MB.gz tmp/initrd.gz
else
cp initrd6MB.gz boot/initrd.gz
cp initrd6MB.gz boot_dir/initrd.gz
fi
# Copying tmp and open ramdisk folders to sdcard (NativeSD folder)
mkdir -p boot/tmp
Also this way if you want to add another way of booting all you need to do is create a mountfs.sh file and edit aroma-config.
aroma-config
Code:
### LICENSE:
#
# Copyright (C) 2011-2012 Ahmad Amarullah ( http://amarullz.com/ )
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
### FILE INFO:
#
# AROMA Installer from was modded by
# macs18max to include haret detection (hacked way) and
# clk nativesd sboot2. If using this please credit macs18max
#
###
##
# Forcing Device Pixelate Size
# defaut: floor( min( width, height ) / 160 )
#
ini_set("dp","3"); #-- HDPI ( 480x800 / WVGA )
##
# Initializing Rom Information
##
ini_set("rom_name", "");
ini_set("rom_version", "");
ini_set("rom_author", "");
ini_set("rom_device", "");
ini_set("rom_date", "");
##
# Show Simple Splash
# splash( 2000, "slim");
##
# Set Small Font to Support all fonts
#
fontresload( "0", "ttf/Roboto-Regular.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" ); #-- Use sets of font (Font Family)
##
# Set Language & Font Family
#
loadlang("langs/en.lang");
fontresload( "0", "ttf/Roboto-Regular.ttf", "12" ); #-- "0" = Small Font
fontresload( "1", "ttf/Roboto-Regular.ttf", "18" ); #-- "1" = Big Font
###################################################################################################################
#
# STEP 1 - SELECT THEME
#
theme("ics");
###################################################################################################################
#
# STEP 2 - SHOW ROM INFORMATION
#
# Extract ROM_NAME.prop to /tmp/aroma/ROM_NAME.prop
ziptotmp("kernel/ROM_NAME.prop", "ROM_NAME.prop");
ziptotmp("kernel/initrd.gz", "initrd.gz");
ziptotmp("kernel/busybox", "busybox");
ziptotmp("kernel/e2fsck", "e2fsck");
ziptotmp("kernel/mountfs2.sh", "mountfs2.sh");
ziptotmp("kernel/mountfs3.sh", "mountfs3.sh");
ziptotmp("kernel/mountfs4.sh", "mountfs4.sh");
ziptotmp("kernel/mountfs5.sh", "mountfs5.sh");
# [B]ADD NEW MOUNTFS HERE[/B]
ziptotmp("kernel/6MB", "6MB");
zipexec("kernel/checksys.sh");
setvar("bootloader", file_getprop("/tmp/nfo.prop", "bootloader"));
viewbox(
#-- Title
"Welcome!",
#-- Text
"You are about to install the below ROM for <b>"+ini_get("rom_device")+"</b>.\n\n"+
" ROM Name\t: <b><#selectbg_g>"+ini_get("rom_name")+"</#></b>\n"+
" Version\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n"+
" Author\t: <b><#selectbg_g>"+ini_get("rom_author")+"</#></b>\n"+
" Update\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
"Bootloader\t: "+getvar("bootloader")+"\n\n"+
"System NAND\t: "+getdisksize("/system","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/system","m")+" MB\n\n"+
"Data NAND\t: "+getdisksize("/data","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/data","m")+" MB\n\n"+
"SD Card Size\t: "+getdisksize("/sdcard","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/sdcard","m")+" MB\n\n"+
" SD-EXT Size\t: "+getdisksize("/sd-ext","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/sd-ext","m")+" MB\n\n"+
"SD-EXT2 Size\t: "+getdisksize("/sd-ext2","m")+" MB\n"+
"\t Free\t: "+ getdiskfree("/sd-ext2","m")+" MB\n\n\n"+
"Press Next to Continue the Installation...",
#-- Icon
"icons/welcome"
);
###################################################################################################################
#
# STEP 3 - SHOW SELECTBOX - Install Type
#
selectbox(
#-- Title
"Install Type",
#-- Sub Title
"Please Select the install type:",
#-- Icon
"icons/apps",
#-- Will be saved in /tmp/aroma/installtype.prop
"installtype.prop",
#-- Group 1
"Install Location", "", 2, #-- Group 1. key = "selected.1"
"NAND",
"[email protected], [email protected], [email protected]\nFor T-Mobile USA HD2 (LEO 1024)", 0, #-- selected.1 = 1
"NAND with DataOnEXT",
"[email protected], [email protected], [email protected]\nFor EU/International HD2 (LEO 512)", 0, #-- selected.1 = 2
"NativeSD (Everything on the SD card)",
"[email protected], [email protected], [email protected]\nFor high speed read/write SD Card", 0, #-- selected.1 = 3
"DirectSD (Everything on the SD card)",
"[email protected], [email protected], [email protected]\nFor high speed read/write SD Card", 1 #-- selected.1 = 4
"DirectSD (Everything on the SD card)",
"[email protected], [email protected], [email protected]\nFor high speed read/write SD Card", 1 #-- selected.1 = 5
# [B]ADD NEW MOUNTFS DETAILS HERE[/B]
);
if (prop("installtype.prop", "selected.1") == "1" || prop("installtype.prop", "selected.1") == "2") then
writetmpfile("kernel.prop", "NAND=yes");
else
writetmpfile("kernel.prop", "NAND=no");
endif;
##############################
# Mount the SD-EXT partition #
##############################
if (prop("installtype.prop", "selected.1") == "2" ||
prop("installtype.prop", "selected.1") == "3") then
pleasewait("Mounting the SD-EXT Partition...");
zipexec("kernel/SD-EXT_mounter.sh");
setvar("mount_result", getvar("exec_buffer"));
if file_getprop("/tmp/mount.prop", "status") != "mounted" then
#######################
# No SD-EXT Partition #
#######################
# Set Next Text to 'Exit'
ini_set("text_next", "Exit");
textbox(
"Mounting SD-EXT failed!",
"Please create an EXT4 partition (mmcblk0p2) on the SD Card first.",
"icons/alert",
"Error messages:\n\n"+getvar("mount_result")
);
#-- Back to Menu
back("1");
endif;
endif;
if prop("installtype.prop", "selected.1") == "4" ||
prop("installtype.prop", "selected.1") == "5" then
pleasewait("Mounting the SD-EXT Partition...");
zipexec("kernel/DirectSD_mounter.sh");
setvar("mount_result", getvar("exec_buffer"));
if file_getprop("/tmp/mount.prop", "status") != "mounted" then
#######################
# No SD-EXT Partition #
#######################
# Set Next Text to 'Exit'
ini_set("text_next", "Exit");
textbox(
"Mounting SD-EXT failed!",
"Please create an EXT4 partition (mmcblk0p2) on the SD Card first.",
"icons/alert",
"Error messages:\n\n"+getvar("mount_result")
);
#-- Back to Menu
back("1");
endif;
endif;
if prop("installtype.prop", "selected.1") != ""
zipexec("kernel/nativesd.sh");
endif;
# Swap partition activation - run the check for sdcard swap partition
pleasewait("Checking SDCard for Swap Partition.");
zipexec("mods/swap-partition-activator/install/checkforswap.sh");
###################################################################################################################
#
# STEP 4 - SHOW SELECTBOX - ROM Mods
#
selectbox(
#-- Title
"ROM Mods",
#-- Sub Title
"Please Select the ROM Mods:",
#-- Icon
"icons/personalize",
#-- Will be saved in /tmp/aroma/mods.prop
"mods.prop",
#-- Group 1
"Default Connection Type","",2,
"RMNET Connection",
"Please Choose RMNET for MAGLDR bootloader.", iif((file_getprop("/tmp/nfo.prop", "bootloader") == "MAGLDR"), 1, 0),
"PPP Connection",
"All bootloaders support PPP.", iif((file_getprop("/tmp/nfo.prop", "bootloader") == "MAGLDR"), 0, 1),
#-- Group 2
"Softkeys (Navbar)","",2,
"Enable softkeys",
"Select it to enable softkeys.", 1,
"Disable softkeys",
"Select it to disable softkeys.", 0,
#-- Group 3
"Activate RAM Pages Swapping","",2,
"Yes",
"You must have a pre-made swap partition on your SDcard!", iif((file_getprop("/tmp/checkforswap.prop", "swap.present") == "yes"), 1, 0),
"No",
"Swapping will be deactivated.\n\n", iif((file_getprop("/tmp/checkforswap.prop", "swap.present") == "no"), 1, 0),
#-- Group 4
"Wipe","",2,
"Wipe Dalvik-Cache",
"Select it to wipe Dalvik-Cache.", 1,
"Wipe Data/Factory Reset",
"Select it to wipe data/factory reset.", 0,
"No Wipe",
"Select it to keep everything.", 0
);
####################
# Installation Ready
####################
ini_set("text_next", "Install Now");
viewbox(
"Installation Ready",
"The wizard is ready to begin installation.\n\n"+
"Press <b>Install Now</b> to begin the installation.\n\n"+
"If you want to review or change any of your installation settings, press <b>Back</b> or Press Menu Key -> Quit Installation to exit the wizard.",
"@install"
);
#####################
# Start Install
#####################
ini_set("text_next", "Finish");
install(
"Installing",
"<b>"+ini_get("rom_name")+"</b> is being installed.\n\n"+
"Please wait while installation wizard installs <b>"+ini_get("rom_name")+
"</b>. This may take several minutes.",
"@install",
"The installation wizard has successfully installed <b>"+ini_get("rom_name")
);
# Set Next Text fo Exit
ini_set("text_next", "Exit");
viewbox(
"Installation Completed",
"<#080>Congratulation</#>\n\n"+
"Please press Exit and Reboot your HD2",
"icons/info"
);
Click to expand...
Click to collapse
Really Great ... Thanks Man ... Just Works Perfect ... Can I use some of your Ideas for M7 development ? ... Thanks In Advance ...
With Best Wishes
Hitman1376​
hitman1376 said:
Really Great ... Thanks Man ... Just Works Perfect ... Can I use some of your Ideas for M7 development ? ... Thanks In Advance ...
With Best Wishes
Hitman1376​
Click to expand...
Click to collapse
Feel free.
What works exactly - all I know is that aroma-config runs without reporting an error and that nativesd.sh runs properly in ubuntu.
I'll post the whole bundle patch that RobbieP has been trying, so anyone can try it an report any errors.
The bundle includes:
TWRP recovery (with f2fs enabled by kokotas)
walter79's 3.0.x-pmem-marc1706 kernel with f2fs patches added
modified updater-script and aroma config
nativesd and mountfs files.
If i choose DirectSDwith/dataonext4 or DirectSDwith/dataonF2FS, i get the screen saying "Mounting SD-EXT failed-please create an EXT4 partition (mmcblk0p2) on the SD Card first"
Also the ROM_NAME.prop wrongly says "ROM_NAME=ChauTien_CM11_V1", it should be "ROM_NAME=ChauTien-Slimroms-Build4", beware if you are testing not to overwrite that ROM if you already have it installed.
F2FS works good on our HD2 from earlier tests. The kernel doesn't seem to like my uhs1 card. Have attached a couple of androbench tests on fat32 and f2fs partitions. Also some speed tests below.
MB/s Write Read
FAT32 6.1 10.18
6.37 10.47
6.26 9.47
EXT4 2.48 9.00
2.39 10.28
2.10 9.32
F2FS 6.01 10.84
4.75 9.30
6.34 7.27
This is on an 8Gb sandisk class4 (i think, the number has worn away)
I hope people can take a look at the scripts HypoTurtle has posted, to see any mistakes. I don't think any or all of the ziptotmps at the start of aroma-config are working since /tmp folder does not show them in recovery terminal after running aroma.
Robbie P said:
If i choose DirectSDwith/dataonext4 or DirectSDwith/dataonF2FS, i get the screen saying "Mounting SD-EXT failed-please create an EXT4 partition (mmcblk0p2) on the SD Card first"
Also the ROM_NAME.prop wrongly says "ROM_NAME=ChauTien_CM11_V1", it should be "ROM_NAME=ChauTien-Slimroms-Build4", beware if you are testing not to overwrite that ROM if you already have it installed.
F2FS works good on our HD2 from earlier tests. The kernel doesn't seem to like my uhs1 card. Have attached a couple of androbench tests on fat32 and f2fs partitions. Also some speed tests below.
MB/s Write Read
FAT32 6.1 10.18
6.37 10.47
6.26 9.47
EXT4 2.48 9.00
2.39 10.28
2.10 9.32
F2FS 6.01 10.84
4.75 9.30
6.34 7.27
This is on an 8Gb sandisk class4 (i think, the number has worn away)
I hope people can take a look at the scripts HypoTurtle has posted, to see any mistakes. I don't think any or all of the ziptotmps at the start of aroma-config are working since /tmp folder does not show them in recovery terminal after running aroma.
Click to expand...
Click to collapse
Thanks, RobbieP that pretty much sums up where we are.
Can you post the f2fs recovery that you are using (just in case I post the wrong one); also can you post the result of 'cat /tmp/mount.prop'
That's my bad with ROM_NAME, was working with CM11 and SlimKK, the wrong ROM_NAME.prop slipped in there. Other than overwritting ChauTien_CM11_V1 (if this thing actually ran), the ROM should still run fine as this ROM_NAME is called everywhere it needs to be i.e during install and with mountfs.sh scripts.
Reupping with a rom_name.prop for slimkat
Okay issue seems to be that the mounter scripts either aren't called properly or simply don't run...
From - aroma-config for DataOnExt and NativeSD
Code:
if (prop("installtype.prop", "selected.1") == "2" ||
prop("installtype.prop", "selected.1") == "3") then
pleasewait("Mounting the SD-EXT Partition...");
zipexec("kernel/SD-EXT_mounter.sh");
setvar("mount_result", getvar("exec_buffer"));
zipexec("kernel/nativesd.sh");
if file_getprop("/tmp/mount.prop", "status") != "mounted" then
#######################
# No SD-EXT Partition #
#######################
# Set Next Text to 'Exit'
ini_set("text_next", "Exit");
textbox(
"Mounting SD-EXT failed!",
"Please create an EXT4 partition (mmcblk0p2) on the SD Card first.",
"icons/alert",
"Error messages:\n\n"+getvar("mount_result")
);
#-- Back to Menu
back("1");
endif;
endif;
SD-EXT_mounter.sh is called
[code#!/sbin/sh
#
# NativeSD SD-EXT Mounter v1.0
# Author: tytung - xda-developers
if [ ! -d "/NativeSD" ]; then
mkdir "/NativeSD"
fi
if [ -f "/tmp/mount.prop" ]; then
rm "/tmp/mount.prop"
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p2 on /NativeSD'`
if [ "$mounted" = "" ]; then
#mount -t ext4 /dev/block/mmcblk0p2 /NativeSD
mount -t auto /dev/block/mmcblk0p2 /NativeSD
fi
# `echo $?` will return 0 if mount is executed successfully
if [ `echo $?` = 0 ]; then
echo 'status=mounted' > "/tmp/mount.prop"
#else
# redirect mount failed messages to aroma-config
fi
exit 0][/code]
If DirectSD is selected DirectSD_mounter.sh is run
Code:
if (prop("installtype.prop", "selected.1") == "4" ||
prop("installtype.prop", "selected.1") == "5") then
pleasewait("Mounting the SD-EXT Partition...");
zipexec("kernel/DirectSD_mounter.sh");
setvar("mount_result", getvar("exec_buffer"));
zipexec("kernel/nativesd.sh");
if file_getprop("/tmp/mount.prop", "status") != "mounted" then
#######################
# No SD-EXT Partition #
#######################
# Set Next Text to 'Exit'
ini_set("text_next", "Exit");
textbox(
"Mounting SD-EXT failed!",
"Please create an EXT4 partition (mmcblk0p2) on the SD Card first.",
"icons/alert",
"Error messages:\n\n"+getvar("mount_result")
);
#-- Back to Menu
back("1");
endif;
endif;
DirectSD_mounter.sh
Code:
#!/sbin/sh
#
# DirectSD SD-EXT Mounter v1.0
# Author: tytung - xda-developers
if [ ! -d "/DirectSystem" ]; then
mkdir "/DirectSystem"
fi
if [ ! -d "/DirectData" ]; then
mkdir "/DirectData"
fi
if [ -f "/tmp/mount.prop" ]; then
rm "/tmp/mount.prop"
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p2 on /DirectSystem'`
if [ "$mounted" = "" ]; then
mount -t auto /dev/block/mmcblk0p2 /DirectSystem
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t auto /dev/block/mmcblk0p3 /DirectData
fi
# `echo $?` will return 0 if mount is executed successfully
if [ `echo $?` = 0 ]; then
echo 'status=mounted' > "/tmp/mount.prop"
#else
# redirect mount failed messages to aroma-config
fi
exit 0
Something in the above seems to be acting up.
For reference the exec_buffer variable is blank...
I just tried NativeSD install, no errors were reported, but the files were not installed. it did say that installation was successful, and the "save log" button appeared, so i saved it.
Code:
AROMA INSTALLER version 2.56
(c) 2012 by amarullz xda-developers
ROM Name : ChauTien Slimroms 4.4.2
ROM Version : Build 4
ROM Author : Chau Truong Thinh
Device : HTC HD2
Start at : Mon Jan 27 20:28:18 2014
line 13 col 1: syntax error, unexpected BAD, expecting IF or STRING or '!' or '('
1 parse errors
Installer Error (Status 6)
End at : Mon Jan 27 20:28:18 2014
I can't find which file has BAD in line 13 col 1
Unless it is a notepad++ file extension problem
In updater-script - line 138:
Code:
package_extract_file("kernel/cpboot.sh", "/tmp/cpboot.sh");
set_perm(0, 0, 755, "/tmp/cpboot.sh");
run_program("/tmp/cpboot.sh"[B])[/B]);
seems to be an extra ) , can you also add the tmp folder to see that everything else is working as it should.
did that at 138, still get the no-files-installed "successful" nativeSD installation
https://www.dropbox.com/s/pzlsv4h8a6exwec/tmp (3).zip
have attached install log, looks the same.
Edit; here is /tmp for choosing directSD, 2xEXT4 partitions https://www.dropbox.com/s/cjw6l4a4gwr7fsp/tmp6.zip
Edit2; here is /tmp for choosing directSD, 2xEXT4 partitions after reformatting both ext4 partitions using minitool AND 4ext sd recovery (Xylograph mod) then installing using same recovery. Same result "Mounting SD-EXT failed!....." https://www.dropbox.com/s/w7azkyey8fcape6/tmp7.zip
HypoTurtle said:
Thanks, RobbieP that pretty much sums up where we are.
Can you post the f2fs recovery that you are using..
Click to expand...
Click to collapse
Enormous thanks to @kokotas for compiling SD version of 2.7.0.0 twrp with f2fs support. kokotas does not own a HD2 anymore, but has done this over and above the huge contributions already made for our HD2, very much appreciated:good:
I have been using this for the past couple of weeks. There are some issues with the 3.0 kernel which it uses, such as not powering off fully (need to press reset button), but we need the 3.0 kernel to use f2fs. Please post any other bugs you may find.
To make a f2fs partition, it is necessary to format the third partition to eg FAT32 first. Then using recovery's terminal emulator;
(select the / folder)
type "mkfs.f2fs /dev/block/mmcblk0p3" (without the "", space before first / and it is a zero before p3)
Have attached original from kokotas, and one with 6mb zeros added to initrd.gz for magldr users, HypoTurtle tweaked the initrd.gz in the magldr version iirc.
Note that since it is a 3.0 kernel, it won't boot using HaRET. Untested on cLK.
Huge thanks again to kokotas and HypoTurtle, even though they no longer own HD2s, they are still willing to support it. RESPECT
Thanks also to marc1706, securecrt, walter79, gilbert32, tytung and others i might have missed.
I do hope we can get these scripts working, Devs will be able to release a rom with the nand initrd.gz and aroma will do all the rest, sounds great.:fingers-crossed:
Robbie P said:
Enormous thanks to @kokotas for compiling SD version of 2.7.0.0 twrp with f2fs support. kokotas does not own a HD2 anymore, but has done this over and above the huge contributions already made for our HD2, very much appreciated:good:
I have been using this for the past couple of weeks. There are some issues with the 3.0 kernel which it uses, such as not powering off fully (need to press reset button), but we need the 3.0 kernel to use f2fs. Please post any other bugs you may find.
To make a f2fs partition, it is necessary to format the third partition to eg FAT32 first. Then using recovery's terminal emulator;
(select the / folder)
type "mkfs.f2fs /dev/block/mmcblk0p3" (without the "", space before first / and it is a zero before p3)
Have attached original from kokotas, and one with 6mb zeros added to initrd.gz for magldr users, HypoTurtle tweaked the initrd.gz in the magldr version iirc.
Note that since it is a 3.0 kernel, it won't boot using HaRET. Untested on cLK.
Huge thanks again to kokotas and HypoTurtle, even though they no longer own HD2s, they are still willing to support it. RESPECT
Thanks also to marc1706, securecrt, walter79, gilbert32, tytung and others i might have missed.
I do hope we can get these scripts working, Devs will be able to release a rom with the nand initrd.gz and aroma will do all the rest, sounds great.:fingers-crossed:
Click to expand...
Click to collapse
Not sure that I did anything kernel/initrd wise for the kernel other than apply the f2fs patches and compile. (not sure if I used securecrt or walter79's git for the kernel so credits to them)
I'm actually thinking that with a little tweaking I should be able to reduce the updater-script down to just copying over the system files, which should make the whole system easily adaptable for all devices (unless I'm barking completely up the wrong tree)
HypoTurtle said:
Not sure that I did anything kernel/initrd wise for the kernel other than apply the f2fs patches and compile. (not sure if I used securecrt or walter79's git for the kernel so credits to them)
I'm actually thinking that with a little tweaking I should be able to reduce the updater-script down to just copying over the system files, which should make the whole system easily adaptable for all devices (unless I'm barking completely up the wrong tree)
Click to expand...
Click to collapse
Better that than
New procedure on #1 and #2.
Will post a new zip tomorrow with a 3.0.x kernel that can run f2fs.
HypoTurtle said:
And modify DirectSD_mounter.sh so that if it doesn't mount p3 as ext4 it tries with f2fs
Code:
#!/sbin/sh
#
# DirectSD SD-EXT Mounter v1.0
# Author: tytung - xda-developers
if [ ! -d "/DirectSystem" ]; then
mkdir "/DirectSystem"
fi
if [ ! -d "/DirectData" ]; then
mkdir "/DirectData"
fi
if [ -f "/tmp/mount.prop" ]; then
rm "/tmp/mount.prop"
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p2 on /DirectSystem'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p2 /DirectSystem
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p3 /DirectData
fi
# Mount F2FS partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t f2fs /dev/block/mmcblk0p3 /DirectData
fi
# `echo $?` will return 0 if mount is executed successfully
if [ `echo $?` = 0 ]; then
echo 'status=mounted' > "/tmp/mount.prop"
#else
# redirect mount failed messages to aroma-config
fi
exit 0
And that's it on this side. Now read #2
Click to expand...
Click to collapse
looking at that code, if p3 was f2fs, then the first mount attempt would be with type ext4, which would give an "invalid argument" error (since is f2fs), it would then mount to f2fs. But the error should show up with echo $?, so status would not be =mounted.
would it be better to leave as -t auto? I know it works when installing, can't remember if it works from initrd.gz.
Robbie P said:
looking at that code, if p3 was f2fs, then the first mount attempt would be with type ext4, which would give an "invalid argument" error (since is f2fs), it would then mount to f2fs. But the error should show up with echo $?, so status would not be =mounted.
would it be better to leave as -t auto? I know it works when installing, can't remember if it works from initrd.gz.
Click to expand...
Click to collapse
Was compiling a unified script (combining the nativesd stuff along with the mounter scripts etc.) and noticed that - I think that adding another
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'` just before the $? check would solve it. $? is just the last issued command - I have checked and that would work fine.
I am hazarding a guess that one of the reasons things weren't working earlier was the use of auto (feel free to tell me otherwise - while in aroma installing any rom try and mount p3 as auto and see what it reports (checking with mount and df)), one of the other things I slipped up on (due to testing on linux) was that I was using #!bin/sh in places where I should have been using #sbin/sh.
Also of note I have forgotten a few -'s in the zip on #2 ; will reup with new stuff tomorrow.
In recovery i did;
mkdir /sdcard/f2fs
mount -t auto /dev/block/mmcblk0p3 /sdcard/f2fs
i get
mount
...
/dev/block/mmcblk0p3 on /sdcard/f2fs type f2fs (rw,relatime,background_gc_on,active_logs=6)
df
...
/dev/block/mmcblk0p3 1k-blocks 1670144 used 182804 available 1465836 11% /sdcard/f2fs
Looking at;
## Copying zImage from /boot_dir if one wasn't added to zip
if [ ! -f "/tmp/zImage" ]; then
cp /boot_dir/zImage/ /tmp/zImage
fi
if [ ! -f "/tmp/zImage" ]; then
cp /boot_dir/initrd.gz/ /tmp/initrd.gz
fi
Click to expand...
Click to collapse
The second one should be initrd.gz, and if (NativeSD or) DirectSD install then it won't find either in boot-dir, should look in /sdcard/NativeSD folder (but it won't be nand initrd.gz since is already edited for *SD install), needs to save to same as well.
I tried the patch zip with the s-edits and swapping initrd.gz for zImage as above and including nand ramdisk in zip with directSD install, and it seems to run too quick for unpacking & repacking ramdisk. It is done almost immediately. recovery log not saved for some reason.
Robbie P said:
In recovery i did;
mkdir /sdcard/f2fs
mount -t auto /dev/block/mmcblk0p3 /sdcard/f2fs
i get
mount
...
/dev/block/mmcblk0p3 on /sdcard/f2fs type f2fs (rw,relatime,background_gc_on,active_logs=6)
df
...
/dev/block/mmcblk0p3 1k-blocks 1670144 used 182804 available 1465836 11% /sdcard/f2fs
Looking at;
The second one should be initrd.gz, and if (NativeSD or) DirectSD install then it won't find either in boot-dir, should look in /sdcard/NativeSD folder (but it won't be nand initrd.gz since is already edited for *SD install), needs to save to same as well.
I tried the patch zip with the s-edits and swapping initrd.gz for zImage as above and including nand ramdisk in zip with directSD install, and it seems to run too quick for unpacking & repacking ramdisk. It is done almost immediately. recovery log not saved for some reason.
Click to expand...
Click to collapse
Good catch with the typo... the patch installs will be very fast, it would be unnoticable. Will go back to using auto then (at least with the mounter).
A few things I think you misunderstood - the patch zip (#2) is to be run directly after a modified rom zip that 1 has ROM_NAME and install-type added to build.prop and that things aren't unmounted. /boot_dir is where the /sdcard/NativeSD/$ROM_NAME folder is mounted to. (will need to recheck: /sdcard/NativeSD is /boot and /sdcard/NativeSD/$ROM_NAME is /boot_dir or vice versa)
Thus the second zip needs/uses ROM_NAME and desired install type from /system/build.prop (as described above) and we need /boot and /boot_dir to remain mounted as they were by the ROM_zip itself. (This also sorts some potential issue where the ROM_NAME defined in initrd.gz is different from the name of the folder in NativeSD folder).
Easiest way to check if it's working as it should is having an adb shell running during install ... running mount after running the ROM.zip to check what is still mounted, and after running the patcher zip check the work folder to see if things run properly (busybox added to bin, mountfs-$install_type.sh added etc.)
Here is the combined scripts I was working on (1st draft).
Code:
#!/sbin/sh
## Bootloader check (copy of checksys.sh)
echo "bootloader=MAGLDR" > /tmp/nfo.prop
output=`grep -i "clk" /proc/cmdline`
if [ -n "$output" ]; then
echo "bootloader=cLK" > /tmp/nfo.prop
fi
install_type=` cat '/tmp/aroma/installtype.prop' | sed 's/selected.1=//g' `
type=(NAND DataOnExt NativeSD DirectSD)
install=${type[$install_type-1]}
ROM_NAME=`cat '/tmp/aroma/ROM_NAME.prop' | sed 's/ROM_NAME=//g'`
if [ -f "/tmp/mount.prop" ]; then
rm "/tmp/mount.prop"
fi
if [ ${install} = 'NativeSD' || ${type} = 'DataOnExt' ]; then
if [ ! -d "/NativeSD" ]; then
mkdir "/NativeSD"
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p2 on /NativeSD'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p2 /NativeSD
fi
# `echo $?` will return 0 if mount is executed successfully
if [ `echo $?` = 0 ]; then
echo 'status=mounted' > "/tmp/mount.prop"
#else
# redirect mount failed messages to aroma-config
fi
### mount_NativeSD
STATUS=`cat '/tmp/mount.prop' | sed 's/status=//g'`
if [ "$STATUS" = "mounted" ]; then
if [ ${install} = 'NativeSD' ]; then
mkdir -p /NativeSD/$ROM_NAME/system
mkdir -p /NativeSD/$ROM_NAME/data
mount --bind /NativeSD/$ROM_NAME/system /system
mount --bind /NativeSD/$ROM_NAME/data /data
mkdir -p /sdcard/NativeSD/$ROM_NAME
mkdir -p /boot
mkdir -p /boot_dir
mount --bind /sdcard/NativeSD/$ROM_NAME /boot
mount --bind /sdcard/NativeSD /boot_dir
# delete the old system
rm -rf /system/*
echo "NativeSD=true" >> /tmp/nfo.prop
else
mkdir -p /NativeSD/$ROM_NAME/data
mount --bind /NativeSD/$ROM_NAME/data /data
echo "DataOnEXT=true" >> /tmp/nfo.prop
fi
else
# no SD-EXT partition found
echo "NativeSD=false" >> /tmp/nfo.prop
fi
fi
if [ ${install} = 'DirectSD' ]; then
if [ ! -d "/DirectSystem" ]; then
mkdir "/DirectSystem"
fi
if [ ! -d "/DirectData" ]; then
mkdir "/DirectData"
fi
# Mount the SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p2 on /DirectSystem'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p2 /DirectSystem
fi
# Mount the second SD-EXT partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t ext4 /dev/block/mmcblk0p3 /DirectData
fi
# Mount F2FS partition
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ "$mounted" = "" ]; then
mount -t f2fs /dev/block/mmcblk0p3 /DirectData
fi
# `echo $?` will return 0 if mount is executed successfully
mounted=`mount | grep '/dev/block/mmcblk0p3 on /DirectData'`
if [ `echo $?` = 0 ]; then
echo 'status=mounted' > "/tmp/mount.prop"
#else
# redirect mount failed messages to aroma-config
fi
##mount_DirectSD.sh
STATUS=`cat '/tmp/mount.prop' | sed 's/status=//g'`
if [ "$STATUS" = "mounted" ]; then
mkdir -p /DirectSystem/$ROM_NAME/system
mkdir -p /DirectData/$ROM_NAME/data
mount --bind /DirectSystem/$ROM_NAME/system /system
mount --bind /DirectData/$ROM_NAME/data /data
mkdir -p /sdcard/NativeSD/$ROM_NAME
mkdir -p /boot
mkdir -p /boot_dir
mount --bind /sdcard/NativeSD/$ROM_NAME /boot
mount --bind /sdcard/NativeSD /boot_dir
echo "DirectSD=true" >> /tmp/nfo.prop
else
# no SD-EXT partition found
echo "DirectSD=false" >> /tmp/nfo.prop
fi
fi
# Changing install_type to numbered value
if $install='NAND'; then
install_type='1'
fi
if $install='DataOnExt'; then
install_type='2'
fi
if $install='NativeSD'; then
install_type='3'
fi
if $install='DirectSD'; then
install_type='4'
fi
DataOnExtmount="#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /NativeSD
/bin/busybox mount -t auto -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
# mount the system data app dir
/bin/busybox mount --bind /NativeSD/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin
"
NativeSDmount="#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /NativeSD
/bin/busybox mount -t auto -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
# mount the system data app dir
/bin/busybox mount --bind /NativeSD/rOm/system /system
/bin/busybox mount --bind /NativeSD/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin
"
direct=`mount | grep mmcblk0p3 | grep ext4`
if [ -n "$direct" ]; then
DirectSDmount="#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /DirectSystem
/bin/busybox mkdir -p /DirectData
/bin/busybox mount -t ext4 -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /DirectSystem
/bin/busybox mount -t ext4 -o noatime,nodiratime,nosuid,nodev,discard /dev/block/mmcblk0p3 /DirectData
# mount the system data app dir
/bin/busybox mount --bind /DirectSystem/rOm/system /system
/bin/busybox mount --bind /DirectData/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin
"
else
DirectSDmount="#!/bin/busybox sh
# wait for 2nd partition ready
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
# check the ext4 fs
/bin/e2fsck -p /dev/block/mmcblk0p2 > /e2fsck.log
# mount the 1st (NativeSD) SD-EXT partition
/bin/busybox mkdir -p /DirectSystem
/bin/busybox mkdir -p /DirectData
/bin/busybox mount -t ext4 -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /DirectSystem
/bin/busybox mount -t f2fs -o noatime,nodiratime,nosuid,nodev,discard /dev/block/mmcblk0p3 /DirectData
# mount the system data app dir
/bin/busybox mount --bind /DirectSystem/rOm/system /system
/bin/busybox mount --bind /DirectData/rOm/data /data
# cleanup
# delete /bin to free ram
/bin/busybox rm -rf /bin
"
fi
## Setting up working directory
cp /tmp/initrd.gz /tmp/initrd-$ROM_NAME.gz
mkdir -p /tmp/work
cd /tmp/work
## Unzipping nand kernel
gzip -d -c ../initrd-$ROM_NAME.gz | cpio -i -d
mkdir bin
cp /tmp/busybox bin/busybox
cp /tmp/e2fsck bin/e2fsck
cat ${type}mount > mountfs-${type}.sh
cp /tmp/mountfs-${install}.sh mountfs-${install}.sh
chmod 0777 mountfs-${install}.sh
chmod 0777 bin/busybox
chmod 0777 bin/e2fsck
## Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt 2 ]; then
sed -i '/[email protected]/s/^/#/' ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${install}.sh
fi
## Checking if anything other than nand is to be installed
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs-'${install}'.sh' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${install}.sh
chmod 0750 init.rc
chmod 0644 ueventd.htcleo.rc
fi
# Building new ramdisk
find .| cpio -o -H newc | gzip -9 > ../initrd-done.gz
cd ..
# Checking bootloader
if [ "${bootloader}" != "cLK" ]; then
cat initrd-done.gz >> 6MB
cp 6MB /boot/initrd.gz
cp /tmp/zImage /boot/zImage
#Checking if nand install
if [ "${install_type}" -gt 2 ]; then
cp 6MB /boot_dir/initrd.gz
cp /tmp/zImage /boot_dir/zImage
fi
else
cp initrd-done.gz /tmp/initrd.gz
chmod 0755 /tmp/mkbootimg
chmod 0755 /tmp/mkbootimg.sh
exec /tmp/mkbootimg.sh
if [ "${install_type}" -lt 3 ]; then
flash_image boot /tmp/boot.img else
flash_image sboot /tmp/boot.img
fi
fi
cp /tmp/initrd-$ROM_NAME.gz /tmp/initrd.gz
yeah i misunderstood earlier
i did the edits in post#1 to chautien cyanogen v2 including changing to auto
it seemed to install to f2fs p3 ok
then flashed #2 with edits from earlier. it booted ok but p3 /data did not show up.
So i put f2fs kernel in NativeSD and added 6mb to initrd.gz manually, booted but still no /data.
Will try to put f2fs kernel in #2 and also try putting nand ramdisk in there after.
Would checking the size of the kernel be a good indication of whether it is a 3.0.x kernel? afaik 3.0 ones are >3mb and 2.6.x are <3mb
Robbie P said:
yeah i misunderstood earlier
i did the edits in post#1 to chautien cyanogen v2 including changing to auto
it seemed to install to f2fs p3 ok
then flashed #2 with edits from earlier. it booted ok but p3 /data did not show up.
So i put f2fs kernel in NativeSD and added 6mb to initrd.gz manually, booted but still no /data.
Will try to put f2fs kernel in #2 and also try putting nand ramdisk in there after.
Would checking the size of the kernel be a good indication of whether it is a 3.0.x kernel? afaik 3.0 ones are >3mb and 2.6.x are <3mb
Click to expand...
Click to collapse
Regarding 3.0.x kernel if you see the way I tried to add the check for 3.0.x kernel which wouldn''t work as is (needs cut -d ' ' -f '1'); if the check isn't passed then the 6MB file is removed meaning that later on when initrd-done is cat'ed >> 6MB it makes a new file called 6MB rather than adding on to the end of a preexisting one (that's the theory anyway).
For now I would just remove the md5sum lines from it. For the kernel change using #2 I need to add the lines for copying the modules across (system folder in zip copied to /system).
Are you sure it booted without /data not being mounted at all with direct p3 is mounted to /DirectData and /DirectData/$ROM_NAME/data is mounted as /data. Just to check that it is the ramdisk built by the patcher that is running just check the root directory / and see if there is a mountfs-DirectSD.sh file - there should be. If there is check it and see if rOm has been changed (although if system is mounted I can't see why data's wouldn't have).
Also I noticed a few errors (using $type instead of $install and some -'s for some of the mountfs references) in the last script posted, not sure if I pulled those errors across from the zip posted on 2 will check tomorrow.
Just taking a glance at the long script posted and /boot_dir is /sdcard/NativeSD and /boot is the ROM folder which makes sense. Not sure if using /boot is better or worse as /boot isn't a folder for clk users (afaik); need a workaround for clk anyway (I think) and need to bundle in unmkbootimg stuff.

[Script]Kernel Auditor

Hello, i'm using the Sabermod Rom from @beeeto, how ever the settings and script that i would like to share will work for all ROMs/Kernels with the latest Intelliplug and Settings (such as the Spirit Kernel).
The goal is to have a snap on performance when the screen is on.... and a very deep sleep when it is off.
I did the setup with Kernel Adiutor, how ever i did not find it to always apply on boot. So in the end i made a script to be sure that it always run on boot.
Programs that you will need:
Kernel Adiutor: https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
SManager: https://play.google.com/store/apps/details?id=os.tools.scriptmanager
With the free edition of SManager, make a new script on it (it say new program) then set it to gain SU permisions and to apply on every boot on the script edit window at the program.
Then click to edit the script and put the follow code:
Code:
#!/system/bin/sh
chmod "644" /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod "644" /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chmod "644" /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
chmod "644" /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo "msm-adreno-tz" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor
sysctl -w net.ipv4.tcp_congestion_control=reno
stop mpdecision
stop mpdecision
stop mpdecision
echo "1" > /sys/module/intelli_plug/parameters/intelli_plug_active
echo "3" > /sys/module/intelli_plug/parameters/nr_run_profile_sel
echo "3" > /sys/module/intelli_plug/parameters/nr_run_profile_sel
echo "4" > /sys/module/intelli_plug/parameters/nr_run_hysteresis
echo "4" > /sys/module/intelli_plug/parameters/nr_run_hysteresis
echo "550000000" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
echo "192" > sys/module/intelli_plug/parameters/cpu_nr_run_threshold
echo "192" > sys/module/intelli_plug/parameters/cpu_nr_run_threshold
chmod "644" /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod "644" /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod "644" /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod "644" /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "1190400" > /sys/module/cpu_boost/parameters/input_boost_freq
echo "1190400" > /sys/module/cpu_boost/parameters/input_boost_freq
echo "10" > /sys/module/cpu_boost/parameters/input_boost_ms
echo "10" > /sys/module/cpu_boost/parameters/input_boost_ms
echo "10" > /sys/module/cpu_boost/parameters/boost_ms
echo "10" > /sys/module/cpu_boost/parameters/boost_ms
echo "1" > /sys/devices/system/cpu/sched_mc_power_savings
echo "msm-adreno-tz" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor
echo "550000000" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
echo "1" > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_active
echo "8000" > /sys/module/simple_gpu_algorithm/parameters/simple_ramp_threshold
echo "2" > /sys/module/simple_gpu_algorithm/parameters/simple_laziness
echo "9472,13824,19968,44544,58368,65536" > /sys/module/lowmemorykiller/parameters/minfree
echo "512" > /sys/block/mmcblk0/queue/read_ahead_kb
echo "256" > /sys/block/mmcblk1/queue/read_ahead_kb
sysctl "-w" net.ipv4.tcp_congestion_control=reno
echo "1" > /sys/kernel/mm/ksm/run
echo "0" > /sys/kernel/mm/ksm/deferred_timer
echo "35" > /sys/kernel/mm/ksm/sleep_millisecs
swapoff "/dev/block/zram0/" > dev/null 2>&1
echo "1" /sys/block/zram0/reset
echo "178257920" > sys/block/zram0/disksize
mkswap "/dev/block/zram0/" > dev/null 2>&1
swapon "/dev/block/zram0/" > dev/null 2>&1
echo "0" > sys/kernel/power_suspend/power_suspend_mode
echo "2" > /sys/module/simple_gpu_algorithm/parameters/simple_laziness
echo "1" > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_active
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "2" > /sys/module/simple_gpu_algorithm/parameters/simple_laziness
echo "1" > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_active
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "1190400" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "67" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo "60 787000:70 998000:75 1094000:80 1190400:55" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo "20000 1094000:40000 1190400:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "1000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "1" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo "-1" > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo "45000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "0" > /sys/devices/system/cpu/cpufreq/interactive/boost
echo "1036800" > /sys/devices/system/cpu/cpufreq/interactive/sync_freq
echo "50" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
echo "787000" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
On Kernel Auditor the settings should be the following after run the script:
CPU:
Code:
CPU Maximum Frequency: 1190MHz
CPU Governor: Interactive
CPU Minimum Frequency: 300MHz
Multcore Power Saving: Enable
CPUBOOST=
Interval: 10ms
Input Interval: 10ms
Sync Threshold: 300MHz
Input Boost Frequency 1190MHz
CPU Hotplug:
Code:
MP Decision: OFF
IntelliPlug=
IntelliPLug: ON
Touch Boost: ON
Threshold Value: 192
Profile: Eco Performance
Hysteresis Value: 4
CPU Maximum Screen Off Frequency: 300MHz.
GPU:
Code:
GPU Maximum Frequency: 550MHz
GPU Governor: msm-adreno-tz
Simple GPU Algorithm=
Simple GPU Algorithm: On
Ramp Threshold: 8
Laziness: 2
I/O Scheduler:
Code:
Internal Storage=
Scheduler: row
Read-adead: 512kb
External Storage=
Scheduler: rol
Read-Ahead: 256kb
Kernel Samepage Merging
Code:
Enable KSM: On
Deferred timer: Off
Sleep between scans: 35ms
Pages to Scan: 100
Low Memory Killer:
Code:
Foreground Applications: 37MB
Visible Applications: 54MB
Secondary Server: 78MB
Hidden Applications: 174MB
Contend Providers: 228MB
Empty Applications: 256MB
Virtual Memory:
Code:
Disksize: 130MB
Misc Controls:
Code:
TCP Congestion Algorithm: reno
Vibration Strenght: 32%
Power Suspend Mode: AutoSleep
UPDATE:
Some settings to tune the Interactive governor:
Code:
Already on main script:
echo "1190400" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "67" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo "60 787000:70 998000:75 1094000:80 1190400:55" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo "20000 1094000:40000 1190400:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "1000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "1" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo "-1" > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo "45000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "0" > /sys/devices/system/cpu/cpufreq/interactive/boost
echo "1036800" > /sys/devices/system/cpu/cpufreq/interactive/sync_freq
echo "50" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
echo "787000" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
Code:
CPU -> CPU Overnor Tunables:
above_highspeed_delay: 20000 1094000:40000 1190400:20000
boost: 0
boostpulse: 1
boostpulse_duration: 550000
go_hispeed_load: 67
hispeed_freq: 1190400
io_is_busy: 1
min_sample_time: 100
sampling_down_factor: 550000
sync_freq: 1036800
target_loads: 60 787000:70 998000:75 1094000:80 1190400:55
timer_rate: 45000
timer_slack: -1
up_threshold_any_cpu_load: 50
up_threshold_any_cpu_freq: 787000
That's it, i would like a feedback on how this settings work for you guys and what would you guys change.
Just a small note, the app's name is actually Kernel Adiutor, not Auditor.
hmm which part of code is for deep sleep? im interested only with this can make separated part of only deepsleep part?
leoetlino said:
Just a small note, the app's name is actually Kernel Adiutor, not Auditor.
Click to expand...
Click to collapse
Nice catch, fixing
plantator said:
hmm which part of code is for deep sleep? im interested only with this can make separated part of only deepsleep part?
Click to expand...
Click to collapse
Well it is hard to pinpoint what part exact will help (only) on deep sleep but i'll try
echo "1" > /sys/devices/system/cpu/sched_mc_power_savings
echo "0" > sys/kernel/power_suspend/power_suspend_mode
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold (if kernel support)
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold (if kernel support)
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold (only use if kernel don't support 192000 frequency)
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold (only use if kernel don't support 192000 frequency)
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
cpu_nr_run_threshold
Hi,
Could you explain to me a little bit this parameter?: echo "192" > sys/module/intelli_plug/parameters/cpu_nr_run_threshold
What does the 192 mean?, What happens if I tweak that number higher-lower?
Thanks
I'm having some issues with your script, I hope I'm not doing it wrong : I'm getting "file not found" exceptions on pretty much every line of the script, which is weird... Any idea ?
From what I know if ksm is on, camera is not working
demolatorul said:
From what I know if ksm is on, camera is not working
Click to expand...
Click to collapse
Same issue here. To get it working again I had to turn off KSM then reboot.

Categories

Resources