Related
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
i'm pretty sure that the most recent builds of CM do A2SD in the same fashion that Froyo implemented it.
Meaning that the apps run off your SD off the main partition, making the EXT 2/3/4 unnecessary.
The main difference between CM's version and the stock version of A2SD right now is that CM has implemented a way to get all apps unlocked to be able to go to your SD card, and not just the ones that have been enabled by the market publisher.
in general, there is no reason to keep the EXT partition on your card anymore if you are running CM. You can just reformat it and get that precious disk space back.
Hmm. Well that sucks. I always liked the Ext A2SD because it loaded much faster. With the Froyo method it takes a few once booted because the sd is mounted.
Sent from my CM7 EVO using XDA App.
IIRC CM7 supports Darktremor ext a2sd/cache2sd script. This is a necessity for me, so I hope that's correct.
The problem could be related to a bug
http://forum.cyanogenmod.com/topic/14813-darktremor-apps2sd-issue/
Have you tried the firerat a2sd+ script?
Data2sd support for performance enhancement would be nice also.
Ok, I am somewhat confused. I am coming from a sense-based rom that had a2sd enabled. I have a ton of apps so this is necessary. Was running my Dalvik from the \cache\ partition and apps from ext3.
Is this still possible in CM7?
I tried running a2sd check in CM& and it said "a2sd not located" (or something to that effect).
I've had a a2sd issue with recent aosp roms, my find is that if yours is not working and you have a2sd installed then it's the kernel, I had to try multiple kernels to get mine working, I found Sbc bcnice v7 works perfect, shows up properly partitioned and apps are utilizing it, all the new zendroids and savagezen dont support a2sd, neither does snap 7.6
my95z34 said:
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
Click to expand...
Click to collapse
use Link2SD it is the best a2sd replacement, it supports fat32 and ext as your 2nd partition.
my95z34 said:
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
Click to expand...
Click to collapse
Hey dude,
I had the same problem (or need depending on your view) - I tried to apply "cm7_legacy_a2sd_r3-signed.zip" which failed for some reason I couldn't be bothered to work out.
Which lead me to look inside and see how it was going to apply itself. Which then took me on a happy journey of discovery that resulted in the following How-To: pastebin.com/TgqtMuYX
Check it out and let me know how it goes. If you have any issues along the way either pm me or reply here if it's helpful to the wider audience. I'll feedback any relevant details if necessary.
Cheers.
AC
PS. The phone I applied this on was my Hero (GSM) before they pulled CyanogenMod-7.0.0-Hero - seems to behave quite well when you increase the heap to 32MB, but it's still work in progress for testing.
# Android.Control 2011/04
How to manually apply a2sd on CM7 from recovery - Carried out on a Hero, but other phones should be the same.
(details taken from cm7_legacy_a2sd_r3-signed.zip)
Boot into your recovery image. I used ClockworkMod as it allowed me to mount /system very easilly
If adb it is NOT in your search path you will need to specify the /full/path/to/adb
DO NOT complain to me if the adb commands below fail if adb is not in your path
All adb commands issued from a regular user account on Linux - (Windoze will be the same, I'm sure you can work it out)
Let us begin...
1. Mount the /system partition
Recovery: Select: [mounts and storage] > [- mount /system]
[ALTERNATIVE]
Code:
$ adb shell mount /system
Just to check all went well
Code:
$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98400 0 98400 0% /dev
/dev/block/mtdblock4 133120 122304 10816 92% /cache
/dev/block/mtdblock3 174080 118224 55856 68% /system
2. Find your sd-ext partition - usually /dev/block/mmcblk0p2
Recovery: Select [mounts and storage] > [- mount /sd-ext]
[ALTERNATIVE]
Code:
$ adb shell mount /sd-ext
Just to check all went well and to see what the /sd-ext device details are
Code:
$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98400 0 98400 0% /dev
/dev/block/mtdblock4 133120 122304 10816 92% /cache
/dev/block/mtdblock3 174080 118224 55856 68% /system
/dev/block/mmcblk0p2 505636 10532 468999 2% /sd-ext
Recovery: Select [mounts and storage] > [- umount /sd-ext]
[ALTERNATIVE]
Code:
$ adb shell umount /sd-ext
3. Manually aplly firstboot.sh actions - from cm7_legacy_a2sd_r3-signed.zip
Using "/dev/block/mmcblk0p2" from the df output above exceute the following (replace with apropriate value for your phone!)
Code:
$ adb shell
~ # /system/bin/e2fsck -fy /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2
~ # /system/bin/e2fsck -fy /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -c 0 -i 0 /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -l /dev/block/mmcblk0p2
4. Then mount the sd-ext partition using existing script
Need additional entry in PATH to allow /system/etc/init.d/05mountsd to work
Code:
~ # PATH=$PATH:/system/bin
~ # /system/etc/init.d/05mountsd
You should see something very similar to below
Code:
e2fsck 1.41.10 (10-Feb-2009)
/dev/block/mmcblk0p2: clean, 11/130560 files, 27008/522112 blocks
5. Create app and app-private in sd-ext
If app and app-private [or dalvik-cache] exist on sd-exe BUT are NOT a directory then they must be removed!
Code:
~ # rm /sd-ext/app
~ # rm /sd-ext/app-private
[OPTIONAL]
Code:
~ # rm /sd-ext/dalvik-cache
Now we can create the directories proper
Code:
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/app
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/app-private
[OPTIONAL]
Code:
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/dalvik-cache
If you didn't see any errors you can assume everything is ok, but just to make sure...
Code:
~ # ls -l /sd-ext/
drwxrwx--x 2 system system 1024 Apr 16 13:49 app
drwxrwx--x 2 system system 1024 Apr 16 13:49 app-private
drwxrwx--x 2 system system 1024 Apr 16 13:49 dalvik-cache
drwx------ 2 root root 1024 Apr 16 01:42 lost+found
6. Create the userinit.d and functions script directories on /sd-ext
Code:
~ # install -m 755 -o 0 -g 0 -d /sd-ext/userinit.d
~ # install -m 755 -o 0 -g 0 -d /sd-ext/userinit.d/functions
Now we need to quit adb back to the host to push some files onto the phone
Code:
~ # exit
7. Push the userinit.d files into /sd-exe/userinit.d
(extract the contents of "cm7_legacy_a2sd_r3-signed.zip" to a temporary directory, then cd into sd-ext for the following adb commands)
Code:
$ adb push ./userinit.d/functions/a2sd /sd-ext/userinit.d/functions/a2sd
$ adb push ./userinit.d/10cache2sdext-binds /sd-ext/userinit.d/10cache2sdext-binds
$ adb push ./userinit.d/11data2sdext-binds /sd-ext/userinit.d/11data2sdext-binds
$ adb push ./userinit.d/12app2sdext-binds /sd-ext/userinit.d/12app2sdext-binds
$ adb shell
~ # chmod 750 /sd-ext/userinit.d/functions/a2sd
~ # chmod 750 /sd-ext/userinit.d/10cache2sdext-binds
~ # chmod 750 /sd-ext/userinit.d/11data2sdext-binds
~ # chmod 750 /sd-ext/userinit.d/12app2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/functions/a2sd
~ # chown root:shell /sd-ext/userinit.d/10cache2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/11data2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/12app2sdext-binds
~ # exit
[ADVISORY]
If app, app-private or dalvik-cache was NOT working you would see a line similar to these lines below in the logcat output
Code:
I/busybox ( 113): sd-ext /sd-ext/app bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/app-private bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/dalvik-cache bindings not enabled
Reboot the phone, then quickly run adb logcat to watch the initial progress to confirm success
If you do NOT see any lines like those above in the logcat output then everything went OK
Code:
$ adb logcat
- waiting for device -
--------- beginning of /dev/log/main
I/cm ( 67): Welcome to Android 2.3.3 / CyanogenMod-7.0.0-Hero
I/cm ( 68): _
I/cm ( 69): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 70): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 71): )) _))
I/cm ( 72):
I/mountsd ( 87): Checking filesystems..
I//system/xbin/run-parts( 62): e2fsck 1.41.10 (10-Feb-2009)
I//system/xbin/run-parts( 62): /dev/block/mmcblk0p2: recovering journal
I//system/xbin/run-parts( 62): /dev/block/mmcblk0p2: clean, 555/500856 files, 428759/1000173 blocks
I/logwrapper( 93): busybox terminated by exit(0)
I/logwrapper( 97): busybox terminated by exit(0)
I/logwrapper( 99): busybox terminated by exit(0)
I/mountsd ( 101): /sd-ext successfully mounted
I/busybox ( 113): sd-ext /sd-ext/data bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/system bindings not enabled
I/logwrapper( 113): busybox terminated by exit(0)
I/logwrapper( 62): /system/xbin/run-parts terminated by exit(0)
...
Please be patient while any existing files in /data/app, /data/app-private and /data/dalvik-cache are copied to /sd-ext/app, /sd-ext/app-private and /sd-ext/dalvik-cache respectively
If you have manually populated the app directory prior to enabling a2sd, then this will further delay your first boot while the dalvik-cache is updated for each unseen .apk file
[NOTE]
$ = regular user shell prompt (on your PC, depending which user you use for you adb environment)
# = root user shell prompt (on your phone)
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="]
[/FONT]Vicente=Donation,Support,[FONT="]
[/FONT]Marc New***=Donation,Support,[FONT="]
[/FONT]Ic3fox=Donation,Support,[FONT="]
[/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!
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
This app will make the external (not the internal!) microSD card of your Samsung Galaxy S3 (International, US versions, International LTE) and Note 2 available as USB mass storage device.
The tasker profiles unmount your SD card, switch the USB mode and allow direct access to your card from your operating system of choice. The commands are based on the work of @Kopfgeldjaeger, @d4fseeker, @Sakaschi and others and their SGS3 Easy UMS app (http://forum.xda-developers.com/showthread.php?t=1711009). You can refer to that thread for details/compatibility and troubleshooting commands.
Prerequisites:
- Tasker (v4.0 or later (I am using 4.2u3m right now))
- A kernel with usb-gadget support
- Root
- Busybox (path to busybox is configurable)
- USB Debugging
- SuperSu v1.93 or later (for the namespace mount fix)
Usage:
Import the profiles in tasker. When you plug into a PC via USB, the UMS Switcher profile should fire up and execute the Enable UMS task. This task detects if you have usb-gadget support, if it finds an external SD card and then proceeds to unmount it. If it fails, it will show a notification with a list of open files on the SD card and a button to retry the mount (after you close those files).
Remember, once the phone is in UMS mode, your PC may automatically mount the SD card. Make sure you unmount it cleanly before removing the USB cable!
Once you remove the USB cable, the profile MTP Switcher kicks in and switches USB mode back to MTP and tries to remount your USB card.
Disclaimer: I am not responsible of any data loss due to the card not being completely unmounted at either end. I haven't experienced data loss, but there's always a risk things can go wrong.
Code:
The actual profiles/Tasks can be downloaded at the end of the post and imported into tasker, or you can "type" them in yourself. To import the profiles into tasker by unzipping the file into your internalSDCard/Tasker/profiles folder. Then you can import it in Tasker by tapping the profiles tab. Long tap the Profiles tab and select import.
Code:
Profile: UMS Switcher (65)
State: Power [ Source:USB ]
Enter: Enable UMS (59)
A1: Flash [ Text:Switching to USB Mass Storage mode Long:eek:ff ]
<This variable toggles between using the possibly dangerous mode of lazy umounting and the non-dangerous mode. With lazy umounting your sd card will remain mounted on the phone while the phone is connected to the PC and there is a greater chance of file corruption if you opperate on the same file simultaneously. The benefit of this mode is that you will be able to use the UMS mode multiple times without rebooting. Use with care and report back any corruption issues.>
A2: Variable Set [ Name:%dangerous_mode To:0 Do Maths:eek:ff Append:eek:ff ]
<set lazy switch to blank>
A3: Variable Set [ Name:%lazy_switch To: Do Maths:eek:ff Append:eek:ff ]
<Enable lazy umounting if requested>
A4: Variable Set [ Name:%lazy_switch To:-l Do Maths:eek:ff Append:eek:ff ] If [ %dangerous_mode = 1 ]
<Path to your busybox (change it if you have a custom busybox)>
A5: Variable Set [ Name:%busybox To:/system/xbin/busybox Do Maths:eek:ff Append:eek:ff ]
<remember if UMS is enabled>
A6: Variable Set [ Name:%UMSStatus To:0 Do Maths:eek:ff Append:eek:ff ]
<A place to keep errors>
A7: Variable Set [ Name:%error To:0 Do Maths:eek:ff Append:eek:ff ]
<A variable for the current device>
A8: Variable Set [ Name:%sdcard To:0 Do Maths:eek:ff Append:eek:ff ]
<Variable to keep the mountpoint name>
A9: Variable Set [ Name:%mountPoint To:0 Do Maths:eek:ff Append:eek:ff ]
<Variable to hold the path to the relevant /sys file>
A10: Variable Set [ Name:%sysFile To:0 Do Maths:eek:ff Append:eek:ff ]
<Find the correct /sys file>
A11: Run Shell [ Command:ls /sys/devices/platform/s3c-usbgadget/gadget/lun0/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file; Timeout (Seconds):0 Use Root:eek:ff Store Output In:%sysFile Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<No sys file found>
A12: If [ %sysFile ! Set ]
A13: Notify [ Title:UMSSwitcher Error 10: Unable to find a suitable file in /sys. Text:Maybe you are not running a kernel with usb-gadget support. Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
</sys file found>
A14: Else
<Find current extSD device number>
A15: Run Shell [ Command:mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | grep /dev/block | cut -f 1 -d " " Timeout (Seconds):0 Use Root:eek:ff Store Output In:%sdcard Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<get the mountpoint>
A16: Run Shell [ Command:mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | grep /dev/block | cut -f 2 -d " " Timeout (Seconds):0 Use Root:eek:ff Store Output In:%mountPoint Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<Found sdcard?>
A17: If [ %sdcard !~ /dev ]
A18: Flash [ Text:About to unmount %mountPoint Long:eek:ff ]
<See if there are open files after umount (1 file)>
A19: Run Shell [ Command:lsof -Fn | grep %mountPoint | awk '{ s = ""; for (i = 9; i <= NF; i++) s = s $i " "; print s }' Timeout (Seconds):0 Use Root:eek:n Store Output In:%error Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<no open files>
A20: If [ %error ! Set ]
<Try to unmount>
A21: Run Shell [ Command:sync; su --mount-master -c "%busybox umount %lazy_switch '%mountPoint' " Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
<We couldn't unmount>
A22: If [ %error Is Set ]
A23: Notify [ Title:UMSSwitcher Error 11: Error unmounting SD card Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 Actions:(1) ]
<We managed to unmount.>
A24: Else
<Switch to ums mode>
A25: Run Shell [ Command:setprop persist.sys.usb.config mass_storage,adb; echo %sdcard > %sysFile Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
<There's an error>
A26: If [ %error Is Set ]
A27: Notify [ Title:UMSSwitcher Error 12: There was an error when enabling UMS. The SD card is unmounted Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
A28: Else
A29: Variable Set [ Name:%UMSStatus To:1 Do Maths:eek:ff Append:eek:ff ]
A30: Flash [ Text:UMS mode enabled :) Long:eek:ff ]
A31: End If
A32: End If
<still open files>
A33: Else
A34: Notify [ Title:UMSSwitcher Error 13: Open files on SD Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 Actions:(1) ]
A35: End If
<no sdcard found>
A36: Else
A37: Notify [ Title:UMSSwitcher Error 14: No external SD Card found Text:Make sure it's mounted first. Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 Actions:(2) ]
A38: End If
A39: End If
Profile: MTP Switcher (64)
State: Not Power [ Source:USB ]
State: Variable Value [ Name:%UMSStatus Op:Maths: Equals Value:1 ]
Enter: Enable MTP + Mount (61)
A1: Variable Set [ Name:%error To:0 Do Maths:eek:ff Append:eek:ff ]
A2: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
<Remount card and switch to MTP>
A3: Run Shell [ Command:echo '' > %sysFile; sleep 2; vold; sleep 2; setprop persist.sys.usb.config mtp,adb Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
<All ok>
A4: If [ %error ! Set ]
<Check card mount point>
A5: Run Shell [ Command:mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | grep /dev/block | cut -f 2 -d " " Timeout (Seconds):0 Use Root:eek:ff Store Output In:%mountPoint Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<not mounted>
A6: If [ %mountPoint ! Set ]
A7: Flash [ Text:Unable to mount card automatically Long:eek:ff ]
A8: Notify [ Title:MTPSwitcher Error 10 Text:%error. Unable to remount card automatically Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
<Card was mounted ok>
A9: Else
A10: Variable Set [ Name:%UMSStatus To:0 Do Maths:eek:ff Append:eek:ff ]
A11: Flash [ Text:SD card mounted on %mountPoint Long:eek:ff ]
A12: End If
A13: Else
A14: Flash [ Text:Error: %error Long:eek:ff ]
A15: Notify [ Title:MTPSwitcher Error 11 Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
A16: End If
Tested on:
- NeatRom 4.8 (based on samsung 4.1.2), with Adam Kernel
- NeatRom 6.2 (based on samsung 4.3), with Boeffla-Kernel (5.1-beta10) (or stock kernel)
- NeatRom 2.8 (based on SlimKat 2.8 (KitKat 4.4.2)), with Boeffla-Kernel (omni)
- NeatRom 3.1 (based on SlimKat 2.0 (KitKat 4.4.2)), with Boeffla-Kernel (omni)
Changelog:
v0.6 - Added support for S4
v0.5 - Fixes to allow lazy unmounting so that you can mount the SD card multiple times without rebooting the phone (off by default).
v0.4 - Added support for KitKat ROMs. Also added support for lazy unmounting (dangerous, off by default)
v0.3 - Added some more checks
v0.2 - Added support for Android 4.3 (look for mount lines with /dev in the name)
v0.1 - initial release
Error codes:
Because Tasker has a limitation on the number of characters shown in a notification you won't be able to get very comprehensive error messages. So, I've added numeric codes that you can lookup here:
MTPSwitcher Error 10: Unable to remount card automatically
MTPSwitcher Error 11: Error while disabling UMS mode
UMSSwitcher Error 10: Unable to find a suitable file in /sys. Maybe you are not running a kernel with usb-gadget support
UMSSwitcher Error 11: Error unmounting SD card
UMSSwitcher Error 12: There was an error while enabling UMS. The SD card is unmounted
UMSSwitcher Error 13: Open files on SD
UMSSwitcher Error 14: No external SD Card found. Make sure it's mounted first
Bugs:
On android 4.3 you will likely get an Error 11 when trying to unmount the card the second time. It can be fixed by a rebooting the phone. Still working on a fix.
On android 4.4 you will likely get an Error 11 when trying to unmount the card the second time. To overcome this I added the dangerous_mode switch variable (can be enabled by editing the Enable UMS task). If you set this switch to 1 the system will try to do a lazy umount of your SD card, leaving it still accessible by your phone while it is still mounted on the PC. It has the risk to do data corruption if you use the card simultaneously on your PC and phone, but it is the method used in the Boeffla Kernel app to toggle UMS mode. According to him he hasn't seen any problems so far: http://forum.xda-developers.com/showpost.php?p=50229253&postcount=2355, http://forum.xda-developers.com/showpost.php?p=50257161&postcount=2366, http://forum.xda-developers.com/showpost.php?p=50257593&postcount=2368
Let me know if there are problems or if it works for you too. Also, if your mountpoint is different, let me know to add it to the app.
Hi, I'm trying but i can't install your profile into Tasker (I'm on Tasker v.4.1u3)
I click on it and it says it's import in "my UI", but i can't find it... Can you help me please ?
EDIT :
I succeed to import your profiles but it doesn't work well
When i plug it on my pc it's work but after i unplug the sdcard is more viewable on my device until i reboot
Will this really activate automatically the UMS that let my sdcards show up in Windows explorer when I plug in the usb cable in pc??
Sent from my Samsung Galaxy S3 GT-i9300 using TapaTalk2
@9andar: Does it flash anything on the Phone's screen when you unplug the cable? Maybe does it show that it couldn't mount the card?
Can you send me the output of these commands (you can disable the MTP Switcher profile and run the commands in a terminal after you unplug the cable)?
Code:
echo '' > %sysFile
vold
setprop persist.sys.usb.config mtp,adb
Replace %sysFile in the command above with what is listed under Tasker -> Vars tab (viewable in advanced mode). For me it's /sys/devices/platform/s3c-usbgadget/gadget/lun0/file but it may be different for you.
The vold command should mark the card as unmounted inside android (Settings -> Storage), and then it should remount it. Afterwards you should get some output (the mount point) for this command:
Code:
mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | cut -f 2 -d " "
@PIRATA!: yes, this is what it's supposed to do. Please note that it will only expose the external SD card, not the internal one! It should take about 5 seconds to activate UMS when you plug it in, and another 5 seconds to remount the card internally when you plug out.
Works fine. Thanks.
On disconnecting, there isnt any pop up or toast notification but tasker runs the MTP profile just fine.
_____________
Sent from my GT-I9300 powered by Temasek Rom & Kernel
Fueled by 7000mAh ZeroLemon Battery
Hmm, there should be a toast saying that the SD card was mounted on /storage/extSDCard or something...
You got me wrong I guess.
It shows on mounting but not on dismounting. I suppose there should be one too shows like dismounting or MTP enabled.
_____________
Sent from my GT-I9300 powered by Temasek Rom & Kernel
Fueled by 7000mAh ZeroLemon Battery
nicesoni_ash said:
You got me wrong I guess.
It shows on mounting but not on dismounting. I suppose there should be one too shows like dismounting or MTP enabled.
_____________
Sent from my GT-I9300 powered by Temasek Rom & Kernel
Fueled by 7000mAh ZeroLemon Battery
Click to expand...
Click to collapse
Well, when unplugging the cable after having the SD card exposed as UMS, you should only see a brief toast that says the SD card was mounted back. You may also get a transitory notification that the SD card was replugged in, but that's android OS. There is no notification that MTP mode is enabled again - it seemed pointless.
When plugging in, you should get a toast saying it's about to unmount, and a second toast saying that UMS mode is enabled (if all is well). Otherwise you should get a toast or a notification with the error message.
Tasker can't see the profiles.
Should I rename it removing the .xml extension leaving only the .prf one?
Sent from my Samsung Galaxy S3 GT-i9300 using TapaTalk2
Hi, you have to long press the profile tab... It opens a window import... Choose the txt.. That's all...
Sent from my GT-I9300 using XDA Premium 4 mobile app
Thanks 9andar, I learned something new... I also learned one can sort profiles and tasks the same way. Neat!
Not sure why, but this does not work on my Note 2 ( running 4.3 )
When connecting, I am getting:
There was an error when enabling UMS. The SD card is unmounted
"tmp-mksh: <stdin>[3]: tmpfs: not found"
Any idea?
The error seems to appear when running these commands:
Code:
setprop persist.sys.usb.config mass_storage,adb
echo %sdcard > %sysFile
Try to run the profile normally, then when you get the error start a root terminal on the phone and run the commands above. Replace %sdcard and %sysFile with the correct values. Ser if the error is generated by setprop or the echo command.
Does the standalone EasyUMS app work for you?
It does not mount nothing after 5 secs.
If I run the script manually,I get a message on Statusbar that the unmount procedure can't be done due of some files that are open...but I don't have nothing opened!!
That notification should also list the files that are kept open. After you close the app that opened them you can retry the UMS switch (should appear as an option below the notification).
If you don't have any files listed, try to run the umount command from a root shell and see if it complains. You can also run the lsof command to see if there are open files.
mad_ady said:
The error seems to appear when running these commands:
Code:
setprop persist.sys.usb.config mass_storage,adb
echo %sdcard > %sysFile
Try to run the profile normally, then when you get the error start a root terminal on the phone and run the commands above. Replace %sdcard and %sysFile with the correct values. Ser if the error is generated by setprop or the echo command.
Does the standalone EasyUMS app work for you?
Click to expand...
Click to collapse
Thanks. The echo command fail :
can't create %sysFile: Read-only file system
The EasyUMS has stopped working for me when I moved to 4.3
Ok, %sysFile should actually be a path under /sys/devices/something... Do you see such a value under the vars tab?
Does this command output anything?
Code:
ls /sys/devices/platform/s3c-usbgadget/gadget/lun0/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file;
Let me get this straight!
I must import them, then just only active Tasker from its menu, and then plug in the usb cable and wait??
In this way in doesn't work!
Sent from my Samsung Galaxy S3 GT-i9300 using TapaTalk2
Yes, if you import the profiles and they are active plugging and unplugging the usb cable should be the only trigger needed. Otherwise you should get various errors reported onscreen.
$ ls -l /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
-rw-r--r-- root root 4096 2013-12-23 16:17 file
From what I saw, %sysFile is 0
Also, under /sys/devices/virtual/android_usb/android0/f_mass_storage/ I see "lun0" and "lun1"
But no "lun_ex" or "lun".
Sent from my SHV-E250S using xda app-developers app
HTC One M8.
I have done HTCdev with http://htc-one.wonderhowto.com/how-to/unlock-bootloader-root-your-htc-one-m8-0154444/
then rooted
Then did S-OFF with http://firewater-soff.com/instructions/
Then, to be able to write to /system, you need more steps. From recovery, it works easily. From live running system, the default stock ROM has a write protection. This WP can be removed easily by loading a kernel module:
http://forum.xda-developers.com/showthread.php?t=2701816
then:
Code:
insmod /mnt/sdcard/Download/wp_mod_m8.ko
mount -o remount,rw /system
Now, I want to run random scripts.
First, check if the stock ROM has the same issue as my previous phone:
Code:
[email protected]_m8:/ # echo $PATH
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/vendor/bin
[email protected]_m8:/ # ls -l /system/sbin
/system/sbin: No such file or directory
1|[email protected]_m8:/ #
That's exactly what we need: a folder that is in PATH, that does not exist, and should exist somewhere we can create it. So:
Code:
insmod /mnt/sdcard/Download/wp_mod_m8.ko
mount -o remount,rw /system
mkdir /data/local/bin
ln -s /data/local/bin/ /system/sbin
Then, create two small scripts in there: do vi /system/sbin/vibrate , then i to enter insert mode, paste this code, esc, :x ... or use any other editor if you want:
Code:
#!/system/xbin/ash
#
i="$1"
[ "$i" = "" ] && i=400
# default value for voltage_level at boot is 3100 mV.
v=3100
vmin=1200
[ $i -gt 0 ] 2>/dev/null || {
echo "Invalid argument '$i'; should be a number below 9999 ms."
exit 1
}
[ $i -gt 9999 ] && {
echo "Invalid argument '$i'; should be below 9999 ms."
exit 1
}
[ "$2" != "" ] && {
[ $2 -ge $vmin ] 2>/dev/null || {
echo "Invalid argument '$2'; should be a number between $vmin and ${v} mV."
exit 1
}
[ $2 -gt $v ] && {
echo "Invalid argument '$2'; should be below ${v} mV."
exit 1
}
}
[ "$i" = "" ] && { echo "Provide argument: time in ms." ; exit 1 ; }
[ "$2" = "" ] && {
echo "Voltage not provided. Using default $v mV."
} || {
v=$2
echo "Using voltage argument $v mV."
}
echo $v > /sys/devices/virtual/timed_output/vibrator/voltage_level
echo "$i" > /sys/devices/virtual/timed_output/vibrator/enable
It was an old code for HTC Sensation; voltage does not work anymore, but duration does.
A shorter script for flash, and create the init script:
Code:
echo "echo 255 > /sys/class/leds/flashlight/brightness" > /system/sbin/flashlight
echo "#!/system/bin/sh
# /system/etc/init.qcom.bt.sh
/data/local/bin/vibrate
/system/sbin/flashlight" > /data/local/bin/rc.init
chmod 755 /system/sbin/flashlight
chmod 755 /system/sbin/vibrate
chmod 755 /data/local/bin/rc.init
Now, the tricky part: make the init script run at boot. Edit /system/etc/init.qcom.bt.sh , and below the comment, insert this line:
Code:
/data/local/bin/rc.init &
Reboot, enjoy Your phone flashes and vibrates at boot. As is, this is almost useless. But, now you can create system scripts, and run them at boot ... you can do pretty much anything you do on a classic Linux machine.
Because scripts are put in a folder which is in the default system $PATH, all apps or widgets can run those scripts. This vibrate script can be called for example from a Tasker or ScriptManager widget.
I love vibrate, because it's a small noise; I tail it to any command that is likely to take more than 1mn to run. Having a ScriptManager widget running it also helps me check the system load. If phone seems slow, and vibration does not happen at once, then the phone has big load, and I shall wait for things to settle.
/system/etc/init.qcom.bt.sh was not a random choice. To understand why: open /init.target.rc , and now, search a script that is run ... at boot ... with user root ... and that lays in /system. Many scripts are run as user, or stored outside /system.
Now, it's up to you to create scripts that are usefull to you.
Hey thanks for the directions but I tried running the command mnt/sdcard/download/wp_mod.ko and I got a "failed exec format error"....
rgolnazarian said:
Hey thanks for the directions but I tried running the command mnt/sdcard/download/wp_mod.ko and I got a "failed exec format error"....
Click to expand...
Click to collapse
This is completely unrelated and offtopic. Either your file does not have exec bit, or wrong interpreter, or stored on partition that has noexec.
Hmmm ... why is the quoted message different from the one I received by email ???
Any way, even if you are in /, "mnt/sdcard/download/wp_mod.ko" is an invalid command. A module can not be executed, it must be inserted; see tutos about it.