[DEV] AOSP Gingerbread Development Central

Should this thread become a sticky?

  • Yes

    Votes: 241 88.0%
  • No

    Votes: 33 12.0%

  • Total voters
    274
Search This thread

pendo

Senior Member
Jun 3, 2010
1,971
759
Tulsa, OK
I believe you can just erase the files you've modified and don't want to keep, and execute "repo sync" again.



To the OP: the direct links to battery percentage scripts from Lenny don't work anymore.

Hi Jack, nice to bump into you again :)

I thought that as well originally but noticed in after a repo sync they were not replaced. Maybe I did something else that prevented it from replacing the missing files? It certainly makes sense that it would work...

May you please update the rooting part? It seems it won't work anymore, as I don't find both su executable and Superuser.apk in my final system (no errors though besides some strings I had to reformat).

The biggest problem I had was with the "_mktemp" issue. I just edited su.c which took care of that, but it looks like someone has committed an edit to that file with cyanogens github. I'll just clone from cm next time around, thanks :)
 

elegos

Senior Member
Jul 25, 2009
464
129
Milano
Redmi K20 Pro
ATM following the root steps there are the following errors:

1. ChainsDD removed all the branches, only master is available, and it's not Gingerbread compatible (due to some changes in string manipulation)
2. su is not part of Superuser anymore, it has been moved to system/extras/su (replacing the default one)
3. Superuser.apk is not compiled as it's missing from the packages list

Thus yeah, it should really be updated as suggested by myself :)
 

pendo

Senior Member
Jun 3, 2010
1,971
759
Tulsa, OK
I seem to remember having a problem one time when simply trying to clone superuser from cyanogen, the makefile is different. But I'm a little fuzzy on this, as it was a couple weeks ago maybe...that and I'm mostly fumbling my way around in there as it is so it's just as likely (more so probably) that it was something else I'd monkeyed up :p


I haven't been able to get busybox to build right though, either. Always end up installing it from the phone :(
 

elegos

Senior Member
Jul 25, 2009
464
129
Milano
Redmi K20 Pro
TBH it's pretty simple, make menuconfig and add the arm-linux-gnueabi- to the cross compile variable, then push to /system/bin and run "busybox --install -s /system/bin". Remember to delete eventual toolbox links before doing this, as the install process won't override them (i.e. ls).

Here it is attached an update.zip I've made (Busybox 1.18.3)
 

Attachments

  • busybox_1.18.3_signed.zip
    2.1 MB · Views: 67
  • Like
Reactions: redstar3894

redstar3894

Retired Recognized Developer
Jun 3, 2010
428
119
Chicago, IL
redstar.euroskank.com
TBH it's pretty simple, make menuconfig and add the arm-linux-gnueabi- to the cross compile variable, then push to /system/bin and run "busybox --install -s /system/bin". Remember to delete eventual toolbox links before doing this, as the install process won't override them (i.e. ls).
Here it is attached an update.zip I've made (Busybox 1.18.3)
Cool! Thanks for sharing dude! :p

When I'm too lazy to build myself a copy of BusyBox, I've always just downloaded them from this link: http://busybox.net/downloads/binaries/
It isn't quite as updated as elegos' version, but still worth considering... just make sure to download the "armv6l" version... ;)

I agree though... building BusyBox is pretty simple... :p
 

probers1

Senior Member
Jul 11, 2008
76
14
I am having an issue and wonder if any one can help. I have been trying to get trackball alert added to my build and I am at a loss. I have tried to use the built in patch numerous times with no success. I built an unaltered rom from and then rooted it with kitchen to make sure it was not something I was modifying that was causing it to not work. Still no success. What could I be missing here?
Is there some secret to making it work?

thanks in advance.
 

ch33kybutt

Retired Recognized Developer
Oct 25, 2008
635
812
I thought that as well originally but noticed in after a repo sync they were not replaced. Maybe I did something else that prevented it from replacing the missing files? It certainly makes sense that it would work...
To drop all your changes in all repos,
cd ~/android/system
repo forall -c git reset --hard


To drop your changes in only one repo,
cd ~/android/system/repo/path/ (e.g. ~/android/system/frameworks/base/)
git reset --hard
 
  • Like
Reactions: pendo

SabrWolf

Senior Member
Jan 21, 2010
55
116
it looks like my virtualbox destroyed my repo somehow..

im kind of a git/repo noob here so i need a little hand to get this figured out

Fetching projects: 17% (41/237) error: unable to resolve reference refs/remotes/github/gingerbread: No such file or directory
From git://github.com/CyanogenMod/android_device_motorola_sholes
! [new branch] gingerbread -> github/gingerbread (unable to update local ref)
error: Cannot fetch CyanogenMod/android_device_motorola_sholes

looks like sholes is fubar
i didn't modify anything there, git fsck looks ok
no idea how to fix this, have no problem cloning sholes again but have no idea how to do it :(

any assistance would be appreciated!.

thanks.
 

mordokak

Retired Recognized Developer
Jun 9, 2010
199
30
Hi all apologizes for not updating this in while. Ill try to update and check any broken link and solved any other issue that might apply.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Android Open Source Project Gingerbread Development Central


    Introduction: Many of you know me for my PhoenRom nexus rom but today I want to start a thread that hopefully will become a clear place HEAVILY ORIENTED TO AOSP DEVELOPERS where they can gather the latest fixes, kernels and mods so that they can easily be merged to the latest Gingerbread AOSP branch. This post will also provide guidance for setting up a AOSP developer machine, and all possible needed how to's that are related to the subject.

    Also with time I realized that users demand always the same mods over and over between versions. So if we post the source of those modifications here it will allow them to be easily ported between versions.
    This will also benefit the mods qualities itself since a community work might enhance them, amplifying their features or simply making them more stable.

    What exactly WILL this post cover:
    • AOSP Development tools
    • Guidance to modifying, merging and compiling AOSP
    • AOSP Fixes and patches
    • AOSP Mods
    • Kernels
    • Useful collection of how to's links

    What exactly WILL NOT cover:
    • Roms
    • Apps
    • Themes

    About the thread: Ill personally will update this thread the best I can and test as many mods posted as possible. If anyone want to post their mods or feel that something should be posted here and its missing, feel free to do it, or private message me so I can post it. If something posted here is of special relevance and falls directly into the "WILL CONTAIN" I would post it in the opening post and hopefully will end up with a nice source library. I will also try to upload this sources to github so they are friendly mergeable.


    Setting up AOSP development environment

    Minimum Requirements to build Android form Source:
    • 2GB of RAM
    • 20GB of hard drive free space

    Linux: You can use any distribution but I highly recommend Ubuntu for AOSP development.
    Currently you can build AOSP in both 32bit and 64bit Ubuntu versions as long as you have the right repositories installed. Working through virtual machines its perfectly compatible, and for this purposes I personally recommend VirtualBox.

    Deploying the environment, android source and compile it the easy way (default is set to CyanogenMod gingerbread branch, edit the script if you want to build from Master instead):

    FOR 32 BIT LINUX ONLY:
    Code:
    Download this script [URL="http://dl.dropbox.com/u/6751304/androidmake"]http://dl.dropbox.com/u/6751304/androidmake[/URL]
    (Courtesy of nicandris)

    FOR 64 BIT LINUX ONLY:
    Code:
    Run this command line in terminal 
    
    apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
    
    and then use the 32 bit script.
    [URL="http://dl.dropbox.com/u/6751304/androidmake"]http://dl.dropbox.com/u/6751304/androidmake[/URL]
    (Courtesy of nicandris)

    Set the script permissions to executable and finally run the script.

    NOTE: Downloading and compiling will take several hours.

    Mac:
    Visit this thread for guidance (Building CyanogenMod for Nexus One) http://xdaforums.com/showthread.php?t=775505

    AOSP Branches

    Gingerbread Branches:
    • Master
      repo init -u git://android.git.kernel.org/platform/manifest.git -b master
    • CyanogenMod
      repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

    AOSP Fixes and issues
    • Master
      Code:
    • CyanogenMod
      Code:
      [URL="http://xdaforums.com/showpost.php?p=11161803&postcount=33"]CM7 make fails and complains about RomManager.apk[/URL]



    AOSP mods
    • Rooting + Superuser.apk
      Code:
      (Courtesy of wdfowty & ChainsDD)
      1) You need to clone ChainsDD's Superuser.apk into your source tree
      [CODE]
      cd ~/android/system/packages/apps
      git clone -b gingerbread http://github.com/chainsdd/android_packages_apps_Superuser.git Superuser
      2) Next, you need to disable the original su binary from being built. In a console/terminal, type
      Code:
      gedit ~/android/system/system/extras/su/Android.mk
      Then replace all text in the file with this
      Code:
      ifeq ($(BUILD_ORIGINAL_SU),true)
      
      LOCAL_PATH:= $(call my-dir)
      include $(CLEAR_VARS)
      
      LOCAL_SRC_FILES:= su.c
      
      LOCAL_MODULE:= su
      
      LOCAL_FORCE_STATIC_EXECUTABLE := true
      
      LOCAL_STATIC_LIBRARIES := libc
      
      LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
      LOCAL_MODULE_TAGS := debug
      
      include $(BUILD_EXECUTABLE)
      
      endif
      That's it. Superuser.apk and su binary are included in every build after.


      More info can be found here: http://howto.ccroms.net/android_project/build/mod/root
      [/CODE]
    • Trackball Alert
      Code:
      CM6 Code: [URL="https://github.com/lilHermit/ta-framework-os"]https://github.com/lilHermit/ta-framework-os[/URL]
      CM7: all ready has this built in.
      Gingerbread: framework can be patched with trackball alert via smali patch option.
    • Trackball Wake & Unlock
      Code:
      [URL="https://github.com/CyanogenMod/android_frameworks_base/commit/88c07d2fd8419a287d6ed56ad6b1aab583b63ed3"]https://github.com/CyanogenMod/android_frameworks_base/commit/88c07d2fd8419a287d6ed56ad6b1aab583b63ed3[/URL]
      [URL="https://github.com/CyanogenMod/android_frameworks_base/commit/809be3bf813258434b98c0987e38d58b28edab6c"]https://github.com/CyanogenMod/android_frameworks_base/commit/809be3bf813258434b98c0987e38d58b28edab6c [/URL]
      [URL="https://github.com/CyanogenMod/android_frameworks_base/commit/17a5669474c01b0e49b8e1dd65e92c9c0a68e2ca"]https://github.com/CyanogenMod/android_frameworks_base/commit/17a5669474c01b0e49b8e1dd65e92c9c0a68e2ca[/URL]
    • Battery %
      Code:
      1)To enable battery % we  need to generate the 2 modified xml files, stat_sys_battery.xml and stat_sys_battery_charge.xml.
      We can do this with this 2 bash scripts:
      
      [B]generate-battery-xml.sh[/B]
      [URL="http://android-leonextlevel.googlecode.com/hg/generate-battery-xml.sh?r=60a06f198e7e5262e0197cb645a66c507b63b5df"]http://android-leonextlevel.googlecode.com/hg/generate-battery-xml.sh?r=60a06f198e7e5262e0197cb645a66c507b63b5df[/URL]
      
      [B]generate-battery_charge-xml.sh[/B]
      [URL="http://android-leonextlevel.googlecode.com/hg/generate-battery_charge-xml.sh?r=60a06f198e7e5262e0197cb645a66c507b63b5df"]http://android-leonextlevel.googlecode.com/hg/generate-battery_charge-xml.sh?r=60a06f198e7e5262e0197cb645a66c507b63b5df[/URL]
      
      to do so, just run in this two command lines where you created the script files and gave them executable permissions.
      
      [B]./generate-battery-xml.sh > stat_sys_battery.xml[/B]
      
      [B]./generate-battery_charge-xml.sh > stat_sys_battery_charge.xml[/B]
      
      2)Now copy and replace this 2 xml to the source directory "android/system/frameworks/base/core/res/res/drawable" (you'll need root permissions")
      
      3)Add your battery%(1-100) images to the source directory "android/system/frameworks/base/core/res/res/drawable-hdpi" (you'll need root permissions")
      
      4)Finally compile the source
      
      Tips: you can use UOT Kitechen to generate the battery images [URL="http://circle.glx.nl/"]http://circle.glx.nl/[/URL]
      
      
      (Courtesy of leonnib4)
      [URL="http://code.google.com/p/android-leonextlevel/source/detail?r=60a06f198e7e5262e0197cb645a66c507b63b5df"]http://code.google.com/p/android-leonextlevel/source/detail?r=60a06f198e7e5262e0197cb645a66c507b63b5df[/URL]
    • Enable transparency
      Code:
      [URL="http://review.cyanogenmod.com/#change,2189"]http://review.cyanogenmod.com/#change,2189[/URL]
    • Shut Down extra options (Recovery & Reboot)
      Code:
      [URL="https://github.com/CyanogenMod/android_packages_apps_CMParts/commit/e68ba6a7211c3c6a66b5e13930be7b9ce837edbd"]https://github.com/CyanogenMod/android_packages_apps_CMParts/commit/e68ba6a7211c3c6a66b5e13930be7b9ce837edbd[/URL]
      [URL="https://github.com/CyanogenMod/android_frameworks_base/commit/06507942da1b847f60c162160ac1d46c78f93730"]https://github.com/CyanogenMod/android_frameworks_base/commit/06507942da1b847f60c162160ac1d46c78f93730[/URL]
    • Pull-down notification area power widget (Glaxsy S style power widget)
      Code:
      (Courtesy of Pedlar)
      [URL="https://github.com/Pedlar/android_frameworks_base/commit/eb0e39732842151e947f27cf64a00480d75e5631"]https://github.com/Pedlar/android_frameworks_base/commit/eb0e39732842151e947f27cf64a00480d75e5631[/URL]
    • Sip Calling not only over wifi
      Code:
      (Courtesy of paul o'brien)
      In the framework-res APK edit the following setting...
      
      [COLOR="SeaGreen"]<bool name="config_sip_wifi_only">[COLOR="Red"]false[/COLOR]</bool>[/COLOR]
      
      For more info visit [URL="http://android.modaco.com/content/google-nexus-s-nexuss-modaco-com/327770/using-gingerbread-internet-calling-sip-without-wifi/"]http://android.modaco.com/content/google-nexus-s-nexuss-modaco-com/327770/using-gingerbread-internet-calling-sip-without-wifi/[/URL]
    • BusyBox
      Code:
      Here you can find the latest ARM binaries:
      [URL="http://busybox.net/downloads/binaries/"]http://busybox.net/downloads/binaries/[/URL]
    • App2SD
      Code:
      [URL="http://xdaforums.com/showthread.php?t=715940"]http://xdaforums.com/showthread.php?t=715940[/URL]
    • Incognito Browser
      Code:
      [URL="https://github.com/CyanogenMod/android_packages_apps_Browser/commit/3e82693651aa2b5a27f54ffd883177a624c09574"]https://github.com/CyanogenMod/android_packages_apps_Browser/commit/3e82693651aa2b5a27f54ffd883177a624c09574[/URL]
    • Proxy
      Code:
      Info:
      (Coyrtesy of leonib4 & Ninpo)
      [URL="https://github.com/leonnib4/packages_apps_Settings/commit/264954500ba24f7fe27837e731ebc4d7ae7b0d4c"]https://github.com/leonnib4/packages_apps_Settings/commit/264954500ba24f7fe27837e731ebc4d7ae7b0d4c[/URL]
      [URL="https://github.com/CyanogenMod/android_frameworks_base/commit/ed99b80128f1aea8889a24f96ac33c5de0faef3a"]https://github.com/CyanogenMod/android_frameworks_base/commit/ed99b80128f1aea8889a24f96ac33c5de0faef3a[/URL]
      [URL="https://github.com/CyanogenMod/android_frameworks_base/commit/c2e62d24d0f57c9315e40e9957e918e68b41bc4b"]https://github.com/CyanogenMod/android_frameworks_base/commit/c2e62d24d0f57c9315e40e9957e918e68b41bc4b[/URL]
    • Enable HSPA icon
      Code:
      (Courtesy of Rusty!)
      change config_hspa_data_distinguishable to true in SytemUI.apk's /res/values/bools.xml
    • Add silence & vibration to volume keys
      Code:
      STATUS:Waiting for submit

    OTHER VERY USEFULL MODS
    (Courtesy of leonnib4)
    http://code.google.com/p/android-leonextlevel/wiki/Progress
    http://code.google.com/p/android-leonextlevel/source/list
    (Courtesy of cyanogen)
    http://review.cyanogenmod.com/


    GingerBread Kernels

    (Courtesy of redstar3894)

    Source Files can be found at github https://github.com/redstar3894

    How to's collection



    THIS THREAD IS UNDER CONSTRUCTION...FEEL FREE TO POST ANY MODS, IDEAS, FIXES OR WHAT EVER YOU WISH MEANWHILE. HELP IS APPRECIATED!
    2
    Hi, can you add some tutorial about how to add root permission to AOSP? Thanks

    http://howto.ccroms.net/android_project/build/mod/root

    ^^^ That is how I managed to do it on froyo. The info is a little dated, so you'll need to replace "eclair" with "gingerbread", but I believe it should still work.


    Basically, here's how you'd do it:

    1. You need to clone ChainsDD's Superuser.apk into your source tree
    Code:
    cd ~/android/system/packages/apps
    git clone -b gingerbread http://github.com/chainsdd/android_packages_apps_Superuser.git Superuser

    2. Next, you need to disable the original su binary from being built. In a console/terminal, type
    Code:
    gedit ~/android/system/system/extras/su/Android.mk

    Then replace all text in the file with this
    Code:
    ifeq ($(BUILD_ORIGINAL_SU),true)
    
    LOCAL_PATH:= $(call my-dir)
    include $(CLEAR_VARS)
    
    LOCAL_SRC_FILES:= su.c
    
    LOCAL_MODULE:= su
    
    LOCAL_FORCE_STATIC_EXECUTABLE := true
    
    LOCAL_STATIC_LIBRARIES := libc
    
    LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
    LOCAL_MODULE_TAGS := debug
    
    include $(BUILD_EXECUTABLE)
    
    endif

    That's it. Superuser.apk and su binary are included in every build after.
    1
    Feel Free to add my two gingerbread kernels :p

    2.6.35.10_AVS-950mV_CFS-GB_20110110_0001 OC & UV to 950mV

    2.6.35.10_AVS-925mV_CFS-GB_20110112_0025 UV to 925mV

    Both are compatible with AOSP gingerbread and based off my latest source... :cool:
    1
    Actually I was planning to do so ^_^, but I would appreciate if someone could help me, if someone post a detailed git repo guide y will post it in OP. If not ill do it myself when I get back to my normal computer. I really like it when people contribute here ^_^
    1
    TBH it's pretty simple, make menuconfig and add the arm-linux-gnueabi- to the cross compile variable, then push to /system/bin and run "busybox --install -s /system/bin". Remember to delete eventual toolbox links before doing this, as the install process won't override them (i.e. ls).

    Here it is attached an update.zip I've made (Busybox 1.18.3)