Skip to content

Instantly share code, notes, and snippets.

@sourajitk
Last active April 6, 2024 16:48
Show Gist options
  • Save sourajitk/da8f2fed14a0266f0b7370704cdebbbf to your computer and use it in GitHub Desktop.
Save sourajitk/da8f2fed14a0266f0b7370704cdebbbf to your computer and use it in GitHub Desktop.
How to push AOSP Frameworks base to your own Github repository.

Let's start by cloning base.

Due to the sheer size and history of AOSP's frameworks_base repository, pushing it to GitHub isn't exactly straightforward. In this guide, I'll walk you through the entire process of pushing the contents of frameworks_base to a GitHub repository.

Let's start with cloning an older version of Android's frameworks_base.

Here, I have cloned:

https://github.com/aosp-mirror/platform_frameworks_base -b nougat-release

Push it!

Once cloned, push it to the repository you want to push it using HEAD:refs/heads/<branch-name-you-want>

Fetching and checking out the branch you want.

Once we are done with the initial push, we can now fetch the desired revision of AOSP's frameworks_base repo we want to push:

https://android.googlesource.com/platform/frameworks/base <the branch you wanna update to e.g. android-10.0.0_r40>

After the fetch is complete, we will git checkout FETCH_HEAD and this should give us all the changes we want along with history.

Pushing the final repo.

Now, force-push the contents to a Github repository and there you have it!

@rajatgupta1998
Copy link

pero as always

@techyminati
Copy link

Cool Thanks Sir, This Helped me Alot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment