maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   [Android] Another Android port: NITdroid (https://talk.maemo.org/showthread.php?t=25410)

Chinpokomon 2008-12-23 07:23

Re: Another Android port: NITdroid
 
Hey! I'm taking this back to the store, the accelerometers don't seem to be working! ;-)

Bundyo 2008-12-23 07:28

Re: Another Android port: NITdroid
 
:)

This one doesn't seem to freeze anymore. The source of the freezes turned out to be again the media framework - it freezes when it tries to scan the mmc for music. Renamed it in the driver config to workaround the scan. :)

http://bundyo.org/maemo/nitdroid/nit...081223.tar.bz2

Chinpokomon 2008-12-23 07:49

Re: Another Android port: NITdroid
 
I'll give that a go and then I have to call it quits tonight. I just tried to boot into Windows and connect with the device, since I have my Eclipse environment already setup there, but it seems confused on how to handle "Android".

I suspect that booting back into Linux, I'll be able to remotely terminal in as root just like RC28 root access hack, and then I'll be able to remotely start hacking around the OS. That should give us better control of the environment than just watching logcat.

Bundyo 2008-12-23 07:56

Re: Another Android port: NITdroid
 
Read the Apps thread for the windows adb driver problems... Can be solved though. :)

On 770 adb is not much reliable since the low-memory killer sweeps it occasionally... :)

Chinpokomon 2008-12-23 08:14

Re: Another Android port: NITdroid
 
Hmmm, I went to try the notepad: Error loading keycharmap file '/system/usr/keychars/omap-keypad.kcm.bin'. hw.keyboards.0.devname='omap-keypad'...

Definitely better, but I still managed to lock it up. ;-) Not in notepad, just in using the device. :-)

Chinpokomon 2008-12-23 08:17

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Bundyo (Post 251941)
On 770 adb is not much reliable since the low-memory killer sweeps it occasionally... :)

That explains on of the things I've been seeing. :-D Ok, seriously, I'm done for now. But great start. It may not be ready for most people just yet, but it is just about right for me. Plenty to mess around with, but nothing that would be considered a complete waste of time.

Bundyo 2008-12-23 08:21

Re: Another Android port: NITdroid
 
About the charmap error - try to copy the Internal_keypad.kcm.bin as omap-keypad.kcm.bin - its in the same folder.

And while we are at it - Solca, can you get these two files in the next userspace? :) omap-keypad.kl and omap-keypad.kcm.bin are just a copy of the n8x0 ones. You can probably symlink them too.

meizirkki 2008-12-23 09:06

Re: Another Android port: NITdroid
 
i think home-screen is not very cool with this resolution.. you can only add like 4 icons to the bottom row

Chinpokomon 2008-12-23 09:49

Re: Another Android port: NITdroid
 
I lied when I said I was calling it quits. :-) As with all new toys I had to see what I could do. That said, I learned a lot just using the interactive shell of adb. I tried to install busybox, but it is compiled for a different kernal (as I should have guessed). :-(

That's the next step I think. With the added goodness of busybox, I could do a lot more I think. Unfortunately xda forums seem down at the moment which is where I believe they've been working on it. If I could get the sources for android and cross compile them for this kernel, I think it would work.

I made a symbolic link to that Internal keymap file and I get the OSK, so that is big for making this work on the 770. Screen cap to follow!

Chinpokomon 2008-12-23 09:57

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Chinpokomon (Post 251953)
Screen cap to follow!

http://img389.imageshack.us/img389/2952/oskbu4.png

Cupcake OSK on the n770! :-D

meizirkki 2008-12-23 11:06

Re: Another Android port: NITdroid
 
How did you take the screenshot?

costin 2008-12-23 16:20

Re: Another Android port: NITdroid
 
Great work. Tested on 770, last kernel seems much better.
Few issues:
- according to logcat, it tried to load qwerty.kl as keymap, and it had wrong keys. I used testev to generate this:
Code:

key 62    MENU              WAKE_DROPPED
key 63  HOME              WAKE
key 1  BACK              WAKE_DROPPED
key 105  DPAD_LEFT        WAKE_DROPPED
key 106  DPAD_RIGHT        WAKE_DROPPED
key 108  DPAD_DOWN        WAKE_DROPPED
key 103  DPAD_UP          WAKE_DROPPED
key 28  DPAD_CENTER      WAKE_DROPPED

- there is a busybox in nit/bin, it also has 'swapon' applet - I set the second partition as swap, this seems to improve the stability a bit. I also used 'developer settings' to keep only last 2 activities, also seems to help a bit.

- adb is still a bit unstable, and the device reboots from time to time.

- Any chance to get at least bluetooth working ( i.e. include pan, etc in the kernel ) ? I tried hciconfig, it complains about a missing firmware - I guess it's in the original rootfs, I'll try to get it from there. I have a bt keyboard - hid would be nice too.

Bundyo 2008-12-23 16:31

Re: Another Android port: NITdroid
 
There is bluetooth support in the kernel for the right chip, dunno if Android supports it though. Maybe Solca can tell us more how or if did he got it to run? :)

As for qwerty.kl - there is a second file with the kernel archive - omap-keypad.kl, you should place it in /system/usr/keylayout/ (or symlink the Internal_keypad.kl). Do the same for Internal_keypad.kcm.bin in /system/usr/keychars/ (you should symlink it as omap-keypad.kcm.bin

Adb is unstable due to low memory. Maybe when Solca does the stripped userspace (we don't need 1.2MB phone service at all :) and some more too).

meizirkki 2008-12-23 16:33

Re: Another Android port: NITdroid
 
For me, bluetooth always refuses to start..

bhaskar 2008-12-23 17:37

Re: Another Android port: NITdroid
 
Great Job!

I could not connect to wifi access point with MAC filter.

Bundyo 2008-12-23 17:40

Re: Another Android port: NITdroid
 
Which device?

770 doesn't have wifi yet :)

bhaskar 2008-12-23 17:50

Re: Another Android port: NITdroid
 
Sorry.. I mean in N810 i could not connect to wifi access point with MAC filter, if I disable MAC filter i could connect.

memson 2008-12-23 19:15

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by bhaskar (Post 252073)
Sorry.. I mean in N810 i could not connect to wifi access point with MAC filter, if I disable MAC filter i could connect.

Unless you put the binary config tool on the FAT partition, so Android installs it, the MAC address uses a default value, which is something like 00-02-ee-c0-ff-ee (look back in the thread, search for my username - I wrote a message about it.)

Chinpokomon 2008-12-24 02:04

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by meizirkki (Post 251965)
How did you take the screenshot?

Very carefully. ;) You can screen capture from the Android SDK, which is using ADB to connect to the device. Unfortunately, as Bundyo has mentioned, the 770 is memory constrained, so even trying to connect using ADB is tricky; trying to get the screen capture requires lots of crossed fingers and chanting.

I suspect one of the first tasks to make this stable on the 770 will be to implement some sort of swap file. If the memory architecture hasn't been altered too far from a stock Linux build, that might not be too difficult to do. I haven't looked into it yet, but I hope to find some time in the next couple weeks to see what is there and find out what is possible.

Chinpokomon 2008-12-24 02:09

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by costin (Post 252051)
Great work. Tested on 770, last kernel seems much better.

Thanks for the info there, that was basically the route I was going to take. I'm a little disappointed to hear that swapon hasn't improved stability; especially WRT ADB.

costin 2008-12-24 04:21

Re: Another Android port: NITdroid
 
After few more hours of playing with 770 - most apps work, the browser is the exception, if I start it - it all dies. Can't see what's going on since adb is dead long before. It may be worth disabling the OOM handler, or changing the settings in init.rc. Most of the times I do 'ps' and adb just breaks in the middle.

Next thing I'll try is change init.rc to not start anything except adb, so I can figure out bluetooth. hciconfig complains about firmware not found, and I'm sure it's in the normal partition. Pan is probably easiest to setup in a script, and if it works it'll provide an alternative connection path.

It doesn't seem much slower than the G1, and the screen size makes up for it.

Chinpokomon 2008-12-24 08:00

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by costin (Post 252192)
After few more hours of playing with 770 - most apps work, the browser is the exception, if I start it - it all dies.

I spent a little more time on this tonight. I installed busybox:
Code:

# mkdir /data/busybox
# /nit/bin/busybox --install

I then modified my /init.rc to include this directory in my path. I put it at the end, so the system/bin files get picked up first, but if there was something missing, it no longer causes me as much grief.

The flash card I'm using had 4 partitions: 1 vfat, and 3 ext2. As per installation instructions, I reformated one of the partitions as ext3. I think this should be reconsidered. Ext3 partitions are not ideally suited for flash drives at all, since the journal is busy doing its thing.

I also cleared the 4th partition and made it swap. This is not suited for flash drives either, but I am overlooking that for the moment since this device is memory constrained. I added to the end of the boot section of init.rc, swapon -a, and added the swap partition to an /etc/fstab file. Swap is now on as clearly evidenced by cat /proc/swaps, but that doesn't prevent all lockups. I tried to initially create it as a swapfile in /sdcard/swap/swap.img, or thought I might be able to create a swapfile on a yaffs2 partition to make the wear a little more level, and although I was able to create the file there, swapon wouldn't mount it.

Code:

# free
              total        used        free      shared      buffers
  Mem:        61208        56400        4808            0          360
 Swap:      383992        21312      362680
Total:      445200        77712      367488

I don't think this is the biggest contributor to stability for me. What seems to have worked was disabling animations, limiting the system to Max 1 App Process, and Immediately Destroying Activities in the Development Settings screen.

The browser doesn't seem to be a problem for me, which is why I quoted costin in the first place. I do not have any (repeatable) problems. I can start the browser and view the "page cannot be found" screen. Unfortunately because the 770 doesn't have wifi yet I don't have a way to really test this... tunneling over USB maybe? ADB has a ppp command, but I can't really figure out what I'm supposed to do there. Of Linux, GPRS Phones, Serial Cable, Irda, Bluetooth and USB looks promising, but the USB connection is going the wrong way. For some reason, it seems everyone wants to connect their PCs to their Cell Phone radio stack and not the other way around. :)

I have experienced lockups, but after the aforementioned changes, most things have improved significantly and I can't say it is a result of doing X or Y. When I can't get ADB to connect to the device anymore, it is usually because the USB port on my PC is somehow messed up; use the following to fix it:
Code:

$ sudo modprobe -vr ehci_hcd && sudo modprobe -v ehci_hcd

rasmithuk 2008-12-25 10:08

Re: Another Android port: NITdroid
 
I'm not sure if this is the right place to report this but I think the touch screen pressure code is backwards (or google picked an odd way to represent it).
If you go to 'Dev Tools' > 'Pointer Location' the current pressure is displayed at the top of the screen. Now I'm assuming that this is scaled from 0 to 1 with 1 being as higher force as possible. However on my n800 the harder I push the closer to 0 the value goes.
This does explain why the on-screen keyboard is a bit odd to use with multiple key presses being detected for no reason. I'm guessing the pressure calibration code still needs tweaking.

solca 2008-12-25 20:44

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Bundyo (Post 251947)
And while we are at it - Solca, can you get these two files in the next userspace? :) omap-keypad.kl and omap-keypad.kcm.bin are just a copy of the n8x0 ones. You can probably symlink them too.

kcm files are not needed for the N700/N800 keypad, they are used for letter variations and these keypad lacks letters... if it loads the default qwerty.kcm.bin that's correct, as for the omap-keypad.kl file it is included now in my working copy and will appear in the next NITdroid release but a complete evtest output on N700 will be useful to determine if exactly the same keycodes apply. Thx!.

Quote:

Originally Posted by Chinpokomon (Post 252220)
As per installation instructions, I reformated one of the partitions as ext3. I think this should be reconsidered. Ext3 partitions are not ideally suited for flash drives at all, since the journal is busy doing its thing.

That's true for MTD devices but not for MMC/SD cards that do hardware wear leveling, in fact EXT3 with noatime option (as NITdroid do) is fine and is much better than the default FAT partitions (which have fixed locations for the file allocation tables) and even FAT is not remotely a problem on MMC/SD cards.

But the opposite as per your suggestion, using flash filesystems (YAFFSx, JFFSx, UBI, etc.) on wear leveling devices can be slow, useless and maybe harmful if it happens that the hardware wear leveling is invalidated by the software filesystem wear leveling.

Quote:

Originally Posted by rasmithuk (Post 252465)
I'm not sure if this is the right place to report this but I think the touch screen pressure code is backwards (or google picked an odd way to represent it).
If you go to 'Dev Tools' > 'Pointer Location' the current pressure is displayed at the top of the screen. Now I'm assuming that this is scaled from 0 to 1 with 1 being as higher force as possible. However on my n800 the harder I push the closer to 0 the value goes.
This does explain why the on-screen keyboard is a bit odd to use with multiple key presses being detected for no reason. I'm guessing the pressure calibration code still needs tweaking.

That's an interesting discovery, I'm looking into integrating tslib for the next release and use the calibration data used in Maemo for this, can this be helpful?

(BTW next release is near... ;) )

Bundyo 2008-12-25 20:59

Re: Another Android port: NITdroid
 
Solca, i managed to compile cx3110x for the new kernel but the device hangs on loading it... Where should i put the firmware and could you include support for it in libhardware? umac.ko should be loaded first and cx3110x.ko after it, but i'm not sure when and how the firmware should be loaded. I can send you the modules and the firmwares are located in initfs in

/usr/lib/hotplug/firmware

(should be the same place for you) along with brf6150 firmware (which is the bluetooth chip in 770).

The firmware for the wifi chip is 3825.arm, for bluetooth is brf6150fw.bin.

solca 2008-12-25 21:55

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Bundyo (Post 252549)
Solca, i managed to compile cx3110x for the new kernel but the device hangs on loading it... Where should i put the firmware and could you include support for it in libhardware? umac.ko should be loaded first and cx3110x.ko after it, but i'm not sure when and how the firmware should be loaded. I can send you the modules and the firmwares are located in initfs in

/usr/lib/hotplug/firmware

(should be the same place for you) along with brf6150 firmware (which is the bluetooth chip in 770).

The firmware for the wifi chip is 3825.arm, for bluetooth is brf6150fw.bin.

That's pretty cool!

In the stlc45xx.ko case the firmware is loaded when the interface is bringed up (netcfg wlan0 up), firmware are loaded in Linux kernels by the hotplug mechanism that in Android is handled by init, firmware in Android must be placed in /etc/firmware but that is already handled by NITdroid with a symlink to initfs' /usr/lib/hotplug/firmware so I'm pretty sure in your case it must be something else.

chyang 2008-12-26 00:42

Re: Another Android port: NITdroid
 
Is there some one looking at the rtc issue? It seems that the clock in the statusbar cannot be updated correctly.

cyrus 2008-12-26 20:35

Re: Another Android port: NITdroid
 
solca:

In your post above you said next release is near...can you give us a quick teaser of what might be in this release?

thanks for all your hard work.

solca 2008-12-28 04:37

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by cyrus (Post 252687)
solca:

In your post above you said next release is near...can you give us a quick teaser of what might be in this release?

thanks for all your hard work.

First merry Xmas and happy holidays to all, sorry for being absent, I have been "forced" :mad: to be AFK, hopefully I'll finish the next release RSN.

For this release is better power management, working clock, fix (again) wifi scanning, size reductions to please Bundyo and N770 tablets, some speed improvements, final 2.6.28 kernel, Android compiled for MID policy instead of phone policy, a new option in the power button menu to boot to Maemo and the last thing (which I'm working right now) is the browser cookies thing.

EDIT: Too, it must include all the hard work from Bundyo for N770/N800 tablets.

cyrus 2008-12-28 05:00

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by solca (Post 252937)
First merry Xmas and happy holidays to all, sorry for being absent, I have been "forced" :mad: to be AFK, hopefully I'll finish the next release RSN.

For this release is better power management, working clock, fix (again) wifi scanning, size reductions to please Bundyo and N770 tablets, some speed improvements, final 2.6.28 kernel, Android compiled for MID policy instead of phone policy, a new option in the power button menu to boot to Maemo and the last thing (which I'm working right now) is the browser cookies thing.

EDIT: Too, it must include all the hard work from Bundyo for N770/N800 tablets.

Awesome man. Amazing how you can do all this stuff. I have tried but it is way above my computer knowledge. Any plans for sound? Or is that pretty difficult to implement?

Thesandlord 2008-12-28 06:21

Re: Another Android port: NITdroid
 
Sorry, but what is "MID policy." A quick google search did not come up with any hits... Im guessing this will remove the phone parts? So its will be faster?

I am truly amazed at the speed this project is progressing...

mrp 2008-12-28 09:24

Re: Another Android port: NITdroid
 
wifi for 770 yet?

memson 2008-12-28 10:14

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Thesandlord (Post 252951)
Sorry, but what is "MID policy.".

Mobile Internet Device - i.e. NIT type/class device.

marce_245 2008-12-28 19:00

Re: Another Android port: NITdroid
 
Does anybody know if the google street viewer works with this port?

meizirkki 2008-12-29 09:22

Re: Another Android port: NITdroid
 
Google Maps (as an app) does not work. yet :)

maxkilla 2008-12-29 21:47

Re: Another Android port: NITdroid
 
google maps w/street view works on my n800

zehjotkah 2008-12-29 21:48

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by maxkilla (Post 253297)
google maps w/street view works on my n800

as the android app, or in the browser?

maxkilla 2008-12-29 23:55

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by zehjotkah (Post 253298)
as the android app, or in the browser?

as a android app :)

Thesandlord 2008-12-30 00:05

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by maxkilla (Post 253326)
as a android app :)

Care to explain? I thought only devices that were signed could download data from the Maps server, thus the need to use Open Street as an alternative.

You know you want to tell....;)

chyang 2008-12-30 00:10

Re: Another Android port: NITdroid
 
You need to put the Maps.apk under /system/app, as an ordinary app, it doesn't have the right access permission to network.


All times are GMT. The time now is 23:17.

vBulletin® Version 3.8.8