yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] sauudmir:
here is the logcat file in the zip file , please see to it and tell me how to fix my sdext prob and swap prob coz i can't see any of my apps in ext and cant enable swap ...
[G1 Android Development] Firerat:
I afraid that logcat is no good, I need the initial boot logcat, not the system one

Run from pc

adb logcat

As soon as you turn phone on (and its connected via usb )

Ypu will no doubt see that the ext partion is 'corrupt'

Run repair ext in recovery

No idea what is causing this, e2fsck has not been running for some time ( its been missing in cm6 and. Only came back recently, + e2fscks exit code was nevery collected correctly since cm5 )

I will have a proper look, and maybe force a repair ( it should already try to force one )

For diagnostics tell me what e2fs you have 2,3 or 4?

And what you used to create it, also have you pulled the battery recently ?)
[G1 Android Development] sauudmir:
but when i nandroid restrore back to rc3 it works like a charm...

i use e2fs4 and i used amon ra's recovery to create it ...no i didn't pulled the battery since a long time

and heres the logcat how u asked
[G1 Android Development] Firerat:
System is probably full

mount -o rw,remount /system
rm /system/build.prop

Boot to recovery, flash cm6, flash gapps tiny

You should then have enough space for the scripts to install
[G1 Android Development] sauudmir:
i'm also using your MTD part hack... so i have to flash the boot hack so the rom can boot ... that shouldn't be the problem right?

EDIT::

Ok . the script is working but i can't see my apps after sdext... and i ran fix_permissions but it says with the apps to reinstall the apps.

DOUBLE EDIT::

Ran the apps2sd scrip and my apps are back, swap working ...

Now my Rom is excellent

Thanks again Firerat :)
[G1 Android Development] Firerat:
cm6 final is a little fatter , if you have had older gapps ( which were not trimmed to fit ) then you will run out of space on system .. this will happen each time you flash as the bloated gapps will get backed-up and restored each time. This can also cause the missing market problem.
[G1 Android Development] Mraellis:
Hey dude, care to explain why I am getting "ls: can't open 'sbin' : Permission denied" then "==", "-e" "=="

Any idea?

I'm on a clean install on CM6 final.
[G1 Android Development] Firerat:
your not root

su first
[G1 Android Development] Mraellis:
Ta dude, What swappiness is best on a G1? My current is apperently 60.
[G1 Android Development] schwillyd530:
can't find script on sd card

I have a T-Mobile G1 with Cyanogenmod 6 stable and i am trying to set up a swap file.

so i have an 8gb class 4 card which i used clockwork recovery to partition with a 32mb swap and left the rest as FAT32.

I then copied your latest script to the SD card on my windows machine and verified it was there.

Then i went into clockwork recovery and then to the console.

I tried the 'sh /sdcard/fr-patch138.txt swap' command and it said it could not find the file.

I then 'cd "/sdcard/" and 'pwd' to make sure i was there.

Then i 'ls' and see that there is nothing there.

Where did i do wrong?
[G1 Android Development] ZilverZurfarn:
You don't need a 40 kB+ script to enable swap - It's just 1-2 lines of code (provided you have a swap partition as your 3rd partition on the SD card):

swapon /dev/block/mmcblk0p3
sysctl -w vm.swappiness=40

That's all there is to it.

But to answer your q, where you went wrong, is that you have to mount /sdcard manually if you've booted to recovery.

mount /sdcard
[G1 Android Development] Firerat:
very true,,

but then when someone with a magic comes along and has swap on /dev/block/mmcblk0p2 they get all confused

so, the extra code is for everyone, not you
[G1 Android Development] poormanq45:
Seriously, why is that not posted more often! Thank you very much!
[G1 Android Development] Firerat:
its posted in plenty of places
[G1 Android Development] Pfeffernuss:
Doesn't work. Well, it does work, but after a reboot it's back to zero Swap ;)
[G1 Android Development] meisterlampe2000:
you habe to apply it on boot in your userinit script...
[G1 Android Development] Pfeffernuss:
Hmmm, makes sense, bit tired, my bad... Thanks for the quick heads-up!
[G1 Android Development] schwillyd530:
Ahhh i see....ouch what a rookie mistake. Thanks!!
[G1 Android Development] ZilverZurfarn:
Well, yeah,that's true, but it's not that hard to open up terminal and type that, is it? Unless you reboot frequently, that is. But enough about this - this is Firerat's thread.
[G1 Android Development] Pfeffernuss:
Really helpful answer, especially since it's all been sorted anyways. Thanks.
[G1 Android Development] sparksco:
Firerat please confirm scripts

I was wondering it you could confirm my firstboot.sh and my updater-script? Everything is working fine for me after the first boot, apps go straight to ext partition after flashing the rom.

http://cyanogenmod.pastebin.com/kHSM4ZKm

http://cyanogenmod.pastebin.com/cr7gPbRv
[G1 Android Development] wrsg:
anyone worked out the problem with e2fsck (i.e. how to get the apps back when the sd card is not cleanly mounted)?
[G1 Android Development] ToyGUN:
I'm having the same issue. Do you get an error with userinit.d when running swappy script in terminal? I get a find: /userinit.d: no such file or directory error. I think it may be because I don't have any ext partitions. I just run after I boot up and don't worry too much though.
[G1 Android Development] sparksco:
Try unmounting it from your computer first, then unmount it on your phone
[G1 Android Development] Pfeffernuss:
It does work properly after using:

mount -o rw,remount /system

mv /data/local/userinit.d/* /system/etc/init.d/

;)
[G1 Android Development] Keylogger_0:
Im not completely sure on how apps2sdext works, so sorry for the "noobish" questions:

If i apply the patch for apps2sdext, would all the apps, AFTER it was patched, be automatically installed on the ext partition? Or do i have to install each app in the ext partition manually? If so, would someone explain me how?
[G1 Android Development] G1sanju:
I think it has been answered by Firerat, If you set the application install location as internal then it will go automatically to EXT..
[G1 Android Development] ATZ-007:
Hi, my G1 running rom “Superfly TCBY FroYo v1.3” (Danger SPL) and it was running fine, until last night when I turned it off and left it on charge and afterword when I turned my G1 on, it keeps on Boot-Loop.

I know I can fix it by wiping the phone and reflashing the rom but I don’t want to do that as I have few text messages (sms) which I need.

So I was wondering is the anything I can fix it with this script without wiping?

Tried pixp from console (RA-dream-v1.7.0), but get following message

============

Danger detected

============

===================================

/system/bin/fix_permissions is already Patched..

===================================
[G1 Android Development] Firerat:
you are going to have to provide a logcat, I'm not going to guess what is causing the boot loop

and that message is going to become 'the norm' as fix_permissions has been fixed ( not that it makes any difference yet, but when 6.1 comes you won't get the same problem as with cm5 without the fixp patch )
[G1 Android Development] ATZ-007:
Many thanks for your prompt reply

Unfortunately I really needed to use the phone so I had no choice but to do full wipe and reflash the rom.

However if I have the same problem again, be sure I will provide you with logcat.

nob question: what are you referring to when you say “when 6.1 comes”?
[G1 Android Development] sauudmir:
He is referring to CyanogenMod 6.1
[G1 Android Development] Foo_Blyat:
See, i knew i wasnt crazy when i couldnt get this new patch to run swap. i was using swapper 2 for a couple of days and finally decided to check back in here for updates.

ill go ahead and run that new code you posted.
[G1 Android Development] sparksco:
cm6 now comes with compcache enabled by default, therefore you don't need swap
[G1 Android Development] tnpapadakos:
i'm getting better results using a swap w/30 swappiness and NO compcache or JIT than i did with all the other combinations of compcache, heap sizes, JIT that i tried the last month or so

at least so far, 3 days...

better results re: multitasking, and overall smooth responsiveness using the device
[G1 Android Development] Pfeffernuss:
Agree. Without Swap the Rom actually is rather useless, if you want to run multiple apps that is. For single-app use it's bareable.
[G1 Android Development] Foo_Blyat:
well no sh*t sherlock that compache comes enabled, doesnt mean i like it, use it, or need it.

Swap > CC, any day of the week, but thanks for trying.
[G1 Android Development] Firerat:
compcache seems to be working better than it has in the past, but still I prefer straight swap
[G1 Android Development] Foo_Blyat:
+1

btw

C:\android-sdk-windows\tools>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
SH96DP300270 device

C:\android-sdk-windows\tools>adb shell
# mount -o rw,remount /system
mount -o rw,remount /system
# mv /data/local/userinit.d/* /system/etc/init.d/
mv /data/local/userinit.d/* /system/etc/init.d/
# exit
exit

C:\android-sdk-windows\tools>

worked perfectly! just rebooted and swap starts up on its own.
[G1 Android Development] thef00l2:
i just tried it with swap (swap size 50 and swappy of 40) and ran it for dc2x as well...

i've totally noticed a difference in speed on the g1 and internal phone storage jumped from 24-30MB to 68MB!!!

i'm running CM5.0.8DS (with font patch), RA 1.7.0

(tried 6.0 but phone went wonky and f/c & reboots like crazy) -- will try later again when the next update is released w/ app2ext
[G1 Android Development] tnpapadakos:
just did this, too, but using root explorer instead.. took the 25swap file from /data/local/userinit.d folder and dropped it into the /system/etc/init.d/ folder...and it worked, swap was set up on reboot

Question: Why is this working without a swap partition? I have no swap partition set up, so I'm assuming this is happening somewhere on my sdcard, probably not optimal....firerat, please tell me whats going on here

think im gonna copy that 25swap file and try adding it to the nightly next time, before i flash it, and see if that works

update: it works! so i've used firerat's patch to create the swap config file specific to my phone, copied the file and added it to /system/etc/init.d folder in the latest nightly, flashed the rom, and now I have auto-pre-loaded-built-in swap....:)
[G1 Android Development] raven_raven:
Hi Firerat, I used your patch on many ROMs before and it worked flawlessly giving me oportunities that wasn't avalilable at the time (like apps2ext on Froyo). Now due to my problem with my HTC Dream I stuck on stock Android 1.6. It is my choice, now I want to make it as modded as I can. I already rooted it and installed busybox and tether enabled kernel, now I wanted to try if your patch works on it.

And guess what, it isn't :P. I think that too many binaries are lacking in stock Android, however maybe there is something I can do. If not, I can live with it, but hey, why not try :). After trying to run whatever option possible, this is what it returns:

C:\Windows\System32>adb shell
$ su
su
# sh /sdcard/fr-patch139.txt
sh /sdcard/fr-patch139.txt
Firerat script installer Version 1.3.9
Options:
a2sd apps2sdext ( for FroYo ) #NEW#
sdext sdext mount for cm6
lwp LWP fix *
lsd create legacy sd mount point
swap Auto setup swap *
shabang Patch Android scripts to work with ash
remount install remount scripts
fb Patch for Facebook 1.2.x sync on G1
fixp Patch fix_permissions with new sd mount point
dc2x DangerSPL : dalvik-cache will be bound with sd-ext *
NoneDangerSPL : dalvik-cache will be bound with cache *
MT3G : does nothing

all All of the above
* run-parts required ( autodetected )
--------------------------------------
rev <option> reverse the option (swap dc2x lwp )
--------------------------------------
example
sh /sdcard/fr-patch139.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
# sh /sdcard/fr-patch139.txt swap
sh /sdcard/fr-patch139.txt swap
==
-e
==
# sh /sdcard/fr-patch139.txt remount
sh /sdcard/fr-patch139.txt remount
==
-e
==
# sh /sdcard/fr-patch139.txt all
sh /sdcard/fr-patch139.txt all
==
-e
==
#

Can you help me, please?
[G1 Android Development] Firerat:
are you certain its not compcache you are seeing as swap?

cat /proc/swaps

will tell you
[G1 Android Development] Firerat:
busybox is probably not setup correctly
[G1 Android Development] tnpapadakos:
/dev/block/mmcblk0p3 partition 31648 10268 -1

is what i get
[G1 Android Development] Firerat:
so.. you have a swap partition, why all the confusion ?
[G1 Android Development] tnpapadakos:
and yet...no ext or second partition shown here...hmmm
[G1 Android Development] raven_raven:
Is there any possibility to check it and setup properly? I used Busybox Installer by Stericsson (available on the Market) to install it and typing "busybox" in terminal returns me all possible commands, so I think it is installed. I don't know much about it though so maybe I missed something.
[G1 Android Development] Firerat:
they might not be linked

you can run it in recovery,
[G1 Android Development] Firerat:
and this is a problem?

let me spell it out

CM6 DOES NOT HAVE A2SD !!!!!!!!!!!!!!!!

it doesn't know or care about the ext partition

please try and keep up
[G1 Android Development] tnpapadakos:
**** a2sd, not even worried about that...i just mistakenly thought that to have swap, one had to have their sdcard partitioned with an ext partition, thought thats where it wrote to and from

main thing is, thanx for the patch/script...been going without swap for awhile, and its nice to have it back...definitely smoother with it and without comp or jit
[G1 Android Development] Firerat:
nope, by design my script handles swap partition regardless of ext partition automatically

other 'three line' scripts assume that partition3 is swap , so for those to work you must have swap as third partition.

and in any case you have an ext partition ( swap is the third partition )

that nice little display you took a picture of is part of the android framework , its not been coded to look at the ext mount ! Very Simple !
[G1 Android Development] tnpapadakos:
thats the info i was kind of looking for, thanx for the attention man, i know you're inundated with questions

have a good one
[G1 Android Development] Firerat:
v1.4.0 in OP

basically it includeds a2sd 1.3.4 , and a couple of other bits

will put on github soon
[G1 Android Development] LOONEyRR:
alright so i still cant figure out whats goin on, so i went through the process to get the a2sdext script to work, and everything seemed to work fine. did apkmanager.sh to double check, and it DOES say everything was moved, well when i reboot i loose all the apks. the phone says it has em, and when i go to apkmanager they're there, and space is lower on the phone so i know its all there, but the apks wont come back untill i reboot again. so in other words, if i wanna reboot, i have to do it twice. u have any ideas for that? i cant figure out what im doin wrong here?? thanks! :D

runnin, cm6 stable. g1.
[G1 Android Development] sforza25:
Hi Firefat,

I have a little problem with the script, I use the option a2sd to move some applications to ext3, but I haven't moved data/data to ext3.

Now, I'm trying to activate the option to pass the Dalvik-cache to ext3, it seems that everything is correct but does nothing to reboot, and the Dalvik-cache is still in the internal memory.

Do you know why could it be?

Thanks for your work!!

P.D.:Sorry for my English ;)
[G1 Android Development] Bungholio:
Web Browsing

Hi,

Ive installed the fire rat all in one patch 140 and added a 32mb swap file to CM6 RC3 but my web browsing is really slow and unresponsive.

Is this normal for Cm6?

Also, would increasing my VM heap size in cyanogenmod settings make any difference (i admit i dont actually know what its for :confused:)

Thanks.
[G1 Android Development] Firerat:
you probably have both compcache and swap running

try turning compcache off

you will probably have more luck with a lower VM heap size ( if you like to 'multi task' )
[G1 Android Development] Firerat:
reboot manually
[G1 Android Development] sforza25:
¿Hard reset?

I think my problem is that ext3 isn't loaded at startup, because for example when I try to run "sh apkmanager.sh" previously I need to run the command "sh sdacard/fr-139.txt sdext" to show applications that are in the ext3, or when I reboot and using the "root explorer", the folder "sdext" is empty until you run "sh sdacard/fr-139.txt sdext"....
[G1 Android Development] Firerat:
use v1.4.0
[G1 Android Development] sforza25:
With the v1.4.0, the command "sdext" do nothing, and "dc2x" the same,the dalvik-cache don't move to ext...
[G1 Android Development] AustinAce:
I fixed the problem it seem to be that supsetup was the problem as soon as I removed it the script worked fine. :)
[G1 Android Development] Gekx:
I'm a little fuzzy on the whole sdext thing. does this move all the apps that are in my fat32 partition on the sd to the ext? sorry for the noob question.
[G1 Android Development] dualityim:
I have two questions.

The first one has probably been answered before, sorry if that's the case. But does the script handle creating the swap partition on the SD card or do I need to do that before running the script?

And second, is a class 6 SD card absolutely required for swap to be useful? I only have a class 2 card, would I still be able to see some benefits from using swap or would I be better off with compcache or nothing at all?

Thanks.
[G1 Android Development] ZilverZurfarn:
No, I have a class 4 8 GB Kingston card and have never experienced any problems. ALso, don't take the class thing too seriously. A test of SanDisk cards, measured the read speeds of a class 2 card to be what would merit it a class 10.
[G1 Android Development] ac.phan:
does anyone know what I am doing wrong...

I run the patch and do all the steps for a2sd and the process completes. It says I need to reboot to let the apps move over into the ext partition. After I reboot the phone as the instruction tells me to do and once the phone is booted up again all my apps are uninstalled. What am I missing in what I'm doing?
[G1 Android Development] Firerat:
some have been having problems with cm6 final and nightlies since then where the ext partition won't mount

I've not been able to replicate this

in the most recent version ( 1.3.4 a2sd , in patch 1.4.0 )

I've added two tweaks

e2fsck is now using the -p flag, which forces a filesystem repair

space checks are made when installing the script, if not enough space the script offers to move RomManager to data/sd-ext

( which makes sense since its usually updated regular and a copy ends up on data/sdext anyway )

since you don't mention the rom Manager move I can only assume that e2fsck can't repair the filesystem corruption it thinks you have

reformating your sdcard should resolve it ,, be sure to BACKUP you will LOSE ANYTHING ON YOUR SDCARD.

the very beginning of logcat from boot will indicate a filesystem problem
[G1 Android Development] ac.phan:
I am able to do the rom manager move initially before the reboot. I didn't mention this before because it was part of the instructions I followed from you.

I will go ahead and try to reformat my sdcard and see what happens.

And I apologize for asking but where would I access the logcat you're talking about. Thanks
[G1 Android Development] JuliusCes:
Apps disappearing

Hello FireRat,

Thank you for the script you have posted. However it seems that many people are having issues with moving apps to ext. I did the following commands to move apps to ext

su

sh /sdcard/fr-patch139.txt sdext lsd shabang remount a2sd

Everything worked perfectly, and your script asked me to reboot phone, so I did. But after reboot all my apps are gone. They are on the ext parition, but I can't see the icons on the drawer.

I have also moved Dalvike Cache with dc2K, but I wouldn't be able to tell you if it's working, all I know is that's it on the ext partition.

Following earlier, you have asked that people to format SD card to see if problem has been resolved. I have reformatted (using Android function) and repartitioned (using Amon Ra 1.7.0) and still have this issue

I have a 4 gig SD card

Ext2: 512 mb

SWAP: 64mb

FAT32: Remained

Here are my specs:

HTC Dream

Rom: Cyanogemmod 6 FR (French stable version, no big changes from orginal cyanogen, just some apps removed or replaced and azery keyboard)

Radio 2.22.19.16i

Haykuro's SPL

I have JIT, CC, and SWAP "activated". However, I wouldn't be able to tell you if SWAP is working. I will probably deactivate JIT and CC once I'm sure that SWAP is working.

Please help, I would like to keep using this ROM. I have noticed that on Froyo, my battery last longer which is a plus. I had been using TheOfficial Rom prior to that which was working and all my apps were working fine on Ext2.

I have attached my Logcat down below. First time doing a logcat, so don't know if it's right or if you have all the information you need.

Thanks,

JuliusCes

VENI VIDI VICI

Update: It looks like the issue has been resolved. I went to Recovery and did two actions

1. Repair Ext2

2. Fix UID Mismatches

and my apps showed up again.

Maybe people should try this first before posting.

Update 2. Everytime, I reboot I lose all apps on Ext2. I have to repair Ext2 from the recovery to get them back again. Yes, I have to do that for each reboot.

Is there any way, I can set up a script to automatically repair Ext2 for each recovery?

Cheers
[G1 Android Development] akuma148:
I have a problem with my phone. I was on a Cyan 6.0 final rom and then did a nandroid+ext. Then I wanted to try out the Cyan 6.0 RC3 rom, so I did a wipe of everything and installed it. Then I wanted to go back to the final rom, so I restored the nandroid+ext, but all my apps and settings are missing. I checked the sd-ext directory and all the apps are there, but they're just not showing up in the app drawer, as if they weren't installed. Also, all my settings are back to default, like the number of desktops and the notification colors. Can someone please help me? Do I need to input a command to get this script running properly?

Edit: Also, I did the above Repair ext and fix uid mismatches, and it didn't work.

Edit2: After I restored the nandroid, I reflashed the fr-boot and my apps are back. My settings and desktops and colors are still at default cyan, but I guess MyBackup Pro can fix some of that.
[G1 Android Development] :
How can we apply this?
[G1 Android Development] koreancanuck:
Check the OP since the instructions are there.

In short, go to a terminal app, type "su", enter, then type "sh /sdcard/fr-patch140.txt *w/e you want to put in here*"
[G1 Android Development] sparksco:
Thanks for all your hard work!

Well it seems that that conversation you and I had awhile back about the firstboot.sh has gained quite a bit of attention here on g1 development. Thanks for the init.d 03firstboot tip, that's all I needed to make it happen. Also I am getting reports now that my roms no longer require a wipe, and the apps in the ext partition remain after flashing. Thanks again!

P.S. Any more tips please send my way haha
[G1 Android Development] sparksco:
You can also check the commands in terminal, just sh /sdcard/fr-patch140.txt

su of course first.