01-16-2013 11:07 PM
1,060 ... 2122232425 ...
tools
  1. rukin5197's Avatar
    Jerry, you're a life saver. I felt stupid because I only forked a few things from BobZHome, and then got lost and decided to stay away from git until I learned a little more.
    It's so ironic
    02-20-2012 06:46 PM
  2. rukin5197's Avatar
    Then you need to set up the gingerbread branch in each directory:

    git branch -b gingerbread
    git checkout gingerbread

    I tried this and it gave me error: unknown switch: 'b'
    So I just did git branch ics and it ran fine.
    JerryScript likes this.
    02-20-2012 07:09 PM
  3. JerryScript's Avatar
    So I went ahead and forked all those repos, now about the remotes...

    Do I add remotes for all the repos on my local devbox, and is that just a matter of running:

    Code:
    git remote add origin git@github.com:YOUR_REPO_NAME/NAME_OF_REPO_DIRECTORY.git
    for each of the repos? and then also should i do the same for each of the IHO repos to keep my forked repos synced with the IHO repo?

    Sorry, hope this makes sense. Thanks so much for the help, I'm already starting to understand this better.

    *EDIT* One more thing. I am developing for the LS670, and selected LS670 when I ran lunch. Just thought that might be helpful just in case there are any OV-specific repos I don't need or something. Thought it would be helpful to mention.
    You only need to add remotes to those repos you are making changes to, or are expecting to make changes to.

    Remember, all the packages you downloaded via repo sync come from other repositories, see your android/default.xml file for details about each package and where they sync from.
    02-20-2012 07:18 PM
  4. something15525's Avatar
    Alright, so I think I figured out a little more about the building process.

    I took a look at the default.xml file in the android repository I forked from IHO, and I'm pretty sure I now know how the rest of the repositories fit in. For example, on line 235:

    Code:
      <project path="frameworks/base" name="inferiorhumanorgans/android_frameworks_base" />
    I'm guessing if i replace "inferiorhumanorgans/android_frameworks_base" with "something15525/android_frameworks_base" that it would now grab from my repo instead of the IHO repo.

    One more thing...on line 322:

    Code:
      <project path="system/bluetooth" name="inferiorhumanorgans/android_system_bluetooth" />
    I went ahead and forked that repo as well, even though you didn't tell me to...

    How am I doing so far?

    *EDIT* One more thing:

    Is the default.xml file in the android repository what is responsible for syncing with the latest cyanogen upstream? I think this is actually starting to make sense!
    02-21-2012 02:43 PM
  5. rukin5197's Avatar
    Hey Jerry, I ran into an error last night that I couldn't for the life of me get past.
    So, doing what every great developer doesn't do, I deleted my ~/android/system file. (thinking that now because I've set up my repo, I can just sync from that and get everything back to the way it was.
    But, an odd thing, when I had my repo, I edited a file that wouldn't let me make bacon, so that it would. Then I pushed that change to github, and I saw it go in successfully.
    When I built from my repo today, it gave me the same error that I recieved before, even though I changed it. It wasn't so hard to change it again, but it got to me a little. How come I edited a file and it didn't go through in a repo sync?

    Hopefully this was specific enough. I'm a git noob, in case you haven't noticed yet..
    02-21-2012 04:02 PM
  6. rukin5197's Avatar
    And one more question while I'm at it.. (this is going to sound real stupid, lol)
    How do you delete an apk from being in your build anymore?
    I tried deleting it from /out/target/product/thunderc/system/app, but it just keeps showing up after make bacon.
    I do realize that there is a directory that tells the terminal to put the apk in there, (hence the word "out")
    but I can't find that directory for the life of me.
    This will save a lot of my time with the process
    02-21-2012 04:13 PM
  7. tdm's Avatar
    And one more question while I'm at it.. (this is going to sound real stupid, lol)
    How do you delete an apk from being in your build anymore?
    I tried deleting it from /out/target/product/thunderc/system/app, but it just keeps showing up after make bacon.
    I do realize that there is a directory that tells the terminal to put the apk in there, (hence the word "out")
    but I can't find that directory for the life of me.
    This will save a lot of my time with the process
    I'm not aware that you can, at least easily. Best is to find where the package is being referenced and remove it there.

    That said, I have done a little hook to the build script to install zip files (for the recent gapps inclusion) and you could use a similar mechanism (but again I don't recommend it).

    I called the script vendor/cm/tools/install_package.pl. I set PRODUCT_INSTALL_PACKAGE in my device .mk fragment to invoke it.

    Code:
    diff --git a/core/Makefile b/core/Makefile
    index fd1c06b..8ee89f9 100644
    --- a/core/Makefile
    +++ b/core/Makefile
    @@ -872,6 +872,9 @@ endef
     endif # INTERNAL_USERIMAGES_USE_EXT
     
     $(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE)
    +ifneq ($(PRODUCT_INSTALL_PACKAGE),)
    +       vendor/cm/tools/install_package.pl $(PRODUCT_INSTALL_PACKAGE) $(TARGET_OUT)
    +endif
            $(call build-systemimage-target,$@)
     
     INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img
    02-21-2012 04:31 PM
  8. JerryScript's Avatar
    Cool, looks like a semi-port of Pacman, which will come in handy! Thanks!
    02-21-2012 07:36 PM
  9. something15525's Avatar
    Alright, so I think I figured out a little more about the building process.

    I took a look at the default.xml file in the android repository I forked from IHO, and I'm pretty sure I now know how the rest of the repositories fit in. For example, on line 235:

    Code:
      <project path="frameworks/base" name="inferiorhumanorgans/android_frameworks_base" />
    I'm guessing if i replace "inferiorhumanorgans/android_frameworks_base" with "something15525/android_frameworks_base" that it would now grab from my repo instead of the IHO repo.

    One more thing...on line 322:

    Code:
      <project path="system/bluetooth" name="inferiorhumanorgans/android_system_bluetooth" />
    I went ahead and forked that repo as well, even though you didn't tell me to...

    How am I doing so far?

    *EDIT* One more thing:

    Is the default.xml file in the android repository what is responsible for syncing with the latest cyanogen upstream? I think this is actually starting to make sense!
    Sorry, did you guys see this? Just wondering if i'm doing things right....
    02-21-2012 08:29 PM
  10. JerryScript's Avatar
    Alright, so I think I figured out a little more about the building process.

    I took a look at the default.xml file in the android repository I forked from IHO, and I'm pretty sure I now know how the rest of the repositories fit in. For example, on line 235:

    Code:
      <project path="frameworks/base" name="inferiorhumanorgans/android_frameworks_base" />
    I'm guessing if i replace "inferiorhumanorgans/android_frameworks_base" with "something15525/android_frameworks_base" that it would now grab from my repo instead of the IHO repo.

    One more thing...on line 322:

    Code:
      <project path="system/bluetooth" name="inferiorhumanorgans/android_system_bluetooth" />
    I went ahead and forked that repo as well, even though you didn't tell me to...

    How am I doing so far?

    *EDIT* One more thing:

    Is the default.xml file in the android repository what is responsible for syncing with the latest cyanogen upstream? I think this is actually starting to make sense!
    Sorry it took a while to respond, I'm busy with ICS and finishing up some changes to CM7.2

    The /android/default.xml is what controls the packages that repo sync will grab.

    If you want to grab from a different repository, you need to add the details at the top of the file, use this as a template:
    Code:
      <remote  name="github"
               fetch="git://github.com/"
               review="review.cyanogenmod.com" />
    Change the name to something unique for your build, then lower down where you were looking, you'll be able to add your github as the leading qualifier, example:
    Code:
      <project path="system/bluetooth" name="JerryScript/android_system_bluetooth" />
    And yes, I forgot to include bluetooth as one of the repositories you should fork for IHO-CM7.2
    02-22-2012 08:50 AM
  11. JerryScript's Avatar
    Hey Jerry, I ran into an error last night that I couldn't for the life of me get past.
    So, doing what every great developer doesn't do, I deleted my ~/android/system file. (thinking that now because I've set up my repo, I can just sync from that and get everything back to the way it was.
    But, an odd thing, when I had my repo, I edited a file that wouldn't let me make bacon, so that it would. Then I pushed that change to github, and I saw it go in successfully.
    When I built from my repo today, it gave me the same error that I recieved before, even though I changed it. It wasn't so hard to change it again, but it got to me a little. How come I edited a file and it didn't go through in a repo sync?

    Hopefully this was specific enough. I'm a git noob, in case you haven't noticed yet..
    Did you ever push your changes to your github?

    Code:
    <make some changes>
    git commit -a -m "Commit message here"
    git push origin
    If you don't, then they won't be there when you sync.
    02-22-2012 08:52 AM
  12. JerryScript's Avatar
    And one more question while I'm at it.. (this is going to sound real stupid, lol)
    How do you delete an apk from being in your build anymore?
    I tried deleting it from /out/target/product/thunderc/system/app, but it just keeps showing up after make bacon.
    I do realize that there is a directory that tells the terminal to put the apk in there, (hence the word "out")
    but I can't find that directory for the life of me.
    This will save a lot of my time with the process
    The out directory is created in the build process. All files that end up there are referenced in the various make files. The main ones are /device/lge/thunderc/device_thunderc.mk and the common.mk and thunderc.mk files in the vendor tree.

    Notice in some make files, they pull in other make files, so you have to work your up/down the chain to be sure a file wasn't included elsewhere (ex: livewallpapers I believe are referenced more than once).

    Look for PRODUCT_COPY_PACKAGES and PRODUCT_COPY_FILES, those are the points of entry you need to edit.
    rukin5197 likes this.
    02-22-2012 08:57 AM
  13. something15525's Avatar
    Hey, I was wondering about the second bootlogo that comes up during boot, in this case, the Sprint logo on my LS670. How would I go about changing that to something else?
    02-28-2012 02:48 AM
  14. JerryScript's Avatar
    You have to extract the ramdisk, edit/replace the initlogo.rle, then repack the ramdisk, and finally use flash_image or pack it into an update zip to place it on your phone.

    Asadullah has some video tutorials, should be easy to google.
    02-28-2012 07:08 AM
  15. something15525's Avatar
    Awesome, ill check it out. Thanks!

    Sent from my LG-LS670 using Tapatalk
    02-28-2012 10:43 AM
  16. JerryScript's Avatar
    I made a few changes to the notification dropdown background chooser. I finally figured out how to use the built in cropping intent. Now users can choose an image via any app that supports the appropriate intent, ie gallery, filemanagers, and other apps. I also fully incorporated the code into CMParts rather than use a helper app. Changes will be pushed to github after a bit of testing.

    Here's the major code change to CMParts/src/com/cyanogenmod/cmparts/activities/UIStatusBarActivity.java:
    Code:
     // begins at line 281 in my repo, yours will differ
           } else if (preference == mTransparentNotificationBackgroundPref) {
                int transparentNotificationBackgroundPref = Integer.parseInt(String.valueOf(newValue));
                if (transparentNotificationBackgroundPref == 5) {
                    Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
                    intent.setType("image/*");
                    intent.putExtra("crop", "true");
                    intent.putExtra("scale", true);
                    intent.putExtra("scaleUpIfNeeded", false);
                    intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
                    int width = getWindowManager().getDefaultDisplay().getWidth();
                    int height = getWindowManager().getDefaultDisplay().getHeight();
                    Rect rect = new Rect();
                    Window window = getWindow();
                    window.getDecorView().getWindowVisibleDisplayFrame(rect);
                    int statusBarHeight = rect.top;
                    int contentViewTop = window.findViewById(Window.ID_ANDROID_CONTENT).getTop();
                    int titleBarHeight = contentViewTop - statusBarHeight;
                    boolean isPortrait = getResources().getConfiguration().orientation ==
                        Configuration.ORIENTATION_PORTRAIT;
                    intent.putExtra("aspectX", isPortrait ? width : height - titleBarHeight);
                    intent.putExtra("aspectY", isPortrait ? height - titleBarHeight : width);
                    try {
                        notificationBackgroundImage.createNewFile();  // this is set above to /data/data/com.cyanogenmod.cmparts/files/nb_background
                        notificationBackgroundImage.setReadable(true, false);
                        notificationBackgroundImage.setWritable(true, false);
                        intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(notificationBackgroundImage));
                        intent.putExtra("return-data", false);
                        startActivityForResult(intent,REQUEST_CODE_PICK_FILE);
                    } catch (IOException e) {
                        Log.e("Picker", "IOException: ", e);
                    } catch (ActivityNotFoundException e) {
                        Log.e("Picker", "ActivityNotFoundException: ", e);
                    }
                }
                mNotificationBackgroundColor.setEnabled(transparentNotificationBackgroundPref == 2);
                Settings.System.putInt(getContentResolver(), Settings.System.TRANSPARENT_NOTIFICATION_BACKGROUND,
                        transparentNotificationBackgroundPref);
                return true;
    note- I cribbed a lot of this from the lockscreen background chooser
    cmerlyn likes this.
    02-29-2012 06:06 AM
  17. something15525's Avatar
    So I'm trying to fix the camera by using the liboemcamera.so from the VM670 folder for the LS670...

    I know it worked for thekraven...but i'm getting an error on the make.

    here it is:

    Code:
    packages/apps/Settings/src/com/android/settings/ConfirmLockFinger.java:181: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.ConfirmLockFinger.VerifyRunner
                        case AuthentecHelper.eAM_STATUS_LIBRARY_NOT_AVAILABLE:
                             ^
    packages/apps/Settings/src/com/android/settings/ConfirmLockFinger.java:188: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.ConfirmLockFinger.VerifyRunner
                        case AuthentecHelper.eAM_STATUS_USER_CANCELED:
                             ^
    packages/apps/Settings/src/com/android/settings/ConfirmLockFinger.java:195: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.ConfirmLockFinger.VerifyRunner
                        case AuthentecHelper.eAM_STATUS_UI_TIMEOUT:
                             ^
    packages/apps/Settings/src/com/android/settings/ConfirmLockFinger.java:207: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.ConfirmLockFinger.VerifyRunner
                        case AuthentecHelper.eAM_STATUS_CREDENTIAL_LOCKED:
                             ^
    packages/apps/Settings/src/com/android/settings/GfxEngineRelayService.java:62: incompatible types
    found   : com.android.settings.GfxEngineRelayService.RelayReceiverServiceImpl
    required: android.os.IBinder
            return new RelayReceiverServiceImpl();
                   ^
    packages/apps/Settings/src/com/android/settings/SecuritySettings.java:219: cannot find symbol
    symbol  : variable PASSWORD_QUALITY_FINGER
    location: class android.app.admin.DevicePolicyManager
                    case DevicePolicyManager.PASSWORD_QUALITY_FINGER:
                                            ^
    packages/apps/Settings/src/com/android/settings/SecuritySettings.java:410: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.SecuritySettings
                        case AuthentecHelper.eAM_STATUS_OK:
                             ^
    packages/apps/Settings/src/com/android/settings/SecuritySettings.java:412: cannot find symbol
    symbol  : method savedFingerExists()
    location: class com.android.internal.widget.LockPatternUtils
                            if (!mLockPatternUtils.savedFingerExists()) {
                                                  ^
    packages/apps/Settings/src/com/android/settings/SecuritySettings.java:413: cannot find symbol
    symbol  : method setLockFingerEnabled(boolean)
    location: class com.android.internal.widget.LockPatternUtils
                                mLockPatternUtils.setLockFingerEnabled(false);
                                                 ^
    packages/apps/Settings/src/com/android/settings/SecuritySettings.java:417: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.SecuritySettings
                        case AuthentecHelper.eAM_STATUS_LIBRARY_NOT_AVAILABLE:
                             ^
    packages/apps/Settings/src/com/android/settings/SecuritySettings.java:421: cannot find symbol
    symbol  : variable AuthentecHelper
    location: class com.android.settings.SecuritySettings
                        case AuthentecHelper.eAM_STATUS_USER_CANCELED:
                             ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    42 errors
    make: *** [out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Error 41
    Thats all I could get out of the terminal window.
    02-29-2012 09:59 PM
  18. JerryScript's Avatar
    Have you synced your repo recently?

    The AuthentecHelper is a part of the new fingerprint unlock features they are slowly rolling in.
    02-29-2012 10:05 PM
  19. something15525's Avatar
    Have you synced your repo recently?

    The AuthentecHelper is a part of the new fingerprint unlock features they are slowly rolling in.
    Yeah, I just synced...although i'm not sure how to pull updates and merge with my repos. Could that be the problem?
    02-29-2012 10:38 PM
  20. JerryScript's Avatar
    If you have set your android/default.xml with projects you forked from CM, then you need to pull the changes in manually from CM.

    1st time only:
    cd PACKAGE_DIRECTORY
    git branch gingerbread
    git checkout gingerbread
    git remote add cyanogen git://github.com/CyanogenMod/PACKAGE_NAME_HERE.git
    git pull cyanogen gingerbread

    After you have done this once, you can just fetch/merge or pull from then on.

    If you get conflict, go into the files listed and search for <<<<<<, there will be two sections, the code as it was before the merge, and the way it would be after the merge, you have to decide which code is what you need. Then you commit the resolved conflicts.

    git commit -a -m "Synced with CM and resolved conflicts in frameworks/base"
    (or some such message )
    02-29-2012 10:47 PM
  21. something15525's Avatar
    If you have set your android/default.xml with projects you forked from CM, then you need to pull the changes in manually from CM.

    1st time only:
    cd PACKAGE_DIRECTORY
    git branch gingerbread
    git checkout gingerbread
    git remote add cyanogen git://github.com/CyanogenMod/PACKAGE_NAME_HERE.git
    git pull cyanogen gingerbread

    After you have done this once, you can just fetch/merge or pull from then on.

    If you get conflict, go into the files listed and search for <<<<<<, there will be two sections, the code as it was before the merge, and the way it would be after the merge, you have to decide which code is what you need. Then you commit the resolved conflicts.

    git commit -a -m "Synced with CM and resolved conflicts in frameworks/base"
    (or some such message )
    I forked the repos from IHO...so shouldn't I be syncing with your repo?

    And also, will this fix my issue?
    02-29-2012 11:02 PM
  22. JerryScript's Avatar
    Even if you forked them from IHO, or my github, to get the changes from CM, you have to add the cyanogenmod remote and pull the changes in.

    Blarf doesn't pull in changes more than once a week or two, so you have do do it manually in order to keep all projects in sync with CM. I sometimes have working chnges I haven't committed and so I put off syncing till I'm ready.

    Notice that some projects are synced from CM by repo sync (default.xml) while others are synced from IHO or yours if you edited anything. Those not automatically synced from CM must be synced manually if their parent (IHO) repository hasn't already synced.
    02-29-2012 11:12 PM
  23. something15525's Avatar
    Hey there, just wondering if anyone knows how to change the MOD Version to your own..I can't seem to figure it out...
    03-02-2012 08:55 PM
  24. JerryScript's Avatar
    Hey there, just wondering if anyone knows how to change the MOD Version to your own..I can't seem to figure it out...
    vendor/cyanogen/products/cyanogen_thunderc.mk

    Look near the bottom for PRODUCT_RELEASE_NAME
    03-02-2012 11:31 PM
  25. something15525's Avatar
    vendor/cyanogen/products/cyanogen_thunderc.mk

    Look near the bottom for PRODUCT_RELEASE_NAME
    Alright, I found it, and it said IHO, changed it to something15525....

    Made another zip...and for some reason it says thunderc_LS670 now instead of IHO before.

    Doesn't say something15525...

    Any ideas?

    *EDIT* I'm trying a "make clean" and then another make bacon. Wish me luck!
    03-03-2012 02:46 AM
1,060 ... 2122232425 ...
LINK TO POST COPIED TO CLIPBOARD