MiCode / patchrom

Use disassemble/assemble technology to porting miui to misc android devices
http://micode.net/forum-55-1.html
490 stars 370 forks source link

make: *** [fullota] Error 1 #133

Open Andrei-Tanase opened 6 years ago

Andrei-Tanase commented 6 years ago

Hello. Can anyone help me, please? I am facing this error:

build out/org.cyanogenmod.platform.jar...

@ rm -rf out/org.cyanogenmod.platform.jar.out

cp: cannot stat 'org.cyanogenmod.platform.jar.out': No such file or directory /home/andrei/patchrom/build/porting.mk:181: recipe for target 'out/org.cyanogenmod.platform.jar' failed make: *** [out/org.cyanogenmod.platform.jar] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

Here is download link for the file: https://drive.google.com/open?id=0Bx9qplihpe8YQjQ3ZFF3NmFINDQ Thanks in advance!

aymende7 commented 6 years ago

org.cyanogenmod.platform.jar.out.zip put this in your device folder and try again

Andrei-Tanase commented 6 years ago

But I get this error: <<< build out/InCallUI.apk completed! Copy: out/InCallUI.apk to out/ZIP/system/priv-app/InCallUI/InCallUI.apk

build out/org.cyanogenmod.platform.jar...

@ rm -rf out/org.cyanogenmod.platform.jar.out

/home/andrei/patchrom/tools/apktool --quiet b out/org.cyanogenmod.platform.jar.out -o out/org.cyanogenmod.platform.jar Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_6250658174143561700.tmp, p, --forced-package-id, 63, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /tmp/APKTOOL4167336772426290243.tmp, -x, -0, arsc, -0, arsc, -I, /home/andrei/.local/share/apktool/framework/1.apk, -S, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/res, -M, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449) at brut.androlib.Androlib.buildResources(Androlib.java:383) at brut.androlib.Androlib.build(Androlib.java:310) 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: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_6250658174143561700.tmp, p, --forced-package-id, 63, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /tmp/APKTOOL4167336772426290243.tmp, -x, -0, arsc, -0, arsc, -I, /home/andrei/.local/share/apktool/framework/1.apk, -S, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/res, -M, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_6250658174143561700.tmp, p, --forced-package-id, 63, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /tmp/APKTOOL4167336772426290243.tmp, -x, -0, arsc, -0, arsc, -I, /home/andrei/.local/share/apktool/framework/1.apk, -S, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/res, -M, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/AndroidManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433) ... 6 more /home/andrei/patchrom/build/porting.mk:181: recipe for target 'out/org.cyanogenmod.platform.jar' failed make: *** [out/org.cyanogenmod.platform.jar] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

Thanks for the help given until now!

aymende7 commented 6 years ago

try this

Andrei-Tanase commented 6 years ago

Add miui prebuilt completed!

build out/org.cyanogenmod.platform.jar...

@ rm -rf out/org.cyanogenmod.platform.jar.out

/home/andrei/patchrom/tools/apktool --quiet b out/org.cyanogenmod.platform.jar.out -o out/org.cyanogenmod.platform.jar Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4230788968806325311.tmp, p, -F, /tmp/APKTOOL2884225642130254163.tmp, -0, arsc, -S, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/res, -M, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449) at brut.androlib.Androlib.buildResources(Androlib.java:383) at brut.androlib.Androlib.build(Androlib.java:310) 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: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4230788968806325311.tmp, p, -F, /tmp/APKTOOL2884225642130254163.tmp, -0, arsc, -S, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/res, -M, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4230788968806325311.tmp, p, -F, /tmp/APKTOOL2884225642130254163.tmp, -0, arsc, -S, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/res, -M, /home/andrei/patchrom/device/out/org.cyanogenmod.platform.jar.out/AndroidManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433) ... 6 more /home/andrei/patchrom/build/porting.mk:181: recipe for target 'out/org.cyanogenmod.platform.jar' failed make: *** [out/org.cyanogenmod.platform.jar] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

Unfornately, still does not work. May I done something wrong? Thanks

aymende7 commented 6 years ago

remove org.cyanogenmod.platform from makefile

Andrei-Tanase commented 6 years ago

Like this?

#

Makefile for Find5

#

The original zip file, MUST be specified by each product

local-zip-file := stockrom.zip

The output zip file of MIUI rom, the default is porting_miui.zip if not specified

local-out-zip-file := MIUI_ONYX.zip

the location for local-ota to save target-file

local-previous-target-dir :=

All apps from original ZIP, but has smali files chanded

local-modified-apps :=

All apks from MIUI

local-miui-removed-apps := FM

local-miui-modified-apps := TeleService InCallUI

Config density for co-developers to use the aaps with HDPI or XHDPI resource,

Default configrations are HDPI for ics branch and XHDPI for jellybean branch

local-density := XXHDPI

All apps need to be removed from original ZIP file

local-remove-apps :=

include phoneapps.mk

The certificate for release version

local-certificate-dir := security

local-target-bit := 32

To include the local targets before and after zip the final ZIP file,

and the local-targets should:

(1) be defined after including porting.mk if using any global variable(see porting.mk)

(2) the name should be leaded with local- to prevent any conflict with global targets

local-pre-zip := local-pre-zip-misc local-after-zip:= local-put-to-phone

The local targets after the zip file is generated, could include 'zip2sd' to

deliver the zip file to phone, or to customize other actions

include $(PORT_BUILD)/porting.mk

To define any local-target

updater := $(ZIP_DIR)/META-INF/com/google/android/updater-script

pre_install_data_packages := $(TMP_DIR)/pre_install_apk_pkgname.txt

local-pre-zip-misc:

@echo Update boot.img

#cp -rf other/boot.img $(ZIP_DIR)/boot.img
#cp -rf other/system $(ZIP_DIR)/

@echo goodbye! miui prebuilt binaries!
rm -rf $(ZIP_DIR)/system/bin/app_process32_vendor
cp -rf stockrom/system/bin/app_process32 $(ZIP_DIR)/system/bin/app_process32
Andrei-Tanase commented 6 years ago

Thanks a lot, but now I got another error: rm: cannot remove '/home/andrei/patchrom/device/out/target_files/SYSTEM/linkinfo.txt': No such file or directory /home/andrei/patchrom/tools/build_target_files.sh: line 154: ./customize_target_files.sh: Permission denied /home/andrei/patchrom/build/porting.mk:314: recipe for target 'fullota' failed make: *** [fullota] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

How do I fix this one?

aymende7 commented 6 years ago

chmod a+x customize_target_files.sh

Andrei-Tanase commented 6 years ago

I get this now: IOError: [Errno 2] No such file or directory: '/home/andrei/patchrom/device/metadata/apkcerts.txt' cp: cannot stat '/home/andrei/patchrom/device/metadata/linkinfo.txt': No such file or directory /home/andrei/patchrom/device/out/target_files/SYSTEM/linkinfo.txt isn't exist rm: cannot remove '/home/andrei/patchrom/device/out/target_files/SYSTEM/linkinfo.txt': No such file or directory cp: cannot stat 'other/file_contexts': No such file or directory /home/andrei/patchrom/build/porting.mk:314: recipe for target 'fullota' failed make: *** [fullota] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

Why?... Any ideas? It is something in makefile? Or I need to copy/make some files? Thanks for given help

aymende7 commented 6 years ago

send your boot.img from stockrom.zip

Andrei-Tanase commented 6 years ago

Boot.zip Here it is. Thank you a lot!

EDIT: Also, do you know how to fix rejects? I have a lot of exams and my users really want this rom coming after I told my them that I will build it in a few days; don't take this as an obligation, but it would be nice if someone would've helped me fix this annoying rejects. And of course, for helping me I'm tottaly put you into the contribuitors tab if this ROM builds, and if it boots.

aymende7 commented 6 years ago

You're welcome unzip this to device folder

aymende7 commented 6 years ago

@XTutorials works?

Andrei-Tanase commented 6 years ago

Sign target files ERROR: no key specified for:

WAPPushManager.apk CMWallpapers.apk webview.apk LiveWallpapers.apk CMFileManager.apk Camera2.apk Gallery2.apk Terminal.apk telresources.apk Development.apk PhotoPhase.apk BasicDreams.apk Exchange2.apk NoiseField.apk Gello.apk LatinIME.apk Profiles.apk messaging.apk PacProcessor.apk Stk.apk PhaseBeam.apk PicoTts.apk CertInstaller.apk ExactCalculator.apk HoloSpiralWallpaper.apk supl20Service.apk PhotoTable.apk KeyChain.apk Eleven.apk Galaxy4.apk NfcNci.apk PrintSpooler.apk HexoLibre.apk Bluetooth.apk WallpaperPicker.apk LockClock.apk Screencast.apk DataUsageProvider.apk Trebuchet.apk WeatherManagerService.apk AudioFX.apk ThemeManagerService.apk CMUpdater.apk Dialer.apk CMAudioService.apk SystemUI.apk CellBroadcastReceiver.apk LiveLockScreenService.apk CyanogenSetupWizard.apk CMSettingsProvider.apk ThemesProvider.apk ThemeChooser.apk Tag.apk org.cyanogenmod.platform-res.apk

Use '-e =' to specify a key (which may be an empty string to not sign this apk). Build full ota package: /home/andrei/patchrom/device/out/fullota.zip unzipping target target-files... warning [/home/andrei/patchrom/device/out/target_files.zip]: zipfile is empty

ERROR: failed to unzip input target-files "/home/andrei/patchrom/device/out/target_files.zip"

/home/andrei/patchrom/build/porting.mk:314: recipe for target 'fullota' failed make: *** [fullota] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

Why "no key specified"? What that does mean?

https://drive.google.com/open?id=0Bx9qplihpe8YY3ZWeWJoZFhqYXM

Here is all rejects, stockrom.zip and other files to fix rejects, maybe. That may cause the problem. Also, do you have XDA, if yes, can you give me your link? Thanks

aymende7 commented 6 years ago

https://forum.xda-developers.com/member.php?u=7321414 have you fixed the rejects? device/metadata/apkcerts.txt send this file

Andrei-Tanase commented 6 years ago

No, I fixed, maybe 10, but I'm not sure if perfect, I'm new to MIUI, I developed more easier roms like AOKP, LOS, not MIUI. That's why I send you also rejects, maybe fix at least some of them for me and make another secondpatch.

I have found no apkcerts.txt, I have found just angler/... , or template/....

aymende7 commented 6 years ago

@XTutorials check your inbox

Andrei-Tanase commented 6 years ago

@aymende7 , here is metadata: metadata.zip

Andrei-Tanase commented 6 years ago

@aymende7 , now what? done. Build full ota package: /home/andrei/patchrom/device/out/fullota.zip unzipping target target-files... loaded device-specific extensions from /home/andrei/patchrom/device using prebuilt boot.img from BOOTABLE_IMAGES... Traceback (most recent call last): File "/home/andrei/patchrom/tools/releasetools/ota_from_target_files", line 1792, in main(sys.argv[1:]) File "/home/andrei/patchrom/tools/releasetools/ota_from_target_files", line 1747, in main WriteFullOTAPackage(input_zip, output_zip) File "/home/andrei/patchrom/tools/releasetools/ota_from_target_files", line 640, in WriteFullOTAPackage system_items.GetMetadata(input_zip) File "/home/andrei/patchrom/tools/releasetools/ota_from_target_files", line 202, in GetMetadata key, value = element.split("=") ValueError: need more than 1 value to unpack /home/andrei/patchrom/build/porting.mk:314: recipe for target 'fullota' failed make: *** [fullota] Error 1 andrei@Andrei-HP-EliteBook:~/patchrom/device$

I added fingerprint in build.prop, why "need more than 1 value to unpack" What values? What to unpack Please help me. Thanks

Andrei-Tanase commented 6 years ago

@aymende7 , here it is: build.prop.zip

ghost commented 6 years ago

i have a miui 8 6.10.28 zip file so i want to update it to latest version i have downloaded patchrom also. so what should i do to update that zip file which command to use

aymende7 commented 6 years ago

@FaArIsH patchrom is outdated

ghost commented 6 years ago

@aymende7 so sad i thought this also get updated like linageos source. do you know which app is responsible for headphones and audio settings FC? i m having that issue.

aymende7 commented 6 years ago

@FaArIsH sorry i don't know take logs and report it to the devs