ungoogled-software / ungoogled-chromium

Google Chromium, sans integration with Google
BSD 3-Clause "New" or "Revised" License
19.65k stars 803 forks source link

Add Android support #56

Closed emersion closed 4 years ago

emersion commented 7 years ago

I don't know how much Chromium for desktop and Chromium for Android share code, but it would be cool to have an ungoogled Android version.

xsmile commented 5 years ago

I created a configuration bundle and build scripts for Android at https://github.com/xsmile/ungoogled-chromium/tree/android. All patches are applied, domain substitution is done and system Clang is used for the build. Binary pruning is done only partially and multiple proprietary binaries and libraries - mainly SDK, NDK, Play Services - are used for the build. While the result is far from being "ungoogled", this should be a good start.

I'm not sure if it is a good idea to create a PR at this point, as the new android bundle can in theory depend on the common bundle for the most part but more changes would be needed.

Detailed descriptions of the changes can be found in the respective commit messages.

csagan5 commented 5 years ago

@xsmile you could use the commits of this project: https://gitlab.com/thermatk/Unobtainium/commits/liberated (in particular those with "kill" in the commit subject, which I use in Bromite).

It is going through the process of F-Droid inclusion so you have the same goal there (binaries removal).

xsmile commented 5 years ago

@csagan5 Thanks, this is interesting. It should speed up things a bit.

szepnapot commented 5 years ago

@xsmile Can you guide me a bit how to proceed further building the apk for Android? So far this is what I did:

git clone https://github.com/Eloston/ungoogled-chromium
cd ungoogled-chromium
git checkout android
mkdir -p build/src
./get_package.py android build/src/android
cd build/src
./android/build.sh

After a few mins it fails with Error: client not configured; see 'gclient config'.


Full log:

+ APK_TARGET=monochrome_public_apk
+ CHROMIUM_VERSION=69.0.3497.100
+ CHROMIUM_GIT=https://chromium.googlesource.com
+ GIT_ARGS='--depth 1 --no-tags'
+ BUNDLE=android
+++ readlink -f ./android/build.sh
++ dirname /home/ubuntu/ungoogled-chromium/build/src/android/build.sh
+ root=/home/ubuntu/ungoogled-chromium/build/src/android/..
+ source
+ cd /home/ubuntu/ungoogled-chromium/build/src/android/..
+ eval git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/tools/depot_tools.git
++ git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
remote: Counting objects: 1033, done
remote: Finding sources: 100% (1033/1033)
remote: Total 1033 (delta 149), reused 722 (delta 149)
Receiving objects: 100% (1033/1033), 2.58 MiB | 9.02 MiB/s, done.
Resolving deltas: 100% (149/149), done.
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/ubuntu/android-sdk-linux/tools:/home/ubuntu/android-sdk-linux/platform-tools:/usr/local/go/bin:/home/ubuntu/.go/bin:/home/ubuntu/depot_tools:/home/ubuntu/ungoogled-chromium/build/src/android/../depot_tools
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/ubuntu/android-sdk-linux/tools:/home/ubuntu/android-sdk-linux/platform-tools:/usr/local/go/bin:/home/ubuntu/.go/bin:/home/ubuntu/depot_tools:/home/ubuntu/ungoogled-chromium/build/src/android/../depot_tools
+ export DEPOT_TOOLS_UPDATE=0
+ DEPOT_TOOLS_UPDATE=0
+ eval git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/src.git -b 69.0.3497.100
++ git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/src.git -b 69.0.3497.100
Cloning into 'src'...
remote: Counting objects: 300065, done
remote: Finding sources: 100% (300065/300065)
remote: Total 300065 (delta 77089), reused 186961 (delta 77089)
Receiving objects: 100% (300065/300065), 942.29 MiB | 14.78 MiB/s, done.
Resolving deltas: 100% (77089/77089), done.
Note: checking out 'ff70b961e190bd36db35377bcd33873516bd1482'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

Checking out files: 100% (302020/302020), done.
+ ln -sf ungoogled_packaging/gclient.py .gclient
+ gclient sync --nohooks --no-history --shallow --revision=69.0.3497.100
Error: client not configured; see 'gclient config'
xsmile commented 5 years ago

@szepnapot Parts of the script rely on the presence of the directory build/src/ungoogled_packaging. Stick to the naming scheme at https://github.com/xsmile/ungoogled-chromium/blob/android/docs/building.md#build-a-tar-archive and gclient should run successfully.

szepnapot commented 5 years ago

@xsmile Thanks for the info, it went further but there is still something off when it tries to sync webrtc. fatal: reference is not a tree: 9110a54a60d9e0c69128338fc250319ddb751b5a


Full log:

+ APK_TARGET=monochrome_public_apk
+ CHROMIUM_VERSION=69.0.3497.100
+ CHROMIUM_GIT=https://chromium.googlesource.com
+ GIT_ARGS='--depth 1 --no-tags'
+ BUNDLE=android
+++ readlink -f ./ungoogled_packaging/build.sh
++ dirname /home/ubuntu/ungoogled-chromium/build/src/ungoogled_packaging/build.sh
+ root=/home/ubuntu/ungoogled-chromium/build/src/ungoogled_packaging/..
+ source
+ cd /home/ubuntu/ungoogled-chromium/build/src/ungoogled_packaging/..
+ eval git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/tools/depot_tools.git
++ git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
remote: Counting objects: 1033, done
remote: Finding sources: 100% (1033/1033)
remote: Total 1033 (delta 149), reused 720 (delta 149)
Receiving objects: 100% (1033/1033), 2.58 MiB | 7.86 MiB/s, done.
Resolving deltas: 100% (149/149), done.
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/ubuntu/android-sdk-linux/tools:/home/ubuntu/android-sdk-linux/platform-tools:/usr/local/go/bin:/home/ubuntu/.go/bin:/home/ubuntu/depot_tools:/home/ubuntu/ungoogled-chromium/build/src/ungoogled_packaging/../depot_tools
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/ubuntu/android-sdk-linux/tools:/home/ubuntu/android-sdk-linux/platform-tools:/usr/local/go/bin:/home/ubuntu/.go/bin:/home/ubuntu/depot_tools:/home/ubuntu/ungoogled-chromium/build/src/ungoogled_packaging/../depot_tools
+ export DEPOT_TOOLS_UPDATE=0
+ DEPOT_TOOLS_UPDATE=0
+ eval git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/src.git -b 69.0.3497.100
++ git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/src.git -b 69.0.3497.100
Cloning into 'src'...
remote: Counting objects: 300065, done
remote: Finding sources: 100% (300065/300065)
remote: Total 300065 (delta 77090), reused 186903 (delta 77090)
Receiving objects: 100% (300065/300065), 942.29 MiB | 13.75 MiB/s, done.
Resolving deltas: 100% (77090/77090), done.
Note: checking out 'ff70b961e190bd36db35377bcd33873516bd1482'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

Checking out files: 100% (302020/302020), done.
+ ln -sf ungoogled_packaging/gclient.py .gclient
+ gclient sync --nohooks --no-history --shallow --revision=69.0.3497.100
Syncing projects:  98% (152/155) src/third_party/skia
[0:07:46] Still working on:
[0:07:46]   src/third_party/android_tools
[0:07:46]   src/v8
[0:07:46]   src/third_party/angle/third_party/deqp/src

[0:07:56] Still working on:
[0:07:56]   src/third_party/android_tools
[0:07:56]   src/v8
[0:07:56]   src/third_party/angle/third_party/deqp/src

[0:08:06] Still working on:
[0:08:06]   src/third_party/android_tools
[0:08:06]   src/v8
[0:08:06]   src/third_party/angle/third_party/deqp/src

[0:08:16] Still working on:
[0:08:16]   src/third_party/android_tools
[0:08:16]   src/v8
[0:08:16]   src/third_party/angle/third_party/deqp/src

[0:08:26] Still working on:
[0:08:26]   src/third_party/android_tools
[0:08:26]   src/v8
[0:08:26]   src/third_party/angle/third_party/deqp/src

[0:08:36] Still working on:
[0:08:36]   src/third_party/android_tools
[0:08:36]   src/v8
[0:08:36]   src/third_party/angle/third_party/deqp/src

[0:08:46] Still working on:
[0:08:46]   src/third_party/android_tools
[0:08:46]   src/v8
[0:08:46]   src/third_party/angle/third_party/deqp/src

[0:08:56] Still working on:
[0:08:56]   src/third_party/android_tools
[0:08:56]   src/v8
[0:08:56]   src/third_party/angle/third_party/deqp/src

[0:09:06] Still working on:
[0:09:06]   src/third_party/android_tools
[0:09:06]   src/v8
[0:09:06]   src/third_party/angle/third_party/deqp/src

[0:09:16] Still working on:
[0:09:16]   src/third_party/android_tools
[0:09:16]   src/v8
[0:09:16]   src/third_party/angle/third_party/deqp/src

[0:09:26] Still working on:
[0:09:26]   src/third_party/android_tools
[0:09:26]   src/v8
[0:09:26]   src/third_party/angle/third_party/deqp/src

[0:09:36] Still working on:
[0:09:36]   src/third_party/android_tools
[0:09:36]   src/v8
[0:09:36]   src/third_party/angle/third_party/deqp/src

[0:09:46] Still working on:
[0:09:46]   src/third_party/android_tools
[0:09:46]   src/v8
[0:09:46]   src/third_party/angle/third_party/deqp/src

[0:09:56] Still working on:
[0:09:56]   src/third_party/android_tools
[0:09:56]   src/v8
[0:09:56]   src/third_party/angle/third_party/deqp/src

[0:10:06] Still working on:
[0:10:06]   src/third_party/android_tools
[0:10:06]   src/v8
[0:10:06]   src/third_party/angle/third_party/deqp/src

[0:10:11] Still working on:
[0:10:11]   src/third_party/android_tools
[0:10:11]   src/v8
[0:10:11]   src/third_party/angle/third_party/deqp/src

[0:11:11] Still working on:
[0:11:11]   src/third_party/android_tools
[0:11:11]   src/third_party/angle/third_party/deqp/src

[0:11:21] Still working on:
[0:11:21]   src/third_party/android_tools
[0:11:21]   src/third_party/angle/third_party/deqp/src

[0:11:28] Still working on:
[0:11:28]   src/third_party/android_tools
[0:11:28]   src/third_party/angle/third_party/deqp/src
Syncing projects: 100% (155/155) src/third_party/andro

src/third_party/webrtc (ERROR)
----------------------------------------
[0:03:20] Started.
[0:03:20]

________ running 'git init --bare /home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_gittmp_webrtc8JA4ly' in '/home/ubuntu/ungoogled-chromium/build/src'
[0:03:20] Initialized empty Git repository in /home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_gittmp_webrtc8JA4ly/

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://webrtc.googlesource.com/src.git --template=/home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_gittmp_webrtc8JA4ly /home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_webrtc_lCrbca' in '/home/ubuntu/ungoogled-chromium/build/src'
[0:03:20] Cloning into '/home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_webrtc_lCrbca'...
[0:03:22] remote: Sending approximately 258.75 MiB ...
[0:03:22] remote: Counting objects: 1
[0:03:23] remote: Counting objects: 25441
[0:03:24] remote: Counting objects: 69642
[0:03:25] remote: Counting objects: 125504
[0:03:26] remote: Counting objects: 175774
[0:03:27] remote: Counting objects: 233170
[0:03:28] remote: Counting objects: 277802
[0:03:29] remote: Counting objects: 318624, done
[0:03:29] remote: Finding sources:   1% (3187/318624)
[0:03:29] remote: Finding sources:  10% (31863/318624)
[0:03:30] remote: Finding sources:  55% (175244/318624)
[0:03:31] remote: Finding sources:  58% (184802/318624)
[0:03:32] remote: Finding sources:  63% (200734/318624)
[0:03:34] remote: Finding sources:  67% (213479/318624)
[0:03:35] remote: Finding sources:  70% (223037/318624)
[0:03:36] remote: Finding sources:  83% (264458/318624)
[0:03:37] remote: Finding sources:  98% (312252/318624)
[0:03:38] remote: Finding sources: 100% (318624/318624)
[0:03:38] Receiving objects:   0% (1/318624)
[0:03:39] Receiving objects:   3% (9559/318624), 3.71 MiB | 3.71 MiB/s
[0:03:40] Receiving objects:   6% (19118/318624), 7.28 MiB | 3.63 MiB/s
[0:03:41] Receiving objects:  10% (31863/318624), 10.89 MiB | 3.63 MiB/s
[0:03:42] Receiving objects:  14% (44608/318624), 16.53 MiB | 4.13 MiB/s
[0:03:43] Receiving objects:  19% (60539/318624), 22.30 MiB | 4.55 MiB/s
[0:03:44] Receiving objects:  33% (105146/318624), 31.77 MiB | 5.44 MiB/s
[0:03:46] Receiving objects:  53% (171945/318624), 40.67 MiB | 5.98 MiB/s
[0:03:47] Receiving objects:  54% (172057/318624), 50.17 MiB | 6.84 MiB/s
[0:03:49] Receiving objects:  55% (177751/318624), 61.27 MiB | 7.37 MiB/s
[0:03:50] Receiving objects:  56% (180717/318624), 67.90 MiB | 7.30 MiB/s
[0:03:51] Receiving objects:  57% (183756/318624), 73.29 MiB | 7.24 MiB/s
[0:03:52] Receiving objects:  59% (187989/318624), 81.84 MiB | 6.04 MiB/s
[0:03:54] Receiving objects:  61% (194361/318624), 90.40 MiB | 5.88 MiB/s
[0:03:55] Receiving objects:  62% (198502/318624), 96.87 MiB | 5.78 MiB/s
[0:03:56] Receiving objects:  63% (202380/318624), 102.70 MiB | 5.92 MiB/s
[0:03:57] Receiving objects:  63% (203363/318624), 109.89 MiB | 5.62 MiB/s
[0:03:58] Receiving objects:  63% (203363/318624), 114.93 MiB | 5.44 MiB/s
[0:03:59] Receiving objects:  64% (203920/318624), 122.91 MiB | 5.77 MiB/s
[0:04:01] Receiving objects:  64% (207080/318624), 130.59 MiB | 5.64 MiB/s
[0:04:02] Receiving objects:  66% (210475/318624), 137.90 MiB | 5.62 MiB/s
[0:04:03] Receiving objects:  66% (210475/318624), 143.43 MiB | 5.58 MiB/s
[0:04:04] Receiving objects:  66% (211323/318624), 148.04 MiB | 5.03 MiB/s
[0:04:05] Receiving objects:  66% (211323/318624), 153.84 MiB | 5.16 MiB/s
[0:04:06] Receiving objects:  67% (213479/318624), 158.43 MiB | 5.00 MiB/s
[0:04:08] Receiving objects:  68% (216665/318624), 164.44 MiB | 4.65 MiB/s
[0:04:09] Receiving objects:  68% (219846/318624), 168.73 MiB | 4.58 MiB/s
[0:04:11] Receiving objects:  70% (226099/318624), 177.28 MiB | 4.17 MiB/s
[0:04:12] Receiving objects:  75% (238968/318624), 183.96 MiB | 4.33 MiB/s
[0:04:13] Receiving objects:  79% (251713/318624), 188.82 MiB | 4.45 MiB/s
[0:04:14] Receiving objects:  84% (267645/318624), 194.02 MiB | 4.73 MiB/s
[0:04:16] Receiving objects:  86% (275615/318624), 202.10 MiB | 5.03 MiB/s
[0:04:17] Receiving objects:  90% (286762/318624), 208.82 MiB | 5.51 MiB/s
[0:04:18] Receiving objects:  95% (302693/318624), 216.77 MiB | 5.61 MiB/s
[0:04:20] Receiving objects:  98% (313419/318624), 225.72 MiB | 5.87 MiB/s
[0:04:21] Receiving objects:  98% (313430/318624), 235.50 MiB | 5.91 MiB/s
[0:04:22] Receiving objects:  98% (313431/318624), 241.46 MiB | 6.07 MiB/s
[0:04:23] Receiving objects:  99% (315438/318624), 247.36 MiB | 6.26 MiB/s
[0:04:24] remote: Total 318624 (delta 242429), reused 318389 (delta 242429)
[0:04:24] Receiving objects: 100% (318624/318624), 258.90 MiB | 6.52 MiB/s
[0:04:25] Resolving deltas:   0% (0/242429)
[0:04:26] Resolving deltas:   7% (16984/242429)
[0:04:26] Resolving deltas:  10% (24243/242429)
[0:04:27] Resolving deltas:  19% (46902/242429)
[0:04:28] Resolving deltas:  28% (68202/242429)
[0:04:29] Resolving deltas:  37% (89803/242429)
[0:04:30] Resolving deltas:  49% (118831/242429)
[0:04:32] Resolving deltas:  50% (122001/242429)
[0:04:33] Resolving deltas:  52% (126068/242429)
[0:04:35] Resolving deltas:  53% (130850/242429)
[0:04:36] Resolving deltas:  56% (135860/242429)
[0:04:37] Resolving deltas:  58% (140609/242429)
[0:04:38] Resolving deltas:  60% (145462/242429)
[0:04:40] Resolving deltas:  61% (148509/242429)
[0:04:41] Resolving deltas:  63% (152753/242429)
[0:04:43] Resolving deltas:  64% (156725/242429)
[0:04:44] Resolving deltas:  66% (160004/242429)
[0:04:45] Resolving deltas:  68% (164856/242429)
[0:04:46] Resolving deltas:  70% (169706/242429)
[0:04:48] Resolving deltas:  71% (174199/242429)
[0:04:49] Resolving deltas:  74% (179503/242429)
[0:04:51] Resolving deltas:  76% (184257/242429)
[0:04:52] Resolving deltas:  77% (187508/242429)
[0:04:53] Resolving deltas:  79% (191538/242429)
[0:04:54] Resolving deltas:  81% (196369/242429)
[0:04:55] Resolving deltas:  83% (201440/242429)
[0:04:56] Resolving deltas:  85% (206066/242429)
[0:04:58] Resolving deltas:  86% (209161/242429)
[0:04:59] Resolving deltas:  88% (213352/242429)
[0:05:01] Resolving deltas:  89% (216486/242429)
[0:05:02] Resolving deltas:  91% (220748/242429)
[0:05:03] Resolving deltas:  93% (226282/242429)
[0:05:05] Resolving deltas:  95% (232586/242429)
[0:05:06] Resolving deltas:  96% (234634/242429)
[0:05:07] Resolving deltas:  99% (240006/242429)
[0:05:09] Resolving deltas:  99% (242200/242429)
[0:05:09] Resolving deltas: 100% (242429/242429)
[0:05:11] _____ Conflicting directory found in /home/ubuntu/ungoogled-chromium/build/src/src/third_party/webrtc. Moving to /home/ubuntu/ungoogled-chromium/build/src/_bad_scm/src/third_party/webrtckVLqAJ.
[0:05:11]

________ running 'git init --bare /home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_gittmp_webrtcrnSe3O' in '/home/ubuntu/ungoogled-chromium/build/src'
[0:05:11] Initialized empty Git repository in /home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_gittmp_webrtcrnSe3O/

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://webrtc.googlesource.com/src.git --template=/home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_gittmp_webrtcrnSe3O /home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_webrtc_pb8Nlh' in '/home/ubuntu/ungoogled-chromium/build/src'
[0:05:11] Cloning into '/home/ubuntu/ungoogled-chromium/build/src/src/third_party/_gclient_webrtc_pb8Nlh'...
[0:05:15] remote: Sending approximately 258.75 MiB ...
[0:05:15] remote: Counting objects: 1
[0:05:16] remote: Counting objects: 33361
[0:05:17] remote: Counting objects: 69642
[0:05:18] remote: Counting objects: 121625
[0:05:19] remote: Counting objects: 173703
[0:05:20] remote: Counting objects: 222523
[0:05:21] remote: Counting objects: 262144
[0:05:22] remote: Counting objects: 318624, done
[0:05:22] remote: Finding sources:   1% (3187/318624)
[0:05:22] remote: Finding sources:  10% (31863/318624)
[0:05:23] remote: Finding sources:  56% (178430/318624)
[0:05:24] remote: Finding sources:  60% (191175/318624)
[0:05:25] remote: Finding sources:  64% (203920/318624)
[0:05:26] remote: Finding sources:  67% (213479/318624)
[0:05:27] remote: Finding sources:  73% (232596/318624)
[0:05:28] remote: Finding sources:  87% (277203/318624)
[0:05:29] remote: Finding sources:  99% (315438/318624)
[0:05:29] remote: Finding sources: 100% (318624/318624)
[0:05:30] Receiving objects:   0% (1/318624)
[0:05:31] Receiving objects:   3% (9559/318624), 4.57 MiB | 4.54 MiB/s
[0:05:32] Receiving objects:   7% (22304/318624), 8.92 MiB | 4.43 MiB/s
[0:05:32] Receiving objects:  10% (31863/318624), 10.91 MiB | 4.34 MiB/s
[0:05:33] Receiving objects:  15% (47794/318624), 17.97 MiB | 5.12 MiB/s
[0:05:35] Receiving objects:  21% (66912/318624), 24.83 MiB | 5.50 MiB/s
[0:05:36] Receiving objects:  44% (140195/318624), 32.40 MiB | 6.17 MiB/s
[0:05:37] Receiving objects:  53% (171945/318624), 40.87 MiB | 6.64 MiB/s
[0:05:38] Receiving objects:  54% (172057/318624), 52.58 MiB | 6.95 MiB/s
[0:05:40] Receiving objects:  54% (175078/318624), 57.91 MiB | 6.65 MiB/s
[0:05:41] Receiving objects:  55% (177701/318624), 61.84 MiB | 5.84 MiB/s
[0:05:42] Receiving objects:  56% (180136/318624), 66.70 MiB | 5.73 MiB/s
[0:05:43] Receiving objects:  58% (184802/318624), 76.51 MiB | 4.64 MiB/s
[0:05:45] Receiving objects:  59% (188611/318624), 81.50 MiB | 4.76 MiB/s
[0:05:46] Receiving objects:  61% (194361/318624), 91.29 MiB | 4.79 MiB/s
[0:05:48] Receiving objects:  62% (197547/318624), 96.33 MiB | 4.92 MiB/s
[0:05:49] Receiving objects:  63% (201492/318624), 101.49 MiB | 5.01 MiB/s
[0:05:50] Receiving objects:  63% (203363/318624), 109.36 MiB | 5.11 MiB/s
[0:05:52] Receiving objects:  63% (203875/318624), 120.09 MiB | 5.83 MiB/s
[0:05:53] Receiving objects:  65% (207106/318624), 131.13 MiB | 6.01 MiB/s
[0:05:55] Receiving objects:  66% (210475/318624), 140.66 MiB | 6.23 MiB/s
[0:05:56] Receiving objects:  66% (211323/318624), 148.01 MiB | 6.19 MiB/s
[0:05:57] Receiving objects:  67% (213479/318624), 156.45 MiB | 6.68 MiB/s
[0:05:59] Receiving objects:  68% (219235/318624), 166.45 MiB | 7.22 MiB/s
[0:06:00] Receiving objects:  70% (224157/318624), 173.18 MiB | 7.21 MiB/s
[0:06:01] Receiving objects:  74% (235782/318624), 180.25 MiB | 7.15 MiB/s
[0:06:02] Receiving objects:  80% (254900/318624), 187.05 MiB | 6.79 MiB/s
[0:06:03] Receiving objects:  87% (277203/318624), 206.24 MiB | 8.06 MiB/s
[0:06:04] Receiving objects:  95% (302693/318624), 214.75 MiB | 8.39 MiB/s
[0:06:06] Receiving objects:  98% (313419/318624), 223.93 MiB | 8.95 MiB/s
[0:06:07] Receiving objects:  98% (313431/318624), 239.70 MiB | 9.78 MiB/s
[0:06:09] Receiving objects:  99% (318550/318624), 258.35 MiB | 9.67 MiB/s
[0:06:09] remote: Total 318624 (delta 242429), reused 318389 (delta 242429)
[0:06:09] Receiving objects: 100% (318624/318624), 258.35 MiB | 9.67 MiB/s
[0:06:09] Resolving deltas:   0% (0/242429)
[0:06:10] Resolving deltas:   9% (21819/242429)
[0:06:10] Resolving deltas:  10% (24244/242429)
[0:06:11] Resolving deltas:  23% (56120/242429)
[0:06:12] Resolving deltas:  38% (92361/242429)
[0:06:13] Resolving deltas:  50% (121223/242429)
[0:06:14] Resolving deltas:  52% (126074/242429)
[0:06:15] Resolving deltas:  54% (130913/242429)
[0:06:17] Resolving deltas:  57% (138190/242429)
[0:06:18] Resolving deltas:  60% (145465/242429)
[0:06:19] Resolving deltas:  62% (150307/242429)
[0:06:20] Resolving deltas:  64% (155156/242429)
[0:06:21] Resolving deltas:  66% (160653/242429)
[0:06:22] Resolving deltas:  68% (166531/242429)
[0:06:23] Resolving deltas:  72% (174560/242429)
[0:06:24] Resolving deltas:  74% (179466/242429)
[0:06:26] Resolving deltas:  76% (184258/242429)
[0:06:27] Resolving deltas:  78% (189130/242429)
[0:06:28] Resolving deltas:  80% (195532/242429)
[0:06:29] Resolving deltas:  83% (202449/242429)
[0:06:30] Resolving deltas:  85% (207139/242429)
[0:06:31] Resolving deltas:  87% (210934/242429)
[0:06:32] Resolving deltas:  89% (215764/242429)
[0:06:34] Resolving deltas:  92% (223037/242429)
[0:06:35] Resolving deltas:  94% (230007/242429)
[0:06:36] Resolving deltas:  97% (235212/242429)
[0:06:38] Resolving deltas:  99% (241534/242429)
[0:06:38] Resolving deltas: 100% (242429/242429)
[0:06:42] From https://webrtc.googlesource.com/src
[0:06:42]    6f5e84894e..bbdf0f67b3  master     -> origin/master
----------------------------------------
Error: Command 'git checkout --quiet 9110a54a60d9e0c69128338fc250319ddb751b5a' returned non-zero exit status 128 in /home/ubuntu/ungoogled-chromium/build/src/src/third_party/webrtc
fatal: reference is not a tree: 9110a54a60d9e0c69128338fc250319ddb751b5a

Warnings:
Conflicting directory /home/ubuntu/ungoogled-chromium/build/src/src/third_party/webrtc moved to /home/ubuntu/ungoogled-chromium/build/src/_bad_scm/src/third_party/webrtckVLqAJ.
csagan5 commented 5 years ago

@szepnapot that is a common issue; it happens because you need to fetch the remote. I suggest looking at how other people build Chromium/forks (examples: semi-abandoned project 1, abandoned project 2).

If you configure gclient to not fetch everything from upstream you will always get these errors.

xsmile commented 5 years ago

@szepnapot I changed the build script in an attempt to fix some issues, which should get you to the part where compilation starts. However, it fails here and I'm not sure why - apparently several required files are missing.

Most likely this can be worked around by avoiding the .gclient configuration file and letting depot_tools fetch everything, as csagan5 suggested. See https://github.com/xsmile/ungoogled-chromium/blob/android/packaging/android/build.sh.ungoogin#L38.

nikolowry commented 5 years ago

Just want to add https://github.com/nikolowry/bromite-builder is not abandoned -- I build roughly once or twice a month and push updates as needed. As soon as my schedule permits, I'll finalize a build bot that will be continuously monitoring and releasing builds.

wchen342 commented 5 years ago

@xsmile I was trying to build a recent version for android when I hit a strange error. Do you have any idea on this? I was using commands adapted from your android building script. I uploaded them here: https://gist.github.com/wchen342/7ef5e6e9a336d999778c3bacf1ea3c60 I cannot find any information related to this error, only the field names telling me that it has something to do with play services. It seems in recent versions src/build/android/play_services/update.py no longer exists, so I skipped that hook. Can that be possibly relative?

Edited: I figured it out. It is the domain substitution incorrectly replaced the namespace declaration in some AndroidManifest.xml files which caused some parser to fail.


[11689/24801] python ../../build/android/gyp/merge_manifest.py --depfile gen/android_webview/system_webview_apk__merge_manifests.d --build-vars build_vars.txt --root-manifest gen/android_webview/system_webview_apk/AndroidManifest.xml --output gen/android_webview/system_webview_apk_manifest/AndroidManifest.xml --extras @FileArg\(gen/android_webview/system_webview_apk.build_config:extra_android_manifests\)
FAILED: gen/android_webview/system_webview_apk_manifest/AndroidManifest.xml 
python ../../build/android/gyp/merge_manifest.py --depfile gen/android_webview/system_webview_apk__merge_manifests.d --build-vars build_vars.txt --root-manifest gen/android_webview/system_webview_apk/AndroidManifest.xml --output gen/android_webview/system_webview_apk_manifest/AndroidManifest.xml --extras @FileArg\(gen/android_webview/system_webview_apk.build_config:extra_android_manifests\)
Traceback (most recent call last):
  File "../../build/android/gyp/merge_manifest.py", line 180, in <module>
    main(sys.argv[1:])
  File "../../build/android/gyp/merge_manifest.py", line 150, in main
    fail_func=lambda returncode, stderr: returncode != 0 or
  File "/run/media/cwl_ws/Data/ungoogled-chromium-android/src/build/android/gyp/util/build_utils.py", line 227, in CheckOutput
    raise CalledProcessError(cwd, args, stdout + stderr)
util.build_utils.CalledProcessError: Command failed: ( cd /run/media/cwl_ws/Data/ungoogled-chromium-android/src/out/Default; java -cp ../../third_party/android_tools/sdk/tools/lib/common-26.0.0-dev.jar:../../third_party/android_tools/sdk/tools/lib/manifest-merger-26.0.0-dev.jar:../../third_party/android_tools/sdk/tools/lib/sdk-common-26.0.0-dev.jar:../../third_party/android_tools/sdk/tools/lib/sdklib-26.0.0-dev.jar com.android.manifmerger.Merger --out /run/media/cwl_ws/Data/ungoogled-chromium-android/src/out/Default/gen/android_webview/system_webview_apk_manifest/tmpxVOonXAndroidManifest.xml --libs gen/third_party/android_deps/android_arch_lifecycle_runtime_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_compat_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_core_ui_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_core_utils_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_fragment_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_media_compat_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_v4_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_support_vector_drawable_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_animated_vector_drawable_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_appcompat_v7_java/AndroidManifest.xml:gen/third_party/android_deps/com_android_support_recyclerview_v7_java/AndroidManifest.xml:gen/third_party/android_deps/com_google_android_gms_play_services_basement_java/AndroidManifest.xml:gen/third_party/android_deps/com_google_android_gms_play_services_base_java/AndroidManifest.xml --main /tmp/AndroidManifest.xmluyB8uT --property PACKAGE=com.android.webview )
/tmp/AndroidManifest.xmluyB8uT:9:5-89 Error:
    Missing one of the key attributes 'name,glEsVersion' on element uses-feature at AndroidManifest.xmluyB8uT:9:5-89
/tmp/AndroidManifest.xmluyB8uT:10:5-86 Error:
    Missing one of the key attributes 'name,glEsVersion' on element uses-feature at AndroidManifest.xmluyB8uT:10:5-86
/tmp/AndroidManifest.xmluyB8uT:12:5-66 Error:
    Missing 'name' key attribute on element uses-permission at AndroidManifest.xmluyB8uT:12:5-66
/tmp/AndroidManifest.xmluyB8uT:13:5-78 Error:
    Missing 'name' key attribute on element uses-permission at AndroidManifest.xmluyB8uT:13:5-78
/tmp/AndroidManifest.xmluyB8uT:16:21-121 Error:
    Missing 'name' key attribute on element meta-data at AndroidManifest.xmluyB8uT:16:21-121
/tmp/AndroidManifest.xmluyB8uT:17:13-23:24 Error:
    Missing 'name' key attribute on element activity at AndroidManifest.xmluyB8uT:17:13-23:24
/tmp/AndroidManifest.xmluyB8uT:18:17-21:33 Error:
    Missing one of the key attributes 'action#name,category#name' on element intent-filter at AndroidManifest.xmluyB8uT:18:17-21:33
/tmp/AndroidManifest.xmluyB8uT:19:21-78 Error:
    Missing 'name' key attribute on element action at AndroidManifest.xmluyB8uT:19:21-78
/tmp/AndroidManifest.xmluyB8uT:20:21-79 Error:
    Missing 'name' key attribute on element category at AndroidManifest.xmluyB8uT:20:21-79
/tmp/AndroidManifest.xmluyB8uT:22:17-113 Error:
    Missing 'name' key attribute on element meta-data at AndroidManifest.xmluyB8uT:22:17-113
/tmp/AndroidManifest.xmluyB8uT:24:13-180 Error:
    Missing 'name' key attribute on element provider at AndroidManifest.xmluyB8uT:24:13-180
/tmp/AndroidManifest.xmluyB8uT:27:17-160 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:27:17-160
/tmp/AndroidManifest.xmluyB8uT:28:17-221 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:28:17-221
/tmp/AndroidManifest.xmluyB8uT:29:17-160 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:29:17-160
/tmp/AndroidManifest.xmluyB8uT:30:17-223 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:30:17-223
/tmp/AndroidManifest.xmluyB8uT:32:9-107 Error:
    Missing 'name' key attribute on element meta-data at AndroidManifest.xmluyB8uT:32:9-107
/tmp/AndroidManifest.xmluyB8uT:33:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:33:13-279
/tmp/AndroidManifest.xmluyB8uT:34:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:34:13-279
/tmp/AndroidManifest.xmluyB8uT:35:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:35:13-279
/tmp/AndroidManifest.xmluyB8uT:36:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:36:13-279
/tmp/AndroidManifest.xmluyB8uT:37:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:37:13-279
/tmp/AndroidManifest.xmluyB8uT:38:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:38:13-279
/tmp/AndroidManifest.xmluyB8uT:39:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:39:13-279
/tmp/AndroidManifest.xmluyB8uT:40:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:40:13-279
/tmp/AndroidManifest.xmluyB8uT:41:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:41:13-279
/tmp/AndroidManifest.xmluyB8uT:42:13-279 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:42:13-279
/tmp/AndroidManifest.xmluyB8uT:43:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:43:13-281
/tmp/AndroidManifest.xmluyB8uT:44:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:44:13-281
/tmp/AndroidManifest.xmluyB8uT:45:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:45:13-281
/tmp/AndroidManifest.xmluyB8uT:46:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:46:13-281
/tmp/AndroidManifest.xmluyB8uT:47:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:47:13-281
/tmp/AndroidManifest.xmluyB8uT:48:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:48:13-281
/tmp/AndroidManifest.xmluyB8uT:49:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:49:13-281
/tmp/AndroidManifest.xmluyB8uT:50:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:50:13-281
/tmp/AndroidManifest.xmluyB8uT:51:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:51:13-281
/tmp/AndroidManifest.xmluyB8uT:52:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:52:13-281
/tmp/AndroidManifest.xmluyB8uT:53:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:53:13-281
/tmp/AndroidManifest.xmluyB8uT:54:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:54:13-281
/tmp/AndroidManifest.xmluyB8uT:55:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:55:13-281
/tmp/AndroidManifest.xmluyB8uT:56:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:56:13-281
/tmp/AndroidManifest.xmluyB8uT:57:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:57:13-281
/tmp/AndroidManifest.xmluyB8uT:58:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:58:13-281
/tmp/AndroidManifest.xmluyB8uT:59:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:59:13-281
/tmp/AndroidManifest.xmluyB8uT:60:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:60:13-281
/tmp/AndroidManifest.xmluyB8uT:61:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:61:13-281
/tmp/AndroidManifest.xmluyB8uT:62:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:62:13-281
/tmp/AndroidManifest.xmluyB8uT:63:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:63:13-281
/tmp/AndroidManifest.xmluyB8uT:64:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:64:13-281
/tmp/AndroidManifest.xmluyB8uT:65:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:65:13-281
/tmp/AndroidManifest.xmluyB8uT:66:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:66:13-281
/tmp/AndroidManifest.xmluyB8uT:67:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:67:13-281
/tmp/AndroidManifest.xmluyB8uT:68:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:68:13-281
/tmp/AndroidManifest.xmluyB8uT:69:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:69:13-281
/tmp/AndroidManifest.xmluyB8uT:70:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:70:13-281
/tmp/AndroidManifest.xmluyB8uT:71:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:71:13-281
/tmp/AndroidManifest.xmluyB8uT:72:13-281 Error:
    Missing 'name' key attribute on element service at AndroidManifest.xmluyB8uT:72:13-281
/tmp/AndroidManifest.xmluyB8uT:73:9-107 Error:
    Missing 'name' key attribute on element meta-data at AndroidManifest.xmluyB8uT:73:9-107
/tmp/AndroidManifest.xmluyB8uT Error:
    Validation failed, exiting
wchen342 commented 5 years ago

To anyone who is interested: I have successful built and tested 74.0.3729.169 for Android with SDK and NDK from libre Android rebuilds which is a free software rebuild of all the Android SDK components by some f-droid guys. Pruning, patching and domain substitutions are all applied. The whole NDK and most parts of the SDK is substituted with the rebuild version. There are still certain parts that rely on Google's binaries, but it is a step further in removing those dependencies.

I have set up a repo for it: ungoogled-chromium-android. More details can be found in README and the build script.

Eloston commented 5 years ago

@wchen342 Looks promising. Great work.

When you guys feel it's ready, I can fork a repo into ungoogled-software and add links to it.

csagan5 commented 5 years ago

@thestinger you might also be interested in this (https://github.com/wchen342/ungoogled-chromium-android)

csagan5 commented 4 years ago

@csagan5 I use the same python script from the main repo for pruning and substitution, just added two additional lists. You can just grab the two lists if you want.

@wchen342 yes, that worked. What is the current plan for this? @Eloston I would propose to merge the first part of this patch for example: https://github.com/wchen342/ungoogled-chromium-android/blob/master/patches/android-prune-domain-fix.patch

Because it should not affect the non-Android versions.

I am going to try to build @wchen342's version with Bromite patches on top, minus the binary pruning; I want to address that part later on.

Edit 1: so far everything is working correctly and it seems generally faster, however I think components/search_engines/prepopulated_engines.json should be removed from the domain_substitution.list: it prevents using Google as a search engine.

Edit 2: I have created https://github.com/Eloston/ungoogled-chromium/pull/850 to follow-up.

Eloston commented 4 years ago

Whoops, I forgot this issue is still open. I have already included Android support as https://github.com/ungoogled-software/ungoogled-chromium-android (which is already linked from the docs).

For some context, @csagan5's response is for https://github.com/bromite/bromite/issues/399#issuecomment-547525340

Thanks everyone who has contributed and stuck around!