Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,293 Members 38,594 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Firerat
Old
(Last edited by Firerat; 5th December 2010 at 03:39 PM.) Reason: v1.4.1 beta2
#1  
Account currently disabled - OP
Thanks Meter 193
Posts: 3,848
Join Date: Feb 2009

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

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.21.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
Attached Files
File Type: txt fr-patch133.txt - [Click for QR Code] (14.2 KB, 1427 views)
File Type: txt fr-patch134.txt - [Click for QR Code] (17.1 KB, 2570 views)
File Type: txt fr-patch137.txt - [Click for QR Code] (21.2 KB, 262 views)
File Type: txt fr-patch138b.txt - [Click for QR Code] (31.8 KB, 1666 views)
File Type: txt fr-patch139.txt - [Click for QR Code] (40.3 KB, 2158 views)
File Type: txt fr-patch140.txt - [Click for QR Code] (41.0 KB, 4302 views)
File Type: txt fr-patch141-BETA.txt - [Click for QR Code] (51.0 KB, 1521 views)
File Type: txt fr-patch141-BETA2.txt - [Click for QR Code] (51.2 KB, 2268 views)
 
Firerat
Old
(Last edited by Firerat; 7th November 2010 at 03:13 PM.) Reason: typo "inspired Maxisma's" to "inspired by Maxisma's"
#2  
Account currently disabled - OP
Thanks Meter 193
Posts: 3,848
Join Date: Feb 2009

 
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/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
 
Firerat
Old
#3  
Account currently disabled - OP
Thanks Meter 193
Posts: 3,848
Join Date: Feb 2009

 
DONATE TO ME
reserving for future use
 
El_Nino9
Old
#4  
Senior Member
Thanks Meter 27
Posts: 182
Join Date: Dec 2009
Location: London
great work firerat.
like
 
tman7510
Old
#5  
Senior Member
Thanks Meter 4
Posts: 223
Join Date: Jul 2009
Location: Virginia
Will this script work for cm5 based ROMs like Superbad 1.2.1?
 
Firerat
Old
#6  
Account currently disabled - OP
Thanks Meter 193
Posts: 3,848
Join Date: Feb 2009

 
DONATE TO ME
Quote:
Originally Posted by tman7510 View Post
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.
 
Klyentel
Old
#7  
Klyentel's Avatar
Senior Member
Thanks Meter 85
Posts: 792
Join Date: Aug 2009
Location: Rocky Mount, NC
so how do we use it? Just download the patch to the root of sd and run the commands from terminal or what?
Roadside Assistance

HTC Supersonic vEVO
Fully flashed to Verizon $50 unlimited prepaid
 
Firerat
Old
#8  
Account currently disabled - OP
Thanks Meter 193
Posts: 3,848
Join Date: Feb 2009

 
DONATE TO ME
Quote:
Originally Posted by Klyentel View Post
so how do we use it? Just download the patch to the root of sd and run the commands from terminal or what?
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
 
shawn1224
Old
#9  
shawn1224's Avatar
Senior Member
Thanks Meter 50
Posts: 705
Join Date: Feb 2010
It seems like the LWP fix doesn't want to play nice with the MyTouch 1.2
 
Klyentel
Old
#10  
Klyentel's Avatar
Senior Member
Thanks Meter 85
Posts: 792
Join Date: Aug 2009
Location: Rocky Mount, NC
Quote:
Originally Posted by Firerat View Post
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... Right after posting I read back over the OP and saw the example in the code box. Gonna try this out now.
Roadside Assistance

HTC Supersonic vEVO
Fully flashed to Verizon $50 unlimited prepaid

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

Advanced Search
Display Modes