yashsingh1/xdaforums huggingface dataset:
[Touch CDMA Android Development] enatefox:
You can use the vulnerability in rootfs.img that I don't think has been fixed:

/bin/su ...

SuperUser app has nothing to do with this-- it's to prevent malicious apps from owning your phone. PATH is set to prefer /system/bin so that's where the permission denied comes in. When I repacked them to have wifi I also ran:

chown root:2000 bin/su && chown root:2000 xbin/su

chmod 4755 /bin/su && chmod 4755 /xbin/su

if you wanted to correct that yourself.

Are you dd'ing right on Android or should I set the swap up and swapon while it boots? I'm not too familiar with swap and certainly not compcache. Other than how to fdisk one on my laptop of course.
[Touch CDMA Android Development] NarSan:
for me super hero build is more usable than PureBlack
[Touch CDMA Android Development] JacenSolo2001:
For me Touchflo is the only home on mine...so there's no switching :eek:
[Touch CDMA Android Development] pmos69:
Thank you, that did the trick. Superhero also behaving better with the swapfile on (much, much less "loading..." screens).

Just ran the commands in the terminal on android at run time for immediate effect.

you can also: "swapoff /sdcard/swapfile" to turn the swapfile off.

If you want to turn swap on again after a reboot, you just need to run the "swapon /sdcard/swapfile" command as su again, of course, since you already have the swapfile.
[Touch CDMA Android Development] ljinsane:
THANK YOU!!!!!

:D WOW...that is all I can say with the latest developements.

Thank you Zenulator, Enatefox (the latest builds for kaiser that you 2 worked on are beyond excellent), Vilord, DZO and all the other devs who have worked on this.

My kaiser especially thanks you for breathing new life into it and adding back the 'cool' factor to it:D
[Touch CDMA Android Development] enatefox:
And I can say it took about 8 seconds to completely reload Rosie and no time at all when it didn't reload with 60Mb as you suggested. There's a default swap already so that can just be tweaked to increase it and avoid anything on the user end.

Now to just figure out why rotating is flipping the screen upside relative to portrait when I go to landscape on the home screen.
[Touch CDMA Android Development] JacenSolo2001:
awesome - now for the "instructions for Dummies" part of the show....anyway i can speed mine up, I'm game.

Supposedly there a way to overclock the tilt, but I was never able to find out how :(
[Touch CDMA Android Development] NarSan:
I have a small request - can you add polish language to super hero rom?
[Touch CDMA Android Development] enatefox:
I wouldn't recommend overclocking personally. I think HTC new what they were doing and wouldn't want to make my phone run any harder than it is. I've got 4 screens full of widgets including HTC mail, weather and clock and like I said above, 8 second reload when killed with TaskKiller Pro.

I'll look at the new rootfs and see if it makes sense to increase default swap size to 60Mb+

With my screen as stated above, online (wifi) with all the widgets running:

Mem: 2,232 free, Swap: 54,184 free, Total: 56,416 free so yeah, it runs like it sounds.
[Touch CDMA Android Development] pmos69:
something like this?

In "Settings" -> "Sound and Display", unckeck "Orientation" (Display settings category)

EDIT: scratch that. I see what you mean. weird, yes.
[Touch CDMA Android Development] enatefox:
I didn't just have that unchecked, I rechecked and unchecked it. It's specific to Rosie-- the rest works right. Maybe I can write a script (hidden widget maybe) that can force orientation.
[Touch CDMA Android Development] ljinsane:
which rootfs are you using? excuse me if you mentioned which one before.
[Touch CDMA Android Development] myshinynewtouch:
can anyone pls answer my question (basically a linux and android Q).. i want to copy the file mmmsms.db located at /data/data/com.android.providers.telephony/databases to my computer.

Now when i launch adb, it is launched as root, so that I can see the file when i go via the adb shell ... but when i try to copy it from shell to computer, it says it cannot see the file..

pls help me to give me the commands to copy this file to my computer or sdcard, i need this file to be able to modify its contents and be able to load all my winmo SMS to android..
[Touch CDMA Android Development] enatefox:
8-16 w/ compcache. I'm going to try the latest later today.

myshinynewtouch, use adb to pull not to connect like with -d shell. You can also download an FTP server, SSH client and a web server for your phone which is an easy way to transfer too.

See here: http://developer.android.com/guide/developing/tools/adb.html

And you want this:

where local is (for Linux): ~/Desktop or whatever and remote is /data/data/com.android.providers.telephony/databases
[Touch CDMA Android Development] ljinsane:
Thanks, I'm running 8-15/ w compcache I'm gonna give 8-16 a try as well.
[Touch CDMA Android Development] enatefox:
Well, I've swapped files around but the timestamp said 8-15. I saw that the first mention of compcache was 8-16. Just to be overly precise..
[Touch CDMA Android Development] pmos69:
There's a default swap? you mean the compcache swap?

I would not recommend you increase that very much (or at all) since you're eating memory.

I would recommend using a 2nd swap (the swapfile) in addition to compcache.

The test you did was exactly that. It added a 2nd swap, with a lower priority, that is used only after the compcache swap is full. (normally just at peak times).

AFAIK, that does not cause any sort of overhead.

The big difference is, you can add a big swapfile in the sdcard without using more memory.
[Touch CDMA Android Development] myshinynewtouch:
i tried adb pull enatefox, did not work for me, it says remote object does not exist.

Do I need all three ftp server/ssh client and a webserver to connect to phone ?
[Touch CDMA Android Development] enatefox:
dear god no..

Those are other ways to get files but if you don't know how to use them then skip it. Try a known file like from the terminal on the phone, you could:

# touch /sdcard/myself

Then:

$ ./adb pull /sdcard/myself

from your computer.

If that doesn't work, the other won't either.

pmos69, I had just compcache running. The rootfs.img's are either or but it's possible to enable swap on compcache versions too. That's what I was referring to as a way to make your suggestion permanent. I know you know, but others reading should also know that with Mail, Touchflo w/4 screens full of internet-heavy widgets, AppInstaller running, Bar Control, Task Switcher, wifi, no manually closed processes and I just updated the wallpaper, the home screen did not even flash "loading" at all. Ok, maybe the refresh rate on the screen is greater the 2ms...

Also, why are you assuming the swap file is lower priority? You didn't specify it explicitly. It's phenomenal either way, I just like to follow good practice
[Touch CDMA Android Development] pmos69:
In SuperHero, an even better test is to fill all the screens with heavy widgets, then load an heavy app. When you return to home, you can have a very long wait at the "loading" screen.

The 2nd swap can reduce that

a lot
[Touch CDMA Android Development] myshinynewtouch:
thanks enatefox, i was able to pull the whole directory itself instead of just the files, now to see if i can import all the messages from winmo.. if i can do that :D :D :D :D :D woooohooooo
[Touch CDMA Android Development] enatefox:
pmos69, you sir have got my Hero running faster than WM6 with everything running out and there's no way I'm maxing the swap out at this rate. When I say Rosie shows instantly from other activities I mean instantly.

Just want this answered though: Why are you assuming the swap file is lower priority? You didn't specify it explicitly.

And myshinynewtouch, I'm pretty decent at data transformation. If you need scripting to help you out let me know (PM or otherwise). One of my better regular expressions let me copy DB entries for some software into Excel format by matching this:

^([0-9])\t([0-9]+)\t([0-9]+)\t([a-zA-Z\s0-9\$\-/]+)\t([A-Za-z0-9+])\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([a-zA-Z0-9_\.]+)\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([NUL]+)\t([0-9]+)\t([NUL]+)$
[Touch CDMA Android Development] pmos69:
:) OK. You have more visibility into those configs, and sometimes I assume wrong stuff...
[Touch CDMA Android Development] pmos69:
It's just the default behavior when one does not specify a priority at mount time: the 1st swap has higher priority (0, I think) and the next ones to be mounted have decreasing priorities.

How are the swaps mounted in android? fstab? a specific script?
[Touch CDMA Android Development] enatefox:
initrd.gz is first in line with it's init script. Then comes rootfs.img (you'll see this when you boot up from Haret) and it's init files. Finally, system.img has one coupled with build.prop.

I think this is handled in rootfs.img as initrd.gz has been stripped substantially recently for devs' sanity.

it's stated simply like "swapon ..." but I haven't looked at compcache yet so you'd have to look. I don't care, I can set up a script in Gscript to do the two lines needed anyways from the home screen. Thanks again.

Funny, you posted the best thing on #404 (not found) yet was contrarily quite a good find..
[Touch CDMA Android Development] pmos69:
:) now that's attention to detail !
[Touch CDMA Android Development] plemen:
enatefox - would you be able to throw out some quick instructions on how to do this? Woud love to try it! Also are you using SuperHero or PureBlack?

Thanks
[Touch CDMA Android Development] enatefox:
The first time:

su
dd if=/dev/zero of=/sdcard/swapfile bs=1024 count=65536
mkswap /sdcard/swapfile
swapon /sdcard/swapfile

Now that the swapfile has been made, you just subsequently run:

swapon /sdcard/swapfile

and of course:

swapoff /sdcard/swapfile

if you want to fail. Just let it run.

Do this at startup. I will try to get this commited upstream (dzo, vilord, etc.) so it's automatic but for now, that's all you do in the terminal. If you get an error trying to run su (permission denied) then just replace "su" with "/bin/su" and you'll be okay.

Oh, I'm using 8-15 with wifi but I think I can now run SuperHero with this going.
[Touch CDMA Android Development] pmos69:
Just be sure to be using http://vogue-android.googlecode.com/files/rootfs-2009-08-16.zip to take advantage of both swaps. (compcache and swapfile) (and dma, of course :))
[Touch CDMA Android Development] enatefox:
You're referring to benefitting from DMA right with 8-16, right? I don't think anyone else has been doing swap + compcache. Just wanted to be sure that's what you meant.
[Touch CDMA Android Development] gjbnh:
No can do as I've been unable to boot into Android this I posted this: will trya gain tomorrow.
[Touch CDMA Android Development] pmos69:
yup, dma + compcache
[Touch CDMA Android Development] zenulator:
if you want swap and compcache i'll upload a rootfs.img that has it. it's great that you guys are trying to take your own steps but i've already had compcache and swap running together right after the rootfs.img with compcache came out.
[Touch CDMA Android Development] s0v3r1gn:
Thanks zen. That addition of compcache is absolutely amazing. Ill be waiting for the hybrid compcache-swapfile version. =D
[Touch CDMA Android Development] enatefox:
Zen, can you rig it up to use compcache and 60Mb+ swap in addition? That's the sweet spot for me-- exactly no loading whatsoever of the home screen once it's loaded once and has been cached into memory. Having it at boot would help a lot though. It's perfect with both-- over 70Mb free.. I'm testing DMA at the moment so give me second to get updated images sent your way.
[Touch CDMA Android Development] zenulator:
Is it even using all 60mb? Anyway I uploaded one with 24mb swap. I'll upload another one to vogue-hero with 60mb in a minute or two. Lunch comes first........

And if you want to get real experimental create a linux swap partition on your sdcard......I'll put out a rootfs.img that mounts that. Not that I think it will make a difference but you never know.
[Touch CDMA Android Development] enatefox:
It is when I'm using it... I like to keep her in line. 500 megs of free space on my SD so no harm done. Can you tell me if they're both available at bootup with your rootfs?
[Touch CDMA Android Development] plemen:
Thank you thank you!! This makes a huuuuge difference! Speed is amazing.
[Touch CDMA Android Development] zenulator:
Yes its created right after compcache.
[Touch CDMA Android Development] enatefox:
Well, glad for the confirmation then. Stick with Zen's uploaded rootfs that has them both and you'll have that speed available at boot and on instead of slow startup then faster usage.

Zen, you did take the rootfs with DMA right?
[Touch CDMA Android Development] plemen:
FYI the rootfs with DMA (http://vogue-android.googlecode.com/files/rootfs-2009-08-16.zip) seems to cause data to drop on the Vogue... I've switched back to 2009-08-15 and that works perfectly.
[Touch CDMA Android Development] adeyo:
Detailed Instructions?

I would like to try this as well -will this work with zen's pureblack8-16-09?? I will try it with this bundle and i am assuming i just enter in the above in the terminal? do i need to reboot anytime in between entering in the lines in the terminal? ...sorry if these are dumb questions i just really love pureblack and would love to get it faster to use as my stable build until the rom comes out! Thanks for any help!!
[Touch CDMA Android Development] zenulator:
this is taken from the latest rootfs.img rootfs-2009-08-16.zip. all the files are up. i put up two different 60mb ones.
[Touch CDMA Android Development] plemen:
I'm using PureBlack with all of the included files and this works perfectly with it.
[Touch CDMA Android Development] adeyo:
Great thanks!! I'll go try it.
[Touch CDMA Android Development] enatefox:
Thanks Zen, I now just have to figure out why DMA is failing. I think it's the hanging symlink. Expect delays with that. I'll post later if I get it figured out or someone like Addisu can help out. 60Mb is probably overkill I just like a lot to work with. 24Mb has to be the max you could ever use.

Also, everyone please use the rootfs that Zen uploaded. It will do everything for you automatically plus you'll have the boost from the very beginning which always takes the longest so that will help you out the most. Plus, you need to load heavy apps like Rosie into memory the first time to have it go faster. Might as well be when you first boot right?
[Touch CDMA Android Development] zenulator:
I think 60mb is more than enough. As for the swappiness read through this if you don't understand. http://kerneltrap.org/node/3000
[Touch CDMA Android Development] plemen:
"rootfs-2009-08-16.zip +60mb swap. swappiness set at 20."...

excuse if a stupid question but what is swappiness? Do the steps by enatefox have swappiness or not?

Thanks

edit: nevermind - you posted while I was typing :)
[Touch CDMA Android Development] ghostrid3r:
Double click "Power button" real fast and that should return screen to portrait mode.
[Touch CDMA Android Development] zenulator:
The idea is too keep the whole system in memory without having to unload parts of the system and then reload it later. For example if I open the browser then close it touchflo will still be up. If I'm browsing for a while and switch back to the home screen it seems like touchflo is flushed out and needs to be reloaded. With the compcache+swap this should happen less often. And if you really want speed try not using any widgets and switch back and forth between apps and the home screen. Those widgets are the cause of most of the hang ups. The core system is actually pretty stable.
[Touch CDMA Android Development] pmos69:
Hi Zenulator,

I see you put up 2 60MB swap rootfs files:

- one with swappiness=20

- the other with "no swappinness set"

does "no swapppiness set" mean default swappiness? (which is something like 60, if I remember)

since the swapfile is in flash, wouldn't swappiness=0 make sense also?
[Touch CDMA Android Development] atx1980:
NICE!

DAMN!!!! FAST!!!

Ohh so nice!
[Touch CDMA Android Development] NarSan:
ok, so when are going to fix ID caller and notifiactions (missed calls).
[Touch CDMA Android Development] jamezelle:
one step at a time......:eek:
[Touch CDMA Android Development] zenulator:
If its set to 0 then its pretty much turned off.
[Touch CDMA Android Development] plemen:
rootfs-compcache-swap60-20swappiness.zip = no data on the vogue (using pureblack img)...
[Touch CDMA Android Development] pmos69:
well, not really.

swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible.

memory will still be swapped when needed.

higher values just enable a more agressive behaviour -> swap even when more memory is not being requested. just to have more physical memory available at any time.

anyway, this platform is very different from the average linux desktop or server, so some things might work out a little different from what we're used to.

since the swappiness can be changed "on-the-fly", I guess it's easy to experiment... (and that's great :))
[Touch CDMA Android Development] zenulator:
Ok I'll put up the one from yesterday with swap.
[Touch CDMA Android Development] zenulator:
thats what I meant by "pretty much turned off" but yea experiment with it. android has it's own lowmem parameters it uses too.

i'm going pull the rootfs.img with swap that i've been using since yesterday and upload it. it has different low memory parameters but i don't know if that makes a difference since we're not running low on memory anymore. its from the rootfs-2009-08-15.zip so vogue users shouldn't have a problem with data. it'll be up at vogue-hero in a minute or two.
[Touch CDMA Android Development] zenulator:
so i just compiled and installed compcache on my linux box in under a minute. just curious to see the cpu usage with it turned on and off.
[Touch CDMA Android Development] enatefox:
*nevermind. Headers were deprecated on my laptop for compcache..

I'm still messing with DMA and looking into some scripts to help bugfix. 8-15 has been the best for me so that's probably the right one to base the other stuff on now I would think.
[Touch CDMA Android Development] pmos69:
you're talking about the lowmem killer system?

can you shed some light on the parameters your using?
[Touch CDMA Android Development] JacenSolo2001:
do i need to delete my data.img and start from scratch to get the new rootfs to work properly?
[Touch CDMA Android Development] natefish:
Also wondering this. Thanks.
[Touch CDMA Android Development] jamezelle:
that would be 3 of us lol
[Touch CDMA Android Development] enatefox:
You don't need to.

Zen, can you tell me how you mounted swap on your desktop? Did you replace your swap or did you find a way to use both like we're doing?
[Touch CDMA Android Development] natefish:
Thanks. Also, I am on a vogue and the latest rootfs-2009-08-16.zip is doing fine with network data for me.

Can I ask another ignorant/android-noob question? Is the rootfs size supposed to help with RAM usage? I thought it had something to do with that because of what I have read so far. So, is it supposed to make the system faster? And are there still some apps (album, imeem mobile, etc.) that are hefty enough to cause touchflo to crash even with this newest rootfs?

Okay, that was two questions. Thanks.
[Touch CDMA Android Development] pmos69:
rootfs-compcache-swap60-20swappiness.zip which I tried uses both compcache and the swapfile.

but things didn't run very well for me with it...

you can do:

cat /proc/swaps

to check the swaps used
[Touch CDMA Android Development] enatefox:
natefish, rootfs is the root file system-- not related to RAM. That would only change the free space for root and is not necessary. What helps memory is swap + compcache and does it ever.

pmos69, I was referring to a desktop/laptop using compcache not our devices. I'm using an encrypted swap partition so not too sure:

$ cat /proc/swaps

/dev/mapper/cryptoswap partition 1951856 0 -1

I wonder if I can map compcache to cryptoswap
[Touch CDMA Android Development] zenulator:
thats why i put a couple up so you guys can play around with it. load up as many widgets and shortcuts as you can and do some browsing then switch to a couple different programs and then switch back to the home screen see how long it takes to come back up. you can change the swappienss on the fly too if you know how. as well as turn swap off.

as far as the new data.img thing goes thats only necessary if your switching your system.img
[Touch CDMA Android Development] plemen:
Wow that was quick - this works well. Would you be able to put up one with a 60mb cache?

Thanks again for all your hard work.
[Touch CDMA Android Development] zenulator:
maybe later but i don't think it's really necessary.
[Touch CDMA Android Development] enatefox:
Sorry, messing with swapper app seems to be useless. proceed as usual
[Touch CDMA Android Development] natefish:
It says it can and will shorten the life of the sd card...ick! Thanks for posting the link, though. Might try it anyway.
[Touch CDMA Android Development] enatefox:
That's what swap on an SD card will do. The key is to recreate the file each boot to help ensure it's created physically in a different spot on the the card (lightning doesn't strike the same place twice..) which the app is supposed to do and I assume our rootfs.img is doing. We're running the entire OS on our SD card you should be prepared when your SD wears out a little faster. They're like $5.00 though

Just to throw this out there

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-2692 source from HackADay about how a single-click jailbreak was made for the G1. Good stuff.
[Touch CDMA Android Development] plemen:
Ok. So far I've tried both SuperHero and PlainBlack with the 8-15-32mb swap lowmem rootfs.

SuperHero lags quite a bit and refreshes the home screen frequently - this is a minimal home screen with just the clock, some icons and a second screen with the some more icons and switches.

PlainBlack runs like a champ with minimal lag and no refreshes of home screen.
[Touch CDMA Android Development] natefish:
Yeah, I know what you're saying about the price. My wife and I are expecting our first child soon, so extra geeky purchases are hard to justify. So, it just rewrites the swap file? I know the swap is usually there, so you're saying it is rewritten each time I boot Android?
[Touch CDMA Android Development] enatefox:
It is not from what I see. Zen, if the swapfile name is the same each boot does that count? My assumption would be append a random number at the end to ensure it ends up physically elsewhere on the card each boot.

I'm 5 months ahead of you with the kid delivery. I got my 2gb off Newegg for 8 bucks (when they were worth that much), accidently got a full size SD and emailed them that it was my mistake. They comped the card, tax and shipping since it was under $25.
[Touch CDMA Android Development] jamezelle:
@zen

im guessing you took out the weather apk in pureblack081609? as it crashes when i try to choose a city also any clock city choosing......."sacrafices":(lol
[Touch CDMA Android Development] natefish:
Search "deskbar" in the market. It has a nice clock and weather widget that can each be placed separately.
[Touch CDMA Android Development] jamezelle:
will check it out thanks:)
[Touch CDMA Android Development] enatefox:
You want the app? I'll upload it. It's taken out just to make things faster but you shouldn't need to worry with swap and compcache. I'm using 8-15 myself with DMA (that's right) and it has that widget. I'd recommend it.
[Touch CDMA Android Development] jamezelle:
that would be great much appriciated:)
[Touch CDMA Android Development] zenulator:
Weather app is gone in pure black. I was going for pure speed. So yea it was sacrificed.
[Touch CDMA Android Development] jaredakelly:
who else can comment on the speed of pureblack?
[Touch CDMA Android Development] pmos69:
very fast indeed