Supercharging your Github workflow with hub - Android General

Github being the world's biggest code hosting platform is also an OSS powerhouse. Their most under popularised creation is hub.
According to the official website, "hub helps you win at git". I'll be covering the installation and use below, and we shall see if we win or not
Installation
Installation is clean and easy. Download the latest release from https://github.com/github/hub/releases and unzip the archive. You should see the following files
Code:
.:
bin etc install LICENSE README.md share
./bin:
hub
./etc:
hub.bash_completion.sh hub.zsh_completion README.md
./share:
man
./share/man:
man1
./share/man/man1:
hub.1
Executing a simple ./install will install the hub binary, the man pages, and the hub+git bash completion script. You need to do one additional step before you're ready to use hub. Add alias git=hub to your .bashrc and then save it. Now every new terminal is ready to use hub, by using our good old git invocation.
Before adding the alias :
Code:
[email protected]:~$ git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
checkout Switch branches or restore working tree files
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
merge Join two or more development histories together
rebase Forward-port local commits to the updated upstream head
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
After adding the alias:
Code:
[email protected]:~$ git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
checkout Switch branches or restore working tree files
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
merge Join two or more development histories together
rebase Forward-port local commits to the updated upstream head
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
These GitHub commands are provided by hub:
pull-request Open a pull request on GitHub
fork Make a fork of a remote repository on GitHub and add as remote
create Create this repository on GitHub and add GitHub as origin
browse Open a GitHub page in the default browser
compare Open a compare page on GitHub
release List or create releases (beta)
issue List or create issues (beta)
ci-status Show the CI status of a commit
You will see the second code snippet has some additional commands listed. We'll be going over all of these shortly.
Functionality
hub lets you simplify your clone commands. To clone your own repos, just specify the repo name, as in git clone local_manifests
Code:
[email protected]:~$ git clone local_manifests
Cloning into 'local_manifests'...
remote: Counting objects: 69, done.
remote: Total 69 (delta 0), reused 0 (delta 0), pack-reused 69
Receiving objects: 100% (69/69), 8.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (23/23), done.
Checking connectivity... done.
[email protected]:~$ cd local_manifests/
[email protected]:~/local_manifests$ git remote -v
origin [email protected]:MSF-Jarvis/local_manifests.git (fetch)
origin [email protected]:MSF-Jarvis/local_manifests.git (push)
To clone someone else's repo, just add the username to it
Code:
[email protected]:~$ git clone regalstreak/skadoosh
Cloning into 'skadoosh'...
remote: Counting objects: 176, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 176 (delta 10), reused 0 (delta 0), pack-reused 153
Receiving objects: 100% (176/176), 27.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (67/67), done.
Checking connectivity... done.
[email protected]:~$ cd skadoosh/
[email protected]:~/skadoosh$ git remote -v
origin [email protected]:regalstreak/skadoosh.git (fetch)
origin [email protected]:regalstreak/skadoosh.git (push)
All standard switches are supported as well, so you can pass -b cm-13.0 with the clone command.
hub also makes forking a very easy task, simply type git fork in a cloned repository's folder
Code:
[email protected]:~/skadoosh$ git fork
Updating MSF-Jarvis
From ssh://github.com/regalstreak/skadoosh
* [new branch] lol2 -> MSF-Jarvis/lol2
* [new branch] lolita -> MSF-Jarvis/lolita
new remote: MSF-Jarvis
[email protected]:~/skadoosh$ git remote -v
MSF-Jarvis [email protected]:MSF-Jarvis/skadoosh.git (fetch)
MSF-Jarvis [email protected]:MSF-Jarvis/skadoosh.git (push)
origin [email protected]:regalstreak/skadoosh.git (fetch)
origin [email protected]:regalstreak/skadoosh.git (push)
git fork --no-remote will fork the repo but will not add a remote as it did in the earlier example.
Another powerful feature of hub is the ability to create Pull Requests from the terminal. Here you can see me adding a commit to @regalstreak's automated ROM source compression script
Code:
[email protected]:~/skadoosh$ nano compress.bash
[email protected]:~/skadoosh$ git status
On branch lolita
Your branch is up-to-date with 'origin/lolita'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: compress.bash
no changes added to commit (use "git add" and/or "git commit -a")
[email protected]:~/skadoosh$ git add -A
[email protected]:~/skadoosh$ git commit -asm "Exodus 6.0"
You need a passphrase to unlock the secret key for
user: "Harsh Shandilya (MSF Jarvis) <[email protected]>"
4096-bit RSA key, ID A950D459, created 2016-08-21
[lolita 6972288] Exodus 6.0
1 file changed, 3 insertions(+), 3 deletions(-)
[email protected]:~/skadoosh$ git push MSF-Jarvis lolita
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 1014 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To [email protected]:MSF-Jarvis/skadoosh.git
aeff4d3..6972288 lolita -> lolita
I pushed this commit to my fork of the repo (I could have pushed directly as well, I'm a contributor ). Now we'll see how to start a PR from MSF-Jarvis/skadoosh to regalstreak/skadoosh, from the terminal.
To start a PR, use the following command
Code:
[email protected]:~/skadoosh$ git pull-request -h MSF-Jarvis:lolita -b regalstreak:lolita
https://github.com/regalstreak/skadoosh/pull/33
This command brings up a PR message editor that behaves much like the commit message editor we see all the time. Fill in and hit enter
create lets you, umm, create a new github repository from the current local repository. create also accepts some flags, which you'll see below
Code:
[email protected]:~/hub-rocks$ git status
On branch master
nothing to commit, working directory clean
[email protected]:~/hub-rocks$ git create -p -d "Super secret stuff here" hub-rocks
Updating origin
created repository: MSF-Jarvis/hub-rocks
[email protected]:~/hub-rocks$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 897 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To [email protected]:MSF-Jarvis/hub-rocks.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
the 'hub-rocks' at the end is the repository name, which defaults to the current directory name, and goes up the folder structure until a folder name is found that does not match the name of an existing repository.
The created repo
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
browse lets you visit specific pages of any repo
Code:
git browse MSF-Jarvis/android_device_google_seedmtk commits
will open the commits view of my device tree repo for seedmtk
Code:
git browse regalstreak/skadoosh pulls
will show the PRs on @regalstreak's skadoosh repo, and so on.
compare is a pretty straight-forward command, to show a webpage with the diff between two tags, commits, or branches or a permutation of both.
Code:
[email protected]:~/skadoosh$ git compare -u MSF-Jarvis lolita..lol2
will compare the lolita and lol2 branches on my fork of regalstreak/skadoosh
release lets you create a new release on your repository and also adds tags, and uploads assets.
Code:
[email protected]:~/git-repos/reg-api$ git release create -a app.py v1.0
Uploading assets (1/1)
https://github.com/MSF-Jarvis/reg-api/releases/tag/v1.0
Which results in
issue works in a similar way
Code:
[email protected]:~/git-repos/reg-api$ git issue create -m "No authorisation enforced on endpoints" -l BUG,Will\ be\ fixed,Enhancement
https://github.com/MSF-Jarvis/reg-api/issues/1
Result
ci-status will show the Travis-CI response code for the latest commit on the repo and may return one of, success, pending, failure. On repos where CI has not been enabled, this returns a 404.
This is just a minor introduction to the things hub can do for you. Play around, and you'll find some more hidden goodies

@MSF Jarvis Another useful and awesome thread. I will check it out when I get home .

Very cool. Also another convenient thing I started doing with Hub is being able to `git clone user/repo` rather than having to manually copy&paste link to the repo. I’m definitely gonna use this extensively.

JacobVR said:
Very cool. Also another convenient thing I started doing with Hub is being able to `git clone user/repo` rather than having to manually copy&paste link to the repo. I’m definitely gonna use this extensively.
Click to expand...
Click to collapse
I just realized you can use the same notation for 'git remote set-url' as well, now how cool is that

Related

Building rom from sources problem (32A)

I did all like there http://source.android.com/download
Then i tried to do http://github.com/koush/platform_vendor_htc_magic-open/blob/master/README.txt
And i have problem with building functional boot.img files with HTC offsets for the kernel:
[email protected]:~/mydroid$ pushd build
~/mydroid/build ~/mydroid
[email protected]:~/mydroid/build$ git cherry-pick 1e0847c2fcbe1b95464f32a719d2b9e620d1e6ec
Auto-merged core/Makefile
Finished one cherry-pick.
# Not currently on any branch.
nothing to commit (working directory clean)
[email protected]:~/mydroid/build$ git cherry-pick 6ea3b8856d656752c0310ca237ed99e7451be83b
Auto-merged core/Makefile
CONFLICT (content): Merge conflict in core/Makefile
Automatic cherry-pick failed. After resolving the conflicts,
mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result.
When commiting, use the option '-c 6ea3b88' to retain authorship and message.
[email protected]:~/mydroid/build$ popd
~/mydroid
[email protected]:~/mydroid$ pushd system/core
~/mydroid/system/core ~/mydroid
[email protected]:~/mydroid/system/core$ git cherry-pick 67eacb9affe645dea23c753fcca0776c33a5eb2a
fatal: Could not find 67eacb9affe645dea23c753fcca0776c33a5eb2a
Click to expand...
Click to collapse
Without this when i start phone with my rom i see only htc logo. What do i do?

Help with ROM build....

So I have decided to take on the task of building SlimBean using the latest Aries kernel. I believe I have everything setup correctly. Trouble is I am getting server timeout errors. I'm not so familiar with Linux and Git and am having trouble finding where these errors are occurring.
My build started like this:
I used the stickied thread and created a new folder inside my /android called "slimRoms"
Next step was to do the init and sync:
Code:
repo init -u git://github.com/SlimRoms/platform_manifest.git -b jb4.2 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
The reason that is different from the stickied thread is due to a local_manifests not found error. When I would open it it would say something like " you are being redirected" and would provived the link I used.
It goes threw the sync for a bit then errors out after maybe 5-10 minutes.
There is an error at line 1852 in the log.
Code:
52 77.8M 52 40.5M 0 0 520k 0 0:02:33 0:01:19 0:01:14 533kerror: Cannot fetch teamuserdebug/android_device_samsung_aries-common
Receiving objects: 1% (5737/383283), 1.65 MiB | 357 KiB/s
I get this as well:
Code:
[email protected]:~$ cd ~/android/slimRoms
[email protected]:~/android/slimRoms$ repo sync
Fetching projects: 4% (14/337) fatal: remote error: Git repository not found
fatal: remote error: Git repository not found
Fetching projects: 11% (38/337) % Total %
Is this just something I'll have to wait out? Or am I doing it all wrong :/

[TUTORIAL] How to git

To sync your changes, for the first time github says to do this:
Code:
git init
git add <FILE NAME>
git commit -m "Initial commit"
git remote add <remote name> <url>
git pull <remote> <branch>
git push <remote> <branch>
Sometimes that works... sometimes it doesn't
Real way:
Code:
git remote add LZkernel [URL]https://github.com/TeamFahQ/msm8660-common_lz_kernel.git[/URL]
git add -A
git commit -m "I made some changes"
git push LZkernel HEAD:jellybean
git pull <remote> <branch>
git push <remote> HEAD:<branch>
Example
Code:
git pull LZkernel HEAD:jellybean
git push LZkernel HEAD:jellybean
sync upstream
Code:
git remote add <NAME> <URL>
git pull <NAME> <BRANCH>
git push <remote> HEAD:<branch>
Example
Code:
git remote add Cyanogenmod https://github.com/CyanogenMod/android_kernel_samsung_msm8660-common.git
git pull Cyanogenmod jellybean
git push LZkernel HEAD:jellybean
Code:
git remote add TeamFahQ https://github.com/TeamFahQ/msm8660-common_lz_kernel.git
git pull TeamFahQ jellybean
git push Thomas-is-a-BAMF HEAD:jellybean
How bout git fetch?
Well, I'm still new to using fetch, but here's that basics
Now let's say you want to add some spicey goodness froma particular commit. So you go on github.com and
find that commit. It is represented but a code, i.e. cac585fcd52fa5ed2e0fbbc4d2b292575ccc10a2 (or the short/nice number cac585fcd5)
You can find this by going to that particular repo, clicking on "commits" at the top and then finding the commit you want to pick.
Here's how we are going to do it:
Code:
git remote add <NAME> <URL>
git fetch <NAME> <BRANCH> (or you can use git fetch --all)
Now that we have to commits, it time to choose our commit and pick it.
You will now type:
Code:
git cherry-pick <COMMIT NUMBER>
But it's not all that easy..normally. Let's say we have conflicts. Usually the output will tell you what files conflict. You can either use:
git mergetool and fix them one bye one (provided you have a comparing program like meld), or you can open the files and look at them in your text editor.
I woul;d have to say, it is much easier with something like meld or beyond compare. This allows you to see your current file the lines to be merged and
the upstream files. But the best rule I use is this:
everything from:
Code:
<<<<<<<< HEAD
to
=============
is what you currently have.
Everything below
Code:
=============
to
cherry-pick <COMMIT DESCRIPTION>
is what will be inserted. I typically delete everything between
Code:
<<<<<<<< HEAD
to
============
as well as the pointers
Code:
<<<<<<<< HEAD
to
============
cherry-pick <COMMIT DESCRIPTION>
Leaving the new code, and it usually works out...lol
Now the we have our conflicts fixed we now must commit and continue. Simply type:
Code:
git add -A
git cherry-pick --continue
This will bring up the commit in nano (terminal). At this point, if you have text to add, you can added it, press ctrl+x, etc...
Another useful tool. Say you looked at the upstream of which you forked your repo from and see they have updated a few thing, and you want/need to add those changes. You can chery-pick, or merge with upstream:
Code:
git merge <NAME> <BRANCH>
fix conflicts
Code:
git add -A (The commit will come up in terminal)
git push <NAME> HEAD:<BRANCH>
Now, let's say you made A LOT, or a few changes. You built and found out they didn't work like how you wanted. Or you accidentally made changes and wanted to revert back to you original source. Here's what you can do:
Code:
git log
This will give you all the current commit numbers. Note the commit you want to revert back to and copy the commit number only (type q to exit). Now you can type:
Code:
git reset --hard <COMMIT NUMBER>
Now you repo is back to it's pre oops state as I like to call it...lol
According to git, this will undo ALL your changes and restore your repo back to that particular commits state; however, I have found that if you added a completely new file, it does not remove it. To check, type:
Code:
git status
This will tell you any files that are untracked and files that you have un-commited changes. I frequently use this command to track where I am with a project,and I also run this command before I commit to make sure I don't miss noting or commiting all my changes.
Now let's say you made changes and pushed them, but found later that you made a mistake. So you quickly git reset then try to push. However, you get a fast forward fail broke, holy crap I don't know what to do error... Well, there is a fix for that:
Code:
git push -f <NAME> <BRANCH>
You WILL be removing ALL changes the occurred before the particular commit you reset. So be sure you don't reset too far back...
You can now build and test your changes. After you have verified everything is a go, you can now push your changes to your repo.
This is a living document. I would actually like to see this stickied for quicker, easier access. As I learn new things, I will add on to this tutorial. Enjoy!
Nice

Why can't I compile the msm android kernel?

I've been stuck at this for more than a week, so I'd appreciate any help.
What am I trying to do? (you can skip this part if you want)
I'm trying to do android kernel exploitation. That's not my current problem though. To learn kernel exploitation, I need to be able to get a version of android that is vulnerable to a certain vulnerability. So here's what I'm doing:
1. Going here to select a CVE that I want to learn how to exploit
2. After selecting a CVE, I need to select a build that is vulnerable to that CVE from here
3. Now that I have chosen a build (QQ3A.200805.001 in my case), I note its branch name (android-10.0.0_r41 in my case)
4. Now I need to be able to run this build in the android emulator (qemu) once as a production build, and once with KASAN+KCOV+debugging symbols for gdb
Before I begin, I'm following these guides:
1. https://source.android.com/devices/tech/debug/kasan-kcov
2. https://source.android.com/setup/build/building-kernels-deprecated
3. Google
My Setup:
I did this to download everything I need:
Bash:
git clone https://android.googlesource.com/kernel/msm
cd msm
git fetch --all --tags --prune
git checkout remotes/origin/android-msm-coral-4.14-android10
cd ..
mkdir AOSP
cd AOSP
repo init -u https://android.googlesource.com/platform/manifest
repo sync -j`nproc`
repo init -b android-10.0.0_r41
repo sync -j`nproc`
cd ..
When I went to the AOSP directory and tried compiling with:
Bash:
source ./build/envsetup.sh
lunch aosp_flame-userdebug # For the Pixel 4
m
It compiled in 4 hours, but it worked.
My First Issue:
I then created this bash script in the main folder to try to compile the msm kernel normally (without KASAN/KCOV):
Bash:
###########
# Params: #
###########
ARCH=arm64
CONFIG=cuttlefish_defconfig
###########
# Script: #
###########
read -p "Compile with clang instead of gcc? [y/N] " USE_CLANG
if [ $USE_CLANG == y ] || [ $USE_CLANG == Y ]; then
COMPILER=clang
CC_PATH=$(pwd)/AOSP/prebuilts/clang/host/linux-x86/clang-r346389c/bin/
else
COMPILER=gcc
CC_PATH=$(pwd)/AOSP/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/
export CROSS_COMPILE=aarch64-linux-android-
fi
export ARCH=$ARCH
export PATH=$PATH:$CC_PATH
cd msm
make clean
make distclean
make $CONFIG
make CC=$COMPILER
When I run it with GCC, I get bombarded with depreciation warnings and I get an error:
Code:
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
...
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
When I run it with clang, I also get a ton of warnings and this error:
Code:
./arch/arm64/include/asm/stack_pointer.h:8:51: error: register 'sp' unsuitable for global register variables on this target
register unsigned long current_stack_pointer asm ("sp");
...
In file included from ./include/linux/kvm_host.h:14:
./include/linux/signal.h:81:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
Full outputs for the script can be found here (for gcc) and here (for clang). Basically my first issue is that I don't know why I'm getting these compilation errors. So any suggestions would be greatly appreciated.
My Second Issue:
Now, I am checking out the remotes/origin/android-msm-coral-4.14-android10 branch in the msm repo, but I think this isn't the way to go because I need the kernel version that corresponds to a certain build/branch (QQ3A.200805.001 or android-10.0.0_r41 in my case). I think I need to build the exact version that is precompiled in the AOSP repository.
For example, if I go to the AOSP/device/google/coral directory, and run git log, I get something like this:
Code:
commit 62d311ad7cfc3e76a5278634427596462069b44d (HEAD, tag: android-10.0.0_r41, tag: m/android-10.0.0_r41, aosp/android10-qpr3-release)
Merge: 7b91fff 0657c80
Author: android-build-team Robot <[email protected]>
Date: Wed Jun 10 23:45:11 2020 +0000
Merge cherrypicks of [11827366, 11829660, 11829049, 11829662, 11829647, 11829300, 11826697, 11829719, 11829051, 11829663, 11829664, 11829838, 11829052, 11829472, 11829586] into qt-qpr3-release
Change-Id: Ic126de75c24133f8d43df7c9d8f09059a9ca8089
commit 0657c80f016720f70ed6f9618f928a30e71f2b79
Author: wenchangliu <[email protected]>
Date: Tue Mar 24 18:11:18 2020 +0800
coral: Add seccomp policy for Codec2 process
Add seccomp policy for Codec2 process.
Bug: 149511958
Test: adb shell killall media.hwcodec
Change-Id: Iab64bd42ead0c5a27769a757007282c2dddf911d
(cherry picked from commit 3628a510a808a52c4ebf69958a8343928e5df3f2)
(cherry picked from commit 45a6093f3d085ca2a531c2607bd12dbc1eff6bf9)
commit 7b91fffc14afb41cf14772566272c72b37c36785
Merge: 2e7f1a3 e8c9484
Author: android-build-team Robot <[email protected]>
Date: Wed Jun 10 00:37:23 2020 +0000
...
Link for this exact commit/tag can be found here. However, there is no android-10.0.0_r41 tag in the msm source repo, so I don't know which version of the msm repo corresponds to the prebuilt one in the AOSP directory. And.. I don't know where to start looking tbh.
Any help is greatly appreciated.

Git fails on merging security updates 04/2022 (ArrowOS-11.0)

Hey,
I've downloaded the merge-push.sh from https://github.com/ArrowOS/arrow_scripts/blob/arrow/merge-push.sh and am now trying to update my local source (Android-11.0) with the latest Android-11 security updates (https://android.googlesource.com/platform, Branch android-security-11.0.0_r54).
This fails with Git error "fatal: refusing to merge unrelated histories".
My understanding of this error is, that the ArrowOS-Android-11 source (into which I want to merge) is unrelated to the AOSP-Android-11 source (from which I'm trying to receive the updates). If so, I cannot understand this problem, since the ArrowOS code should be a fork or something, such that it originates from the AOSP-Android-11 source.
I've also checked after the failed merge, changes of security update April 2022 have not been incorporated into the ArrowOS code - makes sense, Git failed.
Commands issued:
1. cd WORKING_DIR (in my case /mnt/arrowos/repo_orig)
2. deleting existing code in local copy, e.g. rm -rf packages/apps/Launcher3
3. python3 repo sync -c --force-sync --no-clone-bundle --no-tags -j12
4. git pull https://android.googlesource.com/platform/art android-security-11.0.0_r54
Result:
merging: git pull https://android.googlesource.com/platform/art android-security-11.0.0_r54
warning: keine gemeinsamen Commits
remote: Sending approximately 332.60 MiB ...
remote: Counting objects: 1, done
remote: Finding sources: 100% (329429/329429)
remote: Total 329429 (delta 196968), reused 329208 (delta 196968)
Empfange Objekte: 100% (329429/329429), 277.06 MiB | 2.86 MiB/s, fertig.
Löse Unterschiede auf: 100% (196968/196968), fertig.
Von https://android.googlesource.com/platform/art
* tag android-security-11.0.0_r54 -> FETCH_HEAD
fatal: verweigere den Merge von nicht zusammenhängenden Historien
How do I solve this?
Thanks a lot.
kniffte
Hey there,
alright, I resolved this by checking out the entire repo, not just the part provided by
python3 repo sync -c --force-sync --no-clone-bundle --no-tags -j12
which does not clone everything.
Afterwards, merge worked smoothless - except for the merge conflicts, of course.
Kniffte

Categories

Resources