Calculator Stock APK for MagicUI 2.1 ? - Honor View 20 Questions & Answers

Hello teammates,
I unintentionally deleted the Huawei stock calculator application :crying:
Would you have the latest APK coming with Magic UI 2.1 ?
Thanks a lot

Ok I have found "calc v9.1.0.301 from EU VOG-L29 fw 124": https://forum.xda-developers.com/showpost.php?p=79471237&postcount=3
In order to install this APK via ADB Tools, you have to sign the APK.
Code:
apksigner sign --ks debug.keystore com.android.calculator2-90100301-v9.1.0.301.apk
You can find your debug.keystore in your android folder (/Users/USER/.android in MacOS).
then
Code:
adb install com.android.calculator2-90100301-v9.1.0.301.apk
------------------
If you haven't any debug.keystore, you can create a .jks with
Code:
keytool -genkey -v -keystore my-release-key.jks
-keyalg RSA -keysize 2048 -validity 10000 -alias my-alias

You must be install this APK via ADB Tools

Related

[Q] How do I create a signed ZIP

OK I have been trying to create a signed zip that contains an apk. So I assume I must sign the apk then zipalign it then make the zip, sign it and zipalign the zip file. When I do this i get a Verification error when I try to flash it.
Steps I do are;
1 create the folder structure
2 create the apk using apkbuilder
3 sign the apk with jarsigner
4 zipalign the apk
5 zip up the whole update
6 sign the zip with jarsigner
7 zipalign the zip
try to flash it and it fails.
I am using windows xp and a version of zip that doesn't add the directories.
Questions are.
Is this correct way to do this?
What tools should I be using. I have looked across xda and tried some suggestions but I cannot make the signed zip flash?
Help?
http://forum.xda-developers.com/showthread.php?t=717437
use this tool for much simplicity
Or use this tool with any operating system:
http://www.londatiga.net/it/how-to-sign-apk-zip-files/
lambrospower said:
http://forum.xda-developers.com/showthread.php?t=717437
use this tool for much simplicity
Click to expand...
Click to collapse
Brilliant it works thanks very much.....
Now all I want to know is where I was going wrong
Tried to create my own keys using the post http://www.londatiga.net/it/how-to-sign-apk-zip-files/ but I have no success when I sign using my keys.
To create them I used the commands... (as per the post)
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
using OpenSSL 0.98l
Any ideas? I would like to be able to use my own keys...

[Q] problem creating bootmenu

Hi guys i have a problem creating the bootmenu
I am following this post but when i'm going to 3rd line:
C:/> adb shell
$ su
# cp -R /sdcard/bootmenu /data/bootmenu
# cd /data/bootmenu
# chmod 755 *
# ./install.sh
# rm -R /data/bootmenu
i get the following message: cd: can't cd to /data/bootmenu
could you tell me please what i'm doing wrong???
Post the output of
# ls -l /data/bootmenu
Maybe it does not exist OR it is a file (it will be a file if /sdcard/bootmenu was one)
But in any case: It's much easier to install 2nd-init directly from the android market: The currently included version 0.45 works good enough to install the CM7 port (afterwards you'll have 0.51 anyway as the port includes it's own version)
pabx said:
Post the output of
# ls -l /data/bootmenu
Maybe it does not exist OR it is a file (it will be a file if /sdcard/bootmenu was one)
But in any case: It's much easier to install 2nd-init directly from the android market: The currently included version 0.45 works good enough to install the CM7 port (afterwards you'll have 0.51 anyway as the port includes it's own version)
Click to expand...
Click to collapse
Ok thanks! I saw today new version of this that include 0.5.1

How to built Kitkat rom for htc desire 616 ??

the update file released by htc for htc desire 616 contains a read me file showing how to use the update but i cannot understand it if someone can explain i would be so greatful
defconfig file: a3ul_defconfig (arm-eabi-4.7)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
git clone https://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7 for 4.7
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
For additional information:
===========================
http://htcdev.com
honeyman_1989 said:
the update file released by htc for htc desire 616 contains a read me file showing how to use the update but i cannot understand it if someone can explain i would be so greatful
defconfig file: a3ul_defconfig (arm-eabi-4.7)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
git clone https://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7 for 4.7
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
For additional information:
===========================
http://htcdev.com
Click to expand...
Click to collapse
This procedure will give you a kernel,not a ROM.
Sent from a Cool Phone stuck with crappy KingUser
checkout these links
for rom compiling
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
https://source.android.com/source/building.html
http://forum.xda-developers.com/showthread.php?t=2223690
http://forum.xda-developers.com/showthread.php?t=2754145
http://forum.xda-developers.com/showthread.php?t=2320007
https://www.youtube.com/watch?v=fN0v5H0Eoe4
if still have any question feel free to ask.
or pm me
Give the full build rom from HTC 616 for kitkat

[Tool] Samloader (SamFirm / Frija replacement)

Hello,
I recently wanted to download some firmware for my Samsung device, but I realized that there is no 100% open source program to do so. In fact, all the tools that claim to do so require a library that is packed by Themida (so it is difficult to check what this might be doing), in order to authenticate to the server. This is a native DLL, meaning that it is only compatible with Windows x86. Additionally, many of these tools are actually using stolen decompiled code from SamFirm, which, apart from being possibly illegal, means they would be difficult to maintain and run slowly.
So, I decided to reverse engineer Smart Switch to figure out exactly how the download is taking place, and wrote a cross-platform tool that does this without using the Windows DLL that the other tools have, making it compatible with Linux and MacOS. I also realized that the newer versions are actually using a new version of the authentication algorithm, meaning possibly at some point the old tools might stop working as Samsung drops support for it.
You can find it at:
Code:
https://github.com/nlscc/samloader
To install, go to the downloaded repository and run:
Code:
pip3 install .
See the README or look at the code for usage. You might want to know that my old github account, nm111, was unfortunately deleted, and I lost access to my old XDA account. You can see the verified email is the same however.
Feel free to use the algorithms I figured out in your own code, so long as you don't use it in proprietary programs. It is licensed under GNU GPLv3 or later.
This works for all phones, not just S10+, but I couldn't find a better forum and this is where Frija posted.
Thank you. This is pretty cool. I downloaded it now and will check it out later tonight.
Can you please do the same thing for the emergency recovery option.
Will you update your tool if it still working in the future?
This is going to be super useful for me (ATM I'm using SamFirm with wine/proton and my setup breaks often, and GUI gets in my way) since I need to download many firmwares for my reverse-engineering, so thanks!
Late for this great find, thanks to the xda article, really needed a solution outside Windows.
PS, what are the chances for spoofing a request, i.e, trying to fetch only the latest OTA from a certain CSC?
@nn000 Glad this made the front page. I have used this for a little wile now and it works great
@phhusson
This will work on windows if you use the WSL and install Ubuntu. You could probably get this working under Cygwin too.
Great work mate. Helps to gather various download. Unfortunately enough Samshung does not allow older firmware via server fetching..
Hi, thanks for this great tool as samfirm and frija are slow to download firmwares. I am trying to download firmware for galaxy watch. I can only search the firmware version but when trying to download it there is error:
filename = root.find("./FUSBody/Put/BINARY_NAME/Data").text
AttributeError: 'NoneType' object has no attribute 'text'
is there any way to modify this tool to download watch firmware too?
You are genius! Thanks for this tool. Can't wait to try this :good:
nn000 said:
Feel free to use the algorithms I figured out in your own code, so long as you don't use it in proprietary programs. It is licensed under GNU GPLv3 or later.
This works for all phones, not just S10+, but I couldn't find a better forum and this is where Frija posted.
Click to expand...
Click to collapse
Brilliant work!
Thank you very much for developing this tool and removing our dependency on Windows for such basic functionality as checking for and downloading firmware updates. Thank you also for having the foresight and generosity to publish this under the GPL.
This tool will receive a huge amount of use on my machines.
Thanks in advance, I don't know how to download the program, they would be so kind to give me a link. Thank you very much
I tried installing with the command found in the readme file
Code:
pip3 install git+https://github.com/nlscc/samloader.git
But when I type
Code:
$ samloader --help
It says "samloader: command not found"
Beautiful. Thanks for this tool!
4929york said:
I tried installing with the command found in the readme file
Code:
pip3 install git+https://github.com/nlscc/samloader.git
But when I type
Code:
$ samloader --help
It says "samloader: command not found"
Click to expand...
Click to collapse
install python first, before try
rikipy said:
install python first, before try
Click to expand...
Click to collapse
Python was installed.
How to set download location(out) in the command line
samloader download [firmware version] [phone model] [region] [out]
I tried to put \Download but it's not in the folder.
I installed python39 and git on Win10 but sill get errors
Code:
pip3 install git+https://github.com/nlscc/samloader.git
Collecting git+https://github.com/nlscc/samloader.git
Cloning https://github.com/nlscc/samloader.git to c:\users\danie\appdata\local\temp\pip-req-build-s8l3kwc6
Collecting clint
Using cached clint-0.5.1.tar.gz (29 kB)
Collecting pycryptodomex
Using cached pycryptodomex-3.9.8.tar.gz (15.6 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"'; __file__='"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\danie\AppData\Local\Temp\pip-pip-egg-info-3i7fsfut'
cwd: C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\
Complete output (20 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\setup.py", line 457, in <module>
set_compiler_options(package_root, ext_modules)
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 341, in set_compiler_options
clang = compiler_is_clang()
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 251, in compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 82, in test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 323, in compile
self.initialize()
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 220, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Testing support for clang
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Viper780 said:
I installed python39 and git on Win10 but sill get errors
Code:
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Click to expand...
Click to collapse
The problem is right there in front of you: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
It's pretty annoying when there are requirements and you find out about them afterwards.
Would be good to write them to the install instructions
- python3
- git
- Buildtools for MS C++
Thanks for this, it works well! Cheers..
:highfive:
Example:
Install
Code:
pip3 install git+https://github.com/nlscc/samloader.git
Check update
Code:
samloader -m SM-G975F -r NZC checkupdate
Download
Code:
samloader -m SM-G975F -r NZC download -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -O /home/hinxnz/Downloads
Decrypt
Code:
samloader -m SM-G975F -r NZC decrypt -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -V 4 -i SM-G975F_1_20200921075534_uii8oafhih_fac.zip.enc4 -o SM-G975F_1_20200921075534_uii8oafhih_fac.zip
---------- Post added at 10:52 PM ---------- Previous post was at 10:41 PM ----------
Viper780 said:
I installed python39 and git on Win10 but sill get errors
Code:
pip3 install git+https://github.com/nlscc/samloader.git
Collecting git+https://github.com/nlscc/samloader.git
Cloning https://github.com/nlscc/samloader.git to c:\users\danie\appdata\local\temp\pip-req-build-s8l3kwc6
Collecting clint
Using cached clint-0.5.1.tar.gz (29 kB)
Collecting pycryptodomex
Using cached pycryptodomex-3.9.8.tar.gz (15.6 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"'; __file__='"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\danie\AppData\Local\Temp\pip-pip-egg-info-3i7fsfut'
cwd: C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\
Complete output (20 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\setup.py", line 457, in <module>
set_compiler_options(package_root, ext_modules)
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 341, in set_compiler_options
clang = compiler_is_clang()
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 251, in compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 82, in test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 323, in compile
self.initialize()
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 220, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Testing support for clang
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Click to expand...
Click to collapse
Now install linux

How To Guide Getting Freedreno Turnip (Mesa Vulkan Driver) on a Poco F3

Bellow follows a compilation and magisk packaging guide for the Turnip driver, if you just want an optimized build for magisk and don't care to compile get it from https://cdn.discordapp.com/attachments/930104429309460533/942122346960027698/mesa_lto.zip This build is built as release with LTO enabled. Just make sure that on /vendor/lib64/hw you have a file called vulkan.adreno.so ,if the name is different then you have to patch it with patchelf and rename it as stated bellow.
In this guide I'm going to teach you how to compile the mesa's Turnip vulkan driver of the Freedreno project for any smartphone with a Snapdragon SOC on a PC. If you want to compile on your phone (guest) check the second post.
You are going to need Linux in order to follow this guide and recommended is a distro with latest packages, for example Arch Linux (including derivatives like EndeavourOS, Manjaro, Garuda, Calamarch, etc.), while this may also work on WSL/WSL2 I haven't tested it and you are on your own for this.
You are also going to need a mobile phone that’s rooted with the latest magisk and magisk manager.
Before starting you need to satisfy some dependencies:
git to clone the mesa repository
patchelf to patch the binary with the name your phone expects
meson which is mesa’s build system
To get all these on Arch you can use the below command:
Code:
sudo pacman -Syu git patchelf meson
You also need NDK since you are compiling native code for Android. There are two ways to get this:
From the SDK Manager on Android Studio Beta or Canary (Stable Android Studio doesn’t have the latest NDK) by going to More Actions>SDK Manager>SDK Tools on the welcome screen or Tools>SDK Manager>SDK Tools if a project is open and download the latest one. If you already have it and it shows a – sign you need to click it again to become a tick since you already have it but it is an older version. After you get the NDK you can close Android Studio.
Manually from https://developer.android.com/ndk/downloads. Make sure to get the latest NDK for Linux at the bottom of the page.
Now you need to find the absolute path of the NDK, which will be referred to as NDKDIR from now on.
If you got the NDK from Android Studio, then there should be a folder called Android on your home folder with a folder called Sdk inside it, get in. Click the ndk folder then get inside the folder of the biggest version (25.0.8141415 at the time of writing this) and copy the path. In my case the path is
Code:
/home/username/Android/Sdk/ndk/25.0.8141415
If you downloaded the NDK manually then you need to extract it somewhere. For example I created a folder called Turnip in the root of my home folder and extracted it there. The latest NDK is android-ndk-r25-beta1-linux.zip at the time of writing this so my NDKDIR is
Code:
/home/username/Turnip/android-ndk-r25-beta1
Inside your NDKDIR create a folder called pkgconfig and another folder for dependencies which I will call deps.
Next you must create a meson cross file. To do this create a file called android-aarch64 at ~/.local/share/meson/cross/ (~ means your home folder). If you don’t see any folders starting with a dot you need to press ctrl+h, if the path doesn’t exist create it.
On that file paste the following and using your text editor automatically find and replace all instances of NDKDIR with your NDKDIR from above.
Code:
[binaries]
ar = 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
c = ['ccache', 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang']
cpp = ['ccache', 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
c_ld = 'lld'
cpp_ld = 'lld'
strip = 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip'
# Android doesn't come with a pkg-config, but we need one for meson to be happy not
# finding all the optional deps it looks for. Use system pkg-config pointing at a
# directory we get to populate with any .pc files we want to add for Android
pkgconfig = ['env', 'PKG_CONFIG_LIBDIR=NDKDIR/pkgconfig', '/usr/bin/pkg-config']
[host_machine]
system = 'linux'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'
Now you need to download a binary of libdrm compiled for Arm64. It’s available at https://archlinuxarm.org/packages/aarch64/libdrm, just click the Download button on the right. Open the .tar.xz archive using your archive manager. Inside there’s a folder called usr that contains three other folders. You must extract the include and lib folders on the deps folder you created. After you do so, close your archive manager. The lib folder has a folder called pkgconfig, from that folder copy the file libdrm.pc to the pkgconfig folder that you created before deps.
Edit the libdrm pc file after you transfer it and change its first line so that it points to deps. For example in my case it's
Code:
prefix=/home/username/Turnip/android-ndk-r25-beta1/deps
And last, you need a clone of the MESA repository. To clone the repo you need to use the terminal so open a terminal at the folder you want the mesa folder to be downloaded onto or cd there otherwise the mesa folder will be placed at the root of your home folder. To clone you use the bellow command:
Code:
git clone https://gitlab.freedesktop.org/mesa/mesa.git
and cd inside by doing
Code:
cd mesa
Then generate the build files using
Code:
meson build-android-aarch64 --cross-file android-aarch64 -Dbuildtype=release -Dplatforms=android -Dplatform-sdk-version=31 -Dandroid-stub=true -Dgallium-drivers= -Dvulkan-drivers=freedreno -Dfreedreno-kgsl=true -Db_lto=true
And compile with
Code:
ninja -C build-android-aarch64
When this is done you can find our compiled driver binary at build-android-aarch64/src/freedreno/vulkan/ inside the mesa folder named libvulkan_freedreno.so.
Now you must find the name of the binary that our phone has. The easiest way to do this is to open a terminal emulator on your phone like termux or do adb shell and run
Code:
ls /system/vendor/lib64/hw|grep vulkan
In my case the driver is called vulkan.adreno.so.
Now open a terminal on the folder where libvulkan_freedreno.so and use patchelf to patch it with the name of the driver on your phone, for example in my case I’d do
Code:
patchelf --set-soname vulkan.adreno.so libvulkan_freedreno.so
and then rename libvulkan_freedreno.so to the name the driver on your phone has.
You now need to create a magisk package containing Turnip. Simply download my existing package from https://cdn.discordapp.com/attachments/930104429309460533/942122346960027698/mesa_lto.zip and replace /system/vendor/lib64/hw/vulkan.adreno.so with the Turnip binary you compiled, patched and renamed. Now you can flash it on Magisk and reboot your phone. If you have other Magisk packages that are Vulkan drivers please disable them before rebooting. If you want compile again at a later time cd inside the mesa repo you had cloned and do a git pull before running meson and compiling. You may also have to delete the build-android-aarch64 folder.
Some of you wanted to compile Turnip on Termux so here's a tutorial.
You are going to need an arm64 phone and Termux from https://f-droid.org/en/packages/com.termux/. If you have Termux from PlayStore delete it since it no longer works and it uses a different signature so it can't be updated either.
Once you install Termux go to your phone's app settings and give it storage permissions manually then launch it.
You must run some pkg commands, answer Y if it asks you to.
First update the repositories and upgrade the packages using
Code:
pkg update
Next you must install some dependencies
Code:
pkg install binutils bison flex git ninja patchelf python wget zip
The pip version Termux provides isn't always the latest so it must be updated too using
Code:
/data/data/com.termux/files/usr/bin/python3 -m pip install --upgrade pip
You will use pip3 to install the rest of the dependencies
Code:
pip3 install mako meson
Since you aren't cross compiling you need to create the path that hosts the native file
Code:
mkdir -p ~/.local/share/meson/native
and then download the native file for meson using
Code:
curl https://pastebin.com/raw/zdVCZASL>~/.local/share/meson/native/mesa
This file is made for android-ndk-r23b so if a new version gets released use nano to edit it and replace all occurencies of android-ndk-r23b.
You need to download the latest Termux-NDK
(at the moment of writing this the latest is android-ndk-r23b if that changes obviously replace the commands of the guide with the new name and the url bellow)
Code:
wget https://github.com/Lzhiyong/termux-ndk/releases/download/android-ndk/android-ndk-r23b-aarch64.zip
then extract it
Code:
unzip android-ndk-r23b-aarch64.zip
and remove the archive since it isn't needed anymore
Code:
rm android-ndk-r23b-aarch64.zip
Then you need to download libdrm for arm64 from the alarm project's repositories. Simply go to https://archlinuxarm.org/packages/aarch64/libdrm, hold the Download button and copy the url. At the moment the latest one is the one below so change the commands depending on the latest version.
Code:
wget http://mirror.archlinuxarm.org/aarch64/extra/libdrm-2.4.109-1-aarch64.pkg.tar.xz
Then you need to extract it
Code:
tar -xf libdrm-2.4.109-1-aarch64.pkg.tar.xz -C android-ndk-r23b
You then delete the archive since it's no longer of use
Code:
rm libdrm-2.4.109-1-aarch64.pkg.tar.xz
Now you must change the prefix of the libdrm pc file to point to our local pkgconfig
Code:
sed -i 's#prefix=#&/data/data/com.termux/files/home/android-ndk-r23b#g' ~/android-ndk-r23b/usr/lib/pkgconfig/libdrm.pc
You may now clone the mesa repository
Code:
git clone https://gitlab.freedesktop.org/mesa/mesa.git
and get inside it
Code:
cd ~/mesa
Configure the build environment using the meson command below
Code:
meson build-android-aarch64 --native-file mesa -Dbuildtype=release -Dplatforms=android -Dplatform-sdk-version=31 -Dandroid-stub=true -Dgallium-drivers= -Dvulkan-drivers=freedreno -Dfreedreno-kgsl=true -Dcpp_rtti=false -Db_lto=true
and then compile
Code:
ninja -C build-android-aarch64
Linking might take some time but once it's finished go back to Termux' home directory using
Code:
cd ~
Now download the template for the Magisk Driver package
Code:
wget https://cdn.discordapp.com/attachments/894694753684320296/943268696426684456/mesa_lto.zip
and extract it
Code:
unzip mesa_lto.zip -d mesa_lto
then cd inside
Code:
cd mesa_lto
and copy the blob you compiled
Code:
cp ~/mesa/build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so ./system/vendor/lib64/hw/
If you are building for another phone you have to run termux on that other phone and get the name of the vulkan library using
Code:
ls /system/vendor/lib64/hw/|grep vulkan
and then run patchelf and rename the blob.
If not, you can just run these commands that will fetch the name of your phone's library and perform elf name patching
Code:
patchelf --set-soname $(ls /system/vendor/lib64/hw/|grep vulkan) system/vendor/lib64/hw/libvulkan_freedreno.so
and renaming
Code:
mv system/vendor/lib64/hw/libvulkan_freedreno.so system/vendor/lib64/hw/$(ls /system/vendor/lib64/hw/|grep vulkan)
Finally zip the package
Code:
zip -r ../mesa_lto.zip *
and go back to Termux' home directory
Code:
cd ..
Delete the extracted folder, it's not needed anymore
Code:
rm -rf mesa_lto
Push the Magisk package to your phone's home folder
Code:
cp mesa_lto.zip /storage/emulated/0
Close Termux
Code:
exit
Flash with Magisk and reboot.
If you have other Magisk driver packages, disable them.
If you want to compile again you don't have to reclone, just cd into the mesa directory and do
Code:
git pull
You may also have to delete the build-android-aarch64 folder.
samantas5855 said:
Linux's driver stack is awesome, there's no need for introduction. the MESA devs have given us some of the best drivers out there for AMD and Intel GPUs on Desktop Computers and Laptops. MESA also has drivers for mobile chipset GPUs like Panfrost for Mali or Freedreno for Adreno. In today's driver we'll compile (optional) and install Freedreno's Vulkan driver called Turnip on our phones. Sadly we can't use any of the other drivers like the OpenGL/OpenGL ES ones since we cannot boot a mainline kernel (You can run old OpenGL games using ZINK on Termux tho but that's something for another day). Most if not all 3d games use Vulkan tho and that's what we mostly care about. I didn't take any metrics but performance feels better on Freedreno.
I tested this on latest Arrow Os with stock kernel and compiled on Arch Linux x86.
My caps with Freedreno:https://vulkan.gpuinfo.org/displayreport.php?id=12275
My caps with the proprietary driver:https://vulkan.gpuinfo.org/displayreport.php?id=11146
You're gonna need:
Magisk
A pc to compile (Linux or use WSL2)
The guide I followed was this one: https://docs.mesa3d.org/android.html
Building:
First things first, we gotta get our dependencies sorted out. I'm on Arch Linux so the command that follows is for Arch
Code:
sudo pacman -Syu meson git patchelf
We're also gonna need android studio in order to download the NDK, you can also do it manually if you want.
Then we're gonna get the NDK, launch android studio, open a project (if you don't have create an empty one), then go to Tools>SDK Manager. Click the SDK Tools tab, untick Hide Obsolete Packages on the bottom, and get NDK Obsolete. Copy the Android SDK Location from the top, close Android Studio and open this path on your file manager. Enter the ndk-bundle folder and copy its path, this is your NDKDIR for later. Create a folder inside called pkgconfig.
Since we're compiling on an x86, we're gonna need libdrm for arm64, one source to get it was https://archlinuxarm.org/packages/arm/libdrm, it doesn't matter if you use Arch or not, just click the Download link on the right. We have to extract this somewhere and point the compiler to it, I created a folder called deps in the ndk-bundle directory (next to pkgconfig). In there we extract the folders include and lib (for example the path is
Code:
/home/spiros/Android/Sdk/ndk-bundle/deps/lib/
) found on the folder usr of the tar.gz we downloaded. After we extract them, in the lib folder there's a pkgconfig folder, we copy the file called libdrm.pc to the pkgconfig we created on the previous step and delete this folder.
We go to the folder pkgconfig on the root of ndk-bundle and edit libdrm.pc (the file we copied on the previous step). We only wanna change the first line from /usr to the path of the folder we extracted libdrm, in my case . We save and close the file.
Now we need to create a configuration file for meson. Create the file
Code:
~/.local/share/meson/cross/android-aarch64
, where ~ is your home folder. If these folders don't exist create them.
The contents of the file are these:
Code:
[binaries]
ar = 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar'
c = ['ccache', 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang']
cpp = ['ccache', 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
c_ld = 'lld'
cpp_ld = 'lld'
strip = 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip'
# Android doesn't come with a pkg-config, but we need one for meson to be happy not
# finding all the optional deps it looks for. Use system pkg-config pointing at a
# directory we get to populate with any .pc files we want to add for Android
pkgconfig = ['env', 'PKG_CONFIG_LIBDIR=NDKDIR/pkgconfig', '/usr/bin/pkg-config']
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv8'
endian = 'little'
Just search and replace NDKDIR with the path of your ndk-bundle.
Now we have to clone the Mesa project.
On a terminal
Code:
git clone https://gitlab.freedesktop.org/mesa/mesa.git
then
Code:
cd mesa
to enter inside.
Now we have to compile it, the commands we'll use for it are
Code:
meson build-android-aarch64 \
--cross-file android-aarch64 \
-Dplatforms=android \
-Dplatform-sdk-version=30 \
-Dandroid-stub=true \
-Dgallium-drivers= \
-Dvulkan-drivers=freedreno \
-Dfreedreno-kgsl=true
(optionally you can add performance flags to this one like -O3 and -flto=full at your own risk)
and
Code:
ninja -C build-android-aarch64
If it doesn't compile successfully please comment, if it does but says llvm no it's safe to ignore this.
Considering we are already on mesa's folder, the driver we compiled will be at
Code:
build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so
Mesa's guide tells us that "libvulkan wants the SONAME to match" but not how so to do that first we need to know the SONAME of our current driver, so on our Android device we navigate to /vendor/lib64/hw and in there is our current vulkan driver, in my case the name of this driver is
Code:
vulkan.adreno.so
so on my pc using patchelf I'll patch libvulkan_freedreno.so with the following command (replace the path if you aren't inside mesa's folder for some reason)
Code:
patchelf --set-soname vulkan.adreno.so build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so
and rename libvulkan_freedreno.so to the one that your phone had, vulkan.adreno.so for me.
Once we do that we need to make a magisk package, the reason we do this is because /vendor needs to be resized for our driver to fit. So download this zip file, https://cdn.discordapp.com/attachments/669901591662559232/879822129313497108/gam.zip extract it, and place the driver (vulkan.adreno.so on my case) on system/vendor/lib64/hw/. Once you do that zip the files again and transfer the zip to your phone.
On your phone, first you'll have to edit your build.prop, it's on /system/build.prop. I used BuildProp Editor from PlayStore by JRummy Apps. Search for
Code:
debug.hwui.renderer
and set its value to
Code:
skiagl
If it doesn't exist, add it and then set it's value to skiagl. We do this in order to be 100% sure that Vulkan isn't used to render the UI in case something goes wrong.
Now you can flash the zip on Magisk and upon restarting you should be on Freedreno!
For those of you that don't wanna compile, if you make sure that on /vendor/lib64/hw you have a file called vulkan.adreno.so (otherwise you have to patch it with patchelf and rename it as stated above) and are on android 11 you can flash the zip I compiled yesterday on your on risk.
File upload and sharing. Large file transfers. Free online cloud storage.
Visit this link to download: mesa.zip
files.fm
No modifications were done, source can be found at https://gitlab.freedesktop.org/mesa/mesa, commit id 2201f5a58c07866130a67602875d13b1824708e0
Click to expand...
Click to collapse
hello, I was trying to follow ur instructions, Im stuck at
Bash:
ninja -C build-android-aarch64
The error is:
Code:
ld.lld: error: /home/user/Android/Sdk/ndk-bundle/deps/lib/libdrm.so is incompatible with aarch64linux
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
I'm using ubuntu, not arch linux
avatarwan13 said:
hello, I was trying to follow ur instructions, Im stuck at
Bash:
ninja -C build-android-aarch64
The error is:
Code:
ld.lld: error: /home/user/Android/Sdk/ndk-bundle/deps/lib/libdrm.so is incompatible with aarch64linux
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
I'm using ubuntu, not arch linux
Click to expand...
Click to collapse
I got the same error.
The link in the post for the libdrm was for arm
The link for arm64 libdrm was:
libdrm (aarch64) | Packages | Arch Linux ARM
archlinuxarm.org
I replaced the lib and include files again, and it successfully compiled.
I did the patchelf commands
I replaced the vulkan file in the vendor partition
It did not work when I rebooted, so I changed the permissions of the freedreno vulkan driver to 644.
When I rebooted, the freedreno vulkan driver was now working.
Edit:
The file "aarch64-linux-android-ar" in the new versions of the ndk bundles was renamed to "llvm-ar". I was able to compile using a newer version of ndk instead of the deprecated one.
How can do it without PC I have only android device.
astronomy2021 said:
How can do it without PC I have only android device.
Click to expand...
Click to collapse
Lol good luck
astronomy2021 said:
How can do it without PC I have only android device.
Click to expand...
Click to collapse
I have tried to compile on an android device using termux ubuntu chroot (not proot). I tried using the Linaro clang 13 toolchain for aarch64.
When I tried compiling in termux with the clang 13 toolchain for aarch64, I keep on getting this error:
"error: expected function body after function declarator"
When I compile using ndk toolchain on computer, I do not get this error.
I think it still might be possable to compile using android device.
Apparently it doesn't build release by default, I changed the meson command to do so. Should be faster now
CHECK_123 said:
I got the same error.
The link in the post for the libdrm was for arm
The link for arm64 libdrm was:
libdrm (aarch64) | Packages | Arch Linux ARM
archlinuxarm.org
I replaced the lib and include files again, and it successfully compiled.
I did the patchelf commands
I replaced the vulkan file in the vendor partition
It did not work when I rebooted, so I changed the permissions of the freedreno vulkan driver to 644.
When I rebooted, the freedreno vulkan driver was now working.
Edit:
The file "aarch64-linux-android-ar" in the new versions of the ndk bundles was renamed to "llvm-ar". I was able to compile using a newer version of ndk instead of the deprecated one.
Click to expand...
Click to collapse
Big thanks, I linked the arm32 binary by mistake
Driver is approx. x2 slower than the proprietary one... Damn
P.S. Also i cant compile it by myself, Meson is crying about C-compilers...
SPENT 7 HOURS ON FIXING THIS... DID NOTHING.
meson.build:21:0: ERROR: Unknown compiler(s): ['cc', 'gcc', 'clang', 'pgcc', 'icc']
The follow exceptions were encountered:
Running "cc --version" gave "[Errno 2] No such file or directory: 'cc'"
Running "gcc --version" gave "[Errno 2] No such file or directory: 'gcc'"
Running "clang --version" gave "[Errno 2] No such file or directory: 'clang'"
Running "pgcc --version" gave "[Errno 2] No such file or directory: 'pgcc'"
Running "icc --version" gave "[Errno 2] No such file or directory: 'icc'"
Freakin help
_RusJJ_ said:
Driver is approx. x2 slower than the proprietary one... Damn
P.S. Also i cant compile it by myself, Meson is crying about C-compilers...
SPENT 7 HOURS ON FIXING THIS... DID NOTHING.
meson.build:21:0: ERROR: Unknown compiler(s): ['cc', 'gcc', 'clang', 'pgcc', 'icc']
The follow exceptions were encountered:
Running "cc --version" gave "[Errno 2] No such file or directory: 'cc'"
Running "gcc --version" gave "[Errno 2] No such file or directory: 'gcc'"
Running "clang --version" gave "[Errno 2] No such file or directory: 'clang'"
Running "pgcc --version" gave "[Errno 2] No such file or directory: 'pgcc'"
Running "icc --version" gave "[Errno 2] No such file or directory: 'icc'"
Freakin help
Click to expand...
Click to collapse
You say its 2x slower, how did you compare
samantas5855 said:
You say its 2x slower, how did you compare
Click to expand...
Click to collapse
AetherSX2, 3DMark
_RusJJ_ said:
AetherSX2, 3DMark
Click to expand...
Click to collapse
3DMark is a wrong way to compare; since turnip doesn't have a shader cache yet it will always score worse there until it gets one.
As for aethersx2, I think the dev is interested in bundling turnip with the emu.
Did you use my latest magisk zip with vulkan 1.2?
samantas5855 said:
Did you use my latest magisk zip with vulkan 1.2?
Click to expand...
Click to collapse
Of course
_RusJJ_ said:
Of course
Click to expand...
Click to collapse
Regarding your issues with compiling, what Linux distro are you on?
samantas5855 said:
Regarding your issues with compiling, what Linux distro are you on?
Click to expand...
Click to collapse
Im using WSL. Should be a Ubuntu 20.4
_RusJJ_ said:
Im using WSL. Should be a Ubuntu 20.4
Click to expand...
Click to collapse
Do it properly on a proper linux distro, prefferably arch
Hi I tested your compiled Mesa Turnip Freedreno drivers on Xiaomi Mi 10T 925Mhz/940MHz GPU OC.
Snapdragon 865 with Cortex-A77 and Cortex-A55.
These performance metric qualify to Poco F3 as well.
AetherSX2 with latest v1276 in Vulkan
Dolphin Emulator latest development build v5.0-16009
We can clearly see that Freedreno Turnip Mesa drivers have loss -10-20% of frame rate in this emulation. I don't know why maybe be of lack of Shader cache or other things.
Think like EGG Ns emulator running on Yuzu code won't start because needs Shader caching to work.
Adreno drivers OpenGL v530 possible to update OpenGL v604 or OpenGL v611 which comes with massive boost +10%-15% Vulkan performance.
Tested Game Star Wars: Episode III – Revenge of the Sith Video game for AetherSX2 for PS2 and Metroid prime for GameCube.
Freedreno Turnip Mesa drivers build above Vulkan 1.2.199
AetherSX2 3200x2235 5X native Resolution of PS2.
Freedreno Turnip Mesa drivers LTO 03 VK 1.2.199
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
OpenGL ES 3.2 [email protected] ([email protected], I3f7239a212, 1620400307) (Date:05/07/21)
Dolphin Emulator 3840x3168 aka 4K 6X GameCube native Resolution
Freedreno Turnip Mesa drivers LTO 03 VK 1.2.199
OpenGL ES 3.2 [email protected] ([email protected], I3f7239a212, 1620400307) (Date:05/07/21)
I am not able to compile it shows below error
--
[67/477] Compiling C++ object src/util/libmesa_util.a.p/u_qsort.cpp.o
FAILED: src/util/libmesa_util.a.p/u_qsort.cpp.o
ccache /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -fuse-ld=lld -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -static-libstdc++ -Isrc/util/libmesa_util.a.p -Isrc/util -I../src/util -Iinclude -I../include -I../include/android_stub -Isrc -I../src -Isrc/mapi -I../src/mapi -I../src/mesa -I../src/gallium/include -I../src/gallium/auxiliary -I/usr/include -fvisibility=hidden -flto -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="22.1.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_ANDROID_PLATFORM -DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DEGL_NO_X11 -DANDROID -DANDROID_API_LEVEL=28 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -D_GNU_SOURCE -DUSE_ARM_ASM -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_MEMALIGN -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_LIBDRM -DMESA_EXECMEM -DVK_USE_PLATFORM_ANDROID_KHR -Qunused-arguments -fPIC -pthread -MD -MQ src/util/libmesa_util.a.p/u_qsort.cpp.o -MF src/util/libmesa_util.a.p/u_qsort.cpp.o.d -o src/util/libmesa_util.a.p/u_qsort.cpp.o -c ../src/util/u_qsort.cpp
In file included from ../src/util/u_qsort.cpp:25:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/thread:87:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__functional_base:15:
/local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/typeinfo:215:14: error: cast from pointer to smaller type 'std::__type_info_implementations::__non_unique_arm_rtti_bit_impl::__type_name_t' (aka 'unsigned int') loses information
return reinterpret_cast<__type_name_t>(__v);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/typeinfo:221:16: error: reinterpret_cast from 'std::__type_info_implementations::__non_unique_arm_rtti_bit_impl::__type_name_t' (aka 'unsigned int') to 'size_t' (aka 'unsigned long') is not allowed
return reinterpret_cast<size_t>(__v);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/util/u_qsort.cpp:25:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/thread:94:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__mutex_base:16:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__threading_support:27:
/usr/include/pthread.h:681:22: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:693:19: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:716:22: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:729:19: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:734:22: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__))
^ ~
7 errors generated.
dkpandya said:
I am not able to compile it shows below error
--
[67/477] Compiling C++ object src/util/libmesa_util.a.p/u_qsort.cpp.o
FAILED: src/util/libmesa_util.a.p/u_qsort.cpp.o
ccache /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -fuse-ld=lld -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -static-libstdc++ -Isrc/util/libmesa_util.a.p -Isrc/util -I../src/util -Iinclude -I../include -I../include/android_stub -Isrc -I../src -Isrc/mapi -I../src/mapi -I../src/mesa -I../src/gallium/include -I../src/gallium/auxiliary -I/usr/include -fvisibility=hidden -flto -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="22.1.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_ANDROID_PLATFORM -DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DEGL_NO_X11 -DANDROID -DANDROID_API_LEVEL=28 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -D_GNU_SOURCE -DUSE_ARM_ASM -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_MEMALIGN -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_LIBDRM -DMESA_EXECMEM -DVK_USE_PLATFORM_ANDROID_KHR -Qunused-arguments -fPIC -pthread -MD -MQ src/util/libmesa_util.a.p/u_qsort.cpp.o -MF src/util/libmesa_util.a.p/u_qsort.cpp.o.d -o src/util/libmesa_util.a.p/u_qsort.cpp.o -c ../src/util/u_qsort.cpp
In file included from ../src/util/u_qsort.cpp:25:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/thread:87:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__functional_base:15:
/local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/typeinfo:215:14: error: cast from pointer to smaller type 'std::__type_info_implementations::__non_unique_arm_rtti_bit_impl::__type_name_t' (aka 'unsigned int') loses information
return reinterpret_cast<__type_name_t>(__v);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/typeinfo:221:16: error: reinterpret_cast from 'std::__type_info_implementations::__non_unique_arm_rtti_bit_impl::__type_name_t' (aka 'unsigned int') to 'size_t' (aka 'unsigned long') is not allowed
return reinterpret_cast<size_t>(__v);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/util/u_qsort.cpp:25:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/thread:94:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__mutex_base:16:
In file included from /local/mnt/workspace/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/__threading_support:27:
/usr/include/pthread.h:681:22: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:693:19: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:716:22: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:729:19: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1)));
^ ~
/usr/include/pthread.h:734:22: error: 'regparm' is not valid on this platform
__attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__))
^ ~
7 errors generated.
Click to expand...
Click to collapse
Did you try module above ?
astronomy2021 said:
Did you try module above ?
Click to expand...
Click to collapse
yes but i was seeing some crashes so thought of trying latest

Categories

Resources