Open jeanrivera opened 6 years ago
not sure if anyone is following this issue at all but I just wanted to update just in case someone wants to give it a shot and fix the issue
"The problem is that your device/TWRP is using DRM graphics (hardware accelerated) instead of framebuffer (traditional SW rendering). Aroma doesn't understand how to use your graphics "driver".
Unless you can get a build of TWRP (and kernel) with classic framebuffer rendering, it can't be fixed. Not sure how likely or even possible that is."
that being said if someone want to fix AROMA and with the proper drivers instructions for this new devices that would be awesome since most kernel dev will not go back to classic framebuffer having this new drivers
I also encountered this problem.
I don't know how to solve it.
When I tried to solved that I noted that AROMA can't output to the screen even if TWRP got SIGSTOP. But you can clear the screen if you execute the "stop recovery" comand. TWRP will be stopped but AROMA will be able to use screen.
And how do I execute the stop recovery command?
run_program("stop", "recovery"); Or run_program("setprop", "ctl.stop", "recovery");
Also you shoul not forget about starting the recovery service right after the end of AI script. Use start or setprop ctl.start. Also you can reboot device without returning to recovery with "reboot -f system".
@twaik what device you use for that?
@jeanrivera I don't remember. It was a long time ago. Try to run the command over ADB first.
@twaik I did already, and it didn't work, I just got a black screen, this is more related to new display drivers on SD 845 devices, and aroma does not know how handle those graphics at all but thanks for the suggestions
@jeanrivera can you please try something for me?
/update-binary 1 1 /update.zip
That is the comand used to start update process in recovery.
And then report about what you see on screen. If that fails we can't help you.
Also I can try to create TWRP based graphics output for AROMA Installer, but it will work if the binary will be built inside TWRP source with other parts of recovery for device.C:\ADB>adb push update.zip / update.zip: 1 file pushed. 29.2 MB/s (4164094 bytes in 0.136s)
C:\ADB>adb push update-binary / update-binary: 1 file pushed. 27.1 MB/s (627580 bytes in 0.022s)
C:\ADB>adb shell /update-binary 1 1 /update.zip /sbin/sh: /update-binary: Permission denied
C:\ADB>
@jeanrivera
adb shell chmod 755 /update-binary
and then try that last command again
this was the output on the command window but the device was on a black screen nothing visual
C:\ADB>adb push update.zip /
update.zip: 1 file pushed. 29.1 MB/s (4164094 bytes in 0.136s)
C:\ADB>adb push update-binary /
update-binary: 1 file pushed. 28.4 MB/s (627580 bytes in 0.021s)
C:\ADB>adb shell chmod 755 /update-binary
C:\ADB>adb shell /update-binary 1 1 /update.zip
aroma/s: Initializing
Starting AROMA Installer version 2.70RC2
(c) 2013 by amarullz xda-developers
ui_print
ui_print Starting AROMA Installer version 2.70RC2
ui_print
ui_print (c) 2013 by amarullz xda-developers
ui_print
ui_print
aroma/s: Mute Parent
aroma/s: Saving Arguments
aroma/s: Open Archive
aroma/s: Initializing Resource
aroma/s: Opening Freetype
aroma/s: INDR Input Device: STM VL53L0 proximity sensor (event4) - Class : 0
aroma/s: VKN : 0, CALIB : (0,0,0,0)
aroma/s: INDR Input Device: snt8100fsr (event7) - Class : 6
aroma/s: VKN : 0, CALIB : (0,1080,0,2560)
aroma/s: INDR Input Device: snt8100fsr (event2) - Class : 6
aroma/s: VKN : 0, CALIB : (0,1080,0,2560)
aroma/s: INDR Input Device: qpnp_pon (event0) - Class : 1
aroma/s: VKN : 0, CALIB : (0,0,0,0)
aroma/s: INDR Input Device: gpio-keys (event6) - Class : 1
aroma/s: VKN : 0, CALIB : (0,0,0,0)
aroma/s: INDR Input Device: qwerty (event1) - Class : 1
aroma/s: VKN : 0, CALIB : (0,0,0,0)
aroma/s: INDR Input Device: AK8789_HALL_SENSOR (event3) - Class : 1
aroma/s: VKN : 0, CALIB : (0,0,0,0)
aroma/s: INDR Input Device: synaptics_dsx_touchscreen (event5) - Class : 7
aroma/s: VKN : 0, CALIB : (0,1439,0,2879)
aroma/s: Starting Interface
aroma/s: aroma-config was UTF-8
aroma/s: # INCLUDE SCRIPT (language_select.edify)
aroma/s: + language_select.edify was UTF-8
aroma/s: (2) Freetype fonts loaded as Font Family
aroma/s: (2) Freetype fonts loaded as Font Family
I assume nothing on the device, then?
I assume nothing on the device, then?
nothing in the device correct
Looks like the only way to start Aroma on the device is to build it over TWRP sources with some patches...
Looks like the only way to start Aroma on the device is to build it over TWRP sources with some patches...
are you able to help with that?
@jeanrivera maybe. First thing I need is link to TWRP source used for the build and its version. If TWRP is build from source for the device, of course.
I have some work here, but I think I'll help you in a few days. And you should know that the Aroma build will be suitable only on that device model. I don't even know if it work on CWM.
@jeanrivera maybe. First thing I need is link to TWRP source used for the build and its version. If TWRP is build from source for the device, of course.
https://github.com/CaptainThrowback/android_device_htc_ime
is that the correct source @CaptainThrowback
I have some work here, but I think I'll help you in a few days. And you should know that the Aroma build will be suitable only on that device model. I don't even know if it work on CWM.
there is no rush with that I have been trying to figure this out for months, practically since the release of the device and TWRP for it
@twaik let me now if you need anything else from my end to makes things easier on your side
@jeanrivera Can you please try to build that on you device tree? https://github.com/twaik/AROMA-Installer/
I have asked @CaptainThrowback to do it since I have no idea how to build stuff I'll let you know the outcome, he did mentioned this: Captain_Throwback [4:56 PM] it has to be built in the 5.1 tree, unless he's updated the tree to actually build with 8.1 it definitely fails on 5.1
I'll try it on 8.1
Jeanrivera [4:56 PM] I see his tree has a few commits amarullz does not have
Captain_Throwback [4:56 PM] but AROMA doesn't build 64-bit, as far as I know
Jeanrivera [5:01 PM] ok if you try and it doesn't work I'll still thank you a lot for trying
Captain_Throwback [5:02 PM] I only see one new patch in the source and it looks specific to this problem so I believe 64-bit will still be an issue just building it with the updated TWRP tree and his changes should fix the issue, presumably but since it doesn't build in 5.1, there's probably some code tweaks needed
@twaik
I tried building your source in the android-5.1 minimal Omni tree (which uses TWRP's android-9.0 branch) but I'm getting errors. AROMA has to be built for arm, so I have to use an older tree (either 5.1 or 6.0) for it to actually compile. It does not, however, compile, with your updates, at least not in android-5.1:
In file included from external/aroma-installer/src/libs/aroma_graph.cpp:33:0:
bootable/recovery/minui/include/minui/minui.h:221:45: error: declaration of C function 'int ev_init(ev_callback, void*)' conflicts with
int ev_init(ev_callback input_cb, void *data);
^
In file included from external/aroma-installer/src/libs/aroma_graph.cpp:30:0:
external/aroma-installer/src/libs/../aroma.h:712:9: error: previous declaration 'int ev_init()' here
int ev_init(void);
^
external/aroma-installer/src/libs/aroma_graph.cpp:34:8: error: 'GRSurface' does not name a type
static GRSurface* aroma_surface;
^
external/aroma-installer/src/libs/aroma_graph.cpp: In function 'unsigned char ag_init()':
external/aroma-installer/src/libs/aroma_graph.cpp:319:3: error: 'aroma_surface' was not declared in this scope
aroma_surface->width = gr_fb_width();
^
external/aroma-installer/src/libs/aroma_graph.cpp: In function 'void ag_refreshrate()':
external/aroma-installer/src/libs/aroma_graph.cpp:1085:11: error: 'aroma_surface' was not declared in this scope
gr_blit(aroma_surface, 0, 0, aroma_surface->width, aroma_surface->height, 0, 0);
^
build/core/binary.mk:620: recipe for target '/data/Android/build/omni/android-5.1/out/target/product/m8/obj/EXECUTABLES/aroma_installer_intermediates/src/libs/aroma_graph.o' failed
make: *** [/data/Android/build/omni/android-5.1/out/target/product/m8/obj/EXECUTABLES/aroma_installer_intermediates/src/libs/aroma_graph.o] Error 1
make: *** Waiting for unfinished jobs....
I used libminui's api in the patch. That should work on both TWRP and CWM, but it still will be device specific build. It should work on any recovery version.
@twaik How is the build device-specific?
That means that the binary built with my source will be suitable only for the device it was build for. New commit is available. You can ask firmware maintainer to build it.
@twaik I think you misunderstood my very vague question. I mean I looked at the code, and I don't see how it's device-specific. There's no way to lunch for the device that we need to use the binary with and build, because the AROMA source doesn't support 64-bit nor the 8.1 Android tree. The only way to get it to build is to use an older tree, like I previously stated. So if you're saying I have to build for the device we want to use the binary on, that's not currently possible.
At any rate, I'm still getting build errors:
external/aroma-installer/src/libs/aroma_minui.cpp:8:8: error: 'GRSurface' does not name a type
static GRSurface* aroma_surface;
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'void aroma_minui_init()':
external/aroma-installer/src/libs/aroma_minui.cpp:11:2: error: 'aroma_surface' was not declared in this scope
aroma_surface->width = gr_fb_width();
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'int aroma_minui_get_fb_width()':
external/aroma-installer/src/libs/aroma_minui.cpp:19:9: error: 'aroma_surface' was not declared in this scope
return aroma_surface->width;
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'int aroma_minui_get_fb_height()':
external/aroma-installer/src/libs/aroma_minui.cpp:23:9: error: 'aroma_surface' was not declared in this scope
return aroma_surface->height;
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'void* aroma_minui_get_data()':
external/aroma-installer/src/libs/aroma_minui.cpp:27:9: error: 'aroma_surface' was not declared in this scope
return aroma_surface->data;
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'void aroma_minui_flip()':
external/aroma-installer/src/libs/aroma_minui.cpp:31:10: error: 'aroma_surface' was not declared in this scope
gr_blit(aroma_surface, 0, 0, aroma_surface->width, aroma_surface->height, 0, 0);
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'int aroma_minui_get_fb_width()':
external/aroma-installer/src/libs/aroma_minui.cpp:20:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'int aroma_minui_get_fb_height()':
external/aroma-installer/src/libs/aroma_minui.cpp:24:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
external/aroma-installer/src/libs/aroma_minui.cpp: In function 'void* aroma_minui_get_data()':
external/aroma-installer/src/libs/aroma_minui.cpp:28:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1plus: some warnings being treated as errors
build/core/binary.mk:620: recipe for target '/data/Android/build/omni/android-5.1/out/target/product/m8/obj/EXECUTABLES/aroma_installer_intermediates/src/libs/aroma_minui.o' failed
make: *** [/data/Android/build/omni/android-5.1/out/target/product/m8/obj/EXECUTABLES/aroma_installer_intermediates/src/libs/aroma_minui.o] Error 1
make: *** Waiting for unfinished jobs....
@CaptainThrowback that is device specific because it is built with libminui. libminui uses libdrm of the target device. I didn't try to build the x64 version. But I used the 8.1 tree's twrp source for build. What is the exact reason Aroma can not be built over 8.1 tree?
Can you give me comands needed to clone the device tree and to initialize build environment? Including lunch/breakfast comand. I need to build the source using the TWRP version used on the device.
I'm using the minimal Omni android-8.1 device tree, shallow clone, from here:
This repo init command:
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-8.1
And then to build:
cd <source-dir>; export ALLOW_MISSING_DEPENDENCIES=true; . build/envsetup.sh; lunch omni_ime-eng; mka aroma_installer
@twaik Here is the plethora of errors when trying to build for the U12+ in the 8.1 Android tree: https://del.dog/yacimugala.makefile
@CaptainThrowback I disabled NEON support for 64bit build. You can try to build it again.
Yes, your latest changes build successfully. Now @jeanrivera needs to test it in TWRP.
still black screen
@CaptainThrowback did you send him new update.zip?
aroma-2.70RC2.zip this is the zip I am using for testing
I just replaced the update-binary with the file he send to me after renaming from aroma_installer to update-binary
@jeanrivera Can you try to stop recovery first? https://github.com/amarullz/AROMA-Installer/issues/38#issuecomment-423348745
@jeanrivera any updates?
black screen but i did noticed the screen blinked for less than split a second output:
`C:\ADB>adb push aroma-2.70RC2.zip /
aroma-2.70RC2.zip: 1 file pushed. 28.4 MB/s (4432139 bytes in 0.149s)
C:\ADB>adb push update-binary /
update-binary: 1 file pushed. 28.6 MB/s (1409360 bytes in 0.047s)
C:\ADB>adb shell chmod 755 /update-binary
C:\ADB>adb shell stop recovery
C:\ADB>adb shell /update-binary 1 1 /aroma-2.70RC2.zip
aroma/s: Initializing
Starting AROMA Installer version 2.70RC2
(c) 2013 by amarullz xda-developers
ui_print
ui_print Starting AROMA Installer version 2.70RC2
ui_print
ui_print (c) 2013 by amarullz xda-developers
ui_print
ui_print
aroma/s: Mute Parent
aroma/s: Saving Arguments
aroma/s: Open Archive
aroma/s: Initializing Resource
Unknown format 875713089
Unknown format 875713089
Using drm graphics.
`
@jeanrivera any updates?
yes i just replied
In your recovery.log both drmModeSetCrtc and drmModePageFlip failed with error -13: Access denied. I thought it was because TWRP was DRM master but now it should not interrupt the output. Maybe that's mistake in my patches... Looks like we need help of TWRP's developers here.
Another way to use AROMA in TWRP is to build TWRP and kernel without DRM support, only with classic framebuffer rendering.
Another way to use AROMA in TWRP is to build TWRP and kernel without DRM support, only with classic framebuffer rendering.
I am pretty sure that was a point of discussion already, but since there is no recovery partition on Treble A/B devices TWRP is part of the boot.img, building with classic framebuffer would make TWRP really slow or something like that the devs mentioned or at leas that was what I understood out of the conversation, I am just a guinea pig trying everything devs throw at me regarding aroma possible solutions but I do not build anything I just test and provide logs
Maybe that's my mistake in the AROMA&minui source... I need somebody to check it out. Your screen blinked so maybe image updated but I didn't noticed the mistake in my code...
@twaik I guess there is no more to test for now right? I understand that you are busy on another projects, if you come up with something else let me know and thanks for the time you spend on trying to fix an issue for a device you don't even own yourself, I really appreciate that.
I have an idea what should be done but that needs an additional interface inside TWRP which provides drawing surface to updater binary via Unix socket. I dont think TWRP developers will add it to the project.
@twaik
Submit a patch for it to TWRP Gerrit and see if it gets approved. Either way, if the patch is created, it'll be possible to build an unofficial TWRP for the affected devices with the possibility of a working AROMA interface. That itself might convince the TWRP team to add it, provided it's coded properly and doesn't negatively impact anything else.
@twaik & @CaptainThrowback I could try to use an unofficial TWRP build on my U12+ built by either of you with suggested patches and make sure it doesn't affect any other functionality in a negative way before submitting the patch, I'll gladly help testing this before submission and provide feedback and logs as needed. Thanks again to both of you on trying to resolve an issue on a device none of of you have, I understand how difficult it could be trying to fix something blindly, and depend on someone else for testing,
while trying to flash any AROMA GUI Installer embedded zip for example a ROM or OpenGapps, TWRP just freezes but adb commands still work it looks like a graphics rendering issue because it doesn't even get to the splash part of any zip with AROMA GUI I can provide logs if needed,
I know AROMA is an abandoned project but some of the ROM devs still use it for personal customizations on custom ROMs like Team Venom, LeeDroid, etc.... & Kernels like Elemental X
recovery (4).log