[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

heardamir

Senior Member
Jul 23, 2010
75
6
Melbourne
Samsung Galaxy S20
Hey there,
Long time reader, first time poster.

I had an idea that relates to Location and Security. In particular, the unlock patterns.
Ok, so what if we could set multiple unlock patterns (or PINs, Password etc.). Each new pattern, you could assign a function. So, you could have a pattern to jump straight to compose an SMS. Or, another unlock pattern to go straight to your music player.
I went as far as installing the SDK, but haven't been overly successful in attempting to complete any code whatsoever. I'm confident that I could do it, but, just need to be pointed in the right direction.

Regards, heardamir ;)
 

leonnib4

Senior Member
Mar 1, 2010
1,458
86
Paris
Hey there,
Long time reader, first time poster.

I had an idea that relates to Location and Security. In particular, the unlock patterns.
Ok, so what if we could set multiple unlock patterns (or PINs, Password etc.). Each new pattern, you could assign a function. So, you could have a pattern to jump straight to compose an SMS. Or, another unlock pattern to go straight to your music player.
I went as far as installing the SDK, but haven't been overly successful in attempting to complete any code whatsoever. I'm confident that I could do it, but, just need to be pointed in the right direction.

Regards, heardamir ;)

That is undeed a really good idea.

CM could implement that easly I think.
 

wdfowty

Retired Recognized Developer
Jun 18, 2010
1,653
520
S.F. Bay Area, California
Hey there,
Long time reader, first time poster.

I had an idea that relates to Location and Security. In particular, the unlock patterns.
Ok, so what if we could set multiple unlock patterns (or PINs, Password etc.). Each new pattern, you could assign a function. So, you could have a pattern to jump straight to compose an SMS. Or, another unlock pattern to go straight to your music player.
I went as far as installing the SDK, but haven't been overly successful in attempting to complete any code whatsoever. I'm confident that I could do it, but, just need to be pointed in the right direction.

Regards, heardamir ;)

That is undeed a really good idea.

CM could implement that easly I think.

Agreed. I do believe this exists in some form already in cyanogenmod 6.1. It wasn't an "unlock pattern," rather gestures in the lockscreen you could define in settings. Not sure if this helps or not :D
 

wdfowty

Retired Recognized Developer
Jun 18, 2010
1,653
520
S.F. Bay Area, California
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.
 
  • Like
Reactions: gcbxda and redvirus

mordokak

Retired Recognized Developer
Jun 9, 2010
199
30
Since http://koush.tandtgaming.com/recoveries/RomManager.apk is down (get-romanager script), compiling cm7 will fail if you dont allready have RomManager.apk downloaded, therefore you'll get this error.

Code:
make: *** No rule to make target `vendor/cyanogen/proprietary/RomManager.apk', needed by `out/target/product/passion/system/app/RomManager.apk'.  Stop.

To solve it, just place RomManager.apk in /vendor/cyanogen/proprietary folder, and compile

(you can get RomManager.apk here http://www.multiupload.com/HZID4H1XL0)
 

pendo

Senior Member
Jun 3, 2010
1,971
759
Tulsa, OK
I feel like I should already know this...


So you get synced up, and you get a few builds under your belt and now you want to start dabbling in editing some of the source files. What is the recommended way to do that? I have had a couple builds that didn't go so well, so I wanted to start over but I couldn't find a repo command that would not only sync, but replace any changed files.

I read a little bit on "branches" at source.android.com, but I'm afraid I didn't exactly follow....is that what I'm looking for?

Thanks
 

Rusty!

Senior Member
Jan 10, 2010
8,011
1,785
Portsmouth
Well the sources are basically text files, so fire them up in gedit and change values to suit.

Assuming this is what you meant and I haven't got the wrong end of the stick :D
 

pendo

Senior Member
Jun 3, 2010
1,971
759
Tulsa, OK
Well the sources are basically text files, so fire them up in gedit and change values to suit.

Assuming this is what you meant and I haven't got the wrong end of the stick :D

Hi Rusty :)

No that's not what I meant, but that's my fault for not describing it better. Ill try again....I've found myself in a position where I've made several changes to the source code (camera experiments, adding other stuff to the build, etc) and after all is said and done i end up scrapping the build, and want to start over. What's the best way to replace he files I edited with new ones and sync?

What I have done a few times is just toss my prior working folder and start a new one, but I know there's got to be a better way
 

Jack_R1

Senior Member
Aug 9, 2009
4,362
964
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.
 

elegos

Senior Member
Jul 25, 2009
464
129
Milano
Redmi K20 Pro
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).
 

gerard_f

Senior Member
Sep 25, 2008
485
1,460
Catalunya
Hi all, I have a question.
I have compiled a master anroid branch with the dferreira tutorial.
How can I add the (for example) trackball wake mod in the stock aosp ROM?
Thankssss :)
 

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)