yashsingh1/xdaforums huggingface dataset:
[G1 Q&A, Help & Troubleshooting] thomcrowe:
Has anyone been able to get the Google Applications (calendar & contact sync)?

If so, could I ask you how you did it? I have tried, but I am new to this so the instructions on the google code site didn't really make sense. I would love a little help.

Thanks.
[G1 Q&A, Help & Troubleshooting] xulture:
Hey guys,

we've got the first custom rom:

http://custom-android-sciphone-n19.googlecode.com/files/custom-sciphone-n19-1.5-cupcake-beta-0.1.zip

edit: This is a 'beta' but really should have called it 'alpha'. I'm not happy how some things work (or don't work). Only use it to play around and find problems. Its not stable enough to actually use it.

contents:

cupcake 1.5

google apps sync

android market

busybox

apps2sd

swap2sd

Overall, only apps2sd and swap2sd are new, compared to what we had already for a few weeks.

Current version of apps2sd will not do anything if you don't have partitions on SD card setup properly:

1st (primary) FAT -- stuff that the phone mounts on /sdcard

2nd (primary) ext2 -- stuff that new rom mounts on /system/sd and links only /data/app to it

3rd (primary) swap -- mounted as swap space if partition exists.

Could someone please write a guide how to partition the SDCARD?

(also, this repartitioning can be done by the phone via adb, using fdisk that comes in busybox does anyone want to write up a script?)

My recommended sizes: swap: 128Mb, ext2: 512Mb, and everything else for FAT (eg on a 2Gb card, that would be 1.4Gb FAT, 0.5Gb ext2 and 0.1Gb swap). Don't go much over 512Mb for ext2 -- ext2 uses ram and the bigger the file system, the more memory gets used up.

I tried mounting this as the whole /data but its way too slow and too many things complain about 'so and so not responding, close or wait...' I guess we have to leave dalvik cache as is.. *sigh*.

Installation procedure: download files, put them on a sd card (standard definition, not high definition), put the card into the phone, turn it on, update will proceed. (phones that can't perform 'official update' will not get bricked with this update, but the update will not work, i recommend not attempting this update unless 'about phone'/'build number' is 20091201 or newer).

After update completes and the phone asks to restart, remove the sd card (leave the phone asking to restart)

If you are using the same sd card to run the phone, and want to use apps2sd, plug it back into your computer, partition it (I used gparted on ubuntu 9.1), insert it back, then push little reset button next to sim card slot.

First reboot takes 5-10 minutes.

I've enabled setup wizard. This may be annoying and perhaps we'll take it out. Setup wizard does the 'welcome to your new phone' etc etc.

What pisses me off with it is that I don't have ability to enable wifi, whilst it attempts to use internet. The only way around it is to hit menu, and 'add apn' and use your gprs connectivity.

After initial setupwizard finishes, contacts, calendar and gmail will get synced, and if you downloaded any apps from android market previously, they'll start downloading and installing themselves on your 'new' phone.

This is the first build, so expect problems. Do not use it if you can't afford to waste time by rolling back to previous update.

Once we sort out issues surrounding using SD for storage and memory extension and have it running fairly well, we'll have space to fit eclair/2.1 onto this phone ;-)
[G1 Q&A, Help & Troubleshooting] gymp:
Thanks guys! Really big thanks ....
[G1 Q&A, Help & Troubleshooting] lotsofish:
I just got my N19 today. I have the 850/1900 mhz version, and the "official update" works just fine with it. I also updated the Google bundled apps 1.0.

The only problem I am having at the moment is the dialer app buttons are too big now with the updated Google apps. I tried rolling back GoogleContactsProviders.apk with the original ContactsProviders.apk, but it didn't change anything. I am new to Android, is that even the file that handles the dialer app? How can we fix it so the buttons aren't so big?

I haven't had it long enough to know if I need to apply the mic fix or not. I see there is an image now that includes a APPS2SD and SWAP2SD fix - might have to give that a try. Is that basically just symlinking the data and swap directories to the card or is it something more complicated than that?

Also, I never saw it listed as an EDGE phone, but I am pretty happy with the over-the-air speeds. It seems to be about the same as my old Nokia 5300 with ran on EDGE. Of course the WIFI at home is nice. :)

scophone.com got it to me in Minnesota in just 7 days with express shipping.
[G1 Q&A, Help & Troubleshooting] lotsofish:
Also, I just tried out the Calendar app. It syncs fine, but again the interface is a bit messed up. There is a big + bar (that doesn't do anything) that covers up the top hour and the all day events. Any ideas on how to get an updated Google Calendar app for smaller screens?
[G1 Q&A, Help & Troubleshooting] xulture:
added guide on how to repack ramdisk aka rootfs.. stuff that lets you modify init.rc..

if anyone else wants to play around with mounting the partition off sd card directly as /data, and making /system bigger please let me know how to get on.

We definitely need more space if we want to attempt eclair (2.1) on this phone.

When I do it the phone runs awfully slow, its completely useless. Everything 'takes too long to respond, force close / wait'.
[G1 Q&A, Help & Troubleshooting] lotsofish:
Thanks this is good information.

I tried to download the custom beta 0.1, but I can't get it unzipped. It's giving me an error. Also tried www . wobzip . org and it couldn't do it either.

I am willing to help out testing or working on this too. I am new to Android, but definitely not new to Linux. I was trying to get the apps on the sd card, but it wasn't working the ways I tried it. I would like to see the custom rom you put together to see how you are setting that up.

I was comparing some file sizes of the image files:

Official Update - 64.0MB

Custom Beta - 67.75MB

1.5 from SDK - 52.9MB

1.6 from SDK - 62.8MB

2.1 from SDK - 76.1MB
[G1 Q&A, Help & Troubleshooting] xulture:
I used winzip to pack it; also just downloaded it myself and unpacks alright with it..

SDK's don't have a number of applications that you want on your phone. Also during the first boot, a lot of stuff gets unpacked from /system into /data/dalvik-cache (for instace, some 30Mb of data ends up there on N19, during the first boot).

Some of the 'system' images for 2.1 for phones I've hacked with arrive with about 100Mb image, I'd expect this to use about 50Mb of /data/dalvik-cache. N19 has 128Mb of internal storage, so we must find a reliable way to mount /data off the sdcard or else we can't squeeze 2.1 in it.
[G1 Q&A, Help & Troubleshooting] xulture:
So after you do these updates, you can still make and receive phone calls?

What does it say under Baseband Version, in Settings / About Phone?

As you say, some apps have bad display (dialer, and calendar), also Youtube doesn't play sound. Does anyone want to hack window manager? I find it very irritating not being able to use half of the apps on Android Market because they force HVGA resolution so half of the app is off the screen.. Instead of patching each of them to display on QVGA, perhaps we should look into our own scaling when app attempts to use area thats off the screen?
[G1 Q&A, Help & Troubleshooting] lotsofish:
Yes it works fine.

It says IPX 900/1800, but I haven't had any problems with it. I am on T-Mobile which uses the 1900mhz band, and I haven't gone out into roaming areas yet, but I am assuming it will work fine when I get to a 850 mhz area.

Do you still have the original contacts.apk file? This is where the dialer layout is stored. I mistakenly forgot to backup my original files before I updated. The original dialer had smaller buttons.

From what I've read, I think 1.6 has better support than 1.5 for different screen sizes.
[G1 Q&A, Help & Troubleshooting] xulture:
uploaded to:

http://custom-android-sciphone-n19.googlecode.com/files/Contacts.apk
[G1 Q&A, Help & Troubleshooting] lotsofish:
I couldn't get it to unzip with Ubuntu. The other files you uploaded worked fine. I have an old XP machine in the house so I booted it and was able to get it to unzip with WinZIP 14. The built-in compressed folders in XP couldn't read it either.

Now that I got it uncompressed I am going to give it shot.
[G1 Q&A, Help & Troubleshooting] lotsofish:
Excellent. I just moved this back to the phone and the dialpad looks much better.
[G1 Q&A, Help & Troubleshooting] lotsofish:
I am able to load my apps on my sdcard now. The command `busybox free` shows 128MB free swap space.

I did have to change two permissions before it would work. I first tried it and got an 'Could not install/Insufficient space' error.

These are the two commands I had to run to get downloads to install.

busybox chown -h 1000:1000 /data/app

busybox chown 1000:1000 /system/sd
[G1 Q&A, Help & Troubleshooting] lotsofish:
Would it work to try to get the files from our phones to run in the emulator, in order to work on upgrading to 1.6 or 2.1?
[G1 Q&A, Help & Troubleshooting] annoynimouse:
can you check CPU load percentage while using sd-card?

something like creating huge file on sdcard and issuing something like >>cat /sdcard/longfile >>/dev/null & top<< like i'd try it on desktop Linux

my old notebok with Pentium M 1,5GHz when reading/writing SD card makes up to 80% of CPU usage, due to very cheap (so cut on features) SD-controller used. If same is for phone, then that might be the reason it is so slow...
[G1 Q&A, Help & Troubleshooting] annoynimouse:
can p7zip unpack it ? or 7zip in WinE ?
[G1 Q&A, Help & Troubleshooting] apeelme:
do not want to work the USB mass storage (ADB work)? why? usb driver download with SDK, and then replace android_winusb.inf.

must be something else? (my os is Win7 Ultimate 64bit)
[G1 Q&A, Help & Troubleshooting] lotsofish:
This one reset when I rebooted, and it still works, so looks like just changing the /system/sd is required.

I am seeing CPU% around 45-55% when reading a huge file from the sdcard. Quality and speed of the card will make a difference too. Xulture, are you using the sd card that came with the phone or a different one. I am thinking about finding one of those high speed microsd cards before trying to move the rest of /data to the card.

I am getting around 800-900KB/sec with the card I have, though this is being read mounted from my desktop machine. A faster card might be all that's needed.
[G1 Q&A, Help & Troubleshooting] xulture:
writing 5Mb to NAND

dd if=/dev/zero of=/data/large_file count=10240 & top

PID CPU% S #THR VSS RSS UID Name

16694 77% R 1 908K 368K root dd

...

16694 93% R 1 908K 368K root dd

...

16694 77% R 1 908K 368K root dd

...

16694 93% R 1 908K 368K root dd

10240+0 records in

10240+0 records out

5242880 bytes transferred in 12.244 secs (428199 bytes/sec)

reading 5Mb from NAND:

10240+0 records in

10240+0 records out

5242880 bytes transferred in 0.211 secs (24847772 bytes/sec)

writing 5Mb to SD ext2

dd if=/dev/zero of=/system/sd/large_file count=10240

10240+0 records in

10240+0 records out

5242880 bytes transferred in 1.674 secs (3131947 bytes/sec)

reading 5Mb from SD ext2

dd if=/system/sd/large_file of=/dev/null

10240+0 records in

10240+0 records out

5242880 bytes transferred in 0.218 secs (24049908 bytes/sec)

writing 50Mb file to SD to capture top info:

dd if=/dev/zero of=/system/sd/large_file count=102400 & top

PID CPU% S #THR VSS RSS UID Name

16705 90% R 1 908K 368K root dd

...

16705 70% R 1 908K 368K root dd

...

16705 67% R 1 908K 368K root dd

...

16705 84% R 1 908K 368K root dd

...

16705 68% R 1 908K 368K root dd

...

16705 71% R 1 908K 368K root dd

102400+0 records in

102400+0 records out

52428800 bytes transferred in 25.367 secs (2066811 bytes/sec)

So cpu usage appears to be the same when comparing nand and sd card, however, sd card can write about 5 times more data in the same time.

Read speeds appear to be the same.

that's on the high def card (the one that flash update doesn't work with). I'll try the other (std) card tonight.

given that the update doesn't even start on high speed card, its possible that normal operation causes repeated exceptions, and can't be used to mount the whole /data off of it... *sigh*
[G1 Q&A, Help & Troubleshooting] yux2:
i got the n19 too, the not-update-able one.

Is there anybody else with calibration problems ? I calibrate the touchscreen again and again, but i doesn't work well. Its to much "right-sided", in the keyboard i can't push "p" because its still "o"

I can't use the SD-Card as removeable media in Windows, there is no unmount SD-Card option when i connect to USB
[G1 Q&A, Help & Troubleshooting] annoynimouse:
one more idea (opr hope): it is partition size AND filesystem that makes difference.

can you make on SD exact replica of internal nand ? even jffs1 instead of jffs2 ?

and in nand are make some initrd that just loads SD drivers and makes root FS (and kernel and rest of booting process) from the SD ?

in effect run just the same firmware from SD and from nand, all the rest the same including FS.

FAT and FAT32 are not optimised towards flash and might end with wearing out FAT-tables area and damage sd-card
[G1 Q&A, Help & Troubleshooting] xulture:
writing to fat32, compared to ext2 seems to be a little faster... but these don't handle unix permissions and symbolic/hard links..

from what i gathered so far, yaffs and jffs filesystems are partially implemented by the actual hardware, and partially by the structure, so we can't use these on sd card. *sigh*.

both nand and sd cards wear with time -- they have limited number of writes they can do before they burn out. therefore I'm not exactly sure whats intended with 'logcat' files that keep getting overwritten -- perhaps to break the phone after 5-6 months so we have to buy a new one?

yaffs vs jffs -- these two file systems are different, and both have had second versions -- yaffs2 and jffs2. Due to 'block size' of our memory, I know we can't use yaffs2; not sure about jffs2. Jffs2 has built-in compression, so it makes better use of the space we have; however, it uses more memory and is slower.

If nand and sd peform about the same (actually write to sd is much faster), why can't we have all partitions sitting on the SD card? and get the phone to load just kernel and ramdisk from the nand? This way we have unlimited storage, and unlimited lifespan -- buy another $20 sd when the old one wears off ;-)

Well... because it runs too slow, either ext2 chews up too much memory, or Im getting some crappy sync issues with this sd card.
[G1 Q&A, Help & Troubleshooting] xulture:
p's are pain in the neck on my phone.. have to push black border next to it..

on your phone, under Settings / SD card & phone storage, tick USB mass storage. Then plug in the phone via usb cable to computer; computer will recognize 'removable storage'.
[G1 Q&A, Help & Troubleshooting] lotsofish:
In order to try mounting more things on the sd card, I am going to have to edit the ramdisk.uimg file and reflash, correct?

Can I edit updata.txt so it only updates the ramdisk part.

# Flash ramdisk image

fatload mmc 1 0x30000000 ramdisk.uimg

nand erase 300000 40000

nand write 30000000 300000 40000

Or can I remove the erase userdata line to save my data? I should be able to update init.rc without having to erase all my data.
[G1 Q&A, Help & Troubleshooting] xulture:
I tried changing the file name or changing the first line, typos bug me ;-) But then the phone doesn't start update.

So:

--------------------------

Androin auto updata test!!!

# Flash ramdisk image

fatload mmc 1 0x30000000 ramdisk.uimg

nand erase 300000 40000

nand write 30000000 300000 40000

-----------------------------

this should work, assuming you already run update to define ramdisk in this space via 'set bootcmd' and 'set bootargs' at the bottom of the file.

let us know :-)
[G1 Q&A, Help & Troubleshooting] lotsofish:
Alright, I will try this later. Worst case I can flash the whole thing back, but if I can save myself from having to reload contacts and everything again, that would be nice.

I have a little insight into why the Barcode Scanner, and also Shop Savvy and other scanner apps crash. Normally the camera preview format is 'PixelFormat.YCbCr_420_SP', however, our phones are using 'PixelFormat.RGB_565' as the default preview format. The Barcode Scanner and other programs aren't setup to use the RGB565 format, and are crashing.

The best fix would be to find out why RGB565 is being used, rather than YUV, then if possible switch the default to be the correct value.
[G1 Q&A, Help & Troubleshooting] dvelev:
Hi,

Which version of the build is on your phone?

Problems with the calibration of the screen can handle at least for me in the following manner - perform calibration and then shut down the phone. After reboot everything is OK.

SD card is not seen as a drive and in my Windows.
[G1 Q&A, Help & Troubleshooting] yux2:
i can't push the black border, there it recognise no touch, so i'm really unable to wrote a "p", but the dvelev's "restart-trick" was working

I have no Option "USB mass storage" in SD Card & Phone storage"
[G1 Q&A, Help & Troubleshooting] annoynimouse:
but not every FS has hotspots, concentrating 90% of writing. Those hotspot wears off much faster.

and loose all your settings, data, etc

and never be able to detach SD card
[G1 Q&A, Help & Troubleshooting] lotsofish:
I haven't made any changes that needed to change init.rc or the other ramdisk.uimg files yet, so I haven't tried flashing just that file yet.

I tried moving the dalvik-cache and the /data/data directories to the sdcard, and I was getting the same force close and other programs crashing that you saw Xulture. Then I tried moving the dalvik-cache back to the phone, and it still was crashing. So now I have /data/app and /data/dalvik-cache on the sdcard and /data/data on the phone and it's working fast, so that's a start.

When I did have /data/app, /data/data, and /data/dalvik-cache all on the sdcard, I cleared the data directory and I only got 1 message when it first booted up. After that it was working as normal. As soon as I added my Google account, it started popping up the force close/wait boxes, mostly for com.google.process.gapps. It's got to have something to do with the Google sync why having /data/data on the sd is not working.

What's confusing is writing to the card is much faster than to the phone storage. We should be running faster with /data/data on the sd. Here's the numbers I got.

# dd if=/dev/zero of=/data/large_file count=10240

10240+0 records in

10240+0 records out

5242880 bytes transferred in 8.903 secs (588889 bytes/sec)

# dd if=/data/large_file of=/dev/null

10240+0 records in

10240+0 records out

5242880 bytes transferred in 0.212 secs (24730566 bytes/sec)

# dd if=/dev/zero of=/system/sd/large_file count=10240

10240+0 records in

10240+0 records out

5242880 bytes transferred in 0.569 secs (9214200 bytes/sec)

# dd if=/system/sd/large_file of=/dev/null

10240+0 records in

10240+0 records out

5242880 bytes transferred in 0.213 secs (24614460 bytes/sec)
[G1 Q&A, Help & Troubleshooting] lotsofish:
I am thinking about turning this off, both for the reason of saving the flash memory from too many writes, and it might make the phone faster because those log files are being added to pretty much nonstop. Might save the battery too.

EDIT: I just killed the processes through adb. I'll report back if I notice any difference.
[G1 Q&A, Help & Troubleshooting] je-android:
Hello,

I am the unlucky owner of a non updateable N19 and I browsed this thread for some information but I still have some questions.

Of course, at first I didn't read until the end and tried the Google applications scripts and ended up with some files deleted and I don't know how to get them back (ContactsProvider.apk, SubscribedFeedsProvider.apk, Maps.apk). Could someone send me those files ?

could you modify the script so that it saves those files to the sdcard before updating ?

for example like this (we need to install busybox first)

adb -d shell /system/bin/busybox cp /system/apps/ContactsProvider.apk /sd/

adb -d shell /system/bin/busybox cp /system/apps/SubscribedFeedsProvider.apk /sd/

adb -d shell /system/bin/busybox cp /system/apps/Maps.apk /sd/
​

and maybe a separate backup script would also be useful, this one works for me:

#! /bin/sh

adb -d push busybox /system/bin/

adb -d shell chmod 0777 /system/bin/busybox

adb -d shell /system/bin/busybox tar cvzf /sdcard/data.tgz /data/

adb -d shell /system/bin/busybox tar cvzf /sdcard/system.tgz /system/

adb -d shell /system/bin/busybox tar cvzf /sdcard/misc.tgz init* /sbin/
​

I don't know if it can be restored easily, we probably need to create a yaffs disk image, but at least the files are safe!

Note: I notice that in the google Apps script busybox is copied to /system/bin and in the Busybox page, it is copied in /system/apps. I think it makes more sense to copy it in /system/bin no?

Also, in order to get the Google Apps working I tried to extract files from system.img.yaffs1 so I could copy them to my phone.

-I tried to use unyaffs, but this tool just segfaults when I try to read the system image

-I tried to compile yaffs1/2 on my Linux PC and use the nandsim mechanism to mount the image but it fails as well(probably because I don't do it the right way).

So could a happy owner of a updated N19 copy its /system/ directory to its sdcard and post it on the GoogleCode projetc page ?

for example like this: adb -d shell /system/bin/busybox tar cvzf /sdcard/system.tgz /system/

If someone knows how to use nandsim or the android SDK to mount yaffs image can he send a link ?

I'm sure there is a way with the SDK, because qemu can simulate a Nand memory chip where I would copy the yaffs image with nandwrite and be able to mount it. But if someone posts the extracted files to the website it will help everybody.

Thanks for your help!
[G1 Q&A, Help & Troubleshooting] annoynimouse:
of course, it only works with yaffs2, not yaffs1

i wonder why Beyond Radio Technology used yaffs1 at all!

xulture, can the phone run on yaffs2 with all else the same ?

or there is something that makes yaffs1 better choice ?

that would lost security data - user, group and access rights

it might be critically important info
[G1 Q&A, Help & Troubleshooting] Rafaesp:
Yes, I think it is better to move busybox to bin folder
[G1 Q&A, Help & Troubleshooting] xulture:
One of the differences is block size; yaffs1 uses 512Kb blocks, yaffs2 uses 2048 blocks. yaffs2 has more features and is better. Bock size is property of the actual memory chip.

Chip on n19 is

NAND device: Manufacturer ID: 0xec, Chip ID: 0x78 (Samsung NAND 128MiB 1,8V 8-bit)

(from dmesg on the phone).

This one has 512Kb blocks. We can't use yaffs2. :-(

I'm pretty sure that they chose to use it because its cheaper. :-)

overall: I started modifying unyaffs.c to get it to work with yaffs1. Not finished; lost interest. moved onto trying to use nandsim to read yaffs1. doesn't work -- eventually you get to mount the image but contents are always empty. not sure if its because of bugs in nandwrite or nandsim, but that's a bigger can of worms to open. I gave up trying to read yaffs1 after spending some 40hr that could have been spent a better way..

so I went the cheap and nasty way: tar files from adb shell, copy them out, untar, then use mkyaffsimage to create new image.
[G1 Q&A, Help & Troubleshooting] xulture:
Uploaded them to http://code.google.com/p/custom-android-sciphone-n19/downloads/list

Could you please send me private message with you gmail email address, and I'll add to you the project so you can make these changes :-)
[G1 Q&A, Help & Troubleshooting] lotsofish:
The phone might run slightly faster without the syslogcat.log files being written continuously, but hard to say for sure. Those processes never showed much activity on `top`. Battery life seems to be slightly improved though.

I just did `busybox killall logcat` from adb for now, but the best way would be to make the changes to init.rc to not start them up in the first place.