[GUIDE][OutDated] How to defeat data throttling... ideas? - G2 and Desire Z Android Development

Although this method is extinct I thought it would be handy to keep around for future works and ideas that we might have. It seems to be at the least a good reference/log of all the methods we have used (some works while others have failed) in the past. Hopefully, we can find a way to get around these ridiculous caps when we pay insane ammounts of cash for UNLIMITED data use...
First things first...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
____________DISCLAIMER___________________________________
I am not responsible for destruction of your phone, boot loops, or cancellation/suspension of your contract due to excessive data use! You edited your rom... I didn't! Don't shoot the f*cking messenger!
And don't make say I did or the Professor will end the world with one of his doomsday devices, lol! He's angry and senile! The most deadly combination! You've seen old people drive, right? Weapons of mass destruction... anyways
First, I'd like to thank androidcues for extensive testing. Also, thanks to T.C.P. for giving us a hand. And finally JesusFreke for creating "smali" that so many of us use today.
Now then, let's get down to business! You need to have the SDK/adb plus drivers setup for this to work. There is no way of getting around this, so if you need help doing that... look somewhere else because there are numerous guides for that. Secondly, you need to make a backup via Nandroid of your current rom! I can't stress that enough! And finally, you need smali which is located here.
Okay, find you current rom on your pc (the zip file) and open it with your favorite extractor (winrar is nice). Go to the system/framework folder and extract services.jar file onto your desktop. Now open services.jar and extract classes.dex to the desktop. Cut and paste classes.dex to your sdk/tools folder. Now, download smali and baksmali.jar from the link in the paragraph above. Rename them smali.jar and baksmali.jar for easier typing later. Cut and paste those two into the SDK/tools folder also. Open your command prompt and cd (change directory) to sdk/tools folder. Then type this exactly (without the quotes: "java -jar baksmali.jar -o classout/ classes.dex". Look at your sdk/tool folder... that should have created a folder called classout. Open it until you find your files. Locate the 7 files with "throttleservices" in the title. Delete them! Now type this into command prompt: "java -Xmx512M -jar smali.jar classout/ -o new-classes.dex". That should repack your edited files and create a file called new-classes.dex... Cut and paste the new-classes.dex to your desktop and rename it classes.dex. Now open your services.jar (that should be on the desktop) with winrar (or whatever) and click add file. Add the classes.dex file from your desktop. It might ask you to replace it or save or not (it will depend on your extractor). After you edited your services.jar, copy and paste it to your tools folder. Connect your phone via usb cable to the pc. Boot into clockwork recovery. In the clockwork menu, make sure you go to mounts and storage and click mount /system before this next step. Now, open the command prompt from your pc again, and cd to sdk/tools folder (if you are already there, you can skip this step! Good for you). Now type "adb push services.jar /system/framework/". Reboot your phone and enjoy!
__________ISSUES_________________________________________
The menu/settings/wireless & network settings/mobile networks are going to force close. It is rarely needed so this won't be a problem for 99% of users (1% of you are bastards). Just make sure you have data roaming enabled before pushing your services.jar and that your APN is correct (which it should be already) because you won't be able to change those again. You can always push your old services.jar (from your rom.zip) to quick restore (way easier than Nandroid but whatever) Just do that the same way we copied and pasted services.jar to tools folder and adb push. ONE THING you might miss is having the option to use 2G only. To remedy this, just dial *#*#4635#*#* from the dialer. Go to phone info and select your prefferences... 2G only,3G only, or 3G preferred. There's an app for that p) called phone info by [email protected] on the market for free. It much handier than dialing all that *#*# crap. That should take care of most folks.
We extensively tested most roms but CM Nightly seemed to not like this edit. I guess it would depend on the build... (we tested nightly #50) My suggestion would be to all the rom developers out there to edit their own service.jars and remove those 7 deadly sins (or files) and put some kinda of falsie placeholder to prevent the force close. That should do it but since ALL roms services.jar are different... i can't make one magical file that will fix everything. ALSO, if you are running a added on theme, you need to use the service.jar from the theme to do this edit!
Well, I think that is all... so have fun and get what you paid for which is UNLIMITED DATA (NOT THROTTLED CRAP THAT IS SLOWER THAN 2G!) T-Mobile has found a loophole with this throttle crap so they can still CLAIM it's unlimited! That may be technically true but it is utter crap and they know it. They are already being sued for this but I doubt anything will happen. This also meant for user who don't use their phone as a home internet connection. Those folks are the ones who made t-mobile do this. This is meant for people who use a normal amount of data like 10-15GB and aren't using mobile internet for torrents or useless crap. That is just a suggestion and obviously this can be used for anyone who wants to. Again, you guys are the ones who editing your own services.jar and not me! I am not responsible! Like Pres Nixon said, "I am not a crook!"
SO FAR, THIS HAS ONLY BEEN KNOWN TO WORK ON T-MOBILE USA AND CANADA BELL... ALL OTHER CARRIERS SEEM TO HAVE THESE FILES JUST BECAUSE IT'S A STANDARD IN ANDROID 2.2.1 AND SEEM TO BE CONTROLLED COMPLETELY OTA UNLIKE TMOBILE AND BELL...

sino8r said:
Step One:
Okay, find your current rom on your pc (the zip file) and open it with your favorite extractor (winrar is nice)(dictionary - I think 7zip is the best)
Step Two:
Go to the system/framework folder and extract services.jar file onto your desktop.
Step Three:
Now open services.jar and extract classes.dex to the desktop. Cut and paste classes.dex to your sdk/tools folder.
Step Four:
Now, download smali and baksmali.jar from the link in the paragraph above. Rename them smali.jar and baksmail.jar for easier typing later. Cut and paste those two into the SDK/tools folder also.
Step Five:
Open your command prompt and cd (change directory) to sdk/tools folder. Then type this exactly (without the quotes: "java -jar baksmali.jar -o classout/ classes.dex". Look at your sdk/tool folder... that should have created a folder called classout. Open it until you find your files.
Step Six:
Locate the 7 files with "throttleservices" in the title. Delete them! Now type this into command prompt: "java -Xmx512M -jar smali.jar classout/ -o new-classes.dex". That should repack your edited files and create a file called new-classes.dex...
Step Seven:
Cut and paste the new-classes.dex to your desktop and rename it classes.dex.
Step Eight:
Open your services.jar (that should be on the desktop) with winrar (or whatever)(dictionary - again, try/use 7zip) and click add file. Add the classes.dex file from your desktop. It might ask you to replace it or save or not (it will depend on your extractor).
Step Nine:
After you edited your services.jar, copy and paste it to your tools folder. Connect your phone via usb cable to the pc.
Step Ten:
Boot into clockwork recovery. In the clockwork menu, make sure you go to mounts and storage and click mount /system before this next step.
Step Eleven:
Now, open the command prompt from your pc again, and cd to sdk/tools folder (if you are already there, you can skip this step! Good for you).
Step Twelve:
Now type "adb push services.jar /system/framework/". Reboot your phone and enjoy!
Click to expand...
Click to collapse
Tried to help clean those up .. looked way too confusing

dictionary said:
Tried to help clean those up .. looked way too confusing
Click to expand...
Click to collapse
Thanks! I had everything nice and pretty but it didn't save my post so I retyped all that crap over. I am kind of a slow typer so it was hell redoing the whole post... The crazy bold all over was tired mistake also...
no more bold thank god!

lol, no problem. Personally doesn't affect me, but hopefully this helps others out!!

This is what I was told by tmobile after I got capped ,I called and said this was not in my contract for my data to be capped they told me that it was but not in the actual contract but in the box of the phone that I bought so after I signed my contract I agreed to all tmobiles terms and conditions and that includes the terms and conditions that are in the box of the phone
Sent from my T-Mobile G2 using XDA App

So basically this will give us the service that we paid for, no edge or 3G crap from time to time (or most of the time) but full 4G ,huh?
Sent from my HTC Vision using XDA App

thatruth132 said:
This is what I was told by tmobile after I got capped ,I called and said this was not in my contract for my data to be capped they told me that it was but not in the actual contract but in the box of the phone that I bought so after I signed my contract I agreed to all tmobiles terms and conditions and that includes the terms and conditions that are in the box of the phone
Sent from my T-Mobile G2 using XDA App
Click to expand...
Click to collapse
They flat out lied to you... all of us could be throttled.

GunToYoMouth123 said:
So basically this will give us the service that we paid for, no edge or 3G crap from time to time (or most of the time) but full 4G ,huh?
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
No this is for if you are throttled and they'll text you if you are. your problem is your phone is set to 3G preffered instead of 3G only. set it to 3G only by dialing *#*#4636#*#* and go to phone info. set to WCDMA only.

sino8r said:
No this is for if you are throttled and they'll text you if you are. your problem is your phone is set to 3G preffered instead of 3G only. set it to 3G only by dialing *#*#4636#*#* and go to phone info. set to WCDMA only.
Click to expand...
Click to collapse
Alright thanks.
But not to sound dumb or anything,but what is "throttled"
I have received a text though bout using "5GB" or my idk what? Forgot the text...but I have unlimited everything... does it have something to do with that?
Sent from my HTC Vision using XDA App

GunToYoMouth123 said:
Alright thanks.
But not to sound dumb or anything,but what is "throttled"
I have received a text though bout using "5GB" or my idk what? Forgot the text...but I have unlimited everything... does it have something to do with that?
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
Yup. Throttled meaning .. data speeds, due to using too much of your "unlimited" data. It's like, driving at 90mph .. and then you go over what they deem acceptable in your data usage (that should be unlimited), so they chop you down to 10mph download speeds. With this, you get back your 90mph.

dictionary said:
Yup. Throttled meaning .. data speeds, due to using too much of your "unlimited" data. It's like, driving at 90mph .. and then you go over what they deem acceptable in your data usage (that should be unlimited), so they chop you down to 10mph download speeds. With this, you get back your 90mph.
Click to expand...
Click to collapse
Has anybody seen that this mod/update/whats-due-to-us works 100% with no side effects?

cpgifford said:
Has anybody seen that this mod/update/whats-due-to-us works 100% with no side effects?
Click to expand...
Click to collapse
Is it really too difficult to read the first post?! If you have trouble with that... there's no way you could do this hack. I wonder whats wrong with folks these days! Are they too lazy to read or just plain stupid? both maybe...
Okay... maybe that was a bit harsh but I clearly listed issues in the first post. I know its long and I tend to go on and on but its all very valid and should explain everything clearly. including what it is and issues....

+1 lol ppl need to learn to read anyways i confirm this works thanks alot man
sino8r said:
Is it really too difficult to read the first post?! If you have trouble with that... there's no way you could do this hack. I wonder whats wrong with folks these days! Are they too lazy to read or just plain stupid? both maybe...
Okay... maybe that was a bit harsh but I clearly listed issues in the first post. I know its long and I tend to go on and on but its all very valid and should explain everything clearly. including what it is and issues....
Click to expand...
Click to collapse
Sent from my HTC Vision using XDA App

Couldn't you save a backup of the services.jar and push the original if you are the 1% that needs to access mobile networks settings?

xomikronx said:
Couldn't you save a backup of the services.jar and push the original if you are the 1% that needs to access mobile networks settings?
Click to expand...
Click to collapse
I am sure you can.
" I know its long and I tend to go on and on but its all very valid and should explain everything clearly. including what it is and issues...."
LMFAO, I am a turbo noob when it comes to understanding this type of stuff. definitely not a dev, however, I have yet to find a tut on this forum that I could not follow or did not either a. have all known issues spelled out IN op or b. have them all spelled out in the first page or 2 of posts. thanks for the hard work all you smarty smarts and keep writing tuts in 6th grade reading level soes not to burn anyones gray matter...

xomikronx said:
Couldn't you save a backup of the services.jar and push the original if you are the 1% that needs to access mobile networks settings?
Click to expand...
Click to collapse
Yeah, you can just grab it from your Rom and save your altered services.jar to access the settings. You could copy and paste it to and from root explorer but on some roms... they tend to boot loop if not pushed via adb. I think it might be due to the fact that the phone is on while the jar is replaced... it seems to make 2.2 very angry, lol. Sometimes it works fine, you could keep both on your SD card and copy and paste when needed...
Oh course, you will still need add initially to edit the services.jar but that should work...

Step Four:
Now, download smali and baksmali.jar from the link in the paragraph above. Rename them smali.jar and baksmail.jar
Click to expand...
Click to collapse
I think that last bit should be "backsmali.jar" not "backsmail.jar".

im getting "java is not recognized as a internal or external command"
when i enter : java -jar baksmali.jar -o classout/ classes.dex

Bash script
I created a bash script that will apply this tweak to any rom's update.zip
http://pastebin.com/Jjmk4d1P
Usage is
Code:
./unthrottle.sh /path/to/update.zip
it will modify the rom in place and break any signatures on that rom. It will also leave the modified services.jar and the original (as servies.jar.backup) in the current directory. You need to have wget, (un)zip, and java installed for this to work.
Here's an example of it running on enother's TheOfficial rom:
Code:
$ md5sum *
759cbe600a34a0b1d48c73113d8faaa0 TheOfficial_G2_v2.14.1_update.zip
bc77d320aa79d95b90d2a0a17adb84a8 unthrottle.sh
$ ./unthrottle.sh TheOfficial_G2_v2.14.1_update.zip
Downloading smali
Extracting services.jar
Removing throttling files
Rebuilding ROM
Cleaning up
$ md5sum *
e9fe72b9e252a7319cee4db08ecfb957 services.jar
8028c0a9cdf9ce87329834af70496fdc services.jar.backup
e117d83e943328d6dc8d2ddfa428ee72 TheOfficial_G2_v2.14.1_update.zip
bc77d320aa79d95b90d2a0a17adb84a8 unthrottle.sh

Newbie question. What is "wget" and do I need to have (un)zip and java installed on my phone or computer?
And will this allow me to use my mobile network setting still?
Sent from my HTC Vision using XDA App

Related

[Guide] Android Cooking Guide for HD2 [Guide]

heartsurfer008 said:
Well I am desparetly trying to cook a NAND build for my HD2 but there is pretty much less info available for me [a big NOOB in cooking] to try out my luck at cooking..!!!
So I'll appreciate if someone would put some light on it..!!!
PS: - I would appreciate if somebody can provide a detailed info..!!!
Click to expand...
Click to collapse
Finally the tutorial
Make your own Android Build for the HD2 by domineus ​I have always lived by these words- if you give a man a fish, he can eat for a day; but if you teach a man to fish you can eat for a lifetime. Android on the HD2 has always been an interesting thing for me and I know a lot of people that want to create their own builds, but have no idea how. If you ask a build creator or maybe someone in the htc-linux-chat how to get started, there may not be an answer. In fact, some of the perplexing behavior has left me puzzled in several ways - as if how to get an android build is a vaulted secret of knowledge like the holy grail. To be honest, it's not. It's a bit of hard work, a few nods in the right direction, and ultimately it's a community involved project. Just like miui development is a community project spanning actual continents to get this thing on our device every single week! It has led to a lot of questions, in my inbox, of how to begin. For a long time, the answer to the question was not answered until Cass helped me out. I want to do the same and contribute how to get a build of miui (or any android build) to the HTC HD2.
Things you will need
In order to properly start android development, it would be a good idea to make sure you have the following (a lot of it is no duh when you think about it)
A computer running linux
I can't stress that enough. While there is a lot of things you can do in windows, you will need some sort of linux distro in order to get android properly running on your HD2. There are a lot of linux distros you can use; with many using ubuntu as it is the most user friendly. I use Fedora and I am quite happy with the results. It's simple and effective. It gets the job done. Get a distro that you feel can get the job done.
Android SDK - either windows or linux
Android SDK is something that can be freely accessed and downloaded from the following location:
http://developer.android.com/sdk/index.html
It is a developer environment, but probably the most important thing you can use here (for the time being) is logcat. Logcat provides you to visually see the libraries and files working together to get android to work as well as if you run into an issue, it is the first thing you should resort to. For instance, boot reloop? Take a look at your logcat and try again.
A kernel
There are quite a few kernels available for android previously and they are divided into evo kernel or nexus one kernel. Many builders have transitioned to an evo kernel for PPP and a few other nice details but it is totally up to you. I highly recommend hastarin's kernel. For most of the time, it works well. But as you have noted, on MIUI, it hasn't been working as fantastic on other builds.
Donor Files
This is a bit difficult to find because it appears that the files that work best are nexus one builds without CM6.1 modification. So far, only one chef has that and it is tytung's nexus one build. Regardless of whose files you're using (e.g. tytung or darkstone's system which is the preferred choice) you will need a well working android build. You will be pulling several files in order to port.
MIUI itself (well any build honestly just miui is a good example)
This is a given. However, if you download from miui.com you will probably have an untranslated rom with odex files. That's bad. And in Chinese! It would be a good idea to browse the English forum for a deodexed rom with appropriate english translation (apps and frameworks)
-If pulling files from windows, you will need this
system extractor
http://uranus.chrysocome.net/linux/explore2fs-old.htm
I use that if I download in windows. It's relatively straight forward and it allows you to pull the files you need from the system.ext2 you're using and copying them to folders necessary.
build.prop
This you will need. You can find one here:
http://www.multiupload.com/B59IU3S6XY
Patience
Probably the most important thing. One thing I have noticed is you need patience to make it through. Sometimes, your build works, sometimes it doesn't. And it is difficult to still keep going. But gotta pull it all in and keep trying...it does pay off.
Okay so you have your files, a nice linux distribution, your build you want to port (MIUI preferrably) and you're ready to go. Now it's time to begin the process!
Step One - The Setup
I usually grab my files in windows before transitioning to my linux distro to finish the process. If you using windows 7 and you are using explore2fs, you will definitely have to right click on the exe and make it compatible by selecting compatible with windows vista. The file should also need to be run by administrator. If you don't know how to do that you can google compatibility in windows 7.
First thing is first. Create a new folder, you can call it donor_files if you want because name is arbitrary. The most important thing is to just name it. Within that folder, create a new folder called system. Enter the system directory and create a new folder called etc. Within etc, select Once that is done, create a new folder within etc called firmware. Once completed, return back to the system folder, create the folder called lib. In the lib folder, create a new folder called hw. So your folder should look like this:
Folder Name
-system
--etc
---firmware
--lib
---hw
So far so good? Excellent. Now, if you're in windows you will need to do a few things. Extract the system.ext2 of your donor build and place it somewhere you will remember (like your desktop). Now open up explore2fs, select file, and open image file. Under files of type (drop down), select all files and navigate to your system.ext2 file. You should now see the ext loaded on the left side of the program's workspace. Located is a very small + that allows you to view all directories in your ext2 file. Click that.
You will see several system folders on the left and files on the root. Since you haven't selected a specific folder, in the right hand view, you should see the file build.prop. If you did select a folder (like app) you will see some files. And that's okay too. Get a feel of the program.
Now you will do a test file pull. On the left hand side, select the folder etc. On the right window, you will see several files. We want AudioBTID.csv. Once you see the file, right click on AudioBTID.csv and select export file. Navigate to the donor file folder (or whatever you named it) and place the file in system/etc of that folder. Congratulations you just pulled your first file! But you will need a lot more files. Within the same directory, pull gps.conf, hosts, media_profiles.xml and the ppp folder. Now, navigate to firmware and pull the following files:
BCM4329B1_002.002.023.0360.0362.hcd default_france.acdb htcleo.acdb
BCM4329B1_002.002.023.0436.0439.hcd default_nel.acdb yamato_pfp.fw
bcm4329.hcd fw_bcm4329_apsta.bin yamato_pm4.fw
default.acdb fw_bcm4329.bin
Ideally you should not be able to find htcleo.acdb. You can find it here
http://gitorious.org/xdandroid_leo/q...eo/htcleo.acdb
Now in explore2fs, go to the lib directory and pull these files and place them in your lib directory:
libcamera.so
libcamera_client.so
libcameraservice.so
libhtc_ril_wrapper.so
libmm-omxcore.so
liboemcamera.so
libomx_aacdec_sharedlibrary.so
libomx_amrdec_sharedlibrary.so
libomx_amrenc_sharedlibrary.so
libomx_avcdec_sharedlibrary.so
libomx_m4vdec_sharedlibrary.so
libomx_mp3dec_sharedlibrary.so
libomx_sharedlibrary.so
libomx_wmadec_sharedlibrary.so
libomx_wmvdec_sharedlibrary.so
libOmxCore.so
libOmxVdec.so
libOmxVidEnc.so
libqcomm_omx.so
libstagefright_omx.so
Once those files are pulled, navigate to the hw folder of the system and pull the following files:
sensors.htcleo.so
lights.htcleo.so
Once those files are pulled, you can save your donor files to a flash drive and then boot into your linux distro. Login to superuser in terminal. For fedora, the proper method involves typing in su --login and entering your password you set up. Minimize your terminal window.
Extract the miui (or any other build) to your desktop (the focus is the system folder). Ensure the rom is deodexed and in your own language (if its miui, you will have to apply the proper language translations). Now copy the files you pulled from your donor build and apply it to the appropriate folders (usually a copy and a paste-literally). In this instance there will be duplicate files, overwrite them. That's the point! Do not forget the build.prop file I linked to earlier. You should add that to system folder.
So the files are copied, the next step is to restore the minimized terminal window (the one that is logged in as root). cd to where your system is located (not to the system folder itself). Now you will have to enter the following commands in terminal
chmod -R 777 system/etc
chmod 755 system/bin/*
chmod 755 system/xbin/*
rm system/etc/firmware/default*acdb (if you have sound in call issues)
touch system/etc/ppp/active (If you have latest wrapper and need ppp)
chown root:2000 system/bin/pppd
chmod 4755 system/bin/pppd
chown root:root system/xbin/su
chmod 4755 system/xbin/su
chown root:root system/xbin/hci*
chmod 4755 system/xbin/hci*
dd if=/dev/zero of=system.ext2 bs=1048576 count=256
mke2fs -F system.ext2
sudo mount -o loop system.ext2 /mnt2
cp -rp system/* /mnt2
sudo umount /mnt2
A few words on this that I must bold. the /mnt2 directory may not exist. If not, try mnt, that usually works
Once this is done, you will have a nice system.ext2. The only thing you'd need now is a rootfs, a kernel, clrcad.exe and a startup.txt file. Once that is done, you can test your build out.
Any questions
Special thanks to Cass and the htc-linux-chat for the few pointers they gave me.
The guide is by "domineus - http://www.miui-dev.com/" & I take no credit what so ever​
Thanks to "white-energy" for giving us the link..!!!
Hope to have many more Chief's for our HD2, so that we [especially me] can satisfy our hunger to try different builds/ROM's..!!!
Happy Cooking..!!!​
PLEASE PRESS THANKS IF YOU FOUND THIS THREAD USEFUL..!!!​​
+ 1... nobody wants to share information?
I don't know if this help but you can try
http://forum.xda-developers.com/showthread.php?t=897940
These kind of thread pop up once in awhile, but it's going no where, I've never seen well known chef show up in this kind of thread.
knowledge is power, maybe they dont want to share the power
Can anybody out there give us a step by step guide for cooking a NAND ROM for HD2..???
http://www.miui-dev.com/forums/showthread.php?481-Howto-Make-your-own-Android-Build-for-the-HD2
Instead of making a ext image, you should make a yaffs image.. so it can work on Nand
white-energy said:
http://www.miui-dev.com/forums/showthread.php?481-Howto-Make-your-own-Android-Build-for-the-HD2
Instead of making a ext image, you should make a yaffs image.. so it can work on Nand
Click to expand...
Click to collapse
Thank you, please check post 1..!!!
I've been looking for something like this. I want to create my own build for the recovery flasher. I guess the only thing needed would be how to convert from regular nand to recovery.
Thanks bro.
velayo said:
I've been looking for something like this. I want to create my own build for the recovery flasher. I guess the only thing needed would be how to convert from regular nand to recovery.
Thanks bro.
Click to expand...
Click to collapse
I was lookin for the same & credit goes to domineus & white-energy
& "white-energy" comes up with a NAND ROM..!!!
Congrats..!!!
white-energy said:
http://www.miui-dev.com/forums/showthread.php?481-Howto-Make-your-own-Android-Build-for-the-HD2
Instead of making a ext image, you should make a yaffs image.. so it can work on Nand
Click to expand...
Click to collapse
Are you sure its the only difference? Are the nand drivers stored only in the bootimg/initrd and not somewhere in the system.img?
yes or no will do for me thx
Is there a way to edit system.bin files, that comes with the NAND builds. I suppose that is where the ROM is. I want to unpack, edit the included apps and repack. How it is done? How the bin file is done. Google does not give any satisfiable links, did a quick search, though...
i am confused
Which explore 2fs do I download? There are 3 different ones one for binary one for code and optional update source code. I am a noob and tired of not having roms I am happy with. I have windows 7 and xp. I realize this will take time and I am good with it everything thats worth anything takes time.
deckoff said:
Is there a way to edit system.bin files, that comes with the NAND builds. I suppose that is where the ROM is. I want to unpack, edit the included apps and repack. How it is done? How the bin file is done. Google does not give any satisfiable links, did a quick search, though...
Click to expand...
Click to collapse
I think you mean system.img not system.bin
You can extract them with the unyaffs.exe or with the unyaffs command under linux. I have written a guide with attatched utilities here
Additionally birksoffsjunk (seasoned WM guru & chef of ChuckyDroid, ChuckyROM, & Dexter) has made a batch program to make this process easier. It's a work in progress & somethings are still buggy so follow the thread
Between the utility birkoffsjunk made & the tutorial I wrote you should be able to successfully edit & run your own build. Hope this helps.
deckoff said:
Is there a way to edit system.bin files, that comes with the NAND builds. I suppose that is where the ROM is. I want to unpack, edit the included apps and repack. How it is done? How the bin file is done. Google does not give any satisfiable links, did a quick search, though...
Click to expand...
Click to collapse
I think you mean system.img not system.bin
You can extract them with the unyaffs.exe or with the unyaffs command under linux. I have written a guide with attatched utilities here
Additionally birksoffsjunk (seasoned WM guru & chef of ChuckyDroid, ChuckyROM, & Dexter) has made a batch program to make this process easier. It's a work in progress & somethings are still buggy so follow the thread
Between the utility birkoffsjunk made & the tutorial I wrote you should be able to successfully edit & run your own build. Hope this helps.
anyone know how to edit or anything about initrd.gz?
hnamanh said:
anyone know how to edit or anything about initrd.gz?
Click to expand...
Click to collapse
It's an archive that can be decompressed and edited thru linux.
White-Energy use system.bin in his rom
Regarding initr and zimage, there is a guide that you can point me on ?
Thank you
KillaHurtz said:
I think you mean system.img not system.bin
You can extract them with the unyaffs.exe or with the unyaffs command under linux. I have written a guide with attatched utilities here
Additionally birksoffsjunk (seasoned WM guru & chef of ChuckyDroid, ChuckyROM, & Dexter) has made a batch program to make this process easier. It's a work in progress & somethings are still buggy so follow the thread
Between the utility birkoffsjunk made & the tutorial I wrote you should be able to successfully edit & run your own build. Hope this helps.
Click to expand...
Click to collapse
I have only green HTC
Hello
I would like to use Android on my HD2. I was searching and testing many ROMS but I didn´t find any rom which is usable for me. I would like to have a ROM that is without Sense, has Multilanguage support and is on Android 2.2 version.
So I decided that I would make my own.
0) I was reading
HTML:
http://forum.xda-developers.com/showpost.php?p=10291851&postcount=1
and made this procedure.
1)downloaded some ROM from here
2)unpacked this rom in linux with :
Code:
unyaffs system.img
then I got this directories:
Code:
app bin build.prop etc fonts framework lib media usr xbin
3)I downloaded update-cm-6.1.1-N1-signed.zip from CyanogenMod Forum > Downloads > Stable Mod > Nexus One and unpacked. I got : META-INF system boot.img.
4)I copied everything what was described step 0 from directories from step 2 to directory system from step 3
5)I downloaded and copied build.prop from step 0 to system
6) I updated permition like it is described in step 0
7) I created system.img with command : mkyaffs2image . ../system.img
Then I copied this system.img from linux to my windows and put this file in directory in which was different NAND rom. (replaced system.img). After that I flashed my phone and it did not work. Screen was frozen after booting and only green HTC was on display.
Can somebody please help me and give me some advice or some small howto. Does anybody know what can be wrong?
Thank you
Michal Fichtner
I appreciate the guide but damn that is hard to read. It really needs some sort of structure to it, titling proper paragraphs etc.
Hi,
it is possible to combi the dropdown energy widget froom miui and the gingerbread lockscreen into Desire HD Build?
Thats was awesome !
Sorry for my bad english

built in htc [FM TRANSMITTER] dev needed.

this is an older tutorial i found for the evo way back. it needs to be updated..
this could possibly work on other android htc phones to that have the fm transmit capability....
the evos Broadcom chip has a built in fm receiver and also a transmitter.
according to some threads and diagrams ive seen the transmitter does have a power source, it just doesnt have and software code to actually work.
like hdmi the hardware was there but there was no code set up, therefore we didnt have full hdmi out. it had to be built from scratch.
the hardware for the fm transmitter is there we just need some one to build the code for it.
some one please take this on!!
This tutorial was originally posted in > android development and hacking > android software development.
i am reposting it here in the evo forums for guidelines
its a nice tutorial but its old. i think it was for android 2.0 ive followed the tutorial but i couldnt get it working, and i by no means have the experience to switch things up and get it working.
[TUTORIAL] Reverse engineering HTC FM Radio for noobs (on EVO 4G)
Okay, I'm writing this because I want to help any other newbies trying to learn how to reverse engineer. The technical details involved in this are extremely daunting, so the purpose of this tutorial is to first explain in layman terms exactly what you're trying to accomplish and what to expect. Then we'll go over the details. That way you're not completely blind going into this. I'm fairly new to the scene, so I'm not as knowledgeable as everyone else. If you see any errors in my post, let me know so I can change. I'm going to assume you know a little bit of Java, can find your way around a computer, and know nothing about Android. The techniques used should work with other Android phones. For this tutorial I'm using Windows 7, Cygwin, and my stock (not rooted) EVO 4G mobile phone.
The FM tuner for the Evo is run by a Broadcom chip: BCM4329. This chip is pretty amazing in that it does wireless, bluetooth, and it has an FM receiver/transmitter. We're interested in the FM receiver / transmitter.
Now, all android phones are based on a Linux kernel. Basically they're Linux running computers. The Android operating system is then installed onto the linux system. Every app is then run off of Android.
Android is based on Java but it is not a Java system. It uses a virtual machine called Dalvik. Google did this to get around licensing issues with Sun Microsystems. So they pretty much invented their own machine language (called byte code) for the Java language. This makes things complicated for the reverse engineer because from what I've read, once Java is converted into this machine language or byte code, it can't be converted back.
So let's rehash.
If you were programming strictly in Java, you would see these extensions:
Java source code = .java
Compiled Java source code = Java byte code = .class
Compressed file to package your program = .jar (Java Archive)
But since you're programming in Android and Dalvik, you will see these:
Java source code = .java
Compiled Java source code = Dalvik byte code = .dex
Compressed file to package your program = .apk
(I haven't mentioned this, but HTC further Optimizes their .dex code)
Optimized Dalvik byte code = .odex
I'm writing all of these down because it's very easy to get confused with all of the extensions. (for me at least!). remember how I said once you go dex, you can't go back to java? That's where JesusFreke comes in. He's a senior member of XDA, and he created "baksmali" and "smali", two programs that can convert the Dalvik code back into a human readable format. These files have extensions of .smali
Decompiled Dalvik byte code = .smali
But what can you do with .smali files? That's where this other senior member, brut.all comes in: He developed apktool. apktool takes JesusFreke's work to the next level. This program in conjunction with NetBeans, actually lets you trace through any program using the .smali code taken from JesusFreke's programs!
apktool does this by converting those .smali files into "fake" .java files that can be used by the NetBeans (program that compiles and makes java programs) IDE. I say "fake" because apktool embeds the .smali code into java files as comments. However, once you attach a debugger to NetBeans, you'll see that the debugger will follow line by line every execution statement found in the smali code!
So...... you can take the program you want, plug it into Net Beans using a debugger (using the default ddms command provided by Android SDK), and you can trace everything you do in the program. I have it connected to my phone, so whenever I push a button while running my HTC FMRadio app or unplug my headphones,I see the corresponding response to the HTCFMRadio code I have loaded in NetBeans. I can now see in real-time how the program operates from my own interactions... JAM.
Technical Aspects: How to get from ground zero to tracing HTCFMRadio?
1.) Download Android SDK - Go to google development site and follow instructions: Make sure to download the latest Java JDK. Once that is installed, download NetBeans 6.8. Unfortunately, smali debugging does not work with the lastest versions of NetBeans.
Download the "Java SE" version for minimal space
http://netbeans.org/downloads/6.8/index.html
You can follow the rest of Google walkthrough and download Eclipse and ADT plugin, but it's not pertinent to this. You're going to be using adb and ddms from the android SDK extensively, so make sure the path for </android SDK/tools> is included in the PATH variable in your ENVIRONMENT SETTINGS. To get here, right click My computer, click properties, Advanced Settings, ENVIRONMENT SETTINGS.
2.) Search for 7z and download it. It is an awesome and free compression tool that will be extremely useful. It can be used to "unzip" .jar, .apk, and other compressed formats.
3.) Get the Radio app. You can do this by going to "shipped-roms" website, downloading the latest Supersonic image, and following the directions in the unlockr tutorial for HTC kitchens at the unlockr website... (once you have extracted the files from the image, you can look in the system/app and system/framework directories to get the files listed below) or:
you can pull the following files from your phone:
Using the command prompt type (and with phone plugged in, and with USB debugging enabled on phone):
adb pull /system/app/HtcFMRadio.odex
adb pull /system/app/HtcFMRadio.apk
adb pull /system/framework ./framework
This will put HtcFMRadio.odex and HtcFMRadio.apk in the current directory and create a framework directory with more files. A couple of the files in the framework are needed for the HtcFMRadio app, but for simplicity, we're just going to pull the whole directory.
Now that we have the files, we have to make a few changes to make the app installable and to be viewable by the debugger. To do this we have to decompile the .odex format into a human readable format we can edit. That brings us to:
3.) Download baksmali and smali from Project Hosting on Google Code (google search smali).
Usually an Android application is made up of one file, an apk file. Inside the apk file is an AndroidManifest.xml file, a classes.dex file (compiled Java code for the program), and other folders. The other folders contain either graphics or other .xml files that tell the program how it should look to the user. We don't have to worry about those for now. This is important because APKTOOL only opens programs set up this way. But wait up? We didn't download one .apk file, we downloaded an .apk file and an .odex file! What gives? Well, if you right click the apk file and open it (using 7z), you'll see that it's missing the classes.dex file. The dex file for the app is actually the HtcFMRadio.odex file we downloaded. So, to make this system app more like a nominal app, we have to find a way to convert the HtcFMRadio.odex to a classes.dex file. That's easy with baksmali and smali!
Once you download goto command prompt and type:
java -jar baksmali-<version>.jar -d framework -x HtcFMRadio.odex
(Remember to match baksmali-<version>.jar with the filename of baksmali you downloaded)
If done correctly, you should see a newly created \out directory
This creates an out\com\htc\fm directory with many .smali files.
Now let's reverse the process and put it back as a dex file. Type at command prompt:
java -jar smali-<version>.jar out -o classes.dex
If done correctly you'll see a newly created classes.dex.
now, right click on HtcFMRadio.apk (select 7z and open). Drag classes.dex into the file. Say yes to the prompt. Now you have a normal apk file APKTOOL can read!
4.) Download APKTOOL from Project Hosting on Google Code and the helper apps for your OS. (If you're extracting files for windows OS you should have apktool.bat and aapt.exe). Extract (again using 7z, don't you love this program?) apktool.jar (keep it as a jar file, don't extract the stuff inside of it), apktool.bat, and aapt.exe to the directory you're working on. To make things neat, you can also delete HtcFMRadio.odex (you don't need it anymore) and classes.dex (make sure you put it in the HtcFMRadio.apk file first!)
If this is the first time you're using apktool, then you have to install the htc framework so apktool can baksmali the Radio app. You only have to do this once:
apktool if ./framework/com.htc.resources.apk
Alright, at the command prompt:
apktool d -d HtcFMRadio.apk
This extracts the contents of HtcFMRadio.apk and places them in the HtcFMRadio directory. However, there are two major differences between this content and the content created in step 3. If you go into the smali directory you'll see that instead of .smali files, you'll see .java files. And if you go back and edit the AndroidManifest.xml file, you will also see that it's in text! Android applications convert their xml files to binary format. Now that APKTOOL has converted everything to an IDE friendly format, we can use NetBeans to edit everything. The first thing we're going to do is edit AndroidManifest.xml (using notepad) and add the following:
android:debuggable="true" to the Application tag.
IT should now look like this:
<application android:theme="@android:style/Theme.Black.NoTitleBar" android:label="@string/fm_app_name" android:icon="@drawable/fm_radio" android:taskAffinity="android.task.fmradio" android:description="@string/htc_corp" android:allowTaskReparenting="true" android:debuggable="true">
This permission lets the debugger watch the program while it's running on the phone.
We are going to run into two problems if we try to install this program. One is that Android doesn't let you install more than one copy of a system app. The second issue is that if we change the signature of our system app, then we'll have to change the signatures of our other system apps as well! Ahh.... So, to get around that, we're going to trick Android into thinking we have a completely new program. We're going to do that by renaming the com.htc.fm class to com.htc.modradio class. Next step:
5.) Cygwin (or Linux virtual machine)
The easiest way that I can think of to replace strings in multiple files is by using linux. You can most definitely do it in WIndows, but I dont know how. If you let me know how, I can put it in this tutorial.
(update: you can use Notepad++ to easily find/replace strings in multiple files for Windows. You still, however, want to download Cygwin if you're going to develop with Android-NDK.)
For now, just search for Cygwin (Cygwin is a program that lets you run Linux commands from a command prompt using your Windows directories), and install it. Make sure to have the Perl option selected. You'll need Perl to make the following commands work.
Once you get Cygwin up and running
cd <to your HtcFMRadio directory>
in my case it's
cd /cygdrive/c/Users/Jerry/Desktop/HtcFMRadio
now type the following commands in this order:
this command changes all occurances of htc/fm to htc/modradio in your xml and .java files.
find ./ -type f | xargs perl -pi -e 's/htc\/fm/htc\/modradio/g'
this command changes all occurances of htc.fm to htc.modradio
find ./ -type f | xargs perl -pi -e 's/htc.fm/htc.modradio/g'
If you don't follow this order, your source code will get messed up.
If using cygwin, a bunch of .bak files will be created. Using windows search, find all .bak files in your HtcFMRadio directory, then select them all and delete them (Make sure they are only files with .bak!)
Now just rename the fm directory to modradio. It is located in HtcFMRadio/smali/com/htc
Now go to your windows command prompt and type:
apktool b -d .\HtcFMRadio modradio.apk
Now sign and install modradio.apk on your phone.
adb install modradio.apk
If you have never signed before, then you need to use keytool and jarsigner. These two files are in your JDK directory, so make sure you include your JDK directory in the PATH variable of your ENVIRONMENT SETTINGS. (To get here, right click on My Computer, click Properties, Advanced Settings, Environment Variables. Once you make change, open up a new COMMAND prompt to see changes).
cd to the directory which has modradio.apk
now type:
keytool -genkeypair
Answer all questions, then use the same password for all password prompts.
Next type:
jarsigner -verbose modradio.apk mykey
Type in the password you created in the above step. Your apk should now be signed.
Next install:
adb install modradio.apk
Success!
6.) Testing the app on phone
Go to your phone and you'll now see a new FMRadio icon next to your first. Click on it and watch it open. It should now be able to play music. Keep it open.
7.) Using Netbeans
Go into HtcFMRadio and delete the build directory created by APKTOOL.
Now open up Net Beans and click on File, New Project, Select Java Project with Existing Sources, click on Next
Select HtcFMRadio directory for Project Folder, rename Project Name to whatever you want. Let's type in ModRadio. click on Next
Next to "Source Package Folders" click on "Add Folder" and select the smali directory.
Click Finish. For a quick tutorial by Brut.all, search APKTOOL in youtube and click on: Apktool Demo 2 - Smali improvements
Right click on Libraries. Click on "Add Jar / Folder". You want to add Android.Jar. Since I have Android 2.1 loaded I went to /platforms/android-7 located in my android SDK directory.
Your project is now ready for editting!
8.) Running the Debugger to trace through program.
Next go back to Windows command prompt and type ddms. This runs the Dalvik Debug Monitor. A window should open up. In the left hand side you should see com.htc.modradio. That's our app! To the right you're going to see 2 numbers, you're interested in the one to the right, 4 cells away from com.htc.modradio. This number is a port number, and you're going to use it to communicate with NetBeans. (In my case it is 8603)
Go back to NetBeans and click on Debug, Attach Debugger.
In the host field type: localhost
In the Port field: type in the second number you saw. (8603)
If everything is working you'll see a bug appear next to com.htc.modradio in the Dalvik Debug Monitor. Look at the bottom bar of NetBeans for feedback. If you get errors make sure the numbers match, or try port 8700 and make sure you select com.htc.modradio in the Dalvik Debug Monitor. Port 8700 is the default port used for whatever program you select in Dalvik Debug Monitor.
9.) Setting a breakpoint
I'm making this a seperate step because it is completely arbitrary. When creating a break point be sure to follow this rule:
You must select line with some instruction, you can't set breakpoint on lines starting with ".", ":" or "#".
Rather than looking for a spot to breakpoint, though, I'll tell you where to put one so you can quickly see how the debugger traces through the code. You aren't "REQUIRED" to do the next step, but if you want to trace you have to put a breakpoint somewhere.
In Net Beans click on the Project tab, click on Source Packages, com.htc.modradio, and then doubleclick on BroadcomFMTuner.java
We're going to insert a breakpoint. Scroll down to line 3226 and on your keyboard press: CTRL-SHIFT-F8, select line in dropdown box and hit ok. (To keep it simple, I usually look for "invoke" instructions to set breakpoints at)
Now go to your phone and click on the physical "back" button on your phone. This will clear the radio,(you should still be able to listen to music). Drag your status bar down. You should see a radio icon. Click on it again. The radio backgroudn will appear, but you wont' see any text or anything. Now go back to your netbeans application. You should now see debug options highlighted! Click on Step Over (F8) to step through!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i found a few things.
http://pdf.eccn.com/pdfs/Datasheets/Broadcom/BCM4329.pdf
http://www.broadcom.com/products/Bluetooth/Bluetooth-RF-Silicon-and-Software-Solutions/BCM4329
Mad tutorial man! You have just opened up my world even more to Android. Thank you heaps.
BTW your freakin signature got me good damn you! I thought someone had hacked my PC LOL
Any chance that this will work with JB?. Can you post app?. Thanks.

[Q] How to modify and replace framework-res.apk

Hello
I changed some png images with 7zip and copied back to system/framework/ but i got boot loop.
I would like to know how to modify and replace .apk that will work normal?
Thanks
How exactly did you replace the png's? Because the 'normal' proces of unzip-replace-rezip doesn't work.
The most easy way to changes png's:
1. Open framework-res.apk in 7-zip
2. Search for the files you want to change and copy them to your hard disk (do not unzip!!)
3. change the files. Make sure the name stays EXACT the same.
4. Open framework-res.apk and copy your new files in the desired place. By doing so, the original files will be replaced by your files. DO NOT USE ANY COMPRESSION (if asked select 'store').
5. Go into recovery, mount /system and replace the framework-res.apk by the new one. Reboot phone.
Take home message: never unzip
Hope it works now!
Erwin
i went to recovery and hit mount/system. But how can i replace it?
Thanks
urkotheone said:
i went to recovery and hit mount/system. But how can i replace it?
Thanks
Click to expand...
Click to collapse
You have to use adb to do is. I assume you know how to work with it. If not, you have to search for a little tutorial (can't link you right now because I'm using the xda app)
Put the new framework-res.apk in the same folder as adb.exe. Open the command prompt and brows to that same folder. Type in your command prompt:
Code:
adb shell mv system/framework/framework-res.apk system/framework/framework-res.old
adb push framework-res.apk system/framework
adb reboot
Due to the first command, you have a backup of your original framework-res.apk. To restore it, you have to boot in recovery, mount /system and again by the use of the command prompt, type:
Code:
adb shell rm system/framework/framework-res.apk
adb shell mv system/framework/framework-res.old system/framework/framework-res.apk
adb reboot
Erwin
Yeeeeey i did it
Thank you
One more problem
When discharging it's working, but when I charge phone i don't get no battery icon. I believe it's because in original framework i had 100 png animations for charging and now i have only 20. Is there a way to fix this?
urkotheone said:
One more problem
When discharging it's working, but when I charge phone i don't get no battery icon. I believe it's because in original framework i had 100 png animations for charging and now i have only 20. Is there a way to fix this?
Click to expand...
Click to collapse
Then it is going to be much more complicated than that. Perhaps I can explain you in more detail tomorrow, but you will have to look up some things for yourself.
First, you should decompile the framework-res.apk first using apktool. You will notice that it almost looks like it just dezips your apk, but when you look closely, you will see now that you can open and read the xml files.
Second, you have to open res\drawable\stat_sys_battery.xml (or something similar, perhaps it depends on your ROM). Try to understand what is written and make some changes (it is really not that hard) so that your system shows only 20 different images, in stead of 100.
Third, you have to recompile your modified framework-res.apk. Then pull stat_sys_battery.xml out of "your" framework-res.apk into the original framework-res.apk, but again, without unzipping one of them. Do, of course, the same thing with your images.
I must admit, I've been busy with the battery icons myself. It was my plan to do something similar like you did, but I didn't do it yet. So all the things I've written above where the things I was planing to do, but I don't know if it will work, as I never tried it myself. So please, keep me/us informed ;-)
Good luck!
EDIT: I used this site to know how to decompile apk's.
This is an old thread but I wanted to edit my systemUI.apk file with changing out a couple images... if I was to upload the file I edited (by just swapping out the images) to the UOT kitchen and use a mod, say the battery mod, would it make the file usable on my phone or would I get a bootloop or worse?
Basically what I did was opened up the SystemUI.apk file using 7zip and just swapped out the images I wanted (making sure I saved the original ones of course). I didn't unzip/zip anything.. I just opened it using 7zip and then closed it. It didn't ask me if I wanted to save anything though??
Sorry for the stupid question... but I thought it would be an idea as I want to use the UOT to make a mod to the theme I have anyways.
crazy_dragonlady said:
This is an old thread but I wanted to edit my systemUI.apk file with changing out a couple images... if I was to upload the file I edited (by just swapping out the images) to the UOT kitchen and use a mod, say the battery mod, would it make the file usable on my phone or would I get a bootloop or worse?
Basically what I did was opened up the SystemUI.apk file using 7zip and just swapped out the images I wanted (making sure I saved the original ones of course). I didn't unzip/zip anything.. I just opened it using 7zip and then closed it. It didn't ask me if I wanted to save anything though??
Sorry for the stupid question... but I thought it would be an idea as I want to use the UOT to make a mod to the theme I have anyways.
Click to expand...
Click to collapse
I don't know if I understand you fully, but I believe it would: only if the UOT changed the images that you have changed, you will not see the things you have changed.
What I did some time ago was upload my framework en systemui to the UOT, apply the battery mod and than change the battery images with my own. I did that just by opening the apk in WinRAR and adding my images, just like you did.
But if you only want to swapp some images, there is no need for uploading it to the UTO. Just continue as you did. Just make sure that you keep the original systemui.apk on your hdd. In case of a bootloop, you can easely revert.
Is that een answer to your question?
Erwin
Yes, it does.. and thanks. I ended up following the instructions on another thread I found on here... don't remember exactly which one but it basically omitted uploading the files to the UOT. It was a guide on how to theme your phone... sorry but I didn't save the link.
thanks again!
CDL.
urkotheone said:
Hello
I changed some png images with 7zip and copied back to system/framework/ but i got boot loop.
I would like to know how to modify and replace .apk that will work normal?
Thanks
Click to expand...
Click to collapse
Same thing happened to me!
I Wiped Cache, Dalvik Cache, but nothing happened!
I had to flash 2.3.6 Stock ROM via Odin, to make my phone work!
I always work with Winrar, and in there you have the option for compression, which is selected at "medium compression" by default, and that causes bootloops.
So make sure that you don't compress your apk when adding your new png, or it will not work.
Erwin
I change my framework-res.apk from another rom. the problem is when I push long power button, my device going to BOOTANIMATION with out I choose shutdown, restart n etc.. what's wrong with my device??
sorry for my bad eng..
The problem is its another roms framework so things are in different places and some things will be missing, put the framework-res.apk from your rom back and things should go back to normal, mind me asking what tweak or mod you are after using?
Sent from my HTC Wildfire using xda premium
first time I must say sorry, I know this not my device place on XDA, I use MB525.. but I see the same problem here..
I use Ms3ginger mod rom by walter, n I take framework-res.apk from 2.3.6_4.5.2-109 DHT25_themed MultiLanguage, I try to change battery sys-stat but I get bootloop..
once again sorry for my bad eng
If not possible try
Adb remount
First

[Q] Can I get a li'l help w/ merging diff framework-res.apks?..

'K, so'm new 2 android hacking, but I'd like 2 make a framework-res.apk that includes StarBurst's MotoBlur x-itions here, SAShady's CRT Off animation here, & Gingerbread's Overscroll & MotoBlur Orient8ion animations when they become available. How would I go about merging the MotoBlur x-itions w/ the CRT Off animation, as they're both framework-res.apk files? Also, where mite I extract Gingerbread's Overscroll & MotoBlur Orient8ion files, is it from a stock Gingerbread framework-res.apk & MotoBlur (possibly Photon 4G) framework-res.apk? &, how would I know which files 2 extract? Are there any particular s/w tools that I need?
Thnx.
That's going to be a bit of work. I just went through the learning process of decompiling, modifying, and recompiling .apks myself. I don't have the most efficient method down yet, but I can get you started.
First up, are you using an odexed or deodexed ROM?
Thnx 4 the help.
Sycobob said:
...I just went through the learning process of decompiling, modifying, and recompiling .apks...
Click to expand...
Click to collapse
I'd really dig a link(s) to these resources. &, I'd b usin' the Stock ROM, which I'd imagine is odex'd.
EDIT: Man do I feel foolish. I just typed out way more than I needed to, thinking framework-res.apk was odexed. *sigh*. Oh well, I guess I just started the tutorial I was thinking about posting.
This won't be too hard:
Pull your stock framework-res.apk from /system/framework/.
Gather the other modded .apks
Decompile each of the .apks (luckily framework-res.apk doesn't rely on other stuff, so decompiling is easier)
Drag the modified file(s) from one of the decompiled, modded .apks to the stock one overwriting the old file(s)
Repeat for each mod
Recompile the new uber-modded .apk
Push it back onto your phone
Decompiling
You're going to need Apk Manager for decompiling and recompiling.
Place the .apks you want to decompile in the 'to be modded' folder of Apk manager
Run the script in the Apk Manager folder
Enter 22 to 'Set Current Project'
Pick the .apk you want to decompile
Enter 9 to decompile (no dependencies)
Repeat 3-5 for each .apk
Recompiling
(In Apk Manager) Enter 22 to 'Set Current Project'
Enter 11 to compile
Enter y (this is a system app)
Enter y (I haven't been able to get it to work when I answer no here)
Follow the prompt and delete the files you've modified from the 'keep' folder
Go back to the command prompt and press a key to continue
As for actually finding the changes, you're on your own here. I guess you can look for files with different sizes/modified dates or try to search the forums to see if people mention what they had to change for the mod. If two mods change the same file, you're going to have to open the file and make both sets of changes then toss it into the .apk.
Pro tip: if you have Eclipse set up with the Android SDK, you can go to Window > Preferences > XML > XML Files > Editor and check "Split multiple attributes each on a new line" so that when you hit Ctrl+Shift+F while looking at the messy decompiled .xmls it will instantly format it into a more easily read form. <--This is why I love Eclipse
If you don't know how to push the file back into place, it's a bit of a pain without a modded boot.img that allows you to use 'adb remount'. Copy the .apk somewhere on your phone. From command prompt (with phone plugged in):
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /wherever/your/file/is/framework-res.apk /system/framework-res.apk
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
Unless you have CWM and know how to write/reuse an update.zip.
Thnx, Sycobob. I'm just afraid that there'll be an overlap in overwritten files. But'll c.
Sycobob said:
...and updating the archive...ext3
Click to expand...
Click to collapse
&, what d'ya mean by upd8ing the archive, is it signing? Also, I'd thought all of the E4GT partitions were ext4. Didn't even activ8 my E4GT, 'cause'm still tryin' 2 get my TP2 repaired, so I can flip it. Maybe u can help me w/ another Q - I've been lookin' all ovr 4 info on android OS, &'ve been able 2 find what each partition is, using adb cmds, but cannot find, 4 the life of me!, a glossary of sorts on all of androids system files, a la "framework-res.apk is..." I really wanna get n2 android hacking/modding w/o havin' 2 use an app 2 make any & every change that I'd wanna make 2 the OS. Comin' from WiMo, I was very familiar w/ the registry, exploring & hacking it, but there's no real equivalent n android. Also, do go here & vote 4 my Brushed Aluminum Barely There Case with Kickstand suggestion. We're already n 9th place. Thnx again 4 ur help.
System packages don't get signed. By updating, I mean dragging the file into the WinRAR archive which automatically replaces the existing file in the archive, therefor updating it.
All the partitions are ext4. This is where my newbishness shows, I have no idea why I have to use ext3. /dev/block/mmcblk1p21 isn't the correct path either, but it works. In one of ptfdmedics posts he uses the same options. If I use the 'correct' mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system it doesn't work. *shrug*
Also, I just realized something I missed in my first post. If you modify an .xml the resources.arsc in the .apk needs to be regenerated. This is done when you decompile and recompile the package. I'll be editing my previous post to reflect this.
As far as a glossary, I have no idea where to find one. I would mind having access to something like that though. If you find something, please post it.
EDIT: don't worry too much about overlap. I'd imagine it'll be easy to find the changes you need to make, then you can just copy+paste the relevant lines. Pro tip: if you have Eclipse set up with the Android SDK, somewhere in Window > Preferences > XML > XML Files > Editor > Check "Split multiple attributes each on a new line" and when you hit Ctrl+Shift+F while looking at the messy decompiled .xmls it will instantly format it into a more easily read form. Adding this to previous post.
Thnx, 4 all of ur help. I've got a lotta wrk ahead of me 2 experiment w/ this stuff. Now, just gotta find the time.

ROM Building: The Basics Part IIII

Welcome back everyone,
We are in knee deep waters now, probably committed and ready to get going on the last of set of tools that need to do some serious modding.
If you are not up to speed, please go to Part I, Part II and Part III.
Get up to speed on those tutorials first before we continue. Remember, this is not Call of Duty, this isn't even Star Wars, this War of the MegaZord 5. We are in the serious stretch of the basics of modding the final frontier son!
Our target today is to utilize the Smali and BakSmali tools.
As you recall from the previous tutorials, the Smali and Baksmali have been put in our very specific folder
Code:
C:\other\Smali\
So, what does the Smali/Baksmali code need to do for it to work? We will need a JAR file. The JAR is a java archive file. You can also open those files with 7-zip, in each of the JAR files we will look at has a classes.dex file which we will need
Each Jar file in our
Code:
MD4_Version_1\system\framework\
Will have a classes.dex file inside, since the name is the same for all files, this is very tricky to manage unless you are organized so remember that each classes.dex file you take out, you remember where the new one needs to go.
So, lets open the following file in 7-zip,
Code:
android.policy.jar
Take the classes.dex file and place it in the folder where the Smali.jar file is and Baksmali.jar files are.
Now open a command prompt to that location and execute the following code,
Code:
C:\other\Smali>java -jar baksmali.jar -o output classes.dex
You will not receive feedback from this command. Do not stress if it looks like nothing happened, of course coincidentally, a new folder has been created in our folder called output(You can name it whatever you want just trying to keep it simple.
This folder will have a de-compiled set of .smali code that will allow us to modify very critical settings and make amazing mods.
The good news is we have the technology now we need the....wait wrong show,
We have the ability to take any classes.dex file and modify it and we can recompile it and execute a mod perfectly.
To recompile, we will need to execute the following code
Code:
C:\other\Smali>java -jar smali.jar -o newclasses.dex output
This will create a new file called newclasses.dex
We will need to place it inside the android.policy.jar
Of course, take the file and place it on your desktop, rename it to classes.dex and place it in the android.policy.jar and your mods are ready to go.
So that's all you need to do because the signatures cannot be messed with so this is the best way to do it.
Now, to the modding part, we have the tools to do all the mods you can set your furry little thoughts on.
learned how to implement the following with all of the code belonging to their expert makers.
Removed increasing ringtone
Call Record built into phone
Quick Unlock implemented(only reason I got into this ROM modifying because it annoyed me to press OK button to unlock, only thing iPhone got right...lol android wins)
Sounds modified
Default Sounds Set
Free Tethering working
1 percent battery
Removed apps from system/app to reduce clutter
Modified default wallpapers from Samsung
Phone contacts Theming
4 in 1 reboot enabled
No Sound on Camera
TouchWiz default layout
Seems basic enough but it is all I need, sure there are much fancier things to add, but these tutorials are about adding only what you want.
If all of these sound like you need them or want them, I can go into how to implement these. Not sure what the level of interest is at this point from people as these are not terribly tricky but sometimes, the code made from the original developer does not match exactly and then you have to find it and implement it.
Of course, this comes at a great cost to time, as I was working one each mod, I made 17 versions had to back track to version 12 as a mod I implemented had a bug I did not know exists until I did a fresh install.
This happens a lot by the way. The other day, I had Bluetooth on and connected to headset, a call came through, answered it, switched from headset to speaker and phone just turned off, I am sure there is another bug from another thing in another place that I overlooked.
My point is, making any mod will require a LOT of time. I installed each ROM after that glitch to make sure everything worked. I used Titanium Backup to assist me in my endeavor but it was a hassle to change all my settings to what I needed(there is a way to set your settings any way you want as well while working in the ROM)
The thing is, each developer here takes a great deal of time and effort to do this and sure they have the expertise but it was because they got down in the nitty gritty and found a way to make it happen. They also usually do it out of their good will and hearts(well most of the ones I know). It has to be the most inspiring thing ever to find a group of people that are not doing this to make money but they take time out of their lives and help us Nooblets out. I mean it is our super phone we want to modify right? And I want to say thanks to them. I want to say thanks to everyone who I mooched off their code for to get what I need, because without you, I would be on Google doing something unpronductive. Luckily, things started to work and mods made more sense and it is not so intimidating as it once was...of course several hundred flashes later, it better make more sense.
Thanks for everyone who reads this and gains something. This concludes the part of the tutorial I set out to accomplish and that was to get all the tools needed to make anyone a ROM builder(at least modifier).
Team Venum thanks for your great support as always you guys rock, I dabbled with their ROMs when I had an issue with exchange email
The MOAR team who helped me understand ROM structure for their crazy ROM.
loserskater for his quick unlock code which was by far amazing, I still look through the code and think he made it up on the spot.
lmike6453 who got me closer to figuring out loserskater's epic code.
So many more to thank but cant think of where all my research is, guess I should have listened to my own advice and stayed organized.
zalooa said:
Welcome back everyone,
We are in knee deep waters now, probably committed and ready to get going on the last of set of tools that need to do some serious modding.
If you are not up to speed, please go to Part I, Part II and Part III.
Get up to speed on those tutorials first before we continue. Remember, this is not Call of Duty, this isn't even Star Wars, this War of the MegaZord 5. We are in the serious stretch of the basics of modding the final frontier son!
Our target today is to utilize the Smali and BakSmali tools.
As you recall from the previous tutorials, the Smali and Baksmali have been put in our very specific folder
Code:
C:\other\Smali\
So, what does the Smali/Baksmali code need to do for it to work? We will need a JAR file. The JAR is a java archive file. You can also open those files with 7-zip, in each of the JAR files we will look at has a classes.dex file which we will need
Each Jar file in our
Code:
MD4_Version_1\system\framework\
Will have a classes.dex file inside, since the name is the same for all files, this is very tricky to manage unless you are organized so remember that each classes.dex file you take out, you remember where the new one needs to go.
So, lets open the following file in 7-zip,
Code:
android.policy.jar
Take the classes.dex file and place it in the folder where the Smali.jar file is and Baksmali.jar files are.
Now open a command prompt to that location and execute the following code,
Code:
C:\other\Smali>java -jar baksmali.jar -o output classes.dex
You will not receive feedback from this command. Do not stress if it looks like nothing happened, of course coincidentally, a new folder has been created in our folder called output(You can name it whatever you want just trying to keep it simple.
This folder will have a de-compiled set of .smali code that will allow us to modify very critical settings and make amazing mods.
The good news is we have the technology now we need the....wait wrong show,
We have the ability to take any classes.dex file and modify it and we can recompile it and execute a mod perfectly.
To recompile, we will need to execute the following code
Code:
C:\other\Smali>java -jar smali.jar -o newclasses.dex output
This will create a new file called newclasses.dex
We will need to place it inside the android.policy.jar
Of course, take the file and place it on your desktop, rename it to classes.dex and place it in the android.policy.jar and your mods are ready to go.
So that's all you need to do because the signatures cannot be messed with so this is the best way to do it.
Now, to the modding part, we have the tools to do all the mods you can set your furry little thoughts on.
learned how to implement the following with all of the code belonging to their expert makers.
Removed increasing ringtone
Call Record built into phone
Quick Unlock implemented(only reason I got into this ROM modifying because it annoyed me to press OK button to unlock, only thing iPhone got right...lol android wins)
Sounds modified
Default Sounds Set
Free Tethering working
1 percent battery
Removed apps from system/app to reduce clutter
Modified default wallpapers from Samsung
Phone contacts Theming
4 in 1 reboot enabled
No Sound on Camera
TouchWiz default layout
Seems basic enough but it is all I need, sure there are much fancier things to add, but these tutorials are about adding only what you want.
If all of these sound like you need them or want them, I can go into how to implement these. Not sure what the level of interest is at this point from people as these are not terribly tricky but sometimes, the code made from the original developer does not match exactly and then you have to find it and implement it.
Of course, this comes at a great cost to time, as I was working one each mod, I made 17 versions had to back track to version 12 as a mod I implemented had a bug I did not know exists until I did a fresh install.
This happens a lot by the way. The other day, I had Bluetooth on and connected to headset, a call came through, answered it, switched from headset to speaker and phone just turned off, I am sure there is another bug from another thing in another place that I overlooked.
My point is, making any mod will require a LOT of time. I installed each ROM after that glitch to make sure everything worked. I used Titanium Backup to assist me in my endeavor but it was a hassle to change all my settings to what I needed(there is a way to set your settings any way you want as well while working in the ROM)
The thing is, each developer here takes a great deal of time and effort to do this and sure they have the expertise but it was because they got down in the nitty gritty and found a way to make it happen. They also usually do it out of their good will and hearts(well most of the ones I know). It has to be the most inspiring thing ever to find a group of people that are not doing this to make money but they take time out of their lives and help us Nooblets out. I mean it is our super phone we want to modify right? And I want to say thanks to them. I want to say thanks to everyone who I mooched off their code for to get what I need, because without you, I would be on Google doing something unpronductive. Luckily, things started to work and mods made more sense and it is not so intimidating as it once was...of course several hundred flashes later, it better make more sense.
Thanks for everyone who reads this and gains something. This concludes the part of the tutorial I set out to accomplish and that was to get all the tools needed to make anyone a ROM builder(at least modifier).
Team Venum thanks for your great support as always you guys rock, I dabbled with their ROMs when I had an issue with exchange email
The MOAR team who helped me understand ROM structure for their crazy ROM.
loserskater for his quick unlock code which was by far amazing, I still look through the code and think he made it up on the spot.
lmike6453 who got me closer to figuring out loserskater's epic code.
So many more to thank but cant think of where all my research is, guess I should have listened to my own advice and stayed organized.
Click to expand...
Click to collapse
It was nicely done, thanks. :good:

Categories

Resources