kuoruan / Chromium-Android

Chromium Android Browser Source for Android Studio
384 stars 191 forks source link

sync_chromium.sh error #32

Open AviFix opened 5 years ago

AviFix commented 5 years ago

Hi

When trying to run the sync script i get this error: cp: target '/home/***/Chromium/app/src/main/java' is not a directory

The problom seams to be this line of code: "mkdir -p ${MODULES_DIR}/components/{autofill,components_base,embedder_support}/src/main/res"

it creates the "src" folder as "{src" and also created a footer named "{java,res,aidl},libs}".

trying to run this specific command manually creates the right folders, but via the script i get the error I'm using android 16. i'm running the script like this: sh ./sync_chromium.sh

Thanks

kuoruan commented 5 years ago

Use bash ./sync_chromium.sh or ./sync_chromium.sh

AviFix commented 5 years ago

Running with bash solved this issue.

Now i'm getting this error "cp: cannot stat '/home/**/chromium/src/third_party/android_async_task/java/src/': No such file or directory".

Does this mean something went wrong with the "install-build-deps-android" process?

Thanks

kuoruan commented 5 years ago

It means the Chromium source changed, you need to modify the script.

AviFix commented 5 years ago

Could yo please help me out with this?

I'm not quite sure where to start

Thanks

kuoruan commented 5 years ago

Delete this line:

${BASE_DIR}/third_party/android_async_task/java/src/* \

and try agin.

kuoruan commented 5 years ago

The sync script in the repo is only for the project version. Current is 70.0.3538.118.

If you want to use it in other version. you need to update the script yourself.

AviFix commented 5 years ago

OK

Thanks

AviFix commented 5 years ago

Hi

Could you help me out with the correct command for checking out the 70.0.3538.118 version?

I tried to run the following commands

After the last command i get this error:

src/native_client (ERROR)

[0:00:01] Started.

Error: Command 'git checkout --quiet 9a87d6b9de35325efb08321640879e79ed0dfcc9' returned non-zero exit status 128 in /home/aba/chromium/src/native_client fatal: reference is not a tree: 9a87d6b9de35325efb08321640879e79ed0dfcc9

What am i doing wrong?

Thanks

kuoruan commented 5 years ago
cd src/native_client
git fetch origin 9a87d6b9de35325efb08321640879e79ed0dfcc9
git checkout 9a87d6b9de35325efb08321640879e79ed0dfcc9
cd -
gclient sync
AviFix commented 5 years ago

Hi,

Thanks.

It seams i'm still missing something.

Here are the steps i'm doing:

After installing the APK i see the chromium version is 73.xxx, not 70.0.3538.118 as i expected.

What am i missing?

I really appreciate your help Thank

AviFix commented 5 years ago

@kuoruan Could you please help me out with this thing?

I could like to be able to complete the build and update processes.

Thanks

kuoruan commented 5 years ago

Go to https://chromium.googlesource.com/chromium/src/+refs and choose a tag you want.

git fetch --depth 5 origin +refs/tags/#tag:#tag
git checkout #tag
gclient sync

Then:

gn gen --args='target_os="android"' out/Default
cd out/Default
vi args.gn

Add the compile args.

cd -
autoninja -C out/Default chrome_public_apk
AviFix commented 5 years ago

Hi @kuoruan

I tryed to follow your instructions.

I ran this:

I get the following error:

`Syncing projects: 95% (196/206) src/v8

src/third_party/webrtc (ERROR)  ---------------------------------------- [0:00:53] Started. [0:01:03] From https://webrtc.googlesource.com/src [0:01:03] 9a4f38e..3793bb4 lkgr -> origin/lkgr [0:01:03] 02c4f15..e2e0000 master -> origin/master   ---------------------------------------- Error: Command 'git checkout --quiet 4ab51cb6d7d4530b344e63ed8274d1454b7a5f39' returned non-zero exit status 128 in /home/geoserver/chromium/src/third_party/webrtc fatal: reference is not a tree: 4ab51cb6d7d4530b344e63ed8274d1454b7a5f39`

Thank you for your time Avi

kuoruan commented 5 years ago

https://github.com/kuoruan/Chromium-Android/issues/32#issuecomment-446973880

AviFix commented 5 years ago

#32 (comment)

Hi @kuoruan Sorry but i don't understand.

If you could please explain in more details.

I really appreciate your help

Thank's again Avi

kuoruan commented 5 years ago

It' a bug of gclient script (maybe?). If you sync error, just go to the dir in the error log. Run git fetch origin #hash && git checkout #hash. Then gclient sync again.

AviFix commented 5 years ago

Hi @kuoruan

This seems to solve this issue Thanks