Meizu M5s unlocking bootloader - Upgrading, Modifying and Unlocking

Hello there I got a trouble with Meizu, I have finally overwrite FRP with 0x01 flag but it seems that is not the end. Here is my batch:
Code:
#!/system/bin/sh
set -e
# check if busybox installed
BUSYBOX=/system/xbin/strings
alias dd='busybox dd'
FRP=$(getprop ro.frp.pst)
FRPSIZE=$(wc -c $(getprop ro.frp.pst | awk '{print $1}') | awk '{print $1}')
if [ -z "$FRP" ] || [ -z "$FRPSIZE"] ; then
echo "FRP not found, or FRP length is invalid"
exit 1
fi
echo "backup original FRP patririon $FRP"
echo "IMPORTANT !!!!!"
echo "store this backup to PC *before* oem unlock via fastboot"
if ! dd if="$FRP" of=/mnt/sdcard/frp.img 2> /dev/null ; then
echo "Cannot make backup, exit"
fi
echo "prepare new FRP file"
cp /mnt/sdcard/frp.img /mnt/sdcard/frp_tmp.img
# extract old digest
dd if=/mnt/sdcard/frp.img of=/mnt/sdcard/digest.img bs=1 count=32 2> /dev/null
# replace digest with 32 zero bytes
for i in $(seq 0 31) ; do echo -e '\x00' | dd of=/mnt/sdcard/frp_tmp.img bs=1 count=1 seek=$i conv=notrunc 2> /dev/null ; done
DIGEST=$(sha256sum /mnt/sdcard/frp_tmp.img | awk '{print $1}')
echo "Locked digest is $DIGEST"
# set unlock flag in FRP
echo -ne '\x01' | dd of=/mnt/sdcard/frp_tmp.img bs=1 count=1 seek=$((FRPSIZE - 1)) conv=notrunc 2> /dev/null
# re-calculate digest
DIGEST=$(sha256sum /mnt/sdcard/frp_tmp.img | awk '{print $1}')
echo "Unlocked digest is $DIGEST"
TMPFILE=$(mktemp -p /sdcard XXXXXXXX)
for i in $(seq 1 2 64) ; do
echo -n "\x""$(echo $DIGEST | cut -c $(expr $i - 0)-$(expr $i + 1))" >> "$TMPFILE"
echo "\x""$(echo $DIGEST | cut -c $(expr $i - 0)-$(expr $i + 1))"
done
# place unlocked digest back to FRP
dd if="$TMPFILE" of="/mnt/sdcard/frp_tmp.img" bs=1 count=32 conv=notrunc 2> /dev/null
rm -f "$TMPFILE"
# flash unlocked FRP back
if ! dd if=/mnt/sdcard/frp_tmp.img of="$FRP" ; then
echo "FRP is read-only"
echo "Unlock failed"
exit 1
fi
echo "Done. FRP is unlocked"
echo "Now you can reboot bootloader"
echo "Then run 'fasboot oem unlock'"
I've modified the code from M2, because expr substr was not supported on M5s.
Things I have done until now:
-> Install Flyme 6.2.0.0G to get root
-> Finally rooted
-> Installed BusyBox
-> adb shell, su, sh /mnt/sdcard/unlock_bootloader.sh (modified code in link above)
-> reboot bootloader, fastboot oem unlock
Failed
I wanna flash system with my custom system.img but I can't. Also remember, Meizu M5s have no OEM Unlocking in Dev Options.
Anyone has tried to flash it?
Thanks in adive

MeizuNoob said:
Hello there I got a trouble with Meizu, I have finally overwrite FRP with 0x01 flag but it seems that is not the end. Here is my batch:
Code:
#!/system/bin/sh
set -e
# check if busybox installed
BUSYBOX=/system/xbin/strings
alias dd='busybox dd'
FRP=$(getprop ro.frp.pst)
FRPSIZE=$(wc -c $(getprop ro.frp.pst | awk '{print $1}') | awk '{print $1}')
if [ -z "$FRP" ] || [ -z "$FRPSIZE"] ; then
echo "FRP not found, or FRP length is invalid"
exit 1
fi
echo "backup original FRP patririon $FRP"
echo "IMPORTANT !!!!!"
echo "store this backup to PC *before* oem unlock via fastboot"
if ! dd if="$FRP" of=/mnt/sdcard/frp.img 2> /dev/null ; then
echo "Cannot make backup, exit"
fi
echo "prepare new FRP file"
cp /mnt/sdcard/frp.img /mnt/sdcard/frp_tmp.img
# extract old digest
dd if=/mnt/sdcard/frp.img of=/mnt/sdcard/digest.img bs=1 count=32 2> /dev/null
# replace digest with 32 zero bytes
for i in $(seq 0 31) ; do echo -e '\x00' | dd of=/mnt/sdcard/frp_tmp.img bs=1 count=1 seek=$i conv=notrunc 2> /dev/null ; done
DIGEST=$(sha256sum /mnt/sdcard/frp_tmp.img | awk '{print $1}')
echo "Locked digest is $DIGEST"
# set unlock flag in FRP
echo -ne '\x01' | dd of=/mnt/sdcard/frp_tmp.img bs=1 count=1 seek=$((FRPSIZE - 1)) conv=notrunc 2> /dev/null
# re-calculate digest
DIGEST=$(sha256sum /mnt/sdcard/frp_tmp.img | awk '{print $1}')
echo "Unlocked digest is $DIGEST"
TMPFILE=$(mktemp -p /sdcard XXXXXXXX)
for i in $(seq 1 2 64) ; do
echo -n "\x""$(echo $DIGEST | cut -c $(expr $i - 0)-$(expr $i + 1))" >> "$TMPFILE"
echo "\x""$(echo $DIGEST | cut -c $(expr $i - 0)-$(expr $i + 1))"
done
# place unlocked digest back to FRP
dd if="$TMPFILE" of="/mnt/sdcard/frp_tmp.img" bs=1 count=32 conv=notrunc 2> /dev/null
rm -f "$TMPFILE"
# flash unlocked FRP back
if ! dd if=/mnt/sdcard/frp_tmp.img of="$FRP" ; then
echo "FRP is read-only"
echo "Unlock failed"
exit 1
fi
echo "Done. FRP is unlocked"
echo "Now you can reboot bootloader"
echo "Then run 'fasboot oem unlock'"
I've modified the code from M2, because expr substr was not supported on M5s.
Things I have done until now:
-> Install Flyme 6.2.0.0G to get root
-> Finally rooted
-> Installed BusyBox
-> adb shell, su, sh /mnt/sdcard/unlock_bootloader.sh (modified code in link above)
-> reboot bootloader, fastboot oem unlock
Failed
I wanna flash system with my custom system.img but I can't. Also remember, Meizu M5s have no OEM Unlocking in Dev Options.
Anyone has tried to flash it?
Thanks in adive
Click to expand...
Click to collapse
How did you install 6.2.0.0G on meizu m5c if it does not exist?

MeizuNoob said:
Hello there I got a trouble with Meizu, I have finally overwrite FRP with 0x01 flag but it seems that is not the end. Here is my batch:
Code:
#!/system/bin/sh
set -e
# check if busybox installed
BUSYBOX=/system/xbin/strings
alias dd='busybox dd'
FRP=$(getprop ro.frp.pst)
FRPSIZE=$(wc -c $(getprop ro.frp.pst | awk '{print $1}') | awk '{print $1}')
if [ -z "$FRP" ] || [ -z "$FRPSIZE"] ; then
echo "FRP not found, or FRP length is invalid"
exit 1
fi
echo "backup original FRP patririon $FRP"
echo "IMPORTANT !!!!!"
echo "store this backup to PC *before* oem unlock via fastboot"
if ! dd if="$FRP" of=/mnt/sdcard/frp.img 2> /dev/null ; then
echo "Cannot make backup, exit"
fi
echo "prepare new FRP file"
cp /mnt/sdcard/frp.img /mnt/sdcard/frp_tmp.img
# extract old digest
dd if=/mnt/sdcard/frp.img of=/mnt/sdcard/digest.img bs=1 count=32 2> /dev/null
# replace digest with 32 zero bytes
for i in $(seq 0 31) ; do echo -e '\x00' | dd of=/mnt/sdcard/frp_tmp.img bs=1 count=1 seek=$i conv=notrunc 2> /dev/null ; done
DIGEST=$(sha256sum /mnt/sdcard/frp_tmp.img | awk '{print $1}')
echo "Locked digest is $DIGEST"
# set unlock flag in FRP
echo -ne '\x01' | dd of=/mnt/sdcard/frp_tmp.img bs=1 count=1 seek=$((FRPSIZE - 1)) conv=notrunc 2> /dev/null
# re-calculate digest
DIGEST=$(sha256sum /mnt/sdcard/frp_tmp.img | awk '{print $1}')
echo "Unlocked digest is $DIGEST"
TMPFILE=$(mktemp -p /sdcard XXXXXXXX)
for i in $(seq 1 2 64) ; do
echo -n "\x""$(echo $DIGEST | cut -c $(expr $i - 0)-$(expr $i + 1))" >> "$TMPFILE"
echo "\x""$(echo $DIGEST | cut -c $(expr $i - 0)-$(expr $i + 1))"
done
# place unlocked digest back to FRP
dd if="$TMPFILE" of="/mnt/sdcard/frp_tmp.img" bs=1 count=32 conv=notrunc 2> /dev/null
rm -f "$TMPFILE"
# flash unlocked FRP back
if ! dd if=/mnt/sdcard/frp_tmp.img of="$FRP" ; then
echo "FRP is read-only"
echo "Unlock failed"
exit 1
fi
echo "Done. FRP is unlocked"
echo "Now you can reboot bootloader"
echo "Then run 'fasboot oem unlock'"
I've modified the code from M2, because expr substr was not supported on M5s.
Things I have done until now:
-> Install Flyme 6.2.0.0G to get root
-> Finally rooted
-> Installed BusyBox
-> adb shell, su, sh /mnt/sdcard/unlock_bootloader.sh (modified code in link above)
-> reboot bootloader, fastboot oem unlock
Failed
I wanna flash system with my custom system.img but I can't. Also remember, Meizu M5s have no OEM Unlocking in Dev Options.
Anyone has tried to flash it?
Thanks in adive
Click to expand...
Click to collapse
Do you have unlocked m5s? I have a fake version 6.2.0.3G and I want to replace it, smartphone is very hot during use and battery drain in a short time.. Please help me

I have m5c not m5s

Please close, i've bricked this phone, couldnt remove lock

Related

A2SD APPS2SD 40a2sd init startup script editing

i am trying to change the init script for APP2SD by [email protected] (cyanogen). it is the standard script for all custom roms.
i want move dalvik cache back to phone memory and app, app-private and data to system/sd. data/data/ is normally moved back to phone memory by the script if someone moves it to system/sd/ due to "compatibility" reasons.
i have edited the script and removed this part.
the problem is that after installing some apps, etc. phone memory is at 13mb and one cant install any additional apps.
also, how do i replace the previous 40a2sd script? i ran into a wall when trying...
THX
------------------------------------------------------------------------------------------------------------------------------------------------
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
# Adapted for Modaco Custom Rom by Teknologist
#Removed this as there is no /etc/sysctl.conf as of now in MCR
#sysctl -p
# execute any postinstall script then kill it
if [ -e /dev/block/mmcblk0p2 ];
then
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
# clean up any old symlinks, create data directories
for i in data;
do
if [ -h /data/$i ];
then
rm /data/$i;
fi;
if [ ! -d /data/$i ];
then
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
# move apps from internal memory to sdcard
for i in app app-private dalvik-cache;
do
if [ ! -d /system/sd/$i ];
then
mkdir /system/sd/$i;
fi
busybox chown 1000:1000 /system/sd/$i;
busybox chmod 771 /system/sd/$i
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox cp -a /data/$i/* /system/sd/$i/;
busybox rm -f /data/$i/*;
fi;
done;
# symlink app dirs - they must be on the same filesystem
for i in app app-private dalvik-cache;
do
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox rm -rf /data/$i;
busybox ln -s /system/sd/$i /data/$i;
fi;
done;
# clean up old whiteouts
for i in local misc property system tombstones data;
do
if [ -h /system/sd/$i ]; then rm -f /system/sd/$i; fi
done;
# please don't put odex files in the app directory people!
# it causes dexopt to crash when switching builds!
busybox rm -f /system/sd/app/*.odex
setprop cm.a2sd.active 1;
echo "+++ Apps-to-SD successfully enabled";
else
# replace symlinks with directories so we can boot without sd
for i in app app-private dalvik-cache;
do
if [ -h /data/$i ];
then
rm -f /data/$i;
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
setprop cm.a2sd.active 0;
fi;
sync;

[Q] clockwork 3 with linux

i currently have the old clockwork 2.5.1.0 and ready to move to ext4 and flash most likely viperrom or srf. the problem im encountering is when i extract the cwm3 zip and click run.sh like instructed it just opens up this with gedit:
#!/bin/bash
platform=`uname`;
adb="./adb";
if [ $(uname -p) == 'powerpc' ]; then
echo "Sorry, this won't work on PowerPC machines."
exit 1
fi
cd "$(dirname "$0")"
echo "Original one click made by joeykrim and one click installer made by noobnl and firon"
echo "busybox by skeeterslint"
read -n1 -s -p "Press any key to continue..."
which adb > /dev/null 2>&1
if [ $? -eq 0 ]; then
adb="./adb";
if [ "$platform" == 'Darwin' ]; then
mv adb.osx $adb > /dev/null 2>&1
fi
fi
chmod +x $adb
echo -e "Starting adb server"
$adb kill-server
which sudo > /dev/null 2>&1
if [ $? -eq 0 ]; then
$adb start-server
else
sudo $adb start-server
if [ $? -ne 0 ]; then
$adb start-server
fi
fi
state=$($adb get-state | tr -d '\r\n[:blank:]')
while [ "$state" != device ]; do
state=$($adb get-state | tr -d '\r\n[:blank:]')
read -n1 -s -p "Phone is not connected. Press any key to continue."
done
root=$($adb shell id | grep uid=0)
if [ -z "$root" ]; then
echo -e "Copy and run the exploit (may take up to two minutes)"
$adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
$adb push root.sh /data/local/tmp/root.sh
$adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
$adb shell chmod 755 /data/local/tmp/root.sh
$adb shell /data/local/tmp/root.sh
echo Wait for phone to reconnect...
sleep 20;
i=0;
state=$($adb get-state | tr -d '\r\n[:blank:]')
while [[ "$state" != device && $i -lt 30 ]]; do
state=$($adb get-state | tr -d '\r\n[:blank:]')
let i=i+1;
sleep 1;
done
if [ "$state" != "device" ]; then
echo "Phone did not reconnect after 30 seconds."
read -n1 -s -p "Pausing script. Unplug and replug USB cable and check the connection (verify with adb shell)."
fi
state=$($adb get-state | tr -d '\r\n[:blank:]')
if [ "$state" != "device" ]; then
echo "Aborting script. Phone is still not connected. Reboot the phone and try again.";
exit 1;
fi
root=$($adb shell id | grep uid=0)
if [ -z "$root" ]; then
echo "Root was not obtained. Please re-run the script."
exit 1;
fi
fi
echo "Mount system as r/w, cleanup old files, do some basic configuration"
$adb shell mount -t rfs -o remount,rw /dev/block/stl9 /system
oldroot=$($adb shell "if [ -f /system/bin/joeykrim-root.sh ]; then echo -n 'exists'; fi");
if [ -z "$oldroot" ]; then
$adb shell rm /system/bin/playlogo
$adb shell mv /system/bin/playlogo-orig /system/bin/playlogo
$adb shell chmod 755 /system/bin/playlogo
fi
$adb push rootsetup /data/local/tmp/rootsetup
$adb shell chmod 755 /data/local/tmp/rootsetup
$adb shell /data/local/tmp/rootsetup
$adb shell rm /data/local/tmp/rootsetup
$adb shell rm /system/app/Asphalt5_DEMO_ANMP_Samsung_D700_Sprint_ML.apk
$adb shell rm /system/app/FreeHDGameDemos.apk
echo "Copying files onto phone..."
$adb push su /system/xbin/su
$adb push Superuser.apk /system/app/Superuser.apk
$adb push busybox /system/xbin/busybox
$adb push remount /system/xbin/remount
echo "Setting permissions..."
$adb shell chmod 755 /system/xbin/busybox
$adb shell chmod 755 /system/xbin/remount
$adb shell chown root.shell /system/xbin/su
$adb shell chmod 4755 /system/xbin/su
$adb shell ln -s /system/xbin/su /system/bin/su
echo "Installing busybox..."
$adb shell /system/xbin/busybox --install -s /system/xbin
osversion=$(./adb shell getprop ro.build.id | tr -d '\r\n[:blank:]')
if [ "$osversion" == "FROYO" ]; then
echo Installing clockworkmod redirector
$adb push recovery /system/bin/recovery
$adb push recoveryfiles /system/bin/recoveryfiles/
$adb push recoveryres /system/bin/recoveryres/
$adb shell busybox chmod -R 0755 /system/bin/recoveryfiles/*
$adb shell busybox chmod -R 0755 /system/bin/recoveryres/*
$adb shell chmod 0755 /system/bin/recovery
$adb shell sync
fi
echo "Installing clockworkmod recovery..."
$adb push redbend_ua /data/local
$adb shell chmod 755 /data/local/redbend_ua
$adb push zImage /data/local/tmp/zImage
$adb shell /data/local/redbend_ua restore /data/local/tmp/zImage /dev/block/bml8
echo "Waiting for phone to reboot..."
sleep 5;
i=0;
state=$($adb get-state | tr -d '\r\n[:blank:]')
while [[ "$state" != device && $i -lt 45 ]]; do
state=$($adb get-state | tr -d '\r\n[:blank:]')
let i=i+1;
sleep 1;
done
echo "Cleaning up files..."
sleep 5;
$adb shell rm /data/local/redbend_ua
$adb shell rm /data/local/tmp/zImage
$adb shell rm /data/local/tmp/rageagainstthecage-arm5.bin
$adb shell rm /data/local/tmp/root.sh
if [ -z $(which sudo 2>/dev/null) ]; then
$adb kill-server
else
sudo $adb kill-server
fi
read -n1 -s -p "Press any key to exit the script."
anyone know the command in terminal to possibly run this. thanks!
It's run.bat you are supposed to run in either a command box or just double click on it in Windows. Remember the 1st time you go into Clockwork it will immediately convert you to EXT4 file system. You need to have the EXT4 compatible ROM on your sd card and flash it before rebooting from the conversion or you will get stuck at the Samsung screen.
this is for linux os though. according to the instructions im suppose to click the shell file not the batch file.
mk4cam said:
this is for linux os though. according to the instructions im suppose to click the shell file not the batch file.
Click to expand...
Click to collapse
I'm not quite sure, but as an alternate suggestion, try out heimdall in linux and flash the image file here. Also listed in my signature
Which distro are you running? You need to make the script executable and then run the script from a terminal.
Open a terminal where you extracted the cwm3.zip and run the following commands;
Code:
chmod +x run.sh
Code:
./ run.sh
You may need to run this as root or sudo.
ironlineage said:
Which distro are you running? You need to make the script executable and then run the script from a terminal.
Open a terminal where you extracted the cwm3.zip and run the following commands;
Code:
chmod +x run.sh
Code:
./ run.sh
You may need to run this as root or sudo.
Click to expand...
Click to collapse
tried it and now this:
Original one click made by joeykrim and one click installer made by noobnl and firon
busybox by skeeterslint
Press any key to continue...Starting adb server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Phone is not connected. Press any key to continue.
im lost cause i had no issues rooting the older version via http://forum.xda-developers.com/showthread.php?t=808103. ive tried every usb port i have on this comp and every cable i have and it still cant see the phone. i think ill just have to try this when im around a windows comp next time.
If I remember correctly you need to have USB Debugging enabled on your phone and make sure it is not mounted on the computer but still charging.
ok ill try it cause i have had it mounted. ill let you know
Edit: ran it w/o mounting and same results

[24 MAY] Dorimanx-ROM-HIGH-END 3.1.9 N277 ODEX NO-HOME-REFRESH+ZRAM+SKIN+TWEAKS+CRON

Welcome to
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This ROM is based on latest nightly of CM7 with my kernel and my tablet tweaks added to create the probably smoothest and fastest ROM your HD2 ever had.
​
It´s available for MAGLDR and CLK Boot loader.​
Mirrors are ready for you to get my ROM and test it.
For all new users please read all info + change log before asking thanks.​
Critical thing that you need to know.
This ROM works with SWAP / NO SWAP
FOR SWAP CREATION SEE PAGE 2
DON'T WANT SWAP!?, INSTALL REVERT TO LIGHT!
[ This ROM based on DORIMANX 1.62Ghz OC KERNEL AND LATEST NIGHTLY CM7 + My TWEAKS ]
LINKS TO KERNELS AND BIG THANKS TO:TYTUNG, HIEROS, MARC1706, AmeriCanAndroid
My kernel GIT
Kernel Made by ME in Mirrors! see below for thread link.
LINK to GPS LIBS by Tytung And BIG Thanks once more!
Link To GPS-LIBS​
If you like this ROM and want to help me, rate this page with 5 STARS and give me a THANKS!​
​
GPS LIBS 2.1 NMEA with AGPS Support 5 to 20 second to GPS lock -> Link
Added GPS Status app to test GPS,BIG Thanks to Tytung
Camera that make picks with 100% Jpeg quality + Video on "HD" 800x480 6Mbit/s in MPEG4 format! smooth with no delays. 30MB/minute Found It HERE Thanks LeJay!
Added MIUI Camera v17 Fixed2, for all. (Thanks to MongooseHelix)
Latest nightly created for BRAVO phone. (Masked as HD2)
DATA Connection is above 2.5Mbits download! and Radio Auto switch 3G or H according to signal or Idle DATA to save Power!
TABLET TWEAKS, With big help from Lit
Cool Skin with ICS 4.0 transition and lot's of nice icons, created by UOT kitchen
Battery % advance by 1% not by 5% also shows % on charger connected
Added CRONTAB ability as ADD-ON this will make ROM free of dead file cache and RAM / SWAP cache on different time, Read Page 3 for info.
Lots of scripts that do kernel tweaking, partition remounting, CPU down-volting, cache rearrange, send marked downloads to RAM-DRIVE and more
ROM Support Apps2SD! NO NEED To install external scripts!!! all apps will be installed to EXT partition by default, if no EXT exist then to NAND drive!
ROM now supports DATA To EXT, this mod will move all app data to EXT and speed access to them by 3 times!
With DATA to EXT quadrant score is 2800+ on light rom, 2600+ on heavy loaded rom.
ROM has media / video decoder/ encoder drivers that allow loud sound from speaker and smooth video record and play back
ROM has 2 modes, with swap and without it. (HIGH END / LIGHT) (read more below)
Added HACKED DPI check Market , now you can download and install any app, by using any density resolution!
Default CM7 FM Radio
Ads block in HOSTS file, more than 23500 ads blocked
Full root with new superuser 3.X already updated to latest SU
Preinstalled Busybox 1.19.4 ,configured and ready
CLK Ril_Wrapper 4 installed to fix the connection problem
Added GTALK 1.3 with voice / video support
Added latest Google Apps limited pack, only needed apps
DATA / WIFI / GPS / AUTO DIM LIGHTS and blink lights Fixed LIB!
Working WIFI Tethering app > Barnacle Wifi Tether (Found by Rudyfastcat )
MMS blurry pics fix for T-Mobile US users by Tytung! > HERE
Dorimanx-Kernel made by me (kernel thread)
ZRAM support (compcache)
Aroma Installer Menu, that will guide you on installation!
Click to expand...
Click to collapse
If you are here and want this ROM then you have already CLK / MAG partition installed and ready.
If not please check how too in any different ROM long guide for starters,
This is the most advanced ROM for now.​
Decide which version you want :
With SwapHigh-End-Version
-you will need an auto task-killer since the Internal Auto killer is DISABLED!!!
-Recommended are System Tuner Pro + Advanced Task Killer
-to make it High-End create a SD-ext as usual + create a swap partition of 256MB and flash my ROM​
Without Swap Lite-Version
-Home-Refreshes will be present (but not always!)
-to make your ROM a lite version choose it in install menu!​
Flash the CWM partition layout from Mirrors,
Do a backup of SD card,format it and create a SDext and swap(256Mb)
Flash “Dorimanx-Rom-X.X.X-Nightly-XXX-All-in-One !!
Everything will be done by my scripts and ROM
Boot and restore all your stuff and customize it to your personal wishes.
Make a backup via recovery after all to have a backup if you do something bad later.
Click to expand...
Click to collapse
Enjoy!!
---> This ROM is in constant grow, and Bug find and repair, so if you don't like to flash updates often! then use an other ROM <---
Things to know about ROM
On each boot, you will see Ember Lights blink 3 times and switch to Green!
This is how you know that ROM is loading OK, and there is no boot loop,
When Rom will be almost fully loaded the Green Light will blink 3 times and switch off.
My advice not to unlock phone till you see the GREEN light blink then wait 5 seconds and unlock, this way Home app will load fast and no delays.
When Light blink 3 times green it's tell you that CPU is released and ready for more jobs!
If you see the Ember light again and again and no animation then ROM in Boot loop. (95% will not happen ) I test my ROM many times before upload.
How to update (ROM already installed but not latest version):
Clear cache.
Clear Dalvik cache (not necessary if you don´t have problems dont do it!)
Download and flash new release like usual
REBOOT.
When booted, wait till CPU will be free, 3 green blinks!
REBOOT!!!
No permission fix needed, but if some FC on some apps, do it! and clear there data! should fix all problems.
Be Happy
This is all the GUIDE you need.
Have fun!
Here is new mirror provided by Willflint
Here is my mirror provided by looki75
Here is my mirror provided by Netson99
Here is my mirror provided by Guinhill
MIRROR 4
PERSONAL REQUEST!
If MAIN Mirror is SLOW please use the BACKUPS!
Also if you find this ROM and my help worth 5 STARS then rate this page with 5 STARS!​
​Here i will post names of people that helped me with development testing and donated to get me going
All people that DONATED or helping me with this project are considered true members of my team!
Willflint, Looki75, Netson99 and Guinhill = Huge donation!!! The Mirror sites! all credits and respect to them!
Krook6023=Main Page modification!!! He is the creator of LOGOS and rearrangements! HUGE DONATION!
Tytung,Marc1706, AmeriCanAndroid,Fhasovic=For Help with KERNEL! and GPS Libs!
Louie317=HUGE Donation! 100$,Honored member!
Jonas2295=HUGE Donation! one more HD2 that he partially donated to me for help in development! 2 is better then one + Main Page Text modding!
Nixda99 & Amarullz =HUGE Donation to this ROM! The AROMA Installer boot menu. (Developed by Amarullz and tuned for ROM by Nixda99 and Me)
Tiger22=Donation X5,Support,active help,Veteran and Honored member!
Denny02ng=Donation X5,Support,respected Veteran and honored member!
Belzebuth=Donation X4,Support,active help,respected Veteran and Honored member!
Bologna=Donation X4,Support,active help,respected Veteran and Honored member!
Hinnne=Donation X3,CLK Kernel Testing,support,active help,respected veteran member!
Howell=Promotion of our ROM on French Android HD2 Portal with high success!,Honored Member!
Ccbm3=HUGE Support!,For creating the ROM Review and upload to YouTube! Great JOB!
Pirlano=Honored Member!, for helping me find the way to move DATA to EXT! and make our ROM super Fast!
Rudyfastcat=active help,feedback,support,respected veteran member!
Feanor91= active feedback and support,respected veteran member!
Visentinel=active help,feedback,support,respected veteran member!
Lit=Big Help with Tablet Tweaks,support,active help,And Promotion of our ROM in Russian Forum!
Themadproducer= Donations + active feedback and support,respected veteran member!
Gerardroid =Donation X2 + active help,feedback,support,respected veteran member!
Allcomb =BIG $$ Donation + active help,feedback,support,
Miguelidanez=Donation X2,Support,respected veteran member!
MystaMagoo =Donation X2,Support,active help,respected veteran member!
Barjel=Donation X2,active feedback,support,
Dmunseyautotech=Donation X2,Support,
Tmotard X2=Donation,Support,great support.
Tageeboy =Donation + active help,feedback,support,
kantjer=Donation,support,
Gho57=Donation,support,
SkooterD=Donation,Support,active help,
Guinhill=Donation,Support,
Justaguyh=Donation,Support,
Blek42=Donation,Support,
GigahurtzUK=Donation,Support,
Rebel01st=Donation,Support,
Joescian=Donation,Support,active help,
Gubi99=Donation,Support,
Dirtytwo=Donation,Support,
A3r0n1=Donation,Support,
AzureD=Donation,Support,
Sajin1=Donation,Support,
Michie=Donation,Support,
Htc-android=Donation,Support,
Traukoman=Donation,Support,
Marzinho=Donation,Support,
Faka tm*Sap*=Donation,Support,
M4a1a2=Donation,Support,
WillieStylez=Donation,Support,[FONT=&quot]
[/FONT]Vicente=Donation,Support,[FONT=&quot]
[/FONT]Marc New***=Donation,Support,[FONT=&quot]
[/FONT]Ic3fox=Donation,Support,[FONT=&quot]
[/FONT]Patrick O'k***=Donation,Support,
D1wepn=Donation,Support,
Screemi=Donation,Support,
KRAZzysoldier=Donation,Support,
Mappazza=Donation,Support,
Pedmond=active feedback and support,
Ccristal=active help,feedback,support
THANKS TO YOU ALL!
You want to be in my list?
-Then help people to use my ROM.
-Give feedback on bugs or suggestions
-Provide Mirror
-DONATE!
And Be respected!
Hey I got something nice for you in time that you download.
Watch my best friend rock band play!
And my ROM out of BOX review! made by Ccbm3
​ If you Donated and I didn't added you to the list,
First I am sorry for that,
Please PM me, I will add ASAP
​24/5/12 Time 14:30
New ROM 3.1.9 Nightly 277 from last offline source! + Kernel 7.1A
Change Log HERE
02/5/12 Time 02:47AM
New ROM 3.1.7 Nightly 276 from last offline source! + Kernel 6.7
Change Log HERE
14/4/12 Time 23:58
New ROM 3.1.6 Nightly 275 from last offline source! + Kernel 6.5B (ROM DELETED)
Change Log HERE
Fixed ROM 3.1.6.1 + kernel 6.5C (ROM DELETED)
Change Log HERE
Fixed ROM 3.1.6.2 + kernel 6.5D
Change Log HERE
30/3/12 Time 22:24
New ROM 3.1.5.1 Nightly 274 from last offline source! + Kernel 6.3
*fixed root and updated to last 6.3 kernel update.
24/3/12 Time 4:10AM
New ROM 3.1.4 Nightly 273 from last offline source! + Kernel 6.1
Change Log HERE
ROM 3.1.3 was not added here, i was too busy.
05/3/12 Time 1:35
New ROM 3.1.2 Nightly 271 from last source + Kernel 5.4
Change Log HERE
21/2/12 Time 1:00
New ROM 3.1.1 Nightly 270 from source + Kernel 5.3
Change Log HERE
21/2/12 Time 1:00
New ROM 3.1.0 Nightly 269 from source + Kernel 4.7
Change Log HERE
Change log trimmed dates!
New ROM 3.0.9 Nightly 268 from source + Kernel 4.7
Change Log HERE
New ROM 3.0.8 Nightly 267 from source + Kernel 4.0
Change Log HERE
New ROM 3.0.6 Nightly 265 from source + Kernel 3.6
Change Log HERE
New ROM 3.0.5 Nightly 264 from source + Kernel 3.3
Change Log HERE
New ROM 3.0.3 + Kernel 3.2
Change Log HERE
New ROM 3.0.1 + Kernel 3.0
Change log HERE
New ROM 3.0.0 + Kernel 2.9
Change Log HERE
New ROM 2.9.9 + Kernel 2.7
Change Log HERE
New ROM 2.9.8 + Kernel 2.5
Change Log HERE
New ROM 2.9.7 + kernel 2.3
Change Log HERE
New ROM all in one 2.9.5
Change Log HERE
New ROM 2.9.4 Nightly 245
Change Log HERE
New ROM 2.9.3 Nightly 242
Change Log HERE
New ROM 2.9.0 Nightly 231!
Change Log HERE
New ROM 2.8.9 based on Stable CM7 7.1.0!
Change Log HERE
New ROM 2.8.8 Nightly 220 Base 2.3.7!
Change Log HERE
New ROM 2.8.6
Change log HERE
NEW ROM 2.8.5 nightly 210
Change log HERE
NEW ROM 2.8.4 nightly 209
Change log HERE and HERE
NEW ROM 2.8.3 nightly 207
Change log HERE
New ROM 2.8.2 nightly 203!
Change log HERE
Fix home/call buttons if not working after install!
1. Install AnyCut from Android Market
2. Go to the home screen
3. Long press on the wallpaper
4. Tap "Shortcut"
5. Tap "Any Cut"
6. Tap "Activity"
7. Choose "Setup Wizard" from the list of activities
8. Tap "OK"
9. There should now be a Setup Wizard icon on your home screen. Follow the wizard through to completion and the dial / home / hangup hardware keys should now be behaving normally again.
Boot Boost Addon (All kernels)
***On Boot, Max speed to 1.47Ghz or 1157Ghz this is more stable speed, and will prevent stuck on boot when phone overheated above 42C
This UPDATE IS NOT MUST!!! ONLY IF YOU WANT!!!
***Included new fixed SQL LITE from Samsung thread that fix lag in I/O (Big Thanks to the developers that provided it.)
UPDATE ABOUT GPS!
3 GPS.conf files with regions + AGPS auto download tweaks and new tweaks for 2.0 only + More Tweaks found by me.
gps.conf_Auto_AGPS_update_every_24hr_(asia).zip
gps.conf_Auto_AGPS_update_every_24hr_(europe).zip
gps.conf_Auto_AGPS_update_every_24hr_(north-america).zip
Or you can change GPS.conf manually by looking here for our NTP server name for country go HERE
Find your region and change the Asia to your in gps.conf
save and reboot or do it before flash!
About SWAP!
ROM will activate 3 kind of swap
It's will turn ON (only if you have already created swap file on partition, or set partition for swap (the hard way) )
SD-EXT SWAP
SD-SWAP
EXT dedicated SWAP partition
***If you have SWAP already, or EXT or SD-SWAP/EXT-SWAP, no need to run the swap activation scripts.
***I have created 2 scripts for disabling SD swap before use of USB storage.
I have put them in your /sdcard/gscript
so you only need the app (gscript light or full)
then load this scripts, when you need usb storage run swapoff script. when done run swapon.
or you can install dual mount app. i can’t live without it so try it.
Camera!
Camera taking better pick now!
And video recording is with m4v decoder and mp4 file output, video is super! with no lag!
On "HD" camera is on 800x480 6Mbits frameRate="24" Video codec="m4v" fileFormat="mp4"
Sound aac bitRate="96000" sampleRate="16000" 30MB in one minute!!!
On "HIGH" camera is on 720x480 3Mbits frameRate="24" Video codec="m4v" fileFormat="mp4"
Sound aac bitRate="96000" sampleRate="16000" 23MB in one minute!!!
To switch from High to HD just choose HD in camera,
if you switch and no difference in screen size then choose LOW and back to HIGH or HD its will change...
Libaudio Drivers
I have uploaded 5 different audio drivers! (Credit to developers)
You can test them one by one, and if you get phone call bug then use the next one, till you be happy with one of them.
Older Changelog
Links for Nightly Updates:
CHANGE LOG
DOWNLOADS FOR BRAVO
​
This ROM is special, its tweaked to MAX! its super fast and has lots of RAM+SWAP
In order to use this ROM as HIGH END you must know that default AndroidAutoKiller is disabled!
This why it's so stable and home app never refresh,
But you must control your free RAM with app called " System Tuner PRO (was know as process monitor pro) " look for it and you will find it.
Also i recommend to use Advanced task killer pro with system tuner pro!
This app will control your RAM and not let to ROM to overload it self and reboot.
I have excluded all my apps and services that i want to run in RAM all the time and the rest are killed when i turn my screen off! or when no more RAM exist.
This setting is inside this application.
It's best that RAM will always be more then 40MB!
The Light ROM (update) set the auto killer back on line, this will limit you to open only 40 apps + services + system stuff, and after app 41 the home screen will refresh and all big apps in RAM will be closed. this is bug in CM7 not related to me.
I just found a way to disable it. (HIGH END)
I have many tweaks working in this Rom,
CRON script that TASK activation by time set.
it's running script every 10 minutes
Script sit in /sdcard/phonePrioritizer/script.txt
It's contain function called renice.
It's set CPU power priority to apps and services that exist in RAM.
I have tweaked the system services and stock apps to best setting for priority.
you can add custom apps
you can use renice range from -15 (big priority to service / app ) to 15 (very low priority to app / service)
The -20 to -15 reserved for system. do not use it or instability can be felt.
To add custom app to priority script install autokiller from market open your app push home, go to autokiller app and to services ,
find your open app, click long on it and choose more info,
you will see that package name, this is what you need, write it down and go and edit the script.txt according my example at the bottom of the script.
We Are Number One! In NAND ROM NO SENSE!
​
Keep the feedback flowing, I need to know how it's working for you.!
Lets make best ROM for US!
DON'T FORGET TO PUSH THE THANKS! BUTTON
YOU CAN ALSO DONATE TO KEEP ME GOING!
LOOK FOR BUTTON "Donate To Me" under my nickname!
Thanks for using my ROM!
I am here for you so write comments!
​
SWAP THE HARD WAY!
What is swap?
Swap is extension or RAM on sdcard, for ability to load more apps in RAM and get fast multy tasking (apps stay in ram)
Many people think that this is not needed any more. well i must disagree it's way better with swap when you don't have any more RAM to spare.
When no RAM Android start to kill apps that sit in RAM and by doing this kills my apps that i use all the time,
So phone loads them again and use CPU power in process and killing other apps!
so it's a circle a loop, with swap no problem!
I have 37 apps in memory all the time.​
So here is the guide to activate SWAP on your device The hard way!​
Again read about it and only if you think you need it and you are heavy user like me!
Then follow closely to instructions!
1) This procedure will erase your SDCARD!!!
So before you begin backup all your stuff from SDCARD and the extended Linux partition to your computer drive!
You can use Titanium backup PRO to backup all, and then move all to your disk.
And after you finish, restore all back.
2)when you ready to format your SDCARD, Download Recovery_150M_system_5M_cache[v3.1.0.1].zip from my ROM mirror!
unzip to comp and install it, (how to you must know by now)
3)when all done, enter to new recovery console, go to advanced and use the partition sdcard
Choose your preferred size of extended partition, then it's will ask you about the size of the SWAP partition! choose 256MB (the MAX) finish and turn your device OFF.
4)remove your SDCARD and using card reader format the FAT32 partition with 32Block NOT the 4096 by default. (this will increase reading and writing performance)
5)copy your stuff back as was to SD.
6)If your ROM working then proceed to 7 if not install your ROM and after restart install my tweaks.
7)now is the fun part! you have swap activated and working! no need to do any thing more!
Now you should see that you have SWAP of 256MB and 0 Used
Go to terminal and run
free​ It's will start to grow and shrink automatically depend on your RAM use and be activated on boot!.​
SD SWAP THE EASY WAY!
In Easy way Swap you don't need to reformat or even reboot your phone to create swap!
If you installed my ROM and you don't have swap but you want to stay on HIGH END ROM,
Then you can do this to enable SD swap
Download script sdswap200.sh or dataswap250.sh from my mirror.
Run in in GSCRIPT App or copy it to SDCARD root,
Open Terminal:​
type this:
Code:
su -
sh /sdcard/sdswap200.sh
OR
sh /sdcard/dataswap250.sh
wait for it to finish!
done you have 200mb of swap! with sdwapscript on sdcard OR 250MB swap on EXT (DATA) partiton
You must have 200mb FREE on sdcard before you run this script! OR 250 on EXT DATA partition.
Every time you reboot swap will be activated! NO need to run script any more.
​
Real Working Auto Brightness module​
Here is the Auto Brightness module that you can configure via Settings ( lights.qsd8k.so )
But You will lose the Blinking Notification Light! it's just will be ON (Red Light) if you have notification, or OFF if you don't.
My settings that work just great for me
After installation go to settings > Display settings > Brightness
And set the Automatic Brightness ON
Then go to settings > CyanogenMod settings > Display > Automatic backlight.
*At Light sensor filter check-box ENABLED
*At windows length use 10sec
*Reset threshold use 400LUX
*Sample interval use 2sec
At Light Levels check-box Use Custom
*Screen dim level use 10
*Edit other levels...
Firs of all : Set number of levels to 7 and push the save & apply, you should see now 7 levels
It's should look like that:
Code:
[B]
Upper = (this is changing automatically when you set all the rest)[/B] [B]
Lower Upper Screen Buttons[/B] [B]
0 14 25 255[/B] [B]
15 149 40 255[/B] [B]
150 224 50 255[/B] [B]
225 499 70 0[/B] [B]
500 999 80 0[/B] [B]
1000 2999 100 0[/B] [B]
3000 INFINITY 250 0 (this is the max level)[/B]
Save & Apply go back <--
*Check-Box the Allow light decrease
*At decrease hysteresis use 50%
Have fun with the setting if you like.
CROND TASKER! MODULE!
​I have finally cooked the CROND task service configuration, Thanks to LIT!
I have uploaded file CRON-TASKS.zip to mirror.
Cron will start 2 minutes after Full BOOT!!!
SO HOW TO CONFIGURE IT BEFORE INSTALL!!!!
Open the zip!
in folder /system/etc/int.d
open file 08wcron with notepad ++ of EditPlus (not with notepad)
find this:
TZ=IDT-3
This is the TIME ZONE! it's important!
PUSH THIS LINK!
Find you country in that LINK!
Example!
I see for Israel
Friday, August 12, 2011 at 01:44:22 IDT
Current time zone offset:UTC/GMT +3 hours
So i need to SET! opposite! -3 (WHY? have no idea, but this is the only way)
TZ=IDT-3
Then save and install
WHAT IS IT DO?
First it's will remove the Phone prioritizer app, and save you 60MB ram,
CRON will do this!:
Run the prioritizer script every 10 minutes to speed up the phone!
1-59/10 * * * * sh /mnt/sdcard/phonePrioritizer/script.txt;date > /data/cron-renice;echo "runing script.txt every 10MIN" >> /data/cron-renice
Run Clear file Cache every 4AM!
0 4 * * * sh /mnt/sdcard/phonePrioritizer/reboot.txt;date > /data/cron-clear-file-cache;echo "runing reboot.txt to clear cache without reboot every 4:00AM" >> /data/cron-clear-file-cache
Run Clear RAM Cache every 6 hours day/night to speed up the phone!
0 0-23/6 * * * sync;sysctl -w vm.drop_caches=3;sleep 3;sysctl -w vm.drop_caches=0;date > /data/cron-clear-ram-cache;echo "runing clear ram cache every 6 Hours" >> /data/cron-clear-ram-cache
Clear SWAP and re-enable it back! Release all the LAG cache
(works for HIGH END, no change for LIGHT ROM)
20 4 * * * swapoff -a;sleep 5;swapon -a;date > /data/cron-clear-swap;echo "runing clear swap every 4:20AM" >> /data/cron-clear-swap
Script that hold the tsks above is in /data/data/cron/root (in install ZIP)
when in phone then in /data/cron/root
Examples:
* * * * * sh /sdcard/SOMESCRIPT.sh (this will run the script every minute!)
0 5 * * * sh /sdcard/SOMESCRIPT.sh (this will run the script every 5:00AM)
30 5 * * * sh /sdcard/SOMESCRIPT.sh (this will run the script every 5:30AM)
1-59/30 * * * * sh /sdcard/SOMESCRIPT.sh (this will run the script every 30 minutes!)
There are too many combinations, search google for crontab settings
Also i have packed small script name cron-check.sh it's will go to /sdcard/gscript
so load it with gscript and then you can check the status of CRON!
this is what you will see!
/data/cron-clear-file-cache:Thu Aug 11 04:00:01 PDT 2011
/data/cron-clear-file-cache:runing reboot.txt to clear cache without reboot every 4:00AM
/data/cron-clear-ram-cache:Thu Aug 11 18:06:56 PDT 2011
/data/cron-clear-ram-cache:runing clear ram cache every 6 Hours
/data/cron-clear-swap:Thu Aug 11 04:20:06 PDT 2011
/data/cron-clear-swap:runing clear swap every 4:20AM
/data/cron-renice:Thu Aug 11 21:21:01 PDT 2011
/data/cron-renice:runing script.txt every 10MIN
if you see this with your time, then all ok!
But you need to wait till it's will be executed!
so first you will see the:
/data/cron-renice:Thu Aug 11 21:21:01 PDT 2011
/data/cron-renice:runing script.txt every 10MIN
after 10 minutes,
all the rest after first execution!
To see if cron RUNNING!
crond is installed with the busybox!
in terminal do:
ps | grep crond
you get something like this (after you install configured ZIP)
# ps | grep crond
root 4338 1 2188 420 c00bf130 00008a7c S crond
So have fun with it
All my work will be posted here free for all, i will updat on new tweaks.
********HERE I WILL POST MY WORK********
MY /SYSTEM/ETC/INIT.D SCRIPTS:
01MountAll
Code:
#!/system/bin/bash
# Created by Dorimanx
echo 1 > /sys/devices/platform/leds-microp/leds/amber/brightness
L="log -p i -t cm"
$L "Welcome to Android `getprop ro.build.version.release` / `getprop ro.modversion`";
$L " ";
$L " DORIMANX SUPER FAST AND TWEAKED TO THE MAX ROM ";
$L " ";
$L " ";
stop
#creating debug log for admin.
echo "creating debug log for admin at /data/mountall-script-debug.sh"
echo "new boot" > /data/mountall-script-debug.sh
echo "Pre BOOT Start" >> /data/mountall-script-debug.sh
date >> /data/mountall-script-debug.sh
##############################################################################################################################################
Enable-EXT-check-and-repair-and-speedUP () {
echo "Repairing ext file system and speeding access"
echo "Repairing ext file system and speeding access" >> /data/mountall-script-debug.sh
if [ -e /dev/block/mmcblk0p2 ]; then
echo "Ext file system found..."
echo "Setting journal_data_writeback on sd-ext partition to speed the access"
cat /proc/mounts > /etc/mtab
echo "Converting EXT3 to EXT4 if not done yet by user if done then ignore"
echo "Converting EXT3 to EXT4 if not done yet by user if done then ignore" >> /data/mountall-script-debug.sh
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
echo "Convert is DONE, you have EXT4 NOW"
echo "Convert is DONE, you have EXT4 NOW" >> /data/mountall-script-debug.sh
tune2fs -o journal_data_writeback /dev/block/mmcblk0p2
tune2fs -m2 /dev/block/mmcblk0p2
echo "e2fsck running"
e2fsck -vyf /dev/block/mmcblk0p2
tune2fs -l /dev/block/mmcblk0p2
tune2fs -r 2048 /dev/block/mmcblk0p2
estatus=$?
if [ $estatus -gt 0 ]
then
echo "One or more errors were found in your ext4 partition"
echo "One or more errors were found in your ext4 partition" >> /data/mountall-script-debug.sh
if [ $estatus -eq 1 ]
then
echo "File system errors were corrected successfully"
echo "File system errors were corrected successfully" >> /data/mountall-script-debug.sh
elif [ $estatus -eq 2 ]
then
echo "Serious file system errors were found and corrected successfully"
echo "Serious file system errors were found and corrected successfully" >> /data/mountall-script-debug.sh
elif [ $estatus -eq 4 ]
then
echo "Serious file system errors were found and COULD NOT BE FULLY CORRECTED"
echo "Serious file system errors were found and COULD NOT BE FULLY CORRECTED" >> /data/mountall-script-debug.sh
else
echo "e2fsck has encountered technical errors and cannot continue. Script will ABORT"
echo "e2fsck has encountered technical errors and cannot continue. Script will ABORT" >> /data/mountall-script-debug.sh
fi
#statexit=1
else
#statexit=0
echo "Your ext file system was checked and was clean..No repair was necessary."
echo "Your ext file system was checked and was clean..No repair was necessary." >> /data/mountall-script-debug.sh
fi
else
echo "No Ext file system found...Skipping"
echo "No Ext file system found...Skipping" >> /data/mountall-script-debug.sh
fi
}
############################################
#Trigger, without # =ON with #OFF default=ON
Enable-EXT-check-and-repair-and-speedUP
##############################################################################################################################################
Check-FAT-Partition-and-repair () {
echo "Repairing SDCARD FAT Partition"
echo "Repairing SDCARD FAT Partition" >> /data/mountall-script-debug.sh
if [ -e /dev/block/mmcblk0p1 ]
then
echo "Sdcard found.."
echo "Sdcard found.." >> /data/mountall-script-debug.sh
mount -t vfat /dev/block/vold/179:1 /mnt/sdcard
echo "DosFsck running..."
fsck_msdos -p -f /dev/block/mmcblk0p1
dosstatus=$?
if [ $dosstatus -gt 0 ]
then
echo "One or more errors were found in your Fat32 partition"
echo "One or more errors were found in your Fat32 partition" >> /data/mountall-script-debug.sh
if [ $dosstatus -eq 1 ]
then
echo "File system errors were corrected successfully"
echo "File system errors were corrected successfully" >> /data/mountall-script-debug.sh
elif [ $dosstatus -eq 2 ]
then
echo "Serious file system errors were found and corrected successfully"
echo "Serious file system errors were found and corrected successfully" >> /data/mountall-script-debug.sh
else
echo "dosfsck has encountered technical errors and cannot continue. Script will ABORT"
echo "dosfsck has encountered technical errors and cannot continue. Script will ABORT" >> /data/mountall-script-debug.sh
fi
else
echo "Your Fat32 file system was checked and was clean..No repair was necessary."
echo "Your Fat32 file system was checked and was clean..No repair was necessary." >> /data/mountall-script-debug.sh
fi
else
echo "Your Fat32 file system could not be read Script will abort"
echo "Your Fat32 file system could not be read Script will abort" >> /data/mountall-script-debug.sh
fi
umount -l /mnt/sdcard
}
############################################
#Trigger, without # =ON with #OFF default=ON
#Check-FAT-Partition-and-repair
##############################################################################################################################################
Find-and-Mount-SD-EXT-and-SpeedUP () {
BB="logwrapper busybox";
echo "find SD Card"
for MMC_NUM in `seq 0 9`;
do
MMC_TYPE=`cat /sys/block/mmcblk$MMC_NUM/device/type`
if [ "$MMC_TYPE" = "SD" ];
then
# 2nd partition of sdcard should be the sd-ext if exist
SD_EXT_PART=/dev/block/mmcblk${MMC_NUM}p2
break
fi
done
if [ -b "$SD_EXT_PART" ];
then
log -p i -t mountsd "Mounting EXT filesystem..";
echo "Mounting EXT filesystem.." >> /data/mountall-script-debug.sh
echo "mount and set perms"
$BB mount -o rw,nobh,barrier=0,noatime,nodiratime,data=writeback,nosuid,nodev,nobh,nouser_xattr,noauto_da_alloc,commit=60,inode_readahead_blks=1,delalloc $SD_EXT_PART /sd-ext;
######################
#backup config for tests.
#$BB mount -o rw,nobh,barrier=0,noatime,nodiratime,data=writeback,nosuid,nodev,nobh,nouser_xattr,noauto_da_alloc,commit=240,journal_async_commit,inode_readahead_blks=1,delalloc $SD_EXT_PART /sd-ext;
######################
fi
if [ "$?" = 0 ];
then
$BB chown 1000:1000 /sd-ext;
$BB chmod 777 /sd-ext;
log -p i -t mountsd "sd-ext successfully mounted";
echo "sd-ext successfully mounted" >> /data/mountall-script-debug.sh
else
log -p e -t mountsd "Unable to mount filesystem for /sd-ext";
echo "Unable to mount filesystem for /sd-ext" >> /data/mountall-script-debug.sh
fi
}
############################################
#Trigger, without # =ON with #OFF default=ON
Find-and-Mount-SD-EXT-and-SpeedUP
##############################################################################################################################################
Enable-Dalvik2SD () {
if [ ! -e /data/dalvik-on-data-now ]; then
echo "Enable Dalvik2SD"
echo "Enable Dalvik2SD" >> /data/mountall-script-debug.sh
if [ -e /dev/block/mmcblk0p2 ];
then
echo "move dalvik cache from internal memory to sdcard"
echo "move dalvik cache from internal memory to sdcard" >> /data/mountall-script-debug.sh
if [ ! -d /sd-ext/dalvik-cache ];
then
mkdir /sd-ext/dalvik-cache;
busybox chown 1000:1000 /sd-ext/dalvik-cache;
busybox chmod 777 /sd-ext/dalvik-cache;
fi
echo "move dalvik to sd-ext"
echo "move dalvik to sd-ext" >> /data/mountall-script-debug.sh
busybox rm -rf /data/dalvik-cache;
echo "Create BIND to SD-EXT"
echo "Create BIND to SD-EXT" >> /data/mountall-script-debug.sh
mkdir /data/dalvik-cache
mount -o bind /sd-ext/dalvik-cache /data/dalvik-cache
echo "clean up old whiteouts in SD-EXT"
echo "clean up old whiteouts in SD-EXT" >> /data/mountall-script-debug.sh
for i in local misc property system tombstones;
do
if [ -h /sd-ext/$i ];
then rm -rf /sd-ext/$i;
fi
busybox rm -f /sd-ext/app/*.odex
setprop cm.dc2sd.active 1;
echo "+++ dalvik2sd enabled"
echo "+++ dalvik2sd enabled" >> /data/mountall-script-debug.sh
done;
else
echo "NO EXT Partition Detected"
echo "NO EXT Partition Detected" >> /data/mountall-script-debug.sh
fi
DC2SD_ACTIVE=`getprop cm.dc2sd.active`
if [ "$DC2SD_ACTIVE" != 1 ];
then
# replace symlinks with directories so we can boot without sd
rm -rf /data/dalvik-cache;
mkdir /data/dalvik-cache;
busybox chown 1000:1000 /data/dalvik-cache;
busybox chmod 777 /data/dalvik-cache;
fi;
else
echo "YOU HAVE DALVIK MOVED TO NAND DATA"
echo "YOU HAVE DALVIK MOVED TO NAND DATA" >> /data/mountall-script-debug.sh
fi
}
############################################
#Trigger, without # =ON with #OFF default=ON
Enable-Dalvik2SD
##############################################################################################################################################
Apps2SD-Script () {
# Apps2SD using symlinks and bind mounts
# Original Apps2SD script by [email protected] (cyanogen)
# Adapted for Oxygen ROM by AdamG
# Fixed for slow detection of SD cards by _thalamus and output a bit more debugging info so we can see where problems are arising.
# execute any postinstall script then kill it
enablea2sd () {
echo "mount and set perms"
echo "enablea2sd mount and set perms" >> /data/mountall-script-debug.sh
busybox chown 1000:1000 /sd-ext;
busybox chmod 777 /sd-ext;
echo "move apps from internal memory to sdcard"
echo "move apps from internal memory to sdcard" >> /data/mountall-script-debug.sh
for i in app
do
if [ -h /data/$i ]; then
rm -rf /data/$i
fi;
if [ ! -d /sd-ext/$i ]; then
mkdir /sd-ext/$i;
chown 1000:1000 /sd-ext/$i
fi;
if [ ! -d /data/$i ]; then
mkdir /data/$i
chown 1000:1000 /data/$i
fi;
if [ -d /data/$i ]; then
cp -a /data/$i/* /sd-ext/$i/
rm -f /data/$i/*
mount --bind /sd-ext/$i /data/$i
chown 1000:1000 /sd-ext/$i
chmod 777 /sd-ext/$i -R
fi;
done;
for p in app-private;
do
if [ -h /data/$p ]; then
rm -rf /data/$p
fi;
if [ ! -d /sd-ext/$p ]; then
mkdir /sd-ext/$p;
chown 1000:1000 /sd-ext/$p
fi;
if [ ! -d /data/$p ]; then
mkdir /data/$p
chown 1000:1000 /data/$p
fi;
if [ -d /data/app-private ]; then
cp -a /data/app-private/* /sd-ext/app-private/
rm -f /data/app-private/*
mount --bind /sd-ext/app-private /data/app-private
chown 1000:1000 /sd-ext/app-private
chmod 777 /sd-ext/app-private -R
fi;
done;
busybox chown 1000:1000 /sd-ext/$i;
busybox chmod 777 /sd-ext/$i
# clean up old whiteouts
for i in local misc property system tombstones;
do
if [ -h /sd-ext/$i ]; then
rm -f /sd-ext/$i;
fi
done;
# please don't put odex files in the app directory people
# it causes dexopt to crash when switching builds
busybox rm -f /sd-ext/app/*.odex
setprop oxygen.a2sd.active 1;
echo "sd-ext-ok" > /sd-ext/ext-ok
echo "+++ Apps-to-SD successfully enabled";
echo "+++ Apps-to-SD successfully enabled" >> /data/mountall-script-debug.sh
}
disablea2sd () { # replace symlinks with directories so we can boot without sd
for i in app app-private;
do
if [ -h /data/$i ];
then
rm -rf /data/$i;
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 777 /data/$i;
fi;
done;
setprop oxygen.a2sd.active 0;
}
if [ -e /dev/block/mmcblk0p1 ]; # We check for the presence of the FAT partition first to see if the SD has initialised.
then
echo "SD Card has been initialised...checking for ext partition.";
echo "SD Card has been initialised...checking for ext partition."; >> /data/mountall-script-debug.sh
if [ -e /dev/block/mmcblk0p2 ]; # If false, it isn't there so we don't have to sleep the script and delay the boot.
then
enablea2sd;
else
echo "No ext partition present, apps2sd disabled";
echo "No ext partition present, apps2sd disabled" >> /data/mountall-script-debug.sh
disablea2sd;
fi;
else
sleep 4; #Enables time for a slow SD to be detected and populate the device nodes.
if [ -e /dev/block/mmcblk0p2 ];
then
echo "enablea2sd for slow SD card";
echo "enablea2sd for slow SD card" >> /data/mountall-script-debug.sh
enablea2sd;
else
echo "No ext partition present after sleep, apps2sd disabled";
echo "No ext partition present after sleep, apps2sd disabled" >> /data/mountall-script-debug.sh
disablea2sd;
fi;
fi;
sync;
}
############################################
#Trigger, without # =ON with #OFF default=ON warning. do not add # at Apps2SD-Script, if you wish to disable apps2SD then remove # at disablea2sd below.
Apps2SD-Script
############################################
#Trigger, without # =ON with #OFF default=OFF
#disablea2sd
##############################################################################################################################################
#This is in case that ROM looks for dalvik in cache. also fix recovery.
Mount-Dalvik-Cache-to-Cache-folder-and-fix-recovery () {
echo "Mounting Dalvik also to cache for ROM in case needed" >> /data/mountall-script-debug.sh
if [ ! -d /cache/dalvik-cache ]; then
mkdir /cache/dalvik-cache
fi
chown 1000:1000 /cache/dalvik-cache
chmod 777 /cache/dalvik-cache
mount -o bind /sd-ext/dalvik-cache /cache/dalvik-cache
if [ ! -d /mnt/cache ]; then
mkdir /mnt/cache
fi
if [ ! -d /mnt/cache/recovery ]; then
mkdir /mnt/cache/recovery
fi
chmod 777 /mnt/cache/recovery
if [ -h /cache/recovery ]; then
rm -rf /cache/recovery
mkdir /cache/recovery
chown 1000:2001 /cache/recovery
chmod 777 /cache/recovery
fi
}
############################################
#Trigger, without # =ON with #OFF default=ON
Mount-Dalvik-Cache-to-Cache-folder-and-fix-recovery
##############################################################################################################################################
#This script will check if your EXT has more than 250MB free before DATA move. if no room data will remain in NAND data partition.
#If found 250mb FREE on EXT then you will see light blink. = GREEN ON/OF - RED ON/OFF - GREEN ON/OF - RED ON and OFF when data transfered.
Check-and-move-DATA-To-EXT () {
if [ -e /sd-ext/ext-ok ]; then
echo "checking if you have more than 250MB free on EXT before DATA move." >> /data/mountall-script-debug.sh
echo "checking if you have more than 250MB free on EXT before DATA move."
EXTSIZE=$(df -k /sd-ext | tail -n1 | tr -s ' ' | cut -d ' ' -f4)
if [ $EXTSIZE -gt 250000 ]; then
echo "Cool You have more than 250MB free on EXT partition moving data to EXT"
echo "Cool You have more than 250MB free on EXT partition moving data to EXT" >> /data/mountall-script-debug.sh
sync
sysctl -p
if [ ! -d /sd-ext/data ]; then
mkdir /sd-ext/data
chmod 777 /sd-ext/data
chown 1000:1000 /sd-ext/data
fi
if [ ! -d /data/data ]; then
mkdir /data/data
chmod 777 /data/data
chown 1000:1000 /data/data
fi
echo "Copy Data to EXT" >> /data/mountall-script-debug.sh
echo "Copy Data to EXT"
cd /sd-ext/data
find . ! -name . -prune -type l -exec rm {} \;
cd /data/data
find . ! -name . -prune -type l -exec rm {} \;
cp -a /data/data/* /sd-ext/data/ 2> /dev/null
echo "data moved OK" > /data/data-on-ext-now
echo "GOOD data moved OK"
echo "GOOD data moved OK" >> /data/mountall-script-debug.sh
chmod 444 /data/data-on-ext-now
else
echo "YOU DONT HAVE ROOM FOR DATA ON EXT PARTITION YOU NEED 250MB FREE"
echo "YOU DONT HAVE ROOM FOR DATA ON EXT PARTITION YOU NEED 250MB FREE" >> /data/mountall-script-debug.sh
fi
fi
}
if [ -e /data/data-on-ext-now ]; then
echo "Activating DATA BIND from EXT to DATA"
echo "Activating DATA BIND from EXT to DATA" >> /data/mountall-script-debug.sh
rm -rf /data/data/* 2> /dev/null
mount --bind /sd-ext/data /data/data
echo "You moved the DATA to EXT All OK"
echo "You moved the DATA to EXT All OK" >> /data/mountall-script-debug.sh
sync
sysctl -p
fi
############################################
#Trigger, without # =ON with #OFF default=OFF
#Check-and-move-DATA-To-EXT
##############################################################################################################################################
#Remount Debug to NONE to reduce resource drain.
if [ -e /sys/kernel/debug ]; then
umount /sys/kernel/debug
mount -t debugfs none /sys/kernel/debug
fi
##############################################################################################################################################
#This mod will move system + user APPS + DATA to NAND in case that DATA was moved to EXT!
Mod2-Update () {
if [ -e /sd-ext/ext-ok ]; then
if [ -e /data/data-on-ext-now ]; then
echo "Moving NEW user data to nand to release the SDCARD for RAM Services"
echo "Moving NEW user data to nand to release the SDCARD for RAM Services" >> /data/mountall-script-debug.sh
DATASIZE=$(df -k /data | tail -n1 | tr -s ' ' | cut -d ' ' -f4)
if [ $DATASIZE -gt 70000 ]; then
if [ ! -d /data/data-nand ]; then
mkdir /data/data-nand
chown 1000:1000 /data/data-nand
chmod 777 /data/data-nand
fi
#####################################################################
cd /sd-ext/data
find . ! -name . -prune -type l -exec rm {} \;
#Dorimanx added apps data, new and old.
cp -a com.protocol.x.USB /data/data-nand/ 2> /dev/null
cp -a com.innowebtech.g0t0 /data/data-nand/ 2> /dev/null
cp -a xxbcn.AllAppsOrganizerPlusB /data/data-nand/ 2> /dev/null
cp -a com.fede.launcher /data/data-nand/ 2> /dev/null
cp -a com.nitrodesk.droid20.nitroid /data/data-nand/ 2> /dev/null
cp -a net.xdevelop.rotator* /data/data-nand 2> /dev/null
cp -a com.rechild.advancedtaskkille* /data/data-nand 2> /dev/null
cp -a com.quoord.tapatalk* /data/data-nand 2> /dev/null
cp -a ccc71.bmw.pro /data/data-nand 2> /dev/null
cp -a ccc71.pmw.pro /data/data-nand 2> /dev/null
cp -a com.sebastian.seal /data/data-nand 2> /dev/null
cp -a org.adwfreak.launcher /data/data-nand 2> /dev/null
cp -a net.dinglisch.android.taskerm* /data/data-nand 2> /dev/null
cp -a mobi.mgeek.TunnyBrowser* /data/data-nand 2> /dev/null
cp -a net.rgruet.android.g3watchdog* /data/data-nand 2> /dev/null
cp -a com.dropbox.android* /data/data-nand 2> /dev/null
cp -a com.keramidas.titaniumbackup* /data/data-nand 2> /dev/null
cp -a de.shapeservices.implus* /data/data-nand 2> /dev/null
cp -a uk.co.blueNotify* /data/data-nand 2> /dev/null
cp -a com.handcent.nextsms* /data/data-nand 2> /dev/null
cp -a com.handcent.lang.nextsms* /data/data-nand 2> /dev/null
cp -a com.adobe.flashplayer* /data/data-nand 2> /dev/null
cp -a com.dooblou.WiFiFileExplorer* /data/data-nand 2> /dev/null
cp -a com.maxmpz.audioplayer* /data/data-nand 2> /dev/null
cp -a com.opera.browser* /data/data-nand 2> /dev/null
cp -a com.qs.enhancedemail* /data/data-nand 2> /dev/null
cp -a com.tomanyz.lockWatch* /data/data-nand 2> /dev/null
cp -a com.snapwood.smugfolio* /data/data-nand 2> /dev/null
cp -a com.whatsapp* /data/data-nand 2> /dev/null
cp -a com.infonetservice.phono* /data/data-nand 2> /dev/null
cp -a se.catharsis.android.calendar* /data/data-nand 2> /dev/null
cp -a org.uguess.android.sysinfo.* /data/data-nand 2> /dev/null
cp -a com.alienmanfc6.wheresmydroid* /data/data-nand 2> /dev/null
cp -a com.snowbee.colorize* /data/data-nand 2> /dev/null
cp -a com.netqin.mobileguard* /data/data-nand 2> /dev/null
cp -a org.zeam* /data/data-nand 2> /dev/null
cp -a com.Amazon.kindle* /data/data-nand 2> /dev/null
cp -a com.ebay.mobile* /data/data-nand 2> /dev/null
cp -a com.imdb.mobile* /data/data-nand 2> /dev/null
cp -a org.iii.romulus.meridian* /data/data-nand 2> /dev/null
cp -a com.speedsoftware.rootexplorer* /data/data-nand 2> /dev/null
cp -a hk.suiaing.android.lock.screenlock* /data/data-nand 2> /dev/null
cp -a nextapp.systempanel* /data/data-nand 2> /dev/null
cp -a com.facebook.katana* /data/data-nand 2> /dev/null
cp -a com.abcOrganizer.* /data/data-nand 2> /dev/null
cp -a com.mediawoz.goweather* /data/data-nand 2> /dev/null
cp -a org.gpo.greenpower* /data/data-nand 2> /dev/null
cp -a com.zegoggles.smssync* /data/data-nand 2> /dev/null
cp -a com.swype.android.inputmethod* /data/data-nand 2> /dev/null
cp -a com.it.braincrash.volumeace* /data/data-nand 2> /dev/null
cp -a com.alk.copilot.eumarket.* /data/data-nand 2> /dev/null
cp -a com.sirma.mobile.bible.android* /data/data-nand 2> /dev/null
cp -a com.bt.android.elixir* /data/data-nand 2> /dev/null
cp -a de.stohelit.folderplayer* /data/data-nand 2> /dev/null
cp -a com.osa.android.navdroyd* /data/data-nand 2> /dev/null
cp -a com.carl.tc* /data/data-nand 2> /dev/null
cp -a com.gau.go.* /data/data-nand 2> /dev/null
##########################################################################################################
#User apps data
#Add here you custome apps. use example, cp -a YOUR APP DATA FOLDER /data/data-nand 2> /dev/null
#After you finish adding, REBOOT. your app data will be moved to NAND and files in sd-ext will be deleted.
##########################################################################################################
echo "NEW-data-nand-migrated" >> /data/mountall-script-debug.sh
##########################################################################################################
DATAEXTDELETE=`ls /data/data-nand`;
for c in $DATAEXTDELETE
do
rm -rf /sd-ext/data/$c
done
echo "data-nand-migrated" > /data/data-nand-migrated
#Mount data to /data/data
ln -s /data/data-nand/* /sd-ext/data/
#done
echo "DATA of Migrated to NAND Apps, deleted from sd-ext."
echo "DATA of Migrated to NAND Apps, deleted from sd-ext." >> /data/mountall-script-debug.sh
echo "System DATA and limited app DATA Mounted."
echo "System DATA and limited app DATA Mounted." >> /data/mountall-script-debug.sh
cd /
else
echo "Your data partiotion dont have 70MB FREE for SYSTEM NAND MOD"
echo "Your data partiotion dont have 70MB FREE for SYSTEM NAND MOD" >> /data/mountall-script-debug.sh
fi
else
echo "You didnt moved DATA TO EXT with MOD #1, you cant use MOD #2, first move all data to EXT"
echo "You didnt moved DATA TO EXT with MOD #1, you cant use MOD #2, first move all data to EXT" >> /data/mountall-script-debug.sh
fi
fi
}
##############################################
#Trigger, without # =ON with #OFF default=ON
#This is the MOD #2 Moving NEW DATA for system to use them from NAND to speedup.
#Mod2-Update
##############################################################################################################################################
BOOT-UP-FIX () {
if [ -e /sd-ext/ext-ok ]; then
if [ -e /data/first-boot ]; then
cd /sd-ext/data
find . ! -name . -prune -type l -exec rm {} \;
cp -a /data/data-nand/* /sd-ext/data 2> /dev/null
rm -rf /data/data-nand/* 2> /dev/null
rm -f /data/first-boot 2> /dev/null
echo "dalvik-cache" > /sd-ext/dalvik-cache/cache-ok
fi
fi
}
##############################################
#Trigger, without # =ON with #OFF default=ON
BOOT-UP-FIX
##############################################################################################################################################
DALVIK-CACHE-FIX () {
if [ -e /sd-ext/ext-ok ]; then
if [ ! -e /sd-ext/dalvik-cache/cache-ok ]; then
cd /sd-ext/data
find . ! -name . -prune -type l -exec rm {} \;
cp -a /data/data-nand/* /sd-ext/data 2> /dev/null
rm -rf /data/data-nand/* 2> /dev/null
echo "dalvik-cache" > /sd-ext/dalvik-cache/cache-ok
fi
fi
}
##############################################
#Trigger, without # =ON with #OFF default=ON
DALVIK-CACHE-FIX
##############################################################################################################################################
echo "Fixing System Owners"
busybox chown 0:2000 /system/etc/init.d/*
busybox chown 0:0 /cache
busybox chown 1000:2001 /cache/recovery
busybox chown 1000:1000 /cache/dalvik-cache
busybox chown 1000:2001 /cache/recovery
busybox chown 1000:1000 /dev/smd27
busybox chown 0:0 /dev
busybox chown 0:0 /system/lib/*
busybox chown 0:0 /system/lib/hw/*
busybox chown 0:2000 /dev/cpu_dma_latency
echo "Fixing System permissions"
busybox chmod 777 /dev/smd27
busybox chmod 755 /dev
busybox chmod 777 /dev/cpu_dma_latency
busybox chmod 755 /system/etc/init.d/*
busybox chmod 644 /system/etc/gps.conf
busybox chmod 644 /system/etc/hosts
busybox chmod 644 /system/etc/sysctl.conf
busybox chmod 777 /system/lib/*
busybox chmod 777 /system/lib/hw/*
busybox chmod 755 /system/lib/egl/*
busybox chmod 644 /system/build.prop
busybox chmod 777 /cache/ -R
echo "DONE"
##############################################################################################################################################
#This will copy the SU to xbin also and remove the simlink
CopyRoot () {
#Checking and fixing ROOT
rm -rf /system/xbin/su
cp /system/bin/su /system/xbin/
chmod 6777 /system/xbin/su
chown 0:0 /system/xbin/su
#Done
}
############################################
#Trigger, without # =ON with #OFF default=ON
CopyRoot
##############################################################################################################################################
#This is ZIP Align Script. it's will fix all the apps in /system/app and in /sd-ext/app every boot, already alinged apps will not be checked again.
#Temp dir is on SDCARD to give all big apps a chance to be fixed.
ZIPALIGN () {
echo "Activating zipalign for all apps"
echo "Activating zipalign for all apps" >> /data/mountall-script-debug.sh
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.dba
SYSTEM=$(mount|grep "/system "|awk '{ print $1 }')
[ -e $LOG_FILE ] && rm $LOG_FILE
[ -f $ZIPALIGNDB ] || touch $ZIPALIGNDB
MissingApps=`cat /data/zipalign.dba | grep eu.chainfire.cf3d`
if [ $MissingApps !=eu.chainfire.cf3d ]; then
echo "/data/app/eu.chainfire.cf3d-1.apk" >> /data/zipalign.dba
echo "adding Missing APPS"
else
echo "Missing Apps Already Added"
fi
echo "Starting Dorimanx Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
mount -t vfat /dev/block/vold/179:1 /mnt/sdcard
for DIR in /system/app /data/app ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
if [ ! -d /mnt/sdcard/zipalign ]; then
mkdir /mnt/sdcard/zipalign
chmod 777 /mnt/sdcard/zipalign
fi
zipalign -f 4 $APK /mnt/sdcard/zipalign/$APK
cp -a /mnt/sdcard/zipalign/$APK $APK
rm -f /mnt/sdcard/zipalign/$APK
chmod 644 /system/app/*
chmod 644 /data/app/*
chown 1000:1000 /system/app/*
chown 1000:1000 /data/app/*
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done
done
touch $ZIPALIGNDB
umount /mnt/sdcard
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
echo "Automatic ZipAlign finished" >> /data/mountall-script-debug.sh
}
############################################
#Trigger, without # =ON with #OFF default=ON
ZIPALIGN
##############################################################################################################################################
echo "Writing debug info for dorimanx support. file name /data/mountall-script-debug.sh, post it if you have problems"
if [ -d /sd-ext/data ] && [ -e /data/data-on-ext-now ]; then
echo "DATA IS ON EXT MOD #1 ONLINE" >> /data/mountall-script-debug.sh
else
echo "DATA IS ON NAND, MOD #1 is OFFLINE" >> /data/mountall-script-debug.sh
fi
if [ -e /data/data-nand-migrated ]; then
echo "System DATA and Choosen DATA migrated to NAND, MOD #2 ONLINE" >> /data/mountall-script-debug.sh
else
echo "MOD #2 not activated"
fi
echo "Starting the Android Virtual Machine, let the HIGH POWER be with you, ROM DEV DORIMANX"
echo "Starting the Android Virtual Machine, let the HIGH POWER be with you, ROM DEV DORIMANX" >> /data/mountall-script-debug.sh
echo "Pre BOOT finish" >> /data/mountall-script-debug.sh
date >> /data/mountall-script-debug.sh
start
# execute any postinstall script then kill it
if [ -e /data/firstboot.sh ];
then
log -p i -t boot "Executing firstboot.sh..";
logwrapper /system/bin/sh /data/firstboot.sh;
rm -f /data/firstboot.sh;
fi;
echo "ALL DONE, END OF FILE"
sleep 2
echo 0 > /sys/devices/platform/leds-microp/leds/amber/brightness
sleep 2
exit 1
MY /BOOT/initrd.gz changes:
init.htcleo.rc (all credits to Tytung!!! i just make some edits)
init.rc (all credits to Tytung!!! i just make some edits)
logo.lge
To Extract the initrd.gz
copy the initrd.gz to sdcard
mkdir /initdir
cd /initdir
cp /sdcard/initrd.gz /initdir
chmod 777 initrd.gz
chown 0:0 initrd.gz
zcat initrd.gz | cpio -i -d
rm initrd.gz
EDIT What you want!
Pack the files back to initrd.gz
find . | cpio -o -H newc | gzip -9 > initrd.gz
you can then use this initrd.gz for MAG ROM (copy to boot inside ROM zip)
Or you need to compile it with the kernel module for CLK!
HOW to Compile CLK boot.img
take the zImage , initrd.gz , mkbootimg, and copy to ANY Linux BOX not the PHONE!!!
i used Centos 5
and winscp to transfer files to linux box.
mkdir /clkboot
Copy all 3 files to /clkboot
cd /clkboot
chown 0:0 *
chmod 777 *
run this:
mkbootimg --kernel zImage --ramdisk initrd.gz --cmdline "console=null" --base 0x11800000 -o boot.img
ls -la
you will see the new boot.img
copy in to main root dir on zipped CLK rom.
i will attach the mkbootimg as zip extract it when copying to Linux box.
also there are 2 more files.
repack-bootimg.pl
and
unpack-bootimg.pl
one of them unpack the boot.img extract the initrd.gz + kernel.gz (create folder with all files only for initrd.gz)
and the repack-bootimg.pl will get all back to boot-new.img (in rom folder it's should be as boot.img)
HAVE FUN!
​
wWOWOO Im going to test now!! Cant wati but are the recovery partitions in the rom or are they 150 and cache 5?
Edit: Bootanimation is craZY1!!!! really nice one!!
oh and rom fast as lightning!!
Hi man, I download 2.5.0 now, I will try for swap.
Your too fast man, your too fast....
All right lets have some fun
Just flashed new v2.5.0
You have tried the rest now get ready to try the best!
From my HD2 with Dorimanx Nandroid
New sheriff in town, let's play
I do not use the swap,so is that right for me to choose the HIHG-END rom?
err sorry but what does SWAP do?
shendan said:
I do not use the swap,so is that right for me to choose the HIHG-END rom?
Click to expand...
Click to collapse
LOL....
Post 1:
"if you don't have SWAP then install the REVERT to LIGHT after installing my ROM via CWM before you reboot."
dogntbone said:
err sorry but what does SWAP do?
Click to expand...
Click to collapse
Swap is a sort of ram exension on SDCARD, so you have "more" ram, so more speed for application.
Dorimanx rom is the fastest rom I have ever tried. It works perfectly but, Dorimanx, you have to quickly update your post with all the things new users have to do for creating swap, manage app in ram and so on, because without that, I thnk some people will be in trouble to use your rom as I am at start of using Hig end.
Edit : Oups...Dorimanx : swap not activated on 2.5.0. Trying swapon -a : answer /etc/fstab no such file or directory...Mistake is mine or yours?
the only tweaks that i need for cm7 is tablet tweaks(the soft keys) with percentual battery and your skin(great lookin theme).. it is possible to install Framework-res-TabletTweak-130711+MY-SKIN.zip with Typhoon 3.4.0 or it is not compatible ?
Manual Network selection does not work..it says "Error while searching for networks". This is of much importance to me as i live close to Croatian border and their signal is stronger in certain places in my home.
Other than that, this rom just flies!
feanor91 said:
Swap is a sort of ram exension on SDCARD, so you have "more" ram, so more speed for application.
Dorimanx rom is the fastest rom I have ever tried. It works perfectly but, Dorimanx, you have to quickly update your post with all the things new users have to do for creating swap, manage app in ram and so on, because without that, I thnk some people will be in trouble to use your rom as I am at start of using Hig end.
Click to expand...
Click to collapse
Thanks,
YES i am working on update all needed info!
SO PEOPLE IF YOU DON'T HAVE SWAP INSTALL THE LIGHT REVERT!!!!
stirkac said:
Manual Network selection does not work..it says "Error while searching for networks". This is of much importance to me as i live close to Croatian border and their signal is stronger in certain places in my home.
Other than that, this rom just flies!
Click to expand...
Click to collapse
OK this is good feedback!
You are using the CLK i guess!
Then something wrong with kernel.
I will revert back to STABLE one that working for all.
I will post new CLK ROM soon.
Thanks!
Thanks for the rom been trying it out and most of it works I just get random reboots on the 2.4.6 other than that all seem well. I will be updating to latest and hope it will go away.
On a side note is there any way you can make that we can revert to stock theme??
Toda for taking the time to help us all out.
Sent from my HTC HD2 using XDA Premium App
What size must have a swap partition? 2x RAM?
I am running on clk with 2.5.0 and I also have swap partition (created through CWM as in your description), but since 2.4.6 and also in 2.5.0 when I type "free" I have "0 0 0" for swap partition, also /system/etc/fstab" doesn't exist.
I did a completely clean installation of 2.5.0, no data partition, nothing.
Any idea?
Update: I now have the swap file by executing your "swap.sh" file from your instructions page. But I thought, this isn't neccessary with your own roms?
bigbadmoshe said:
Thanks for the rom been trying it out and most of it works I just get random reboots on the 2.4.6 other than that all seem well. I will be updating to latest and hope it will go away.
On a side note is there any way you can make that we can revert to stock theme??
Toda for taking the time to help us all out.
Sent from my HTC HD2 using XDA Premium App
Click to expand...
Click to collapse
I will make revert to stock theme zip file!
check in my mirrors in 10 minutes!

[TIP][TRICK][SCRIPT] ISD for Link2SD #2P, ESD as ISD, 300MB ESD, VM#, NTP.

Thank you, for taking the time to put this together for the E4GT community. Nice work
Great. I always wanted to know how to do it.
I decided to write a script to do this automatically.
[size=+1]As before, I provide this with no warranties or guarantees. Use at your own risk. Make a NAND backup of at least System and Data before attempting.[/size]
The script assumes you have busybox and root access.
The script does not check for supported hardware. It has only been tested on the SPH-D710.
The script will check for /mnt/sdcard/external_sd, /mnt/emmc, and /mnt/sd-ext and that at least one is mounted. It bails otherwise. If your external SD card is mounted elsewhere, you can add it to line 9 of the script file (`mountpoint <real path to external SD (no symlinks)>`).
This script must be executed from a live boot (ie, not from recovery) using either Root Explorer, Scripter, a terminal emulator, ADB, or anything else that will run scripts as root.
The file must be on an EXT# partition (just put it in /data and you'll be fine) with 777 permissions unless you're using Scripter.
The script backs up your vold.fstab file to /data/vold.fstab.bak. If the backup file exists, the script will restore it, delete the Link2SD file, and delete the backup file.
Executing the script from Recovery is not advisable.
Executing the script after it has already been executed and the backup file no longer exists is also not advisable.
Your phone will reboot immediately after the script has executed.
Method 1 (terminal emulator or ADB shell):
Put the file from the zip into the /data directory.
Use the following commands from the shell:
Code:
su
chmod 777 /data/eg.link2sd.sh
sh /data/eg.link2sd.sh
Method 2 (Root Explorer | Root Browser):
Put the file from the zip into the /data directory.
Long tap the file, click "Permissions", check every box (the bottom row (there are only two boxes in that row) can be unchecked), and tap Ok.
Tap the file and tap "Execute".
Method 3 (Scripter):
Put the file from the zip wherever, but remember where.
Open Scripter, tap the "+", tap "Import", find the file, and tap it.
Tap the file in the list, tap "Run script", make sure "Execute script as root" is checked, and tap "Execute".
The full script:
Code:
#!/system/bin/sh
LOG=/data/testlog.log
VTEMP=/data/eg.vold.fstab
LTEMP=/data/eg.11link2sd
TEMPFILE=/data/eg.temp
BVOLD=/data/vold.fstab.bak
EXTMOUNTED=""
for N in `mountpoint /mnt/emmc` `mountpoint /mnt/sdcard/external_sd` `mountpoint /mnt/sd-ext`
do
if [ $N ]; then
echo "Found external card. ($N)";
EXTMOUNTED="Yes";
break;
fi
done
if [ ! $EXTMOUNTED ]; then
echo "Can't find external SD card. Make sure it's inserted and mounted and try again.";
exit;
fi
mount -o remount,rw /system
# System files
MOUNTPOINTS=/proc/mounts
VOLD=/system/etc/vold.fstab
LINK2SD=/system/etc/init.d/11link2sd
EXTPATH="";
EXTDEV="";
INTPATH="";
INTDEV="";
LINK2SDPATH="";
LINK2SDDEV="";
x=0;
while [ $x -lt $(cat $MOUNTPOINTS | wc -l) ]
do
let x=x+1;
LINE=`head -n $x $MOUNTPOINTS | tail -n 1`;
DEVICE=`echo "$LINE" | cut -d' ' -f1`;
POINT=`echo "$LINE" | cut -d' ' -f2`;
if [ $POINT = "/mnt/sdcard/external_sd" ] || [ $POINT = "/mnt/emmc" ] || [ $POINT = "/mnt/sd-ext" ]; then # It's the external SD
EXTPATH=$POINT;
EXTDEV=$DEVICE;
elif [ $POINT = "/mnt/sdcard" ]; then
INTPATH=$POINT;
INTDEV=$DEVICE;
elif [ $POINT = "/data/sdext2" ]; then
LINK2SDPATH=$POINT;
LINK2SDDEV=$DEVICE;
fi
done
if [ -f $BVOLD ]; then
echo "Restoring backup. ($BVOLD > $VOLD, '' > $LINK2SD)";
cp $BVOLD $VOLD;
rm $LINK2SD;
rm $BVOLD;
exit;
else
echo "Making backup. ($VOLD > $BVOLD)";
cp $VOLD $BVOLD;
fi
if [ $EXTPATH ] && [ $EXTDEV ]; then
echo "External SD ==";
echo "$EXTPATH: $EXTDEV";
fi
if [ $INTPATH ] && [ $INTDEV ]; then
echo "Internal SD ==";
echo "$INTPATH: $INTDEV";
fi
if [ $LINK2SDPATH ] && [ $LINK2SDDEV ]; then
echo "Link2SD ==";
echo "$LINK2SDPATH: $LINK2SDDEV";
fi
echo "" > $VTEMP;
echo "" > $LTEMP;
echo "" > $TEMPFILE;
echo "#!/system/bin/sh" > $LTEMP;
echo "#added by link2sd" >> $LTEMP;
echo "LOG=/data/link2sd-11link2sd.log" >> $LTEMP;
echo "echo \"\$(date) mounting...\" > \$LOG" >> $LTEMP;
echo "" >> $LTEMP;
VEXT="";
VINT="";
x=0;
while [ $x -lt $(cat $VOLD | wc -l) ]
do
let x=x+1;
LINE=`head -n $x $VOLD | tail -n 1`;
ACTION=`echo "$LINE" | cut -d' ' -f1`;
DEVID=`echo "$LINE" | cut -d' ' -f2`;
POINT=`echo "$LINE" | cut -d' ' -f3`;
PART=`echo "$LINE" | cut -d' ' -f4`;
DEVICE=`echo "$LINE" | cut -d' ' -f5`;
if [ "$POINT" = "$EXTPATH" ]; then # It's the external SD
echo "#$LINE" >> $TEMPFILE;
echo "INT 1" >> $TEMPFILE;
VEXT="$ACTION $DEVID $INTPATH $PART $DEVICE";
elif [ "$POINT" = "$INTPATH" ]; then
echo "#$LINE" >> $TEMPFILE;
echo "EXT 1" >> $TEMPFILE;
VINT="$ACTION $DEVID $EXTPATH 12 $DEVICE";
echo "mount -t vfat -o rw /dev/block/mmcblk0p$PART /data/sdext2 1>>\$LOG 2>>\$LOG" >> $LTEMP;
else
echo "$LINE" >> $TEMPFILE;
fi
done
x=0;
while [ $x -lt $(cat $TEMPFILE | wc -l) ]
do
let x=x+1;
LINE=`head -n $x $TEMPFILE | tail -n 1`;
ACTION=`echo "$LINE" | cut -d' ' -f1`;
if [ "$ACTION" = "EXT" ] && [ "$VEXT" ]; then
echo "$VEXT" >> $VTEMP;
elif [ "$ACTION" = "INT" ] && [ "$VINT" ]; then
echo "$VINT" >> $VTEMP;
else
echo "$LINE" >> $VTEMP;
fi
done
echo "" >> $LTEMP;
echo "mount >> $LOG" >> $LTEMP;
echo "\"\$(date) mount finished\" >> \$LOG" >> $LTEMP;
cp $LTEMP $LINK2SD;
cp $VTEMP $VOLD;
rm $LTEMP;
rm $VTEMP;
rm $TEMPFILE;
chmod 777 $LINK2SD;
mount -o remount,ro /system
reboot;
I can't seem to get this to work without errors and system app crashes on Stock rooted JB 4.1.2.
Nice write up. Thanks for the time spent to put this together
E4GT Rom-a-holic!!!
egingell said:
I can't seem to get this to work without errors and system app crashes on Stock rooted JB 4.1.2.
Click to expand...
Click to collapse
Someone smarter than me can validate or disprove my answer here, but I believe JB has different file system mount points than ICS. (he said he did this on BK)
CyberpodS2 said:
Someone smarter than me can validate or disprove my answer here, but I believe JB has different file system mount points than ICS. (he said he did this on BK)
Click to expand...
Click to collapse
You are correct. JB has a different pre load set up. I think you are rite...this was created on the ICS Kuban.
E4GT Rom-a-holic!!!
CyberpodS2 said:
Someone smarter than me can validate or disprove my answer here, but I believe JB has different file system mount points than ICS. (he said he did this on BK)
Click to expand...
Click to collapse
robrooter said:
You are correct. JB has a different pre load set up. I think you are rite...this was created on the ICS Kuban.
E4GT Rom-a-holic!!!
Click to expand...
Click to collapse
That's just it, it works fine, but System, Settings, and some other system apps crash consistently while the internal sdcard is mounted to Link2SD's directory and the external sdcard mounted in its place. I even made sure to edit my scripts to change where the external and internal would be remounted to (it's /storage/sdcard0 and /storage/extSdCard respectively).
P.S.: It's 4.2 that changes how mounts are seen by or accessible to apps.
Edit: To clarify, the directories get successfully changed around as intended.
Edit 2: Oh, and the phone reboots itself after a few minutes. I had to fix it via Recovery with ADB because the phone wouldn't stay up long enough to do it the normal* way. * Transferring files to the SD card via USB and moving them to their proper destinations via Root Explorer.
I figured out why I was having a problem. I was mounting /dev/block/mmcblk0p12 to /storage/extSdCard. The problem is that Android 4.1.2 stock uses /dev/block/mmcblk0p12 as "overflow" for system apps.
I am currently unwilling to test this on my phone at this time. My setup would require /dev/block/mmcblk0p11 to be an EXT4 file system which, judging by what I see in init.rc, is going to get reformatted as exFAT on boot. Besides, Link2SD has since been fixed to find the second partition on the external SD card for the SGS2.
I have successfully mounted my internal SD card to /data/sdext2, mounted my external SD card to /storage/sdcard0, and bound /storage/sdcard0 to /storage/extSdCard (for backward compatibility) using the following scripts.
[size=+1]I provide this information with no warranties or guarantees and I only tested it on the Sprint Epic 4G Touch with stock rooted Jelly Bean 4.1.2. Use it at your own risk.[/size]
Requires:
root
busybox
basic knowledge of shell scripts and Linux (not necessarily required, but it doesn't hurt)
Notes:
Make sure /system/etc/init.d/12binds, /system/bin/debuggerd, and /system/bin/debuggerd.bin are executable. Just to be safe, you can execute this from a terminal emulator (the asterisk will make it get multiple files at the same time).
Code:
mount -o remount,rw /system
chmod 755 /system/bin/debuggerd*
chmod 755 /system/etc/init.d/12binds
mount -o remount,ro /system
The reason I converted my SD card to EXT4 is so I can move&bind internal app data (the stuff in /data/data/app.package.name) to /data/sdext2/data/app.package.name and preserve file permissions. exFAT does not support this.
Terminal emulator - Executing this command will wipe the SD card and convert it to EXT4. This is optional:
Code:
mkfs.ext2 /dev/block/mmcblk0p11
/system/etc/vold.fstab
Code:
[color=green]## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
## storage_struct - ex) series, "/mnt/sdcard/extStorages" / parallel
######################
# internal sdcard[/color]
{
ums_sys_path = /sys/class/android_usb/f_mass_storage/lun0/file
secure_format = enable
discard = enable
}
[color=green]#dev_mount sdcard /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 encryptable_nonremovable[/color]
dev_mount sdcard /storage/sdcard0 1 /devices/virtual/block/cyasblkdevblk0
[color=green]# external sdcard[/color]
{
ums_sys_path = /sys/class/android_usb/f_mass_storage/lun1/file
android_secure_containers = enable
}
[color=green]# This partition is 300MB (the smallest I could make it using MiniTool Partition
# Widard) and is [b]not[/b] set to active. It does not mount, which is how I want it. I know
# I'm wasting 300MB of disk space, but that's ok by me.
# This line is here to prevent "damaged SD card" errors.[/color]
dev_mount sdcard1 /storage/extSdCard 2 /devices/virtual/block/cyasblkdevblk0
/system/bin/debuggerd - Make sure you rename the original to /system/bin/debuggerd.bin if you haven't already done so.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/link2sd-debuggerd.log
echo "$(date) mounting..." > $LOG
[color=green]# Delete or comment out this line if you want to make your external SD card into
# an internal and external SD card (both partitions set to active).
# I have not tried setting both partitions on my external SD card to active, so
# I don't know if they will both mount.
# This line binds the internal SD card's directory to the external SD card's
# directory. In other words both internal and external SD cards will be
# the same physical media. You will have duplicates in Music and Gallery.
# If you are not concerned with backward compatibility, you
# can delete or comment out this line.[/color]
mount -o bind /storage/sdcard0 /storage/extSdCard 1>>$LOG 2>>$LOG
[color=green]# Change "ext4" to "vfat" if you did not convert your internal SD card to EXT4.[/color]
mount -t ext4 -o rw,noatime,barrier=0,nobh,errors=continue /dev/block/mmcblk0p11 /data/sdext2 1>>$LOG 2>>$LOG
echo "" >> $LOG
echo "init.d" >> $LOG
[color=green]# Leave this line in if you want init.d support.[/color]
busybox run-parts /system/etc/init.d 1>>$LOG 2>>$LOG
echo "" >> $LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
/system/etc/init.d/12binds - This is optional and requires more work than you might think and requires your internal card be EXT4, exFAT will not work. It also requires the "run-parts" line in /system/bin/debuggerd.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/symlink.log;
echo "Symlink" > $LOG
busybox mount -o rw,remount /system
busybox mount -o rw,remount /
cd /data/sdext2/data/
for APP in *; do
cd /data/sdext2/data/$APP;
for DIR in *; do
if [ $DIR != "lib" ]; then # don't bind the lib folder, Link2SD does stuff with it.
echo "" 1>>$LOG 2>>$LOG;
echo "Binding /data/sdext2/data/$APP/$DIR => /data/data/$APP/$DIR" 1>>$LOG 2>>$LOG;
mount -o bind "/data/sdext2/data/$APP/$DIR" "/data/data/$APP/$DIR" 1>>$LOG 2>>$LOG;
fi
done
done
busybox mount -o ro,remount /system
busybox mount -o ro,remount /
Make sure it is executable (chmod 755 /system/etc/init.d/12binds)
To make the above work:
If this is too much for you, don't do it.
Copy /data/data/app.package.name to /data/sdext2/data or if the folder already exists in /data/sdext2/data, copy the contents of /data/data/app.package.name to /data/sdext2/data/app.package.name. Use Root Explorer or any other root file explorer that will preserve the owner of the files and their permissions. Do not use the "move" option or you will be making new folders and trying to figure out what the owner and group should be!
Open each folder except lib in /data/data/app.package.name and delete everything in them.
Execute /system/etc/init.d/12binds or reboot.
I bought an SGS4 and promptly broke the SD card I got for it, so I took the one from my S2 and put it in the S4. I then changed the vold.fstab file back to stock. Unfortunately since the internal SD card is EXT formatted, it won't mount as an SD card. This means that any app that relies on the SD card may not work. Apps that use the path work if I mount the SD card via shell script, but there's a caveat: the files that get put there (e.g. $sdcard/Android/data/<app name>/cache/<stuff>) have their owner/group set to that of the app and no other app can use it without changing the files' owner, group, and permissions first. Camera and Gallery apps won't work at all regardless of whether or not I mount the SD card, at least not the ones I've tried (stock camera and gallery, Camera ICS, Gallery ICS, and Social Gallery). Otherwise the phone works fine without error.
Edit: If I mount a temporary file system (mount -t tmpfs /dev/null /storage/sdcard0), I can get the Camera to work, but the Gallery still complains and any pictures get deleted after reboot. This gave me an idea, though: mount the tmpfs and then bind /data/sdext2 to /storage/sdcard0. This worked, for the most part. Gallery apps still don't like it, but the Camera works. I still have to change the owner, group, and permissions to be able to do anything with pics.
For the record, this seems to work the best:
Code:
chown media_rw:media_rw /data/sdext2
chown media_rw:media_rw /data/sdext2/DCIM
chown media_rw:media_rw /data/sdext2/DCIM/*
chown media_rw:media_rw /data/sdext2/DCIM/Camera/*
chmod -r 775 /data/sdext2
/system/bin/debuggerd
Code:
#!/system/bin/sh
LOG=/data/debuggerd.log
echo "$(date) mounting..." > $LOG
mount -t ext4 -o rw,noatime,barrier=0,nobh,errors=continue /dev/block/mmcblk0p11 /data/sdext2 1>>$LOG 2>>$LOG
mount -t tmpfs /dev/null /storage/sdcard0 1>>$LOG 2>>$LOG
mount -o bind /data/sdext2 /storage/sdcard0 1>>$LOG 2>>$LOG
echo "" >> $LOG
echo "init.d" >> $LOG
/system/xbin/busybox run-parts /data/local/init.d 1>>$LOG 2>>$LOG
echo "" >> $LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
I could change it back to exFAT, but I don't wanna.
egingell said:
I decided to write a script to do this automatically.
[size=+1]As before, I provide this with no warranties or guarantees. Use at your own risk. Make a NAND backup of at least System and Data before attempting.[/size]
The script assumes you have busybox and root access.
The script does not check for supported hardware. It has only been tested on the SPH-D710.
The script will check for /mnt/sdcard/external_sd, /mnt/emmc, and /mnt/sd-ext and that at least one is mounted. It bails otherwise. If your external SD card is mounted elsewhere, you can add it to line 9 of the script file (`mountpoint <real path to external SD (no symlinks)>`).
This script must be executed from a live boot (ie, not from recovery) using either Root Explorer, Scripter, a terminal emulator, ADB, or anything else that will run scripts as root.
The file must be on an EXT# partition (just put it in /data and you'll be fine) with 777 permissions unless you're using Scripter.
The script backs up your vold.fstab file to /data/vold.fstab.bak. If the backup file exists, the script will restore it, delete the Link2SD file, and delete the backup file.
Executing the script from Recovery is not advisable.
Executing the script after it has already been executed and the backup file no longer exists is also not advisable.
Your phone will reboot immediately after the script has executed.
Method 1 (terminal emulator or ADB shell):
Put the file from the zip into the /data directory.
Use the following commands from the shell:
Code:
su
chmod 777 /data/eg.link2sd.sh
sh /data/eg.link2sd.sh
Method 2 (Root Explorer | Root Browser):
Put the file from the zip into the /data directory.
Long tap the file, click "Permissions", check every box (the bottom row (there are only two boxes in that row) can be unchecked), and tap Ok.
Tap the file and tap "Execute".
Method 3 (Scripter):
Put the file from the zip wherever, but remember where.
Open Scripter, tap the "+", tap "Import", find the file, and tap it.
Tap the file in the list, tap "Run script", make sure "Execute script as root" is checked, and tap "Execute".
The full script:
Code:
#!/system/bin/sh
LOG=/data/testlog.log
VTEMP=/data/eg.vold.fstab
LTEMP=/data/eg.11link2sd
TEMPFILE=/data/eg.temp
BVOLD=/data/vold.fstab.bak
EXTMOUNTED=""
for N in `mountpoint /mnt/emmc` `mountpoint /mnt/sdcard/external_sd` `mountpoint /mnt/sd-ext`
do
if [ $N ]; then
echo "Found external card. ($N)";
EXTMOUNTED="Yes";
break;
fi
done
if [ ! $EXTMOUNTED ]; then
echo "Can't find external SD card. Make sure it's inserted and mounted and try again.";
exit;
fi
mount -o remount,rw /system
# System files
MOUNTPOINTS=/proc/mounts
VOLD=/system/etc/vold.fstab
LINK2SD=/system/etc/init.d/11link2sd
EXTPATH="";
EXTDEV="";
INTPATH="";
INTDEV="";
LINK2SDPATH="";
LINK2SDDEV="";
x=0;
while [ $x -lt $(cat $MOUNTPOINTS | wc -l) ]
do
let x=x+1;
LINE=`head -n $x $MOUNTPOINTS | tail -n 1`;
DEVICE=`echo "$LINE" | cut -d' ' -f1`;
POINT=`echo "$LINE" | cut -d' ' -f2`;
if [ $POINT = "/mnt/sdcard/external_sd" ] || [ $POINT = "/mnt/emmc" ] || [ $POINT = "/mnt/sd-ext" ]; then # It's the external SD
EXTPATH=$POINT;
EXTDEV=$DEVICE;
elif [ $POINT = "/mnt/sdcard" ]; then
INTPATH=$POINT;
INTDEV=$DEVICE;
elif [ $POINT = "/data/sdext2" ]; then
LINK2SDPATH=$POINT;
LINK2SDDEV=$DEVICE;
fi
done
if [ -f $BVOLD ]; then
echo "Restoring backup. ($BVOLD > $VOLD, '' > $LINK2SD)";
cp $BVOLD $VOLD;
rm $LINK2SD;
rm $BVOLD;
exit;
else
echo "Making backup. ($VOLD > $BVOLD)";
cp $VOLD $BVOLD;
fi
if [ $EXTPATH ] && [ $EXTDEV ]; then
echo "External SD ==";
echo "$EXTPATH: $EXTDEV";
fi
if [ $INTPATH ] && [ $INTDEV ]; then
echo "Internal SD ==";
echo "$INTPATH: $INTDEV";
fi
if [ $LINK2SDPATH ] && [ $LINK2SDDEV ]; then
echo "Link2SD ==";
echo "$LINK2SDPATH: $LINK2SDDEV";
fi
echo "" > $VTEMP;
echo "" > $LTEMP;
echo "" > $TEMPFILE;
echo "#!/system/bin/sh" > $LTEMP;
echo "#added by link2sd" >> $LTEMP;
echo "LOG=/data/link2sd-11link2sd.log" >> $LTEMP;
echo "echo \"\$(date) mounting...\" > \$LOG" >> $LTEMP;
echo "" >> $LTEMP;
VEXT="";
VINT="";
x=0;
while [ $x -lt $(cat $VOLD | wc -l) ]
do
let x=x+1;
LINE=`head -n $x $VOLD | tail -n 1`;
ACTION=`echo "$LINE" | cut -d' ' -f1`;
DEVID=`echo "$LINE" | cut -d' ' -f2`;
POINT=`echo "$LINE" | cut -d' ' -f3`;
PART=`echo "$LINE" | cut -d' ' -f4`;
DEVICE=`echo "$LINE" | cut -d' ' -f5`;
if [ "$POINT" = "$EXTPATH" ]; then # It's the external SD
echo "#$LINE" >> $TEMPFILE;
echo "INT 1" >> $TEMPFILE;
VEXT="$ACTION $DEVID $INTPATH $PART $DEVICE";
elif [ "$POINT" = "$INTPATH" ]; then
echo "#$LINE" >> $TEMPFILE;
echo "EXT 1" >> $TEMPFILE;
VINT="$ACTION $DEVID $EXTPATH 12 $DEVICE";
echo "mount -t vfat -o rw /dev/block/mmcblk0p$PART /data/sdext2 1>>\$LOG 2>>\$LOG" >> $LTEMP;
else
echo "$LINE" >> $TEMPFILE;
fi
done
x=0;
while [ $x -lt $(cat $TEMPFILE | wc -l) ]
do
let x=x+1;
LINE=`head -n $x $TEMPFILE | tail -n 1`;
ACTION=`echo "$LINE" | cut -d' ' -f1`;
if [ "$ACTION" = "EXT" ] && [ "$VEXT" ]; then
echo "$VEXT" >> $VTEMP;
elif [ "$ACTION" = "INT" ] && [ "$VINT" ]; then
echo "$VINT" >> $VTEMP;
else
echo "$LINE" >> $VTEMP;
fi
done
echo "" >> $LTEMP;
echo "mount >> $LOG" >> $LTEMP;
echo "\"\$(date) mount finished\" >> \$LOG" >> $LTEMP;
cp $LTEMP $LINK2SD;
cp $VTEMP $VOLD;
rm $LTEMP;
rm $VTEMP;
rm $TEMPFILE;
chmod 777 $LINK2SD;
mount -o remount,ro /system
reboot;
Click to expand...
Click to collapse
[email protected]_a51dtul:/ # sh /data/eg.link2sd.sh
sh /data/eg.link2sd.sh
/data/eg.link2sd.sh[16]: mountpoint: not found
/data/eg.link2sd.sh[16]: mountpoint: not found
/data/eg.link2sd.sh[16]: mountpoint: not found
Can't find external SD card. Make sure it's inserted and mounted and try again.
[email protected]_a51dtul:/ #
plz help.........my sd card second partion ext4
He... Plz help link2sd not work for htc 820 dual sim lolypop 5.0.2 full rooted or busybox.
Link2sd problem-any apps link success all linked but big problem just manually restart my phone show link2sd error mount open link 2sd and tap quckreboot, but not apps linked show my desktop alwas error view and mount script alwas error.
Plz help....how to work link2sd apps linked and mount script for lolypop 5.0.2 htc 820 dual
That script was written for the Galaxy S2 with ICS. You'll have to modify it to work in whatever device and OS you have and I don't have either of them, so you're on your own.
Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
egingell said:
That script was written for the Galaxy S2 with ICS. You'll have to modify it to work in whatever device and OS you have and I don't have either of them, so you're on your own.
Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
Click to expand...
Click to collapse
Mods like this eventually burn out extsdcards, when that happens the device won't boot, they also don't work without the modified sdcard inserted. If it ever burns out it is nearly impossible to get the device working again. Just a heads up.
Change Default VM Number in Lollipop
XDA Thread
Sent from: SGS5 - LP 5.1.1 / SGS4 - LP 5.0.1
Google seems to have closed outbound connections to the NTP port (123). Lucky, one can easily reopen it with the following script. Execute it as root post-boot with ROM Toolbox or similar.
Code:
#!/system/bin/sh
iptables -A OUTPUT -p udp --dport 123 -j ACCEPT
Edit: So it turns out that init.d is too soon. It must be executed post-boot using a script executer like ROM Toolbox, Tasker, Script Manager, etc.
Sent from: SGS5 - LP 5.1.1 / SGS4 - LP 5.0.1

Reset Warning Flags for E9+

Hello all,
Please help me to reset warning flags for my E9+, in order to send it to HTC. My battery is overheating and the phones turns off, despite the fact it is not warm outside. I presume a temperature sensor is not functioning correctly or a faulty battery cell...
I have S-off, I changed the SuperCID in HTC__621, the original one, I flashed the proper TW RUU, but I need the commands to get rid of "UNLOCKED" and "Status software:Modified" things...
I found the adb commands for M8, M9, M7, but not for E9+...
Can somebody share these to me, please?
Thanks
After a sleepless night, I found the command on a chinese forum. I share it with you now:
adb shell
su
echo -ne '\x00' | dd of=/dev/block/mmcblk0p11 bs=1 seek=39940
Worked perfect for me! I'm back to status "official"!
And for locking/unlocking bootloader (not tested yet) :
adb shell
su
Locked
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p9 bs=1 seek=33796
Unlock
echo -ne 'HTCU' | dd of=/dev/block/mmcblk0p9 bs=1 seek=33796
Relock
echo -ne 'HTCL' | dd of=/dev/block/mmcblk0p9 bs=1 seek=33796

Categories

Resources