Welcome, Guest

Author Topic: Android 4.1 Jelly Bean  (Read 17594 times)

murerten

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +3/-1
Android 4.1 Jelly Bean
« on: September 22, 2012, 10:56:29 AM »
Hi. I have my A13-Wifi-Dev working with vga fix and everythings fine right now. I wonder if there will be support for android 4.1 jelly bean. Because there are important improvements like usb keyboard layout settings and on this device it is important I think. Even though if you won't support it, can you point me to any documents and sources for it? Thank you for this great product.

Update 25.09.2012
-----------------

There was no reply so at least I tried android 4.0 to learn how to compile an image, so let me share...

First I setup a brand new ubuntu 12.04 for building android. I installed the packages explained for 12.04 from source.android.com. Then installed oracle jdk applying the instructions from http://blog.markloiseau.com/2012/07/how-to-compile-android-on-ubuntu-12-04/. Then downloaded A13-SDK from https://docs.google.com/open?id=0B-bAEPML8fwldWIzY29GNDJ2ZW8 (2.3GB). Then compile the image. (there is readme in a13-sdk) There were problems but Mark Loiseau gave the solutions on his blog.

After that to flash the image I downloaded livesuit 1.09. Started livesuit, selected image. To start the board in flash mode I first powered it, then shutdown android. Then pushed volume+ button for 3 seconds, pushed power button 3 seconds, released volume+ button, and released power button. Connected board to my computer from usb on-the-go. Installed the driver from livesuit directory. Then successfully flashed my board.

When I powered on the board, the vga was not working, and still not working :( But android starts. (I know because I can see the filesystem from eclipse)

So I guess I have to wait now for the official documentation.
« Last Edit: September 25, 2012, 04:51:27 PM by murerten »

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1967
  • Karma: +50/-3
Re: Android 4.1 Jelly Bean
« Reply #1 on: September 26, 2012, 09:50:49 AM »
Hello there,

You have to edit the configuration file of the Android to make it suitable for the A13. Still good job on the testing. I've updated the manual with some instructions (under Windows though) you might want to check them if that would give you ideas: https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/resources/A13-OLINUXINO-revision_D.pdf (page 11).

Regards,
Lub/OLIMEX

EDIT: Updated the configuration file and download location in the manual
« Last Edit: September 26, 2012, 11:49:53 AM by lubolimex »
Technical support and documentation manager at Olimex

murerten

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +3/-1
Re: Android 4.1 Jelly Bean
« Reply #2 on: September 26, 2012, 03:02:40 PM »
Thank you Lub. Changing the script.bin worked. Everything seem to work fine now.

Murat
« Last Edit: November 15, 2012, 05:00:56 PM by murerten »

David Goadby

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +2/-0
Re: Android 4.1 Jelly Bean
« Reply #3 on: November 15, 2012, 03:52:27 PM »
I see that you managed to compile and load a 4.0 system. Did ever progress to 4.1?

murerten

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +3/-1
Re: Android 4.1 Jelly Bean
« Reply #4 on: November 15, 2012, 04:57:31 PM »
I wish I had  :( I had fetched the 4.1 from AOSP. Then started to port custom code from 4.0 to 4.1. But as soon as I started porting I realised that it is far from easy. First there are many differences between 4.0 and 4.1 official code. And there are many code for allwinner like ethernet, mali, hdmi. There are lots of hardware centric code and I understand non of it. It is way too complicated for me. Now I understand why phone manufacturers can't make an update to 4.1 easily. But I thank we have at least a working 4.0 sdk.

David Goadby

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +2/-0
Re: Android 4.1 Jelly Bean
« Reply #5 on: November 16, 2012, 03:36:37 AM »
Thanks for the update.

I know that 4.1 was quite a jump and 4.2 is an ever larger one. Since you managed to get 4.0 working I will have a closer look at the source to see where I can make changes to lock the GUI down. I have nothing to lose except my sanity... ;-)

olimex

  • Administrator
  • Hero Member
  • *****
  • Posts: 813
  • Karma: +22/-3
Re: Android 4.1 Jelly Bean
« Reply #6 on: January 15, 2013, 12:40:16 PM »
I just got confirmation from Allwinner thay they have Jelly Bean for A13 and will send me new Android image next week :)
as soon I have it will update Wiki

murerten

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +3/-1
Re: Android 4.1 Jelly Bean
« Reply #7 on: January 15, 2013, 02:57:17 PM »
Great news!!! Thank you.

olimex

  • Administrator
  • Hero Member
  • *****
  • Posts: 813
  • Karma: +22/-3
Re: Android 4.1 Jelly Bean
« Reply #8 on: January 15, 2013, 04:18:05 PM »
another hidden "feature" is that Allwinner software developer just confirmed that Android can boot from SD-card too and send me some description on Chinese and scripts.
I upload them on GitHub in case somebody can read them and can do something useful with them :)

https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/ANDROID-SCRIPTS-TFCARD
« Last Edit: January 15, 2013, 04:24:36 PM by olimex »

JohnS

  • Hero Member
  • *****
  • Posts: 1725
  • Karma: +33/-48
Re: Android 4.1 Jelly Bean
« Reply #9 on: January 15, 2013, 04:36:12 PM »
The A13 (and A10 etc) seems to have a generalised boot procedure so I expect any OS can be booted.

With "some" effort... LOL

(and with or without u-boot)

John

olimex

  • Administrator
  • Hero Member
  • *****
  • Posts: 813
  • Karma: +22/-3
Re: Android 4.1 Jelly Bean
« Reply #10 on: January 15, 2013, 04:46:57 PM »
this is correct, the problem is that Allwinner bootloader proprietary, also they use some proprietary packing tools for the Andorid :(

this is the reason we can't make NAND bootable Linux image until Henrik complete NAND support in uboot

neither we knew it's possible to make Android image which to be SD-card bootable!

JohnS

  • Hero Member
  • *****
  • Posts: 1725
  • Karma: +33/-48
Re: Android 4.1 Jelly Bean
« Reply #11 on: January 15, 2013, 05:01:42 PM »
I got these (pasted after each other)...

John

-------FROM babelfish / bing-----

Card start programme added for android4

Description: this paper mainly introduces the NAND programmes on the basis of modified method of starting the programme.

Adds a new scenario
1) first of all, found the original NAND solution directory, and place a copy, and rename.
Example: place a copy and rename the crane-eVB directory to crane-evb_mmc (be sure to "_mmc" suffix)
2) then renames the directory < scheme name >mk,vendorsetup.sh,AndroidProducts.mk,package.sh,BoardConfig.mk as well as recovery/Android.mk these 6 files and programme names of characters in the character of the programme. (Note here-and _)
Example: in the crane_evb.mk,AndroidProducts.mk,vendorsetup,recovery/Android.mk,package.sh file (including the file name) crane-eVB to crane-evb_mmc and crane_evb to crane_evb_mmc
---Simple practice: comparison can refer to the EVB_MMC programme changes.
After completing the second step, under the Android implementation
souce build/envsetup.sh
lunch
You can see the programme that you have added.

Activate the programme will modify
1) Firstly, modify the init.sunXi.rc and ueventd.sunXi.rc files, MMC replaces the NAND partition as the partition.
Partition table
nanda —— mmcblk0p2
nandb —— mmcblk0p5
nandc —— mmcblk0p6
nandd —— mmcblk0p7
nande —— mmcblk0p8
nandf —— mmcblk0p9
。。。。。。 (Since both sides are adding increments of 1)

Then in the init.sunXi.rc
format_userdata /dev/block/nand........
This removed or commented out.
Then add
exec /system/bin/busybox mount -t vfat /dev/block/mmcblk0p1 /mnt/sdcard
2) and then modify the Vold.fstab file
On the file to read as follows
Before:

dev_mount sdcard /mnt/sdcard auto /devices/virtual/block/nandi
dev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_host

The modified;
dev_mount sdcard /mnt/sdcard auto /devices/platform/sunxi-mmc.0/mmc_host
dev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host

Sunxi-MMC later here depending on the numeric value (if cards are 2 startup needs to this
dev_mount sdcard /mnt/sdcard auto /devices/platform/sunxi-mmc.2/mmc_host
dev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_host

If the card controller there is less than 3 months, please consult the technical support personnel for modifications.
Note: modifying the error here may lead to external card mount fail, have small machines and PC USB connection or the connection fails.

---Simple practice: just init.sun4i.RC ueventd.sun4i.RC and Vold.fstab than the right, replace. Download files than FTP.

3) if the build needs to support us with firmware modification tool, you need to create a file named preinstall.sh.
Writes the following contents in the file:
#!/system/bin/busybox sh

echo "do preinstall job"
BUSYBOX="/system/bin/busybox"
BOOT_MEDIA="nanda"
if [ ! -e /data/system.notfirstrun ]; then
/system/bin/sh /system/bin/pm preinstall /system/preinstall
# copy android modify tool files
mkdir /mnt/nanda
if [ -e /dev/block/mmcblk0p2 ]; then
BOOT_MEDIA="mmcblk0p2"
fi
mount -t vfat /dev/block/$BOOT_MEDIA /mnt/nanda
# $BUSYBOX cp /mnt/nanda/vendor/initlogo.rle /
$BUSYBOX cp /mnt/nanda/vendor/system/build.prop /system/
$BUSYBOX cp /mnt/nanda/vendor/system/media/bootanimation.zip /system/media/
$ cp /mnt/nanda/vendor/system/usr/keylayout/*.kl /system/usr/keylayout/
sync
umount /mnt/nanda
rmdir /mnt/nanda
$BUSYBOX touch /data/system.notfirstrun
fi
echo "preinstall ok"

3, add uboot profile
1) copy and rename the original NAND in lichee/tools/pack/chips/sunXi/configs/crane programme,
Example: eVB copy and rename to evb_mmc
2) to copy the env.cfg from the lichee/tools/pack/chips/sunXi/configs/crane/default directory to the new directory,
And then do the following modifications
Before:
setargs=setenv bootargs console=${console} root=${nand_root} init=${init} loglevel=${loglevel}
boot_normal=nand read 40007800 boot;boota 40007800
boot_recovery=nand read 40007800 recovery;boota 40007800
Revised:
setargs=setenv bootargs console=${console} root=${mmc_root} init=${init} loglevel=${loglevel}
boot_normal=mmc read 40007800 13800 10000;boota 40007800
boot_recovery=mmc read 40007800 recovery;boota 40007800
---Simple practices, copy env.cfg file to/tools/pack/chips/sunXi/conifgs/crane/programmes directly in the _mmc directory. Env.cfg files can be downloaded in FTP.

3) adds a new sysconfig1.FEX file in the directory, start the controller of detmode distribution for the corresponding card 3
Such as:
[mmc0_para]
sdc_used = 1
sdc_detmode = 3
So make sure your start card first to be mounted by the system.
4) adds a new directory in the sysconfig1.FEX file, stored in forms to 1 or 2 (0 represents the NAND boot, 1 for card0 starts, 2 for card2 to start)
storage_type = 1

5) card start definition in the sun5i.A13.h file in the Z:\workspace\atest\lichee\u-boot\include\configs #define CONFIG_MMC_SUNXI_SLOT changes, such as
#define CONFIG_MMC_SUNXI_SLOT 0 /* which mmc slot to use, could be 0,1,2,3 */
Which corresponds to 0 card0 and card1 corresponding to 1, and so on.

4, compiled Linux BSP

Currently UBOOT Adaptive NAND and MMC starts, customer to update to Android V1.5 version 4.
5, by PhoenixCard burn a detachable boot card
Through the USB port on the PC to which pluggable cards burn PhoenixCard sdmmc card can be used as a boot card.
During burn operation
Burn the firmware using the PhoenixCard tool, the tool zip file in the lichee/tools/tools/tools_win directory (green version, after extraction can be used without having to install).

Extract after the PhoenixCard.exe, you can see the following diagram interface

Figure 2.1
Click on the image button, select that you want to burn it to a card firmware

Figure 2.2
Click on the cards start in front of a small circle

Figure 2.3
Insert a start card (this step can be at any time before you click the burn operation)

Figure 2.4
Click on burn all buttons are inoperable by blur at this point know burn complete

Figure 2.5
After the burn is complete click the eject

Figure 2.6
Will launch the card into the card slot, restart small machine, run small machines to function properly.


-------FROM google-----

Card Start Programme for android4 V1.5
Summary: This article introduces to modify in nand programs based on a card startup programs.

Add a new program
1) First, find the the original nand program directory, place a copy, and rename.
Example: crane-evb catalog copy and rename the crane-evb_mmc (must _mmc "suffixes in situ)
2) then rename 6 the directory <program name> mk vendorsetup.sh, AndroidProducts.mk package.sh, BoardConfig.mk, and recovery / Android.mk file and program names, like the character the as the character of the same name as the name of the program. (Pay attention to - and _)
Example: crane-evb crane_evb.mk, AndroidProducts.mk, vendorsetup, recovery / Android.mk, package.sh file (including the file name) are changed to the crane-evb_mmc and crane_evb changed crane_evb_mmc
--- Simple approach: do compared modify can refer EVB_MMC programs.
After completing the second step, the android directory
souce build / envsetup.sh
lunch
You can see the programs add their own.

Program card changes start
1) First, to modify init.sunXi.rc ueventd.sunXi.rc file which NAND partition replace the partition of the mmc.
Partition Table
nanda - mmcblk0p2
nandb - mmcblk0p5
nandc - mmcblk0p6
nandd - mmcblk0p7
nande - mmcblk0p8
nandf - mmcblk0p9
. . . . . . (Since then, both sides are added in increments of 1)

Then the init.sunXi.rc in
format_userdata / dev / block / nand ........
Delete or comment out this line.
Then add
exec / system / bin / busybox mount-t vfat / dev/block/mmcblk0p1 / mnt / sdcard
2) then modify vold.fstab file
Modifications of this file is as follows
Before the amendment:

dev_mount sdcard / mnt / sdcard auto / devices / virtual / block / nandi
dev_mount extsd / mnt / extsd auto / devices/platform/sunxi-mmc.1/mmc_host / devices/platform/sunxi-mmc.0/mmc_host

Modified;
dev_mount sdcard / mnt / sdcard auto / devices/platform/sunxi-mmc.0/mmc_host
dev_mount extsd / mnt / extsd auto / devices/platform/sunxi-mmc.1/mmc_host

The sunxi-mmc behind the figures are based on the specific numerical (if card 2 start so need to be changed to the following
dev_mount sdcard / mnt / sdcard auto / devices/platform/sunxi-mmc.2/mmc_host
dev_mount extsd / mnt / extsd auto / devices/platform/sunxi-mmc.1/mmc_host / devices/platform/sunxi-mmc.0/mmc_host

If the card controller is not enough for three, consult your technical support staff to be modified.
Note: Modify the error could lead to an external card mount failed, the already small machine and the PC can not be usb connection or connection fails.

--- Simple approach: simply init.sun4i.rc ueventd.sun4i.rc vold.fstab comparison, can be replaced. FTP download matching files.

3) the generated firmware firmware modification tools needed support we provide, you need to create a new a file named preinstall.sh.
In the file, write the following:
#! / System / bin / busybox sh

echo "do preinstall job"
BUSYBOX = "/ system / bin / busybox"
BOOT_MEDIA = "nanda"
if [!-e / data / system.notfirstrun]; then
/ System / bin / sh / system / bin / pm preinstall / system / preinstall
# Copy android modify tool files
mkdir / mnt / nanda
if [-e / dev/block/mmcblk0p2]; then
BOOT_MEDIA = "mmcblk0p2"
fi
mount-t vfat / dev / block / $ BOOT_MEDIA / mnt / nanda
# $ BUSYBOX cp / mnt / nanda / vendor / initlogo.rle /
$ BUSYBOX cp / mnt / nanda / vendor / system / build.prop / system /
$ BUSYBOX cp / mnt / nanda / vendor / system / media / bootanimation.zip / system / media /
$ Cp / mnt / nanda / vendor / system / usr / keylayout / *. Kl / system / usr / keylayout /
sync
umount / mnt / nanda
rmdir / mnt / nanda
$ BUSYBOX touch / data / system.notfirstrun
fi
echo "preinstall ok"

3, add uboot configuration file
1) lichee / tools / pack / chips / sunXi / configs / crane original nand program to copy and rename
Example: evb copy and rename as evb_mmc
2) lichee / tools / pack / chips / sunXi / configs / crane / default the directory env.cfg copy to a new directory
And then do the following changes
Before the amendment:
setargs = setenv bootargs console = $ {console} root = $ {nand_root} init = $ {init} loglevel = $ {loglevel}
boot_normal = nand read 40007800 boot; boota 40007800
boot_recovery = nand read 40007800 recovery; boota 40007800
Modified:
setargs = setenv bootargs console = $ {console} root = $ {mmc_root} init = $ {init} loglevel = $ {loglevel}
boot_normal = mmc read 40007800 13800 10000; boota 40007800
boot_recovery = mmc read 40007800 recovery; boota 40007800
--- Simple the practice directly copy env.cfg file / tools / pack / chips / sunXi / conifgs / crane / the program name _mmc directory. Env.cfg files can be downloaded in the FTP.

The 3) the new directory sysconfig1.fex file, corresponding to the start card card controller detmode with 3
Such as:
[Mmc0_para]
sdc_used = 1
sdc_detmode = 3
This ensures that the first one to start the card system is mounted.
4) will the new directory sysconfig1.fex file is stored in the form instead of 1 or 2 (0 representatives nand start, a representative of card0 start the 2 representatives card2 start)
 storage_type = 1

5) Z: \ workspace \ atest \ lichee \ u-boot \ include \ the configs in sun5i.a13.h file card start defining # define CONFIG_MMC_SUNXI_SLOT modify, for example,
# Define CONFIG_MMC_SUNXI_SLOT 0 / * which mmc slot to use, could be 0,1,2,3 * /
Where 0 corresponds card0, 1 corresponds card1, such as similar analogy.

4, compiled Linux BSP

Currently UBOOT adaptive NAND and MMC starts, customers update to Android 4.0 V1.5 version can.
5 by PhoenixCard burn pluggable start card
The burn sdmmc card pluggable card connected to a PC USB port can be used PhoenixCard start card.
Burn operation
Firmware burning to use PhoenixCard tool, the tool is compressed package lichee / tools / tools / tools_win directory (the green version, after decompression can be used without having to install).

After extracting the PhoenixCard.exe, you can see the operator interface as shown

Figure 2.1
Click image file button, choose to burn to the card's firmware

Figure 2.2
Click card to start in front of a small circle

Figure 2.3
Insert a boot card (This step can be operated at any time before clicking the Burn)

Figure 2.4
Click Burn At this point, all the buttons are virtual not operate to know the burn is complete

Figure 2.5
Click Exit after burning

Figure 2.6
Will launch the card into the slot, and restart the small machine, small machine can operate correctly.