yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] whitesedan:
Installed this on my captivate last night. At first, I was a bit hesitant but went straight to it. So far its been running a lot faster and this feels like how a phone should run compared to the stock setting.

Thanks for the fix! Awesome work Zlich25!!

Edit: I forgot go mention I had to use the 1GB text file since the 1.5Gb gave me low disk warning.
[Captivate Android Development] Zilch25:
Don't tempt me! I just finally got all my stuff set up again and now you're egging me on to potentially have to nandroid it again haha

... it is tempting though...

Uuuuuuuuuuuuugh maybe after lunch >=(

As for the EXT4 that's still going to require a custom kernel... and sadly Mimocan hasn't educated us primitive Captivate owners on how to get rid of wake lag yet =(
[Captivate Android Development] Zilch25:
Aww shucks, really the credit goes to the fine gents over in the I9000 forums, RyanZA, Tayutama, and ykk_five (For daring to poke this lion in the first place). They're the heavy lifters, I just troubleshoot and put my phone in the line of fire :)
[Captivate Android Development] Tayutama:
Well true about custom kernel.

What my script does atm (if it would work properly) is it reads available filesystems from /proc/filesystems and then looks for any that is called something with ext...

It then adds those as choices in the interactive menu (which doesn't work on my phone for some reason... it works on my linux machine :( )

So the support for ext4 will be there atleast.

Also planning on making the script so it doesn't use the internal sdcard at all kinda like how Chainfire's version does it with resizing it image file.
[Captivate Android Development] Clienterror:
Maybe I'm wrong but in the 2.0 and up lag fixes doesn't it add something in the script to clean up the ex2 before it boots it so the possibility of corruption is really really low?
[Captivate Android Development] Zilch25:
Well the SDcard version sounds pretty cool, for the folks that are afraid of journaling destroying their internal NAND. I'm currently at a JM5 install that I *just* finished tweaking. Let me nandroid it and return to stock and I'll give ya a report on how the EXT3 runs on a cappy stock rom.

Also about the SDCard thing... is this going to run the same as the current crop of ext3 formatted SD card fixes out there, or would this have a performance advantage? I'm sure the current fix would be a little faster just because it's on internal NAND but wouldn't the external SD be the same?
[Captivate Android Development] magikspl:
Now this is critical! Make sure you unplug your phone from the USB after you get into download mode, THEN start the application from the thread I linked, THEN plug your phone back into the USB, it should light up that your phone is plugged into a COM port, then it's as easy as clicking start!

If you want to be super safe though, mount your phone into copy mode (if that still works) and copy the clockwork folder onto your computer (Since I'm not sure if this version of the one click restore will leave the sdcard partition alone), then once your phone is restored to stock, simply turn on copying, copy the clockwork folder back, and reinstall rom manager!

I hope this gives you enough to start with, cause I really have to get some sleep =/[/QUOTE]

You know what's interesting, I didn't have to do that weird step at all with my phone. I kept it plugged in at all times when using odin. From opening the app, to selecting the files, to rebooting the phone. It always setup the com line.
[Captivate Android Development] Zilch25:
The RyanZA does add a consistency check after 24-30 mounts on startup, this won't necessarily completely *prevent* corruption, but it should attempt to repair it and keep things running well before things get noticeably screwed up. EXT3 will give you journaling on the fly so you won't even have to consider the possibility of corruption.
[Captivate Android Development] Zilch25:
I've had odin do some weird stuff, so I add some extra steps when I give out instructions just to be safe :cool:
[Captivate Android Development] Tayutama:
What i meant with not using internal sd card was the use of /sdcard when moving the stuff and keeping it all on /data (which sadly still is a internal sdcard :( )

Well for people who are afraid of journaling destroying the internal sd card i would say stick with ext2.

If i did it with the external sdcard i would just get the same performance that mimocan is getting with his kernal hack.

How i wish Samsung had made the internal sd something else then rfs... :(
[Captivate Android Development] Zilch25:
Amen... looks like there's some folks looking into finding a way to completely replace RFS though. Not sure how plausible that is, but it would be awesome if they figure it out.

Just got done with my Nandroid image, about to reflash to JH2 =P I'll let you know if the update.zip murders my phone or not :)
[Captivate Android Development] Clienterror:
1/2 the time when I use Odin it will freeze lol, so then I get to reset to manual download mode -> reflash stock -> root -> rom manager ->flash my nandroid backup....then repeat with the kernal I was trying to flash in the first place and hope it doesn't freeze again lol. Yes, I have cussed at Odin....a lot lol. But it also saved my butt so I can't complain :-D
[Captivate Android Development] Zilch25:
Yeah Odin has been freezing on me a lot lately... normally when going to or from the JM5 ROM though... can't tell you how many times I've seen the phone/computer screen :o
[Captivate Android Development] Zilch25:
EXT3 update.zip method worked fine for me with JH2 firmware. Getting 1500 quadrant scores with it and my phone hasn't caught on fire or anything!

Updated the OP to include the link to Tulayamas update.zip method!
[Captivate Android Development] Tayutama:
Good to know :)

Btw how good are you with android and linux commands? :D Got a small problem that RyanZA can't help with it seems :D
[Captivate Android Development] Zilch25:
Eh I can't claim to be a pro, but I've got some basics and some experience coding in PHP, so I'm pretty quick on the uptake when it comes to syntax errors in code, and following script functions. I don't have a linux workstation or anything at the office to play with though so I'm not sure how much help I'd be. But I'm willing to do my best!
[Captivate Android Development] Tayutama:
Right problem is in the following code:

#!/system/bin/sh
LOOPBACK_1=/dev/loop0
LOOPBACK_2=/dev/loop1
IMAGE_FILE_DATA_EXT2=/data/image.ex2
IMAGE_FILE_SDCARD_EXT2=/sdcard/image.ex2
IMAGE_FILE_DATA_EXT3=/data/image.ex3
IMAGE_FILE_SDCARD_EXT3=/sdcard/image.ex3
IMAGE_FILE_DATA_EXT4=/data/image.ex4
IMAGE_FILE_SDCARD_EXT4=/sdcard/image.ex4
MOUNTPOINT_EXT2=/data/data-ext2
MOUNTPOINT_EXT3=/data/data-ext3
MOUNTPOINT_EXT4=/data/data-ext4
TEMP_DIR=/data/sddata
BACKUP_DIR=/data
DISK_SDCARD=/dev/block/mmcblk0p1
DISK_DATA=/dev/block/mmcblk0p2
CHECK=`grep "ext" /proc/filesystems`

if [ "$(/system/xbin/busybox id -u)" == "0" ]; then

echo "Checking your system for available filesystems...";
echo "Your kernel supports the following filsystems:";
for i in $CHECK; do
echo " $i";
done;

echo -e "\nPlease choose the partition type you want to use:";
read choice

echo "Output of $choice";

if [ $choice == "ext2" ]; then

The problem occurs when it gets to this line: read choice

It should pause here and wait on input but just skips it and then end up giving errors like this:

[: ext2: unknown operand

If i do this in a terminal:

adb shell
su
read choice

Then it waits on my input.
[Captivate Android Development] Smallsmx3:
I'm using super rooter 2.3.1. I have a nandroid backup. Can I apply this fix with the way everything is? Sorry for the noob question
[Captivate Android Development] Zilch25:
Hmm are you sure this isn't due to a set amount of choices not being defined? You should be able to set the choice to the amount of choices available and then have it loop until the choice changes. I managed to find this little code snippet with a little bit of googling :) Hopefully this is helpful O_o

#!/bin/bash

# Declare variable choice and assign value 4
choice=4
# Print to stdout
echo "1. Bash"
echo "2. Scripting"
echo "3. Tutorial"
echo -n "Please choose a word [1,2 or 3]? "
# Loop while the variable choice is equal 4
# bash while loop
while [ $choice -eq 4 ]; do

# read user input
read choice
# bash nested if/else
if [ $choice -eq 1 ] ; then

echo "You have chosen word: Bash"

else

if [ $choice -eq 2 ] ; then
echo "You have chosen word: Scripting"
else

if [ $choice -eq 3 ] ; then
echo "You have chosen word: Tutorial"
else
echo "Please make a choice between 1-3 !"
echo "1. Bash"
echo "2. Scripting"
echo "3. Tutorial"
echo -n "Please choose a word [1,2 or 3]? "
choice=4
fi
fi
fi
done
[Captivate Android Development] max_warheads:
[ "$choice" = "ext2" ]

You have to inform sh that it's doing string equality ;)
[Captivate Android Development] Zilch25:
You should be able to, just make sure you backup first *just in case*
[Captivate Android Development] Tayutama:
If it was just that simple :)

Did i say this works on my linux machine the code i posted before? :D

could try with -eq 1 and that but doubt it works
[Captivate Android Development] Zilch25:
It's worth a shot! But I'll keep on digging haha, you're on quite a different level than I am though, so all I can really hope to do is give you ideas :)
[Captivate Android Development] max_warheads:
Hopefully you didn't miss my response Tayutama ;)
[Captivate Android Development] Tayutama:
Didn't miss it :)

and it needs to be == since it needs to compare and that line works with == on my linux comp :)

atm the problem seems that it skips read choice since i don't get a chance to enter any input

EDIT: btw even with = i get the same errors as before ;)
[Captivate Android Development] max_warheads:
Yeah.. typo ;) I'll copy from the shell this time.

Oh, and semi-colon after the read statement ;)

# cat test.sh
cat test.sh
read choice;
echo "choice: $choice";

if [ "$choice" == "ext2" ]; then
echo "good";
fi
#
[Captivate Android Development] Smallsmx3:
What happened to link s in the op?
[Captivate Android Development] Zilch25:
There's still links to the two different current fixes. I just link to the original thread authors post so that current patchnotes, script updates, and proper credits are given. If you follow those links in my OP you should be able to find whatever you're looking for
[Captivate Android Development] csticky:
So, did the update.zip, and choose ext3 version, and it seemed to work fine, but when my phone rebooted, it did so back into TW (I had been Launcher Pro), and a bunch of apps have disappeared, as well as my widgets, and my Market App....

and now, it's rebooted, I have my market app again, I keep getting these force close popups, everything is crashing....

how to do you reset the phone back to it's original state?

help!
[Captivate Android Development] max_warheads:
You did do a backup, right?
[Captivate Android Development] Tayutama:
hmm had someone on the i9000 board say he had the same problem... he did never get back to me with firmware version so haven't been able to replicate the problem on my own yet.

first off run the removefix.sh scripts and ill mix up a update.zip you can try that makes the userinit.sh file that runs on boot smaller so i can run it all on boot

or better yet wait a moment and ill make a zip with adb in it that will check if it have mounted what it needs to mount.

EDIT:

ok

1. Put phone into Debugging mode: Settings -> Applications -> Development -> Check of USB Debugging.

2. Connect USB cable

3. Download the attached zip

4. Extract it and run check.bat

5. Post the result in here.
[Captivate Android Development] Tayutama:
See screenshot of what happens when i run that script on the phone.

The test.sh on the phone is like this:

#!/system/bin/sh
echo "Enter choice";
read choice;
echo "choice: $choice";

if [ "$choice" == "ext2" ]; then
echo "good";
fi
[Captivate Android Development] csticky:
I can't do anything....it just continues to give me crash popup alerts, I hit force close, and then it pops another.

None of the keys on the bottom work, it's basically useless at the moment.

is there a way to complete wipe the phone, and just start from scratch? also, I'm not terribly techie, and on a MAC.

Thx for you help....

everytime I hit a key, it gives me this error:

The process android.process.media has stopped unexpectedly. Please try again. dumpstate_app_20100831458_android_process_media.log has been saved. Use *#9900# to copy out log.
[Captivate Android Development] max_warheads:
wierd. I hopped into ATE just to be sure, and

$ su
# cd /sdcard
# ls test.sh
test.sh
# /system/bin/sh test.sh

and it behaved as expected.

Stock Kern/JF6/ext2 ~ 1.0 (well, I fixed e2fsck...)
[Captivate Android Development] csticky:
are you in Lancaster, PA?
[Captivate Android Development] max_warheads:
At the moment I'm at work, but I live in the county. (PM, next time)
[Captivate Android Development] Tayutama:
See if you can get the phone into recovery mode

you should be able to reset the phone in there.

don't know what the combo to get into that is for captivate.

and with mac you are on your own ^^ only machine/OS i don't have
[Captivate Android Development] Tayutama:
Right... reflashing firmware and testing again then...
[Captivate Android Development] csticky:
ok, so I'm looking at the Android System recover

choices:

reboot system (does nothing, tried it)

reinstall packages

delete all user data

delete cache data

thoughts? any help is most definitely appreciated.
[Captivate Android Development] Tayutama:
ok i'm out of ideas then.

the internation version that i have have a different recovery.

i got options to

reboot phone

flash update.zip

wipe data/factory reset

wipe cache
[Captivate Android Development] Zilch25:
"Reinstall Packages" is our equivalent to flash update.zip
[Captivate Android Development] max_warheads:
The terms changes, but in order of operation, they are identical

reboot phone = reboot phone

flash update = reinstall packages

etc.
[Captivate Android Development] Tayutama:
so your delete user data is the same as my wipe data/factory reset?

btw reflashed firmware but same problem... damnit
[Captivate Android Development] csticky:
So, I choice to delete all user data, hoping it would set back to factory....no dice...it definitely deleted all my settings, but I'm still getting all the errors.

where can I get an update.zip that will reset the phone back to normal, I might be able to get that onto the phone....and then get to it from the recovery screen.

thx guys. This might have been a $500 mistake....
[Captivate Android Development] tbae2:
Why not just do the Odin recovery to stock that is linked in the sticky at the top of this forum.
[Captivate Android Development] csticky:
That sounds fantastic....let me see....I'm not that techie...
[Captivate Android Development] Zilch25:
Honestly man, your best course of action is to make a friend with a Windows machine- you can easily restore to factory stock using the Odin 1 click Downloader, it's in the stickies in this forum. Sadly it doesn't work under mac (Though I imagine you could get it working using bootcamp or some such thing)
[Captivate Android Development] tbae2:
It will even work through VM's

www.virtualbox.org -> download install for mac -> install windows os from a disk into VM. -> odin 1 click flash -> Profit??
[Captivate Android Development] Zilch25:
Hahaha yes this would work... But I think making friends with a windows user would be much faster ;)
[Captivate Android Development] max_warheads:
Other options, is manually re-installing all the APKs... "fun"
[Captivate Android Development] Tayutama:
It's at times like this i love not being from the states... seems like tmo and at&t always needs to get speciel things into the phones... (Well don't know how the recovery is on the vibrant ^^)

Other news.... stuck with this damn scripting... i might just wait with this untill i get an app running.

Getting RyanZA to make an basic app for me and the giving me the source code so i can turn this fix into an app you run on your phone...
[Captivate Android Development] Zilch25:
Yeah it's kind of disturbing the amount of differences between the Captivate, Vibrant, and I9000 considering they're built on virtually the exact same hardware (with the exception front facing camera/physical home button on the I9ks). It's as if they've gone out of their way to cockblock progress =P
[Captivate Android Development] max_warheads:
It's weird that you're having a different response to the same test code... something's got to be different
[Captivate Android Development] Tayutama:
yeah but what i got no idea about.

btw any of you two wanna be test subjects and see what the update.zip with the interactive menu shows on your phone?
[Captivate Android Development] Zilch25:
I've gotta bail out of work soon, so paste it up and I'll yank out the old one and see what happens.
[Captivate Android Development] Tayutama:
Uploaded...
[Captivate Android Development] Zilch25:
Okay! I'm reverting the old one, I'll report back in like 10 minutes once I reapply!
[Captivate Android Development] Zilch25:
Hmmm there's 3 options now instead of the 2. Lagfix.sh Lagfix_Ex2 and Lagfix_3. Is Lagfix the test one?
[Captivate Android Development] Tayutama:
ah right there are 3 because it doesn't delete the old script files on your internal sdcard ^^

but yeah LagFix.sh is the one
[Captivate Android Development] Zilch25:
Well that was quick:

Please choose the partition type you want to use:[: ext2: unknown operand

[:ext3: unknown operand

[: ext4: unknown operand

Then it terminates D=
[Captivate Android Development] Tayutama:
Right that is the same problem i'm having here...
[Captivate Android Development] max_warheads:
stupendously dumb question... You're running that script via /system/bin/sh ... right?

I mean, god forbid, it ignored the #!

What happens if you try that test code in ATE?
[Captivate Android Development] Zilch25:
It's like it doesn't know where the echo stuff ends and where the script begins =/
[Captivate Android Development] Tayutama:
yeah i'm...

you are welcome to check the .sh file in the zip ;)
[Captivate Android Development] max_warheads:
T,FTFY

"$choice" == "ext2"

Attached.
[Captivate Android Development] Tayutama:
Did try before with that but gave me the same error though il try it again
[Captivate Android Development] Zilch25:
This DID work, except it just hangs there waiting for feedback that I can't provide =P Rather it seems to terminate immediately after prompting the question, but it doesn't spit out an error
[Captivate Android Development] Tayutama:
need to reflash firmware before i can try it... had just flashed to JP3... and sl4a fc'ed on me :(
[Captivate Android Development] Zilch25:
Hmmm well assuming this does work, how are you planning on having users select their choice? Via volume rocker/power or typing in 1 or 2?
[Captivate Android Development] Tayutama:
was more like typing in ext2, ext3 or ext4 depending on what your kernel supports.

But when we get an app going it will be an option you can select in a dropdown box
[Captivate Android Development] Zilch25:
Ah okay, well we are cooking with some amount of gas, it gets to the question prompt without a crash or any code complaining, it just ends the script at the choice prompt now. So that's progress I think!
[Captivate Android Development] Tayutama:
well atleast better then before but weird part is i tried that "small fix" that we just did before with same error as without it... :(

oh well can look into it abit more now then
[Captivate Android Development] max_warheads:
So.. no user input at all? or..
[Captivate Android Development] Tayutama:
Just tried to add this between read choice and if [ blafdlafa

echo "Choice: $choice";

It jumps right past read choice; prints out Choice: and the terminates the script.
[Captivate Android Development] max_warheads:
Then we've got no user input at that stage. :/

I'm not sure how to force collection of user input at that stage if we can. we may have to just create a parameter file and use that for the input.

read -e choice

http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_08_02.html
[Captivate Android Development] Tayutama:
just did an interesting find.

copied the script over to my linux comp and removed:

#!/system/bin/sh

commented out the following:

if [ "$(/system/xbin/busybox id -u)" == "0" ]; then

else
echo -e "Getting root privileges...\n\n";
su<$0
fi

and ran the script.

I got the to user input stage, could press in ext2 and then it rebooted my comp as i couldn't run the busybox commands ^^

So i did get something out of that test atleast

EDIT: Riiight... this is one limited read function we got here...

Tried adding -e to read and i get back this: read: Illegal option -e
[Captivate Android Development] max_warheads:
I think the problem we're facing, is that there is no method of user input available to the script at that time.
[Captivate Android Development] Tayutama:
Right found the problem why it skips read and then terminates.

I commented out

if [ "$(/system/xbin/busybox id -u)" == "0" ]; then

else
echo -e "Getting root privileges...\n\n";
su<$0
fi

Like earlier but this time moved the script back to the phone and ran it in sl4a.

Now it lets me enter which ext i want to use and then makes the correct choice...
[Captivate Android Development] max_warheads:
I didn't see that.. it reads then, else. Nothing in between and whacks...

(or) it's not liking su<$0 [probable more likely]

if [ "$(/system/xbin/busybox id -u)" != "0" ]; then
echo -e "Getting root privileges...\n\n";
su<$0
fi
[Captivate Android Development] Zilch25:
@Some1PR

That's *really* unusual, I've personally tested this on JF6 and not had a problem. Are you running any sort of custom ROMs or anything?
[Captivate Android Development] max_warheads:
what happens with just `su` versus `su<$0`
[Captivate Android Development] Tayutama:
Getting root privileges...

#

and nothing else happens... just sits at #
[Captivate Android Development] max_warheads:
Well, then su isn't returning. correctly.

and I tried su ./test.sh ... nada. SU in this instance, does not give us elevation. From what I can tell we can't programmatically enter SU

edit: out of work, finally!!
[Captivate Android Development] Some1PR:
For some reason I do not get my device listed...

C:\Android\sdk\tools>adb.exe devices
List of devices attached

C:\Android\sdk\tools>
[Captivate Android Development] Tayutama:
Ill go sleep on it and see what i can come up with when i get up. Else ill just have to wait till we get that app going.

Anyway thanks for the help so far :)
[Captivate Android Development] Zilch25:
Wow that's bizarre. It's like your phone isn't in debug mode... except the script was still able to push the files to your SDcard... or at least it said it did.

Have you tried reseating the USB cable into a different plug and trying it again? (I'm reaching but you never know =P)
[Captivate Android Development] kennethpenn:
Happens to my phone all the time! Simply follow these steps:

1.) Restart your computer

2.) Restart your Android device

3.) Try again.

RARELY, I will re-install "USB Drivers" *stickied in this forum* and that works.

Once you've got a good config going, your phone pretty much connects every time flawlessly. One of the things with this Captivate that I've noticed.
[Captivate Android Development] A.VOID:
On 2.3 and I got a low memory error pop up.

Checked available memory and I show 2.3 gb's available.

Any fix/ ignore for that? I see in the OP post about the memory reporting issue.