[PATCH] Firerat 'all in one' patch file [ v1.4.1 beta2 - 2010-11-07 ]

Search This thread

Firerat

Senior Member
Feb 24, 2009
3,848
185
Originally posted in the CM5 test thread, this is my all in one 'patcher'

basically it consolidates 'scripts' I have been posting in the CM5 thread to help people out.
It also includes a couple of things that I have not posted, but found useful myself. these are the 'shabang' and 'remount script'

fr-patch141-BETA3.txt
Current options
Code:
# All In One Patcher AIOMenu Version 1.4.1 BETA2
##################################################################
[1]	[ ] (a2sd)	FroYo Apps 2 sdext
[2]	[ ] (sdext)	sd-ext mount for CM6
[3]	[ ] (lwp)	Live Wallpaper (work around) \*
[4]	[ ] (lsd)	Leagacy /system/sd mount point
[5]	[ ] (swap)	swap
[6]	[ ] (shabang)	shabang
[7]	[ ] (remount)	system remount script
[8]	[ ] (fb)	Facebook 1.2.x sync for G1/Dream/Trout
[9]	[ ] (fixp)	fix_permissions patch ( for CM5.0.x )
[10]	[ ] (dc2x)	dalvik-cache bind mount
[11]	[ ] (ddb)	/data/(data,system) bind mount
[12]	[ ] (rba)	random bootanimations
[13]	[ ] (fsdext)	force sd-ext mount script
------------------------------------------------------------------
Enter the Number ( separate multiple with space )
Enter 0 to install sellected

This 'patch' file is simply for delivery, it is not required once you have installed the patches you want.

Update:2010-08-04
the 1.3.x version of Facebook no longer requires the 'fb fix' :)
Change log
1.4.1 beta2 ( 2010-11-07 )
  • typo fixes
  • removed messages that printed Danger detected ,, just creates confusion
  • added /data/local/bootanimations to random bootanim, ( for people without sd-ext )
1.4.1 beta ( 2010-10-28 )
  • v1.3.5 FroYoApps2sd see here for instructions point 4 onward
  • new menu system
    you can still pass options, the ones in ()
  • new script, data/data bind, put /data/data on /sd-ext and get more room ;)
  • force sd-ext mount, use line aio fsdext in your customMTD mtdpartmap.txt file
    ensures your new nightly cm6.1 will mount /sd-ext
  • new script, random bootanimations
    put a collection of bootanimation.zips in /sd-ext/bootanimations/
    either rename the zips or give each one its own folder
1.4.0 ( 2010-09-06 )
  • v1.3.4 FroYoApps2sd see here for instructions point 4 onwards
  • swappy's swapfile creation now gives progress display
  • userinit patch ( for those without sd-ext mount ) working again
    a change in CM6 nightlies supports /data/local/userinit.sh but not userinit.d, patching was skipped, but now it checks for both .sh and .d
  • made some changes to the script 'generation', making easier ( I hope ) to manage on github


1.3.9 ( 2010-08-23 )
  • fixed 'id' error in RA Recovery ( probably has more problems in RA Recovery, I'll fix in next version )
  • v1.32 FroYoApps2sd see here for instructions point 4 onwards
1.3.8 ( 2010-08-12 )
v1.3.8b , fixed a null variable + a fi on wrong line

  • added FroYo apps2sdext ( v1.2 )
    includes ApkManager, to manage app location
  • added swapfile support ( create and resize swapfile with swappy in terminal/adb shell )

1.3.7 ( 2010-08-10 )
  • can be run in recovery
  • swappiness defaults to 20
  • new script /system/bin/swappy , change swappiness ( just type swappy in terminal )
  • remount rw/ro now works again ( I included the fix this time ;) )
  • lwp script 'recreates' hw3d.xml if it does not exist

1.3.5 => 1.3.6
  • minor changes
1.3.4 ( 2010-07-16 )
  • added sdext mount for CM6
    includes IConrad01's fix
  • Included IConrad01's fix in swap script
    [*]fix system remount script ( remount (rw/ro) now working
    before fix only (rw/ro)system symlinks were working
    oops, I didn't upload that fix
1.3.3 ( 2010-06-23 )
  • minor clean up for MT3G userinit patch
  • support for Custom partition layouts, ZERO brick risk!
    if you are using a Custom Partition map, dc2x will now behave like DangerSPL ( dalvik-cache bind mount to sd-ext )
    why? because we are playing about and have got rid of cache I have 90mb system and 114mb data ;)
1.3.2
1.3.1
  • fixed the reverse flag ( changed from -r to rev , and the test in script )
1.3
  • added reverse option for swap lwp and dc2x
  • fixed userinit patch for those without sd ext partition
1.2
  • Fixed Patch 20userinit to use /data/local/userinit.sh ( not /sd-ext/userinit.sh)
  • added laegacy sd mount point 'fix'
  • Fixed neocore workaround ( LWP script ) NB Neocore workaround currently disabled
  • expanded fix_permissions target ( some roms have .sh )
  • Only run fixp when SD_EXT_DIRECTORY environment is found

1.1
  • Fixed script to install userinit.d directory in the right place when no sd-ext partition.

1.0
  • First release

Can I use this script on any rom?
_probably_ but I have only tested it on CM5/6 ( so far )
the options marked with * require 'run-parts' this is where the boot.img executes scripts within a specified directory.
When I was writing the script I anticipated this and incorporated a check, disabling the install of the options which require it.
edit: the dc2x might do very nasty things to a none CM5/6, I'll insert a sanity check

I like the idea of some of the 'run-part' scripts, but my rom doesn't use that
I have an idea in mind, where I test the running boot.img's init.rc for the import/trigger commands. I can use that to setup a run parts
trouble is, not all ramdisks are made equal.
Some popular 'roms' don't have a boot.img with a compatible init, even though the init.rc has import/trigger. So it may not work :( and I don't fancy manually fixing all the broken boot.imgs
But I may at some point detail how you can do that yourself ;)
 

Attachments

  • fr-patch133.txt
    14.2 KB · Views: 1,621
  • fr-patch134.txt
    17.1 KB · Views: 2,608
  • fr-patch137.txt
    21.2 KB · Views: 294
  • fr-patch138b.txt
    31.8 KB · Views: 1,696
  • fr-patch139.txt
    40.3 KB · Views: 2,182
  • fr-patch140.txt
    41 KB · Views: 4,421
  • fr-patch141-BETA.txt
    51 KB · Views: 1,578
  • fr-patch141-BETA2.txt
    51.2 KB · Views: 2,684
Last edited:

Firerat

Senior Member
Feb 24, 2009
3,848
185
Some more detail on the options
*new* Random Bootanimations
This adds a script which will randomly select a bootanimation from /sd-ext/bootanimations ( or /data/local/bootanimations/ if /sd-ext is not mounted )
it searches for zip files in the bootanimations folder.
you can either have
unique names e.g.
  • /sd-ext/bootanimations/bootanimation1.zip
  • /sd-ext/bootanimations/bootanimation2.zip
  • /sd-ext/bootanimations/nexusanim.zip
or each in its own folder e.g.
  • /sd-ext/bootanimations/ba1/bootanimation.zip
  • /sd-ext/bootanimations/nexus/bootanimation.zip
  • /sd-ext/bootanimations/another/another.zip
or a mix of both, I don't care ;)
if /system/media/bootanimation.zip exists, that will also have a random chance
( personally I remove it from the ROM before flashing, it saves me a chunk of system space,, I just put a copy in /sd-ext/bootanimations/ ;)

*new* data/data binds
Space tight on data?
this will put /data/data ( and /data/sysem ) on your sd-ext, and bind mount them back to data
it will free up 30+mb * on /data
* depends on how many and what apps you have

if you decide you don't like it
Code:
su
sh /sd-ext/userinit.d/11datadata-binds off
to turn it off , note it will check if you have enough space on data, don't blame me if it refuses to move it back, or if it moves it back and you get low space warnings. titanium backup and do a full wipe and start again from scratch ;)

shabang
simply adds #!/system/bin/sh to the wrapper scripts for some of the java code in /system/framework
basically it will let you run things like pm ( package manager ) from an Almquist shell (ash), bash or busybox sh ( which I think is just ash )


remount
is a somewhat bloated script inspired by Maxisma's rwsystem script
the 'bloat' is cachehack detection ( to make sure all system files are rw ) and some feedback, both to the user and any scripts which use it (via a 0/1 exit code )

lwp
when I first did the '3D' kernel for CE1.2, ( based on what Case_ did )
I hinted in the ramdisk's init.rc at what goes on here

the patch does two things
first , on boot it restricts access to /dev/msm_hw3dr and /dev/msm_hw3dc, so only root and the graphics group can access it.
Then, we give the graphics group to apps which have the android.permission Write External Storage
the idea being that Live wallpapers would be forced to drop back to software3d
( we know lwp worked ok(ish) on ramhack kernels ; )
but Gallery3D and most Games get given graphics group ( becuse they have the WES permission )

NB, this will not fix the 'Nexus LWP Pack' pushed from another ROM
only Market LWP will work on cm5 test3

swap
on boot get a script to run, which just runs swapon against every sd partition, its a 'suck and see' but it works no matter which partition you have swap on, so no messing about editing it for typical g1 setup fat32/ext/swap , or an mt3g with just fat32/swap

fb
Edits the build.trout.prop file, changing a couple of values so that facebook 1.2.1 sync works
( if you ask me its the app which is broken, but this is a workaround )

fixp
the fix_permissions script is hardcoded with the legacy /system/sd, this patch converts it to use $SD_EXT_DIRECTORY
so it won't miss apps on your sd card ext partition ;)

dc2x
Dalvik-cache bind mounts
For NoneDangerSPL , a bind mount between /cache/dalvik-cache and /data/dalvik-cache is created on boot
NoneDanger has a /cache partition of 67mb , which is perfectly adequate for the dex files
it frees up space on data ( which is 14mb smaller than DangerSPL )

For DangerSPL
/cache is way too small, at just 30mb , but stock cm5's framework and system app dex files are 31mb , which does eat right into the space available on data
so, a bind mount between /sd-ext/dalvik-cache and /data/dalvik-cache is created on boot., very much like the old style a2sd
this option will free up space on data, especially useful if you have apps which want to create large /data/data/ directories

for MT3G , didn't make much sense to do anything, data is huge, but with /cache at 80mb I could be persuaded to bind with that
 
Last edited:

Firerat

Senior Member
Feb 24, 2009
3,848
185
so how do we use it? Just download the patch to the root of sd and run the commands from terminal or what?:confused:

Code:
example
sh /sdcard/fr-patch12.txt swap lwp fixp
will setup swap, patch fix_permissions to see apps on sd
and setup the gpu permissions to enable lwp + 3d apps
 

Klyentel

Senior Member
Aug 23, 2009
826
132
Cary, NC
bit.ly
Code:
example
sh /sdcard/fr-patch12.txt swap lwp fixp
will setup swap, patch fix_permissions to see apps on sd
and setup the gpu permissions to enable lwp + 3d apps


thanks, I should of waited before i asked that question...:eek: Right after posting I read back over the OP and saw the example in the code box. Gonna try this out now.:)
 

relevent81

Member
Aug 12, 2009
10
0
Re: [PATCH] Firerat 'all in one' patch file [ v1.2 - 2010-05-11 ]

Works like a charm, after a flash and a fix, I haven't the slightest problem.

Thanks firerat!
 

Firerat

Senior Member
Feb 24, 2009
3,848
185
It seems like the LWP fix doesn't want to play nice with the MyTouch 1.2

as I don't have a mytouch 1.2 I can't test it

but I can't think why it wouldn't work if it worked on a g1

maybe I need to clarify, it won't fix the lwp which fc, because they are not supported in the framework

currently, cm5 test3 , only lwp from the market work

it appears lwp are being coded out of the dream/magic frameworks
presumably because of their lack of stability
 

tplotplo

Senior Member
May 2, 2010
70
4
Hi Firerat
I've installed the patch because my facebook wasn't syncing properly; I installed the "/all". Thanks now facebook syncs :) but since that I can not switch back to 2G only, even when I tick the "only 2G network" the 3G icon and connexion are always here, it firstly disappear and then 2 sec after the 3G reappears.
Do you havea a clue ?
Cheers !
 

shawn1224

Senior Member
Feb 2, 2010
712
52
as I don't have a mytouch 1.2 I can't test it

but I can't think why it wouldn't work if it worked on a g1

maybe I need to clarify, it won't fix the lwp which fc, because they are not supported in the framework

currently, cm5 test3 , only lwp from the market work

it appears lwp are being coded out of the dream/magic frameworks
presumably because of their lack of stability

Yea, I wasn't banking on it working with the Nexus default LWP but I still get the reset glitch when it goes into sleep mode using seeds of life LWP off the market.
 

Firerat

Senior Member
Feb 24, 2009
3,848
185
Hi Firerat
I've installed the patch because my facebook wasn't syncing properly; I installed the "/all". Thanks now facebook syncs :) but since that I can not switch back to 2G only, even when I tick the "only 2G network" the 3G icon and connexion are always here, it firstly disappear and then 2 sec after the 3G reappears.
Do you havea a clue ?
Cheers !

sorry , not a clue
and I really can't see how anything would effect 3G
 

tplotplo

Senior Member
May 2, 2010
70
4
Thanks for the reply mate, I was thinking about the same, the script changes nothing related to the 3G settings, I really don't understand :s
I will nand backup :)
Keep up the good shared work anyway ;)
Cheers
 

Firerat

Senior Member
Feb 24, 2009
3,848
185
Yea, I wasn't banking on it working with the Nexus default LWP but I still get the reset glitch when it goes into sleep mode using seeds of life LWP off the market.

hmm,
seeds of life seems to be working on my g1

let me see if I can figure out why it wouldn't be working for you
 

tplotplo

Senior Member
May 2, 2010
70
4
My bad Fire, I just backed up, test 3 img before your script was being installed, wiped everything and had the same problem again, so nothing to do with your work :)
Cheers
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I have tried this too, but still not working, don't know if i am messed the files in the phone abit?

    Code:
    I/ActivityManager(  255): Start proc com.rechild.advancedtaskkiller for activity
     com.rechild.advancedtaskkiller/.AdvancedTaskKiller: pid=957 uid=10063 gids={300
    3, 1015, 1003}
    W/ApplicationContext(  957): Attempt to read preferences file /data/data/com.rec
    hild.advancedtaskkiller/shared_prefs/com.rechild.advancedtaskkiller_preferences.
    xml without permission
    I/Database(  957): sqlite returned: error code = 14, msg = cannot open file at s
    ource line 25467
    E/Database(  957): sqlite3_open_v2("/data/data/com.rechild.advancedtaskkiller/da
    tabases/webview.db", &handle, 6, NULL) failed
    I/Database(  957): sqlite returned: error code = 14, msg = cannot open file at s
    ource line 25467
    E/Database(  957): sqlite3_open_v2("/data/data/com.rechild.advancedtaskkiller/da
    tabases/webviewCache.db", &handle, 6, NULL) failed
    W/ApplicationContext(  957): Attempt to read preferences file /data/data/com.rec
    hild.advancedtaskkiller/shared_prefs/google_ads.xml.xml without permission
    W/ApplicationContext(  957): Attempt to read preferences file /data/data/com.rec
    hild.advancedtaskkiller/shared_prefs/CleanoidUnselectedPackage.xml without permi
    ssion
    W/ApplicationContext(  957): Attempt to read preferences file /data/data/com.rec
    hild.advancedtaskkiller/shared_prefs/IgnoredPackage.xml without permission
    E/ApplicationContext(  957): Couldn't rename file /data/data/com.rechild.advance
    dtaskkiller/shared_prefs/google_ads.xml.xml to backup file /data/data/com.rechil
    d.advancedtaskkiller/shared_prefs/google_ads.xml.xml.bak
    I/ActivityManager(  255): Displayed activity com.rechild.advancedtaskkiller/.Adv
    ancedTaskKiller: 1225 ms (total 1225 ms)
    D/WriteApps(  957): Error: java.io.FileNotFoundException: /data/data/com.rechild
    .advancedtaskkiller/files/trackball_lights (Permission denied)
    W/webcore (  957): Can't get the viewWidth after the first layout
    D/dalvikvm(  957): GC_FOR_MALLOC freed 2319 objects / 185656 bytes in 99ms
    W/dalvikvm(  957): threadid=11: thread exiting with uncaught exception (group=0x
    400207e8)
    E/AndroidRuntime(  957): FATAL EXCEPTION: WebViewWorkerThread
    E/AndroidRuntime(  957): java.lang.NullPointerException
    E/AndroidRuntime(  957):        at android.webkit.WebViewDatabase.getCacheTotalS
    ize(WebViewDatabase.java:734)
    E/AndroidRuntime(  957):        at android.webkit.CacheManager.trimCacheIfNeeded
    (CacheManager.java:548)
    E/AndroidRuntime(  957):        at android.webkit.WebViewWorker.handleMessage(We
    bViewWorker.java:190)
    E/AndroidRuntime(  957):        at android.os.Handler.dispatchMessage(Handler.ja
    va:99)
    E/AndroidRuntime(  957):        at android.os.Looper.loop(Looper.java:123)
    E/AndroidRuntime(  957):        at android.os.HandlerThread.run(HandlerThread.ja
    va:60)
    W/ActivityManager(  255):   Force finishing activity com.rechild.advancedtaskkil
    ler/.AdvancedTaskKiller
    W/webcore (  957): Can't get the viewWidth after the first layout
    I/Process (  957): Sending signal. PID: 957 SIG: 9
    I/ActivityManager(  255): Process com.rechild.advancedtaskkiller (pid 957) has d
    ied.
    W/InputManagerService(  255): Got RemoteException sending setActive(false) notif
    ication to pid 957 uid 10063

    Here is what i have got when i try starting apps like task killer..It just forced me to close!

    Code:
    su
    fix_permissions

    when that is done uninstall taskkiller, your phone will run better
    1
    Hey Firerat you are a hard guy to get a hold of. lol You might notice me on the cyanogen forums. But I have a real quick ?. What do I have to edit or could you make me the files to use this correctly on the desire with the stock sense rom?

    I have it working right now with 200mb free with the cache size on 10 or 15mb. But I can't download anything from the market over that size. Which i guess is because /cache isn't being bind mounted. I have no idea how to fix it either :(

    I used your files that ennon has posted by the way. If it takes donating I can do that also.

    if the bind script is not running, run it manually

    Code:
    su
    sh /sd-ext/userinit.d/06BindCache

    that assumes you are not using a CM based ROM which should be running that script

    btw, I think your in the wrong thread
    this one has nothing to do with customMTD

    quickest way to get hold of me is in one of my threads,

    threads are preferred as other people can answer ( so its quicker )

    I have PMs turned off as I was fed up with idiots asking me how to root or to fix their kang'o'rom/custom update zip
    1
    Just make sure you don't donate because it will be returned ;)

    lol ^^ true story

    Anyway

    Artifex14 has what he needs, we did it over email

    you can expect some exciting things with his next rom release

    well not that exciting, just more convenient for people
    1
    Yes. How I love the tricks you play in your script.
    Wonderful!

    But, I'm on the 6.1 stable... now, anyways. Same problem. (Did a fresh install on the 6.1 stable, too--)
    I love how the sdext script allows the fresh installs to be much easier--- without all the hassle of re-installing EVERY DAMNED APP.
    Thank you. Thank you. Thank you.

    I noticed a couple more apps missing, and I finally figured out that it is, in fact-- the private apps that are missing after this fresh install.

    There's the logcat--- I used aLogcat--- and there were so many options, I simply left it at the default.
    If i need to post a better one, let me know...

    I ctrl+f'ed for net.dinglish.taskerm-1.apk (gah, I miss that app so much =( )
    but it wasn't even there...

    Thanks for the help, man.

    If you ever post your paypal e-mail, i'm sending you money.
    Period.

    Or hell! I know how much you Brits like Rolling Rock. But the Queen won't allow it to be imported 'cause it's the best Ale in all the land!
    So I'll send you a 6 pack o' that if you'd really like.

    You've been more helpful to me throughout my modding escapades than you can really imagine, and I would like to say "thank you" one way or another---

    I'm going to need the logcat during boot ( which you can do with that alogcat apk )

    you will need adb

    during boot ( with usb plugged in )

    adb logcat
    1
    OK, so--- I restored one of my nightlies--- uninstalled the apps I was missing from the 6.1 stable--- and then did a fresh install again.

    Those apps are STILL missing from the market---

    Damn! Yeah, there's something up with the cm6.1--- or maybe 85m isn't big enough for system?

    df -h told me it only needed 83--- and the thread said go 2m over that...
    The setting worked fine with the 266 nightly---


    OK, and thanks for the patience, but adb logcat during boot erases the beginning after so long... so, how can I get the ENTIRE thing-- instead of a fractional snippet...?
    I can't imagine this is helpful at all, but here are a couple of snippets I was able to select and copy before it finished booting.

    adb logcat > somelog.txt
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone