[Script] General Backup/Restore CWM script for Flasholic ! - Galaxy Note II Android Development

[Script] General Backup/Restore CWM script for Flasholic !
This is nothing but plain script which backup many commonly used applications to Sd card.
Basically i have made this for my MultiMod user, but I am reading daily new thread by new user, upload this and that as they loss it after flashing mod. Here this will come handy.
It includes backup of following applications/frameworks
SystemUI.apk
SystemUI.odex
SecPhone.apk
SecPhone.odex
SecSettings.apk
SecSettings.odex
SecMms.apk
SecMms.odex
FlashBarService.apk
FlashBarService.odex
SamsungCamera.apk
SamsungCamera.odex
Nfc.apk
Nfc.odex
SecLauncher2.apk
SecLauncher2.odex
ClockPackage.apk
ClockPackage.odex
JobManager.apk
JobManager.odex
SamsungIME.apk
SamsungIME.odex
SecCalculator2.apk
SecCalculator2.odex
SecContacts.apk
SecContacts.odex
SecDownloadProviderUi.apk
SecDownloadProviderUi.odex
SecNoteMyFiles.apk
SecNoteMyFiles.odex
csc/others.xml
services.jar
services.odex
android.policy.jar
android.policy.odex
framework-res.apk
twframework-res.apk
To whom it helpful
It's useful to anyone who want to make makeup of existing application before trying mod. If mod doesn't work, you can use revert zip to restore your previous stat (at time of backup)
Some Tips for newbies
-This will backup your current theme/mod and when you revert, it restore stat to 'time of backup'
-This will make backup of above said files to int sdcard/DrKetanMod
-It will backup as tree structure on device like System/app will be in DrKetanMod/app and system/framework files in DrKetanMod/framework folder.
So manually you can easily figure out where to place in case restoring single app.
-Better to make backup when you have device clean like just after flashing stock ROM. it will create complete stock backup. Now suppose you have one backup of stock applications and you have flashed many mods after that and you want to try one more mod, do this
rename your stock backup folder DrKetanMod to DrKetanMod-stock
Again make backup, try new mod , if doesn't work then flash revert zip, so that will restore your previous mod Not stock. and still you can preserve all previous mod. whenever you need to go complete stock, re rename DrKetanMod-stock to DrKetanMod and flash revert zip
Download
For CWM/TWRP user
Backup Utility
Revert utility
For Mobile Odin user
Download This, extract it and read read.txt inside.

Related

UOT Kitchen Help

UOT Kitchen states "you can now use kitchen with stock odexed roms (if you have .odex files in your rom - kitchen works for you too)". I'm running the stock OTA 2.3.6 ROM (odexed), rooted, with 3e Recovery on my SR. Trying to create a very simple battery icon and status bar mod using the Kitchen. Instructions say to upload your ROM's "framework-res.apk" and "systemUI.apk" files along with your theme changes... and Kitchen creates a cooked-up zip file you can flash. But have a few questions:
1) since it says it now supports odexed ROMs, do I also need to upload the "systemUI.odex" file along with "systemUI.apk" and "framework-res.apk files?
2) does the cooked up zip file contain "framework-res.apk", "systemUI.apk" and "systemUI.odex" files... or just the 2 apk files?
3) if only the apks, do I leave my original "systemUI.odex in /data/app folder... or move/delete it?
4) without CWM, can I extract the needed apks from the zip file created by the Kitchen and use Root Explorer to fix permissions and place files in their appropriate folders?
I posted these questions on the UOT Kitchen site, but they must be backed up as have not received any reply... hoping someone here on the SR Forum may have some experience with the UOT Kitchen and using odexed ROMs. Thx!
1. You need SystemUI.apk from /system/app, framework-res.apk from /system/framework, and twframework-res.apk from /system/framework
2.it will contain updates to framework-res.apk, twframework-res.apk, and systemui.apk and might add to the system/media or any other area you elect to modify
3. dont touch the odex files. they will be needed as is.
4. maybe, maybe not. I always use CWM to install. Sorry.

[Guide]Create Custom ROMs | Modify Apks

Hello xda.
This is a Guide to help anyone who wishes to create custom ROMs. This Guide aims to be as complete as possible, and will give all information related to creating a custom ROM... editing apks, adding or removing apps, de-odexing apps, and so on.
Al suggestions to improve upon this guide are welcome.
0. Pre-requisites
Click to expand...
Click to collapse
Credits to...
1. puppet13th... My mentor, teacher, and a great friend.
2. Wanman... ApkTool for ICS
3. langthang... For a great Guide on Creating Update Script
4. lokeshsaini94... For lots of help
Downloads
You need to Download the following...
1. Apk Tool [link(ICS)|link(GB)]... A tool for De-Compiling apks
2. 7 zip [link]... A tool for un-compressing any sort of compressed file
3. ROM signer [link]... Restores the signing of the ROM zip file, which is messed up while uncompressing
4. Any Image Resizer​
Setting up your PC
You need to do the following...
1. Create a folder (preferably in Desktop, and name it "Android")
2. Create Sub-Folders by the names "Base ROM" and "Custom ROM". Also make Sub Folders by the name...
a. ApkTool... Extract contents of ApkTool Here
b. Signer... Extract Autosigner here​
I. Let's get our Base ROM
Click to expand...
Click to collapse
You need to get the base ROM in the ./Desktop/Base ROM folder. It is also recommended that you flash the Base ROM into your phone, as it will help in testing the mods, as you make them.
The process of getting the base ROM will depend on the scenario your situation fits in, from amongst the following...
1. You want an already made Custom ROM as your Base... Download the ROM [willl come in .zip folder], and extract it in /Desktop/Android/Base ROM folder
2. You want to base your ROM on a stock firmware, which came in an ftf package... Use the following tool to extract the files from the ftf file.
3. You want to base your ROM on a stock firmware, which is instaled on your phone...
Take a back up of the ROM using ClockWork Mod, and copy the back up files (from /sdcard/clockworkmod/backup), somewhere to your computer. Then, using this tool, extract the files to /Destktop/Android/Base ROM
Copy the following folders from /system of your phone using Root Browser
/app
/bin
/etc
/fonts
/framework
/lib
/media
/semc
/usr
/xbin
build.prop​
4. You want to base your ROM on a stock firmware, that comes as a ready to flash .zip file on the internet... Download the ROM, and extract it in /Desktop/Android/Base ROM folder
After completion, the Base ROM will have the following Folder Structure
Desktop
Android
Base ROM
META-INF [only if you got your base from another Custom ROM][/INDENT][/INDENT][/INDENT]
system
apps
bin
etc
.
.
.
data [may be]
Click to expand...
Click to collapse
*ScreenShots*
Copy the contents of Base ROM folder to Custom ROM folder.
We now have the foundation of our ROM laid out in front of us, inviting us to show our creativity.
II. Let's work on the Base ROM... Creation of the Custom ROM
Click to expand...
Click to collapse
A. Apks Make up the Android System...
We will now work, only on the /Desktop/Android/Custom ROM Folder
1. Look into the /system/apps...
You will find apk files which will be raninging frm 100 to 200 in number. Err, half or more are known as "Crapware". You need to remove files which are useless, that's a very important step to enhance performance of your final ROM. Look into your device's forums, to get the list of Safe-To-Remove appks from the respective firmware. In case your base is an already built custom ROM, you will have to remove lesser or none of the files.
2. Here, you can add your desired files as well, keeping compaitability in mind.
3 [Optional]. On a .txt file, keep a record of all the apps your removed or added, as it will help in troubleshooting at a later stage.​
B. Implementing Already-Built-MODs in your ROM...
1. Download any Mod you want to keep in your ROM [Make sure your device, and the Base ROM is compaitable]
2. Extract the zip file and you will get a system folder.
3. Copy the files from the system folder to /Custom ROM/sytem, making sure the files go into the folders they came from.
That is, all apk files from /system/apps folder of the Mod should go to /Custom ROM/system/app folder, and so on...​
C. Changing the Interface... Let's Mess with SystemUI[nterface].apk
Go to /system/app and copy SystemUI.apk to
/Desktop/Android/ApkTool/place-apk-here-for-modding
Working with ApkTool
The link provided in this post is of an easy to use software called ApkTool.
1. Double Click on the Script.bat file to open up the software.
*Screenshot*
2. Decompress the SystemUI.apk using option '9'.
Wait for the process to complete
3. Go to /Projects, and you will find a folder called SystemUI.
Open the /SystemUI.apk/res/drawable folders and you will find lots and lots of .png files
*Screenshot*
4. Look into the files carfully.
Bingo, they correspond to the various system elements of the SystemUI of the Base ROM.
5. Open any file you want to edit, edit it, and save in the original location, replacing the original un-edited file. [On a temporary notepad file, note which all files you edit]
Note: You will notce that there are .png files for, say the Battery Icon. You will find that there are files for each state of the Battery Icon. So if you intend to edit the Battery Icon, you need to edit all the files corresonding to each of the states.
5.A. A common exaple of such editing is making the elements of a Gingerbread SystemUI.apk look like ICS SystemUI.apk. For this get hands on any ICS SystemUI.apk and extract both the files in seprate locations, and then copy the files from the ICS SystemUI folder to GB SystemUI folder. However, here you must make sure that the names of the files coming from ICS SystemUI are changed to corresponding values of the GingerBread SystemUI.apk. Here, also ensure that the new files, which replace the original files, have the same dimensions as the original files. If not use any image resizing tool.
*Screenshot*
6. If you want to edit some values in the .xml files, carry on. Edit the files as you wish, and replace the original files. Once you are done with the editing...
7. Open the Script.bat file and run command 11. [Say NO when it asks if the file is a system file]You will have a new SystemUI.apk file called unsignedSystemUI.apk in /place-apk-here-for-modding folder.
Go and fill your pockets with some cookies from the kitchen. Start having them.
8. Keep the temporary notepad file on one side and open the unsignedSystemUI.apk with 7zip, and open the original SystemUI.apk using 7zip besides it.
*Screenshot*
9. Drag and extract the files you edited to a temporary folder.
10. Drag the extracted files to the SystemUI.apk, replacing the older files, making sure all the edited files go to the proper place. [That's why I asked to keep a note of which all files were edited].
*Screenshot*
11. If you edited some .xml files, then you MIGHT need to copy the resources.acrc file at the root of the unsignedSystemUI.apk file to the root of the original SystemUI.apk file.
Once done, the original SystemUI.apk has now become a modded SystemUI.apk, with your creativity embedded into it. Time to test the SystemUI.apk.
12. Using Quick ADB, push the edited SystemUI.apk to your phone.
*Screenshot*
13. Re-boot your phone and you shoud see the changes you made in the UI. .
In case it gives force close message, you messed up somewhere. So you will have to push the original SystemUI.apk [from /Base ROM/system/apps folder], and try to mod the file from scratch again.
14. Copy the sucessfully modded SystemUI.apk from /Apktool/place-apk-here-for-modding folder to /Custom ROM/system/app folder, replacing the older file.​
D. Changing the Interface... Editing other .apks
1. As earlier, copy the apk you want to edit from /Custom ROM/System/app to /Apktool/**** folder, and perform the modification to optain a new modded .apk file.
2. Test this file if you wish, by pushing it using Qucik ADB.
3. If the modded file wrks, copy this new file to /Custom ROM/System/app and replace the original file​
E. Changing the Interface... Editing the font
1. Take your desired font.ttf file and rename it as DroidSans.ttf..
2. Go to the folder system/fonts/
3. Now, replace the file DroidSans.ttf with your desired DoridSans.ttf...
4. To change the lock screen clock font...replace the Clocktopia.ttf with your desired one (rename first)...​
If you did a good job in the above steps, the /Custom ROM folder should be having the contents of a wonderful ROM in making.
Here, I will like to mention that, if you want to upload your custom ROM on the internet and share it, you must ensure that you did lots of hard work in the above steps. There's no point making a custom ROM without modifying lots of files and adding lots of tweaks.
Just make sure that you do so much of modding that, say, your Gingerbread ROM looks like Jellybean, or say, your ROM made for Galaxy Y works as smooth as an SIII.
III. Compiling the Custom ROM
Click to expand...
Click to collapse
A. If you got your base ROM as in [1 or 4] in step I above
1. Copy the META-INF folder from /Base ROM to /Desktop/Android/Custom ROM
2. Rename the Custom ROM folder to whatever-you-want-your-ROM-to-be-called.
3. Add the Folder to a zip file using 7zip.
4. Take this zip file to /Desktop/Android/Signer folder and run sign.bat.​
X. The new zip file called Update.zip is your ROM.
Copy this file to the SD Card of your phone, format /system, /data, /cache using CWM and flash your .zip file. And enjoy your custom ROM.
B. If you got your base ROM as in [2 or 3] in step I above... Creating your own Update script
Read the following Tutorial. [link]
Once you are done, try the ROM on your phone. Share it if you feel it's great. And hit Thanks Button.
Reserved
Reserved2
nice guide!
thanks for the tutorial.
Nice guide, continue finish it.:good:
Awesome
Adds some more tutorial please:thumbup:
Thanks for your work
Inviato dal mio GT-N7000 con Tapatalk 2
Please also add link to original thread....
Btw .. Nice guide....
In 1. Looking into system apps... you should delete .apk as well as .odex files when you want to remove an app... Like browser.apk and browser.odex... Many peoples won't delete them....
Sent from my GT-S7500 using xda premium
Thanks for this nice guide. :highfive:
Please add the placeholder *Screenshot* s :good:
beautiful
Thanks a lot for this beautiful guide. Loved it
i tried it ............
i followed the guide n tried editin my custom rom technoduos on sgy duos GT-s6102
all i did was extract the rom using CWM and then added removed some apps at /system/apps
no other tweaks just addin n removin apps dats all then compressed it n signed it
then wen i flashed it on my set it worked (yayyyyyyy)
but there were some problems the apps which i del were gone but the ones i added were not there ..........
also wen i flashed the rom again the apps which were del were back how is it possible i made sure i had del em
plz help
thank you very much for your tutorials are very helpful to me
nice guide! thx
Nice Guide...
Thanks for the hard work to track down all this information and publish for us.
Thanks
Thanks... im gonna give this a whirl
Sent from my SGH-T999 using Tapatalk 2
R: [Guide]Create Custom ROMs | Modify Apks
Very useful giude thanks ; )
Inviato dal mio GT-N7100 con Tapatalk 2
:Good:
Sent from my potato oO
thanks

Need SystemUI.odex file

So I deleted SystemUI.odex file and I went to cwm flash my new zip which I wanted to replace the navbar, but I quickly realized that it was bad decision because now my systemui is completely gone. I am on 15.3.A.1.14 and I don't know if it's just SystemUI.odex or both SystemUI.odex and SystemUI.apk files (I replaced the .apk with a backup 1 I had from old fw)
I need these files and I will put them in my /system/app folder (I did nothing to the /system/framework folder luckly)

how to move deodexed files into system...

guys
i used universal deodexer tool to deodex all my system file...
now i want to move those deodexed files into system....
how can i move them?????

[Q] stock deodexed help

can somebody point me into the right direction on how I can deodexed stock 4.4.4 on x1039.
thank you.
try Android Kitchen 0.224 - by dsixda (xda-developers.com)
When installed, update baksmali and smali to latest versions. Also priv-app will not be expected. After deodexgin /system/app rename folder to apps2 and rename priv-app to app - then run deodexing again. Afterwards rename folders back to original.

Categories

Resources