OnePlus 2 Forums: Discuss Everything About The OP2!

Now that the OnePlus 2 has been officially unveiled and that we have had close-up … more

Intel & Micron Announce “Revolutionary” Storage Tech

Intel & Micron have announced 3D Xpoint technology—”the … more

Google Now Interfaces With Third-Party Messaging Apps

Google has announced that Ok Google voice commands can now be used to send … more

Make Your Lockscreen More Productive With Widgets

Are you running Android Lollipop? Do you miss the ability to add widgets to your lock … more

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

3,848 posts
Thanks Meter: 195
By Firerat, Account currently disabled on 11th May 2010, 01:52 PM
Post Reply Subscribe to Thread Email Thread
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'

Current options
# 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.

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/ 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
  • fixed the reverse flag ( changed from -r to rev , and the test in script )
  • added reverse option for swap lwp and dc2x
  • fixed userinit patch for those without sd ext partition
  • Fixed Patch 20userinit to use /data/local/ ( not /sd-ext/
  • 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

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

  • 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
Attached Files
File Type: txt fr-patch133.txt - [Click for QR Code] (14.2 KB, 1478 views)
File Type: txt fr-patch134.txt - [Click for QR Code] (17.1 KB, 2581 views)
File Type: txt fr-patch137.txt - [Click for QR Code] (21.2 KB, 271 views)
File Type: txt fr-patch138b.txt - [Click for QR Code] (31.8 KB, 1672 views)
File Type: txt fr-patch139.txt - [Click for QR Code] (40.3 KB, 2162 views)
File Type: txt fr-patch140.txt - [Click for QR Code] (41.0 KB, 4329 views)
File Type: txt fr-patch141-BETA.txt - [Click for QR Code] (51.0 KB, 1537 views)
File Type: txt fr-patch141-BETA2.txt - [Click for QR Code] (51.2 KB, 2394 views)
Last edited by Firerat; 5th December 2010 at 03:39 PM. Reason: v1.4.1 beta2
11th May 2010, 01:52 PM |#2  
OP Account currently disabled
Thanks Meter: 195
Donate to Me
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/
  • /sd-ext/bootanimations/
  • /sd-ext/bootanimations/
or each in its own folder e.g.
  • /sd-ext/bootanimations/ba1/
  • /sd-ext/bootanimations/nexus/
  • /sd-ext/bootanimations/another/
or a mix of both, I don't care
if /system/media/ 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
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

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 )

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 )

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

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

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 )

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

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 by Firerat; 7th November 2010 at 03:13 PM. Reason: typo "inspired Maxisma's" to "inspired by Maxisma's"
11th May 2010, 01:53 PM |#3  
OP Account currently disabled
Thanks Meter: 195
Donate to Me
reserving for future use
11th May 2010, 01:59 PM |#4  
Senior Member
Flag London
Thanks Meter: 35
great work firerat.
11th May 2010, 04:58 PM |#5  
Senior Member
Flag Virginia
Thanks Meter: 4
Will this script work for cm5 based ROMs like Superbad 1.2.1?
11th May 2010, 05:22 PM |#6  
OP Account currently disabled
Thanks Meter: 195
Donate to Me
Originally Posted by tman7510

Will this script work for cm5 based ROMs like Superbad 1.2.1?

yeah, should be fine

can't guarantee it as I haven't looked at superbad, but if it is cm5 based, no problem.
11th May 2010, 05:45 PM |#7  
Klyentel's Avatar
Senior Member
Flag Rocky Mount, NC
Thanks Meter: 121
so how do we use it? Just download the patch to the root of sd and run the commands from terminal or what?
11th May 2010, 05:47 PM |#8  
OP Account currently disabled
Thanks Meter: 195
Donate to Me
Originally Posted by Klyentel

so how do we use it? Just download the patch to the root of sd and run the commands from terminal or what?

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
11th May 2010, 05:50 PM |#9  
shawn1224's Avatar
Senior Member
Thanks Meter: 52
It seems like the LWP fix doesn't want to play nice with the MyTouch 1.2
11th May 2010, 05:52 PM |#10  
Klyentel's Avatar
Senior Member
Flag Rocky Mount, NC
Thanks Meter: 121
Originally Posted by Firerat

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... Right after posting I read back over the OP and saw the example in the code box. Gonna try this out now.
11th May 2010, 05:52 PM |#11  
launcher009's Avatar
Junior Member
Annapolis, MD
Thanks Meter: 0
Awesome work Firerat. Just used it to fix Facebook sync in CM 5.0.7-t3 for G1. Works perfectly.

Read More
Post Reply Subscribe to Thread

cm6, dream, firerat, market fb sync on g1, sdext, swap
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes