Unable to flash custom bootscreen - Hero CDMA General

Hi I downloaded this android peeing on Apple logo bootscreen, it installed well so I got too excited and wanted to put tux hammering the Windows logo before android pee on the Apple, I made all 70 png's but did not touch anything either than creating the images. I then zipped them according to the original names but when I flash it I get ..... E: wrong digest, system/media/bootanimation.zip
I have tried several times but no luck, yet the original one would easy install. Help guys
Sent from my HTC Hero VillainRom 12, flykernel11 using XDA App

any idea someone

You probably need to sign the update zip, possibly change the install/flash location. Upload what you have in a zip and I'll make one for ya
Edit: and explain what I did

kyouko said:
You probably need to sign the update zip, possibly change the install/flash location. Upload what you have in a zip and I'll make one for ya
Edit: and explain what I did
Click to expand...
Click to collapse
Too bad everyone doesn't do that.

I have decided to change the part1 folder images with custom ones, I will upload the whole zip later so when you help me I won't have to re edit it again, thanx for your replies

Apologies as this is long overdue. Finally had some free time this weekend
Attached are both the working bootscreen AND the original for those who want to see what was changed between the two.
Edit: added the non-signed bootscreen.zip for reference as well. Never know who may want to look at it.
Setup
Extracted the zip (original_doesntflash.zip) into its own directory
Created the META-INF folder
Deleted the CERT.RSA, CERT.SF, and MANIFEST.MF files
Created the "com" folder inside META-INF
Inside the "com" folder I created another folder named "google"
Inside "google" create a folder named "android" <- forgot about this step
Inside there I placed the "update-script" (if you want to know how to make one of these by hand refer to my post HERE)
Added both folders (META-INF and system) to a zip - in this case named it "bootscreen.zip"
Signing The Zip
I'm running linux currently so I do it slightly different, but I'm assuming the majority of you guys and gals are windows users. If that's the case follow these directions:
Go HERE and download AvaboxV2
Extract the AvaboxV2.zip where you want it. Personally I'd made a separate AvaboxV2 folder in my AndroidSDK dir. But the desktop still will work
Copy the newly created zip (bootscreen.zip) into the "Auto-Sign" folder found in AvaboxV2
As per the README.txt:
Start a cmd prompt AS ADMINISTRATOR (not really needed if running Win7)
cd <to the directory of the Auto-Sign folder> [Example: cd C:\AndroidSDK\AvaboxV2\Auto-sign]
java -jar signapk.jar testkey.x509.pem testkey.pk8 bootscreen.zip bootscreen_signed.zip <- same command as used in linux, at least for me
Press enter...wait...wait...done
Congratulations you now have a working/flashable bootscreen zip

thanks mate I will download it today, thanks for the tutorial man its highly appreciative, thanks a lot

kyouko said:
Apologies as this is long overdue. Finally had some free time this weekend
Attached are both the working bootscreen AND the original for those who want to see what was changed between the two.
Edit: added the non-signed bootscreen.zip for reference as well. Never know who may want to look at it.
Setup
Extracted the zip (original_doesntflash.zip) into its own directory
Created the META-INF folder
Deleted the CERT.RSA, CERT.SF, and MANIFEST.MF files
Created the "com" folder inside META-INF
Inside the "com" folder I created another folder named "google"
Inside there I placed the "update-script" (if you want to know how to make one of these by hand refer to my post HERE)
Added both folders (META-INF and system) to a zip - in this case named it "bootscreen.zip"
Signing The Zip
I'm running linux currently so I do it slightly different, but I'm assuming the majority of you guys and gals are windows users. If that's the case follow these directions:
Go HERE and download AvaboxV2
Extract the AvaboxV2.zip where you want it. Personally I'd made a separate AvaboxV2 folder in my AndroidSDK dir. But the desktop still will work
Copy the newly created zip (bootscreen.zip) into the "Auto-Sign" folder found in AvaboxV2
As per the README.txt:
Start a cmd prompt AS ADMINISTRATOR (not really needed if running Win7)
cd <to the directory of the Auto-Sign folder> [Example: cd C:\AndroidSDK\AvaboxV2\Auto-sign]
java -jar signapk.jar testkey.x509.pem testkey.pk8 bootscreen.zip bootscreen_signed.zip <- same command as used in linux, at least for me
Press enter...wait...wait...done
Congratulations you now have a working/flashable bootscreen zip
Click to expand...
Click to collapse
I got an error when flashing the signed zip I got no update file found

elliotn said:
I got an error when flashing the signed zip I got no update file found
Click to expand...
Click to collapse
LOL uhh, I'll take a look at it and test it out... and edit my previous post with w/e I did wrong
Forgot to add the ''android'' folder in the zip. Fixed and should work now

Related

[GUIDE] Extract files from Nandroid backups

I have seen this asked a few times recently so I figured I would try to put together a quick and easy guide to extracting files from Nandroid backups. This guide only covers Windows, I assume if you are running Linux you can download unyaffs and compile/run it without my assistance. If you are adventurous you can install cygwin and compile unyaffs on your own (or download it at any number of sites across the internet), however I have included all the files needed to extract the files from the img files.
1. Download unyaffs along with the cygwin1.dll
2. Extract the files to a new folder.
3. Copy the system.img file from the ROM or your Nandroid backup to the folder you extracted unyaffs.exe and cygwin1.dll to.
4. Open a command prompt and cd to the folder containing the three files. If you are on Windows 7 you can just navigate there with Windows Explorer and in the URL bar type cmd to open a comman prompt in that location.
5. Type unyaffs system.img
You have now extracted all the files from the system partition of your Nandroid backup. The APKs are in the /app folder and some apps require library files that can be found in the /lib folder. For example: Swype.apk requires that libSwypeCore.so be in the lib folder for it to work properly.
I get an "end of image" message and no folder is created with the extracted files.
I am trying to recover some photos from my Gallery, which I presume is in data.img - but no matter what I try to extract, I get "end of image"
any ideas?
Is the system.img the only thing you can open with this or can you open the data.img or the wimax.img also?
Lock-N-Load said:
I get an "end of image" message and no folder is created with the extracted files.
I am trying to recover some photos from my Gallery, which I presume is in data.img - but no matter what I try to extract, I get "end of image"
any ideas?
Click to expand...
Click to collapse
Your photos should be on your MicroSD card, not on one of the system partitions. Look in SDCARD:\DCIM\100ANDRO, your photos should be there.
cruise350 said:
Is the system.img the only thing you can open with this or can you open the data.img or the wimax.img also?
Click to expand...
Click to collapse
I want to know this also
Seems to work ok for me for data.img and system.img, but not wimax.img or boot.img.
Yep, I tried that too...worked.
Is there a command to repack the system or data image after you have unpacked and played around with them???
I am pretty sure that my issue is within the data file...I removed what I think caused the problem but how do I repack it all to put it on the sd card and try it out?
thanks
Does anyone know a command to repack the files???
Worked for me.
Pretty much my whole family has Evo's. theyre all rooted too thanks to me but in my experimenting, i lost the 4G keys to mines. so i troubleshooted. i put Amen Ra's recovery on my brothers phone, and nandroid'ed only the wimax. put the entire folder for that backup on my sdcard on the spot where u would find ur backups, ran Amen Ra on my Evo. and bam. working 4G. u just cant use them at the sametime cuz it interfears.
Oh ok cool.
Is there anyway to pack the files on windows
I want to see if my phone will boot now that I got rid of some programs I believe to be causing it to bootloop
Stupid question. Don't mind me.
Awesome this works Thanks allot
how can I extract /data/system to then package back as either
* SBF
or
* update.zip
to write to another identical phone?
re
http://forum.xda-developers.com/showthread.php?p=17217163#post17217163
ubuntu fyi
I've extracted *.smg files from a SBF Rom File. I'm willing to extract Stock Apk's from it.
Now, my Unyaffs is in the same folder of the SMG files such as cygwin1.dll, however when i try to execute "unyaffs cg39.smg" I receive the following:
8 [main] unyaffs 5960 handle_exceptions: Exception: STATUS_ACCESS_VIOLATIO
N
2790 [main] unyaffs 5960 open_stackdumpfile: Dumping stack trace to unyaffs.e
xe.stackdump
the log says:
Exception: STATUS_ACCESS_VIOLATION at eip=004010B0
eax=444E1A20 ebx=0000001A ecx=FFFFFFE4 edx=00801322 esi=0040130E edi=610E21A0
ebp=0022EE88 esp=0022EE50 program=C:\Motorola\unaffys\teste-extracted\unyaffs.exe, pid 4708, thread main
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022EE88 004010B0 (0022EEE9, 00000000, 00000000, 00401333)
0022EEB8 004013AF (00000002, 00800180, 00800090, 610A5E22)
0022EFA8 61004DD2 (0022EFC0, FFFFFFFF, 77A651CE, 00000000)
0022FF58 6100594F (00000000, 00000000, 00000000, 00000000)
End of stack trace
I've tried to regsrv32 the DLL and also receveid error as a invalid Dll. Does anyone have an idea?
I'm looking for stock Phone, Contacts and the keyboard apk, by the way, anyone knows the keyboard apk file?
thanks
Thanks
Sent from my PC36100 using Tapatalk 2
hi guys,exist a new link for this tool or another tool for open .img files?
thanks in advance

Looking for a tutorial: how to cook a ROM?

I'm looking for a guide which tells how to make a own custom ROM from another one
I mean:
1. How to add/replace/remove apps in /system/app/?
1. a) Do they need to have special permission?
2. How to replace boot screen?
3. How to add custom kernel?
4. How to add Desire lockscreen/flip clock?
5. How to add transparent notofication area?
6. How to add Power menu?
I've been serching forum, but didn't find such tutorial. Would be very thanful to get this knowledge.
I think that will be very useful for maaaany android maniacs
1. Simple delete/copy apks in .zip file using 7-Zip or any other.
2. I belive you need to put bootanimation.zip in /data/local/ folder.
3. Idk
4. For Desire lockscreen you need edited HtcLockScreen.apk; for flip clock - HtcClockWidget.apk
5. Edited /system/framework-res.apk or /system/framework/com.htc.resources.apk. I'm not sure
6. You need edited /system/framework/android.policy.jar
69. Resign your zip file using Auto Sign
Attachment doesn't load, but I know about resigning ROM after everything is done
Ad. 1. As I thought, but do the need special permissions? And I also wonder one thing. Are they installed while flashing? Cuz they need to be in system registry, I think...
I have found this: http://wiki.android.com.pl/wiki/Kon...iana_instalowanych_aplikacji_razem_z_systemem
No any permissions etc.
Found this, too. Thanks.
to add a custom kernel you have to unpack the boot image and edit the ramdisk manually, although i think there is an option in dsixda's kitchen to unpack and repack the boot.img
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Edit:
Found nice guide there: update-script syntax
tomekk_nt said:
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Click to expand...
Click to collapse
The most important part of a recovery update zip is the update script. It will tell the recovery what to do. If you want an example of a basic update package, which replaces one file in the /system/framework (although a different one) can found here. Open this and read the META-INF/com/google/android/updater-script (or whatever its called). The syntax is pretty straight forward and I think its easiest to learn from the examples of updater scripts found here on XDA. For the simple case, of only replacing/adding files to the /system partition you can leave the updater script from the above example as is and only change the files under the /system directory in the zip.
Note, that the above example uses the newer upader-script (I hope I am writing this correctly, I am writing from memory) which also has a binary file in the same directory. Some update zips use the older "update-script" lone text script. For these kind of scripts, you can find a guide here.
Personally, I use RA recovery, and for this recovery you need to sign the update zips (last thing you do of course). At least for RA recovery, both the older "update-script" and the newer "updater-script" work fine, so its up to your personal preference which do you prefer.
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
I built a kernel tool long time ago, very easy to use (only for linux)
1: unzip the file, place it where you want it eg your desktop
2: place boot.img in the working directory
3: double-click the menu icon or launch from terminal
4: it creates a new directory named BOOT-EXTRACT,edit what you want in there or change the kernel etc.. and repack it again via the kernel tool
see screenshot. here for those how want the tool >>> http://www.elelinux.se/tools/kernel_tool.zip
Edit: Only for Hero
tomekk_nt said:
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
Click to expand...
Click to collapse
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
elelinux said:
I built a kernel tool long time ago, very easy to use (only for linux)
Click to expand...
Click to collapse
And that's a good reason to install newest Ubuntu Thanks!
riemervdzee said:
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
Click to expand...
Click to collapse
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
LOL, you've got help from every well known hero dev on xda, I'm sure you'll have all the info you need now to start building rom's. Good Luck!
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
tomekk_nt said:
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
Click to expand...
Click to collapse
But it is for MS Windows, or saw I wrong ? I have also built a tool to javasign files,but should probably write a manual first,it is easy to use but some dependencies maybe not so easy for a beginner with Linux.
tomekk_nt said:
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
Click to expand...
Click to collapse
Correcto

Help with compiling apk for framework-res

I am trying to create a custom theme, by modifying the framework-res.apk. I have been successful in porting some really cool .png files, but my problems start with the de-compiling & recompiling the .apk so I can modify the .xml & .9.png files. It seems every time I recompile my .apk it sends me in to a boot loop. I have used both APKTool and APK Manager with no luck. Here are my steps:
APK Manager:
1. Use a root explorer to copy the framework-res.apk.
2. Paste the file on my sd card.
3. Copy the file and paste it in the "place-apk-here-for-modding" folder.
4. Choose option 9 for compile.
5. Open the .xml file with Notepad++.
6. Recompile .apk using option 11.
7. Yes to "is this a system file?"
8. Yes to "keep original files & signatures"
9. Delete the files I modified from the "keep" folder and the resources.ascr file.
10. Finish the build of the .apk.
11. Copy & paste the modified .apk back to my sd card.
12. Rename the file from unsigned-framework-res.apk to framework-res.apk.
13. Use root explorer to cut & paste the modified to my /system/framework folder.
14. Reboot.
I now end up in a boot loop what am I doing wrong??
Rockstar52 said:
I am trying to create a custom theme, by modifying the framework-res.apk. I have been successful in porting some really cool .png files, but my problems start with the de-compiling & recompiling the .apk so I can modify the .xml & .9.png files. It seems every time I recompile my .apk it sends me in to a boot loop. I have used both APKTool and APK Manager with no luck. Here are my steps:
APK Manager:
1. Use a root explorer to copy the framework-res.apk.
2. Paste the file on my sd card.
3. Copy the file and paste it in the "place-apk-here-for-modding" folder.
4. Choose option 9 for compile.
5. Open the .xml file with Notepad++.
6. Recompile .apk using option 11.
7. Yes to "is this a system file?"
8. Yes to "keep original files & signatures"
9. Delete the files I modified from the "keep" folder and the resources.ascr file.
10. Finish the build of the .apk.
11. Copy & paste the modified .apk back to my sd card.
12. Rename the file from unsigned-framework-res.apk to framework-res.apk.
13. Use root explorer to cut & paste the modified to my /system/framework folder.
14. Reboot.
I now end up in a boot loop what am I doing wrong??
Click to expand...
Click to collapse
You have to sign it with 12
Lenn said:
You have to sign it with 12
Click to expand...
Click to collapse
Tried it, still boot loops at the Archos screen. I then have to do a complete format & wipe reinstalling the SDK, firmware, and the root files. I don't get it.
Lenn said:
You have to sign it with 12
Click to expand...
Click to collapse
Do not sign frameworks! How many time do I have to say this! System apps do not get signed...
Now, as far as the framework, there's two things to check. First, what XMLs have you edited? Second, instead of using root explorer to copy the framework, connect to a pc and use adb to perform these commands:
Code:
su
stop
cp /system/framework/framework-res.apk /system/framework/framework-res.old
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk
sync
start
If it continues boot-looping, you will still be connected through adb, so you just
Code:
stop
cp /system/framework/framework-res.old /system/framework/framework-res.apk
sync
start
and it will come back up without having to reformat or anything.
If it's bootlooping even when you use the adb method to copy, then your XMLs must be reencoding incorrectly. Post a list of all XMLs you have changed.
msticninja said:
Do not sign frameworks! How many time do I have to say this! System apps do not get signed...
Now, as far as the framework, there's two things to check. First, what XMLs have you edited? Second, instead of using root explorer to copy the framework, connect to a pc and use adb to perform these commands:
Code:
su
stop
cp /system/framework/framework-res.apk /system/framework/framework-res.old
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk
sync
start
If it continues boot-looping, you will still be connected through adb, so you just
Code:
stop
cp /system/framework/framework-res.old /system/framework/framework-res.apk
sync
start
and it will come back up without having to reformat or anything.
If it's bootlooping even when you use the adb method to copy, then your XMLs must be reencoding incorrectly. Post a list of all XMLs you have changed.
Click to expand...
Click to collapse
I do have my system set up for adb, but for some reason it don't read my A101, it works fine for my phone. The device manager shows my A101 listed as a Gen8 ADB Device, but it don't show up when i use the command: adb devices.
With your help I did manage to replace all of the stock .png's. I also found that I don't need to edit the .xml files to do what I want to. Thanks, for so much of your help! Although I would like to replace the .9.png's also and I understand that you must de-compile the .apk in order to do so. this way I could build a custom theme.
Rockstar52 said:
I do have my system set up for adb, but for some reason it don't read my A101, it works fine for my phone. The device manager shows my A101 listed as a Gen8 ADB Device, but it don't show up when i use the command: adb devices.
With your help I did manage to replace all of the stock .png's. I also found that I don't need to edit the .xml files to do what I want to. Thanks, for so much of your help! Although I would like to replace the .9.png's also and I understand that you must de-compile the .apk in order to do so. this way I could build a custom theme.
Click to expand...
Click to collapse
Have you done this yet(from the archos support site):
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
Macos: echo "0x0e79" >> ~/.android/adb_usb.ini
Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
And disabled/reenabled debugging on the tablet?
msticninja said:
Have you done this yet(from the archos support site):
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
Macos: echo "0x0e79" >> ~/.android/adb_usb.ini
Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
And disabled/reenabled debugging on the tablet?
Click to expand...
Click to collapse
No but I will give it a try and report back.
None of my changes are taking effect??!
Still not working, just a question. I am running Win7 64bit could this be the problem?? Do I need to be on a 32bit system to do the decompiling, compiling?
Tried on my wife's 32bit system still the same. For some reason it's not compiling the .apk right.
Rockstar52 said:
I am trying to create a custom theme, by modifying the framework-res.apk. I have been successful in porting some really cool .png files, but my problems start with the de-compiling & recompiling the .apk so I can modify the .xml & .9.png files. It seems every time I recompile my .apk it sends me in to a boot loop. I have used both APKTool and APK Manager with no luck. Here are my steps:
APK Manager:
1. Use a root explorer to copy the framework-res.apk.
2. Paste the file on my sd card.
3. Copy the file and paste it in the "place-apk-here-for-modding" folder.
4. Choose option 9 for compile.
5. Open the .xml file with Notepad++.
6. Recompile .apk using option 11.
7. Yes to "is this a system file?"
8. Yes to "keep original files & signatures"
9. Delete the files I modified from the "keep" folder and the resources.ascr file.
10. Finish the build of the .apk.
11. Copy & paste the modified .apk back to my sd card.
12. Rename the file from unsigned-framework-res.apk to framework-res.apk.
13. Use root explorer to cut & paste the modified to my /system/framework folder.
14. Reboot.
I now end up in a boot loop what am I doing wrong??
Click to expand...
Click to collapse
With ApkManager did you delete the 'public.xml' folder in ..\res\values ?
waterpolo said:
With ApkManager did you delete the 'public.xml' folder in ..\res\values ?
Click to expand...
Click to collapse
No, I did not. Was I supposed to?
EDIT: Ok I did some digging and what I have found is that the file size of the original framework-res.apk is 9.32mb. Once I rebuild it whether I modified anything or not the rebuilt .apk is only 7.34mb. Upon further inspection it seems to leave out all of the "value" named folders from the newly built .apk, and it does this whether I use APKTool or APK Manager(even though I say keep files). Has anyone else had this problem?
IM having the same problem,no solution though ! i edited bools.xml but after recompiling its not there ! Anyone solution ?

[GUIDE]Deodex An Application

Hey Guys,
This is a small tutorial for those who want to Deodex a Single Application manually.
Deodex And Odex:
The APKs or JARs of Android contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.It will make your faster theoretically even though it would be too small to notice.When deodexing the .odex file is changed to classes.dex file. Deodexing also allows us to theme and install mods.Many of the Stock Roms and CyanogenMod 7 roms are now odexed and to theme them or to add mods we need to have it deodexed. So lets learn how!!
Deodexing:
Preparation:
Hope you have Java Development Kit installed on your computer to run the scripts.Get it from: here.Select you OS from the list and download the suitable package.(We would need the full thing and not the Demo versions.)
Download the Attached .zip File
Extract its Contents to a Folder.(Extracting to a New Folder in the Desktop is Preferred for Ease)
We will name this Folder with the Extracted Contents as Deodex(or any name that you like)
Procedure And Explanations:
First of all copy the Application file that you need to Deodex.A Android Application file is the .apk file found in the system/app directory.Copy the .apk file and the .odex file of the application that you want to Deodex and paste in the Deodex folder(Folder to which the attachment's contents was extracted)
Now go to your system/framework directory and you can see a lot of .jar and .odex files in this folder and copy all its contents to the folder to which the attachment's contents was extracted.
Before doing anything more backup your rom and the application file(If anything goes wrong you can use it then)
To Deodex a application you need to specify its "BOOTCLASSPATH" files. BOOTCLASSPATH are files that contain the classes for an application or in simple language BOOTCLASSPATH files are those files that are required by a android application to run properly. They are actually those files that we have copied from the system/framework directory to our Deodex folder. There are mainly 5 BOOTCLASSPATH files for every android rom.They are: android.policy.jar , core.jar , bouncycastle.jar , ext.jar , framework.jar
All apps are dependent on these files but some apps are dependent on some other BOOTCLASSPATH files.So sometimes the problem is that we actually dont know to which of these files is a particular app dependent to.So we will have to specify all the BOOTCLASSPATH files or the .jar files in the system/framework directory.So problem solved!! Now enough with the theory class,lets proceed to the practical classes!!!!!
Open Command Prompt.
As an example we will Deodex Settings.apk
Type in this command in Command Prompt:
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:
com.android.location.provider.jar:com.google.android.maps.jar:sonyericsson.suquashi.jar:
core.jar:corej-unit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:monkey.jar:pm.jar:
:services.jar:sqlite-jdbc.jar:svc.jar -x Settings.odex
Here:
-Xmx says the heap memory needed.In the above command it is given to 1024m. Sometimes deodexing may have errors due to the low heap memory.So set it to 1024m itself.
-jar baksmali.jar says the program to run baksmali.jar file.
-c says that the following files are the BOOTCLASSPATH files of the application we are deodexing.
-x says the name of the application that we are deodexing.It should end with .odex extension.
Note:
When you specify the .jar files just add all those .jar file names in the system/framework folder(only add the .jar files and not the .odex files).Ensure that you have added the .jar extension at the end of each file. Separate the .jar files with colon " : " symbol.
If you have made no spelling errors and have done everything mentioned you will get a folder named "out".
Now we have to smali the out folder into classes.dex file.
So again type in the Command Prompt:
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
Here:
-o says what the output file should me named to.Dont rename the classes.dex file into anything else.
Now you will have a file in our Deodex folder(Folder to which the attachment's contents was extracted) called "classes.dex".
Finalizing:
Now open the application's .apk file(which you were trying to deodex) with WinRar.
Move the classes.dex file that you got to this .apk file.(Just drag and drop it to the .apk file opened with WinRar.)
Now you will have a deodexed .apk file.
Note: After deodexing you will have to delete the .odex file of the particular application which you had deodexed.
I will make a guide to Odex back a Deodexed application soon!
Hope this guide helps you....
For any doubts or questions please post it here in this forum and I will try to attend to it.........
Re: Deodex A Single Application
Thanks bro..
Good tut..
sent from my phone using hands and brain...
thanks
Re: Deodex A Single Application
Good tut...
But quite long
Sent from my W8 using xda app-developers app
hey...nice tutorial and nice explanation :good:
thanks
Re: Deodex A Single Application
But helpful too...
sent from my phone using hands and brain...
Gogeta said:
Good tut...
But quite long
Sent from my W8 using xda app-developers app
Click to expand...
Click to collapse
I made it long so that everyone understands.Even those who are very new to android
i'm stucked when i try to deodex settings.odex..
any suggestions???
Hidzrie said:
i'm stucked when i try to deodex settings.odex..
any suggestions???
Click to expand...
Click to collapse
you must deodex
settings.apk + settings.odex.....
i've already follow exactly like the tutorial above but cmd just stucked...
in 'out' folder there are \com\android\settings\ folder and these files were in it and nothing more:
AccessibilitySettings$1.smali
AccessibilitySettings$2.smali
AccessibilitySettings$3.smali
AccessibilitySettings$4.smali
AccessibilitySettings$5.smali
AccessibilitySettings$6.smali
AccessibilitySettings.smali
please anyone help..
Credit/thanks: http://forum.xda-developers.com/showthread.php?t=1208320 ?
Hidzrie said:
i've already follow exactly like the tutorial above but cmd just stucked...
in 'out' folder there are \com\android\settings\ folder and these files were in it and nothing more:
AccessibilitySettings$1.smali
AccessibilitySettings$2.smali
AccessibilitySettings$3.smali
AccessibilitySettings$4.smali
AccessibilitySettings$5.smali
AccessibilitySettings$6.smali
AccessibilitySettings.smali
please anyone help..
Click to expand...
Click to collapse
follow the highlighted lines and try again and deodexing takes time according to your computer's ram.so be patient.if you still cant do it then just upload the system=>framework folder and the app you want to deodex and its odex file and Private Message me the links. I will check whats the problem.
L_S said:
Credit/thanks: http://forum.xda-developers.com/showthread.php?t=1208320 ?
Click to expand...
Click to collapse
this can be found in the android sources site but it not so easy to understand for beginners so i made it a little easier to understand and i didnt refer that guide because all is clearly written in the android sources site.
i understood why some of you are making mistakes when trying to deodex a apk or jar file.
its because you are copying exactly the same bootclasspath files that i specified in the guide.
it varies depending on your device and your rom. So I have made some changes in my guide.some lines are highlighted in red.
follow those lines.
Hidzrie said:
i'm stucked when i try to deodex settings.odex..
any suggestions???
Click to expand...
Click to collapse
Specify your device and rom that you use. Are you sure that you followed what i told itself? Try it once more as I have made some more changes in the guide to help you guys.
Still if you cant do it then just copy your framework folder and the apk and .odex file that you want to deodex and pm me. I will try to deodex it.
fotak-x said:
you must deodex
settings.apk + settings.odex.....
Click to expand...
Click to collapse
no fotak we dont need to deodex settings.apk. We only need to deodex the .odex file but we will have to keep the apk file also in the same folder.
Leon1234 said:
Specify your device and rom that you use. Are you sure that you followed what i told itself? Try it once more as I have made some more changes in the guide to help you guys.
Still if you cant do it then just copy your framework folder and the apk and .odex file that you want to deodex and pm me. I will try to deodex it.
Click to expand...
Click to collapse
I'm using samsung gt-s5830i.. Rom simplicity v4..
I've tried like many times..still wont work..
Hidzrie said:
I'm using samsung gt-s5830i.. Rom simplicity v4..
I've tried like many times..still wont work..
Click to expand...
Click to collapse
dont worry,we can figure it our!
what error are you getting in command prompt?
can you give the lines that come up in command prompt?
Leon1234 said:
dont worry,we can figure it our!
what error are you getting in command prompt?
can you give the lines that come up in command prompt?
Click to expand...
Click to collapse
There are no error appear on cmd..
After I insert a command to deodex settings.odex and press enter, it just like nothing happen...
There are no error appear on cmd..
After I insert a command to deodex settings.odex and press enter, it just like nothing happen...
Click to expand...
Click to collapse
you will have to wait for some time when deodexing depending on the ram of your device.
what is the ram of your computer?
and do you have java 7?

Exploring TWRP backups on Windows

This question is not specific to the G2 however since it's the device I currently own I figured I might as well ask it here since it seems as good as place as any to ask. That being said I would like to know how I can explore the contents of a TWRP created nandroid backup from my PC running Windows 7 professional. I have already transferred the files to my computer without issue, but when I try to extract the "data.ext4.win000" or "data.ext4.win001" files using 7Zip it just says the files are not supported so I am not sure what piece of software I need to get to open these files and explore their contents from within Windows and any help would be greatly appreciated.
TIA,
MTCellph
You need a specific program to view the files inside, as soon as I check the one I use on my laptop I'll let you know
Sent from my LG-D800 running stock kk, rooted with philz using XDA app
---------- Post added at 11:34 AM ---------- Previous post was at 10:49 AM ----------
Ok so here's what you want to do rename the file to data.est4.tar.gz and you will be able to explore the archive using 7zip
Sent from my LG-D800 running stock kk, rooted with philz using XDA app
I did that and there was a Tar file inside of the tar.gz file which I tried extracted to my desktop and tried to open in 7zip, but it would not open so I am at the same spot I was in to begin with
mtcellph said:
I did that and there was a Tar file inside of the tar.gz file which I tried extracted to my desktop and tried to open in 7zip, but it would not open so I am at the same spot I was in to begin with
Click to expand...
Click to collapse
for some reason that keeps happening with the data folder but you can easily view the system
XxZombiePikachu said:
for some reason that keeps happening with the data folder but you can easily view the system
Click to expand...
Click to collapse
Thanks again for the reply. I was trying to view the DATA folder as you may have guessed which as you found out does not work (or atleast I could not get it to work for me) on Windows so I had to boot up into my Ubuntu partition on my machine and concatenate the 2 .WIN files into one file using the following command from the Ubuntu terminal.
cat data.ext4.win000 data.ext4.win001 > data.tar (or tar.gz if compression was enabled when you created the backups in TWRP)
I then used the built in archive manager in Ubuntu and was able to browse the DATA partition and extract the information that I needed. This should not be necessary, but as we both discovered, windows (for whatever reason) does not seem to be able to handle the DATA partition while Ubuntu can so if anyone stumbles upon this post wanting to know the same information then you should try downloading a live cd / live usb version of Ubuntu (if you don't already have it installed on your machine that is) and running it and follow the steps above to access the files in your DATA partition.
Note: In the above example I had to combine the 2 data.ext4.win* files into one file before I could access the archive. If you do not have multiple data.ext4.win* files then you can skip that step and go straight to the next step which is opening the data partition in the built in archive manager that comes with Ubuntu.
HTH,
MTCellph
mtcellph said:
Thanks again for the reply. I was trying to view the DATA folder as you may have guessed which as you found out does not work (or atleast I could not get it to work for me) on Windows so I had to boot up into my Ubuntu partition on my machine and concatenate the 2 .WIN files into one file using the following command from the Ubuntu terminal.
cat data.ext4.win000 data.ext4.win001 > data.tar (or tar.gz if compression was enabled when you created the backups in TWRP)
I then used the built in archive manager in Ubuntu and was able to browse the DATA partition and extract the information that I needed. This should not be necessary, but as we both discovered, windows (for whatever reason) does not seem to be able to handle the DATA partition while Ubuntu can so if anyone stumbles upon this post wanting to know the same information then you should try downloading a live cd / live usb version of Ubuntu (if you don't already have it installed on your machine that is) and running it and follow the steps above to access the files in your DATA partition.
HTH,
MTCellph
Click to expand...
Click to collapse
great I already run Ubuntu on a virtual machine so this is very useful information
explore/extract system.ext4 with IZArc
Sorry - please ignore this post - I don't know what I'm talking about sometimes...
I know the thread is over 6mon old, sorry...
I have a recent backup from TWRP 2.7.x and really need to figure out how to get into /data/media or whatever the equivalent is in the archive. I did a 'cat' of my 4 data.ext4.win00* files and opened that in Ubuntu. All it contained was a big stack of APKs and a subfolder with a bunch of 0 byte objects. What bugs me the most is that the file browser reports the data.ext4.tar.gz I created at 3.3GB, but the ubuntu handler only reports the /data folder inside at 1.6GB.
I lost a buttload of data and files to an Odin restore necessitated to wipe 2 stubborn cache files. Nothing I tried could change their properties (thanks G00gle). Anyway, I ended up doing a full wipe of the phone thinking I had a good TWeRP backup on the extSDcard. Wrong.
I just checked system.etx4.win* and found the same/similar files under it's /app folder.
Have I lost all those files or is there something else I can try? TIA.
Talos4 said:
explore/extract system.ext4 with IZArc
Click to expand...
Click to collapse
Thanks a lot for this hint! I hadn't heard about IZArc before. It's really great and saved my day. :highfive:
Windows users
For windows (if you have multiple files) :
Code:
copy /B data.ext4.win001 + data.ext4.win001 + data.ext4.win001 + data.ext4.win001 output.tar
Mehdiway said:
For windows (if you have multiple files) :
Code:
copy /B data.ext4.win001 + data.ext4.win001 + data.ext4.win001 + data.ext4.win001 output.tar
Click to expand...
Click to collapse
Thanks to this, I was having a bad time viewing each of the data.ext4.win000 etc. etc. can't handle by windows I think. Looking for solution from google and I end up here. Thank you my friend. :good:
zidane02 said:
Thanks to this, I was having a bad time viewing each of the data.ext4.win000 etc. etc. can't handle by windows I think. Looking for solution from google and I end up here. Thank you my friend. :good:
Click to expand...
Click to collapse
if you want to explore twrp backup files on windows:
- rename i.e. data.ext4.win000 to data.ext4.tar and open that .tar file with winzip or winrar (whichever reads .tar compressed files) - same goes for .win001 etc...
btw just a sidenote - twrp doesn't backup your personal media files (photos, videos, etc)
I know I'm bumping a super old thread in a sorta old forum area, but Google brought me here. I am trying to browse a TWRP backup but I have a feeling I need to do a bit more fussing around. The backup is split into data.ext4.win000 through data.ext4.win007 and each of the parts has an accompanying .md5 with the same naming structure (ie. data.ext4.win000 and data.ext4.win000.md5.) There's also a data.info file as well.
The system backup is the exact same as described above for the data, except it's only 2 parts (system.ext4.win000 and system.ext4.win001, with the accompanying md5 files and the info file.)
Can someone provide a bit of guidance? I'm using a Windows 7 Home Premium machine.
I'm in the same situation cognitivedissonance is. Any help to put us on the right direction?
The answer for one question would be beneficial and highly appreciated: in which format the data.ext4.win00x files are ?
cognitivedissonance said:
I know I'm bumping a super old thread in a sorta old forum area, but Google brought me here. I am trying to browse a TWRP backup but I have a feeling I need to do a bit more fussing around. The backup is split into data.ext4.win000 through data.ext4.win007 and each of the parts has an accompanying .md5 with the same naming structure (ie. data.ext4.win000 and data.ext4.win000.md5.) There's also a data.info file as well.
The system backup is the exact same as described above for the data, except it's only 2 parts (system.ext4.win000 and system.ext4.win001, with the accompanying md5 files and the info file.)
Can someone provide a bit of guidance? I'm using a Windows 7 Home Premium machine.
Click to expand...
Click to collapse
To browse the "system.ext4.winxxx" files, simply add at the end of the file ".tar" and decompress them in the same folder created by the first file.
The MD5 is a type of Checksum file wich is created just to check the integrity of the backup file is linked to.
the gladiator said:
I'm in the same situation cognitivedissonance is. Any help to put us on the right direction?
The answer for one question would be beneficial and highly appreciated: in which format the data.ext4.win00x files are ?
Click to expand...
Click to collapse
They are compressed in TAR format.
Mehdiway said:
For windows (if you have multiple files) :
Code:
copy /B data.ext4.win001 + data.ext4.win001 + data.ext4.win001 + data.ext4.win001 output.tar
Click to expand...
Click to collapse
Actually the file numbers should increment, using the above example:
Code:
copy /B data.ext4.win001 + data.ext4.win002 + data.ext4.win003 + data.ext4.win004 output.tar
In the example you're appending a file to itself over and over.
forkup said:
Actually the file numbers should increment, using the above example:
Code:
copy /B data.ext4.win001 + data.ext4.win002 + data.ext4.win003 + data.ext4.win004 output.tar
Click to expand...
Click to collapse
In most cases that should be;
Code:
copy /B data.ext4.win000 + data.ext4.win001 + data.ext4.win002 + data.ext4.win003 + data.ext4.win004 output.tar
And the other (uncompressed) .win image-files (like system_image.emmc.win) can be read with a tool like Ext2Read.
Mehdiway said:
For windows (if you have multiple files) :
Code:
copy /B data.ext4.win000 + data.ext4.win001 + data.ext4.win002 + data.ext4.win003 output.tar
Click to expand...
Click to collapse
Unfortunately, thats wrong. It might work with tar --ignore-zeros (-i) option but only for uncompressed archives.
Do not combine the data.ext4.win* files into one file before accessing. These are single standalone tarball archives (gzip compressed sometimes) you should rename and unpack for each own
I am also seeking a correct and up-to-date answer for this. I have TWRP 2.8.7.0 and multiple .win files, .md5 files and data.ext4 files in my SD Card. Is renaming archives enough to browse in 7zip? Is there any special tool for this, or do we also combine/merge multiple files into one?
Thanks a lot!
Can anyone here shed any light on my TWRP backup browsing issue described here? Thanks

Categories

Resources