[Huawei] [Kirin 960/970] Stock Camera app for Treble ROMs

Search This thread

phhusson

Recognized Developer
Jul 23, 2009
2,489
4,796
Paris
Here is the stock camera app for Huawei devices, for Treble ROMs.


DISCLAIMER: Warning. This might brick your device, use with caution.
You must own a Huawei device to have the right to use this application


Build script:
https://github.com/phhusson/huawei_camera_aosp

Versions:
v1 (2018-01-15):
- Based on Mate 9's Oreo
Download

How to install:
You'll need a root file manager.
Install the apk in /system/priv-app/HwCamera2/HwCamera2.apk

Troubleshooting:
- The application crashes on start
> Did you actually install the APK to /system/priv-app/HwCamera2/HwCamera2.apk?
>> If you didn't, well tough luck. you'll need to factory reset.
>> If you did, well give me logs of the crash.
 
D

Deleted member 2405884

Guest
Hi @phhusson,

Firstly thanks for your work on treble (running v9 su and gapps on my p10 plus)

Created the folder and placed the apk as advised (folder permissions set to 755, apk to 644) rebooted but can't launch the app.

logcat attached
 

Attachments

  • Log_2018-01-15_03-07-05.txt
    10.9 KB · Views: 310
  • Like
Reactions: kaeporan

v0ne

Senior Member
Jun 19, 2015
293
136
Redmi Note 10 Pro
Here is the stock camera app for Huawei devices, for Treble ROMs.


DISCLAIMER: Warning. This might brick your device, use with caution.
You must own a Huawei device to have the right to use this application

Build script:
https://github.com/phhusson/huawei_camera_aosp

Versions:
v1 (2018-01-15):
- Based on Mate 9's Oreo
Download

How to install:
You'll need a root file manager.
Install the apk in /system/priv-app/HwCamera2/HwCamera2.apk

Troubleshooting:
- The application crashes on start
> Did you actually install the APK to /system/priv-app/HwCamera2/HwCamera2.apk?
>> If you didn't, well tough luck. you'll need to factory reset.
>> If you did, well give me logs of the crash.

Mate, tried the app (installed in /system/priv-app/HwCamera) but it crash. So I try to find the problem and i got that libHwPostCamera_jni.so in /vendor/lib64 is missing. So i extracted the missing file in stock emui rom and the camera is working now.

Btw, I used p10 plus. I attached the missing file.
If someone want to try, just copy to /vendor/lib64 and set to 644 permission

Also thank you mate. Your awesome :good:
 
D

Deleted member 2405884

Guest
Mate, tried the app (installed in /system/priv-app/HwCamera) but it crash. So I try to find the problem and i got that libHwPostCamera_jni.so in /vendor/lib64 is missing. So i extracted the missing file in stock emui rom and the camera is working now.

Btw, I used p10 plus. I attached the missing file.
If someone want to try, just copy to /vendor/lib64 and set to 644 permission

Also thank you mate. Your awesome :good:


Works!
 
  • Like
Reactions: howdid

IOmega666

Senior Member
Apr 26, 2009
864
85
Mate, tried the app (installed in /system/priv-app/HwCamera) but it crash. So I try to find the problem and i got that libHwPostCamera_jni.so in /vendor/lib64 is missing. So i extracted the missing file in stock emui rom and the camera is working now.

Btw, I used p10 plus. I attached the missing file.
If someone want to try, just copy to /vendor/lib64 and set to 644 permission

Also thank you mate. Your awesome :good:


How did you guys do it? I downloaded a Root Browser, made the folder HwCamera2 in system/priv-app/ but it fails when copying the .apk :( what root browser did you guys use?
 

MiKy2o

Member
Apr 4, 2016
19
3
Turin
Mate, tried the app (installed in /system/priv-app/HwCamera) but it crash. So I try to find the problem and i got that libHwPostCamera_jni.so in /vendor/lib64 is missing. So i extracted the missing file in stock emui rom and the camera is working now.

Btw, I used p10 plus. I attached the missing file.
If someone want to try, just copy to /vendor/lib64 and set to 644 permission

Also thank you mate. Your awesome :good:

Thanks, your fix works on my Honor 9 :D
And also huge thanks to Phh for the port!
 

chamilun

Senior Member
Jan 1, 2011
72
7
tried to copy apk to new folder and not enough space. using mixplorer what am I doing wrong?
 

IOmega666

Senior Member
Apr 26, 2009
864
85
tried to copy apk to new folder and not enough space. using mixplorer what am I doing wrong?

You gotta free space up. I deleted the apps that Google provides, Dialer, Contacts, Chrome and then installed the APK, and those I deleted I downloaded them from Play Store. Did everything with Mixplorer.
 

Pixel Power

Senior Member
Aug 28, 2014
64
11
Mate, tried the app (installed in /system/priv-app/HwCamera) but it crash. So I try to find the problem and i got that libHwPostCamera_jni.so in /vendor/lib64 is missing. So i extracted the missing file in stock emui rom and the camera is working now.

Btw, I used p10 plus. I attached the missing file.
If someone want to try, just copy to /vendor/lib64 and set to 644 permission

Also thank you mate. Your awesome :good:

Just want to say that using your file from p10 plus, it also worked on my mate 10 pro.
 
  • Like
Reactions: v0ne
D

Deleted member 2405884

Guest

Attachments

  • IMG_20180117_202911.jpg
    IMG_20180117_202911.jpg
    240.8 KB · Views: 1,246
  • IMG_20180117_202849.jpg
    IMG_20180117_202849.jpg
    252.1 KB · Views: 1,273

Top Liked Posts

  • There are no posts matching your filters.
  • 43
    Here is the stock camera app for Huawei devices, for Treble ROMs.


    DISCLAIMER: Warning. This might brick your device, use with caution.
    You must own a Huawei device to have the right to use this application


    Build script:
    https://github.com/phhusson/huawei_camera_aosp

    Versions:
    v1 (2018-01-15):
    - Based on Mate 9's Oreo
    Download

    How to install:
    You'll need a root file manager.
    Install the apk in /system/priv-app/HwCamera2/HwCamera2.apk

    Troubleshooting:
    - The application crashes on start
    > Did you actually install the APK to /system/priv-app/HwCamera2/HwCamera2.apk?
    >> If you didn't, well tough luck. you'll need to factory reset.
    >> If you did, well give me logs of the crash.
    8
    Here is the stock camera app for Huawei devices, for Treble ROMs.


    DISCLAIMER: Warning. This might brick your device, use with caution.
    You must own a Huawei device to have the right to use this application

    Build script:
    https://github.com/phhusson/huawei_camera_aosp

    Versions:
    v1 (2018-01-15):
    - Based on Mate 9's Oreo
    Download

    How to install:
    You'll need a root file manager.
    Install the apk in /system/priv-app/HwCamera2/HwCamera2.apk

    Troubleshooting:
    - The application crashes on start
    > Did you actually install the APK to /system/priv-app/HwCamera2/HwCamera2.apk?
    >> If you didn't, well tough luck. you'll need to factory reset.
    >> If you did, well give me logs of the crash.

    Mate, tried the app (installed in /system/priv-app/HwCamera) but it crash. So I try to find the problem and i got that libHwPostCamera_jni.so in /vendor/lib64 is missing. So i extracted the missing file in stock emui rom and the camera is working now.

    Btw, I used p10 plus. I attached the missing file.
    If someone want to try, just copy to /vendor/lib64 and set to 644 permission

    Also thank you mate. Your awesome :good:
    5
    You guys gotta to this:

    1. Download the 3 files in this MEGA folder: https://mega.nz/#F!clBAWTiL!LJXwSqkQb7lfys_tl75qOA

    2. Copy the 2 libs to /vendor/lib64

    3. Make a folder on /system/priv-app that's called HwCamera2

    4. Copy the HwCamera2.apk to that folder.

    5. Restart the phone and enjoy the stock camera.

    Nice pics, I want to give a try to this camera but the download link is broken. Where can I get it?

    Everything working fine , front camera and photo opens directely from camera app ?

    Yup, everything works fine except the photo opens directly from camera app, what I do to see the photo and not have to get to my gallery app is this:

    1. Take photo
    2. Try to open photo from viewfinder
    3. This will give you a black screen, you just double tap task button (it will pop up the latest app you open) and double tap it again and it will ask with which app do you wanna open the photo
    4. Next time you take a photo and try to open it in viewfinder just double tap task button, double tap again and it will open on your app of choice.

    Yeah it's a little bit annoying but it's better than to close the camera, get to the gallery app, open the photo, get back to camera. Like I do it, when you open the photo from the viewfinder if you just press back it'll be back to camera, so that's nice-
    5
    Took a bit of debugging (and the viewfinder is glitchy) but I managed to get this running on the LineageOS 15.1 Treble firmware.

    For whatever the reason, LineageOS thinks the APK file is corrupt and won't run it ("inconsistent information" is what it had to say when it tried reading classes.dex; 'unzip' on the device had the same thing to say. Repacking it before installation seemed to work, though there are probably things broken as a result. Oh well.)

    Needs android.hidl.base@1.0.so from an EMUI firmware (attached), put it into /vendor/lib64 alongside the libHwPostCamera_jni.so from post #4.

    Edit: It's not the viewfinder that's glitchy. There are apparently some graphics glitches with Lineage on the Mate 9, or so it seems - lots of things are showing bad clipping and incomplete animations, not just the viewfinder.
    5

    Didn't work for me on my Huawei mate 9 either, the camera keeps stopping :(

    You guys gotta to this:

    1. Download the 3 files in this MEGA folder: https://mega.nz/#F!clBAWTiL!LJXwSqkQb7lfys_tl75qOA

    2. Copy the 2 libs to /vendor/lib64

    3. Make a folder on /system/priv-app that's called HwCamera2

    4. Copy the HwCamera2.apk to that folder.

    5. Restart the phone and enjoy the stock camera.