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)

cyrus 2008-12-14 04:32

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by solca (Post 249392)
Thx for all the N800 feedback, I'm looking into this.

For those that DNS doesn't work please try on ADB shell if this fix it:

# setprop net.dns1 <ip>

I'm too investigating the external SD card booting problem, hopefully with all this input we can have a new userspace soon with many fixes ;)

That worked. Thanks.

solca, how can we help out in development. I tried back when the Android source first came out but had absolutely no luck getting the latest kernel to boot on the N810. I would be interested in learning how you went about it.

jcl 2008-12-14 08:05

Re: Another Android port: NITdroid
 
.../etc/resolv.conf
setprop net.dns1, net.wlan0.dns1, ...
none of them seem to work for me ;-(
adding entries to /system/etc/hosts work as expected

zehjotkah 2008-12-14 09:06

Re: Another Android port: NITdroid
 
just some suggestions:
maybe it would be possible to get gps running with the mini gpsd driver. but then we still don't have a map program like google maps...
it would be nice to be able to remap the keyboard layout. like mapping the android home button to the maemo switch/home button.. also it would be possible to change the layout to a different language.
without the android home button, multitasking is not possible.

since android is open source, it is possible to port the android browser to the maemo platform? that would be awesome!
and by the way: i like the name "andronit" also more than "NITdroid"

but at all it's really great and i can't thank you much enough, solca!

jcl 2008-12-14 09:24

Re: Another Android port: NITdroid
 
dns: setprop net.dns1 ... indeed works
(after a full reflash..., prob. must have had some stale entries)

solca: are you already working on startup/shutdown, power management?
/nit/bin/busybox poweroff -f -n does the trick for shutdown, any better solution?

Sevanteri 2008-12-14 11:11

Re: Another Android port: NITdroid
 
I tried the ADB today, and it didn't show my NIT on the list prompted by "adb devices"

Is it possible to use Fanoush' bootmenu to boot either Nitdroid or Maemo?

meizirkki 2008-12-14 12:25

Re: Another Android port: NITdroid
 
No fanoush bootmenu wont work because solcas kernel does not use initfs at all (correct me, if wrong). But solca is working on a new kind of graphical bootselector. http://guug.org/nit/nitselector/

allnameswereout 2008-12-14 13:16

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by cyrus (Post 249380)
I get icmp: operation not permitted.

You must ping as root.

Sevanteri 2008-12-14 16:25

Re: Another Android port: NITdroid
 
Solca, could you maybe concentrate on the bootmenu more?
It would really help. It's not very fun to always have to flash the kernel to get Android running and back to Maemo.

Thesandlord 2008-12-15 00:15

Re: Another Android port: NITdroid
 
Regarding the "Map" application.

It seems as if some guys from OpenMoko managed to rip it from the emulator. I tried to do the same, but probably messed up something.

:) THE FOLLOWING IS FOR INFORMATION PURPOSES ONLY: :)

You need two files:

/system/app/Map.apk
/system/framework/com.google.android.maps.jar

Using ADB, simply "pull" them from the emulator, then "push" them to the tablet.

Please tell me if it works for you...

Thesandlord 2008-12-15 00:39

Re: Another Android port: NITdroid
 
Ok, so this is why it does not work. It need the MapView API.

http://code.google.com/android/toolbox/apis/mapkey.html

Solca, it looks like you have to register with them so you can distribute it. I will see if I can rip it from the emulator though, for a temporary workaround.

Also, it looks like some guys are trying to make as OpenStreet version of MapView API, so we can overcome this obstacle.

Edit: Never mind, it won't be that easy. The OpenStreet program I linked to later does work though...

Bundyo 2008-12-15 01:11

Re: Another Android port: NITdroid
 
Okay, looks like i finally made some progress... I have a framebuffer console on 770 and its working fine up to finding the partition... Waiting for root device... and that's it. Maybe the MMC driver is not initialized properly, but i can't see the messages more than the page above it. Solca, do you know of any way to get them? adb is not working yet :)

cyrus 2008-12-15 02:20

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by allnameswereout (Post 249434)
You must ping as root.

That is what I figured but how do I gain root? What user am I logged in with when Android starts?

Thesandlord 2008-12-15 02:23

Re: Another Android port: NITdroid
 
@cyrus: I was able to ping using adb

Map update: Looks like there is a preview release of Open Street Map Viewer.

Location seems to be very inaccurate, off by a few miles, which I am blaming on the WiFi driver. Remember, there is no GPS yet. Slow in downloading tiles, sometimes crashes. Once again Im blaming the driver.

http://www.anddev.org/openstreetmap_...t2967-s30.html

Also, the WiFi complains about a calibration tool. Says "Device will operate sub-optimal." I am guessing that this is some binary blob, so we can't use it?

jogorman 2008-12-15 02:47

Re: Another Android port: NITdroid
 
Hey all. Just came across this thread today. Looks like you have been up to some really cool stuff.

I did an install on my N810. Running into a problem I did not see anyone report, so I thought I would detail my installation method (to make sure I did not screw something up) and the issues that I am seeing.

To install, I took the 1GB MicroSD card I had, and split it into three partitions. The first is a FAT16 partition set to 128Meg. 2nd is just one sector. 3rd is the rest of the card with a ext3 fs on it. I uncompressed the files (tar -xjpvf /rootfs_nitdroid.tar.bz2) onto it. I then used the flasher from Linux on the N810 (after booting it holding down the application switch button while it was attached to the computer via USB). Flash seemed to go fine. I then was able to put the MicroSD card back in the N810 and boot up android.

Android seems to boot fine, and is very responsive.

On boot, Android reports and error. "Application Settings (in process com.android.settings) is not responding. With options "Force Close" and "Wait". Happens each time.

I am able to connect to a wireless network fine, however no network access appears to work. I tried the "setprop net.dns1 <ip>" Through the devtools->Terminal Emulator. (Is that the right place to try that?) with no luck.

After running for about five minutes, the device turns off. Settings that were changed are saved.

Anyone has any things I should try, of if I did the install wrong, I am all ears. I was a bit confused by the "Internal MMC" instruction. I am assuming that was to mean the slot for the MicroSD slot, as I don't know how to gain access to the internal memory to the level I would be able to reformat/repartition it. So if I got that wrong, please let me know which method I should be taking.

Thanks
Jim

Thesandlord 2008-12-15 03:21

Re: Another Android port: NITdroid
 
@jogorman:

It booted from external SD? WTF? I though it could not...

You do the setprop net.dns1 from adb. Connect the tablet to the computer, go to your adb directory, and type "adb shell" for Windows, "sudo ./adb shell" for Linux. Then, you basically have a kind of Telnet to the tablet.

cyrus 2008-12-15 03:48

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by jogorman (Post 249582)
Hey all. Just came across this thread today. Looks like you have been up to some really cool stuff.

I did an install on my N810. Running into a problem I did not see anyone report, so I thought I would detail my installation method (to make sure I did not screw something up) and the issues that I am seeing.

To install, I took the 1GB MicroSD card I had, and split it into three partitions. The first is a FAT16 partition set to 128Meg. 2nd is just one sector. 3rd is the rest of the card with a ext3 fs on it. I uncompressed the files (tar -xjpvf /rootfs_nitdroid.tar.bz2) onto it. I then used the flasher from Linux on the N810 (after booting it holding down the application switch button while it was attached to the computer via USB). Flash seemed to go fine. I then was able to put the MicroSD card back in the N810 and boot up android.

Android seems to boot fine, and is very responsive.

On boot, Android reports and error. "Application Settings (in process com.android.settings) is not responding. With options "Force Close" and "Wait". Happens each time.

I am able to connect to a wireless network fine, however no network access appears to work. I tried the "setprop net.dns1 <ip>" Through the devtools->Terminal Emulator. (Is that the right place to try that?) with no luck.

After running for about five minutes, the device turns off. Settings that were changed are saved.

Anyone has any things I should try, of if I did the install wrong, I am all ears. I was a bit confused by the "Internal MMC" instruction. I am assuming that was to mean the slot for the MicroSD slot, as I don't know how to gain access to the internal memory to the level I would be able to reformat/repartition it. So if I got that wrong, please let me know which method I should be taking.

Thanks
Jim

I get that

"Application Settings (in process com.android.settings) is not responding."

As well.

jogorman 2008-12-15 03:58

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Thesandlord (Post 249589)
@jogorman:

It booted from external SD? WTF? I though it could not...

That was the only way I knew to partition the file system. Unless I missed something fundamental.

Thanks for the info about the ADB, I will try that tonight and see if that helps.

Jim

jogorman 2008-12-15 05:47

Re: Another Android port: NITdroid
 
Just a quick update, ADB shell was able to let me get online in browser just fine. (Amazing how much faster that is the then standard browser.)

Still crashes the same however, and the DNS settings do not persist between sessions like the other settings I had changed did.

Sevanteri 2008-12-15 07:21

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by jogorman (Post 249609)
Just a quick update, ADB shell was able to let me get online in browser just fine. (Amazing how much faster that is the then standard browser.)

Still crashes the same however, and the DNS settings do not persist between sessions like the other settings I had changed did.

Put your tablet into RD mode.
Code:

flasher --enable-rd-mode
Don't know about the dns though.

solca 2008-12-15 09:51

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Bundyo (Post 249567)
Okay, looks like i finally made some progress... I have a framebuffer console on 770 and its working fine up to finding the partition... Waiting for root device... and that's it. Maybe the MMC driver is not initialized properly, but i can't see the messages more than the page above it. Solca, do you know of any way to get them? adb is not working yet :)

That's good news! Which kernel version have you running?

I don't know how to look above the current page specially if the kernel is panic-ed, I think it's not possible without a serial console. But you can create a script that redirects the output to a file to check later, the catch is that you need a working storage driver, probably the MTD driver works and you can redirect to the initfs or rootfs maemo partitions. You can instruct the kernel which program runs with the init= parameter.

BTW I had done some mistakes on the N800 support, hopefully will finish soon the next kernel and userspace with some finished improvements and bug fixes (dns, home button, etc).

Thanks for all the feedback ppl! :cool:

solca 2008-12-15 09:53

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Thesandlord (Post 249561)
Ok, so this is why it does not work. It need the MapView API.

http://code.google.com/android/toolbox/apis/mapkey.html

Solca, it looks like you have to register with them so you can distribute it. I will see if I can rip it from the emulator though, for a temporary workaround.

Also, it looks like some guys are trying to make as OpenStreet version of MapView API, so we can overcome this obstacle.

AFAICT those keys are for individual applications not for the whole operating system but if you find something interesting please share.

Bundyo 2008-12-15 10:12

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by solca (Post 249625)
That's good news! Which kernel version have you running

The last one... :) Even with the FASTFPE emulation, which probably will speed up the whole 770.

I saw the console file redirection in the kernel config, was just wondering if there is a better way. Can I use the USB to serial convertor and ttyUSB0 to redirect the console output, and more important - how can i receive it :)?

jcl 2008-12-15 11:02

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by jogorman (Post 249609)
Just a quick update, ADB shell was able to let me get online in browser just fine. (Amazing how much faster that is the then standard browser.)

Still crashes the same however, and the DNS settings do not persist between sessions like the other settings I had changed did.

You can make the dns persistent by putting it in /default.prop
(/nit/bin/vi /default.prop ... or pull&push)

meizirkki 2008-12-15 11:12

Re: Another Android port: NITdroid
 
someone booted this up from ext card??? if so, that's why it won't boot when ext-card is in and fs.is on mmcblk0p2 (the internal)...

allnameswereout 2008-12-15 12:49

Re: Another Android port: NITdroid
 
Solca, could you put the Linux kernel 2.6.28 with working WiFi driver online somewhere so we can use it on Maemo as well?

Bundyo 2008-12-15 13:30

Re: Another Android port: NITdroid
 
Probably not yet usable with Maemo :)

chyang 2008-12-15 14:47

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by jcl (Post 249416)
dns: setprop net.dns1 ... indeed works
(after a full reflash..., prob. must have had some stale entries)

solca: are you already working on startup/shutdown, power management?
/nit/bin/busybox poweroff -f -n does the trick for shutdown, any better solution?

try: reboot -p

solca 2008-12-15 15:13

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Bundyo (Post 249629)
The last one... :) Even with the FASTFPE emulation, which probably will speed up the whole 770.

Excellent!

Quote:

I saw the console file redirection in the kernel config, was just wondering if there is a better way. Can I use the USB to serial convertor and ttyUSB0 to redirect the console output, and more important - how can i receive it :)?
The best way to get console output is via the internal serial ports on the NITs, even you get bootloader output, there is no other best way.

I just solder a tiny cable to the TX pad under the battery, GND can be anything in the chassis and both cables connected to a cheap USB to serial convertor dongle on my desktop/laptop based on the FTDI chip (ftdi_sio.ko driver). One has to be careful to use a dongle that matches the voltage on the NIT (3.3V) if not you fry your NIT. This help me a lot in debugging the initial kernels.

But earlier when I didn't have the serial console setup I just select the mini font for the framebuffer console so I can actually see much more output on the screen. :o

solca 2008-12-15 15:21

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by allnameswereout (Post 249655)
Solca, could you put the Linux kernel 2.6.28 with working WiFi driver online somewhere so we can use it on Maemo as well?

Both kernel and driver are already online, the kernel it is the zImage-nitdroid-n8x0 file you download from the NITdroid site and the WiFI driver you can pull it from /system/lib/modules/stlc45xx.ko from the rootfs.

The WiFi driver doesn't work in Maemo because wlancond doesn't speak the mac80211 API so you can't create connections from the GUI although you can make it work from a shell using iwconfig and wpa_supplicant, manually.

daperl 2008-12-15 15:42

Re: Another Android port: NITdroid
 
I'm curious as to why you're using a bleeding edge kernel. What version do already-working Android phones use? It seems that an added variable is unnecessarily being introduced. Or am I missing something? Also, maybe the 2.6.27 Fremantle patches are compatible with Diablo. Do you see where I'm going? My opinion is that you should create a hybrid kernel based on already-running devices.

Does Android use an initfs? If not, maybe it should if it's going to run on Nokia tablets with 2 SDHC slots. Maybe you could more easily capture boot information. You should be able to create a hybrid initfs and bootmenu from the Diablo base. And although we want to be less embedded in the long run, I think talk about a grub-like boot partition is just another vaporware barrier to early usability. Sorry if I'm less informed than I should be; I'm just a proponent of walking before running.

jogorman 2008-12-15 16:06

Re: Another Android port: NITdroid
 
Thanks for the replies.

I have the tablet running with the RD kernel in rd-mode

Code:

./flasher-3.0 --enable-rd-mode -f -k zImage-nitdroid-n8x0_debug -R
And that stopped the crashing. On a side note, I tried rd-mode with the standard kernel, and it was still crashing.

Also, editing default.prop for dns helped. I just put the opendns DNS servers in there and now it it is working fine.

At this point, the device is running in rd-mode with the rd-kernel, the userland is on the SD card, and wifi is working great. The system browses faster then with the default OS and browser. Very good stuff.

I guess the next thing I was going to look around for is someone mentioned an open android market. I will be looking for how to get that installed on here and try out some other applications.

Thanks for all the hard work.
Jim

meizirkki 2008-12-15 16:08

Re: Another Android port: NITdroid
 
@daperl

How many times i have to say this: Solca is making a NEW kind of graohical bootmenu, that will replace fanoushes initfs bootmenu. Be patient :)

Solcas bootmenu will be completely different and able to load different kernels for different operating systems.

it will be _something_ like this: (PS3 bootmenu)

http://ozlabs.org/~jk/projects/petit...reenshot-2.png

Sevanteri 2008-12-15 16:26

Re: Another Android port: NITdroid
 
Man... I hope he would concentrate on the bootmenu more. Really need it. :)

I'm still having problems with my DNS... I have put the setprop net.dns1 into the default.prop, but it still doesn't work.
I would try the ADB, but it just doesn't work. It just says that no device found. And "adb devices" also just prints an empty list.

daperl 2008-12-15 18:00

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by meizirkki (Post 249695)
How many times i have to say this: Solca is making a NEW kind of graohical bootmenu, that will replace fanoushes initfs bootmenu. Be patient :)

Solcas bootmenu will be completely different and able to load different kernels for different operating systems.

Yes, sorry, I didn't mean to imply that I was impatient; quite the contrary. "Old, lazy and experienced" (me) = patient. I am currently not a trailblazer, but sometimes I can recognize a treacherous path that others are on. But not to imply anything in this case.

Anyway, if Solca is close to porting GRUB or something like it, everything I said becomes meaningless and I am 110% behind such a task. Sh*t, then maybe it can be ported to all my USB-equipped routers! I guess what I should have said was that such an effort would take someone's full attention, but they would be rewarded by a binary test result: either a current Maemo OS works the same or it doesn't. When it does, THEN I would say it's time for full-bore Android, or mobile Ubuntu, or whatever. In this scenario you would increase your tester base and thus porting alternative kernels/OS's would probably accelerate.

cyrus 2008-12-15 18:22

Re: Another Android port: NITdroid
 
Quote:

Originally Posted by Thesandlord (Post 249330)
Yes, you can use PPP through USB using the ADB. Look at them acronyms fly!

In other news, the aKeyUI app works, so there is virtual keyboard support for N800!
The unofficial market apps work, but is there any way to put on the real market?

I installed this application (I think) but I don't get a virtual keyboard. Is there some other setup that is required?

kender 2008-12-15 23:51

Re: Another Android port: NITdroid
 
Thanks for all the work Solca!

I tried installing third-part apps and I wasn't very successful. I tried downloading them directly from the browser and installing, but Android crashes. I also tried with ADB (adb install yourpackage.apk) but it crashed too.

logcat says,

E/PackageManager( 671): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 671): Uncaught handler: thread PackageManager exiting due to uncaught exception
E/AndroidRuntime( 671): *** EXCEPTION IN SYSTEM PROCESS. System will crash.

but taking a closer look at it, I found that the packets are in /sdcard/downloads/ as expected. I don't know where else it might want to create them.

Any clue?

Thanks in advance

Thesandlord 2008-12-16 00:03

Re: Another Android port: NITdroid
 
@cyrus - I don't know, it worked for me. I installed through the device, not adb if that helps.

@kender - How big are your partitions? I have a 1 GB partition for Android, 1 GB for FAT32. 3rd Party apps work fine.

This experience with adb has showed my how crappy the windows cmd program is. After working with Terminal in Linux, there is no way you can use cmd in Windows.

kender 2008-12-16 00:26

Re: Another Android port: NITdroid
 
# df
/: 404502K total, 90592K used, 313910K available (block size 1024)
/: 404502K total, 90592K used, 313910K available (block size 1024)
/dev: 62984K total, 0K used, 62984K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/nit/initfs: 4096K total, 2620K used, 1476K available (block size 4096)
/sdcard: 1018088K total, 412K used, 1017676K available (block size 4096)
/nit/initfs/tmp: 62984K total, 4K used, 62980K available (block size 4096)

I did:
- 1 Gb 1st partition FAT32 (aka. /sdcard I understand)
- 512 Mb 2nd partition FAT32 (not used, I guess)
- 512 Mb 3rd partition ext3 (root (/) of the system I believe)

Sounds like enough to me.
It is a N810 without an external minisd card and with the internal one formatted that way.

Thanks for your interest

Thesandlord 2008-12-16 00:49

Re: Another Android port: NITdroid
 
Why don't you delete the 2nd FAT32 partition, and grow the ext3?

So
1GB - FAT32
7MB - Unallocated
1GB - ext3

Maybe Android is getting confused which partition to mount (yeah, not likely, but...)

solca 2008-12-16 02:06

Re: Another Android port: NITdroid
 
Hi!

I upload a new kernel and userspace, it fixes some problems reported here (DNS, Home button, etc.) I made several mistakes in the N800 support, hopefully it will be closer to work on those devices.

I'm refactoring the userspace so new NITdroid releases are more in line with the new (unreleased) selector and with user persistent settings (/data). Too this refactoring will permit live updates.

In the meantime report something :D

Enjoy!


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

vBulletin® Version 3.8.8