FlymeOS / manifest

Apache License 2.0
182 stars 127 forks source link

Fullota Issue #34

Closed M4rM0rKuch3N closed 6 years ago

M4rM0rKuch3N commented 6 years ago

Hello, I am building for Xiaomi Mi6 with LOS14.1 was base, flyme config flyme newproject flyme patchall

went okay

but in "flyme fullota" i get thi error

apktool if(install framework): board ... S: WARNING: Could not write to (/home/jan/.local/share/apktool/framework), using /tmp instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable I: Framework installed to: /tmp/1-board_sagit_lin.apk S: WARNING: Could not write to (/home/jan/.local/share/apktool/framework), using /tmp instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable I: Framework installed to: /tmp/2-board_sagit_lin.apk S: --frame-path is set to a file, not a directory. S: --frame-path is set to a file, not a directory. /home/jan/Flyme_N/build/main.mk:183: die Regel für Ziel „out/obj/system/framework/ifboard“ scheiterte make[1]: [out/obj/system/framework/ifboard] Fehler 1 make[1]: Verzeichnis „/home/jan/Flyme_N/device/Xiaomi/sagit_lin“ wird verlassen /home/jan/Flyme_N/build/main.mk:34: die Regel für Ziel „ota“ scheiterte make: [ota] Fehler 2

Makefile.zip

sky0hjh commented 6 years ago

pic Open your Terminal,then cd .local mkdir -p share/apktool/framework Maybe it will helps.

M4rM0rKuch3N commented 6 years ago

Now it can write to it, but now this error

apktool if(install framework): board ... I: Framework installed to: /home/jan/.local/share/apktool/framework/1-board_sagit_lin.apk I: Framework installed to: /home/jan/.local/share/apktool/framework/2-board_sagit_lin.apk S: --frame-path is set to a file, not a directory. S: --frame-path is set to a file, not a directory. /home/jan/Flyme_N/build/main.mk:183: die Regel für Ziel „out/obj/system/framework/ifboard“ scheiterte make[1]: [out/obj/system/framework/ifboard] Fehler 1 make[1]: Verzeichnis „/home/jan/Flyme_N/device/Xiaomi/sagit_lin“ wird verlassen /home/jan/Flyme_N/build/main.mk:34: die Regel für Ziel „ota“ scheiterte make: [ota] Fehler 2

rawmain commented 6 years ago

Hello

Try to run it in a shell enviroment with root privileges & apply this workaround = I've changed the definition of APKTOOL_FRAME_PATH in file build/locals.mk - line 105 :

APKTOOL_FRAME_PATH := /root/.local/share/apktool/framework
# APKTOOL_FRAME_PATH := ~/.local/share/apktool/framework/
M4rM0rKuch3N commented 6 years ago

Hello thanks for your reply, But my locals.mk file on line 105 is already like that and still the error i posted above

rawmain commented 6 years ago

Hello

Does it happen even if You switch to root shell environment (sudo -s) before proceeding with flyme fullota ?

M4rM0rKuch3N commented 6 years ago

Yes, still the same.. It says "--frame-path is set to a file, not a directory."

rawmain commented 6 years ago

Strange... this is my current locals.mk - that's ok if You're running flyme patchrom steps in a root shell environment.

2017-12-15

M4rM0rKuch3N commented 6 years ago

That's mine.. The modify line was automatically created i guess.. Do I need it ? bildschirmfoto_2017-12-15_23-45-02

rawmain commented 6 years ago

That's default locals.mk = if You don't have permission issues You may keep it unchanged. Otherwise change it as in my file.

Then from the same terminal window :

  1. switch to root shell environment (sudo -s)

  2. cd to flyme/

  3. flyme fullota

M4rM0rKuch3N commented 6 years ago

It goes past that now, thank you :D I will write here if theres an error when building somewhere here or open a new issue ?

M4rM0rKuch3N commented 6 years ago

Okay now I am stuck again, it still wants to use another directory.. I have made the framework folder in the apktool folder, I've edited my locals.mk file as yours and i am in sudo -s mode, but now I'm gettint that

apktool if(install framework): merged ... S: WARNING: Could not write to (/root/.local/share/apktool/framework), using /tmp instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable I: Framework installed to: /tmp/63-merged_sagit_lin.apk S: WARNING: Could not write to (/root/.local/share/apktool/framework), using /tmp instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable I: Framework installed to: /tmp/1-merged_sagit_lin.apk S: WARNING: Could not write to (/root/.local/share/apktool/framework), using /tmp instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable I: Framework installed to: /tmp/2-merged_sagit_lin.apk cp: cannot stat '/home/jan/root/.local/share/apktool/framework//1-merged_sagit_lin.apk': No such file or directory /home/jan/Flyme_N/build/main.mk:198: recipe for target 'out/obj/system/framework/ifmerged' failed make[1]: [out/obj/system/framework/ifmerged] Error 1 make[1]: Leaving directory '/home/jan/Flyme_N/device/Xiaomi/sagit_lin' /home/jan/Flyme_N/build/main.mk:34: recipe for target 'ota' failed make: [ota] Error 2

rawmain commented 6 years ago

You're receiving such error message because - even though running in root sh - it's not writing files to chosen frame path folder, but it's using /tmp/ temporary folder.

Indeed apktool_if_merged (defined in defines.mk lines 38-43) can't find source files in order to copy them to board modify dir.

Therefore change line 105 in locals.mk, in order to use instead such tmp directory as source dir for cp command used by merge-passage :

APKTOOL_FRAME_PATH := /tmp

M4rM0rKuch3N commented 6 years ago

Changed it, now this:

build |target-files|SYSTEM|board_modify_resid_apk| to out/obj/system/framework/flyme-framework.jar ... I: Using Apktool 2.3.0 on flyme-framework.jar I: Baksmaling classes.dex... I: Copying assets and libs... I: Copying unknown files... I: Copying original files...

modify resource id: out/obj/system/app/flyme-framework.cMk ... <<<< modify resource id: out/obj/system/app/flyme-framework.cMk done Missing argument for option: p Apktool v2.3.0 - a tool for reengineering Android apk files with smali v2.2.1 and baksmali v2.2.1 Copyright 2014 Ryszard Wiśniewski brut.alll@gmail.com Updated by Connor Tumbleson connor.tumbleson@gmail.com

usage: apktool -advance,--advanced prints advance information. -version,--version prints the version then exits usage: apktool if|install-framework [options] -p,--frame-path

Stores framework files into . -t,--tag Tag frameworks using . usage: apktool d[ecode] [options] -f,--force Force delete destination directory. -o,--output The name of folder that gets written. Default is apk.out -p,--frame-path Uses framework files located in . -r,--no-res Do not decode resources. -s,--no-src Do not decode sources. -t,--frame-tag Uses framework files tagged by . usage: apktool b[uild] [options] -f,--force-all Skip changes detection and build all files. -o,--output The name of apk that gets written. Default is dist/name.apk -p,--frame-path Uses framework files located in .

For additional info, see: http://ibotpeaches.github.io/Apktool/ For smali/baksmali info, see: https://github.com/JesusFreke/smali <<< build |target-files|SYSTEM|board_modify_resid_apk| to out/obj/system/framework/flyme-framework.jar ... cp: cannot stat 'out/obj/system/framework/flyme-framework.jar': No such file or directory /home/jan/Flyme_N/build/main.mk:457: recipe for target 'out/merged_target_files/SYSTEM/framework/flyme-framework.jar' failed make[1]: [out/merged_target_files/SYSTEM/framework/flyme-framework.jar] Error 1 make[1]: Leaving directory '/home/jan/Flyme_N/device/Xiaomi/sagit_lin' /home/jan/Flyme_N/build/main.mk:34: recipe for target 'ota' failed make: [ota] Error 2

rawmain commented 6 years ago

Hello

It doesn't find flyme-framework.jar in out/obj/system/framework/ (as expected instead).

2017-12-16 1

May You attach your build/locals.mk in order to check/compare ?

Besides, have you done some changes to default /build and/or /tools files ? = I see that You're using apktool 2.3.0 instead of 2.2.2 (provided by default in /tools/reverses dir).

2017-12-16

M4rM0rKuch3N commented 6 years ago

Good morning !

I didn't change any of these files, just the locals.mk file as yours.. I have no Idea hy its using a newer apktool version because as i said, i didnt do any changes to these files

But here's my locals.mk file locals.mk.zip

M4rM0rKuch3N commented 6 years ago

An no I haven't got an flyme-framework.jar file in the out/obj/system/framework folder

It did all the setps until flyme fullota correctly.. I guess it creates this file at some point ?

rawmain commented 6 years ago

Check other dirs (i.e. /tmp/ - ~/.local/ - /root/.local/) for project related files.

About apktool 2.3.0 notice, If You have installed it before & it's located in a path with higher priority (check printenv), scripts will use it (instead of pre-shipped 2.2.2 inside tools folder).

M4rM0rKuch3N commented 6 years ago

Hello, i checked these folders, and couldnt find anything related there.. And i checked, and no apktool omstalled previously.. If i type in terminal "apktool" it says, that apktool is currently not installed

rawmain commented 6 years ago

What are you using as build environment system (distro, physical or virtual machine) ?

It could be useful to check with a fresh environment, such as a dedicated VM = you could use for instance BuilduntuVM by nathanpfry.com or a Google compute instance in order to avoid conflicts/issues related to former/other settings.

M4rM0rKuch3N commented 6 years ago

I use Ubuntu installed normally on my AMD-Desktop, so no virtual machine

M4rM0rKuch3N commented 6 years ago

Hey, I set up builduntu, downloaded flyme sources and put my already existing device folder there, but now when "flyme fullota" i get this error: M4rM0rKuch3N .:

generating mac_permissions ... <<< generating mac_permissions.xml done

  • mac_permissions.xml out ==> out/merged_target_files/SYSTEM/etc/security/mac_permissions.xml

apktool if(install framework): merged ... I: Framework installed to: /home/jan/.local/share/apktool/framework/1-merged_sagit_lin.apk I: Framework installed to: /home/jan/.local/share/apktool/framework/2-merged_sagit_lin.apk I: Framework installed to: /home/jan/.local/share/apktool/framework/63-merged_sagit_lin.apk cp: cannot create regular file '/home/jan/.local/share/apktool/framework//board_modify//1-board_sagit_lin.apk': No such file or directory /home/jan/android/Flyme/build/main.mk:198: recipe for target 'out/obj/system/framework/ifmerged' failed make[1]: [out/obj/system/framework/ifmerged] Error 1 make[1]: Leaving directory '/home/jan/android/Flyme/devices/Xioami/sagit_lin' /home/jan/android/Flyme/build/main.mk:34: recipe for target 'ota' failed make: [ota] Error 2

<<< fullota failed jan@jan-desktop:~/android/Flyme/devices/Xioami/sagit_lin$