HwCamera2 folder in system/priv-app - Honor View 10 Questions & Answers

I tried to install P20 pro apk on my Honor View 10 and in the process lost original HwCamera2 folder in system/priv-app content.
Now the P20 pro apk is not working and lost the original stock camera. I assume restoring content of original HwCamera2 folder in system/priv-app will work.
Can you please share content of the HwCamera2 folder in system/priv-app?
Not sure if model matters but I am on BKL L09 8.0.0.140 (C675) India

I would also appreciate this file. Since I started messing with this phone I can't get the camera to work on any ROM, custom or stock, and I noticed that I too am missing this folder.

https://drive.google.com/file/d/1QHqh_qxxFkjSb3ADdaQMGmBI_907S1_D/view?usp=drivesdk
Download from above link I do not have access to attach else would have done so. This worked for me. Just extract the ZIP and copy the content to system/priv-app and reboot the phone. Make sure the file and folder permissions are (755 for folder and 644 for files)

I followed these steps, but the HwCamera2 folder disappears after reboot.

can you provide more details?

I'm using the latest CosmicOS ROM, which might have something to do with it. When I run `chmod -R 755 on /system/priv-app` I get several read-only filesystem errors. Remounting the system directory as RW does not seem to help. I can copy the HwCamera2 directory to /system/priv-app using either the cp command from the Android terminal or graphically using X-Plore, despite the aforementioned errors. Prior to reboot I can see that the folder is present inside /system/priv-app, but as soon as I reboot it no longer exists. I tried doing this from the terminal in TWRP, but the result is the same.

The method mentioned above works for Stock Rom. You should use steps mentioned in this post https://forum.xda-developers.com/project-treble/trebleenabled-device-development/huawei-stock-camera-app-treble-roms-t3735169

Related

[HOWTO] MANUALLY save/backup apps and games and more importantly their PROGRESS

Well I browsed through all the forums and I could not find anything that I am going to explain. There are some tits-bits here and there, but I hope this proves to be useful.
I will also explain if you have a xrecovery backup, then how to extract your games and progress from there.
Many of you might be switching ROMs very frequently or upgrading/downgrading their Android. While doing this, we lose all our apps and games and more importanly the game's PROGRESS, if we do not save them.
There are apps available to save apps/games and progress but there is a way to do all these thing MANUALLY. This for those who want the control in their hands , like me.
PART A:
Here's how you do:
1) Create a backup folder on the sdcard with a name that you like. eg. mybackup
1) from your filemanager or from the shell, browse to the directory /data/app and do ls -l. You will get a list of apps which you have installed.
2) Select the app that you want to save/backup and move it to sdcard folder that you have created. The names here would be long but it will be almost similar to the name you see in the UI.
For eg.
Code:
cp uk.co.aifactory.moveitfree.apk /sdcard/mybackup
. would be the command to backup Move It game.
3) Now go to the the directory /data/data and do a ls -l. browse through the list and find a directory which matches the name of the apk without the .apk extension.
for Eg. for the 'move it' game, you will find a directory uk.co.aifactory.moveitfree
Move this directory to the backup folder
Code:
cp -r uk.co.aifactory.moveitfree /sdcard/mybackup
.
For those working on shell, remember to do cp "-r" as you are copying a directory.
You are done!!. You have backed up your app and all the progress related to that app.
Now you can copy mybackup folder to your PC or keep it in the sdcard if you have enough space. Its your choice...
PART B:
How to get the progress and games back after flashing the ROM or after wipeout.
Its easy. Just reverse the steps mentioned above.
1) copy the .apk file from your backup folder to /data/app through filemanager or shell.
Eg.
Code:
cp /sdcard/mybackup/uk.co.aifactory.moveitfree.apk /data/app
2) copy the data directory to the location /data/data.
Eg.
Code:
cp -r /sdcard/mybackup/uk.co.aifactory.moveitfree /data/data
You are back to business, just browse through your apps and enjoy the games from where you left.
UPDATE :
For Angry Birds, when you are done with the above steps, delete the file
/data/data/com.rovio.angrybirdsrio/files/settings.lua
It app will not open up if you dont do it.
-----------------------------------------------------------------------------------------------------------------
Those who have already backedup their ROMs and not saved their apps as mentioned above, dont worry, I have a solution for that too. I am specifically going to explain the method to get it from xrecovery backup.
When you backup your ROM or system using xRecovery, it stores all the data inside /sdcard/xrecovery/backup/<date>.
Inside that folder, there are 3 img files.
cache.img
system.img
data.img
data.img contains all the data/app/games that you had installed, while system.img contains everything that came bundled with ROM. It might differ a bit per devices, but mostly its data.img
I tried to open this file ".img" with a lot of extraction tools but none could help. Atlast, i got help from our great <zdzihu>, and he said, he saves the archive with yaffs2 compression.
There is an app "unyaffs2" which you can use to extract the contents of the archive. Get it from here http://forum.xda-developers.com/showthread.php?t=910255
This app will extract the contents to the folder where you ask it to. Once you have your data, repeat the above mentioned steps to get your apps and games running!!
Thank you for the how to
it not change owner
this is very big problem
Hi dateno1, can you be more specific?
What app are you trying on
What method u used to copy
What error r u getting exactly
Which device and on which step
Sent from my X10mini using XDA App
ronaksv said:
PART B:
How to get the progress and games back after flashing the ROM or after wipeout.
Its easy. Just reverse the steps mentioned above.
1) copy the .apk file from your backup folder to /data/app through filemanager or shell.
2) copy the data directory to the location /data/data.
You are back to business, just browse through your apps and enjoy the games from where you left.
Click to expand...
Click to collapse
i have question on the process of getting it back.
on step 1 you said copy.
is it also ok if you are going to reinstall it then proceed to step 2.
thanks.

[Solved] Cant copy .apk to system

Hey guys,
Im having issues copying apk files to the system/app folder, I have tried three different file managers(root browser, root explorer, file explorer). I mount system set it to r/w and when i try to copy or move the apk file i get operation failed/ cannot copy file. I tried copying the same apk (motogallery) to my nexus 7 (android 5.0) it worked fine. However with my nexus 5 its a no go. I'm running stock lollipop rom with root.
Thanks
edit: figured it out had to copy apk to priv-app folder instead of system/app. Strange on the nexus 7 file was copied to system/app and worked just fine.

Symlinked folder is treated as a file instead of a folder

Hello, using KatKiss 4.4.4 #35 i'm unable to get a symlink to work correctly from /storade/sdcard1/Android/data/<name of a package> (source) to /data/media/0/Android/data/<package name>.
The symlink do works from the path "/data/media/0/Android/data/<package name>" with a file explorer, but the reflected view on "/sdcard/Android/data/<package name>" is treated as a file by every applications, including the file manager that doesn't know what to do with that file (but correctly recognize this is a symlink and not a folder physically created here) and the software that require that folder (crash because it reconize it as a file and not a folder, as it use the "/sdcard" path and not the "/data/media/0/")
This is not a permission problem on the source folder side, changed to 777 it still doesn't work.
The problem is not specific to KatKiss, but i'm giving the information in case someone have a workaround that works only on a specific fork.
The only working workaround i found is using XPosed, redirecting the calls to the /storage/sdcard1 directly, but this solution is too aggressive, i'm unable to move only a subfolder of that package's folder, i'm forced to move everything.
The mountpoint workaround is dirty, i'd rather not use that if possible.
Regards, Magissia

[Completed] [Q] APK rebuild and install issues

I am learning how to mod Android apps.
I have rooted ASUS Transformer Prime for my experiments. It has busybox installed.
I have downloaded one of the games from /data/app directory, by copying it to sdcard and then using adb pull.
Then I have used apktool to disassemble apk and without any changes assembling it back. I did verify with Beyound Compare tool that resulting apk logically is same to original. All files inside are byte to byte same.
I ran zipalign on it.
Then I pushed it back to my device via adb push to sdcard and then copy it to /dev/app folder. restored permissions and owner.
When I tried to run the app I got the error, "Unfortunately application stopped".
The only difference between original and disassembled apk that I can see is that files inside the apk (which is zip) are in different order.
Can anyone shed the light on this problem? Does Android somehow remembered offsets of different files in that apk? Is there any log somewhere?
Thank you very much.
vasiliy_gagin said:
I am learning how to mod Android apps.
I have rooted ASUS Transformer Prime for my experiments. It has busybox installed.
I have downloaded one of the games from /data/app directory, by copying it to sdcard and then using adb pull.
Then I have used apktool to disassemble apk and without any changes assembling it back. I did verify with Beyound Compare tool that resulting apk logically is same to original. All files inside are byte to byte same.
I ran zipalign on it.
Then I pushed it back to my device via adb push to sdcard and then copy it to /dev/app folder. restored permissions and owner.
When I tried to run the app I got the error, "Unfortunately application stopped".
The only difference between original and disassembled apk that I can see is that files inside the apk (which is zip) are in different order.
Can anyone shed the light on this problem? Does Android somehow remembered offsets of different files in that apk? Is there any log somewhere?
Thank you very much.
Click to expand...
Click to collapse
Learned to use adb logcat.
Apparently app was failing because dalvik detected that timestamp on a dex file is different and decided that it should replace cached file in /data/dalvik-cache.
But that file is not writable for a group. Not sure why.

No longer able to copy files to /System

Recently had some issues with my device that caused me to to come back from a soft brick. Since then I have not been able to copy or replace files in the /System directory.
Items that have been tried and do not result in access:
Re-flash ROM (RR)
Taken back to stock image and then Re-flashed ROM (RR)
Flashed a new version of Magisk
Tried mounting the /system and making rw
Used RootExplorer and ES to change permissions to rw (chmod 777)
With all these, I try and overwrite files in system and they fail. Items with non conflicting names will appeared moved, but upon reboot all files are missing.
Ultimately what I am trying to do is move additional .ogg files into the media folder within system.
Any and all help appreciated.
Edit: Finally was able to mount /system and replace/add files after fully uninstalling Magisk and then flashing Magisk-v16.1(1610).zip
If I understand correctly, you can't modify /System with Magisk. With SuperSU, you can.
shopealope said:
If I understand correctly, you can't modify /System with Magisk. With SuperSU, you can.
Click to expand...
Click to collapse
yes you can modify /system with magisk. I do it all the time. Usually delete some aosp apps I don't need and they are in system/apps.

Categories

Resources