Build AGA SDK from source (git)

Added by Jakob Eriksson over 3 years ago

I have tried to build the AGA SDK (to SDK, not ROM) from source found in git.

The reason we want to do this, besides getting a feel for how this whole AGA thing works, is so we can compile the app example demo from git.


I have followed the how to at
https://developer.lindholmen.se/redmine/projects/aga/wiki/Custom_SDK_Build

except that I use Ubuntu 14.10, not 12.04.


The build script, invoked as:

sh makeCustomAgaBuild500.sh  sdk-eng
seemed to work at first, downloading lots of stuff.

However, at the end, there was some problems. I have highlighted what I interpreted as most interesting.






2015-03-05 18:25:15 (2,40 MB/s) - ‘lib.jar’ saved [8141/8141]

--2015-03-05 18:25:15--  http://developer.lindholmen.se/repo/artifacts/Automotive-Service/SNAPSHOT/lib.aar
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 202667 (198K) [application/octet-stream]
Saving to: ‘lib.aar’

100%[==============================================================================================================================================================================================================================>] 202 667     1,13MB/s   in 0,2s   

2015-03-05 18:25:15 (1,13 MB/s) - ‘lib.aar’ saved [202667/202667]

grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/content/Context.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/content/Context.java: No such file or directory
grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/Android.mk: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/Android.mk: No such file or directory
grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
grep: /home/soa1/AGA_BUILD500_sdk_eng/external/sepolicy/service_contexts: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/external/sepolicy/service_contexts: No such file or directory
makeCustomAgaBuild500.sh: 299: cd: can't cd to /home/soa1/AGA_BUILD500_sdk_eng/packages/apps/Launcher2/res/drawable-sw720dp-nodpi
--2015-03-05 18:25:15--  http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper.jpg
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-03-05 18:25:15 ERROR 404: Not Found.

--2015-03-05 18:25:15--  http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper_small.jpg
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-03-05 18:25:15 ERROR 404: Not Found.

==> Manually rename android-sdk_eng._windows.zip to android-sdk_eng._windows-1.2-SNAPSHOT.zip
==> Manually rename android-sdk_eng._linux-x86.zip to android-sdk_eng._linux-x86-1.2-SNAPSHOT.zip
make: *** No rule to make target 'clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'sdk'.  Stop.
make: *** No rule to make target 'win_sdk'.  Stop.



So, if I pick these apart one at a time:



grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/content/Context.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/content/Context.java: No such file or directory


The whole "content" subdirectory is just not there. It's missing. There is only a "swedspot" directory.



grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory

The "services" directory is missing. There is but a "core" directory.




grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/Android.mk: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/Android.mk: No such file or directory

The Android.mk file is missing.


grep: /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory

There is no "app" directory. There is a "swedspot" directory.



grep: /home/soa1/AGA_BUILD500_sdk_eng/external/sepolicy/service_contexts: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD500_sdk_eng/external/sepolicy/service_contexts: No such file or directory

There is no "external" directory. There are "
AGA_SDK  android  com  frameworks  META-INF  org" directories.



makeCustomAgaBuild500.sh: 299: cd: can't cd to /home/soa1/AGA_BUILD500_sdk_eng/packages/apps/Launcher2/res/drawable-sw720dp-nodpi
--2015-03-05 18:25:15--  http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper.jpg
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-03-05 18:25:15 ERROR 404: Not Found.

--2015-03-05 18:25:15--  http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper_small.jpg
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-03-05 18:25:15 ERROR 404: Not Found.

As confirmed in Firefox, this URL is 404.




==> Manually rename android-sdk_eng._windows.zip to android-sdk_eng._windows-1.2-SNAPSHOT.zip
==> Manually rename android-sdk_eng._linux-x86.zip to android-sdk_eng._linux-x86-1.2-SNAPSHOT.zip


What does this even mean? :-)

These files are not downloaded by the build script, as far as I can see.





Please help shed some light on this.

 

Replies (4)

RE: Build AGA SDK from source (git) - Added by Christopher Pavlic over 3 years ago

Hello Jakob!

Multiple things are happening here so I shall go through them one by one

For me it appears that the first thing that is happening is that it appears that the core files of android have not been successfully downloaded. My reason for believing this is due to the other errors you posted saying that both content and services folders are missing.
What files and folders can you see inside "/home/soa1/AGA_BUILD500_sdk_eng/"? could you give me a short description or post some images?

the reason why you might see frameworks/base/core/java/android/swespot is due to the script downloading these files remotly from our repo and placing them in that spot.

regarding the missing files
http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper.jpg
http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper_small.jpg
they have been moved to another part of the server and such the links are broken at the moment. Do not worry about this 404 error, it will not affect the build of the AGA. You can comment out the addMedia call in the "sdk-eng" ) near the end of the script file to remove the messages (add a # infront of the name).

==> Manually rename android-sdk_eng._windows.zip to android-sdk_eng._windows-1.2-SNAPSHOT.zip
==> Manually rename android-sdk_eng._linux-x86.zip to android-sdk_eng._linux-x86-1.2-SNAPSHOT.zip
The script takes no consideration for failure of the build and is telling us that we should change the name. Feel free to ignore these print outs or remove them from your version of the script

As for the purpose of compiling SDK from scratch to build the demo app it might be more time efficient to download the SDK directly from our website
http://developer.lindholmen.se/repo/SDK/Linux/1.1/android-5.0.0_sdk_eng._linux-x86-1.1.zip
or
http://developer.lindholmen.se/repo/SDK/Windows/1.1/android-5.0.0_sdk_eng._windows-1.1.zip

But if you want to continue to build AGA from scratch I can guide you to the best of my abilities.

Best Regards
Christopher Pavlic of the AGA team

RE: Build AGA SDK from source (git) - Added by Jakob Eriksson over 3 years ago

soa1@soa1-Lenovo-Z710:~/src/scripts$ ls -l  ~/AGA_BUILD500_sdk_eng/
total 24
drwxrwxr-x 2 soa1 soa1 4096 mar  5 13:56 AGA_SDK
drwxrwxr-x 3 soa1 soa1 4096 sep  2  2014 android
drwxrwxr-x 3 soa1 soa1 4096 aug 20  2014 com
drwxrwxr-x 3 soa1 soa1 4096 mar  5 18:25 frameworks
drwxrwxr-x 2 soa1 soa1 4096 feb 27 13:26 META-INF
drwxrwxr-x 3 soa1 soa1 4096 jul 12  2013 org





soa1@soa1-Lenovo-Z710:~/src/scripts$ ls -l  ~/AGA_BUILD500_sdk_eng/android/
total 4
drwxrwxr-x 6 soa1 soa1 4096 mar  5 18:25 swedspot





These are the files I see.
Oh, I think I was also a bit incomplete. We also need to add signals, and implement OEM stuff. For that I guess we need to rebuild the SDK, right?
We are currently trying to understand the AGA architecture - how to add signals, implement signal and app authentication, how cryptographic signatues tie into all this etc.

RE: Build AGA SDK from source (git) - Added by Christopher Pavlic over 3 years ago

So it appears that the call to DownloadAndroidSource was never completed. Try to disable  setupEnvironment, explodeAgaJarFiles, explodeAgaService, addMedia and executeBuild (put a # infront of everything). Try to resolve the problems when downloading since the number of problems that can occur while downloading the AOSP are many due to the share amount of data that needs to be downloaded (~32gb).

Another thing could be to just go the the "/AGA_BUILD500_sdk_eng/" folder and write repo sync and see if it throws some error or not. logging the output might help to identify the problem.

Efter this message I will be away for while so someone else might answer more questions or myself once I get back.

Best of luck
Christopher Pavlic of the AGA team

RE: Build AGA SDK from source (git) - Added by Jakob Eriksson over 3 years ago


I tried some more, this is an excerpt of the messages at the end when trying to build a flo ROM:






vendor/asus/flo/
vendor/asus/flo/BoardConfigVendor.mk
vendor/asus/flo/device-vendor.mk

Files extracted successfully.
./MakeCustomAgaBuild442.sh: line 258: cd: /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base: No such file or directory
./MakeCustomAgaBuild442.sh: line 260: cd: /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/automotive/java: No such file or directory
--2015-04-07 16:41:52--  http://developer.lindholmen.se/repo/artifacts/Automotive-Service/1.1/lib.jar
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8141 (8.0K) [application/java-archive]
Saving to: ‘lib.jar’

100%[==============================================================================================================================================================================================================================>] 8,141       --.-K/s   in 0.008s  

2015-04-07 16:41:56 (965 KB/s) - ‘lib.jar’ saved [8141/8141]

--2015-04-07 16:41:56--  http://developer.lindholmen.se/repo/artifacts/Automotive-Service/1.1/lib.aar
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 202478 (198K) [application/octet-stream]
Saving to: ‘lib.aar’

100%[==============================================================================================================================================================================================================================>] 202,478     25.7KB/s   in 7.7s   

2015-04-07 16:42:08 (25.7 KB/s) - ‘lib.aar’ saved [202478/202478]

grep: /home/soa1/AGA_BUILD_aosp_flo_userdebug/build/core/pathmap.mk: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/build/core/pathmap.mk: No such file or directory
grep: /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/core/java/android/content/Context.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/core/java/android/content/Context.java: No such file or directory
grep: /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/services/java/com/android/server/SystemServer.java: No such file or directory
grep: /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/Android.mk: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/Android.mk: No such file or directory
grep: /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
/bin/sed: can't read /home/soa1/AGA_BUILD_aosp_flo_userdebug/frameworks/base/core/java/android/app/ContextImpl.java: No such file or directory
./MakeCustomAgaBuild442.sh: line 305: cd: /home/soa1/AGA_BUILD_aosp_flo_userdebug/packages/apps/Launcher2/res/drawable-sw720dp-nodpi: No such file or directory
--2015-04-07 16:42:08--  http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper.jpg
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-04-07 16:42:11 ERROR 404: Not Found.

--2015-04-07 16:42:11--  http://developer.lindholmen.se/repo/misc/media/sw720dp_wallpaper_small.jpg
Resolving developer.lindholmen.se (developer.lindholmen.se)... 185.20.14.28
Connecting to developer.lindholmen.se (developer.lindholmen.se)|185.20.14.28|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-04-07 16:42:15 ERROR 404: Not Found.

make: *** No rule to make target 'clean'.  Stop.
make: *** No rule to make target 'clobber'.  Stop.
make: *** No rule to make target 'update-api'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
./MakeCustomAgaBuild442.sh: line 340: cd: /home/soa1/AGA_BUILD_aosp_flo_userdebug/out/target/product/flo: No such file or directory




 

(1-4/4)