yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Effdee:
btw it is not my dropbox or my script

that is Firerat's work

I just remember reading the solution on that page

it wasn't a problem for me as I installed the CM7 on a clean slate

that script upgrades the db

you don't need the script you can just type this out in terminal

su

sqlite3 /data/data/com.android.providers.settings/databases/settings.db 'update system set value="1" where name="set_install_location";'

better still use adb shell and copy paste it

adb shell

<paste>

you don't need the su if you adb shell

still I like the way he made the script run itself as root if you are not root, quite a neat trick
[G1 Android Development] newellj79:
Thanx. Will try.
[G1 Android Development] AndDiSa:
I am manually replacing Launcher2 by ADW, because I do like ADW a bit more, even if it needs probably some additional memory ;)
[G1 Android Development] hrk:
That's a strongly community-committed statement! It's your ROM, you could cook it to your tastes... +1!

The only thing I dislike of Launcher2 is that it has a poor landscape handling of widgets, so much space is unused and widgets are smaller. Alas, for my usage (3 mostly empty home screens) Launcher2 is enough.

Oh! And that when you hit the HOME button, it goes to the default home screen and not the last one you were in. I suppose that's what I get if I want to stay "stock"...
[G1 Android Development] greenkabbage:
Have you tried Zeam yet? It feels quite snappy to me, even if it has to reload. While it's minimalistic, it has all the features I need.
[G1 Android Development] newellj79:
I love zeam on my g1 and nook color.
[G1 Android Development] :
I see android 2.3.4 came out just today. Will you be updating soon?
[G1 Android Development] Effdee:
you mean they tagged 2.3.4

it is a milestone

it is like walking to the pub

it a sign says "the pub is 2 miles away"

later you see a new sign "the pub is 1 mile away"

the distance was always shrinking, but you now know you are 1 mile away.
[G1 Android Development] hrk:
Camera vs 100ANDRO

Hi,

this has been bugging me for a long while, but I never had the time/patience to look into it. It's quite trivial now that I've documented myself.

The problem is this: when I moved to Gingerbread, pictures stopped showing up in iPhoto. By reading the Design rule for Camera Filesystem I've found out that's it's really simple: pictures should go in a directory with a name like 100ANDRO (which I have on my sdcard already, maybe from CM6.1 when pictures still appeared) but I see that all of them have been stored in a parallel directory called "Camera", thus breaking DCIM rule.

What can you tell me about your SD card? Do you have both 100ANDRO and Camera directories? Where are your pictures stored? Do they appear in iPhoto/digiKam/whatever you use - provided you transfer them to another storage-?
[G1 Android Development] hrk:
I don't care about pub signs, I just want to know if we'll be able to drink the "Google-Video-Chat-Over-GTalk"-beer at the pub! :p
[G1 Android Development] jdb78:
I do have both directories and since Gingerbread my pictures are stored in Camera instead of 100ANDRO. But for me it doesn't really matter because I use filemanagers instead of picture managing software.
[G1 Android Development] hrk:
Little followup...

Google's Camera app source contains this:

144 /**
145 * OSX requires plugged-in USB storage to have path /DCIM/NNNAAAAA to be
146 * imported. This is a temporary fix for [B]bug#1655552[/B].
147 */
148 public static void ensureOSXCompatibleFolder() {
149 File nnnAAAAA = new File(
150 Environment.getExternalStorageDirectory().toString()
151 + "/DCIM/100ANDRO");
152 if ((!nnnAAAAA.exists()) && (!nnnAAAAA.mkdir())) {
153 Log.e(TAG, "create NNNAAAAA file: " + nnnAAAAA.getPath()
154 + " failed");
155 }
156 }

... and...

130 public static final String CAMERA_IMAGE_BUCKET_NAME =
131 Environment.getExternalStorageDirectory().toString()
132 + "/DCIM/Camera";

which is then used to store the image data:

721 private int storeImage(byte[] data, Location loc) {
722 try {
723 long dateTaken = System.currentTimeMillis();
724 String title = createName(dateTaken);
725 String filename = title + ".jpg";
726 int[] degree = new int[1];
727 mLastContentUri = ImageManager.addImage(
728 mContentResolver,
729 title,
730 dateTaken,
731 loc, // location from gps/network
732 [B]ImageManager.CAMERA_IMAGE_BUCKET_NAME[/B], filename,
733 null, data,
734 degree);
735 return degree[0];
736 } catch (Exception ex) {
737 Log.e(TAG, "Exception while compressing image.", ex);
738 return 0;
739 }
740 }

It looks like a. it's something which goes back to Google, b. there's some bug numbered 1655552 related to OSX but I can't seem to be able to find (android's official tracker has much lower numbers... what am I missing?).

Why is Google using a path which goes against the standard? Is there a point to it? Is Google being Evil? :confused:

EDIT: yep, it's just Google's being Evil.
[G1 Android Development] jdb78:
ADS_magpie-20110428-signed.zip

I tried ADS_magpie-20110428-signed.zip today. IMHO compared to ADS_magpie-20110416-1-signed.zip it is way slower, much more delay when using the UI. My device tried to tell me that it has >40MB free RAM and with ADS_magpie-20110416-1 I had >20MB. Don't know if this is related to zram and compcache. Anyway I went back to 20110416-1.

Was I supposed to clean the caches before flashing the new version?
[G1 Android Development] hrk:
I have the same feeling but 20110427 wasn't slow, so AFAIK, today's changes are the culprit. I get way more free RAM (30+MB compared to 13MB) but overall "sluggyness", both in app startup time and touchscreen responsiveness.

For the record, I just flashed 0428 over 0427.
[G1 Android Development] AndDiSa:
No, you didn't do anything wrong. It's the same for me: The responsiveness with compcache was much higher than now with zram.

But I noticed one special difference: with the new kernel + zram there are much more background services running. For me today it was the first time, that calendar service was started automatically! (Since CM 6.x I had always the problem, that I had to insert a "dummy" appointment to startup the calendar service).

I suspect, that the "slowness" is due to swapping. When I check memory / zram usage, zram is used always at a ratio of 95%. Probably it's also related to the swappiness settings, I need to investigate. Probably I will play a bit with swappiness or try to switch off zram completely.

In short words: the new version is running (background-)services more reliably, but responsiveness is lower and startup of apps takes longer.
[G1 Android Development] AndDiSa:
In 0427 I forgot to merge the new minfree settings from ezTerry. 0428 has the new minfree settings from ezTerry included.
[G1 Android Development] hrk:
Could it be that the "problem" is not in zram+swappiness but in the minfree settings? I reverted to 20110427 and it's not sluggish anymore... for being this lil' 2008 underpowered smartphone :-)
[G1 Android Development] roalex:
Yup it is in the minfree area, those are in "testing" afik, feel free to mess around to see whats best ;)
[G1 Android Development] ezterry:
minfree + fuge swaps... but really I'd rather it full swap rather than be stuck at a random amount.. easier to adjust for.

1) fugeswap adds a level of pressure on swap to adjust minfree for use with and without swap.. default is 512 * 4k = 2MB .. with current minfree 256,512,765,2048,3072,4096 (or 1MB,2MB,3MB,8MB,12MB,16MB)

it may be wise to test 256 or 128 (1MB or 0.5MB) instead of the default 512 for higher responses.

as root:

echo 128 > /sys/module/lowmemorykiller/parameters/fudgeswap

Note this will need to be re-set each boot so for tests over reboots make an init.d script

2) Total swap .. this is really only supposed to hold a parts of a memory persistent background service(s) + launcher that must always be in ram.. if you don't have anything that ought to stay in ram disable it in Settings->Applications .. but with the current use there may be a better amount of swap 6Mb?, 8? 10? 12? 14? 18? (its likely in this range)

To set a custom value as root run:

setprop persist.zram.size 6

this needs a reboot to apply

3) We may also wish to change the minfree.. I think we are closer to correct now than previously but that isn't to say the levels are correct.

4) swappieness is 60 by default in the kernel .. and 25 in the compcache/zram init.d script..

5) as indicated a bit back do let the system load and give it a bit to determine the actual speed of apps (as a bit of time is sometimes needed to make the bits you want in swap there.. and the bits you want not in swap in active ram. (since once loaded the sluggishness reduces and I've not experienced the touch screen issue.. just after boot many things are still loading in the background however you need to let these complete before proper analysis of rom speed can be done.

The question is what is the optimal default balance of all of the above.. and to allow you then to customize it as needed.
[G1 Android Development] farmatito:
In my 2.6.35.13 kernel (BFS 0.401 + 1000Hz) version I'm testing right now on ezGinger:

zram 32MB with priority -1

swap 32MB with priority -2

fudgeswap 512

minfree 2048,3072,4096,6144,7168,8192

vfs_cache_pressure 50

and responsiveness seems good so far.

~ # rzstats
ZRAM: /dev/block/zram0
disksize : 33554432
num_reads : 63
num_writes : 570
invalid_io : 0
notify_free : 76
discard_alignment: 0
zero_pages : 6
orig_data_size : 2289664
compr_data_size : 648447
mem_used_total : 663552
total used free shared buffers
Mem: 112680 109608 3072 0 2688
Swap: 64888 5376 59512
Total: 177568 114984 62584
vm.swappiness = 40
Filename Type Size Used Priority
/dev/block/zram0 partition 32764 5376 -1
/dev/block/mmcblk0p3 partition 32124 0 -2
[G1 Android Development] ezterry:
In my example above I think that is the 6Mb compcache

also your default minfree levels I find very bad for service, and home, retention in ram in part because they are very high:

2048,3072,4096,6144,7168,8192 = (8Mb,12Mb,16Mb,24Mb,28Mb,32Mb)

this means 8Mb will always try to be free.. subtract 2Mb for the fudge is still 6Mb (remember the fudge only applies if the swap is available so if swap is full the fudge is ignored)

--

vfs_cache_pressure might be added to the list of things to experiment with..

50, 75, 100 being probably the best test values (50 as above and 100 the default .. it will impact swapcache that in turn may make it better to disable swap all together if ram used by zram + swap cache = greater than original ram size)
[G1 Android Development] farmatito:
Let me know if you need more info or some test. I set it up with this script:

#!/system/bin/sh
BB="busybox"
# Swap and compcache setup
USE_SWAP=1;
USE_COMPCACHE=1;
SWAPINESS=40;
VFS_CACHE_PRESSURE=50;
RAMZSWAP_DISKSIZE=32120;
ZRAM_DISKSIZE_MB=32
DEV_ZRAM=/dev/block/zram0;
DEV_RAMZSWAP=/dev/block/ramzswap0;
DEV_SWAP=/dev/block/mmcblk0p3;

echo $SWAPINESS > /proc/sys/vm/swappiness;
echo $VFS_CACHE_PRESSURE > /proc/sys/vm/vfs_cache_pressure;

if [ -b $DEV_RAMZSWAP ] ; then
swapoff $DEV_RAMZSWAP 2> /dev/null;
rzscontrol $DEV_RAMZSWAP --reset 2> /dev/null;
fi;
if [ -b $DEV_SWAP ] ; then
swapoff $DEV_SWAP 2> /dev/null;
fi;
if [ "$1" = "off" ] ; then
#To free pagecache, dentries and inodes
echo 3 > /proc/sys/vm/drop_caches;
echo "swap and ramzswap disabled";
exit 0;
fi;

if [ $USE_COMPCACHE -eq 1 ] ; then
MODULE="x";
MODULE_PATH=`find /system/lib/modules -name zram.ko`;
if [ "x$?" = "x0" ] ; then
MODULE="1";
# Compcache setup
RET=`lsmod | grep -c zram`;
if [ "x$RET" = "x0" ] ; then
/system/bin/insmod $MODULE_PATH num_devices=1;
else
echo "zram module already loaded";
fi;
if [ "x$?" = "x0" ] ; then
echo "Initialize $DEV_ZRAM"
sleep 1;
ZRAM=`busybox basename $DEV_ZRAM`;
echo $(($ZRAM_DISKSIZE_MB*1024*1024)) > /sys/block/$ZRAM/disksize;
mkswap $DEV_ZRAM;
echo "Enabling swap on $DEV_ZRAM"
swapon $DEV_ZRAM;
fi;
else
MODULE_PATH=`find /system/lib/modules -name ramzswap.ko`
if [ "x$?" = "x0" ] ; then
MODULE="1";
# Compcache setup
RET=`lsmod | grep -c ramzswap`;
if [ "x$RET" = "x0" ] ; then
/system/bin/insmod $MODULE_PATH;
else
echo "ramzswap module already loaded";
fi;
if [ "x$?" = "x0" ] ; then
sleep 1;
MAJOR=`cat /proc/devices | grep ramzswap | cut -f1 -d ' '`;
if [ -z "$MAJOR" ] ; then
echo "Ramzswap not supported, disabling"
else
if [ ! -b $DEV_RAMZSWAP ] ; then
echo "Creating $DEV_RAMZSWAP";
mknod $DEV_RAMZSWAP b $MAJOR 0;
fi
if [ "x$?" = "x0" ] ; then
echo "Initialize $DEV_RAMZSWAP"
mkswap $DEV_RAMZSWAP;
rzscontrol $DEV_RAMZSWAP --disksize_kb=$RAMZSWAP_DISKSIZE --init;
sleep 3;
echo "Enabling swap on $DEV_RAMZSWAP"
swapon $DEV_RAMZSWAP;
fi;
fi;
fi;
fi;
fi;
if [ "x$MODULE" = "xx" ] ; then
echo "ramzswap/zram module not found";
fi;
fi;
# ramzswap was created earlier and will have higher priority
if [ $USE_SWAP -eq 1 ] ; then
if [ -b $DEV_SWAP ] ; then
echo "Enabling swap on $DEV_SWAP"
swapon $DEV_SWAP;
else
echo "Swap partition $DEV_SWAP not found";
fi
fi;

Would be nice to do it with a busybox swap version that supports -p switch.
[G1 Android Development] newellj79:
How can i use the setswap.sh file for ads-magpie? Thanks.
[G1 Android Development] AndDiSa:
You mean the one from the download directory?

Open a shell as root and run it. If you want to change the values, you can edit them within the file. It's a very primitive solution, but I am lazy to type the commands again and again :)
[G1 Android Development] newellj79:
Thanx. R there n e recommended settings?
[G1 Android Development] ezterry:
um so far if you take the code of the current build and changed PLATFORM_VERSION in build/core/version_defaults.mk from 2.3.3-ez to 2.3.4-kanged-ez i don't think it would be false.

In many places the 2.3.4 tag is *behind* the gingerbread branch.. the audio/video feature is going to be in gapps. so no reason for a new build API level hasn't changed so I don't expect a framework change was needed..

(In the meantime its time for me to go into firerats', nlj's and AndDiSa's code to make my integration of magpie poke vold ect. and prepare for a -RC1 .. I'll try to poke the metadata for 2.3.4 before the nightly with the merge)

btw to speed things up stock settings + persist.zram.size=8 + /sys/module/lowmemorykiller/parameters/fudgeswap=128 seems to be a good combo
[G1 Android Development] creezalird:
deleted. false post
[G1 Android Development] AndDiSa:
At the moment I am running with

- 18MB zram

- swappiness 10

- vfs_cache_pressure 50

- fudgeswap 128

- minfree 512,1024,2048,3072,4096,6144

not perfect, but acceptable for me.
[G1 Android Development] ph0b0z:
Just wanted to say that i'm really happy with the direction this build/work took in case of the Memory-usage and stuff.. much less home-app reloads than before (even without "keep home in memory..) and so on! :) I just think that the speed suffered a little bit and the phone-app needs quite long to load.. but i think that i will use the last build a little longer :)
[G1 Android Development] newellj79:
I flashed4/29 over 4/27 and setcpu would not work. I tried everything. Back to 4/27 for now. May try later.
[G1 Android Development] hrk:
I'm trying to fix the "DCIM / Camera incompatibility", so I git-cloned Camera.git from android.git.kernel.org and made my changes.

I signed the package with my certificate (Yeah, I know) and adb pushed it to /system/app. The log showed...

... and now I am without Camera... but the Gallery is still there and works fine :confused:

What do I have to do in order to test my changes? Stack Overflow has some suggestions for me, but the solution talks about android:sharedUserId="android.uid.system", and it's not already in the manifest. In my ignorance, I don't think I should need to add something extra to the manifest (since I just added an helper class, no activities or services).

:confused::confused::confused:
[G1 Android Development] ezterry:
You prob. need to use the same shared cert as the rom. AOSP and CM both use the public test keys so this is easy just build with 'make Camera' if you don't want a full build in the actual android build tree
[G1 Android Development] AndDiSa:
I suppose you tried to build it as a single app and you want to install it later on top of the rom. It's not working. I ran into the same problem when I tried to modify SpareParts. Problem is the signature here: Those apps have to be signed in combination with the rom. Unfortunately I didn't find a solution. Even signing the app will not work ...

edit: ezTerry was faster and solved the problem ...
[G1 Android Development] AndDiSa:
Strange, I am running SetCPU, too, without any issues. Only startup takes a bit longer.
[G1 Android Development] hrk:
I hate to feel so dumb, but do you mean that I have to scratch the

git clone git://android.git.kernel.org/ + project path

and go with

mkdir mydroid
cd mydroid
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync

?

Tell me I got it wrong, please :-(

BTW, thanks to you and AndDiSa for the answer!
[G1 Android Development] ezterry:
Um.. if you are working on ezgingerbread use the op for instructions of syncing the ezgb source tree.

If something is. Confusing let me know and I'll see about an update
[G1 Android Development] hrk:
repo sync started with "platform/bionic"... do I really have to download "every project for every device and their mom"? :(
[G1 Android Development] Effdee:
Its only a few gig :D
[G1 Android Development] hrk:
And they didn't like my case insensitive filesystem (HFS+)... :D...:(
[G1 Android Development] Effdee:
:eek:

linux !!!!

even if it is a vm linux!!

else you will be a winzip dev like our current moderator

actually on the Linux front has anyone gone to ubuntu 11.04 yet?

I'm currently kubuntu but a gnome/kde hybrid

my desktop is gnome but I use many kde apps

I like kde but for some reason bbc iplayer sux

with gnome bbc iplayer rox, but I have to script

while [ 1 ];do sudo killall -9 polkitd;killall nautilus;sleep 300;done

else memory just gets clogged
[G1 Android Development] newellj79:
Going to try flashing 4/29 over 4/27 again tonight.
[G1 Android Development] newellj79:
Flashed ads 4/29 over 4/27 without any problems this time. Could somebody please tell me exactly how to run the setswapsettings.sh file? I have it in the root directory of my SD card. From the super user prompt I tried typing "setSwapSettings.sh" and "/sdcard/setSwapSettings.sh". No go. Thanks again for helping me learn.
[G1 Android Development] tvall:
I've been using 11.04 since one of the alphas for building android. It runs pretty well.

I usually use chrome os for everything else tho

And the new 2.6.36 kernel on ezgb runs great! I built it from source and realized that ezterry released his rom with it right when it finished...
[G1 Android Development] creezalird:
I assumed u've already set the parameter inside the script.

Run terminal ( in phone )

Type :

su (Enter)

sh /sdcard/setswapsettings.sh (Enter)

and maybe a reboot (this I'm not very sure)
[G1 Android Development] ezterry:
For those working from source:

completed merge of AOSP (following the gingerbread HEAD)

For those merging other codebases to 2.3.4 for the DS, google changed dhcp to support multiple interfaces thus you need to edit init.trout.rc and init.sapphire.rc:

https://github.com/ezterry/GB-device_htc_sapphire/commit/64050c7832e6dad44e916b898ecae20a92e4efb3
[G1 Android Development] newellj79:
Thank u. Is there a preferred app for editing such scripts or is it best done from the PC?
[G1 Android Development] :
Can someone explain to me how the "audio hack" works? I tried to add it to 2.3.3 sense in updater-script but it ends up showing up a bunch of erros such as "is the cpu pegged?" and no sound will play.
[G1 Android Development] ezterry:
um.. the "audio hack" used on the Dream sapphire is just to ensure the correct audio profile is installed onto the correct phone.. The Dream profile makes echos when installed on a sapphire phone.. and the sapphire one makes it sound a bird 0.5km away sound just as loud as yourself to the unfortinalt person on the other side of the line if installed on the dream.

In ezGb I install 3 profiles,

* Dream Profile

* MT3G 32b sapphire profile from the froyo OTA (32b sapphires only)

* Previous sapphire profile (32a/MT2.1/Fender)

All included in gzip-ed form but the correct one expanded into the expected location.

Your problem sounds like something else..
[G1 Android Development] AndDiSa:
No, no reboot, after a reboot you will get the old settings. This script is more for experimenting a bit with these values to find out the "best".
[G1 Android Development] hrk:
I have enough real linux boxes to use, I don't need a VM to do that... especially since all of this started to fix the (lone) Camera.apk! :D

The only problem is that they're either in a different room or lack a monitor... I guess in the next week-end I'll dig something about terminal services...

What about the winzip dev?

Having followed the OP word-by-word, I guess I'm safe with a simple "repo sync", right? :)

EDIT:

luca@aiace ~/android/ezGingerbread $ make Camera
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4-ez
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================

Looks like it's finally working... and it's somehow become 2.3.4-ez... :)
[G1 Android Development] Effdee:
ssh ;)

you can lock it down so you can only get at it via local subnet ,no monitor/keyb required

(well you will need them on the client obviously)

I sometimes use connectbot, an android terminal/ssh app to ssh into my laptop over wireless

connect bot is very good, I use it in place of std terminal with its local connection

but it can be a little screwy, but not really it's fault that my wireless drops

I'm thinking of setting up a cron to monitor a command cue (even if ssh drops commands processes will still be live as they are executed by the remote machine)

but probably risky even on a local subnet but I'm sure I can lock it down

ref winzip dev

they just zip up binaries

picked it up from CM's home screen tips

which is surely a nod to the guys who pass off other peoples work under their own badge

as for camera yeah you have to get the whole lot as it depends on framework etc

right now I've got 4 repo's,

cm, ez , ads and cos

a lot of that is duplicate, so I wonder if there is a way to have them all in the same root dir

like git branches, but repo branches

would save of disk space, especially when I want to compare across repos

for example, if I want to compare COS and ADS framework/base I have to

git remote add -f -b <branch> <repo name> [github]

then I can

git diff <repo name>/<branch>

BUT

added time d/l (and virgin cap me based on my d/l :mad:)

uses more space on hdd

if I could figure out howto have multiple repos in the same root dir without having to re-sync I would save

bandwidth

time

disk space

effort

not sure it is possible

BUT I can't be the first, so I should craft a google search
[G1 Android Development] hrk:
I was cryptic... I have compiled Camera.apk remotely via SSH, but because I could write the code in Eclipse here. Then git diff + ssh patch file + patch -p1 + make Camera. :)

Writing android with vim over ssh?... not in my hobby time.

Regarding Camera: now it works as expected (and iPhoto is happy), the only drawback is that it'll probably require some tinkering with the Gallery activity, in order to show everything under a single directory, instead of a "group" for each directory. It will have to wait a week, 'cause weekend is over and cooliris' code is very "spaghetti-like" to my eyes.