Discussion

android custom image

18 4740
Edited by xevilstar at 2014-10-23 17:39

I intend to build a custom android image and then donate it to this site.
I am following the instruction as per source.android.com .
Once everything is built how can I make the iso to burn it on the sd and test it ?

is the instruction

lunch aosp_arm-eng

correct ?

please help me collaborate with this project.
what kernel did you want to use?

ChrisP  
Edited by ChrisP at 2014-10-24 02:21

I would like also to understand what step are needed to achieve that. I would like to try to build from scratch an android with various option and try more recent Android version (4.4, and why not lollipop ?)

Building kernel form Lemaker git is ok, but I do not get how to integrate that with standard android build, as well as specific drivers (Mali, ...)

There is also a way to do it based on manifest file ( https://linux-sunxi.org/Cubieboard/Android_TV_image ). Is it a good direction ?

Is the wiki update planned soon on this  ? http://wiki.lemaker.org/Building_your_own_Android_firmware

tony_zhang replied at 2014-10-23 22:45
what kernel did you want to use?

I think I will use the standard provided kernel that you can find in the git (at least initially). then I might try the latest from kernel.org

still the problem remains... how can I make the iso ? is that instruction correct for the banana pi ?

I am trying to follow this manual : http://linux-sunxi.org/Boot_Android_from_SdCard
I have installed libusb. the awutils git seems dead and buried. trying to compile it gives me an error
awutils # make
cc  -Wall -o log2bin log2bin.c
cc  -Wall -o awimage awimage.c parsecfg.c twofish.c rc6.c
awimage.c: In function ‘decrypt_image’:
awimage.c:371:43: warning: variable ‘firmware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:30: warning: variable ‘hardware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:25: warning: variable ‘vid’ set but not used [-Wunused-but-set-variable]
awimage.c:371:20: warning: variable ‘pid’ set but not used [-Wunused-but-set-variable]
twofish.c: In function ‘tf_init’:
twofish.c:405:33: warning: variable ‘mo_key’ set but not used [-Wunused-but-set-variable]
twofish.c:405:22: warning: variable ‘me_key’ set but not used [-Wunused-but-set-variable]
cc  -Wall -o awflash awflash.c -lusb
awflash.c:23:17: fatal error: usb.h: No such file or directory
compilation terminated.
make: *** [awflash] Error 1

It seems that the usb.h header file has been at some point rinominated so I have tried to patch the code forcing it to search the new header but ended up having this error

cc  -Wall -o log2bin log2bin.c
cc  -Wall -o awimage awimage.c parsecfg.c twofish.c rc6.c
awimage.c: In function ‘decrypt_image’:
awimage.c:371:43: warning: variable ‘firmware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:30: warning: variable ‘hardware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:25: warning: variable ‘vid’ set but not used [-Wunused-but-set-variable]
awimage.c:371:20: warning: variable ‘pid’ set but not used [-Wunused-but-set-variable]
twofish.c: In function ‘tf_init’:
twofish.c:405:33: warning: variable ‘mo_key’ set but not used [-Wunused-but-set-variable]
twofish.c:405:22: warning: variable ‘me_key’ set but not used [-Wunused-but-set-variable]
cc  -Wall -o awflash awflash.c -lusb
awflash.c:69:1: error: unknown type name ‘usb_dev_handle’
awflash.c: In function ‘locate_device’:
awflash.c:75:2: error: unknown type name ‘usb_dev_handle’
awflash.c:77:2: warning: implicit declaration of function ‘usb_find_busses’ [-Wimplicit-function-declaration]
awflash.c:78:2: warning: implicit declaration of function ‘usb_find_devices’ [-Wimplicit-function-declaration]
awflash.c:80:13: error: ‘usb_busses’ undeclared (first use in this function)
awflash.c:80:13: note: each undeclared identifier is reported only once for each function it appears in
awflash.c:80:39: error: dereferencing pointer to incomplete type
awflash.c:81:17: error: dereferencing pointer to incomplete type
awflash.c:81:42: error: dereferencing pointer to incomplete type
awflash.c:82:24: error: dereferencing pointer to incomplete type
awflash.c:82:50: error: dereferencing pointer to incomplete type
awflash.c:84:5: warning: implicit declaration of function ‘usb_open’ [-Wimplicit-function-declaration]
awflash.c:84:19: warning: assignment makes pointer from integer without a cast [enabled by default]
awflash.c:86:47: error: dereferencing pointer to incomplete type
awflash.c: In function ‘fex_xfer’:
awflash.c:139:2: warning: implicit declaration of function ‘usb_bulk_write’ [-Wimplicit-function-declaration]
awflash.c:146:3: warning: implicit declaration of function ‘usb_bulk_read’ [-Wimplicit-function-declaration]
awflash.c: In function ‘aw_fel_get_version’:
awflash.c:329:2: error: incompatible type for argument 6 of ‘fex_command’
awflash.c:179:1: note: expected ‘void *’ but argument is of type ‘struct aw_fel_version’
awflash.c: In function ‘main’:
awflash.c:371:2: warning: implicit declaration of function ‘usb_init’ [-Wimplicit-function-declaration]
awflash.c:373:3: warning: implicit declaration of function ‘usb_set_debug’ [-Wimplicit-function-declaration]
awflash.c:375:11: warning: assignment from incompatible pointer type [enabled by default]
awflash.c:380:2: warning: implicit declaration of function ‘usb_set_configuration’ [-Wimplicit-function-declaration]
awflash.c:384:2: warning: implicit declaration of function ‘usb_claim_interface’ [-Wimplicit-function-declaration]
awflash.c:388:2: warning: implicit declaration of function ‘usb_set_altinterface’ [-Wimplicit-function-declaration]
awflash.c:393:2: warning: implicit declaration of function ‘aw_get_version’ [-Wimplicit-function-declaration]
awflash.c:397:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘char *’
awflash.c:397:3: warning: passing argument 6 of ‘fex_command’ makes pointer from integer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘void *’ but argument is of type ‘long unsigned int’
awflash.c:397:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c:404:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘char *’
awflash.c:404:3: warning: passing argument 6 of ‘fex_command’ makes pointer from integer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘void *’ but argument is of type ‘long unsigned int’
awflash.c:404:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c:409:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘char *’
awflash.c:409:3: warning: passing argument 6 of ‘fex_command’ makes pointer from integer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘void *’ but argument is of type ‘int’
awflash.c:409:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c:412:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘char *’
awflash.c:412:3: warning: passing argument 6 of ‘fex_command’ makes pointer from integer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘void *’ but argument is of type ‘int’
awflash.c:412:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c:414:3: warning: implicit declaration of function ‘fex_write_file’ [-Wimplicit-function-declaration]
awflash.c:415:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘void *’
awflash.c:415:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c:417:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘char *’
awflash.c:417:3: warning: passing argument 6 of ‘fex_command’ makes pointer from integer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘void *’ but argument is of type ‘int’
awflash.c:417:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c:424:20: error: ‘AWL_FEL_1_EXEC’ undeclared (first use in this function)
awflash.c:424:3: warning: passing argument 5 of ‘fex_command’ makes integer from pointer without a cast [enabled by default]
awflash.c:179:1: note: expected ‘uint32_t’ but argument is of type ‘void *’
awflash.c:424:3: error: too few arguments to function ‘fex_command’
awflash.c:179:1: note: declared here
awflash.c: At top level:
awflash.c:316:1: warning: ‘aw_fel_get_version’ defined but not used [-Wunused-function]
make: *** [awflash] Error 1

please help

upps sorry I just found that awimage was already inside the android git

/home/android/aosp/awutils/awimage

/home/android/aosp/awutils/awimage -u ./out/target/product/generic/system.img
/home/android/aosp/awutils/awimage: unpacking ./out/target/product/generic/system.img to ./out/target/product/generic/system.img.dump
Segmentation fault

there is no android.img in the directory tree

You have to log in before you can reply Login | Sign Up

Points Rules