MK802IV Compilation error when trying to mka recoveryimage twrp via CM12.1 sources - General Questions and Answers

Every time I try to do mka recoveryimage (with twrp) using the cm12.1 sources for my mk802iv that used a rockchip 3188 I get the following error :
Code:
make: *** No rule to make target '/home/patrick/android/rk3188/cm12.1/out/target/product/rk3188/obj/STATIC_LIBRARIES/libminui_intermediates/export_includes', needed by '/home/patrick/android/rk3188/cm12.1/out/target/product/rk3188/obj/EXECUTABLES/healthd_intermediates/import_includes'. *Stop
The device tree I use :
https://github.com/CTXz/android_device_rikomagic_mk802iv

CTXz said:
Every time I try to do mka recoveryimage (with twrp) using the cm12.1 sources for my mk802iv that used a rockchip 3188 I get the following error :
Code:
make: *** No rule to make target '/home/patrick/android/rk3188/cm12.1/out/target/product/rk3188/obj/STATIC_LIBRARIES/libminui_intermediates/export_includes', needed by '/home/patrick/android/rk3188/cm12.1/out/target/product/rk3188/obj/EXECUTABLES/healthd_intermediates/import_includes'. *Stop
The device tree I use :
https://github.com/CTXz/android_device_rikomagic_mk802iv
Click to expand...
Click to collapse
C,
goto system/core/healthd/Android.mk
and change
LOCAL_C_INCLUDES := $(call project-path-for,recovery)
to
# LOCAL_C_INCLUDES := $(call project-path-for,recovery)
LOCAL_C_INCLUDES := bootable/recovery
m

Related

[BUILD] Use Raspberry Pi to build Android Project (AOSP)

Hi all !
My current project is to use my Raspberry Pi as a Build Machine to build all Android sources (AOSP). In fact, I'll not build AOSP but the CyanogenMod (wich is mainly a fork from AOSP).
I know this may sound crazy, dumb or useless (according to Google, a 64-bit environment is required, and a lot (>> 4GB) of RAM if you're in a hurry), especially to use an ARM processor to build while all the Makefiles has been written to be used on x86...
But what I'm thinking about is a really cheap, silent, but working build machine, to sync the repo and build nightlies everyday. The first build will take some days but then, only the changes will be build so I think that only some hours per day will be required.
If I success, I'll create a big tutorial to explain what changes was required.
First of all, I had to add the Linux-armv61 arch as Host OS/ARCH :
Code:
[email protected] ~/buildspace/android/system/build $ git diff
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 862b7f0..34eb31a 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -77,6 +77,10 @@ ifneq (,$(findstring Power,$(UNAME)))
HOST_ARCH := ppc
endif
[COLOR="SeaGreen"]+ifneq (,$(findstring arm,$(UNAME)))
+ HOST_ARCH := armv61
+endif
+[/COLOR]
BUILD_ARCH := $(HOST_ARCH)
ifeq ($(HOST_ARCH),)
then, I did this (because the raspbian ld doesn't support --icf) :
AdamOutler said:
so I did a
Code:
[email protected] ~/adb $ grep -r 'icf=safe' ./*
./build/core/combo/TARGET_linux-arm.mk: -Wl,--icf=safe \
and I removed that icf parameter.
Click to expand...
Click to collapse
-->
Code:
[email protected] ~/buildspace/android/system/build $ git diff
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index b36111f..24e0d99 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -146,7 +146,6 @@ TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--warn-shared-textrel \
[COLOR="Red"]- -Wl,--icf=safe \[/COLOR]
$(arch_variant_ldflags)
# We only need thumb interworking in cases where thumb support
but now I am stuck with this error :
Code:
make -C kernel/samsung/smdk4210 O=/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" headers_install
make[1]: Entering directory `/media/totoext4part/cyanogenmod/system/kernel/samsung/smdk4210'
/media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: 1: /media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Syntax error: "(" unexpected
CHK include/linux/version.h
make[1]: Leaving directory `/media/totoext4part/cyanogenmod/system/kernel/samsung/smdk4210'
/bin/bash: r: command not found
make: [/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/lib/crtbegin_static.o] Error 127 (ignored)
[COLOR="SeaGreen"]target SharedLib[/COLOR]: libdl (/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
/usr/bin/ld: error: /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so uses VFP register arguments, /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o does not
/usr/bin/ld: failed to merge target specific data of file /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o
/usr/bin/ld: warning: creating a DT_TEXTREL in a shared object.
collect2: ld returned 1 exit status
make: *** [/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so] Error 1
I don't really know what I have to do and if it is because the HOST is an arm arch...
It have been a long time since I didn't put my hands in this kind of things and I need help to solve this problems... Thanks in advance !

[Q] Htc evo 4g build error ( boot.img too large)!!

I want to compile the kernel from source for the HTC evo 4g (model: supersonic). I downloaded the kernel source from https://github.com/CyanogenMod/htc-kernel-supersonic .
I compiled it successfully getting the zImage.
However, when i try to build the whole tree ,using the previous zImage instead of the prebuilt kernel, i get an error:
out/target/product/supersonic/boot.img total size is 2457600
error: out/target/product/supersonic/boot.img too large (2457600 > [2703360 - 270336])
make: *** [out/target/product/supersonic/boot.img] Error 1
make: *** Deleting file `out/target/product/supersonic/boot.img'
I found that the size of partitions are defined in the file device/htc/supersonic/BoardConfig.mk.
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00280000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x15e00000 # limited so we enforce room to grow
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x1aba0000
BOARD_FLASH_BLOCK_SIZE := 131072
I dont know how to solve this issue. Please help! :crying:

[Q][WIP] Android 5 Lollipop for S2vep

OK mates i am building Android 5 from the stock AOSP until VanirAOSP Lollipop finish the download by the wat i got this error during compilation, that you show in the box code.
host SharedLib: libSR_Recognizer_32 (out/host/linux-x86/obj32/lib/libSR_Recognizer.so)
target R.java/Manifest.java: VpnDialogs (out/target/common/obj/APPS/VpnDialogs_intermediates/src/R.stamp)
warning: string 'accept' has no default translation.
target R.java/Manifest.java: WallpaperCropper (out/target/common/obj/APPS/WallpaperCropper_intermediates/src/R.stamp)
target StaticExecutable: add-property-tag (out/target/product/s2vep/obj/EXECUTABLES/add-property-tag_intermediates/LINKED/add-property-tag)
target StaticExecutable: check-lost+found (out/target/product/s2vep/obj/EXECUTABLES/check-lost+found_intermediates/LINKED/check-lost+found)
target Executable: cpustats (out/target/product/s2vep/obj/EXECUTABLES/cpustats_intermediates/LINKED/cpustats)
target Executable: dhdutil (out/target/product/s2vep/obj/EXECUTABLES/dhdutil_intermediates/LINKED/dhdutil)
target Executable: fio (out/target/product/s2vep/obj/EXECUTABLES/fio_intermediates/LINKED/fio)
target Executable: latencytop (out/target/product/s2vep/obj/EXECUTABLES/latencytop_intermediates/LINKED/latencytop)
target StaticExecutable: memtrack (out/target/product/s2vep/obj/EXECUTABLES/memtrack_intermediates/LINKED/memtrack)
target Executable: memtrack_share (out/target/product/s2vep/obj/EXECUTABLES/memtrack_share_intermediates/LINKED/memtrack_share)
target Executable: micro_bench (out/target/product/s2vep/obj/EXECUTABLES/micro_bench_intermediates/LINKED/micro_bench)
target StaticExecutable: micro_bench_static (out/target/product/s2vep/obj/EXECUTABLES/micro_bench_static_intermediates/LINKED/micro_bench_static)
target Executable: sane_schedstat (out/target/product/s2vep/obj/EXECUTABLES/sane_schedstat_intermediates/LINKED/sane_schedstat)
target Executable: showslab (out/target/product/s2vep/obj/EXECUTABLES/showslab_intermediates/LINKED/showslab)
target Executable: strace (out/target/product/s2vep/obj/EXECUTABLES/strace_intermediates/LINKED/strace)
target StaticExecutable: su (out/target/product/s2vep/obj/EXECUTABLES/su_intermediates/LINKED/su)
Target boot image: out/target/product/s2vep/boot.img
error: could not load kernel 'out/target/product/s2vep/kernel'
make: *** [out/target/product/s2vep/boot.img] Error 1
make: *** Waiting for unfinished jobs....
warning: no entries written for dimen/password_keyboard_height (0x010500a2)
warning: no entries written for drawable/ab_solid_shadow_mtrl (0x010800bb)
warning: no entries written for drawable/ab_transparent_mtrl_alpha (0x010800c4)
warning: no entries written for drawable/btn_check_off_mtrl_alpha (0x010800f8)
warning: no entries written for drawable/btn_check_on_mtrl_alpha (0x0108010e)
warning: no entries written for drawable/btn_radio_off_mtrl_alpha (0x010801b0)
warning: no entries written for drawable/btn_radio_off_pressed_mtrl_alpha (0x010801b4)
warning: no entries written for drawable/switch_off_mtrl_alpha (0x010806b1)
warning: no entries written for drawable/switch_on_mtrl_alpha (0x010806b2)
warning: no entries written for drawable/sym_keyboard_delete_holo (0x010806c5)
#### make failed to build some targets (01:16:17 (hh:mm:ss)) ####
to know I got about 6gb of s2vep out folder, so any help for this error???
It cannot find boot.img, obviously.
Is kernel compilled? Or does it use a prebuilt one?
haky 86 said:
OK mates i am building Android 5 from the stock AOSP until VanirAOSP Lollipop finish the download by the wat i got this error during compilation, that you show in the box code.
host SharedLib: libSR_Recognizer_32 (out/host/linux-x86/obj32/lib/libSR_Recognizer.so)
target R.java/Manifest.java: VpnDialogs (out/target/common/obj/APPS/VpnDialogs_intermediates/src/R.stamp)
warning: string 'accept' has no default translation.
target R.java/Manifest.java: WallpaperCropper (out/target/common/obj/APPS/WallpaperCropper_intermediates/src/R.stamp)
target StaticExecutable: add-property-tag (out/target/product/s2vep/obj/EXECUTABLES/add-property-tag_intermediates/LINKED/add-property-tag)
target StaticExecutable: check-lost+found (out/target/product/s2vep/obj/EXECUTABLES/check-lost+found_intermediates/LINKED/check-lost+found)
target Executable: cpustats (out/target/product/s2vep/obj/EXECUTABLES/cpustats_intermediates/LINKED/cpustats)
target Executable: dhdutil (out/target/product/s2vep/obj/EXECUTABLES/dhdutil_intermediates/LINKED/dhdutil)
target Executable: fio (out/target/product/s2vep/obj/EXECUTABLES/fio_intermediates/LINKED/fio)
target Executable: latencytop (out/target/product/s2vep/obj/EXECUTABLES/latencytop_intermediates/LINKED/latencytop)
target StaticExecutable: memtrack (out/target/product/s2vep/obj/EXECUTABLES/memtrack_intermediates/LINKED/memtrack)
target Executable: memtrack_share (out/target/product/s2vep/obj/EXECUTABLES/memtrack_share_intermediates/LINKED/memtrack_share)
target Executable: micro_bench (out/target/product/s2vep/obj/EXECUTABLES/micro_bench_intermediates/LINKED/micro_bench)
target StaticExecutable: micro_bench_static (out/target/product/s2vep/obj/EXECUTABLES/micro_bench_static_intermediates/LINKED/micro_bench_static)
target Executable: sane_schedstat (out/target/product/s2vep/obj/EXECUTABLES/sane_schedstat_intermediates/LINKED/sane_schedstat)
target Executable: showslab (out/target/product/s2vep/obj/EXECUTABLES/showslab_intermediates/LINKED/showslab)
target Executable: strace (out/target/product/s2vep/obj/EXECUTABLES/strace_intermediates/LINKED/strace)
target StaticExecutable: su (out/target/product/s2vep/obj/EXECUTABLES/su_intermediates/LINKED/su)
Target boot image: out/target/product/s2vep/boot.img
error: could not load kernel 'out/target/product/s2vep/kernel'
make: *** [out/target/product/s2vep/boot.img] Error 1
make: *** Waiting for unfinished jobs....
warning: no entries written for dimen/password_keyboard_height (0x010500a2)
warning: no entries written for drawable/ab_solid_shadow_mtrl (0x010800bb)
warning: no entries written for drawable/ab_transparent_mtrl_alpha (0x010800c4)
warning: no entries written for drawable/btn_check_off_mtrl_alpha (0x010800f8)
warning: no entries written for drawable/btn_check_on_mtrl_alpha (0x0108010e)
warning: no entries written for drawable/btn_radio_off_mtrl_alpha (0x010801b0)
warning: no entries written for drawable/btn_radio_off_pressed_mtrl_alpha (0x010801b4)
warning: no entries written for drawable/switch_off_mtrl_alpha (0x010806b1)
warning: no entries written for drawable/switch_on_mtrl_alpha (0x010806b2)
warning: no entries written for drawable/sym_keyboard_delete_holo (0x010806c5)
#### make failed to build some targets (01:16:17 (hh:mm:ss)) ####
to know I got about 6gb of s2vep out folder, so any help for this error???
Click to expand...
Click to collapse
Where is located the kernel source?
LuK1337 said:
Where is located the kernel source?
Click to expand...
Click to collapse
The located kernel is in the following folder kernel/samsung/galaxys2plus-common
and also i build the zImage and use it as prebuilt kernel, but still give me same issue
actually i am using bcm28155_capri_ss_s2vep_rev05_defconfig as defconfig cause the default one is for cyanogen mod...
andrewww57 said:
It cannot find boot.img, obviously.
Is kernel compilled? Or does it use a prebuilt one?
Click to expand...
Click to collapse
I try it by make one, compilation is fine and use it as prebuilt one but that error still appear...
Sent from my GT-I9105P using XDA Free mobile app
You need to declare the prebuilt kernel as your prbuilt kernel in device_s2vep.mk , see other aosp trees as an example.
BTW, aosp does not support inline kernel building unless for some qcom kernels
@CoolDevelopment @andrewww57
Thank you guys, i fix boot.img by building one and insert it in device tree as well and also now i have more than 14gb and is finish to build chromium source so i guess will need another many hours...
See you next update...
haky 86 said:
@CoolDevelopment @andrewww57
Thank you guys, i fix boot.img by building one and insert it in device tree as well and also now i have more than 14gb and is finish to build chromium source so i guess will need another many hours...
See you next update...
Click to expand...
Click to collapse
take your time
Better do something like this:
put your prebuilt kernel into device/s2vep/kernel
add this
Code:
TARGET_PREBUILT_KERNEL := kernel
PRODUCT_COPY_FILES += $(LOCAL_PATH)/$(TARGET_PREBUILT_KERNEL):kernel
to the top of device_s2vep.mk
Android 5 *_*
Sent from my GT-I9105P using XDA Premium 4 mobile app
CoolDevelopment said:
Better do something like this:
put your prebuilt kernel into device/s2vep/kernel
add this
Code:
TARGET_PREBUILT_KERNEL := kernel
PRODUCT_COPY_FILES += $(LOCAL_PATH)/$(TARGET_PREBUILT_KERNEL):kernel
to the top of device_s2vep.mk
Click to expand...
Click to collapse
ok now is this and is generate about 17gb of out!! :/
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/client/Android.mk ...
including ./system/netd/server/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
No private recovery resources for TARGET_DEVICE s2vep
Notice file: external/chromium_org/NOTICE -- out/target/product/s2vep/obj/NOTICE_FILES/src//system/lib/android_webview_android_webview_common_gyp.a.txt
Notice file: external/chromium_org/NOTICE -- out/target/product/s2vep/obj/NOTICE_FILES/src//system/lib/libwebviewchromium.so.txt
Notice file: external/chromium_org/NOTICE -- out/target/product/s2vep/obj/NOTICE_FILES/src//system/lib/android_webview_native_webview_native_gyp.a.txt
target Strip: libwebviewchromium (out/target/product/s2vep/obj/lib/libwebviewchromium.so)
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-striput/target/product/s2vep/symbols/system/lib/libwebviewchromium.so: File format not recognized
make: *** [out/target/product/s2vep/obj/lib/libwebviewchromium.so] Error 1
make: *** Waiting for unfinished jobs....
libwebviewchromium.so is not a prpritary file right?
CoolDevelopment said:
libwebviewchromium.so is not a prpritary file right?
Click to expand...
Click to collapse
I guess no, doing a google it's dependes from ram quantity coz i have 4gb, now i correct my device_s2vep.mk with your configuration, because boot.img still appear, i guess the compilation is at the end... :/
please try to update make to at least 4.0
CoolDevelopment said:
please try to update make to at least 4.0
Click to expand...
Click to collapse
That should be downloading from here? coz i use 3.82!!
http://ftp.gnu.org/gnu/make/
is stuck after creating userdata.img and have 18.2gb of out, i am going to kill my self!!!
Thank your so very mich for doing all this hard work for our S2+!!
Just a quick noob question:
Is the zip file allready compiled vor does compiling fail?
Thanks in advance
NW2000 said:
Thank your so very mich for doing all this hard work for our S2+!!
Just a quick noob question:
Is the zip file allready compiled vor does compiling fail?
Thanks in advance
Click to expand...
Click to collapse
Nop is still stuck at boot.img, i guess to wait cm12, it's easier to port
haky 86 said:
Nop is still stuck at boot.img, i guess to wait cm12, it's easier to port
Click to expand...
Click to collapse
Compile kernel to get the 'kernel' file and use it as prebuilt in config. It should work.
As @CoolDevelopment said add to device mk file this code
Code:
TARGET_PREBUILT_KERNEL := kernel
PRODUCT_COPY_FILES += $(LOCAL_PATH)/$(TARGET_PREBUILT_KERNEL):kernel
and put 'kernel' into the folder of device source. It should handle this kernel. Also it's better to delete 'TARGET_KERNEL_SOURCE' and 'TARGET_KERNEL_CONFIG' from BoardConfig.mk, I think.
andrewww57 said:
Compile kernel to get the 'kernel' file and use it as prebuilt in config. It should work.
As @CoolDevelopment said add to device mk file this code
Code:
TARGET_PREBUILT_KERNEL := kernel
PRODUCT_COPY_FILES += $(LOCAL_PATH)/$(TARGET_PREBUILT_KERNEL):kernel
and put 'kernel' into the folder of device source. It should handle this kernel. Also it's better to delete 'TARGET_KERNEL_SOURCE' and 'TARGET_KERNEL_CONFIG' from BoardConfig.mk, I think.
Click to expand...
Click to collapse
OK andrew I will follow that steps, by the way i am downloading it again with all prebuilts tools i guess missed some tools that generate boot.img, once got the zImage i need to rename it to kernel.
Something like this?
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/samsung/s2vep/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
So that's mean the # Kernel lines in boardconfig.mk should be removed in this case?
thanx again
haky 86 said:
OK andrew I will follow that steps, by the way i am downloading it again with all prebuilts tools i guess missed some tools that generate boot.img, once got the zImage i need to rename it to kernel.
Something like this?
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/samsung/s2vep/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
So that's mean the # Kernel lines in boardconfig.mk should be removed in this case?
thanx again
Click to expand...
Click to collapse
Try to add this to BoardConfig:
Code:
TARGET_PREBUILT_KERNEL := device/samsung/s2vep/kernel
and delete 'TARGET_KERNEL_SOURCE' and 'TARGET_KERNEL_CONFIG'
And add yours to device mk:
Code:
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/samsung/s2vep/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel

Maguro / Galaxy Nexus CM 12.1 build

Hi,
I've been playing a bit with CM's build as I expect to retire my Galaxy Nexus from its duty soon. The build went fine if not for the following build error:
Code:
target Executable: pvrsrvinit (/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit)
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_init_SGX540_120
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_um_SGX540_120
hardware/ti/omap4/pvrsrvinit/pvrsrvinit.c:8: error: undefined reference to 'SrvInit'
collect2: error: ld returned 1 exit status
make: *** [/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/user/Development/Cyanogenmod/android/system'
Other threads[0] reference the following fix, namely adding
Code:
<project name="DonkeyCoyote/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="android-5.0" />
in
Code:
.repo/local_manifests/roomservice.xml
Unfortunately this trick didn't work. Upon closer inspection, the required libraries are part of the `omap4-common` subdirectory which is *not* sourced during the build[1]. I was nevertheless able to fix the build with the following change
Code:
% repo diff hardware/ti/omap4/
project hardware/ti/omap4/
diff --git a/pvrsrvinit/Android.mk b/pvrsrvinit/Android.mk
index 97d27c4..cdc6441 100644
--- a/pvrsrvinit/Android.mk
+++ b/pvrsrvinit/Android.mk
@@ -9,9 +9,9 @@ LOCAL_LDLIBS := -lsrv_init_SGX544_112 -lsrv_um_SGX544_112
pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_init_SGX544_112.so
pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_um_SGX544_112.so
else
-LOCAL_LDLIBS := -lsrv_init_SGX540_120 -lsrv_um_SGX540_120
-pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_init_SGX540_120.so
-pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_um_SGX540_120.so
+LOCAL_LDLIBS := -lsrv_init -lsrv_um
+pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_init.so
+pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_um.so
endif
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
LOCAL_MODULE := pvrsrvinit
Which means that the libraries are definitively extracted by `cd device/samsung/maguro/ && ./extract-files.sh` however, the libraries are merely named differently.
Has anybody encountered such a failure ?
ps: on another side note. how are you suppose to extract all the files from the stock 4.2.1 upstream build ? `system/bin/fRom`, `system/vendor/lib/mediadrm/libwvdrmengine.so` and `system/vendor/lib/libfrsdk.so` are missing from the image...
[0]: http://forum.xda-developers.com/showpost.php?p=59115913&postcount=1372
[1]: confirmed by `inotifywait -m vendor/samsung/omap4-common/*mk`
Btw, I looked at the content of a CM11 nightly[0], there is no trace of `libsrv_init_SGX540_120.so` or `libsrv_um_SGX540_120.so` either...
[0]: cm-11-20151213-NIGHTLY-maguro.zip

How to Build Basic TWRP for a Android Device Android 9+

How to Build Basic TWRP for a Android Device Android 9+​​Note​
This is a basic method to build twrp. If twrp has bugs you have to fix it with your self according to your device
In samsung devices decryption/encryption cannot be fix easily and it need to modify kernel to fix mtp. most of time common bugs are mtp and decryption you need can find more info by referring more device trees
Click to expand...
Click to collapse
Prepare Environmet​
Create a github account​
Create a new empty repo​
Then log into gitpod using github account​
Open new workspace in gitpod,​
Select your new repo and selcect class as large​
​Make a device tree using twrpdtgen​
git clone https://github.com/twrpdtgen/twrpdtgen​
cd twrpdtgen​
sudo apt install cpio​
pip3 install twrpdtgen​
drag and drop the stock recovery.img to twrpdtgen folder​
python3 -m twrpdtgen <path to image>​
you will get twrp device tree at the out/manufature/code_name (eg: samsung/m01q)​
then copy manufature folder into root directory (workspace/name_of_your_github_repo)​
​
Install repo and packages​
sudo apt update​
sudo apt install rsync​
​​
repo init --depth=1 --no-repo-verify -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1 -g default,-mips,-darwin,-notdefault​
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8​
Place device tree​
​move manufature folder (created device tree) to device (EG: workspace/name_of_your_github_repo/device/samsung)​
Modify Device Tree​
open device.mk and add these​​Add support to fastbootd (skip the if your device dosnt have super.img)​Change the value according to shipped android os​
if android 10 = 29​if android 11 = 30​if android 12 = 31​if android 12.1 = 32​if android 13 = 33​
PRODUCT_PACKAGES += \
[email protected] \
fastbootd
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_SHIPPING_API_LEVEL := 29
​Add device code name​​TARGET_OTA_ASSERT_DEVICE := m01q
TARGET_COPY_OUT_VENDOR := vendor
​TWRP FLAGS​​TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
# TWRP specific build flags
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INCLUDE_NTFS_3G := true
TW_USE_TOOLBOX := true
TW_INCLUDE_RESETPROP := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness"
TW_DEFAULT_BRIGHTNESS := 1200
TARGET_USES_MKE2FS := true
TW_NO_LEGACY_PROPS := true
TW_USE_NEW_MINADBD := true
TW_NO_BIND_SYSTEM := true
TW_NO_SCREEN_BLANK := true
TW_EXCLUDE_APEX := true
TW_FRAMERATE := 60
​TWRP Name​​TW_DEVICE_VERSION := smiley​​Enable notch​
TW_Y_OFFSET := 70
TW_H_OFFSET := -70
Reboot to odin for samsung​​TW_HAS_DOWNLOAD_MODE := true​​Enable Logcat​​TWRP_INCLUDE_LOGCAT := true[/HEADING]
[HEADING=2]TARGET_USES_LOGD := true​​Add fingerprint​​#Properties
TW_OVERRIDE_SYSTEM_PROPS := \
"ro.build.fingerprint=ro.system.build.fingerprint;ro.build.version.incremental"
Modify fstab​
Open recovery.fstab​
add this to end of line to enable partition backup and flash​
;backup=1;flashimg
add those to enable sdcard and otg​
# Removable storage
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=storage;wipeingui;removable
/usb-otg auto /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
Open BoradConfig,mk and modify values according to your device (skip if you dont have super.img)​
# Dynamic Partition
BOARD_SUPER_PARTITION_SIZE := 3945791488
BOARD_SUPER_PARTITION_GROUPS := android_dynamic_partitions
BOARD_ANDROID_DYNAMIC_PARTITIONS_SIZE := 3945791488
BOARD_ANDROID_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product odm
Open Omni_device_code.mk​
$(call inherit-product, vendor/omni/config/common.mk)
rename omni to twrp​
$(call inherit-product, vendor/twrp/config/common.mk)
Build TWRP​
. build/envstup.sh
lunch (select your device-eng)
make recoveryimage
smiley9000 said:
How to Build Basic TWRP for a Android Device Android 9+​​Note​
Prepare Environmet​
Create a github account​
Create a new empty repo​
Then log into gitpod using github account​
Open new workspace in gitpod,​
Select your new repo and selcect class as large​
​Make a device tree using twrpdtgen​
git clone https://github.com/twrpdtgen/twrpdtgen​
cd twrpdtgen​
sudo apt install cpio​
pip3 install twrpdtgen​
drag and drop the stock recovery.img to twrpdtgen folder​
python3 -m twrpdtgen <path to image>​
you will get twrp device tree at the out/manufature/code_name (eg: samsung/m01q)​
then copy manufature folder into root directory (workspace/name_of_your_github_repo)​
​
Install repo and packages​
sudo apt update​
sudo apt install rsync​
​​
repo init --depth=1 --no-repo-verify -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1 -g default,-mips,-darwin,-notdefault​
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8​
Place device tree​
​move manufature folder (created device tree) to device (EG: workspace/name_of_your_github_repo/device/samsung)​
Modify Device Tree​
open device.mk and add these​​Add support to fastbootd (skip the if your device dosnt have super.img)​Change the value according to shipped android os​
if android 10 = 29​if android 11 = 30​if android 12 = 31​if android 12.1 = 32​if android 13 = 33​
PRODUCT_PACKAGES += \
[email protected] \
fastbootd
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_SHIPPING_API_LEVEL := 29
​Add device code name​​TARGET_OTA_ASSERT_DEVICE := m01q
TARGET_COPY_OUT_VENDOR := vendor
​TWRP FLAGS​​TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
# TWRP specific build flags
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INCLUDE_NTFS_3G := true
TW_USE_TOOLBOX := true
TW_INCLUDE_RESETPROP := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness"
TW_DEFAULT_BRIGHTNESS := 1200
TARGET_USES_MKE2FS := true
TW_NO_LEGACY_PROPS := true
TW_USE_NEW_MINADBD := true
TW_NO_BIND_SYSTEM := true
TW_NO_SCREEN_BLANK := true
TW_EXCLUDE_APEX := true
TW_FRAMERATE := 60
​TWRP Name​​TW_DEVICE_VERSION := smiley​​Enable notch​
TW_Y_OFFSET := 70
TW_H_OFFSET := -70
Reboot to odin for samsung​​TW_HAS_DOWNLOAD_MODE := true​​Enable Logcat​​TWRP_INCLUDE_LOGCAT := true[/HEADING][/HEADING]
[HEADING=2][HEADING=2]TARGET_USES_LOGD := true​​Add fingerprint​​#Properties
TW_OVERRIDE_SYSTEM_PROPS := \
"ro.build.fingerprint=ro.system.build.fingerprint;ro.build.version.incremental"
Modify fstab​
Open recovery.fstab​
add this to end of line to enable partition backup and flash​
;backup=1;flashimg
add those to enable sdcard and otg​
# Removable storage
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=storage;wipeingui;removable
/usb-otg auto /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
Open BoradConfig,mk and modify values according to your device (skip if you dont have super.img)​
# Dynamic Partition
BOARD_SUPER_PARTITION_SIZE := 3945791488
BOARD_SUPER_PARTITION_GROUPS := android_dynamic_partitions
BOARD_ANDROID_DYNAMIC_PARTITIONS_SIZE := 3945791488
BOARD_ANDROID_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product odm
Open Omni_device_code.mk​
$(call inherit-product, vendor/omni/config/common.mk)
rename omni to twrp​
$(call inherit-product, vendor/twrp/config/common.mk)
Build TWRP​
. build/envstup.sh
lunch (select your device-eng)
make recoveryimage
Click to expand...
Click to collapse
After creating a device tree, how does one find the required files that should go into the recovery/root folder to build TWRP
whale0z said:
After creating a device tree, how does one find the required files that should go into the recovery/root folder to build TWRP
Click to expand...
Click to collapse
try to find twrp device tree of similler soc and compare to make most succesfull device tree. but decryption is heavily depend on oem
smiley9000 said:
try to find twrp device tree of similler soc and compare to make most succesfull device tree. but decryption is heavily depend on oem
Click to expand...
Click to collapse
I was able to build for a mediatek device but fastboot boot doesn't seem to work. I was wondering if using fastboot flash would not mess with the normal boot sequence.
whale0z said:
I was able to build for a mediatek device but fastboot boot doesn't seem to work. I was wondering if using fastboot flash would not mess with the normal boot sequence.
Click to expand...
Click to collapse
Some device dosent support fastboot boot for security reasons
smiley9000 said:
How to Build Basic TWRP for a Android Device Android 9+​​Note​
Prepare Environmet​
Create a github account​
Create a new empty repo​
Then log into gitpod using github account​
Open new workspace in gitpod,​
Select your new repo and selcect class as large​
​Make a device tree using twrpdtgen​
git clone https://github.com/twrpdtgen/twrpdtgen​
cd twrpdtgen​
sudo apt install cpio​
pip3 install twrpdtgen​
drag and drop the stock recovery.img to twrpdtgen folder​
python3 -m twrpdtgen <path to image>​
you will get twrp device tree at the out/manufature/code_name (eg: samsung/m01q)​
then copy manufature folder into root directory (workspace/name_of_your_github_repo)​
​
Install repo and packages​
sudo apt update​
sudo apt install rsync​
​​
repo init --depth=1 --no-repo-verify -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1 -g default,-mips,-darwin,-notdefault​
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8​
Place device tree​
​move manufature folder (created device tree) to device (EG: workspace/name_of_your_github_repo/device/samsung)​
Modify Device Tree​
open device.mk and add these​​Add support to fastbootd (skip the if your device dosnt have super.img)​Change the value according to shipped android os​
if android 10 = 29​if android 11 = 30​if android 12 = 31​if android 12.1 = 32​if android 13 = 33​
PRODUCT_PACKAGES += \
[email protected] \
fastbootd
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_SHIPPING_API_LEVEL := 29
​Add device code name​​TARGET_OTA_ASSERT_DEVICE := m01q
TARGET_COPY_OUT_VENDOR := vendor
​TWRP FLAGS​​TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
# TWRP specific build flags
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INCLUDE_NTFS_3G := true
TW_USE_TOOLBOX := true
TW_INCLUDE_RESETPROP := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness"
TW_DEFAULT_BRIGHTNESS := 1200
TARGET_USES_MKE2FS := true
TW_NO_LEGACY_PROPS := true
TW_USE_NEW_MINADBD := true
TW_NO_BIND_SYSTEM := true
TW_NO_SCREEN_BLANK := true
TW_EXCLUDE_APEX := true
TW_FRAMERATE := 60
​TWRP Name​​TW_DEVICE_VERSION := smiley​​Enable notch​
TW_Y_OFFSET := 70
TW_H_OFFSET := -70
Reboot to odin for samsung​​TW_HAS_DOWNLOAD_MODE := true​​Enable Logcat​​TWRP_INCLUDE_LOGCAT := true[/HEADING][/HEADING][/HEADING][/HEADING][/HEADING]
[HEADING=2][HEADING=2][HEADING=2][HEADING=2][HEADING=2]TARGET_USES_LOGD := true​​Add fingerprint​​#Properties
TW_OVERRIDE_SYSTEM_PROPS := \
"ro.build.fingerprint=ro.system.build.fingerprint;ro.build.version.incremental"
Modify fstab​
Open recovery.fstab​
add this to end of line to enable partition backup and flash​
;backup=1;flashimg
add those to enable sdcard and otg​
# Removable storage
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=storage;wipeingui;removable
/usb-otg auto /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
Open BoradConfig,mk and modify values according to your device (skip if you dont have super.img)​
# Dynamic Partition
BOARD_SUPER_PARTITION_SIZE := 3945791488
BOARD_SUPER_PARTITION_GROUPS := android_dynamic_partitions
BOARD_ANDROID_DYNAMIC_PARTITIONS_SIZE := 3945791488
BOARD_ANDROID_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product odm
Open Omni_device_code.mk​
$(call inherit-product, vendor/omni/config/common.mk)
rename omni to twrp​
$(call inherit-product, vendor/twrp/config/common.mk)
Build TWRP​
. build/envstup.sh
lunch (select your device-eng)
make recoveryimage
Click to expand...
Click to collapse
hiya
after enter this command :
" repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8 "​i got this error:
Usage: repo sync [<project>...]
main.py: error: option -j: invalid integer value: '8\u200b'
i think its about java , but java works fine.
================================================================================
gitpod /workspace/Nokia-5.3-twrp-device-tree (main) $ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_x86-eng
4. aosp_x86_64-eng
5. omni_CAP_sprout-eng
6. omni_CAP_sprout-user
7. omni_CAP_sprout-userdebug
Which would you like? [aosp_arm-eng] 5
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
In file included from build/make/target/product/telephony_vendor.mk:24:
device/hmd/CAP_sprout/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL.
16:01:34 dumpvars failed with: exit status 1
Device CAP_sprout not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin).
Repository for CAP_sprout not found in the TeamWin Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/roomservice.xml
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
In file included from build/make/target/product/telephony_vendor.mk:24:
device/hmd/CAP_sprout/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL.
16:01:35 dumpvars failed with: exit status 1
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
In file included from build/make/target/product/telephony_vendor.mk:24:
device/hmd/CAP_sprout/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL.
16:01:35 dumpvars failed with: exit status 1
** Don't have a product spec for: 'omni_CAP_sprout'
** Do you have the right repo manifest?
========================================================================
new error:
device/hmd/CAP_sprout/Android.mk:13: error: cannot assign to readonly variable: PRODUCT_PACKAGES
16:15:14 ckati failed with: exit status 1
how can i fix it??
PRODUCT_PACKAGES += \
[email protected] \
fastbootd
MEYSAMKIA said:
hiya
after enter this command :
" repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8 "​i got this error:
Usage: repo sync [<project>...]
main.py: error: option -j: invalid integer value: '8\u200b'
i think its about java , but java works fine.
================================================================================
gitpod /workspace/Nokia-5.3-twrp-device-tree (main) $ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_x86-eng
4. aosp_x86_64-eng
5. omni_CAP_sprout-eng
6. omni_CAP_sprout-user
7. omni_CAP_sprout-userdebug
Which would you like? [aosp_arm-eng] 5
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
In file included from build/make/target/product/telephony_vendor.mk:24:
device/hmd/CAP_sprout/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL.
16:01:34 dumpvars failed with: exit status 1
Device CAP_sprout not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin).
Repository for CAP_sprout not found in the TeamWin Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/roomservice.xml
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
In file included from build/make/target/product/telephony_vendor.mk:24:
device/hmd/CAP_sprout/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL.
16:01:35 dumpvars failed with: exit status 1
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
In file included from build/make/target/product/telephony_vendor.mk:24:
device/hmd/CAP_sprout/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL.
16:01:35 dumpvars failed with: exit status 1
** Don't have a product spec for: 'omni_CAP_sprout'
** Do you have the right repo manifest?
========================================================================
new error:
device/hmd/CAP_sprout/Android.mk:13: error: cannot assign to readonly variable: PRODUCT_PACKAGES
16:15:14 ckati failed with: exit status 1
how can i fix it??
PRODUCT_PACKAGES += \
[email protected] \
fastbootd
Click to expand...
Click to collapse
Contact in telegram
@samsung_galaxy_m01_a01_m11_a11

Categories

Resources