[INFO][ROM] Guide to build AOSP 4.2. Builds provided for crespo and 4g 2013-02-20

Search This thread

the1dynasty

Senior Member
Dec 16, 2011
4,336
3,164
I haven't even had a chance to check if this builds at all (never mind whether it boots), but if someone is feeling ambitious and has a fast build box, you could try building with https://github.com/steven676/android_device_samsung_crespo/commits/kitkat (this is based on work done for Galaxy Nexus). You'll also probably need to apply https://gist.github.com/steven676/7276901 and https://gist.github.com/steven676/7276913 against frameworks/native to get SurfaceFlinger working decently well (see [POST=47036814] for some more details).

Again, I haven't even tried to build this, never mind boot it -- don't blame me if it fails to boot, eats your data, explodes your battery ...

i just got a new hard drive and i'll be installing linux on that one to tease the idea of developing a ROM for Crespo4G... not totally new to building but also nowhere near a pro or even at a level that i knwo exactly what i'm doing haha
 

steven676

Senior Member
Nov 24, 2011
593
2,433
I haven't even had a chance to check if this builds at all (never mind whether it boots), but if someone is feeling ambitious and has a fast build box, you could try building with https://github.com/steven676/android_device_samsung_crespo/commits/kitkat (this is based on work done for Galaxy Nexus).

Well, that source builds now, at least, but the display doesn't work:

Code:
I/SurfaceFlinger(  100): SurfaceFlinger is starting
I/SurfaceFlinger(  100): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  (  100): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL  (  100): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL  (  100): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
I/hwcomposer(  100): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**)::win-0 add[0] 4c159000 
I/hwcomposer(  100): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**)::win-0 add[1] 4c2d0000 
I/hwcomposer(  100): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**)::win-0 add[2] 4c447000 
D/hwcomposer(  100): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**):: success
I/SurfaceFlinger(  100): Using composer version 1.0
W/SurfaceFlinger(  100): getting VSYNC period from fb HAL: 17930787
W/SurfaceFlinger(  100): no suitable EGLConfig found, trying without EGL_FRAMEBUFFER_TARGET_ANDROID
W/SurfaceFlinger(  100): no suitable EGLConfig found, trying without EGL_RECORDABLE_ANDROID
I/SurfaceFlinger(  100): EGL informations:
I/SurfaceFlinger(  100): vendor    : Android
I/SurfaceFlinger(  100): version   : 1.4 Android META-EGL
I/SurfaceFlinger(  100): extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer EGL_ANDROID_recordable 
I/SurfaceFlinger(  100): Client API: OpenGL_ES
I/SurfaceFlinger(  100): EGLSurface: 8-8-8-8, config=0xf
I/SurfaceFlinger(  100): OpenGL ES informations:
I/SurfaceFlinger(  100): vendor    : Imagination Technologies
I/SurfaceFlinger(  100): renderer  : PowerVR SGX 540
I/SurfaceFlinger(  100): version   : OpenGL ES 2.0 build 1.8.GOOGLENEXUS.ED945322@2112805
I/SurfaceFlinger(  100): extensions: GL_EXT_debug_marker GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_vertex_half_float GL_OES_texture_float GL_OES_texture_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_fragment_precision_high GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_required_internalformat GL_OES_depth_texture GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_standard_derivatives GL_OES_vertex_array_object GL_OES_egl_sync GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_EXT_discard_framebuffer GL_EXT_shader_texture_lod GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_npot GL_IMG_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_program_binary GL_IMG_multisampled_render_to_texture
I/SurfaceFlinger(  100): GL_MAX_TEXTURE_SIZE = 2048
I/SurfaceFlinger(  100): GL_MAX_VIEWPORT_DIMS = 2048
E/libEGL  (  100): eglQuerySurface:590 error 300d (EGL_BAD_SURFACE)
E/libEGL  (  100): eglQuerySurface:590 error 300d (EGL_BAD_SURFACE)
E/libEGL  (  100): call to OpenGL ES API with no current context (logged once per thread)
D/SurfaceFlinger(  100): Screen acquired, type=0 flinger=0x4156b450

The GLESv1 rendering path doesn't work either, and dropping the hwcomposer module causes SurfaceFlinger to crash (as opposed to just refuse to work). Changing various things to make the EGL configuration match 4.3 more closely doesn't help either ... I'm stumped. Anyone else want to give this a shot?
 

steven676

Senior Member
Nov 24, 2011
593
2,433
The GLESv1 rendering path doesn't work either, and dropping the hwcomposer module causes SurfaceFlinger to crash (as opposed to just refuse to work). Changing various things to make the EGL configuration match 4.3 more closely doesn't help either ... I'm stumped. Anyone else want to give this a shot?

Aha -- Google needed https://android.googlesource.com/platform/frameworks/native/+/f4486c6ea4bc^!/ to get 4.4 working on OMAP4, which is also an SGX540 GPU. If we apply that fix to S5PC110/Nexus S as well, the system actually boots and runs quite nicely, though WebView is broken (as it is on OMAP4).

In short, in addition to the patches listed above (https://gist.github.com/steven676/7276901 and https://gist.github.com/steven676/7276913), you'll need https://gist.github.com/steven676/7287471 and https://gist.github.com/steven676/7287482 to get 4.4 running on Nexus S.
 

Attachments

  • Screenshot_2013-11-02-23-48-52.jpg
    Screenshot_2013-11-02-23-48-52.jpg
    46.2 KB · Views: 81
  • Screenshot_2013-11-02-23-49-03.png
    Screenshot_2013-11-02-23-49-03.png
    76.5 KB · Views: 91

Setting.Out

Inactive Recognized Contributor
Mar 10, 2013
7,592
8,306
Sèvres
Aha -- Google needed https://android.googlesource.com/platform/frameworks/native/+/f4486c6ea4bc^!/ to get 4.4 working on OMAP4, which is also an SGX540 GPU. If we apply that fix to S5PC110/Nexus S as well, the system actually boots and runs quite nicely, though WebView is broken (as it is on OMAP4).

In short, in addition to the patches listed above (https://gist.github.com/steven676/7276901 and https://gist.github.com/steven676/7276913), you'll need https://gist.github.com/steven676/7287471 and https://gist.github.com/steven676/7287482 to get 4.4 running on Nexus S.

What kernel is that?.. Did the test go well; as in somewhat stabe, apps FC's, cell/3g/WiFi?.. Want a tester?... (Please)... ;D

Sent from my Nexus S using XDA Premium 4 mobile app
 

steven676

Senior Member
Nov 24, 2011
593
2,433
Did the test go well; as in somewhat stabe, apps FC's, cell/3g/WiFi?..

Stock browser and other users of WebView have screwed-up rendering (big black boxes in the middle of pages). Camera, video camera, video playback, WiFi work; have not dropped in a SIM card to test cellular, but don't anticipate problems. Apps themselves aren't acting up, but the PowerVR GPU drivers crash every so often, taking down the entire system -- unclear what can be done about that (they also crash like that on Galaxy Nexus).

What kernel is that?..

My own personal local kernel build, which I'm not going to release (not suitably configured for general use).

Want a tester?... (Please)... ;D

To be clear, I don't plan on uploading binary builds -- I don't have the network bandwidth or the time to provide support. I am posting source for everything I do, though, and anyone is welcome to build/use/modify/whatever with it.
 

Setting.Out

Inactive Recognized Contributor
Mar 10, 2013
7,592
8,306
Sèvres
Stock browser and other users of WebView have screwed-up rendering (big black boxes in the middle of pages). Camera, video camera, video playback, WiFi work; have not dropped in a SIM card to test cellular, but don't anticipate problems. Apps themselves aren't acting up, but the PowerVR GPU drivers crash every so often, taking down the entire system -- unclear what can be done about that (they also crash like that on Galaxy Nexus).



My own personal local kernel build, which I'm not going to release (not suitably configured for general use).



To be clear, I don't plan on uploading binary builds -- I don't have the network bandwidth or the time to provide support. I am posting source for everything I do, though, and anyone is welcome to build/use/modify/whatever with it.

I'd let you borrow my bandwidth .. Lol... Thanks for your support on this, sounds promising.. It's good to know our dinosaur can have another day in the sun... :)

Sent from my Nexus S using XDA Premium 4 mobile app
 

cn.fyodor

Senior Member
Dec 31, 2009
337
509
Nanjing
Aha -- Google needed https://android.googlesource.com/platform/frameworks/native/+/f4486c6ea4bc^!/ to get 4.4 working on OMAP4, which is also an SGX540 GPU. If we apply that fix to S5PC110/Nexus S as well, the system actually boots and runs quite nicely, though WebView is broken (as it is on OMAP4).

In short, in addition to the patches listed above (https://gist.github.com/steven676/7276901 and https://gist.github.com/steven676/7276913), you'll need https://gist.github.com/steven676/7287471 and https://gist.github.com/steven676/7287482 to get 4.4 running on Nexus S.
Thank you so much, steven. After applying your tweaking patch 01 and 04, system boots. I disabled the translucent decor feature then set Launcher2 as default, I can confirm kitkat runs definitely faster and more responsively than any other 4.x ROMs. Also the screenshot works without any changes for me.

Cheers,


EDIT: for WebView issue, think we still need the CPU rendering patch, a patch for deprecated WebKit in CM.
 
Last edited:
  • Like
Reactions: leap_ahead

leap_ahead

Senior Member
Jul 2, 2009
3,227
619
Thank you so much, steven. After applying your tweaking patch 01 and 04, system boots. I disabled the translucent decor feature then set Launcher2 as default, I can confirm kitkat runs definitely faster and more responsively than any other 4.x ROMs. Also the screenshot works without any changes for me.

Cheers,


EDIT: for WebView issue, think we still need the CPU rendering patch, a patch for deprecated WebKit in CM.

welcome back @cn.fyodor.. you go to release the rom ?
 
Last edited:

dabotsonline

Senior Member
Dec 17, 2009
227
79
Thank you so much, steven. After applying your tweaking patch 01 and 04, system boots. I disabled the translucent decor feature then set Launcher2 as default, I can confirm kitkat runs definitely faster and more responsively than any other 4.x ROMs. Also the screenshot works without any changes for me.

Cheers,
@cn.fyodor , could you please upload your binary build based on the work of @steven676 ? I'll be willing to test it (it would be great if you could ensure that everything in /app/ and /priv-app/ is deodexed as well.)

I'm building GAPPS for 4.4 (based on the work by @dhacker29 and @BaNkS - @doomed151 might have other commitments - as well as the hammerhead dumps by @MameTozhio and @itasoulas - so I'll probably replace Launcher2 with the PrebuiltGmsCore + Velvet + GoogleHome combination that's working successfully for me on 4.3 on @Lafriks 's build ( http://xdaforums.com/showthread.php?t=2402655 ) rather than yours ( http://xdaforums.com/showthread.php?t=2410844 ).

Indeed, @Lafriks is working himself on a 4.4 build, as is @Win7Fun . I know that @leap_ahead as well as @Setting.Out is as keen as I am for a 4.4 build!
 
Last edited:

cn.fyodor

Senior Member
Dec 31, 2009
337
509
Nanjing
welcome cn.fyodor.. you go to release the rom ?
@cn.fyodor , could you please upload your binary build based on the work of @steven676 ? I'll be willing to test it (it would be great if you could ensure that everything in /app/ and /priv-app/ is deodexed as well.)

I'm building GAPPS for 4.4 (based on the work by @dhacker29 and @BaNkS - @doomed151 might have other commitments - as well as the hammerhead dumps by @MameTozhio and @itasoulas - so I'll probably replace Launcher2 with the PrebuiltGmsCore + Velvet + GoogleHome combination that's working successfully for me on 4.3 on @Lafriks 's build ( http://xdaforums.com/showthread.php?t=2402655 ) rather than yours ( http://xdaforums.com/showthread.php?t=2410844 ).

Indeed, @Lafriks is working himself on a 4.4 build, as is @Win7Fun . I know that @leap_ahead as well as @Setting.Out is as keen as I am for a 4.4 build!
Will upload a quick alpha build here after testing Wifi function(also check-picked the patch from Steven, so give him more thanks please). But don't hope too much. Browser rendering is broken. For now I don't have the time to fix this or all other bugs. The only thing is it's just running pretty fast. lol
 
Last edited:

leap_ahead

Senior Member
Jul 2, 2009
3,227
619
yes we know that your buils is from steven work !!
also for broswer rendering what you mean ? sorry but i dont understand,,
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    Download:
    Nexus S: crespo-20130220
    filename: greenblue-crespo-20130220
    md5sum: 3503235e1f66b0d2cfeeea43c2d1699b
    sha1sum: 48c1cfbee8a226aae2ce5b5ab9fb7ad6d30339e3

    Nexus S 4G: crespo4g-20130220
    filename: greenblue-crespo4g-20130220.zip
    md5sum: b02e36b543293a337dd3359bd68444d3
    sha1sum: 7095ab401e71204532bf2866664452687866551a

    Use the latest gapps for 4.2.1: 20121212
    Warning: The new swipe keyboard and the gallery/camera/photosphere are not included. Stock photosphere apk will not work. It is hard coded to work on certain phones. You must use modified binaries or edit the build prop.

    Steps to flash:
    1. Flash the ROM and SuperSU.
    2. Boot at least once before flashing Gapps. FCs may occur if you don't reboot.
    3. Be patient: the phone will be laggy for the first few minutes as the phone scans for media on the built in sdcard.
    4. If you have strange issues or FCs, make sure you wipe data / factory reset and reflash everything.


    Important notes:
    No tweaks, mods or kernel patches will be added. This is strictly a basic AOSP build.
    A complete set of patches are provided on github so you can build your own ROM with your choice of modifications.

    Flash your favorite AOSP based 4.1.x or 4.2.x kernel if desired. ASOP version of Matr1x and CM10 version of Marmite has been confirmed to work. Stock ROM is not as smooth as other kernels but it works.


    Changelog:

    20130221
    Rebased on 4.2.2

    20121206
    Add bluetooth build cfg for fix build warning (trivial)
    Bluetooth prevents deep sleep. Patch.
    Crespo4g only: Fix Phone.apk force closes after a call *
    Crespo4g only: Set voicemail number to own number for Nexus S 4G
    Lockscreen PIN keyboard cuts off letters from number 7 and 9. Patch.
    Update init.herring.rc: bluedroid has replaced system/bluetooth (trivial)

    20121128
    Restore original clock font size
    Allow backups to Google account from Settings -> Backup & restore
    Updated platform version number to 4.2.1 (cosmetic issue)

    20121127
    Build from 4.2.1 tree
    Remove December to Contact's calendar - fixed in 4.2.1
    Fix the building of Email.apk
    Reduce the lockscreen clock font size
    Update the FC on accessing Settings -> Storage patch

    20121123
    Add December to Contact's calendar
    Fix FC on Daydream's clock setting
    Fix alarm button in quick settings
    Fix FC on accessing Settings -> Storage
    Update the name, brand and model in build.prop

    20121122 - Prevent lockscreen clock from getting cut off
    20121120 - Added patch to fix MMS receive on crespo4g
    20121119 - Initial build

    Todo list:
    Enable emulated storage. *
    SElinux configuration.

    Broken:
    Nexus S 4G: Can't set voicemail number and cannot switch carrier back from Google Voice to My Carrier.
    Nexus S 4G: Tethering with WiMax is troublesome at best.
    Settings -> Battery does not properly show awake times in the graph. (Appears to be dependent on kernel used).

    Working:
    3G
    4G WiMAX
    Audio
    Bluetooth audio
    Camera
    Daydream
    Face unlock
    GPS
    Lockscreen widgets
    MMS
    NFC
    Phone calls
    SMS
    Sprint system updates
    Wifi



    Instructions to build from source:

    Code:
    repo init -u git://github.com/diclusial/platform_manifest.git -b greenblue-4.2.2
    repo sync
    . build/envsetup.sh
    lunch [model]
    make otapackage

    Build notes:
    - All necessary patches and firmware are included in the repo.

    Patches below my be out of date. Check github for changes.
    The essential patches:
    Add TARGET_ARCH to BoardConfigCommon
    Fix camera build
    Update location providers
    Remove Launcher2 hardware acceleration overlay

    Crespo bug fix patches
    Set default backup transport to Google account
    Fix clock and date/alarm display on lockscreen
    Set the build prop value for version, brand, etc.
    Remove redundant PRODUCT_PACKAGES for live wallpapers

    Crespo4g bug fix patches
    Update Mms config
    Fix receiving MMS messages
    Restore ability to utilize mobile/3g for tethering
    Add full_crespo4g-userdebug to the lunch menu
    Set default backup transport to Google account
    Fix clock and date/alarm display on lockscreen
    Set the build prop value for version, brand, etc.
    Remove redundant PRODUCT_PACKAGES for live wallpapers

    Patches to change the build process
    Add support for overriding build.prop settings
    Disable stock recovery

    Bugs that might be fixed in future upstream releases
    DeskClock: Fix Dream settings
    Fix building, the product listing in build/ wants Email2
    Merge "Settings: fix storage measurement for device without emulated
    QuickSettings : Fix alarm intent
    13
    GO TO FIRST POST FOR LATEST INFORMATION


    New test build based on 4.2.1:

    Changelog:
    Updated platform number from 4.2 to 4.2.1
    Setting -> Backup & rest -> Backup account now shows Google account. Requires the new official gapps. May require wiping data unless you have adb or terminal installed:
    Code:
    adb shell bmgr transport com.google.android.backup/.BackupTransportService

    Obsolete patches. The patches must be reversed.
    002-update-crespo.patch - outdated
    007-reduce-clock-font.patch - Not necessary anymore
    008-december-contacts.patch - Not necessary anymore
    011-storage-fix.patch - outdated
    013-buildprop-values.patch - outdated
    016-buildprop-values-4.2.1.patch - outdated

    New changes:
    018-backup-transport.patch - Add overlay to set the default backup account to Google
    019-update-crespo.patch - Removed platform version 4.2
    020-buildprop-values-4.2.1.patch - Added platform version 4.2.1

    Downloads:
    Nexus S: crespo 2012-11-28
    Nexus S 4G: crespo4g 2012-11-28
    Use the official gapps 20121128. (There may be a newer gapps zip soon so always use the latest.) The previous gapps and fix-gapps are no longer required. It fixes GoogleBackupTransport but does not include the new swipe keyboard nor the gallery/camera app among other things.

    greenblue-crespo-20121128
    md5sum ac280310a6a618bd22cb7626d7b80867
    sha1sum 263f8319f0de29e2da11f1cbf4f5860beb1ffcbf

    greenblue-crespo4g-20121128.zip
    md5sum 9b4560317ecca5ba714162b1c4b664fc
    sha1sum aaebf1928a27edaee675b2833aa7bd5ee9cdb4f0
    9
    Working Settings.apk

    Hello,

    Lets get the development going!
    Here is the working Settings.apk. I will share the code (patch if required) later since I am in a hurry to leave to my native.
    Just check and let me know.

    It was just a matter of one try-catch block in packages/apps/Settings/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java in the function totalValues(HashMap<String, Long> map, String... keys)!

    Adarsh
    8
    New builds based on branch 4.2.1:

    Obsolete patches. The patches must be reversed.
    007-reduce-clock-font.patch - Not necessary anymore
    008-december-contacts.patch - Not necessary anymore
    011-storage-fix.patch - outdated
    013-buildprop-values.patch - outdated

    New changes:
    014-fix-email-build.patch
    015-adjust-lockscreen-keyguard-size.patch
    016-buildprop-values-4.2.1.patch - Updated from previous patch
    017-storage-fix.patch - Updated from previous patch

    Crespo 20121127
    Crespo4g 20121127
    Continue to use the same gapps and fix-gapps.

    Issues:
    Version needs to be updated from 4.2 to 4.2.1 (Cosmetic issue)

    Sources attached. First post will be updated once I get more feedback on it. Patch 015-adjust-lockscreen-keyguard-size.patch may be changed for future builds.

    To build 4.2.1:
    1. Reverse all the previous patches with "patch -s -p1 -R -E"
    2. Delete device/samsung/crespo*
    3. repo init -b android-4.2.1_r1
    4. Reapply the first patch and repo sync
    5. Reapply the remaining patches.

    To report problems with the lockscreen security widget:
    1. You must enable developer mode
    2. Enable Security -> Developer options -> Show layout bounds
    3. Take one screenshots with the normal security lock right when the phone wakes
    4. Take one with lockscreen widget fully expanded.
    5. Post as attachment to the forum. Example attached.
    8
    New builds:
    crespo-20130220
    crespo4g-20130220

    Changelog:
    Rebase on 4.2.2

    Updated github trees:
    repo init -u git://github.com/diclusial/platform_manifest.git -b greenblue-4.2.2


    Is the new android-4.2.2_r1 a big enough update to warrant a new build? I will be using this ROM til the end of my contract in May. Doesn't matter either way for me, just thought it would be cool to go out with the latest Android version. :D
    Activity in the 4G forum is fading fast. Everyone is ready to move on.