[Q] ApplyRecovery.bat - Streak 5 Q&A, Help & Troubleshooting

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.

Related

[Question] Cooking a personal Rom

Is it possible for me to cook a personal ROM? I have tried alot of ROMs here but ever since HTC's new official ROM was out (asia) , I find it really good for me. One thing i hate from the ROM compared to cooked roms are that everything is disorganised. Everything is in 1 program file. In cooked Roms, the chefs have already taken the liberty to assign each app to their appropriate folders (apps,connection,multimedia, etc)
I would like to do the same , however it takes alot of time for me to do so but I can manage that. What i really want to do is, after organising the apps to their respected folders, and installing all of my needed softwares on the phone, how do i make a complete backup of the ROM, and then save it on my computer perhaps. So then i could flash my phone with the backup ROM and the next time i were to flash my phone, everything would be there (my apps, my organised folder).
Will it be possible (i'm sure it's possible, i just need the right software / app to do it)
You're going to need a Kitchen to cook your own ROM; assuming you have a Raphael device, have a look at this thread:
Useful Links Thread
http://forum.xda-developers.com/showthread.php?t=439783
Many folks use Da_G's Kitchen ... but there are other great Chefs that have made their Kitchens avalaible.
HTH,
Thank you for the link hilaireg. It's very helpful.
After reading the available tutorials, i have a question. Most of the kitchens are using pre-existing ROMS.
I would like to use a new official HTC ROM to start with. "-HTC Touch Pro-MRII-RUU_Raphael_hTC_Asia_WWE_5.07.707.2_Radio_Signed_Raphael_52.58.25.30_1.11.25.01_Ship"
I noticed that all the tutorial require a .nb file which they say comes in the package. However, when i extracted the .exe file , a few files were extracted alongside a .nbh file. But there is no .nb file. What do i do?
arvin2212 said:
Thank you for the link hilaireg. It's very helpful.
After reading the available tutorials, i have a question. Most of the kitchens are using pre-existing ROMS.
I would like to use a new official HTC ROM to start with. "-HTC Touch Pro-MRII-RUU_Raphael_hTC_Asia_WWE_5.07.707.2_Radio_Signed_Raphael_52.58.25.30_1.11.25.01_Ship"
I noticed that all the tutorial require a .nb file which they say comes in the package. However, when i extracted the .exe file , a few files were extracted alongside a .nbh file. But there is no .nb file. What do i do?
Click to expand...
Click to collapse
You need to have NBHextract Tool it will be in include in kitchen...me too trying to cook on same build with no results. It's no easy try try that's it...
krish_nank, Is this your first time building a ROM?
If so, we're on the same boat...
I tried using NBHextract Tool but when i run the .exe a pop up cmd window comes out and then dissappears. I added the program manually in cmd, and here is what it says , but it doesn't do anything although i have place my .nbh file in the same folder with it.
"
C:\Users\xda>C:\Users\xda\NBHextract.exe
=== NBHextract v1.0
=== Extract contents from HTC NBH files
=== (c)2007 xda-developers.com
=== by: pof & TheBlasphemer based on itsme perl scripts
Usage: C:\Users\xda\NBHextract.exe <nbh file> [-v]
C:\Users\xda>
"
arvin2212 said:
organising the apps to their respected folders, and installing all of my needed softwares on the phone
Click to expand...
Click to collapse
If you just want to organize your existing app then all you have to do is go to this folder,
\\\Windows\Start Menu
This folder has all the icons for the programs. So now you can arrange/ rearrange icons, create folder and move the links to the respective folders as you see fit. Total Commander can be used for this.
If you want a way to install apps after installing a new ROM, you can use UC you can read about it here
http://forum.xda-developers.com/showthread.php?t=366337
But if you just want to build custom ROM then the easiest kitchen is Da G's. If you want a fully loaded kitchen try At0mAng - Advance Kitchen - V2
nnkumar73 said:
If you just want to organize your existing app then all you have to do is go to this folder,
\\\Windows\Start Menu
This folder has all the icons for the programs. So now you can arrange/ rearrange icons, create folder and move the links to the respective folders as you see fit. Total Commander can be used for this.
If you want a way to install apps after installing a new ROM, you can use UC you can read about it here
http://forum.xda-developers.com/showthread.php?t=366337
But if you just want to build custom ROM then the easiest kitchen is Da G's. If you want a fully loaded kitchen try At0mAng - Advance Kitchen - V2
Click to expand...
Click to collapse
Both Da_g's & AtomAng kitchen or based on some OS build we ...we want to dump a ROM & Rebuild it on our own way we want.......
krish_nank said:
Both Da_g's & AtomAng kitchen or based on some OS build we ...we want to dump a ROM & Rebuild it on our own way we want.......
Click to expand...
Click to collapse
okay, my bad. Then I am sure you have seen the ROM reconstruct thread. Hope that thread helps you.
Have a look at the first three posts in the following thread:
[TUT] Sous-Chef's Guide to Da_G's Simple Kitchen
http://forum.xda-developers.com/showthread.php?t=490787
Essentially, once you unpack the "-HTC Touch Pro-MRII-RUU_Raphael_hTC_Asia_WWE_5.07.707.2_Radio_Signed_R aphael_52.58.25.30_1.11.25.01_Ship" executable, you run a script that performs the actions required to prepare the NBH file for custom cooking.
That should get you started.
HTH,
krish_nank said:
Both Da_g's & AtomAng kitchen or based on some OS build we ...we want to dump a ROM & Rebuild it on our own way we want.......
Click to expand...
Click to collapse
With my kitchen do this...
Backup the OEM and SYS folder...
If you have the NBH file already place it in the BaseROM folder
If you do not have the NBH file then run the EXE downloaded from HTC, let it go all the way to the first install screen and dont do anything yet, go to your temp folder on the computer, dig around the folders if there are many, you will see ruu_signed.NBH, copy and paste into the BaseROM folder of kitchen.
Once NBH is in the baserom folder start my kitchen
Select 2, 1, 1 and let it do its thing
When extraction is completed and you are back at main menu select option 8, move dumped OEM/SYS from Temp
When that is done select option 6 Copy Extracted ROM XIP from Temp
When that is done your new dumped ROM is ready to be built.
Delete or do not select any duplicate packages
Clean out the new OEM/SYS folders. There is a lot of junk in there that can be removed, welcome folder, do a search in the OEM/SYS folders for *.3gp and remove the welcome movie and blah blah blah...
If you take the time to look at the folder structure of the OEM and SYS folder you should be able to figure it out pretty quickly.
If you need further help you may ask in my kitchen thread.
Hope this is a start for you guys...
nnkumar73, Thank you for your suggestion but i already known about manually doing it from the start menu folder. However it's not practical as , i would have to do it everytime i reflash my phone. If there is a new rom available, and i were to try it and somehow wanted to go back with my older ROM, i would have to do all the moving etc all again.
hilaireg once again, thank you for the link..
At0mAng, Thank you very much as well. I will follow your steps and see how it goes. I appreciate your effort of posting the right steps for it. Thank you.
DELETED.......................
Just an addition to previous posts
arvin2212 said:
C:\Users\xda>C:\Users\xda\NBHextract.exe
Click to expand...
Click to collapse
I can see u missed out the command : nbhextract ruu_signed.nbh
arvin2212 said:
3.If you do not have the NBH file then run the EXE downloaded from HTC, let it go all the way to the first install screen and dont do anything yet, go to your temp folder on the computer, dig around the folders if there are many, you will see ruu_signed.NBH, copy and paste into the BaseROM folder of kitchen.
Click to expand...
Click to collapse
The easiest way is to use any packer apps like winrar. u can extract the nbh directly. if u r using total commander will be a lot easier. just press ctrl+pg dn & u can extract the file instantly.
Thanks to everyone's help especially At0mAng,
I finally extracted the ROM. I can see aloto of files in SYS and OEM folder.
What i would like to know now is, how do i create folders (icons are not neccessary for the folders) so that i can group installed apps in them according to category? Example is, A multimedia, navigation and games folder is created and , my apps are stored in the folders according to their functions. Like GPS tool goes into navigation and so on..
To simply copy files from \Windows to another directory, you can use an initflashfiles.txt in the OEM. Syntax is:
Directory("\Windows\Start Menu\Programs\Tools"):-File("Enable Proxy.lnk","\Windows\Enable Proxy.lnk")
If you are trying to just place Start Menu items in different folders, it's a bit more complicated. There are many places that this can happen.
1) In \OEM\OEM_Lang_0409\initflashfiles.dat
You can edit this file in Notepad if you remove the ReadOnly bit in Windows. Once you've edited it in Notepad and saved it, you need to re-open it in a Hex editor and delete the first 2 bytes "ff fe". Once you delete those first 2 bytes, save the file and reset the ReadOnly flag. In this file is where I define the Folders I want to use in my "Start Menu" folder like this:
; Start Menu contents
Directory("\Windows\Start Menu")ermDir("Programs")
Directory("\Windows\Start Menu")ermDir("Settings")
Directory("\Windows\Start Menu\Programs"):-Directory("Games")
Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")
Directory("\Windows\Start Menu\Programs"):-Directory("Internet")
Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")
Directory("\Windows\Start Menu\Programs"):-Directory("Office")
Directory("\Windows\Start Menu\Programs"):-Directory("Phone")
Directory("\Windows\Start Menu\Programs"):-Directory("Tweaks")
Directory("\Windows\Start Menu\Programs"):-Directory("Tools")​2) *.provxml files
You need to edit these files with a unicode editor. Personally I use EmEditor. You'll notice that in mose packages in \OEM and \SYS there is a _Lang_0409 dir that goes along with it. It's "usually" in this folder where you'll see a *.provxml file. If you open these in EmEditor you'll see that there are lots of file operations. You want to seach or the line containing the *.lnk. In that line you can set the patch of where you'd like the icon installed.
There may be other places that this happens as well, but that's just off the top of my head.
Good Luck!
-e
eras2r said:
To simply copy files from \Windows to another directory, you can use an initflashfiles.txt in the OEM. Syntax is:
Directory("\Windows\Start Menu\Programs\Tools"):-File("Enable Proxy.lnk","\Windows\Enable Proxy.lnk")
If you are trying to just place Start Menu items in different folders, it's a bit more complicated. There are many places that this can happen.
1) In \OEM\OEM_Lang_0409\initflashfiles.dat
You can edit this file in Notepad if you remove the ReadOnly bit in Windows. Once you've edited it in Notepad and saved it, you need to re-open it in a Hex editor and delete the first 2 bytes "ff fe". Once you delete those first 2 bytes, save the file and reset the ReadOnly flag. In this file is where I define the Folders I want to use in my "Start Menu" folder like this:
; Start Menu contents
Directory("\Windows\Start Menu")ermDir("Programs")
Directory("\Windows\Start Menu")ermDir("Settings")
Directory("\Windows\Start Menu\Programs"):-Directory("Games")
Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")
Directory("\Windows\Start Menu\Programs"):-Directory("Internet")
Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")
Directory("\Windows\Start Menu\Programs"):-Directory("Office")
Directory("\Windows\Start Menu\Programs"):-Directory("Phone")
Directory("\Windows\Start Menu\Programs"):-Directory("Tweaks")
Directory("\Windows\Start Menu\Programs"):-Directory("Tools")​2) *.provxml files
You need to edit these files with a unicode editor. Personally I use EmEditor. You'll notice that in mose packages in \OEM and \SYS there is a _Lang_0409 dir that goes along with it. It's "usually" in this folder where you'll see a *.provxml file. If you open these in EmEditor you'll see that there are lots of file operations. You want to seach or the line containing the *.lnk. In that line you can set the patch of where you'd like the icon installed.
There may be other places that this happens as well, but that's just off the top of my head.
Good Luck!
-e
Click to expand...
Click to collapse
Somehow, i am not able to find this file , initflashfiles.dat in my OEM_Lang_0409 folder. :?
Do you have Windows Explorer setup to view all system/hidden files? (Tools->Folder Options-->View)
If using a kitchen that supports it (mine does for sure) you can create a new, blank text file in a package folder, initflashfiles.txt
it uses the same format eras2r posted above, but gets appended to initflashfiles.dat during the cooking process
in this manner you can have initflashfiles.dat changed on a per-package basis, it's also easier because you don't have to worry about the first 2 bytes etc.
e.g. \Packages\beer\initflashfiles.txt
When cooking rom check box next to package "beer"
now the contents of \Packages\beer\initflashfiles.txt get appended to initflashfiles.dat automatically during cooking, don't get applied if box is not checked
similarly this initflashfiles.txt can go in any folder in \OEM and \SYS as well
eras2r, yes , it has already been configured to show hidden files & folders
Da_G, i get what you mean, roughly. What you're saying basically is that i can manually create a txt file for initflashfiles and leave it in the packages folder?
Also i am not sure about the syntax that eras2r posted. I find it alittle well above my level of knowledge. Maybe someone can guide / explain to me regarding this?
Right right, an initflashfiles.txt can go in any subfolder under \OEM \SYS or \Packages
You can create the file with notepad, no need to worry about removing things with a hex editor or otherwise using anything other than notepad.
The syntax is as follows:
using this example to create a directory:
Code:
Directory("\Windows\Start Menu\Programs"):-Directory("Tools")
Directory("\Path\to\create\directory\in\goes\here"):-Directory("Name_Of_Directory_To_create_in_path") - essentially you're saying "Switch to the folder named \Path\to\create\directory\in\goes\here and create a new folder named Name_Of_Directory_To_create_in_path inside of it.
similar syntax to copy a file from one directory to another:
Code:
Directory("\Windows\Start Menu\Programs\Tools\"):-File("Fieldtest.lnk","\Windows\Fieldtest.lnk")
Directory("\Path\to\copy\file\in\goes\here"):-File("destination_file_name.ext","\source\path\to\filename.ext") - here you're saying "navigate to \Path\to\copy\file\in\goes\here, copy file from source \source\path\to\filename.ext, rename it to destination_file_name.ext when copying (you can use the same filename here if you don't want it renamed, renaming is useful for files that might be indexed by windows media player, or the windows help system, etc.
That should clear it up a bit, let me know if it doesnt

Android's .so files

OK, So I've gotten to breaking down and recompiling those pesky .dex files, but I've run into a new problem.
This is a noob question, I'm sure, but .so files look like unformatted, binary files. How do I open then, edit them, etc? I need to read whats going on in my libs. :-(
Are these X11? I'm running ubuntu 10.04 x64 - so those could be difficult.
ie - unreliable 64 bit support.
$ sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Click to expand...
Click to collapse
They're native library files, so platform specific machine code I imagine. Look for an ARM disassembler. I'm not familiar with linux internals, so don't know how you find the entry points, but it obviously will be widely documented. Is it impossible to obtain the source code? Assuming most are written in C/C++, reverse engineering from the machine code is not something I'd describe as a pleasant experience. If the source was well written assembly language & not too big, it can be almost enjoyable I guess. But then TBH walking through a randomly selected programmer's source, let alone object, files scares me, in a Tim Burton inspired bad trip kinda way. If you can find the source, it will be an order of magnitude less painful.
Try IDA Decompiler, it should disassemble all so files!
Most of the libs are open source in the aosp. Some are proprietary blobs with the only solution to them being reverse engineering.
.so disassembly
i know how to disassemble it
you will need orion's easy apk disassembler and apk manager
i've tested it once and it worked, but there´s a problem, i dont know how to re-assemble
1- rename the file .so to .apk like "libtestlib.so" to "libtestlib.apk"
2- put in the folder "place-apk-here-for-modding" of apk manager
3- open script.bat (or something like this) from Apk manager
4- use extract apk option
in the beggining my images inside the lib was corrupted so i used step 5 to fix
5- use option optimise images inside to fix images
6- go to project folder and copy classes.dex file to the root of easy apk disassembler's folder
7- open EasyApkDisassembler.EN.bat and use the "DISASSEMBLY a classes.dex with smali" option
8- give a name to the folder (like "libtestlib")
9- it will create a folder (like "out_libtestlib") with the disassembled files
Orion's easy apk disassembler http://forum.xda-developers.com/showthread.php?p=5826401
Apk multi tool (almost the same as apk manager) http://forum.xda-developers.com/showthread.php?t=1310151
I've tried to open libsurfaceflinger.so from my device with 7zip, and it worked too
thats it
@gkillershots
not working
i renamed .so to .apk and used extract option but getted error :
Processing archive: C:\APKMultiTools\place-apk-here-for-modding\libnative-lib.apk
Error: Can not open file as archive
"An Error Occurred, Please Check The Log (option 26)"

[Q] How do I rename an image?

Hi,
I just read this on your site:
"26. Add Your Own Album Art to Music Folders
Make sure the image you wish to use is 256x256 pixels, 96dpi and save it to your PC. Rename the image to the following format: ~hTC_Album Name.vin. Please note that the change refers also to the file extension as it will now become a vin file. Copy this file to the folder of your specific album on your Storage Card. Example: If the album is called Abba Gold, then your vin file will be ~hTC_Abba Gold.vin."
Well. This might be a stupid question, but how do I do this?? When I rename the file to ~hTC_nameofthetrack.vin it stays an .JPG file.. and when I download it and use "save as" I can only choose between saving it as an .JPG or an .BMP file.. even when I just try saving it as ~hTC_filename.vin it becomes an .JPG with .vin at the end of the trackname..
I would really like to know and this probably is an easy answer so I hope someone can help me with this
are you renaming from the computer or the phone?
if you are doing it via the computer make sure that you have shown filename extensions enabled or it will not change the type of file
and how do I enable that?
[windows helpdesk mode]
Open explorer, goto tools, Folder options
Select the view tab
Under files and folders unselect following:
hide extensions for known file types
[/windows helpdesk mode]
I couldn't get this working no matter what I tried, gave up in the end....
even once the files were renamed and everything, the images wouldn't show....

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 ..........

[GUIDE] Recover Notification from Nandroid

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!

Categories

Resources