[GUIDE] Recover Notification from Nandroid - Verizon Samsung Galaxy S 4

Have you ever installed a new rom, but completely forgot which notification sound you were using? I have a nandroid backup of the old rom, but really don't want to completely restore the rom just to figure out which sound I was using. Android stores this in a database, and I'll show you how to access that database. In hindsight, it may just be easier to restore the nandroid backup. But, this is how to do it using a nandroid backup.
I'll be using Ubuntu 12.04 to do this. I believe it can be done with Windows as well, though the commands and programs will differ. Again, this assumes that you don't remember what the filename was. If you do, you can just skip to step 7.
1. Copy your nandroid backup files to your computer. Specifically, the "data.ext4.tar" and any "data.ext4.tar.a", "data.ext4.tar.b", etc. files.
2. The files need to be combined together. Use the command "cat data.ext4.tar data.ext4.tar.a data.ext4.tar.b > data-combined.tar" or similar for your filenames. It combines all of your data.ext4.tar files into one new file, data-combined.tar. This should give you a working tar file. I got this step from http://forum.xda-developers.com/showthread.php?t=2194171.
3. Extract the data-combined tar file. If you're a super-cool linux hacker, you probably know some terminal command to do this, like tar -randomLettersHere (xzvf?). I just right clicked the tar file and selected "Extract Here".
4. Navigate to "./data/com.android.providers.settings/databases/settings.db" and open the file. I didn't have any program to read SQL databases, so I let Ubuntu installed the recommended one for me, called "Sqliteman".
5. Using the list on the left, go under Tables-System. You should see the contents of that table, which look like an excel spreadsheet. The row (or tuple) we're looking for has the field "name" equal to "ringtone" or "notification_sound", depending on which file you're trying to locate. You can scroll through the rows and look for those rows, or you can enter an SQL command in the top box and hit the green arrow to run it and filter just the ones we want. Try this-
Code:
select *
from system
where name='notification_sound' or name='ringtone';
This pulls up all the rows where "name" is exactly equal to either of those strings. You can also search for anything that contains those strings by using this syntax-
Code:
select *
from system
where name like '%notification%';
If you're looking for your ringtone, try a query that just contains "ringtone", like this-
Code:
select *
from system
where name like '%ringtone%';
(That pulled up the actual file for me under the name "ringtone_CONSTANT_PATH")
If you're using a different rom than that I was (or a different device), you might need to tweak what you look for. Try changing the strings you search for. What we're looking for is for the entry where "value" equals something like "content://media/internal/audio/media/238". It might have the word 'internal' instead of 'external'. Note that number at the end, which is some kind of media ID number.
6. Now, open the SQL file "./data/data/com.android.providers.media/databases/external.db" or "./data/data/com.android.providers.media/databases/internal.db" depending on whether the value in step 5 had the word internal or external. Find the row where "_id" equals the number at the end of your "value" string in step 5. You can scroll through the "files" table, or enter a query like this-
Code:
select *
from files
where _id='238';
The field "_data" should show the path for your file. For me, it was "/system/media/audio/notifications/S_Dew_drops.ogg". Oh, how I love you, Touchwiz...
7. Now you know where the file is. If your new rom doesn't have that ringtone/notification sound any more, you can probably retrieve it from two places. First, check the rom installation zip file (probably the easiest way) if it was an included sound. Open the installation zip file, and look in the path you found in step 6. The second way is to go through your Nandroid backup. Follow steps 1-3, but copy, combine, and extract your system.ext4.tar file(s). Again, just look in the same path from step 6, and it should be there. These paths are typically "/system/media/audio/notifications/" and "/system/media/audio/ringtones".
Enjoy your old, familiar sound again!

Related

Create a universal theme for any ROM!

I have flashed it on my Note, it works well.
I in no way created this, just thought it may be worth while.
The operation of this template is based on the VillainTheme System for the ROM VillainROM.
Link: http://www.villainrom.co.uk/forum/sh...inTheme-System
Credits and thanks to all XDA team that collaborated on the original script: Doctorcete, Stericson, Matt and Seshy​
What is Universal Flasher Tool?
is a complete template that is used to create the simplest possible way a subject flashable from recovery without the need to include or edit files. apk.
This new method uses the file system implementation metamorph (just have to put files and folders on their respective routes), with the advantage that the system identifies and injected into their applications without the need for external application. The subjects are flashed directly from recovery.
What are the advantages of this method compared to metamorph or traditional flasheables issues?
Do not include. Apk complete, only the files you want to include in the subject.
A theme created with this template is valid for any rom, even among different phone roms (the tests have been performed with SGS2 and Nexus one).
Optionally, the template can include complete files if desired, can even be used to install applications not system.
Does not depend on external applications like metamorph because it flashes directly from recovery.
Operation of the template
at the end of the post are attached a number of considerations to take into account, but basically works like this:
Identify the applications that want to thematize and checks that exist in the rom. Once the check, the system compares folders that will be introduced as well as files and injects them into the apk as long as the new file exists within the apk. This has been thought well to avoid filling an apk with files that do not belong because they are from another rom or because you made a mistake when typing the name, for example.
Once injected the files takes a zipalign the apk to optimize RAM usage.
Alternatively, if the topic includes external files or copy them to install applications on your path.
At the same time to be using the item, the system will generate a backup of changed files and automatically creates a file. Zip flashable from recovery, in case something goes wrong or do not like changes to previous state.
Finally, it also generates a small log with the outcome of the whole process is recorded in SD to verify that all changes are properly implemented.
How to create and edit your own theme
Download the template from the attachment in this post or the link below.
Recommended Tools: 7zip to include files and browse the file system (you can also use winzip or winrar without problems) and Notepad + + or any other plain text editor to edit the name of the mod.
Once downloaded, open the template double-click will observe and folders inside a file in the root. Here's that are in each folder and how to create the theme.
MOD.config file: (new from version 3.0) is an editable text file (recommend Notepad + +) where in addition to establishing the name of the MOD to set different parameters of the template.
MOD_VERSION= Name (name of the mod to be displayed in the system properties after the name of the rom. Are cautioned not to put a name too long and try to avoid as far as possible in the blanks.
CLEAN_MORPHING = not (compare the new files before injection into the apk, only enter if the file already exists. Turning the option dramatically reduces speed)
V4_MORPHING = yes (support to manage compatibility with existing folders-v4 system in some applications).
DO_BACKUP = yes (enable or disable the creation of the flashable backup from recovery to restore the existing theme).
LOG_ENABLED = yes (enable or disable the creation of a log file with the results of the process).
SCREEN_LOG = yes (shows the process of recovery on the screen or not. important notices are always shown even if the option is disabled).
Optionally, you can set a different path for memory cards (no need to touch these lines in most cases, you should not touch):
default_internal_sdcard = / EMMC
default_external_sdcard = / sdcard
Optionally, you can add special commands to mount partitions (no need to modify these lines in most cases, you should not touch):
mount_system = mount / system
mount_data = mount / data
README.txt:
Includes some additional instructions on the operation and the license. Please read before using the template to create a theme (in English). Carteta / tools: is the folder where you have placed the scripts and binary files necessary to flash the issue and make subsequent restoration. You do not need to touch anything in this folder to edit the theme. From version 3.0 has been deleted because busybox binary is no longer involved in the process. folder / META-INF folder system which includes the signature file and the script to launch from recovery. It is recommended not to touch. Folder / MORPH: This is the template folder where files should be included with the theme. In turn, the folder is divided into two subfolders called / data (for applications theming system NO) and / system (for theming system and applications framework). In the / MORPH / system / app files are included for the applications and / MORPH / system / framework for the framework files. NOTE: NO application theming system in / MORPH / data / app / myapp.apk supposed to change the digital signature, so from that time can not be updated from the market or will you installed in the market (like if it had been installed by 'other means' non-statutory ...). Therefore, we do not recommend any downloaded application thematize the market. You are advised that the complaints do not come then ... For each application you want to thematize must open a new folder called / nombre.apk (eg / Contacts.apk if you want to change the system application Contacts.apk) . It is necessary to respect the use of upper / lower case. Within each of these folders you have to respect that there are logical paths within applications, so that the files would have to place them in folders named / res / drawable, res / drawable-hdpi, etc ... It is the same structure metamorph an issue, so any item is readily convertible metamorph simply dragging folders.
No need to create any control file or anything like . The system is responsible for reviewing the folders to see what applications you want tematitar.
Folder / Xtras / system:
in this folder is where, if desired, can include files or complete applications that you wish to flash in conjunction with the subject. For example, sound files, bootanimation, scripts, complete applications, etc ... Folder / Xtras / data: in this folder is where, if desired, can not add applications to be installed system during flashing. Folder / Xtras / sdcard: in this folder you can add files to make copied to the SD card, as packs of icons, sounds, videos, etc ... to take into account considerations
Always respect the use of uppercase / lowercase letters in the names of files or folders and logical paths located within the apps.
With this system the themes may be universal, although depending on the type of files a user input may cease to be:
If you only include image files theme is compatible with any rom from any phone.
If you also include. xml may only operate in one rom, but can still work on future updates of it.
If resources are included for translations (resources.arsc) the issue would only be valid for a particular rom.
The. Zip with the issue is not necessary for you to sign flashearse, and is valid for CW-Recovery and Recorevy-RA. If you do not have to remember signing off signature checking before flashing.
Original Thread:http://http://www.htcmania.com/showthread.php?t=258333
Also:http://forum.xda-developers.com/showthread.php?t=1474686
On the galaxy s 3 us version most of the recoverys are not reading the external sd so should I changed the mounts on the script?
Sent from my SGH-T999 using Tapatalk 2

[Q] ApplyRecovery.bat

this is gonna sounds stupid but i followed every step but i cant seem to get the file to be only ApplyRecovery.bat, thats how i named the files but it does only open notepad....like if it was reading ApplyRecovery.bat.txt
Step 5: create a text file using notepad, called ApplyRecovery.bat. Make sure it is not named "ApplyRecovery.bat.txt" . It will contain the following lines (copy/paste is fine)
i did it finally
For future reference, it might help others if you explained how you solved your problem. For example, given this issue where the file is opening in notepad, one of the following possibilities is apparent:
1. When saving the file, you did not enclose the file name in quotes, e.g. "ApplyRecovery.bat". Enclosing the file name in quotes overrides the automatic generation of extensions and saves the file exactly as you wish.
2. Batch files, files ending in .bat, were set to open in notepad instead of being ran when double-clicked. This would by necessity require you to delete the file association before the batch file would work.

how to view edit Smalli codes any android app hacking

hacking or cracking an android app is a easy part with XDA AUTO TOOL ..
search and download and install this tool ..
Process
Step One – Decompiling The APK File
Open the xdaAutoTool folder and run the program. It will prompt you to install a file called “framework-res.apk.” Ignore this. Close the program.
In the xdaAutoTool folder you we see a bunch of folders appear after the program ran. Look for one called “_INPUT_APK.” Put your APK file in the folder and run the program again. Press “Decompile All” located on the left side of the program window.
xdaAutoTool will decompile the APK file and create a new directory in the _INPUT_APK folder.
Step Two – Finding Your Target
Are you ready to be introduced to Smali code? Don’t worry! It isn’t too difficult once you realize what’s going on in the code. Java can’t be decompiled back into the original source code, it can, however, be decompiled into something called Smali code.
Navigate back to the _INPUT_APK directory and open the new folder (it will have the same name as the APK file). Once there, you will see a directory named “smali.” This is your target. Depending on your intentions, you will need to sift through the various files and folders in the smali directory until you locate the code you would like to modify.
For example, if you are trying to increase the firepower of a turret in an Android game, you will need to find the file for that turret. These directories are structured. You will probably see quite a few directories containing files used for advertisements, etc. One you discover the actual game directory, everything you need to alter will be in there.
How to change smalli code
now again open xda auto tool after edit changes and recompile and build your changes
You done ..........

Backup and restore a Chrome extension?

I have an extension that is no longer available on the Chrome store. I'd like to be able to back it up on my Chromebook and restore it, since I think it will not be restored after I update the Chrome OS (it will presumably fetch the available extensions from the store).
My Chromebook is in developer mode. So I wonder can it be done from the shell?
I tried enabling developer mode in chrome://extensions, but pack extension does not allow me to see any system root directory, and I have the additional challenge of figuring out which extension it is in /home/chronos/user/Extensions/.
I'm not really sure where to go from here. Any help with this would be really appreciated!
beetroot said:
I have an extension that is no longer available on the Chrome store. I'd like to be able to back it up on my Chromebook and restore it, since I think it will not be restored after I update the Chrome OS (it will presumably fetch the available extensions from the store).
My Chromebook is in developer mode. So I wonder can it be done from the shell?
Click to expand...
Click to collapse
Can you see the ID of the extension at the very bottom of its listing in chrome://extensions/? If you can.... I just tested out the following with an extension chosen at random, and it worked fine for me, although I suppose it may depend on the extension...
Copied the ID of the extension (at the very bottom of its listing in chrome://extensions/), then:
sudo su
find / -iname theidoftheextension
cp -a -r /home/chronos/user/Extensions/theidoftheextension /media/removable/UNTITLED/
Back in chrome://extensions/
Clicked Packed extension > chose the folder above the one containing manifest (in my case /media/removable/UNTITLED/theidoftheextension/0.1.2_0/)
Clicked Pack extension
Opened /media/removable/UNTITLED/theidoftheextension/ in file browser
Dragged the newly-created packed extension /media/removable/UNTITLED/theidoftheextension/0.1.2_0.crx over chrome://extensions/
It installed! Actually I tested it three times, resulting in three copies of the extension. Having said that, if you only have one copy of the extension, perhaps it would be better to test the .crx out on another copy of Chrome first, in case it somehow overwrites/breaks the copy you have installed.
Nolirum said:
Can you see the ID of the extension at the very bottom of its listing in chrome://extensions/? If you can.... I just tested out the following with an extension chosen at random, and it worked fine for me, although I suppose it may depend on the extension...
Copied the ID of the extension (at the very bottom of its listing in chrome://extensions/), then:
sudo su
find / -iname theidoftheextension
cp -a -r /home/chronos/user/Extensions/theidoftheextension /media/removable/UNTITLED/
Back in chrome://extensions/
Clicked Packed extension > chose the folder above the one containing manifest (in my case /media/removable/UNTITLED/theidoftheextension/0.1.2_0/)
Clicked Pack extension
Opened /media/removable/UNTITLED/theidoftheextension/ in file browser
Dragged the newly-created packed extension /media/removable/UNTITLED/theidoftheextension/0.1.2_0.crx over chrome://extensions/
It installed! Actually I tested it three times, resulting in three copies of the extension. Having said that, if you only have one copy of the extension, perhaps it would be better to test the .crx out on another copy of Chrome first, in case it somehow overwrites/breaks the copy you have installed.
Click to expand...
Click to collapse
Thank you, Nolirum!
I did as you suggested, and installed Chromium in Crouton to test it. I get the error "This can only be added from the Chrome Web Store" when I try dragging in the .crx.
When I try 'Load unpacked extension' option in chrome://extensions I get the following error:
Failed to load extension from: /Volumes/KINGSTON/theidoftheextension/5.0_0
Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
Click to expand...
Click to collapse
I saw this on Stackoverflow about the error. I deleted the leading underscore from metadata folder and it works! Yay!!
https://stackoverflow.com/questions...ebstore-throws-error-package-is-invalid-detai
No problem!
Out of interest, when you dragged the .crx onto Chromium, and got the error, was that with dragging it directly into the list of extensions in the chrome://extensions/ window (where you see the icons, details, extension IDs etc)? Just wondering, as I get that error if dragging a .crx on to the browser address bar or on a webpage, but not if I drag it into the extensions list directly.
In any case, interesting info about the metadata folder nonetheless. I remember having to do the same (deleting the underscore) for some extension I was trying to edit. It's reassuring to to read that _metadata is just Web store hashes, and that modifying it shouldn't affect functionality.
Nolirum said:
No problem!
Out of interest, when you dragged the .crx onto Chromium, and got the error, was that with dragging it directly into the list of extensions in the chrome://extensions/ window (where you see the icons, details, extension IDs etc)?
Click to expand...
Click to collapse
Yes, I was dragging into the extensions list. When I try it a little popup says something like "drop to install" then the error.
Interesting. I don't get that error (tried on Chromium, too). Perhaps it depends on the extension. Thanks for checking.

Share Your Boot Battery_scale

This is your battery view when your device is turned off and plugged in.
This thread is Made for the S5 specifically (though these images can be used if rescaled to the right size.
The file can be known as Battery_scale.PNG
The file can be Located at. /res/images/charger
The file is a Multi surface image. Basically a zip png
To extract All the ".PNG" files use. https://github.com/Aaahh/Battery-Images-Replacer
Thanks to @Aaahh for making this a lot easier
Originally posted by cunha17 @ https://forum.xda-developers.com/showthread.php?t=1609059&page=5
Battery-Images-Replacer (forums.oneplus.net/threads/battery-charging-image-replacer.186460) is a way to easily change the battery boot animation. You can use Aaahh provided images or change them and make your own flashable zip. There are 2 problems in that solution, first it is directed to a specific platform (oneplus) and second, it does not work in Marshmallow (CM13).
I figured out a way to make Battery-Images-Replacer to work in Android 6 (Marshmallow) and problably in 5 (Lollipop). Just stating that I'm using CM13 in a Galaxy S3 (i9300) phone, but the code is the same one Aaahh provided with two minor changes:
The battery_?.png and battery_charge files are deprecared in 6.0, and replaced by battery_scale.png (multi surface image) with mandatory 6 frames (hardcoded in Android). To make Battery-Images-Replacer work with previous Android versions, the deprecated files are kept; and
The block device in anykernel.sh file needs to be generalized to work in i9300 (my case) and maybe others, so it was replaced at line 9 with: block=`find /dev/block/platform -name BOOT`;
Warning: be shure to do the 2nd step above, or the flashing will not work, but also, you may brick your phone!!!
But the catch is the creation of the new battery_scale.png file. In this case, we have the 6 single surface images (battery_?.png files) and want to make a "Multi Surface Image" file compliant with Android 6.0.
I made the following script (create_multi_surface_image.sh) that convert multiple PNG to a single "Multi Surface Image", you just need to change the FILES and SCALEFILE variables if needed. This script uses ImageMagick, exiftool and pngcrush to do the job. Just run the script where the battery_?.png files are.
create_multi_surface_image.sh
Once the battery_scale.png is created, you need to copy it to the Battery-Images-Replacer-ak-opo-anykernel/charger/ directory if you didn't run the script there. Go to the base directory (Battery-Images-Replacer-ak-opo-anykernel) and run "zip -r ../Battery-Images-Replacer.zip ." and you should get the flashable zip file at the parent directory.
Now transfer the zip file to your phone (adb push, usb file transfer, etc) and make shure that the file is available to TWRP ou CWM. Boot into recovery and flash the zip file. Turn off the phone and start charging. Enjoy your new battery animation.
I will attach the battery_surface.png file if you just want the final result using the source files (battery_?.png) provided by Aaahh and available at github.com/Aaahh/Battery-Images-Replacer.
Thanks Aaahh for the great job!
And what you have waited for
(Please note this is from my device which is running RR9.0)
(Edit will upload via computer as labs doesn't let edit an add images)

Categories

Resources