[SYSTEM_DUMP] True Stock up to JH7 - Captivate Android Development

The last time I looked, the only dump for the Captivate on xda was a JF6 version, posted a few weeks ago, and the OP had taken out a few AT&T apps prior to doing it, making it not a true stock. This morning I decided to rip out the content out of the factoryrfs.rfs files from each of the three firmwares we have. I am planning to poke around in these a bit and try my hand at some deodexing, but I have also uploaded them for anyone else to play with them, or to restore any files they might have inadvertently deleted:
Here are the links:
JF6
JH2
JH3
JH7

rajendra82 said:
The last time I looked, the only dump for the Captivate on xda was a JF6 version, posted a few weeks ago, and the OP had taken out a few AT&T apps prior to doing it, making it not a true stock. This morning I decided to rip out the content out of the factoryrfs.rfs files from each of the three firmwares we have. I am planning to poke around in these a bit and try my hand at some deodexing, but I have also uploaded them for anyone else to play with them, or to restore any files they might have inadvertantly deleted:
Here are the links:
JF6
JH2
JH3
Click to expand...
Click to collapse
What do JF and JH stand for?

freedonkey said:
What do JF and JH stand for?
Click to expand...
Click to collapse
They relate to the month in which they were built. F means june, h is august. Both of the jh roms are test roms and unfinished, but functional and snappier than the stock jf6 rom.
Sent from my Samsung SGH-i987

Thanks for this.

Aye... Thanx for the system dumps.

Anyone seen these for the i9000?

alphadog00 said:
Anyone seen these for the i9000?
Click to expand...
Click to collapse
Easy to get the files out yourself. Extract the factoryrfs.rfs file out of the firmware tar file, boot into linux and do:
sudo mount -o loop factoryrfs.rfs <any_directory_of_your_choice>
Then copy the files from the mounted location to another, and you have the raw system dump.

Pardon my ignorance but what do these dumps do/provide? How are they different from the firmware from Samsung Firmware?

glio1337 said:
Pardon my ignorance but what do these dumps do/provide? How are they different from the firmware from Samsung Firmware?
Click to expand...
Click to collapse
The firmware from Samsung Firmware contains the applications and default configuration settings packed into a factoryrfs.rfs (which itself is then inside a .tar file). That format is suitable for Odin to flash onto the phone, but you can't access the individual files inside the .rfs. What I did was to unpack the .rfs file, so that the individual files inside are available for whatever you want to do with them. These are not suitable for flashing on the phone as a whole, but someone could take something, modify it and push it to their phone, or make a custom ROM out of it. A simple example is the circle battery indicator mod, where someone modified the framework-res.apk to show percentage, and then made a custom ROM update.zip with it. Without access to the original file, this would not have been possible. Everyone has these files on the phone in one version or another (unless they manually edit or delete them). I just wanted all versions of the files ever released or leaked.

I dont know if this is the place to ask but how we can extract particular app to be able to install it as .apk
here is what i need
http://forum.xda-developers.com/showthread.php?t=776739

zagorka said:
I dont know if this is the place to ask but how we can extract particular app to be able to install it as .apk
here is what i need
http://forum.xda-developers.com/showthread.php?t=776739
Click to expand...
Click to collapse
All the apks are inside the zip files, stored the same way they would normally reside on your phone. I am pretty sure the stock Clock widget is a touchwiz widget, and will not work on your wife's Aria. Hell it won't even work on our own phone if you switch to a different launcher.

rajendra82 said:
All the apks are inside the zip files, stored the same way they would normally reside on your phone. I am pretty sure the stock Clock widget is a touchwiz widget, and will not work on your wife's Aria. Hell it won't even work on our own phone if you switch to a different launcher.
Click to expand...
Click to collapse
I am talking about ClockPackage not SamsungWidget_CalendarClock or SamsungWidget_StockClock. It's the one in applications not the widgets.

zagorka said:
I am talking about ClockPackage not SamsungWidget_CalendarClock or SamsungWidget_StockClock. It's the one in applications not the widgets.
Click to expand...
Click to collapse
Clockpackage is in the zip files. Here is the JH3 version for you. Not sure if it'll install. When I try to push to the Android 2.1 Emulator, I get:
adb install ClockPackage.apk
1404 KB/s (0 bytes in 2921292.002s)
pkg: /data/local/tmp/ClockPackage.apk
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
Which tells me that the package is probably dependant on TouchWiz 3.0 or some other library already installed on the phone.

rajendra82 said:
Clockpackage is in the zip files. Here is the JH3 version for you. Not sure if it'll install. When I try to push to the Android 2.1 Emulator, I get:
adb install ClockPackage.apk
1404 KB/s (0 bytes in 2921292.002s)
pkg: /data/local/tmp/ClockPackage.apk
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
Which tells me that the package is probably dependant on TouchWiz 3.0 or some other library already installed on the phone.
Click to expand...
Click to collapse
Yes, I was able to extract the .apk and .odex files but couldnt install them.
Probably you are right it is too much trouble. I'll look for some alternative.
Thank you

I think he zipaligned the system apk's too

designgears said:
I think he zipaligned the system apk's too
Click to expand...
Click to collapse
I am very new to android, so I am not sure of the implications of this. After further investigation, there is a newer version of the bat files (Auto_Deodexer_2.3), but that version does not do any zipaligning. I added my own bat file to do this after the deodexing, but is what the older version did (zip align every apk in the app directory) bad, and why? If that is the case, which of the apk files should I not zipalign?
On a similar note, the newer bat file asks me to give a bootclasspath. When I give it the values in the init.rc, it skipped deodexing few of the apks in the app directory. When I added twframework.jar to the bootclasspath ahead of framework.jar, it skipped fewer files. I am sure that the older version was buggy, and made mistakes. What should the proper bootclasspath be to not skip deodexing the following files, and to properly deodex the others:
BluetoothOPP.apk+odex
Camera.apk.odex
FactoryTest.apk+odex
MiniDIary.apk+odex
TouchwizCalendar.apk+odex

Figured out the bootclasspath to use. OP and the JH3 file updated. If you downloaded the deodexed JH3 version yesterday, please replace it with the newer version.

What exactly does deodexing and zipaligning do? I understand it makes it faster but how so?
Sent from my SAMSUNG-SGH-I897 using XDA App

frenchtoasted said:
What exactly does deodexing and zipaligning do? I understand it makes it faster but how so?
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
All this is highly theoretical knowlege on my part, so if anyone has better information, feel free to correct me:
Deodexing:
Some of the apks and jar files on the default stock ROM have their code split between apk/odex and jar/odex pairs instead of in a single file. This is done by the developers to supposedly save space, and memory usuage, and to speed up the booting process. Unforunately having separate odex files means that replacing any part of the whole system is much harder. Deodexing the ROM puts the code from the odex files back into the apk and jar files so that every application and jar is self contained and could be replaced with an equivalent.
Zipaligning:
Zipaligning is an optimization of apk files to align all uncompressed data within them on 4-byte boundaries to reduce the memory usage. Since deodexing rebuilt the apks with the code from the odex files, they would have become unaligned. I realigned them to make them optimized again.
This is not necessarily a performance tweak at first, but once you are able to replace the slower parts of the system as a result of it, you should start to get more benefits out of it.

would it be possible to get the allshare package from the deodexed rom? will it work with any other device?

Related

can we get the htc news widget on the phone?

i pushed it on with adb, it shows up in root explorer now, but not in the widgets list. anyway to make this work?
can you send me the file? i would like to try some attempts...
i jsut copied the file to my sdcard and installed it via root explorer...worked like a charm...is the file you have themed?
EDIT: My bad for some reason (it must be late) i thought i read Google News widget...I do want to get the HTC news widget on my phone also...
ejlax said:
can you send me the file? i would like to try some attempts...
Click to expand...
Click to collapse
sure, PM me your email and i'll email it to you
ejlax said:
i jsut copied the file to my sdcard and installed it via root explorer...worked like a charm...is the file you have themed?
Click to expand...
Click to collapse
you installed the HTC news widget right on the phone? the one i tried wouldn't install.
i got the NewsReader.apk installed and opened...now trying to figure out how to get the widget...
anywho, i successfully modified and then pushed the modified News and Weather (GenieWidget) onto the phone. i themed it to match my FeedR widget.
tried to post a screen cap but it's not letting me. something about being a new member.
i have the widget.apk, but not the NewsReader.apk. maybe that's why it's not working. we need to share files. lol
here is the link for the newsreader.apk
http://www.mediafire.com/?xuzn5r0yzze
the app itself does nothing but force close for me. are you getting the same result?
do we maybe also need the odex file?
i was just going to say that....i am going to check...but the rom that i have is deodexed...do you have odex files?
ejlax said:
i was just going to say that....i am going to check...but the rom that i have is deodexed...do you have odex files?
Click to expand...
Click to collapse
i do not have the odex files. i'm giving up for now. lol hopefully somebody can figure it out. i'm good with my skinned geniewidget for now.
You say your rom is deodexed... you're running a fully deodexed rom on DI? Did you build this yourself, or...?
I have some ideas for the news widget, but I'd like to see newsreader working first.
Thanks!
I posted progress..
I posted progress on the same thread in the apps section. I rooted and pulled de-odexed files from an evo build and pushed them to the system/app/ directory, i then cleared the data in HTC Sense app and the widget and icon showed up. The problem is that they force close. You need 3 files
RSS.apk
NewsReader.apk
com.htc.NewsReaderWidget.apk
I don't think it will make any difference to use odex'd files. Usually it is better to have de-odex'd files to install. The files must be on /system/app/ directory in order to even show up and launch. I hope that a dev is able to take a better look at the androidmanifest.xml in the app or use logcat to see what the hell is going on.
If you want to write to the /system/app/ directory,
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mv /sdcard/RSS.apk /system/app/RSS.apk
(etc...)
then applications-->manage-->HTC Sense -->clear data...
But again, FC's will occur until someone is able to look at the manifest and alter it. I looked at the MinSDK for this app and it is the same as the DInc, otherwise I would've changed that part with a Hex editor myself.
Hope someone is able to do this, we would all be one step closer to a smaller Evo, lol. (I really don't like holding a "kindle" to my ear anyways, lol!)
Red.
what errors do you get that cause the force closures? (logcat from adb)
Updating the manifest files isn't hard, but requires resigning... did you need to resign the evo files after deodexing?
vilord said:
what errors do you get that cause the force closures? (logcat from adb)
Updating the manifest files isn't hard, but requires resigning... did you need to resign the evo files after deodexing?
Click to expand...
Click to collapse
I didn't need to resign because the .apk files I pulled were from a build that was de-odex'd in the "Evo Android Development" Section. Root Explorer recognizes the files right away, but because they need to be system files, they can't be installed like other apps. I don't have a logcat because I really don't dev too much, but would be thrilled if others tried this.
Red

[Q] How to edit theme images and not have phone hang on boot?

I've figured out all apk files are really just zip files, but why am I not able to unzip the framework-res.apk file, edit the images within, then save it again without causing my phone to hang on boot?
Is there some step I am missing? I've tried rezipping with normal compression, store only, and only photoshopping and resaving a single image within the apk and still it fails.
How are images edited and updated? What am I missing?
I use apkmanager myself for most theming. You might look into it
Sent from my SCH-I500 using XDA App
An apk is a zip, but it's a *signed* zip
Sent from my SCH-I500 using XDA App
Here is the way I do it. I use 7zip to do this and I think it is the only program that can do it.
The way you can do it is to extract the drawable-hdpi folder within the framework-res.apk then do all your edits and save them with the exact same file names. Then you can go back into your framework-res.apk and drag and drop the drawable-hdpi folder back in and it will over write the original ones. Now just hit the Up (like to move up a directory) button until you see the message "framework-res.apk has been changed. Update it in the archive?" then click yes. Now you can put it on your phone without force closing. If you were just editing framework-res and it was not within another .zip file then you won't get that message and that is fine.
APK Manager.
You can use extract/zip (2/3) for image-only edits, but you need to decompile/compile (9/11) to mess with xml files.
Do *not* sign system apks (like framework-res.apk). Do sign other apks.
Btw, this is in the wrong forum.
(Next step: learn about the update.zip packaging script. Remember to name it something besides update.zip afterwards, because on the Fascinate we're installing everything through Clockwork, which should be the only file actually called update.zip.)
s44 said:
APK Manager.
You can use extract/zip (2/3) for image-only edits, but you need to decompile/compile (9/11) to mess with xml files.
Do *not* sign system apks (like framework-res.apk). Do sign other apks.
Click to expand...
Click to collapse
Oooh! I didn't know this app made xml's editable. That opens up a whole new set of theming fun. I can't wait to release my new theme. It should be well received (I hope)
Btw, this is in the wrong forum.
Click to expand...
Click to collapse
I considered putting this in Themes, but this was a theme development question, so here it ended up. If the Theme and Development forums ever hook up and have a few drinks, then spawn a sub-forum, Theme Development, I assure you it would have been a much easier decision to make
Thanks everyone for helping me out. My last time playing with a phone is an old WinMo 5 device. Anroid seems limiting in it's own ways (no dedicated theme files (can't update without losing the apk theme), but much better for customizing for a 'look' of the OS.

Need a means to compile apks

OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Realorasz said:
OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
apk's are just renamed zip files.
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Realorasz said:
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
yes, set to store...all you have to do is long-press the file and select rename...same to change it back afterward. I don't know about what app will allow you to set to store, but there are a TON of free zip apps. Check the market
I need to edit them though, and if I extract it edit it then zip it with an app, it's not set to store.
From my X10a running WB CM 6.1.3 V053
Root explorer can open xml files in apps but I don't think it can edit them.
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
CMoney87 said:
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Yeah signapktic can sign on the phone, all I need is an app that either will, zip things set to store like in sundae or one that will directly modify the contents of the zip.
From my X10a running WB CM 6.1.3 V053
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
akila87 said:
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
Click to expand...
Click to collapse
Well making it a zip on my phone didn't screw anything up. I can still browse normally. What I need is a means to edit a zip without compressing it, like you have to for bootanimatjons and everything else.
From my X10a running WB CM 6.1.3 V053
I would suggest having a look through the market....download every free app you can find and see if any help. There are so many out there that I have no idea which would work for exactly what you will want it to do. Really, trial and error is the best way, sometimes lol
eclipse
I'm not sure I understand correctly, some previously mentioned are right on track.
Contents of an APK file are as normal zip files, extract the APK with winrar, 7zip or similar program.. make modifications and re-zip it and change the file name.
Important process called "Zip Align" optimizes the file for the APK format and helps to optimize and align the archive for memory mapping I/O ensuring the payload is delivered correctly, for more info - mmap
If you would like to reverse an APK file, I choose to use APKTOOL a Google hosted project and complete with it's own reverse engineering syntax called "baksmali" - This wraps AAPT - Android Asset Packaging Tool part of the android SDK - need this installed.
An issue exists with obfuscated Java classes. Meaning source code has been scrambled (obfuscation algorithm) enabling it be understood by a compiler but no longer is human readable. Another issue is Signing the APK file as most installers are to authenticate the issuing publisher.
To build an APK anyone only need's have the Eclipse IDE and Android SDK installed and you can do this without even having an Android device by using the emulator to build and test your application.
Happy play!
EDIT: Apk edit and Apk tool are both able to help in this situation also.

Battery mod links

Ok, So after copying 200 or so png's in the Drawable_xlarge_mdpi and the drawable_mdpi folder, I get my image mods after flashing.
But, they still only show the stock number of images, 9 or 10. Charging works ok.
So somewhere, there are some xml files I need to edit to reflect the filename additions?
Or am I missing something else?
A501 HC 3.2
Thanks guys and girls!
Battery_Charge.xml & Battery_Discharge.xml should be what your looking for.
Sent from my DROIDX using Xparent Red Tapatalk
DRTMI said:
Battery_Charge.xml & Battery_Discharge.xml should be what your looking for.
Sent from my DROIDX using Xparent Red Tapatalk
Click to expand...
Click to collapse
Thanks. I kind of figgured those were the xml files I was looking for. Problem is, I'm playing hell with de-compiling my framework-res to be able to edit the xml files.
Can't make much progress with the apktools available, even when including the dependancy apk's. So clearly I am a noob with decompiling framework-res
So my next question, is there any difference between a com gen 1 stat_battery_charge.xml; for the a500 and 501? If not, is it feasible to switch the modified xml to replace the current stock one?
here is how i mod those files as well as the icons and so on
i copy the system ui.apk to a folder on my desktop
i open it with winrar.. DO NOT EXTRACT IT.. pull out the folder containing the png files or xms you want to edit.. Just drag and drop them to another folder..
edit them to your hearts desire.
open the system.ui apk again in win rar.. drag the edited folder back into the system.ui.. push it to your tablet.. to say download folder..
then copy it to the original place it will ask you to replace say yes.. your tablet will CRASH .. REBOOT then if you edited the files corectly it will boot and show your changes.
i dont know if this is the correct way easiest way .. but IT DID WORK FOR ME.. USE AT YOUR OWN DESCRESSION..
I could send you the apktool I am using. Its the only one I have found that works worth honeycomb.
Sent from a phone.
NunHugger said:
I could send you the apktool I am using. Its the only one I have found that works worth honeycomb.
Sent from a phone.
Click to expand...
Click to collapse
Would be much appreciated Just send a link, and thanks!
erica_renee said:
USE AT YOUR OWN DESCRESSION..
Click to expand...
Click to collapse
Thanks Erica! That's what I've been doing Actually, wanted to do some editing to the xml files itself. It's easy for png's, at they don't get compiled.
Anytime we take the first step, and install iconiaroot, we do so at our own discretion
Here's an updated apk_manager if you prefer that method.
I normally use a CWM zip since I have to reboot anyway. You can usually start with any theme zip and just make sure their updater-script copies /system to /system and just look through the zip to see what it copies, and if it looks normal, you can make the directory structure the same but copy your own over the old ones (and delete any orginal files that you won't be overwriting). i.e. it should look like:
system/app/SystemUI.apk
system/framework/framework-res.apk
system/fonts/blah.ttf
Just drag your files into the zip in the same place and use it.
And then as a precautionary measure, just do this once or any time you mess with more files (for inexperienced modders): Make a 2nd copy of that zip and call it blah-revert.zip then copy the orginal files over those modified files. Once you have both zips on the device, if anything goes wrong you can flash the revert to get back quick.

Difference Between ODEXED and DEODEXED Files

WHAT IS AN ODEX FILE?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs 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.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
HOW THIS WORKS
For the more geeky amongst us, Android OS uses a Java-based virtual machine for running applications, called the Dalvik Virtual Machine. A deodexed, or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK. An .odex file, on the other hand, is an optimized version of this same .dex file that is stored next to the APK as opposed to inside it. Android applies this technique by default to all the system applications.
Now, when an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages. Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
ADVANTAGES & DISADVANTAGES
The advantage of deodexing is in modification possibilities. This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first, since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times. However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used. Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Source From www.addictivetips.com
This looks to be a copy and paste from the description here.
If you are not the original author its usually a wise idea to acknowledge the original author/source.
And optimized dex files (odex files) may also depended on the framework classes interfaces. This means that you may end up with bootloops or FCs if you change the interface of framework files. The odex files have therefore been given a signature that all files must match.
Deodexed apks can on the other hand be used on several roms as they may only be depended on the resources in the framework-res.apk file.
So you can have an odexed framework with deodexed apks! But if you want to change the interfaces in the Framework then it is easier to deodex all instead of re-odex all.
Sent from my GT-N7000 using xda premium
Thanks for it! For me more clear now.
I need to verify this, So on an ODEXED STOCK ROM, Can I make changes like
editings png's inside System APK files,
Decompile and compile framework-res.apk,
Make changes to the framework-res.apk to enable crt screen effect ... ?
Clears another thing up for me...
Thank you for your post.
Sorry guys for posting a stupid question, but i'm not clear on one point.
I have the htc one S [s3]. How can I understand if /system/framework/framework-res.apk (and/or) framework-htc-res.apk are already deodexed? (in a practical manner)
I mean...since is an apk and I'm not seeing any framework-res.odex are they already deodexed?
Can I straightly modify it?
Thx in advance!
Hi... Cant cant i something? So what is better of them?
Sent from my GT-N7000 using xda premium
Emothic_Reagan said:
Hi... Cant cant i something? So what is better of them?
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
Is not that one is better than the other. They have different characteristiocs. Odexed are smaller and faster while deodexed are easily customizable but needs more space.
Guys I still need somebody to answer my question...plz...anybody?

Categories

Resources