[Dev] Output to CWM recovery via shell script (with sample) [Thanks Chainfire] - Epic 4G Android Development

This is for developers, rom packers, etc.
When Rodderik was working on his sdboot partitioning script, I was told about a way to get a shell script run from recovery to output to the user using the ui_print command.
Since then, I have been curious if it is possible to report progress to CWM from a script as well.
I finally got around to doing some research and figured out how to get reporting progress working.
I used the sources found here to figure it out.
Then, while asking around where the ui_print stuff came from (so I can give credit) I was pointed to this post by Chainfire:
[TRICK/CWM3/EDIFY] Output to recovery UI from shell script
So it seems it had already been done (figures), but oh well, it's still good stuff!
I'm posting here so more people will see it and I've also attached a sample zip as a working example.
The example has been tested and is working in both Grape-Ape and Bonsai recovery.
Credits:
Chainfire for figuring this out to begin with.
chris41g for sharing it with Rodderik (and indirectly me) and for digging up the link to Chainfire's thread.
Rodderik for sharing it with me and creating a nice little sample for me (which exposed why my initial attempt wasn't working).
Note that, apparently, to get a nice full progress bar, the full value should be about "1.335".
Also my scripts are a little different than Chainfire's, but the basics are the same.
(Check the sources link if you want detailed descriptions of the commands.)
Enjoy.
=]

So much easier to skip the edify scripts and do everything from Sh scripts...

indeed much more flexibility doing it that way...i've been thinking about doing it this way myself from now on

Hi ive big problem.
I would try to convert the update-script to an shell script.
Its possible?
please help.
I use cwm 4.0.0.9 lg optimus speed.

Related

[TOOL] RavensScript v1.4 added BFS311 + CFS, (turbo opt, zipalign, bash)

This is a simple script i constructed to do some of your everyday usages such as mounting system as rw or ro, mounting sdcard, unmounting options and new features such as the option to install Zipalign to any rom and an option to execute Zipalign. Also the option to install bash and have a custom built bash_profile which you can edit anyway you like. Also there is an option to install my personal "mountSys" script which basically does mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 system, and all you have to type in terminal is "su" and then "mountSys" to mount system. Also reboot and exit options. If you have any special requests or bugs lemme know, im still in my rookie stages of self taught scripting nd developement.
Credit for Zipalign goes to wesgarner
Credit for bash shell goes to mzet
Credit for BFS311 ram edit goes to cyanogen
Credit for CFS ram edit goes to dwang
If you dont kno how to use or what exactly bash is click http://forum.xda-developers.com/showthread.php?t=537827&highlight=bash+profile to go to mzet's thread
Instructions
> if you dont have a folder called tmp (/sdcard/tmp) then copy the whole tmp folder to your sdcard, if you do then just cp the files to your tmp folder
> in terminal do:
sh /sdcard/tmp/ravensScript.sh
> make sure before you install anything that you mount your system by either installing my mountSys script first and then runing "mountSys" or choosing the "mount system as rw" option
AGAIN if you have any special requests or bugs lemme know nd like i said im a rookie so bare with me. Thanks
NOTICE TO DEV's, you can pull the Turbo Optimize script if you like
Changelog
v1.4
force close fix
v1.3
(added) BFS311 by cyan
(added) CFS by dwang
cleaned up a bit more
v1.2
Turbo Optimization (NEW)
Cleaned up look
Turbo Optimize is just dexopting your .apks in /system/app and a few of the framework.jar files. The idea came from digging into my friends Droid and uncovering new odex's. Also after optimizing it runs an updated 1.6 (donut) permissions script so there are no fc errors. Things should be slightly faster and a small increase in mb.
Downloads
v1.4 http://www.mediafire.com/?jtugujgnoth
v1.3 http://www.mediafire.com/file/0aybyynzzqm/RavenScript-v1.3.zip
All works well, sry for my noobinis but wats bash
cali50ex said:
All works well, sry for my noobinis but wats bash
Click to expand...
Click to collapse
Bash is a linux command shell based off of Mac OS*
Oh, alrighty lol. Thanks again
Misleading history of Bash
ravenjr said:
Bash is a linux command shell based off of Mac OS*
Click to expand...
Click to collapse
Umm, I dont want to be the computer history nerd butting in, but Bash is not based off of Mac OS*. Bash predates Mac OS X, which is the only Mac OS that is a Unix (I am not a mac guy but I am pretty sure there was no Bash in Mac before OS X, at least not in an official capacity). Mac OS X does use Bash as its primary command shell, but so does several other OSs like many Linuxs, and the GNU operating system. From the wiki:
"Bash is the shell for the GNU operating system from the GNU Project." (http://en.wikipedia.org/wiki/Bash)
clarke.hackworth said:
Umm, I dont want to be the computer history nerd butting in, but Bash is not based off of Mac OS*. Bash predates Mac OS X, which is the only Mac OS that is a Unix (I am not a mac guy but I am pretty sure there was no Bash in Mac before OS X, at least not in an official capacity). Mac OS X does use Bash as its primary command shell, but so does several other OSs like many Linuxs, and the GNU operating system. From the wiki:
"Bash is the shell for the GNU operating system from the GNU Project." (http://en.wikipedia.org/wiki/Bash)
Click to expand...
Click to collapse
Hmm interesting info, im not a windows guy period but you seem to be right so cudos
help
How do I mount system?
saenz4931 said:
How do I mount system?
Click to expand...
Click to collapse
by reading the first post
bengrulz said:
by reading the first post
Click to expand...
Click to collapse
*****s bricks in astonishment*
care to explain what turbo optimize does?
cephaus said:
care to explain what turbo optimize does?
Click to expand...
Click to collapse
haha seriously
Probably shouldnt use words like that without an explanation included... it IS a script that we'll be running on OUR phones
ravenjr said:
Bash is a linux command shell based off of Mac OS*
Click to expand...
Click to collapse
haha. Guy's got bawls coming to a forum dominated by Linux nerds saying that bash is from Mac OS.
(Mac OS is just a pale, proprietary, expensive imitation of what GNU/Linux and the open source community can do--with shiny buttons )
That said... I would love to know what exactly this "turbo optimization" is?
Having looking at the script, turbo optimization is just dexopting your APKs and the framework.
And i'm pretty sure the OP just got the code from this thread here:
http://forum.xda-developers.com/showthread.php?t=561579
IMO dexopting is ok idea if you're short on space; but when most people are either using A2SD or have larger devices, the drawbacks on dexopting everything means it's not worth it.
cephaus said:
care to explain what turbo optimize does?
Click to expand...
Click to collapse
odex's apks, its actually juz part of it, messing around with the Droid i've found even more ways to optimize nd speed things up, only problem is only part of the script will work in terminal so im writing a new script to execute from recovery console, so it will be included in v1.3
ravenjr said:
odex's apks, its actually juz part of it, messing around with the Droid i've found even more ways to optimize nd speed things up, only problem is only part of the script will work in terminal so im writing a new script to execute from recovery console, so it will be included in v1.3
Click to expand...
Click to collapse
carnegie0107 said:
haha. Guy's got bawls coming to a forum dominated by Linux nerds saying that bash is from Mac OS.
(Mac OS is just a pale, proprietary, expensive imitation of what GNU/Linux and the open source community can do--with shiny buttons )
That said... I would love to know what exactly this "turbo optimization" is?
Click to expand...
Click to collapse
Turbo optimize is just odexing apks and a few of framework.jars ,the idea came from observing my friends Droid, i removed all odexes and noticed a speed decrease, also noticing that all /system/framework/*.jars were odexed, so i just wrote the script to odex just a few of framework because im getting a bug when trying to odex the Dream's framework
there is no mountsys script in zip?
senab said:
Having looking at the script, turbo optimization is just dexopting your APKs and the framework.
And i'm pretty sure the OP just got the code from this thread here:
http://forum.xda-developers.com/showthread.php?t=561579
IMO dexopting is ok idea if you're short on space; but when most people are either using A2SD or have larger devices, the drawbacks on dexopting everything means it's not worth it.
Click to expand...
Click to collapse
Dexopting is fairly easy to write a script to execute, my script didnt come from any thread, another one of you nerds in my class actually just simply explained what it is and how to script it........that being said i pulled dexopt-wrapper from one of the first hero roms released, anyways no credit beeing taken likei said its just a basic tool and shouldnt cause any trouble but much respect due to you devs or wanna-bees......
Tried the script, after I rebooted I encountered many FC's.
It's a great idea and sounds good, but is a no-go at least for me on Cyanogenmod's latest firmware.
Most, if not all, of my apps are zipaligned already. The "Turbo optimization" only brought me more trouble, though.
Not trying to bash on your work, dev - I'm just posting my results; it's probably something gone wrong on my part.
Proxin said:
Tried the script, after I rebooted I encountered many FC's.
It's a great idea and sounds good, but is a no-go at least for me on Cyanogenmod's latest firmware.
Most, if not all, of my apps are zipaligned already. The "Turbo optimization" only brought me more trouble, though.
Not trying to bash on your work, dev - I'm just posting my results; it's probably something gone wrong on my part.
Click to expand...
Click to collapse
run fix_permissions, report back....
ravenjr said:
run fix_permissions, report back....
Click to expand...
Click to collapse
I got it fixed, after a few failed attempts to get nandroid to restore my ext backup I just went to the computer and reinstalled all of my original apk's.
I would try again to see if the problem persists and if fix_permissions would fix it, but I'm going to be needing my phone this week for notes so I need it to be in working order.

[THINK TANK] Toggle between RHack and NonRamHack

Hey Everyone,
I was just wondering that if we have a build to which we have BOTH RamHack kernels and the non-ramhack kernel, would there be a way to write a quick app or script to switch between them.
I guess we could store both kernels on the /sdcard and use a .sh script to flash_image between them, and reboot. I dont believe we can "hot-swap" between kernels, but if anyone knows a method, please respond here
If anyone can think of a better or more efficient method of doing this, I believe the whole community would benefit. Lets see if we can get something like this going....
zimphishmonger said:
Hey Everyone,
I was just wondering that if we have a build to which we have BOTH RamHack kernels and the non-ramhack kernel, would there be a way to write a quick app or script to switch between them.
I guess we could store both kernels on the /sdcard and use a .sh script to flash_image between them, and reboot. I dont believe we can "hot-swap" between kernels, but if anyone knows a method, please respond here
If anyone can think of a better or more efficient method of doing this, I believe the whole community would benefit. Lets see if we can get something like this going....
Click to expand...
Click to collapse
is it really that hard to boot into recovery and flash an update.zip?
I guess this is what you're looking for:
http://wootroot.com/blog/?page_id=1463
Ive seen it implemented on one other rom on xda, but can't remember which one ..
I am trying to make it easier and more efficient to switch between them. The uneek switch seems exactly what im looking for
I put together a version of uneeks script that can be flashed over SuperD or FastTest3.1.
ISSUE THOUGH, I cant get it to flash correctly, as I get the "update-script not found" error, even though I signed it and created the appropriate META-INF directories.
Here is the file, if anyone thinks they can fix it
Uneek Script (needs to be fixed\signed) : http://www.4shared.com/file/257220832/8b6c2940/uneek.html
Alpha release
Here is a very alpha release of a working port of uneek's RamHack/NonRamHack Toggle script ported to SuperD 1.10.2 by myself.
http://www.4shared.com/file/257253893/a61182a2/Uneek_Script.html
Instructions
extract zip file to /sdcard/uneek
Launch terminal
type 'su'
type 'sh /sdcard/uneek/install-uneek.sh' -should see no errors/messages
execute 'uneek' from /system/bin
Chose Ram option or JIT (not tested) options, all others prob dont work as I didnt modify them
reboot (you must do so to see effects take place, the kernel doesn't "hot-swap" :-( )
WiFi still works, CC & Swap work.
Issues
Switch breaks boot screen - not sure why as its stored in framework-res.apk, but still a bug
Leave me feedback\ improvements\whatever......
You still have to boot into recovery so you might as well flash a zip containing a rhack or noram-hack kernel.
I did some scripts based off Kings,
get gscript from the market ( donate if you like it )
and drop script into the gscript folder
with a little uname query you could have just one script, which switches based on the current running kernel
Edit: , actually if your kernel needs different kernel modules, then you will have to build in a copy ( which I suspect is where king got his rwsystem bit from , he copied from a script which updates the kernel modules )
Firerat said:
...<snip>...
my faster, much safer script
Code:
#!/system/bin/sh
if [ -e /data/kernels/full3d.img ];
then
if [ "`md5sum /data/kernels/full3d.img|cut -d " " -f1`" != "061284119d4ce46cbe0b585e0a8b2d0b" ];
then
echo "/data/kernels/full3d.img isn't the version I was expecting"
echo "I'm not going to flash it, as it may have become corupt"
exit 1
else
flash_image boot /data/kernels/full3d.img
echo "full3d Kernel Flashed..."
echo "Rebooting now"
sleep 1
shutdown -r now
fi
else
echo "Sorry, /data/kernels/full3d.img"
echo "seems to be missing....."
exit 1
fi
and yeah, I could never spell corrupt , is it one or two 'r's?
PS , the md5sums in the scripts are for the power off fix boot.img's I did for you guys
if you are wanting to switch to different boot.imgs then update the md5sum its checking for ( or remove the check )
Click to expand...
Click to collapse
If you have an engineering SPL installed, there isn't any need for the recovery partition, so might as well install your second kernel to the recovery partition. Boot normal = normal, boot recovery = ramhack.
lbcoder said:
If you have an engineering SPL installed, there isn't any need for the recovery partition, so might as well install your second kernel to the recovery partition. Boot normal = normal, boot recovery = ramhack.
Click to expand...
Click to collapse
and then have a script switch wlan.ko if incompatible
might as well switch with script and keep recovery for the odd times when you just want to quickly flash some zips from a list and not at your pc.
yeap, I've downloaded and flashed a rom while 'out and about' before.
Firerat said:
and then have a script switch wlan.ko if incompatible
might as well switch with script and keep recovery for the odd times when you just want to quickly flash some zips from a list and not at your pc.
yeap, I've downloaded and flashed a rom while 'out and about' before.
Click to expand...
Click to collapse
If the only difference is ramhack on one but not the other, then the wlan module will be fine -- there is NO REASON to be switching modules around with your kernel unless you use a kernel that is binary incompatible -- which means DIFFERENT VERSION.
lbcoder said:
If the only difference is ramhack on one but not the other, then the wlan module will be fine -- there is NO REASON to be switching modules around with your kernel unless you use a kernel that is binary incompatible -- which means DIFFERENT VERSION.
Click to expand...
Click to collapse
yeap, true but why not keep options open?
What if they decide they want to switch between binary incompatible kernels?
They would need to switch kernel modules anyway.
so get a script that works, and is simple to 'generate'.
I know you are trying to keep it simple, but you are actually needlessly setting up restrictions, which would then require a script to get around.
So why not use a script from the start, keeping the added convenience of a recovery image?
Firerat said:
yeap, true but why not keep options open?
What if they decide they want to switch between binary incompatible kernels?
They would need to switch kernel modules anyway.
so get a script that works, and is simple to 'generate'.
I know you are trying to keep it simple, but you are actually needlessly setting up restrictions, which would then require a script to get around.
So why not use a script from the start, keeping the added convenience of a recovery image?
Click to expand...
Click to collapse
If the only objective is to be able to easily toggle between ramhack and noramhack, then the recovery solution is (1) more reliable, (2) doesn't require reflashing NAND, (3) just easier to activate. With the reflashing approach, you have to either go into recovery and flash something, or pause-and-wait-and-autoreboot.
lbcoder said:
If the only objective is to be able to easily toggle between ramhack and noramhack, then the recovery solution is (1) more reliable, (2) doesn't require reflashing NAND, (3) just easier to activate. With the reflashing approach, you have to either go into recovery and flash something, or pause-and-wait-and-autoreboot.
Click to expand...
Click to collapse
did you ever read anything?
the script is as easy as a couple of taps, maybe home button, swipe tap tap.
( the key app here is gscript )
the flash is over very quickly, it checks md5sum first, it reboots.
you have to reboot with the recovery method anyway
recovery method restricts to binary compatible kernels, or require a script to switch kernel modules.
It is a no brainer imo, keep it flexible and keep the convenience of a true recovery.img
ok, so nand only gets what, on average 10,000 writes, is it really going to reduce its life in practice?
I like your idea, it will work but it just isn't as flexible as a script.
It is however more suited to an mt3g, offering duel ROM
I'm thinking mtdblock3 for one ROM, block4 for the other
errm, data , yeah might need to section that up somehow
any reason why a loopback can't sit on yaffs?
oh, and the ramdisk will need tweaking, obviously.
Sorry back on topic
Guys,
Either will work, if you do have incompatible kernels, and are having problems with scripts just let me know, I can probably make a script to generate a script for you.
1) Booting into recovery to change out your kernel image is totally unnecessary. You can do it via CLI with the flash_image command -- most every modded ROM already includes it.
2) Removing the recovery image just to put up a second install also seems somewhat overkill for devices as heavily limited on storage as most Android phones -- especially the G1.
3) I don't know about loopback on yaffs2 -- but I don't see any reason why it couldn't work.
4) It really seems to me that what we need is some kernel hacker who's familiar with hotswapping patched files -- a la ksplice ( http://www.ksplice.com/ ) -- to hack together a genuine, non-rebooting, RAMhack switch.
5) In all seriousness; what makes gscript superior to ASE ( http://code.google.com/p/android-scripting )?
IConrad01 said:
5) In all seriousness; what makes gscript superior to ASE ( http://code.google.com/android-scripting )?
Click to expand...
Click to collapse
Nothing, apart from its easy, it works and I haven't looked at ase yet
btw , you missed a p/ in that link
http://code.google.com/p/android-scripting/
btw , you missed a p/ in that link
http://code.google.com/p/android-scripting/
Click to expand...
Click to collapse
>_<
Pesky perniciously persistently phantasmagoric P!!!
I just keep on seeing people referring to gScript when ASE is a vastly more robust offering. It can run its scripts as daemons, run in background, run in terminal, it offers the same desktop shortcut option -- and more importantly, it can run Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell scripts. (It loads the interpreters onto your /sdcard.) I've asked this question more than once before and I've never gotten an answer. It really seems like people just aren't aware of ASE -- which is kinda sad, considering the fact that ASE is still seeing continuing development whereas development ended on gScript sometime at the end of last year.
IConrad01 said:
>_<
Pesky perniciously persistently phantasmagoric P!!!
I just keep on seeing people referring to gScript when ASE is a vastly more robust offering. It can run its scripts as daemons, run in background, run in terminal, it offers the same desktop shortcut option -- and more importantly, it can run Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell scripts. (It loads the interpreters onto your /sdcard.)
Click to expand...
Click to collapse
no, I am very interested in it,
I have been meaning to have a proper look at it for sometime
, I think I first saw it on @google
gscript is just handy,
unzip this, gscript from market,add, load, tick su, save , tap
But I promise , I will look at ASE
Firerat said:
and then have a script switch wlan.ko if incompatible
might as well switch with script and keep recovery for the odd times when you just want to quickly flash some zips from a list and not at your pc.
yeap, I've downloaded and flashed a rom while 'out and about' before.
Click to expand...
Click to collapse
Glad this is getting your attention....My script was pretty dirty anyways.
Anyway you can package it up in signed-zip format for easy access and modification of boot.imgs. Im having some issues with the update-script portion during the signing process tos keeping me from getting mine to be "flashable"
zimphishmonger said:
Glad this is getting your attention....My script was pretty dirty anyways.
Anyway you can package it up in signed-zip format for easy access and modification of boot.imgs. Im having some issues with the update-script portion during the signing process tos keeping me from getting mine to be "flashable"
Click to expand...
Click to collapse
still having update-script issues?
if you post it, I'll be happy to take a look for you
Oh, I've started a kernel switch script
I'll do some testing when its done and post it here for you

[PROJECT][WiP] CMbins v0.3.1

Originally this was going to be something I would do for Kyorarom v0.2.0, but I will also let the general public in on my works.
I am currently going through every single file in CM6.2 and seeing if it will work on Froyo with little to no effort. Why? Well think of it as a poor mans alternative to a fully functioning CM6.2. I respect marcellusbes work 100% but there are so many people who are being impatient about the non-existant ETA of CM6.2 and CM7 (BECAUSE IT SAYS THERE IS NO ETA AND THERE SHOULD NOT NEED TO BE AN ETA), I decided to give the people half of what the want: the performance and open sourceness of CM6.2 while still retaining 100% functionality of the Samsung firmware.
Current Status
99% of the bins are working
A few CM apps are working
Some of the libs are working (but they are more just sitting in there)
--- CONSIDER THIS VERY MUCH IN BETA - THIS WILL HAVE A FEW BUGS HERE AND THERE SO PLEASE REPORT ALL OF THEM SO I CAN FIX THEM ---
Now remember, this is by no means an alternative to CM6.2, it is more of a stopgap for people who really want our phone to have CM6.2 on it.
I have been working on this all day today and haven't been able to actually test it properly, but it appears to be stable with the files I have added, and it also appears to be quicker. Not by much, but it feels a little smoother.
Why would I need this?
As I said, it's a poor mans CM6.2. It will give you 90% of the performance of CM6.2 while still giving you 100% functionality (provided I haven't broken anything) from Samsung firmware. Programs run quicker, the system responds faster, and the system just feels smoother in general. It's not like FuguTweaks or V6 Supercharger which gives you a tiny change, the goal of this is to give you a HUGE change.
What is noticably quicker?
Well I need people to tell me that, but what I have noticed is quicker is:
Screen rotate happens quicker
Scrolling through menus
Swiping around websites
System boot time
What do I need to use this?
Well I have only tested this on Kyorarom v0.2.0 alpha (unreleased), so I don't know how your results may go, but it SHOULD work on all JPS based SAMSUNG ROMS.
THIS IS NOT A PATCH FOR CM6.2! THIS IS A PATCH FOR SAMSUNG!
You will also need CWM with update.zip signing disabled. This is provided as an update.zip as there are SO MANY permissions that need to be set in the bins/xbins/libs that it would be ridiculous to tell people to run an ugly script which will probably not work on 99% of peoples computers, so an update.zip without signing is how I will do this. Why no signing? Because every guide I have followed to tell me how to sign a zip or an APK has done nothing useful. SOMEONE TELL ME HOW PLEASE!
How do I install this?
Just put this on your SD Card, go into CWM and tell it to update from an update.zip. Pretty simple. I highly recommend doing a system.img backup first though to be on the safe side in case something goes terribly wrong. Format your /system before restoring the system.img.
What should I do if I get a bug such as a force close or a random reboot
Get your phone right to just before the crash happens
Plug your phone into ADB
Go into ADB SHELL
Type logcat > /sdcard/crashlog.txt
Reproduce the crash
Wait until it has rebooted/force closed
Press Ctrl-C on ADB SHELL
Get the crashlog.txt off your SDcard and paste the last about 20-30 lines in a code box here telling me what you did to cause the crash.
Links
Patch 0.3.1 (requires Samsung firmware, recommended to be on JPS)
CMapps 0.3.0 (should work on Samsung firmware without CMbins)
CMbins Remover (will only replace the bins with the original Samsung bins)
Patch v0.2.0 (requires Samsung firmware, recommended to be on JPS)
Busybox Fix (for in case you installed any of the patches v0.0.3 and below - NOT AN UPDATE.ZIP: THIS IS A BUNCH OF FILES WITH A README)
Please note that this may play up with some custom themes, especially large ones such as MIUI as this replaces a lot of files which these themes may be using or rely upon.
Credits
marcellusbe for his incredibly hard work on CM6.2 and CM7 which sadly seems to not be appreciated as much as it should by some of this community. Please go over to both the CM6.2 and CM7 threads and thank him for his hard work, even if you have already done so.
Change Log
v0.3.1
Removed more pointless stuff such as the etc and libs as they won't provide a performance boost. They were more decoratio.
Fixed install script which removed TW apps but didn't replace them from v0.3.0.
v0.3.0
Removed pointless bins which don't provide any performance boost, such as ping and stuff.
Fixed force close lag bug.
v0.2.0
Added the last few bins that were missing. Only bins missing are the ones that cause the system to break.
Added a few more things from etc from CM. They shouldn't cause any difference.
v0.1.1
Fixed dalvik-cache building.
v0.1.0
Removed xbin. It was causing too many problems
Added a few libs (ones that aren't in Samsung)
Added a few items from etc
Replaced a few stock Samsung apps in order to clean the system up before I remove twframework.
v0.0.3
Fixed the missing meta-inf folder in the update.zip. Sorry guys!
v0.0.2
Fixed the busybox issue. the patch removed the old busybox and replaced it with a broken one. If this doesn't fix it then 'mount -o rw,remount /dev/block/stl6 /system' and 'chmod 755 /system/xbin/*'
I was doing something like this , cm framework on jps
But you did more
np
i didnt have the time to complete it fully(exams)
Best of luck!
cdesai said:
I was doing something like this , cm framework on jps
But you did more
np
i didnt have the time to complete it fully(exams)
Best of luck!
Click to expand...
Click to collapse
If you wish to help me then by all means I'll be grateful. I am nowhere near finished as there are a few files in /system/bin that still need checked to see if they cause issues. I just went through the alphabet and if a file such as 'dexopt' caused problems then I left out all of D. However that's just an example. Dexopt is left out, but I left in the rest of D as I found it causing problems later down the track. I know I am missing Q and S. I'm gonna go through them all tomorrow.
EDIT: Not to mention I want to go through frameworks and libs and the etc folder too.
I am not sure if this is helpfull or not... I instaled the update in my phone. At the moment, only issue is that busybox installer is not working after it get superuser permisions, and then i cannot open any other app. I need to reboot my system. If i find any other issue, i will let you know.
Sergiales said:
I am not sure if this is helpfull or not... I instaled the update in my phone. At the moment, only issue is that busybox installer is not working after it get superuser permisions, and then i cannot open any other app. I need to reboot my system. If i find any other issue, i will let you know.
Click to expand...
Click to collapse
Hmm, I might have done somethign weird with xbin. Try going into adb shell and run 'chmod 755 /system/xbin/*'. I might have to get it to set permissions in the update.zip for that folder.
EDIT: Try restore your system back to how it was prior the install of the update, and then try the other zip I just put in the first post. I think it'll be the xbin folder doing it.
@hillbeast
you also plan to port the framework of cm6?
ale_bot said:
@hillbeast
you also plan to port the framework of cm6?
Click to expand...
Click to collapse
I hope I can. The plan is to get everything that will work from CM6.2 in Samsung firmwares to work.
New version uploaded. See first post for details.
I fixed the busybox issue. I thought I fixed it earlier but aparently not. It was CM6.2s Busybox being in there that killed it. I put the Samsung one into v0.0.2 so it'll fix the grief it caused with version 0.0.1.
If it still causes issues then go into adb shell (or Terminal Emulator) and run this code:
Code:
mount -o rw,remount /dev/block/stl6 /system
chmod 755 /system/xbin/*
Donate and get rewarded
Good work, hillbeast.
I wish you would work more togother, i mean most of the main developers in g3.
you know the names.
And some more support from the community with donating and thanks or appriciation.
You (just caught you user reading this), could donate a little bit, so that your galaxy 3 is got tuned with great software, so it worth allmost double the price then you paid for it, because it expands with possibillities and powers.
Just click someones (dharamg3, marcelubes.. and some of all the other great programmers) donate button, type the number: 5 or 10 or 20 or 100 +++ etc, log in to paypal and DONATE!
(•.•) said:
Gut work, hillbeast.
I wish you would work more togother, i mean most of the main developers in g3.
you know the names.
And some more support from the community with donating and thanks or appriciation.
Yes You, could donate a little bit, so that your galaxy 3 is got tuned with great software, so it worth allmost double the price then you paid for it, because it expands with possibillities and powers.
Just click someones donate button, type the number: 5 or 10 or 20 or 100 +++ etc, log in to paypal and DONATE!
Click to expand...
Click to collapse
I actually work with dharamg3 on occasion and have given him ideas for G3Mod. I just don't take credit for anything because my contributions have been very minor at best and my credit isn't deserved considering how much more he and marcell have done for our phone.
hillbeast said:
I actually work with dharamg3 on occasion and have given him ideas for G3Mod. I just don't take credit for anything because my contributions have been very minor at best and my credit isn't deserved considering how much more he and marcell have done for our phone.
Click to expand...
Click to collapse
Yeah, i mean it for all developers, but you included of course. so why not.
Just for every user to remind if he reads my post.
(•.•) said:
Yeah, i mean it for all developers, but you included of course. so why not.
Just for every user to remind if he reads my post.
Click to expand...
Click to collapse
Yeah that is the entire point of the XDA: developers helping developers to make our phones incredible and help them reach their true potential.
People bash the Galaxy 3 but undreneith it's actually a really good phone with really good hardware. It's no dual-core Cortex-A9 with 1GB of DDR2 RAM or anything, but it's certainly a very good mid-range phone. It was just held back by Samsung not programming it right.
Nice vision man...best of luck
To make things easier i guess you can consult marcellusbe about what all stuff is not working in CM6.2...then u'll need to replace only those files instead of going through evry file !!
niteshtak said:
Nice vision man...best of luck
To make things easier i guess you can consult marcellusbe about what all stuff is not working in CM6.2...then u'll need to replace only those files instead of going through evry file !!
Click to expand...
Click to collapse
Yes however I also need to find what is compatible with the rest of Samsungs firmware.
hillbeast said:
Hmm, I might have done somethign weird with xbin. Try going into adb shell and run 'chmod 755 /system/xbin/*'. I might have to get it to set permissions in the update.zip for that folder.
EDIT: Try restore your system back to how it was prior the install of the update, and then try the other zip I just put in the first post. I think it'll be the xbin folder doing it.
Click to expand...
Click to collapse
I have just installed that 0.1 you told me and now is working good. I am gonna try the 0.2 and tell you if all is ok.
Guys I totally forgot the meta-inf folder in v0.0.2. You can just use the one from v0.0.1 as there is no signing or anything. I'll see if I can get the link on my phone for v1
Sent from my GT-I5800 using XDA App
But why using cyanogenmod files in samsung firmware ?
You know that CM 6.2 is the most awesome rom for froyo ! I've almost never had any lags and the rom is fast even after installing a tons of app's !
Darius_AWS said:
But why using cyanogenmod files in samsung firmware ?
You know that CM 6.2 is the most awesome rom for froyo ! I've almost never had any lags and the rom is fast even after installing a tons of app's !
Click to expand...
Click to collapse
Well its just a try to get the CM6.2 speed and smoothness on the samsung ROM..without having the bugs of CM6.2 which arent solved yet...
Sergiales said:
I have just installed that 0.1 you told me and now is working good. I am gonna try the 0.2 and tell you if all is ok.
Click to expand...
Click to collapse
Same problem in 0.2 with busybox installer, even trying to fix it with adb.
Darius_AWS said:
But why using cyanogenmod files in samsung firmware ?
You know that CM 6.2 is the most awesome rom for froyo ! I've almost never had any lags and the rom is fast even after installing a tons of app's !
Click to expand...
Click to collapse
As I stated in the OP, Cyanogenmod is incomplete and is buggy. The camera doesn't work, the FM radio doesn't work, no Bluetooth, and some things are buggy. By working in the opposite direction of moving to Cyanogenmod with small steps by using the working components from it, we get a balance.of speed and functionality which is what a lot of people have been moaning about all this time since CM went alpha.
Again, huge respect to marcell for getting it this far. This is a huge achievement from him.
Also here is the mediafire link for v1 so people can grab meta-inf and insert it into the v2. I will fix this in v3 later today.
Sent from my hybrid Kyorarom + Cyanogenmod Galaxy 3

[REF][SCRIPTS] Android Optimization Tips - i9001 (UPDATED 10/19/2011)

Updates
10/1/2011 - Added 00remounti9001 to remount the major partitions to noatime and disabled barriers for as well as delayed journaling to every 60 seconds (as opposed to 5) to /data, /persist, /cache. Added Acid Tweaks - Removed Useless Stuff i9001.zip to remove journaling from /cache and /system (It's safe). Also added JournalingOn.zip to revert back the two partitions to being journaled.
For the 00remount script, here's the how to:
0. Wait till Android finishes loading everything.
1. Install Script Manager from Market
2. Point script manager to the script you placed in the sdcard.
3. Run as root.
4. Do this at every boot, as mount points are reset to its default as set by the type of your lagfix. Voodoo (from what I am using will set barriers for /data and atime for every mount point except /system, /data, /cache, /dbdata which puts a slight risk at your disk for using atime.
5. You can add a widget to your home screen for the script so that you can
activate it easily.
The other two are CWM zips. You should know how to flash CWM zips right?
Introduction
I've made a Definite Guide on Android thread for i9000 that focuses on a few optimizations/scripts I've picked up over the months I've spent on XDA. I truly enjoyed sharing my knowledge with the i9000 community and since the tips/guide/scripts can also be applied here (save some exceptions that I would list down below),I would like to share this with the Captivate community too.
Exceptions
Take note that the guide is primarily for i9000 units. There are a few differences I can note here that you should be aware of:
1. The guide points out some kernels/ROMs that are for i9000. Hence the phones you are using may have different ROMs/kernels that may or may not correlate with the one in the guide.
2. The guide also mentions some apps/tweaks that are particularly alien to your unit and you may have never encountered it in your use of your phone or in XDA. Please ignore them for now, I'll make an effort to make the guide compatible in the future (with feedback from you guys of course )
3. Journaling scripts that are attached like the JournalingOn.zip and Acid Tweaks - Removed Useless Stuff and 00remount may not work well with your unit or it may completely brick it. I don't know this, but if you can post your mount partition configuration, I am willing to make the scripts work for you. You only have to type "mount" on your Terminal Emulator and provide the output to me, and I'll provide the rest. Zach's script however, have high compatibility towards a lot of phones, and thus can be used for your unit. Take note that there is a slight risk that it won't work well. If it doesn't, please post your problems here, and I'll try to fix it. Hence, it's best that you make a nandroid backup before attempting to use any tweaks here.
3. I've compiled a guide on a few notable tweaks in XDA here: LINK. If you would like me to evaluate scripts/tweaks/anything that you do not understand due to their terms being alien to you, I'll be glad to explain it here
Guide
You can refer to the guide here:
LINK
Hi pikachu!
I've made a screenshot of the terminal output after entering the mount command. Hope it provides you the needed informations!?
reneph said:
Hi pikachu!
I've made a screenshot of the terminal output after entering the mount command. Hope it provides you the needed informations!?
Click to expand...
Click to collapse
Thank you
I'll get to work on the scripts. Give me an hour or two
pikachu01 said:
Thank you
I'll get to work on the scripts. Give me an hour or two
Click to expand...
Click to collapse
Updated the scripts. Please read my guide before flashing any of those zips/scripts to know about its risks.
I am not responsible for any damages/bootloops if you did not read the guide before flashing those scripts/zips.
UPDATE 10/1/2011 - Added 00remounti9001 to remount the major partitions to noatime and disabled barriers for as well as delayed journaling to every 60 seconds (as opposed to 5) to /data, /persist, /cache. Added Acid Tweaks - Removed Useless Stuff i9001.zip to remove journaling from /cache and /system (It's safe). Also added JournalingOn.zip to revert back the two partitions to being journaled.
For the 00remount script, here's the how to:
0. Wait till Android finishes loading everything.
1. Install Script Manager from Market
2. Point script manager to the script you placed in the sdcard.
3. Run as root.
4. Do this at every boot, as mount points are reset to its default as set by the type of your lagfix. Voodoo (from what I am using will set barriers for /data and atime for every mount point except /system, /data, /cache, /dbdata which puts a slight risk at your disk for using atime.
5. You can add a widget to your home screen for the script so that you can
activate it easily.
First of all, thanks for the work.
I have tried to execute the remount-script using the script manager as root as you mentioned, but something fails. When running the script it outputs "mount: No such file or directory, mount: Invalid argument" and then the predefined echos of the script.
I had to remove following lines of code to get an output without the mount-errors:
mount -o noatime,remount,rw /mnt/.lfs /mnt/.lfs;
mount -o noatime,remount,rw /sys/kernel/debug /sys/kernel/debug;
Click to expand...
Click to collapse
more scripts and tweaks!
http://forum.xda-developers.com/showthread.php?t=1227269
reneph said:
First of all, thanks for the work.
I have tried to execute the remount-script using the script manager as root as you mentioned, but something fails. When running the script it outputs "mount: No such file or directory, mount: Invalid argument" and then the predefined echos of the script.
I had to remove following lines of code to get an output without the mount-errors:
Click to expand...
Click to collapse
Thanks for the heads up. I forgot to remove those lines actually. I reupload the script with those two lines remoevd.
sakindia123 said:
more scripts and tweaks!
http://forum.xda-developers.com/showthread.php?t=1227269
Click to expand...
Click to collapse
Thanks for the link. Yes, I've read this one before. My guide would explain more about what some of the tweaks do, and the script incorporates more than the link that you provided. You can edit the script and take a look if you want
is this working?
larry200ro said:
is this working?
Click to expand...
Click to collapse
Which tweak are you specifically asking about?
They should work provided you read the guide to know what those tweaks are
can i use this in my rom?thanks
sakindia123 said:
can i use this in my rom?thanks
Click to expand...
Click to collapse
Why not?
Let me know how good it is working for you. Remember to read the guide, as the scripts might not work well with other scripts (if your ROM also implements other scripts)
pikachu01 said:
Which tweak are you specifically asking about?
They should work provided you read the guide to know what those tweaks are
Click to expand...
Click to collapse
Honestly, I am at work now, I tried to read some things really quickly from your guide but I think that this is to technical for me. In a few words can you please describe what are they doing? I own a i9001 with Kernel 2.6.35.7-perf [email protected] #1 and build number gingerbread.xxkg1 android 2.3.3.
Sorry if my english is not to good, I am at work , have no time to concentrate, I am Romanian
larry200ro said:
Honestly, I am at work now, I tried to read some things really quickly from your guide but I think that this is to technical for me. In a few words can you please describe what are they doing? I own a i9001 with Kernel 2.6.35.7-perf [email protected] #1 and build number gingerbread.xxkg1 android 2.3.3.
Sorry if my english is not to good, I am at work , have no time to concentrate, I am Romanian
Click to expand...
Click to collapse
Umm, if you only want to use the scripts, you could scroll down to Zach's scripts and 00remount (Hint: They are in quoted text form). They are pretty short and simple to read. All the others in the guide would reinforce the things that are explained in there. If you don't understand something in the guide, post it here, and I'll offer up a simpler more laymen explanation of it
And you'll need a custom kernel with init.d support if you want to use the scripts.
pikachu01 said:
Umm, if you only want to use the scripts, you could scroll down to Zach's scripts and 00remount (Hint: They are in quoted text form). They are pretty short and simple to read. All the others in the guide would reinforce the things that are explained in there. If you don't understand something in the guide, post it here, and I'll offer up a simpler more laymen explanation of it
And you'll need a custom kernel with init.d support if you want to use the scripts.
Click to expand...
Click to collapse
Sorry but you lost me in the bold section. Where do I get a custom kernel with init.d support? I am searching for a month now for a custom kernel/custom rom/custom anything for my phone but found nothing than the successfull rooting guide in this forum.
Am I so stupid?
pikachu01 said:
And you'll need a custom kernel with init.d support if you want to use the scripts.
Click to expand...
Click to collapse
But not for the remount-script!?
Anyways, is there an existing custom kernel for the phone at all?
larry200ro said:
Sorry but you lost me in the bold section. Where do I get a custom kernel with init.d support? I am searching for a month now for a custom kernel/custom rom/custom anything for my phone but found nothing than the successfull rooting guide in this forum.
Am I so stupid?
Click to expand...
Click to collapse
Ahh, it appears that i9001 doesn't have a custom kernel If supercurio or chainfire is free, they could patch the initramfs with theirs and publish it here. I'm not an expert in initramfs and I don't have this phone
reneph said:
But not for the remount-script!?
Anyways, is there an existing custom kernel for the phone at all?
Click to expand...
Click to collapse
The remount script will always work, yes with Script Manager. No, I can see that i9001 doesn't have a custom kernel for it. Too bad
Actually, even without init.d support, you could use Script Manager to launch the scripts at boot. The only thing is that the screenstate_scaling would need the Script Manager to be on all the time, which will drain more battery than save it.
pikachu01 said:
Actually, even without init.d support, you could use Script Manager to launch the scripts at boot. The only thing is that the screenstate_scaling would need the Script Manager to be on all the time, which will drain more battery than save it.
Click to expand...
Click to collapse
So, you are saying that it's better not to use any scripts until a custom Kernel will appear?
larry200ro said:
So, you are saying that it's better not to use any scripts until a custom Kernel will appear?
Click to expand...
Click to collapse
You can use the scripts with Script Manager. A custom kernel only makes it easier to apply the scripts.
pikachu01 said:
You can use the scripts with Script Manager. A custom kernel only makes it easier to apply the scripts.
Click to expand...
Click to collapse
Ok, This I understood very well but, as you said before, this will need Script manager to be running all the time which will result in more battery spent.
Isn't the purpose of all tweaks/scripts to improve performance without lose of battery life and the phone to run the applications that you need and freeze/uninstall those you never use?(I've uninstalled the applications that I don't need with Titanium Backup and I have improved my battery life significantly).
Thanks very much pikachu for all the scripts and for the good work but I think this is not worth it because 1. galaxy s plus i9001 has a good 1.4Ghz processor and runs almost anything perfect. 2. You can safely improve the battery time with a simple software available on the market for free without risking with scripts.
Many thanks again, if you need any information from my phone for development purposes just let me know. I am willing to help
i want to create a rom for i9001..i have already started a thread for this.
and init.d will be one of the first things i would do!
all ur scripts will load automatically at startup!

How do I under voltage faux kernel?

Hi there,
I am fairly new to custom ROMs etc and recently installed LeeDroid 4.3.0 successfully. However, I also wanted to try out a custom ROM and installed Faux' kernel too (mainline).
Battery drain became a lot better, but there's an optional feature to under voltage the CPU. According to the guide in the thread, I have to put
Code:
echo "-25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
somewhere. Can someone tell me in where I have to put this in detail? Any other things I should take care of / should be aware of?
If this topic was discussed already (sure it was), please don't hesitate to link me to it, I just couldn't find anything via forums search.
Thanks!
You can run it with a terminal emulator directly on your phone or through adb/shell on your pc.
Either way, it's not going to stick and you should repeat the operation after every reboot if you want to keep the UV.
You can add that line to a script, though, so that it is executed automatically after every boot.
I usually add that line to the init.post_boot.sh script in /system/etc (between the other MSN8660 tweaks). The alternative is adding a file in the init.d folder.
nTraum said:
Hi there,
I am fairly new to custom ROMs etc and recently installed LeeDroid 4.3.0 successfully. However, I also wanted to try out a custom ROM and installed Faux' kernel too (mainline).
Battery drain became a lot better, but there's an optional feature to under voltage the CPU. According to the guide in the thread, I have to put
Code:
echo "-25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
somewhere. Can someone tell me in where I have to put this in detail? Any other things I should take care of / should be aware of?
If this topic was discussed already (sure it was), please don't hesitate to link me to it, I just couldn't find anything via forums search.
Thanks!
Click to expand...
Click to collapse
you could just get System Tuner Pro from the market and UV that way
Thanks, got it with Grandelama's method.
Grandelama said:
You can run it with a terminal emulator directly on your phone or through adb/shell on your pc.
Either way, it's not going to stick and you should repeat the operation after every reboot if you want to keep the UV.
You can add that line to a script, though, so that it is executed automatically after every boot.
I usually add that line to the init.post_boot.sh script in /system/etc (between the other MSN8660 tweaks). The alternative is adding a file in the init.d folder.
Click to expand...
Click to collapse
how did u put it in the init.post_boot.sh?
i cant do that cuz cannot write to that
and writing tool have super user permissions,
that file cannot be editing
or can? if - how?

Categories

Resources