Broken audio_device.xml - Sony Xperia XA Ultra Questions & Answers

I have been unable to find an answer after scouring the internet and XDA for answers,
I was trying to disable the primary mic (bottom) so that I was able to only use the secondary mic (top). This is/was possible by rerouting all references to Mic 1 with Mic 2 device in /system/etc/audio_device.xml. The problem is that I tampered a little bit further and broke the lot. Does anyone know how I can restore this file? If a complete re-flash of the system is required then would someone be able to provide a link to the stock firmware? I have not been able to find it.
Build: 36.0.A.100
OS: 6.0 (Marshmallow)
P.s - Yes, I should have created a 'proper' back-up of the partitions.
P.P.S - I have root access.

I found the solution via replacing the whole system partition with stock, heres how:
1) Download Flashtool (https://forum.xda-developers.com/showthread.php?t=920746)
2) Use XperiFirm to find the correct stock firmware
3) Use Flashtool's SIN Editor (tools -> Sin Editor) to get an ext4 file of the system partition
4) If there's a single file that needs replacing then it can be read/copied from the ext4 by mounting the file.; as I was using a Windows machine I used Ext2Explore.
5) The file will be restored through flashing the stock system partition
This was shared for anyone else who needed it.

Related

[Q] How to Extract data from .Backup file ? - Created with android system recovery

I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
looking for the same
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
me too looking for the same thing ..how to extract from or decompile .backup file which we get thru recovery.
hi loverboyritesh :: i and you are in same position.. but some advaaanced users are here that we are telling rumors and lies.. dont worry bro.. even i'm trying to get solution.. will tel you after geeing one.. Still no one can tell me hoe to extract .BACKUP file..
same
i am looking for how to reinstall .backup myself so i can have my original rom install.
but i have notice my .backup is 700+mb while custom rom is 200+mb
do you know how to?
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
same here. dunno how to open and extract the files from a .backup file. hoping you know already
siiingkeeet said:
same here. dunno how to open and extract the files from a .backup file. hoping you know already
Click to expand...
Click to collapse
Nope.. Still i'm having that file but no one knew
reena0307 said:
Nope.. Still i'm having that file but no one knew
Click to expand...
Click to collapse
been searching for 5 days now :<
not a single answer found on google and forums
cant even post a new thread yet. just joined
hope someone will drop by this thread
still no solution?
got same problem here
Got a bootloop issue with an ASUS MeMo Pad 7 HD and I've booted in recovery <3e> to make a backup.
I've got a userdata_YYYYMMDD_HHMMSS.backup. I tried opening it with a bunch of tools like unyaffs, abe (Android backup extractor), going live on the file using linux tools (open as 7zip, zip, rar, tar, tar.gz, gz, bz2 , mount as iso, ext4 and so on....)
Still no luck :-/
Only clue is that the file seems compressed. During the backup under recovery, it told me 3600MB to backup and the file userdata_xxxxxxxx_xxxxxx.backup show only 2.61GB
I did this backup 3 time to ensure there were no corruption during the write process from the pad and did again the same "tests" to open the file...Not better.
If any dev' have any clue of the file format, I'd be glad to help
It doesn't seem to be a valid unix img file. Tried mounting it to no avail. When it's restored by the recovery it also extracts the individual files because i fails on one in my case and stops the entire restore... I tried unzipping it, changed extension to ,jar, .tar, .zip, etc., none of them are recognised...amazing for a standard android feature to find so little info about it
Any solution?
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header
If anyone knows how to unpack the backup file I would be more than grateful.
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.
Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.
i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!
edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.
with this you're able to transfer data of non-rooted phone to (rooted) similar one.
this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.
tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.
edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/showthread.php?t=3775129
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
ektoric said:
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
Click to expand...
Click to collapse
Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...

ZTE nubia z5s mini wifi issue, need /persist files to fix

I have a fully functional zte nubia z5s mini ( except from wifi and bt) rooted, english CWM, latest MIUI. Formatting /persist partition before installing MIUI caused the issue, there is a relevant thread explaining it all at bbs.nubia.cn/thread-112804-1-1.html (understood it using google translate).
To fix it I just need some files that were in that partition (nothing special, can be viewed with any root explorer) and get them back. Re-flashing any ROM wont do the job because that's the essence of the specific partition, to contain some files that wont be replaced by flashing a rom from recovery as I discovered by similar threads at xda for other phones.
The thing is that I cant download the files from nubia forum because to get the link I must register and registration does not work for me without any apparent reason.
Could someone make a copy of its own files ? There is nothing personal in there or phone specific / unique .. Net / BT drivers, and configuration files
As I said, nothing special needed, just copy all files / folders from /persist and make a zip .. I guess a backup from CWM would work also, never tired it (never needed to restore anything till now)
The issue is very annoying because apart from WiFi problem the phone is fully functional .. I know whats the problem, the files I need and the procedure (a simple copy) but after 3-4 days of searching have not been able to find the files ..
Could somebody please help by sending me its own files from /persist ?
Thanks in advance ..
persist_b_needEDIT (nx403a)
ztenubia said:
I have a fully functional zte nubia z5s mini ( except from wifi and bt) rooted, english CWM, latest MIUI. Formatting /persist partition before installing MIUI caused the issue, there is a relevant thread explaining it all at bbs.nubia.cn/thread-112804-1-1.html (understood it using google translate).
To fix it I just need some files that were in that partition (nothing special, can be viewed with any root explorer) and get them back. Re-flashing any ROM wont do the job because that's the essence of the specific partition, to contain some files that wont be replaced by flashing a rom from recovery as I discovered by similar threads at xda for other phones.
The thing is that I cant download the files from nubia forum because to get the link I must register and registration does not work for me without any apparent reason.
Could someone make a copy of its own files ? There is nothing personal in there or phone specific / unique .. Net / BT drivers, and configuration files
As I said, nothing special needed, just copy all files / folders from /persist and make a zip .. I guess a backup from CWM would work also, never tired it (never needed to restore anything till now)
The issue is very annoying because apart from WiFi problem the phone is fully functional .. I know whats the problem, the files I need and the procedure (a simple copy) but after 3-4 days of searching have not been able to find the files ..
Could somebody please help by sending me its own files from /persist ?
Thanks in advance ..
Click to expand...
Click to collapse
instructions:
copy the content of archive (folder "\persist" from "persist_b_needEDIT.zip") to your "\persist"
and then:
1. string in file "\persist\property\MODEM_INTERNAL_VERSION" - change to installed ver. of ROM
(source http://4pda.ru/forum/index.php?showtopic=505708&st=740#entry26719716)
//at current example "NX403A_Z0_CN_XSYPK1HD11F016"
2. BT MAC is in HEX in file "\persist\.bt_nv.bin" -- IN REVERSE ORDER!!!
"F56C98" Prefix Vendor bytes -- IN REVERSE ORDER!!! - for example compare with WiFi "Intf0MacAddress=986CF5****8A"
"05****" NIC specific bytes -- IN REVERSE ORDER!!!
example content:
01000605E8B1F56C98
---- for BT MAC 986CF5B1E805
- just open file in any HEX editor & change content of file to desired (maybe random?) digits
3. Find in "RootExplorer" files "WCNSS_qcom_wlan_nv.bin" & "WCNSS_qcom_cfg.ini" in folder /etc/wi-fi. Copy them to /persist
(source http://4pda.ru/forum/index.php?showtopic=505708&st=740#entry26719716)
4. change this string is file \persist\WCNSS_qcom_cfg.ini
with your own MAC addresses from phone box (base - Intf0MacAddress)
( && Intf1/Intf2 - use the same digits as in Intf0MacAddress ):
( Intf3MacAddress & gAPMacAddr - maybe use ramdom digits?
((source http://4pda.ru/forum/index.php?showtopic=507466&st=1780#entry29593985)
<----...
# Each byte of MAC address is represented in Hex format as XX
Intf0MacAddress=986CF5****8A
Intf1MacAddress=986CF4****8A
Intf2MacAddress=986CF7****8A
Intf3MacAddress=000AF5****FC
...
# AP MAc addr
gAPMacAddr=000AF5****ab
...--->
5. change (if needed) permissions of files according to "permisiions_list" file
ztenubia said:
I have a fully functional zte nubia z5s mini ( except from wifi and bt) rooted, english CWM, latest MIUI. Formatting /persist partition before installing MIUI caused the issue, there is a relevant thread explaining it all at bbs.nubia.cn/thread-112804-1-1.html (understood it using google translate).
To fix it I just need some files that were in that partition (nothing special, can be viewed with any root explorer) and get them back. Re-flashing any ROM wont do the job because that's the essence of the specific partition, to contain some files that wont be replaced by flashing a rom from recovery as I discovered by similar threads at xda for other phones.
The thing is that I cant download the files from nubia forum because to get the link I must register and registration does not work for me without any apparent reason.
Could someone make a copy of its own files ? There is nothing personal in there or phone specific / unique .. Net / BT drivers, and configuration files
As I said, nothing special needed, just copy all files / folders from /persist and make a zip .. I guess a backup from CWM would work also, never tired it (never needed to restore anything till now)
The issue is very annoying because apart from WiFi problem the phone is fully functional .. I know whats the problem, the files I need and the procedure (a simple copy) but after 3-4 days of searching have not been able to find the files ..
Could somebody please help by sending me its own files from /persist ?
Thanks in advance ..
Click to expand...
Click to collapse
NX403A-PERSIST

[Q] Cube U27GT - Help with Rooting a Stock Rom and can we get a forum?

Dear Admins,
Could we get a forum setup for the Cube U27GT WiFi version? I dug around on the site a bit beforehand but didn't see one, I apologize if I missed it and please direct me there if I did.
I have this tablet and I am doing some initial basic firmware development for it and want a proper place to start putting threads.
Dear Dev Community,
I can't root this bloody thing... At least, not the rom itself. Let me explain...
I can flash the stock rom from Cube and that can be rooted using Kango Root. --Fine...
However, I can't figure out how to replicate this when I make my own rom.
Thus far, here is what I have attempted...
1. Setup dsixda's excellent kitchen on my Ubuntu workstation.
2. Unpack the rom, clean things up, manually put the boot image into the dsixda unpacked working rom folder, run dsixda's root functionality (which add SU binary to xbin and SuperSu apk file to app folder as well as do some things with the boot image file).
3. Rather than using repack with Dsixda (which makes an update.zip image which I can't use because the stock recovery environment on this device can't flash zip update files and I can't for the life of me figure out how to get and or make a working CWM or TWRP recovery image for this unit)...
4. What I do is I run commands in linux to unpack the stock rom to another directory and mount that directory, then clear out a bunch of folders and then manually copy in my files from dsixda's working folder, then repackage up my unpacked stock rom into a new system.img file.
5. Then copy my now modified boot image, system image, and also userdata image (I modify that as well as that is where most all of the chinese bloatware is loaded from) to my SP_Flash_Tool, generate new checksum.ini file and flash normally...
What I get as a result...
1. As long as I am really careful with how I copy files into my new image, the new system flashes okay (if I am not careful, after flash USB storage for some reason has a format error and the system will boot but can't mount USB storage and other odd issues ensue as a result).
2. Assuming everything flashes okay, and no issue with USB storage partition, I have SuperSU installed and when I go to use an app (ES File Explorer or Root Checker) that require's root, I do get the prompt. However none of the root functions actually work and Root Checker tells me I am not rooted.
That is as far as I have got. So as a result, I have a really nice, westernized, cleaned up rom but with no root.
Anyone have any ideas?
This is my first adventure into mod'ing MTK roms so I am sure I am doing all kinds of things wrong . I had a good bit of experience on Rockchip SoC's before this though.
Kind regards and thanks in advance!
Roman
Figured it out!
So I finally did the following rather hackish work-around...
1. Flash stock firmware...
2. Root with Kingo Root
3. Enabled ADB
4. Attach to PC and fire up MTK Droid Tools
5. Take a full backup
6. Modify the system image from the backup and make changes
7. Put that in new firmware flash package
8. Flash new firmware
YAY - Cleaned up rom, modified, with root!
Once I get it all packaged up and uploaded to mtkfirmware.com I will post a link for anyone that wants a cleaned up rom with root!
The only downfall of the above method is that it absolutely requires that the developer have a device on hand because you can't just root the stock image file (at least, I couldn't figure out how... - bleh...
Kind Regards,
Roman
Dear roman,
Thanks for your hard work.
I have a simple question (I think) and if you have the time to reply or -any other android guru- I would be thankful.
My later issue was with a U27GT cube tablet, but I have others, one for each kid, and this is more of general question.
I am reading this and other forums about how to flash tablets from PC. My question is:
Can the flashing process be done from a SD card?
Thanks a lot and regards,
Fernando
SKorea

Converting Amlogic firmware IMG files into flashable ZIP for custom recovery

While trying to create my first ever Android firmware I had solve several problems, especially if you consider that I prefer under Windows instead of Linux.
I won't go into too many details as I have to assume everyone attempting this did at least some reading on the general how to of firmware installations and modifications.
Things you need:
Original firmware for your device as a IMG file
Amlogic's Customisation tool
A Rom Kitchen of your choice (I use Carliv)
System_Extractor-WIN-master
Some time...
Step1: Load the firmware into the AML tool and tick all boxes except the last one.
In the tmp folder you will find the unpacked files.
Under Level one are the files we want.
You will see a bunch of "PARTITION" files, we copy the following ones into a seperate folder for further use to create the ZIP.
I suggest to name the folder "Install" so we are all on the same page here.
boot.partition
bootloader.partition
logo.partition
recovery.partition
If you checked a flashable ZIP update before you will notice some files are missing, let's try to fix that.
Rename all partition files you copied to img, so instead of boot.partition you get boot.img.
Unpack the boot.img with your kitchen.
You will find a file "boot.img-second" - copy that into your install folder and rename it to dtb.img.
Inside the unpacked ramdisk (In your kitchen) of the boot.img you will fing the "file_contexts" file - copy that into your install folder as well.
Most AML firmware I had so far used a system.new.dat and a system.transfer.list to create the system partition.
We can create them from the system.partition file after renaming to system.img in System_Extractor-WIN-master .
To do this the system.img needs to be unpacked and we need again a copy of the file_contexts.
After the image is unpacked we can pack it again as system.new.dat and system.transfer.list.
The last missing bits can be tricky though as now we need a META-INF folder that works for our device in question.
There are two way to fix that.
Method one:
Search the usually chinese websites using Google to find original firmware for your device.
Chance are that you will find something like an OTA update - in there you will find what you need.
Method two (I never tested that):
Take the META-INF folder from an OTA update of a box with identical hardware specs.
Most important part here is the memory configuration so for a 2/16GB box you need a 2/16GB OTA update.
Next of same importance is the WiFi/Bluetooth config.
If you only have Wifi than an update for a box With daul wifi and BT4.0 won't help you.
If the actual Wifi chip is a different one but CPU, GPU, Memory and connections are the same it should still work.
Once you have the META-INF folder included into your Install folder the firmware is ready to be zipped - in theory!
The X96 for example uses a hash check for the update and created system partition.
To be able to flash your image you need to know what the original recovery would expect - has check or not.
The updater script within the META-INF folder needs to be updated to match your build.prop details as well hash check/no hash check.
Again, with an original OTA update you will find these infos.
Only if you don't have the OTA and no clue what your updater script and recovery needs you are a bit lost.
I know I has not all the steps in detail and if you are without and OTA update you need to search but otherwise feel free to ask and I will try to assist to make it complete if I can.
Downunder35m said:
While trying to create my first ever Android firmware I had solve several problems, especially if you consider that I prefer under Windows instead of Linux.
I won't go into too many details as I have to assume everyone attempting this did at least some reading on the general how to of firmware installations and modifications.
Things you need:
Original firmware for your device as a IMG file
Amlogic's Customisation tool
A Rom Kitchen of your choice (I use Carliv)
System_Extractor-WIN-master
Some time...
Step1: Load the firmware into the AML tool and tick all boxes except the last one.
In the tmp folder you will find the unpacked files.
Under Level one are the files we want.
You will see a bunch of "PARTITION" files, we copy the following ones into a seperate folder for further use to create the ZIP.
I suggest to name the folder "Install" so we are all on the same page here.
boot.partition
bootloader.partition
logo.partition
recovery.partition
If you checked a flashable ZIP update before you will notice some files are missing, let's try to fix that.
Rename all partition files you copied to img, so instead of boot.partition you get boot.img.
Unpack the boot.img with your kitchen.
You will find a file "boot.img-second" - copy that into your install folder and rename it to dtb.img.
Inside the unpacked ramdisk (In your kitchen) of the boot.img you will fing the "file_contexts" file - copy that into your install folder as well.
Most AML firmware I had so far used a system.new.dat and a system.transfer.list to create the system partition.
We can create them from the system.partition file after renaming to system.img in System_Extractor-WIN-master .
To do this the system.img needs to be unpacked and we need again a copy of the file_contexts.
After the image is unpacked we can pack it again as system.new.dat and system.transfer.list.
The last missing bits can be tricky though as now we need a META-INF folder that works for our device in question.
There are two way to fix that.
Method one:
Search the usually chinese websites using Google to find original firmware for your device.
Chance are that you will find something like an OTA update - in there you will find what you need.
Method two (I never tested that):
Take the META-INF folder from an OTA update of a box with identical hardware specs.
Most important part here is the memory configuration so for a 2/16GB box you need a 2/16GB OTA update.
Next of same importance is the WiFi/Bluetooth config.
If you only have Wifi than an update for a box With daul wifi and BT4.0 won't help you.
If the actual Wifi chip is a different one but CPU, GPU, Memory and connections are the same it should still work.
Once you have the META-INF folder included into your Install folder the firmware is ready to be zipped - in theory!
The X96 for example uses a hash check for the update and created system partition.
To be able to flash your image you need to know what the original recovery would expect - has check or not.
The updater script within the META-INF folder needs to be updated to match your build.prop details as well hash check/no hash check.
Again, with an original OTA update you will find these infos.
Only if you don't have the OTA and no clue what your updater script and recovery needs you are a bit lost.
I know I has not all the steps in detail and if you are without and OTA update you need to search but otherwise feel free to ask and I will try to assist to make it complete if I can.
Click to expand...
Click to collapse
Thank you for this explanation, but the explanation of the video to better understand everyone
Will see if I can at least add some pics while working on Nougat.
Hello,
Thanks for you tutorial.
I have a h96 Pro+ and the last firmware was a .img file... (Link of the firmware : https://mega.nz/#F!d1tHVZgA!Qc0mAom7FBHT9HDv3rGtGQ )
Is there a good guy who can convert this .img to a .zip file please ?
A lot of users are asking for this, me too and if you can help me to do this it will be really cool and appreciate
Thank you,
Carmin.
Thanks for your explanation im trting to port 7.1.1 to my tv box and i have found one funcional the only troble is the wi fi drivers not working ill give it a try latter today
Sent from my SM-N9300 using Tapatalk

File perrmissions on Android 10 box

Hi
I have spent hours trying to fix a problem on my Android TV box and I have gotten nowhere.
The issue is that generic.kl reset to 0 bytes and now whatever I do, I cannot edit the file.
I have set it to read-write 777 and all sorts of combinations. I have set the partition to read-write mounted.
I have used a root explorer to copy and paste a working version of the file over the top, it does not give an error and the file is there, again it is empty at 0 bytes.
I have tried to run a text editor itself as root but SuperSU will not run - saying the SU Binary is occupied. I did a factory reset and the issue is still there. There is no way to do a full flash reset on this model.
No matter what I do, I cannot seem to actually edit or replace this generic.kl file
Any ideas or suggestions?
Cheers
is it a system partition file ? probably the only way for now would be to modify the file before creating a system image for you to flash. I'm not even sure that's a doable thing actually.
no recovery is a PITA
Yeah, the file is in the System partition in the USR folder.
Do you think there is no way to fix this then? I.e. I can never use a physical keyboard with this unit again as the file controls the key mapping..
Scott
devices that start out with android 10 have a read only system partition. if you have the know-how magisk can still create overlays of system files, you'd need to write a module or get one requested from someone.
@Electron2k it might be worth talking to the dev or asking in this thread
https://forum.xda-developers.com/apps/magisk/module-1controller-1-module-to-support-t3865889
if you've created your new file already maybe there's a way to incorporate it into this module to do what you want. I'm not saying they'll change the module for you, but he or she might help to do it yourself.
Hi there, if you can track down the firmware for your box get the img file and extract it.
Locate the generic.kl file from the extracted rom and copy it over using a file manager, remove the null generic file and reboot your device. All should be working then.
##edit ## just noticed you've already tried replacing the file with a filemanager sorry
Electron2k said:
Yeah, the file is in the System partition in the USR folder.
Do you think there is no way to fix this then? I.e. I can never use a physical keyboard with this unit again as the file controls the key mapping..
Scott
Click to expand...
Click to collapse
Pls send the module or the solution if you have it

Categories

Resources