[discussion/help] building miui 8 for oneplus x (patchrom project) - OnePlus X Q&A, Help & Troubleshooting

HI OnePlus X users, I know there are some thread about the same..but they are almost dead and the OP of that threads are busy in some other project like AOSP N (7.0),CM 14 ect..so i took an initiative to work on MIUI 8 (6.0.1).and working on it from last few days.
there is a build from a chinese dev shumxin which is out a day before.you can find that thread here
http://forum.xda-developers.com/oneplus-x/general/rom-miui-8-oneplus-x-ported-shumxin-t3479012
So come to the point I started working on MIUI patchrom project and took a oxygenOS 3.1.3 as base so started here
first command for building and results
HTML:
PATCHROM_BRANCH = marshmallow
ANDROID_PLATFORM = 23
PORT_ROOT = /home/faa/patchrom
ANDROID_TOP =
ANDROID_OUT =
PORT_PRODUCT = Unknown
USE_ANDROID_OUT =
ANDROID_BRANCH =
HOST_OS = linux
After that command for patching OxygenOS 3.1.3 framework to work with MIUI 8
HTML:
[email protected] ~/patchrom/onyx $ make firstpatch
/home/faa/patchrom/tools/patch_miui_framework.sh /home/faa/patchrom/android/base-framework /home/faa/patchrom/android `pwd`
<<< create temp directory to store the old, new source and destination smali code with .line removed
<<< compute the difference between /home/faa/patchrom/onyx/temp/old_smali/framework.jar.out and /home/faa/patchrom/onyx/temp/new_smali/framework.jar.out
<<< apply the patch into the /home/faa/patchrom/onyx/framework.jar.out
patching file /home/faa/patchrom/onyx/framework.jar.out/./smali/android/content/pm/PackageParser.smali
Hunk #1 succeeded at 9781 (offset 121 lines).
Hunk #2 succeeded at 9793 (offset 121 lines).
patching file /home/faa/patchrom/onyx/framework.jar.out/./smali/android/content/res/Resources.smali
Hunk #3 succeeded at 4580 (offset 53 lines).
patching file /home/faa/patchrom/onyx/framework.jar.out/./smali/android/app/ResourcesManager.smali
Hunk #1 FAILED at 213.
Hunk #2 succeeded at 1908 (offset 922 lines).
1 out of 2 hunks FAILED -- saving rejects to file /home/faa/patchrom/onyx/temp/reject/framework.jar.out/./smali/android/app/ResourcesManager.smali.rej
patching file /home/faa/patchrom/onyx/framework.jar.out/./smali/android/app/SystemServiceRegistry.smali
patching file /home/faa/patchrom/onyx/framework.jar.out/./smali/android/graphics/Bitmap.smali
patching file /home/faa/patchrom/onyx/framework.jar.out/./smali/com/android/internal/os/ZygoteInit.smali
Hunk #1 FAILED at 347.
patch: **** Can't reopen file /home/faa/patchrom/onyx/framework.jar.out/./smali/com/android/internal/os/ZygoteInit.smali : No such file or directory
<<< compute the difference between /home/faa/patchrom/onyx/temp/old_smali/services.jar.out and /home/faa/patchrom/onyx/temp/new_smali/services.jar.out
<<< apply the patch into the /home/faa/patchrom/onyx/services.jar.out
patching file /home/faa/patchrom/onyx/services.jar.out/./smali/com/android/server/wm/WindowManagerService.smali
Hunk #1 FAILED at 708.
1 out of 1 hunk FAILED -- saving rejects to file /home/faa/patchrom/onyx/temp/reject/services.jar.out/./smali/com/android/server/wm/WindowManagerService.smali.rej
patching file /home/faa/patchrom/onyx/services.jar.out/./smali/com/android/server/am/ActivityStack.smali
Hunk #1 FAILED at 6636.
1 out of 1 hunk FAILED -- saving rejects to file /home/faa/patchrom/onyx/temp/reject/services.jar.out/./smali/com/android/server/am/ActivityStack.smali.rej
patching file /home/faa/patchrom/onyx/services.jar.out/./smali/com/android/server/am/ActivityManagerService.smali
Hunk #1 succeeded at 94288 with fuzz 1 (offset 11309 lines).
patching file /home/faa/patchrom/onyx/services.jar.out/./smali/com/android/server/SystemServer.smali
Hunk #1 succeeded at 197 (offset 55 lines).
patching file /home/faa/patchrom/onyx/services.jar.out/./smali/com/android/server/policy/PhoneWindowManager.smali
Hunk #1 succeeded at 484 (offset 21 lines).
<<< compute the difference between /home/faa/patchrom/onyx/temp/old_smali/telephony-common.jar.out and /home/faa/patchrom/onyx/temp/new_smali/telephony-common.jar.out
<<< apply the patch into the /home/faa/patchrom/onyx/telephony-common.jar.out
<<< compute the difference between /home/faa/patchrom/onyx/temp/old_smali/wifi-service.jar.out and /home/faa/patchrom/onyx/temp/new_smali/wifi-service.jar.out
mv: cannot stat '/home/faa/patchrom/onyx/wifi-service.jar.out': No such file or directory
cp: cannot stat '/home/faa/patchrom/onyx/temp/dst_smali_orig/wifi-service.jar.out': No such file or directory
<<< apply the patch into the /home/faa/patchrom/onyx/wifi-service.jar.out
cp: cannot stat '/home/faa/patchrom/onyx/wifi-service.jar.out': No such file or directory
/home/faa/patchrom/tools/patch_miui_framework.sh: line 69: cd: /home/faa/patchrom/onyx/temp/dst_smali_orig/wifi-service.jar.out: No such file or directory
>>> patch miui into target framework is done. Please look at /home/faa/patchrom/onyx/temp/reject to resolve any conflicts!
After that got very few rejects(about 3-5) in temp/reject folder which I fixed(may be not) by following this thread
http://forum.xda-developers.com/chef-central/android/guide-patchrom-rejects-fixing-tutorial-t3203287

AFTER APPLYING PATCH GAVE A COMMAND TO MAKE FLASHABLE ZIP and MIpatchtool started to copy resources in Base rom i.e OxygenOS.zip
HTML:
make fullota
and got this
HTML:
[email protected] ~/patchrom/onyx $ make fullota
unzip >/dev/null -n oxygenOS.zip -d oxygenOS
unzip >/dev/null oxygenOS.zip -d out/ZIP
To add prebuilt files
cp: cannot stat 'oxygenOS/system/bin/app_process64': No such file or directory
/home/faa/patchrom/build/prebuilt.mk:6: recipe for target 'add-prebuilt-files' failed
make: [add-prebuilt-files] Error 1 (ignored)
mv: cannot stat 'out/ZIP/system/bin/app_process64_miui': No such file or directory
/home/faa/patchrom/build/prebuilt.mk:6: recipe for target 'add-prebuilt-files' failed
make: [add-prebuilt-files] Error 1 (ignored)
To add preintall files
Add miui prebuilt completed!
/home/faa/patchrom/tools/apktool --quiet d -f oxygenOS/system/framework/framework-res.apk -o out/framework-res
/home/faa/patchrom/tools/linux-x86/aapt p -f -x --auto-add-overlay --wlan-replace Wi-Fi --wlan-replace WiFi \
--min-sdk-version 23 --target-sdk-version 23 \
-S /home/faa/patchrom/miui/src/config-overlay/v6/platform/v23/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/config-overlay/v6/platform/v21/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/config-overlay/v6/common/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/I18N_res/v6/common/frameworks/base/core/res/res \
-S out/framework-res/res -A out/framework-res/assets \
-M out/framework-res/AndroidManifest.xml -F out/framework-res.apk
GOT WARNINGS AS FOLLOWS (SHORTEN)
warning: string 'transient_navigation_confirmation_long' has no default translation.
warning: string 'usb_choose_notification_title' has no default translation.
warning: string 'use_physical_keyboard' has no default translation.
warning: string 'wifi_display_notification_connected_message' has no default translation.
warning: string 'wifi_display_notification_connected_title' has no default translation.
warning: string 'wifi_display_notification_connecting_message' has no default translation.
warning: string 'wifi_display_notification_connecting_title' has no default translation.
warning: string 'wifi_display_notification_disconnect' has no default translation.
warning: string 'year_picker_description' has no default translation.
#@echo "9Patch png fix out/framework-res.apk..."
#/home/faa/patchrom/tools/fix_9patch_png.sh >/dev/null framework-res oxygenOS/system/framework out
/home/faa/patchrom/tools/apktool --quiet if -p out/apktool out/framework-res.apk
<<< build out/framework-res.apk completed!
Copy: out/framework-res.apk to out/ZIP/system/framework/framework-res.apk
>>> Install framework resources for apktool...
/home/faa/patchrom/tools/apktool --quiet if -p out/apktool /home/faa/patchrom/miui/system/framework-res/XXHDPI/framework-res.apk -t miui
install /home/faa/patchrom/miui/system/app/XXHDPI/miui/miui.apk
install /home/faa/patchrom/miui/system/framework-res/XXHDPI/framework-ext-res/framework-ext-res.apk
install /home/faa/patchrom/miui/system/app/XXHDPI/miuisystem/miuisystem.apk
/home/faa/patchrom/tools/linux-x86/aapt p -f -u --package-id 0x11 --rename-manifest-package com.miui.rom --auto-add-overlay -z --wlan-replace Wi-Fi --wlan-replace WiFi \

REMAINING CODES (HORTEN)
HTML:
--min-sdk-version 23 --target-sdk-version 23 \
-S /home/faa/patchrom/miui/src/I18N_res/v6/common/miui/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/frameworks/opt/ToggleManager/res -M /home/faa/patchrom/miui/src/frameworks/base/core/res/AndroidManifest.xml \
-I out/apktool/1.apk -I out/apktool/16.apk -I /home/faa/patchrom/build/empty-res/17.apk -F out/framework-ext-res.apk
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xhdpi/auto_disable_screenbuttons_float_bg_p.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xhdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xxhdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/boot_progress.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/float_notification_button_bg_n.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AND FINALLY
HTML:
/home/faa/patchrom/tools/apktool --quiet b out/framework -o out/framework.jar
out/framework/smali/android/view/Window.smali[101,0] The file must contain a .class directive
out/framework/smali/android/view/ThreadedRenderer.smali[3,0] The file must contain a .class directive
Exception in thread "main" brut.androlib.AndrolibException: java.util.concurrent.ExecutionException: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:129)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:69)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:376)
at brut.androlib.Androlib.buildSources(Androlib.java:335)
at brut.androlib.Androlib.build(Androlib.java:292)
at brut.androlib.Androlib.build(Androlib.java:268)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: java.util.concurrent.ExecutionException: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:124)
... 7 more
Caused by: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:142)
at brut.androlib.src.SmaliBuilder.access$000(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder$1.call(SmaliBuilder.java:98)
at brut.androlib.src.SmaliBuilder$1.call(SmaliBuilder.java:94)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
out/framework/smali/android/view/View.smali[2,0] The file must contain a .class directive
out/framework/smali/android/view/WindowManagerPolicy.smali[3,0] The file must contain a .class directive
out/framework/smali/android/view/MotionEvent.smali[24,0] The file must contain a .class directive
out/framework/smali/android/view/Surface.smali[14,0] The file must contain a .class directive
out/framework/smali/android/view/WindowManager$LayoutParams.smali[2,0] The file must contain a .class directive
out/framework/smali/android/view/SurfaceControl.smali[31,0] The file must contain a .class directive
out/framework/smali/com/android/internal/os/RuntimeInit.smali[576,0] The file must contain a .class directive
out/framework/smali/com/android/internal/os/Zygote.smali[3,0] The file must contain a .class directive

farooque7508 said:
REMAINING CODES (HORTEN)
--min-sdk-version 23 --target-sdk-version 23 \ -S /home/faa/patchrom/miui/src/I18N_res/v6/common/miui/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/frameworks/opt/ToggleManager/res -M /home/faa/patchrom/miui/src/frameworks/base/core/res/AndroidManifest.xml \ -I out/apktool/1.apk -I out/apktool/16.apk -I /home/faa/patchrom/build/empty-res/17.apk -F out/framework-ext-res.apk/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xhdpi/auto_disable_screenbuttons_float_bg_p.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xhdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xxhdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/boot_progress.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/float_notification_button_bg_n.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AND FINALLY
/home/faa/patchrom/tools/apktool --quiet b out/framework -o out/framework.jarout/framework/smali/android/view/Window.smali[101,0] The file must contain a .class directiveout/framework/smali/android/view/ThreadedRenderer.smali[3,0] The file must contain a .class directiveException in thread "main" brut.androlib.AndrolibException: java.util.concurrent.ExecutionException: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:129) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:69) at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:376) at brut.androlib.Androlib.buildSources(Androlib.java:335) at brut.androlib.Androlib.build(Androlib.java:292) at brut.androlib.Androlib.build(Androlib.java:268) at brut.apktool.Main.cmdBuild(Main.java:224) at brut.apktool.Main.main(Main.java:84)Caused by: java.util.concurrent.ExecutionException: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:124) ... 7 moreCaused by: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:142) at brut.androlib.src.SmaliBuilder.access$000(SmaliBuilder.java:64) at brut.androlib.src.SmaliBuilder$1.call(SmaliBuilder.java:98) at brut.androlib.src.SmaliBuilder$1.call(SmaliBuilder.java:94) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)out/framework/smali/android/view/View.smali[2,0] The file must contain a .class directiveout/framework/smali/android/view/WindowManagerPolicy.smali[3,0] The file must contain a .class directiveout/framework/smali/android/view/MotionEvent.smali[24,0] The file must contain a .class directiveout/framework/smali/android/view/Surface.smali[14,0] The file must contain a .class directiveout/framework/smali/android/view/WindowManager$LayoutParams.smali[2,0] The file must contain a .class directiveout/framework/smali/android/view/SurfaceControl.smali[31,0] The file must contain a .class directiveout/framework/smali/com/android/internal/os/RuntimeInit.smali[576,0] The file must contain a .class directiveout/framework/smali/com/android/internal/os/Zygote.smali[3,0] The file must contain a .class directive
Click to expand...
Click to collapse
Hi. I'm too trying to build... And stuck exactly at:
Zygote.smali[3,0] The file must contain a .class directive
Could you get past it?

@SalarX as you can see no replies in this thread...means no developers are interested in miui nor they are helping another people to do it..I am not an expert I need some help from experience developers is so important I think but unfortunately they are not helping..so I decided to quite this project.

farooque7508 said:
@SalarX as you can see no replies in this thread...means no developers are interested in miui nor they are helping another people to do it..I am not an expert I need some help from experience developers is so important I think but unfortunately they are not helping..so I decided to quite this project.
Click to expand...
Click to collapse
Okay...
But if something works I'll for sure tell you

Yeah thank you.

SalarX said:
Okay...
But if something works I'll for sure tell you
Click to expand...
Click to collapse
farooque7508 said:
Yeah thank you.
Click to expand...
Click to collapse
Hi, I am sorry to see the state of this thread.
Any chance the both of you are active on Telegram ?
We have super-active OnePlus X groups with all our developers, who are sometimes not as active on the forums due to personal reasons.
If you could PM me, I'd be too happy so share the Invite Links of our support chats.

i also getting same error .. anyone please help
Fap4k said:
REMAINING CODES (HORTEN)
HTML:
--min-sdk-version 23 --target-sdk-version 23 \
-S /home/faa/patchrom/miui/src/I18N_res/v6/common/miui/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/frameworks/base/core/res/res -S /home/faa/patchrom/miui/src/frameworks/opt/ToggleManager/res -M /home/faa/patchrom/miui/src/frameworks/base/core/res/AndroidManifest.xml \
-I out/apktool/1.apk -I out/apktool/16.apk -I /home/faa/patchrom/build/empty-res/17.apk -F out/framework-ext-res.apk
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xhdpi/auto_disable_screenbuttons_float_bg_p.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xhdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-xxhdpi/boot_logo.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/boot_progress.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/home/faa/patchrom/miui/src/frameworks/base/core/res/res/drawable-hdpi/float_notification_button_bg_n.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AND FINALLY
HTML:
/home/faa/patchrom/tools/apktool --quiet b out/framework -o out/framework.jar
out/framework/smali/android/view/Window.smali[101,0] The file must contain a .class directive
out/framework/smali/android/view/ThreadedRenderer.smali[3,0] The file must contain a .class directive
Exception in thread "main" brut.androlib.AndrolibException: java.util.concurrent.ExecutionException: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:129)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:69)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:376)
at brut.androlib.Androlib.buildSources(Androlib.java:335)
at brut.androlib.Androlib.build(Androlib.java:292)
at brut.androlib.Androlib.build(Androlib.java:268)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: java.util.concurrent.ExecutionException: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:124)
... 7 more
Caused by: brut.androlib.AndrolibException: Could not smali file: android/view/Window.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:142)
at brut.androlib.src.SmaliBuilder.access$000(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder$1.call(SmaliBuilder.java:98)
at brut.androlib.src.SmaliBuilder$1.call(SmaliBuilder.java:94)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
out/framework/smali/android/view/View.smali[2,0] The file must contain a .class directive
out/framework/smali/android/view/WindowManagerPolicy.smali[3,0] The file must contain a .class directive
out/framework/smali/android/view/MotionEvent.smali[24,0] The file must contain a .class directive
out/framework/smali/android/view/Surface.smali[14,0] The file must contain a .class directive
out/framework/smali/android/view/WindowManager$LayoutParams.smali[2,0] The file must contain a .class directive
out/framework/smali/android/view/SurfaceControl.smali[31,0] The file must contain a .class directive
out/framework/smali/com/android/internal/os/RuntimeInit.smali[576,0] The file must contain a .class directive
out/framework/smali/com/android/internal/os/Zygote.smali[3,0] The file must contain a .class directive
Click to expand...
Click to collapse
getting same error

himavanth.reddy925 said:
getting same error
Click to expand...
Click to collapse
It is due to wrong patch.

Fap4k said:
It is due to wrong patch.
Click to expand...
Click to collapse
how to correct the patch.. sir

himavanth.reddy925 said:
how to correct the patch.. sir
Click to expand...
Click to collapse
I am not sir bro..m still learning.
Refer to this video may you find a solution

First you need to know smali.

shumxin said:
First you need to know smali.
Click to expand...
Click to collapse
At last the guy is here. Please help the XDA devs trying to make MIUI. It's almost finished. (I think).
Anyways Good luck to the developers making MIUI. I'm totally here for testing the ROM. Thanks in advance for the ROM and Never Give UP!!

Fap4k said:
I am not sir bro..m still learning.
Refer to this video may you find a solution
Click to expand...
Click to collapse
thank u for providing video link
all rejects re patched.. but fullota has stoped with ana error
Code:
Recovery link files success
/home/hima/patchrom/tools/build_target_files.sh: line 154: ./customize_target_files.sh: Permission denied
/home/hima/patchrom/build/porting.mk:314: recipe for target 'fullota' failed
make: *** [fullota] Error 1
thanks in advance

himavanth.reddy925 said:
thank u for providing video link
all rejects re patched.. but fullota has stoped with ana error
thanks in advance
Click to expand...
Click to collapse
Looks like customize_target_file.sh denied permission..go to device folder and give execute permission to that particular file.

Thanks

I like this project and would donate for it

Related

[Q] libpcap static linking errors

Hello,
I have downloaded the libpcap in external folder from android source code using the Git and
repo. I used the toolcains of ndk (android-ndk-r5b) to compile the library following these
steps:
./configure --prefix=path-to-android-src/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
make clean
make
make install
and then a file libpcap.a is produced.
I have make a simple sniffer using libpcap (sniffer.c). When I try to compile it, these errors occur:
agcc sniffer.c libpcap.a
sniffer.c:9:18: error: pcap.h: No such file or directory
sniffer.c:19: warning: 'struct pcap_pkthdr' declared inside parameter list
sniffer.c:19: warning: its scope is only this definition or declaration, which is probably not what you want
sniffer.c: In function 'processPacket':
sniffer.c:23: warning: incompatible implicit declaration of built-in function 'printf'
sniffer.c:24: error: dereferencing pointer to incomplete type
sniffer.c:26: error: dereferencing pointer to incomplete type
sniffer.c:33: error: dereferencing pointer to incomplete type
sniffer.c: In function 'main':
sniffer.c:45: error: 'pcap_t' undeclared (first use in this function)
sniffer.c:45: error: (Each undeclared identifier is reported only once
sniffer.c:45: error: for each function it appears in.)
sniffer.c:45: error: 'descr' undeclared (first use in this function)
sniffer.c:46: error: 'PCAP_ERRBUF_SIZE' undeclared (first use in this function)
sniffer.c:62: warning: incompatible implicit declaration of built-in function 'printf'
sniffer.c:66: warning: incompatible implicit declaration of built-in function 'fprintf'
sniffer.c:66: error: 'stderr' undeclared (first use in this function)
sniffer.c:72: warning: incompatible implicit declaration of built-in function 'fprintf'
when I try to produce the object code in advance:
agcc -c sniffer.o sniffer.c
the same errors occured.
Can someone explain me how to solve this problem?
here is the alias of agcc I use in bashrc file:
./configure --prefix=/home/petsas/projects/mobile-attacks/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
Also, I have attached a file with the outputs of the commands above: configure, make and make install.
Thank you in advance!
I used the options -I and -L to specify the include and library files, and these errors are gone now..
Here is my new error log:
agcc --static -I /home/petsas/projects/mobile-attacks/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/include -L /home/petsas/projects/mobile-attacks/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/lib -o sniffer sniffer.c libpcap.a
/home/petsas/projects/mobile-attacks/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: libpcap.a(pcap-linux.o): Relocations in generic ELF (EM: 3)
/home/petsas/projects/mobile-attacks/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: libpcap.a(pcap-linux.o): Relocations in generic ELF (EM: 3)
/home/petsas/projects/mobile-attacks/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: libpcap.a(pcap-linux.o): Relocations in generic ELF (EM: 3)
libpcap.a: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
any ideas?
I'm not 100% sure, but if you want to build native library for android you shouldn't use ./configure script. You should create Android.mk file and build library using it. Android.mk file is a native build environment for Android.
Refer to android-ndk\docs\ANDROID-MK.html for more information.
Yeah!
Thank you Zuljin!!!
I put the libpcap direcotry into the android-ndk-r5b/samples, I modified a bit the Android.mdk
and the structure of the direcotry, so as to look like the other ones inside the samples dir and
I used the ndk-build command inside the android-ndk-r5b direcory:
ndk-build -C samples/android-ndk-r5b
All worked fine! I was able to produce a libpicap.so file, and put it in the phone using the
commands:
in android:
# su
# mount -o,rw remount /dev/block/mtdblock4 /system/lib
in my Desktop:
$ adb push libpcap.so /system/lib/
I made a simple sniffer, I compiled and linked with the libpcap.so and works perfectly in
my HTC Hero!
Hi,
I have also trying to build this libpcap on Android.
I have downloaded the source from platform_external_libpcap and put all these files under jni directory for a android-ndk project (default) and tried building using ndk-build script.
But nothing happens but the control returns plainly without compiling the .so or .a file.
Can you tell me how you organized the folders in ndk project.?
regards,
Vijayan
Hello Vijayan,
You have to make a directory i.e. libpcap and then inside this directory,
you've got to create another one named as jni and put there all the source
files, as you have done. Then, inside this directory (jni) create a file named as
Android.mk so that it contains the follow lines:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:=\
/bpf_dump.c\
/bpf/net/bpf_filter.c\
/bpf_image.c\
/etherent.c\
/fad-gifc.c\
/gencode.c\
/grammar.c\
/inet.c\
/nametoaddr.c\
/optimize.c\
/pcap.c\
/pcap-linux.c\
/savefile.c\
/scanner.c\
/version.c
LOCAL_CFLAGS:=-O2 -g
LOCAL_CFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -Dlinux -D__GLIBC__ -D_GNU_SOURCE
LOCAL_MODULE:= pcap
LOCAL_MODULE_FILENAME:= libpcap
LOCAL_LDLIBS := \
-ldl
include $(BUILD_SHARED_LIBRARY)
Then, you only have to type this command:
ndk-build -C <path-to-jni-direcotry>
That's all! Now, inside the libpcap directory, and in the path:
libpcap/libs/armeabi/ should have been created the file you want:
libpcap.so
Let me know if you have any problems,
Thanasis
Hi,
Thanks. Now I'm able to compile the libpcap.so.
using this .so I have compiled the jpcap-0.7 (C source fiiles) to generate libjpcap.so.
Then I have created my Sniffer Application on Android. I have added the jpcap.jar, jpcap.so and libpcap.so in the lib folder of my Application.
But when I call this line
NetworkInterface[] devices = JpcapCaptor.getDeviceList();
am getting the following runtime error:
FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: getDeviceList
at jpcap.JpcapCaptor.getDeviceList(Native Method)
at com.example.snifferapp.SnifferApp.onCreate(SnifferApp.java:26)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Click to expand...
Click to collapse
Can you tellme What is going wrong here ?
Thanks.
Vijay
Yes, I had the same problem with you when I tried to make a sniffing application
using another one known java wrapper of libpcap: the jNetPcap, and particularly
I couldn't get the devices through this call: Pcap.findAllDevs(alldevs, errbuf);
That's because, even if you have root privileges on the console of the phone, as
you have a rooted phone, you cannot raun an application as root. That's not possible.
You can do that, only if your application is signed with the key of the platform, that is
of the Android OS that runs inside your phone.. So, the only way is to built by yourself
the Android OS and put it into the mobile. And then you have to sign your application
with the key that you have used to sign the OS.
For more information you can look here:
http://stackoverflow.com/questions/5966603/jnetpcap-on-android-problem-with-findalldevs-method
Hi,
Thanks for your reply.
But its very confusing.
Can you tellme, Whether Its possible to run a client application into Android which can monitor the network traffic in the device by anymeans?
If then what are all the possible ways. (like jpcap, etc....)
My idea is to develop a simple client application. I cannot think of building the whole Android OS and loading it into each device.
Hope to get a reply.
Thanks,
Vijay
I haven't done it before, because I only experience with native
programs that do network monitoring..
I think there are two simple solutions here. The first one is what exactly
Shark does: A tcpdump is running in the background that produces
traffic traces (pcap files) and you can develop an application that in periodic
time intervals reads these files and produce some outputs to the user.
The other one solution I can imagine is to develop again a native sniffer in
C with libpcap and then for each packet you receive or better for a batch of
packets you receive, you can send it through sockets to you application for
further processing..
Hope that helps..
FYI: There is a new application in Android called faceniff that does the work of
firesheep. That is you can hijack web sessions from facebook users. How is it
possible this application to monitor the web traffic of the phone? I think that
uses a native sniffer for this.. I am not sure, but it is not open source..
Hi, I did the steps as you described above:
Create a dir 'libpcap' with subdir 'jni'
Download the 'platform_external_libpcap' from 'github.com/android/platform_external_libpcap' (based on original libpcap version 0.9.8) and put the files at 'libpcap/jni'
Change the 'Android.mk' (see post number 6 of this thread)
run 'path/to/ndk-build -C path/to/libpcap/ndk' (android-ndk-r6)
When I do the last step of this list no 'libpcap/libs/armeabi/libpcap.so' will be produced but I get this output (I can reproduce this behavior on ubuntu 10.04 x86_64 and on debian i586):
> <user>@<host>:~/android/libpcap$ path/to/android-ndk-r6/ndk-build -C /home/<user>/android/libpcap/jni
> make: Entering directory `/home/<user>/android/libpcap/jni'
> SharedLibrary : libpcap.so
> /home/<user>/android/libpcap/obj/local/armeabi/objs/pcap//grammar.o: In function `pcap_parse':
> /home/<user>/android/libpcap/jni/y.tab.c:1711: undefined reference to `pcap_lex'
> collect2: ld returned 1 exit status
> make: *** [/home/<user>/android/libpcap/obj/local/armeabi/libpcap.so] Error 1
> make: Leaving directory `/home/<user>/android/libpcap/jni'
Does someone know what this error means and how to solve this problem?
daim0nas said:
Yeah!
Thank you Zuljin!!!
I put the libpcap direcotry into the android-ndk-r5b/samples, I modified a bit the Android.mdk
and the structure of the direcotry, so as to look like the other ones inside the samples dir and
I used the ndk-build command inside the android-ndk-r5b direcory:
ndk-build -C samples/android-ndk-r5b
All worked fine! I was able to produce a libpicap.so file, and put it in the phone using the
commands:
in android:
# su
# mount -o,rw remount /dev/block/mtdblock4 /system/lib
in my Desktop:
$ adb push libpcap.so /system/lib/
I made a simple sniffer, I compiled and linked with the libpcapp.so and works perfectly in
my HTC Hero!
Click to expand...
Click to collapse
Can you post your libpcap for us please.

[Q] Building Error

Code:
No private recovery resources for TARGET_DEVICE mako
host C: mkbootimg <= system/core/mkbootimg/mkbootimg.c
prebuilts/tools/gcc-sdk/gcc: line 40: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/i686-linux-gcc: No such file or directory
make: *** [/home/karishnu/android/omni/out/host/linux-x86/obj/EXECUTABLES/mkbootimg_intermediates/mkbootimg.o] Error 127
real 2m7.172s
user 0m57.349s
sys 0m20.914s
[email protected]:~/android/omni$
I am using ubuntu 13.10.
What I have tried :
1. Reinstalling GCC and build-essentials
2. checked if i686-linux-gcc is present (it is)
3. resynced the repo many times
What I found :
mkbootimg.o is missing from the directory.
.................................................. .............................
Pls temme what to do. I have tried a lot to fix this problem but in vain. There are no other threads mentioning the same problem also.

Error while building CM 13 from source

Hello everyone!
I compile CyanogenMod 13 for my Galaxy Note 10.1. The whole process was perfect, but at the end I got an error:
Code:
Construct recovery from boot
mkdir -p /home/alex/Projects/cm13/out/target/product/n8000/obj/PACKAGING/recovery_patch_intermediates/
PATH=/home/alex/Projects/cm13/out/host/linux-x86/bin:$PATH /home/alex/Projects/cm13/out/host/linux-x86/bin/imgdiff /home/alex/Projects/cm13/out/target/product/n8000/boot.img /home/alex/Projects/cm13/out/target/product/n8000/recovery.img /home/alex/Projects/cm13/out/target/product/n8000/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
build/tools/generate-notice-files.py /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE.txt /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE_FILES/src
failed to reconstruct target deflate chunk 1 [(null)]; treating as normal
Traceback (most recent call last):
File "build/tools/generate-notice-files.py", line 191, in <module>
main(args)
File "build/tools/generate-notice-files.py", line 181, in main
file_md5sum = md5sum(filename)
File "build/tools/generate-notice-files.py", line 80, in md5sum
return hexify(sum.digest())
File "build/tools/generate-notice-files.py", line 65, in hexify
return ("%02x"*len(s)) % tuple(map(ord, s))
TypeError: ord() expected string of length 1, but int found
make: *** [build/core/Makefile:663: /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE.html] Ошибка 1
make: *** Ожидание завершения заданий…
It appears when I compile system.img. Boot and recovery images were built without any problems. I assume the problem lies in NOTICE files that generates by python script. I have two options: disable notice files generating or solve this problem. But I know nothing of this.
Hope for your help.

Help me anyone ....i was trying to build a custom rom for first time...(lineage os)

I am getting this errors while build Lineage os for moto e ...anyone help me.
Checking build tools versions...
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp
: Unused source files: \
build/core/binary.mk:1253: external/pdfium/third_party/pdfiu
mbigint.mk: libpdfiumbigint: Unused source files: bigint/Big
Integer.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc b
igint/BigUnsignedInABase.cc
frameworks/av/camera/cameraserver/Android.mk:18: Target has
integrated cameraserver into mediaserver. This is weakening
security measures introduced in 7.0
build/core/package_internal.mk:143: Empty argument supplied
to find-subdir-assets
find: ‘/home/fb_riki_fb/lineage/out/target/common/obj/SHARED
_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or
directory
build/core/package_internal.mk:143: Empty argument supplied
to find-subdir-assets
build/core/Makefile:34: warning: overriding commands for tar
get `/home/fb_riki_fb/lineage/out/target/product/condor/syst
em/bin/rild'
build/core/base_rules.mk:320: warning: ignoring old commands
for target `/home/fb_riki_fb/lineage/out/target/product/con
dor/system/bin/rild'
build/core/Makefile:34: warning: overriding commands for tar
get `/home/fb_riki_fb/lineage/out/target/product/condor/syst
em/lib/libril.so'
build/core/base_rules.mk:320: warning: ignoring old commands
for target `/home/fb_riki_fb/lineage/out/target/product/con
dor/system/lib/libril.so'
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/fb_riki_fb/lineage/out/host/linux-x86/b
in/dtbToolCM', needed by '/home/fb_riki_fb/lineage/out/targe
t/product/condor/dt.img', missing and no known rule to make
it
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/fb_riki_fb/lineage'
#### make failed to build some targets (01:20 (mm:ss)) ####
[email protected]:~/lineage#
Roybabu said:
I am getting this errors while build Lineage os for moto e ...anyone help me.
Checking build tools versions...
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp
: Unused source files: \
build/core/binary.mk:1253: external/pdfium/third_party/pdfiu
mbigint.mk: libpdfiumbigint: Unused source files: bigint/Big
Integer.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc b
igint/BigUnsignedInABase.cc
frameworks/av/camera/cameraserver/Android.mk:18: Target has
integrated cameraserver into mediaserver. This is weakening
security measures introduced in 7.0
build/core/package_internal.mk:143: Empty argument supplied
to find-subdir-assets
find: ‘/home/fb_riki_fb/lineage/out/target/common/obj/SHARED
_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or
directory
build/core/package_internal.mk:143: Empty argument supplied
to find-subdir-assets
build/core/Makefile:34: warning: overriding commands for tar
get `/home/fb_riki_fb/lineage/out/target/product/condor/syst
em/bin/rild'
build/core/base_rules.mk:320: warning: ignoring old commands
for target `/home/fb_riki_fb/lineage/out/target/product/con
dor/system/bin/rild'
build/core/Makefile:34: warning: overriding commands for tar
get `/home/fb_riki_fb/lineage/out/target/product/condor/syst
em/lib/libril.so'
build/core/base_rules.mk:320: warning: ignoring old commands
for target `/home/fb_riki_fb/lineage/out/target/product/con
dor/system/lib/libril.so'
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/fb_riki_fb/lineage/out/host/linux-x86/b
in/dtbToolCM', needed by '/home/fb_riki_fb/lineage/out/targe
t/product/condor/dt.img', missing and no known rule to make
it
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/fb_riki_fb/lineage'
#### make failed to build some targets (01:20 (mm:ss)) ####
[email protected]:~/lineage#
Click to expand...
Click to collapse
Have you cloned all the dependencies?
Android/device/qcom/common try cloning this and build...

Building ROM: ninja: build stopped: subcommand failed - but progresses anyway when re-running brunch

Hello everyone!
Context:
I am building LineageOS 14.1 for zeroltexx as per this guide, on an Arch Linux (Linux 5.18.14-arch1-1 x86_64) using OpenJDK 1.8.
The problem:
The build is not exactly stuck on a single fatal error, but "brunch zeroltexx" proceeds a few items at a time (10-30 files out of 50,000 to be built), always ending along the lines of
Code:
[ 0% 64/39868] target Export Resources: framework-res (/home/dod/androi...t/target/common/obj/APPS/framework-res_intermediates/package-export.apk)
FAILED: /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk
/bin/bash -c "(touch /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/zipdummy ) && ((cd /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/ && jar cf package-export.apk zipdummy) ) && (zip -qd /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk zipdummy ) && (rm /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/zipdummy ) && (/home/dod/android/lineage/out/host/linux-x86/bin/aapt package -u -x --private-symbols com.android.internal -z --pseudo-localize -M frameworks/base/core/res/AndroidManifest.xml -S device/samsung/zero-common/overlay/frameworks/base/core/res/res -S device/samsung/zero-common/overlay-gsm/frameworks/base/core/res/res -S vendor/cm/overlay/common/frameworks/base/core/res/res -S frameworks/base/core/res/res -A frameworks/base/core/res/assets --min-sdk-version 25 --target-sdk-version 25 --product default --version-code 25 --version-name 7.1.2 --skip-symbols-without-default-localization -F /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk )"
vendor/cm/overlay/common/frameworks/base/core/res/res/drawable-xxhdpi/default_wallpaper.png: error: Duplicate file.
vendor/cm/overlay/common/frameworks/base/core/res/res/drawable-xxhdpi-v4/default_wallpaper.png: Original is here. The version qualifier may be implied.
[ 0% 64/39868] host Java: hierarchyviewer (/home/dod/android/lineage/out/host/common/obj/JAVA_LIBRARIES/hierarchyviewer_intermediates/classes)
[ 0% 64/39868] host Java: ahat (/home/dod/android/lineage/out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 64/39868] host Java: dx (/home/dod/android/lineage/out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 64/39868] Building Kernel Headers
make: Entering directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
GEN /home/dod/android/lineage/out/target/product/zeroltexx/obj/KERNEL_OBJ/Makefile
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
arch/arm64/configs/lineageos_zeroltexx_defconfig:621:warning: override: reassigning to symbol INET_DIAG
#
# configuration written to .config
#
make: Leaving directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
make: Entering directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
CHK include/generated/uapi/linux/version.h
INSTALL include/asm-generic (34 files)
INSTALL include/drm (17 files)
INSTALL include/linux/byteorder (2 files)
INSTALL include/mtd (5 files)
INSTALL include/linux/caif (2 files)
INSTALL include/rdma (6 files)
INSTALL include/linux/can (5 files)
INSTALL include/scsi/fc (4 files)
INSTALL include/linux/dvb (8 files)
INSTALL include/sound (10 files)
INSTALL include/scsi (3 files)
INSTALL include/video (3 files)
INSTALL include/linux/hdlc (1 file)
INSTALL include/linux/hsi (1 file)
INSTALL include/xen (2 files)
INSTALL include/linux/isdn (1 file)
INSTALL include/uapi (0 file)
INSTALL include/linux/mmc (1 file)
INSTALL include/linux/netfilter/ipset (4 files)
INSTALL include/linux/netfilter_arp (2 files)
INSTALL include/linux/netfilter_bridge (18 files)
INSTALL include/linux/netfilter_ipv4 (10 files)
INSTALL include/linux/netfilter_ipv6 (12 files)
INSTALL include/linux/netfilter (78 files)
INSTALL include/linux/nfsd (5 files)
INSTALL include/linux/raid (2 files)
INSTALL include/linux/spi (1 file)
INSTALL include/linux/sunrpc (1 file)
INSTALL include/linux/tc_act (7 files)
INSTALL include/linux/tc_ematch (4 files)
INSTALL include/linux/usb (11 files)
INSTALL include/linux/wimax (1 file)
INSTALL include/linux (388 files)
INSTALL include/asm (33 files)
make: Leaving directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/dod/android/lineage'
#### make failed to build some targets (03:09 (mm:ss)) ####
I could probably wrap brunch in a while loop and be done with it, but that would be much more time-intensive than if the build could run continuously.
Note that the line
Code:
vendor/cm/overlay/common/frameworks/base/core/res/res/drawable-xxhdpi/default_wallpaper.png: error: Duplicate file.
appears because I have created 4 new folders named drawable-hdpi-v4, drawable-xhdpi-v4 etc to which I copied the contents of drawable-hdpi, drawable-xhdpi etc. This was to correct an earlier error about default.png not being found for drawable-hdpi-v4 and the others:
Code:
[ 0% 78/32836] target Export Resou...s_intermediates/package-export.apk)
warning: string 'candidates_style' has no default translation.
warning: string 'gsm_alphabet_default_charset' has no default translation.
warning: string 'wfcSpnFormat' has no default translation.
nothing matches overlay file default_wallpaper.png, for flavor hdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xhdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xxhdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xxxhdpi-v4
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/dod/android/lineage'
#### make failed to build some targets (03:31 (mm:ss)) ####
The build runs for longer upon deleting these drawable-*hdpi-v4 folders I created, but only for a few hundred items before failing anyway.
Leads:
After some research, these sorts of errors are often related to running out of memory. But I have 8GB RAM and an additional 8GB from zram, and RAM usage never actually climbs above 4GB.
The whole building-a-few-items-and-failing routine happens very quickly, but I did spot in htop a few processes that start with "javac -J-Xmx1024M ...". This may have something to do with the following note in the LineageOS build guide:
Jack is the currently used Java toolchain for building LineageOS 14.1 and 15.1. It is known to run out of memory often if not configured correctly - a simple fix is to run this command:
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
Click to expand...
Click to collapse
But setting -Xmx4G and even 8G does not make a difference. I also tried setting a higher max memory in _JAVA_OPTIONS, and this is explicitly acknowledged during build ("Picked up _JAVA_OPTIONS: -Xmx16G"), but I still see those "javac -J-Xmx1024m ..." in htop, and total RAM usage is still below 4GB.
I also cannot get the build to use the number of cores I want. I have 4, and it uses all of them even if I build with make -j1. The issue appears similar to this thread, particularly
I see that it should be possible to configure jack to limit the number of compilations using the SERVER_NB_COMPILE option in ~/.jack or maybe in ~/.jack-settings, or using jack.server.max-service in ~/.jack-server/config.properties. However, using both the SERVER_NB_COMPILE methods has no effect, and the config.properties file seems to be auto-generated with every build, setting the number of services to 4.
Click to expand...
Click to collapse
I'm familiar with Linux, but new to building ROMs and know nothing about Java, so any ideas would be appreciated. I'm happy to add complete logs and other information as needed.

Categories

Resources