Skip to content

Commit

Permalink
Merge pull request #155 from devjangid15/WalletExtensionWithNewUI
Browse files Browse the repository at this point in the history
WootzApp Wallet Integration With Extensions
  • Loading branch information
pandey019 authored Jan 3, 2025
2 parents 1067c1e + 655b31d commit 56ea060
Show file tree
Hide file tree
Showing 22,351 changed files with 7,392,038 additions and 307,537 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
.gclient_previous_sync_commits
.gcs_entries
.cipd/

node_modules
__pycache__/
*.py[cod]
68 changes: 48 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ Create a chromium directory for the checkout and change to it (you can call this
mkdir ~/chromium && cd ~/chromium
fetch --nohooks --no-history android

gclient sync --nohooks --revision src@refs/tags/127.0.6489.0 --reset --upstream -D --force --no-history

gclient sync --nohooks --revision src@refs/tags/127.0.6489.0 --reset --upstream -D --force --no-history --shallow
```

When fetch completes, it will have created a hidden .gclient file and a directory called src in the working directory. The remaining instructions assume you have switched to the src directory:
```
```bash
cd src
```

#### Install additional build dependencies
Once you have checked out the code, run
```
```bash
build/install-build-deps.sh --android
```
Once you've run install-build-deps at least once, you can now run the Chromium-specific hooks, which will download additional binaries and other things you might need:
Expand All @@ -58,20 +58,16 @@ gclient runhooks

#### Setting up the build

#### Build Options:

##### Option 1: Generate the default Chromium APK
Run following command in ```chromium/src``` directory
```
```bash
gn args out/Default
```

and add following arguments:


```bash
target_os = "android"
target_cpu = "arm64"
target_cpu = "arm64" # or x64
```

##### Option 2: Generate an optimized APK (approximately 131 MB)
Expand All @@ -82,10 +78,9 @@ gn args out/Default
```
and add following arguments:


```bash
target_os = "android"
target_cpu = "arm"
target_cpu = "arm64" # or x64
is_official_build = true
is_debug = false
symbol_level = 0
Expand All @@ -97,21 +92,55 @@ remove_webcore_debug_symbols = true

#### Build Chromium
Build Chromium with Ninja using the command:
```
```bash
autoninja -C out/Default chrome_public_apk
```

### Installation Steps (building wootzapp):
change path to root directory or parent directory of your chromium build.
```
cd ..
Change path to root directory or parent directory of your chromium build.
```bash
cd ../..
git clone --depth 1 https://github.com/wootzapp/wootz-browser.git
```
Final Step
```
Adding Wootzapp on the top of chromium build.
```bash
sudo chmod -R u+w chromium/src/
cp -r wootz-browser/src/* chromium/src/
cd ~/chromium
```
#### Build Options: Add ` checkout_pgo_profiles ` in .gclient which is present in chromium directory.

##### Reference .gclient
```gn
solutions = [
{
"name": "src",
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"custom_deps": {},
"custom_vars": {
"checkout_pgo_profiles": True
},
},
]
target_os = ["android"]
```
#### Run Hooks
```bash
gclient runhooks
```

cd ~/chromium/src
### Final Step

```bash
cd src

#### Install WebUI deps With node v18
npm i --legacy-peer-deps
```

#### Build Wootzapp
```bash
autoninja -C out/Default chrome_public_apk
```

Expand All @@ -122,7 +151,6 @@ Structure](https://www.chromium.org/developers/how-tos/getting-around-the-chrome

This project is tested with BrowserStack.


## License

Wootzapp is licensed under the GNU Affero General Public License v3.0 and as commercial software. For commercial licensing, please contact us or raise an issue in this github.
Expand Down
17 changes: 13 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build_shell arch="x64" rebuild="yes": (configure arch rebuild)
run arch="x64":
# ANDROID_SERIAL=172.17.0.2:5555 src/out/Debug_{{arch}}/bin/chrome_public_apk run -vvv
ANDROID_SERIAL=$DEVICE src/out/Debug_{{arch}}/bin/chrome_public_apk run
ANDROID_SERIAL=$DEVICE src/out/Debug_{{arch}}/bin/chrome_public_apk run # --args="--enable-logging=stderr --v=3"
install arch="x64":
ADB_TRACE="all adb" ANDROID_SERIAL=172.17.0.2:5555 adb install -r -t src/out/Debug_{{arch}}/apks/WootzApp.apk
Expand All @@ -50,7 +50,16 @@ run_shell arch="x64":
ANDROID_SERIAL=$DEVICE src/out/Debug_{{arch}}/bin/content_shell_apk run --args='--disable-fre' 'data:text/html;utf-8,<html>Hello World!</html>'
symbolize arch="x64":
ANDROID_SERIAL=$DEVICE adb logcat -d | src/third_party/android_platform/development/scripts/stack --output-directory src/out/Debug_{{arch}}
ANDROID_SERIAL=$DEVICE adb logcat -d | src/third_party/android_platform/development/scripts/stack --output-directory src/out/Debug_{{arch}} && adb logcat -c
bundle:
rm -f src/out/Release_arm64/apks/WootzBundle.apks
java -jar src/third_party/android_build_tools/bundletool/bundletool.jar build-apks \
--bundle=src/out/Release_arm64/apks/WootzApp.aab \
--output=src/out/Release_arm64/apks/WootzBundle.apks
java -jar src/third_party/android_build_tools/bundletool/bundletool.jar install-apks \
--device-id=$DEVICE \
--apks=src/out/Release_arm64/apks/WootzBundle.apks
commit branch:
cd ../wootz-browser && git switch -C {{branch}} && git reset --hard HEAD
Expand All @@ -63,8 +72,8 @@ setup_device:
# DEVICE=$(docker inspect -f '{{{{range.NetworkSettings.Networks}}{{{{.IPAddress}}{{{{end}}' android-container):5555
#DEVICE=emulator-5554
adb connect $DEVICE
#ANDROID_SERIAL=$DEVICE adb root
#ANDROID_SERIAL=$DEVICE adb shell pm set-install-location 1
ANDROID_SERIAL=$DEVICE adb root
# ANDROID_SERIAL=$DEVICE adb shell pm set-install-location 1
ANDROID_SERIAL=$DEVICE adb shell settings put global development_settings_enabled 1
ANDROID_SERIAL=$DEVICE adb shell settings put global verifier_verify_adb_install 0
ANDROID_SERIAL=$DEVICE adb shell settings put global art_verifier_verify_debuggable 0
Expand Down
22 changes: 11 additions & 11 deletions src/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ deps = {
},

'src/chrome/browser/resources/preinstalled_web_apps/internal': {
'url': Var('chrome_git') + '/chrome/components/default_apps.git' + '@' + '3ca47d00648c126561056443c2c5f401c02eda9d',
'url': Var('chrome_git') + '/components/default_apps.git' + '@' + '3ca47d00648c126561056443c2c5f401c02eda9d',
'condition': 'checkout_src_internal',
},

Expand Down Expand Up @@ -4326,60 +4326,60 @@ deps = {
},

'src/components/autofill/core/browser/form_parsing/internal_resources': {
'url': Var('chrome_git') + '/chrome/components/autofill_regex_patterns.git' + '@' +
'url': Var('chrome_git') + '/components/autofill_regex_patterns.git' + '@' +
'feb267b80dd9df83ce4949470d5b1cc6214cd775',
'condition': 'checkout_src_internal',
},

'src/components/crash/core/app/internal': {
'url': Var('chrome_git') + '/chrome/components/crash.git' + '@' + '977755983e64eb91813875407050afcc7c1b6683',
'url': Var('chrome_git') + '/components/crash.git' + '@' + '977755983e64eb91813875407050afcc7c1b6683',
'condition': 'checkout_src_internal',
},

'src/components/metrics/internal': {
'url': Var('chrome_git') + '/chrome/components/metrics/internal.git' + '@' +
'url': Var('chrome_git') + '/components/metrics/internal.git' + '@' +
'ac51808a082f35a97395ebb49c74dca809bd7540',
'condition': 'checkout_src_internal',
},

'src/components/ntp_tiles/resources/internal': {
'url': Var('chrome_git') + '/chrome/components/ntp_tiles/resources.git' + '@' +
'url': Var('chrome_git') + '/components/ntp_tiles/resources.git' + '@' +
'48c257ae331a9c642af38b8f62cb2c789e2a7da6',
'condition': 'checkout_src_internal',
},

'src/components/optimization_guide/internal': {
'url': Var('chrome_git') + '/chrome/components/optimization_guide.git' + '@' +
'url': Var('chrome_git') + '/components/optimization_guide.git' + '@' +
'5015c9cb9b8a8b5bd5dcfd6cbaa7b41e1d2af2d7',
'condition': 'checkout_src_internal',
},

'src/components/plus_addresses/resources/internal': {
'url': Var('chrome_git') + '/chrome/components/plus_addresses/resources.git' + '@' +
'url': Var('chrome_git') + '/components/plus_addresses/resources.git' + '@' +
'4f595c87a18088bf7c43613ebae849f23559f725',
'condition': 'checkout_src_internal',
},

'src/components/resources/default_100_percent/google_chrome': {
'url': Var('chrome_git') + '/chrome/components/default_100_percent/google_chrome.git' + '@' +
'url': Var('chrome_git') + '/components/default_100_percent/google_chrome.git' + '@' +
'de2513c741f9caf5889b1300ea3e51ce3efc88b8',
'condition': 'checkout_src_internal',
},

'src/components/resources/default_200_percent/google_chrome': {
'url': Var('chrome_git') + '/chrome/components/default_200_percent/google_chrome.git' + '@' +
'url': Var('chrome_git') + '/components/default_200_percent/google_chrome.git' + '@' +
'515db2e8d702f1b0d2c7a3fa3140a338d306102c',
'condition': 'checkout_src_internal',
},

'src/components/resources/default_300_percent/google_chrome': {
'url': Var('chrome_git') + '/chrome/components/default_300_percent/google_chrome.git' + '@' +
'url': Var('chrome_git') + '/components/default_300_percent/google_chrome.git' + '@' +
'79dd350d2fee765ea02f603fc2ca140f20debb86',
'condition': 'checkout_src_internal',
},

'src/components/site_isolation/internal': {
'url': Var('chrome_git') + '/chrome/components/site_isolation.git' + '@' +
'url': Var('chrome_git') + '/components/site_isolation.git' + '@' +
'e0d8a7769c1daabb974bf0d229970534a0aede77',
'condition': 'checkout_src_internal',
},
Expand Down
5 changes: 5 additions & 0 deletions src/android_webview/browser/aw_permission_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,11 @@ void AwPermissionManager::CancelPermissionRequest(int request_id) {
case PermissionType::NFC:
case PermissionType::VR:
case PermissionType::AR:
case PermissionType::WOOTZ_ETHEREUM:
case PermissionType::WOOTZ_SOLANA:
// case PermissionType::WOOTZ_GOOGLE_SIGN_IN:
// case PermissionType::WOOTZ_LOCALHOST_ACCESS:

case PermissionType::STORAGE_ACCESS_GRANT:
case PermissionType::TOP_LEVEL_STORAGE_ACCESS:
case PermissionType::CAMERA_PAN_TILT_ZOOM:
Expand Down
16 changes: 16 additions & 0 deletions src/args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
target_os = "android"
target_cpu = "arm64"
enable_cardboard = false
enable_proguard_obfuscation = false
enable_hls_demuxer = false
enable_nacl = false
proprietary_codecs = true
ffmpeg_branding = "Chrome"
treat_warnings_as_errors=false
enable_extensions=true
is_java_debug = true
is_component_build = true
android_static_analysis = "off"
cc_wrapper="env CCACHE_SLOPPINESS=time_macros ccache"
# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
3 changes: 2 additions & 1 deletion src/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if (is_fuchsia) {
# TODO(crbug.com/40811643): Drop toolchain_has_rust and move the C++ parser into
# components/nacl to just run in-process there. Don't compile base::JSONReader
# on NaCL at all.
build_rust_json_reader = toolchain_has_rust && enable_rust_json
build_rust_json_reader = true

# Rust to C++ type conversions. Also can not be enabled while NaCl depends on
# //base.
Expand Down Expand Up @@ -4491,6 +4491,7 @@ if (is_android) {
"android/java/src/org/chromium/base/BuildInfo.java",
"android/java/src/org/chromium/base/BundleUtils.java",
"android/java/src/org/chromium/base/Callback.java",
"android/java/src/org/chromium/base/Callbacks.java",
"android/java/src/org/chromium/base/CallbackController.java",
"android/java/src/org/chromium/base/CollectionUtil.java",
"android/java/src/org/chromium/base/CommandLine.java",
Expand Down
Loading

0 comments on commit 56ea060

Please sign in to comment.