[TOOL] Windows tool for patching services.jar for V6 SuperCharger (0.9.0.6) - Android Software/Hacking General [Developers Only]

temporarily "abandoned" .. please use Zep's ultimatic jar power tools instead.
----------------------------------------------------------------------------------------------------------------------------------------------
I hate that Zeppelinrox's thread is being cluttered with OT questions about this.. so opening a new thread. Please post any JellyScreamPatcher.exe questions here. Thanks.
----------------------------------------------------------------------------------------------------------------------------------------------
[experimental] Windows tool for patching services.jar for V6 SuperCharger
Opening note: When replying to this post, please do not quote it!!! Or quote selectively.
For each fully quoted reply a puppy will die somewhere in the world. If you love puppies as much as I do, you'll stop quoting long posts.. thank you
----------------------------------------------------------------------------------------------------------------------------------------------
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.. LOL I guess you knew it already.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because your phone bootloops. Please
* do some research if you have any concerns about features included in my utility
* before using it! YOU and only YOU are choosing to make these modifications.
* I'm providing no ETA's, though usually I'm responding PM's in a timely manner ;)
*
* While the tool provides some backup functionality, allowing you to roll back to
* a working system, feel free to create a nandroid backup trying this ;)
*
*/
For downloads and changelog, see Post #2
----------------------------------------------------------------------------------------------------------------------------------------------
Preface:
Many of us V6 Supercharger users have been flashing nightlies nightly and dailies daily, resulting in the need for a patched services.jar almost daily since the automatic web patcher no longer works for Android 4.1.1 Jellybean files, we had to stick with manually patching this files as described in Zep's guide here. Eventually Zep prepared several versions of the Jelly_Scream_Smali_Patcher_Test_x.sh script, which does the job perfectly, but the user still has to get his services.jar, extract the .smali files, put them to the phone, put the script to the phone, run it in the phone's terminal, copy the patched .smali files back to the PC etc. etc. and for many of us, this is time consuming (and difficult for others). Time is money, right?
Currently, this tool is using a ported version of the ALL_ROMS_Ultimate_Jar_Power_Tools-Jelly_ISCream+Maximum_MultiTasking_Mods-Smali_Patcher_Test_11.sh script for patching.
So... here an automated workflow, which assumes a few things:
you are running a MS Windows operating system (tested on Win7 x64)
you have Java installed. This was tested with Java7, should run fine on Java 6 as well. In the Q&A section below I provide a link to download Java. Make sure that java.exe is accessible from any folder (is in PATH). Some version of Java 7 installs the binaries into the windows/system32 folder, other versions use different folders (e.g. "C:\Program Files\Java\jre7\bin"), so you need to know where the binaries are. Make sure you have that folder in your PATH. If not, just google how to add a folder to the PATH, there are many tutorials on the web.
[optional] you know how to connect your phone to the PC via USB
[optional] you have ADB drivers installed (either via Android SDK or from your phone's manufacturer)
[optional] you know how to enable USB debugging in your phone and did that
[optional] the USB connection mode is NOT "mass storage" (for the online mode) - please set it to "Charge only" or "None" (varies from device to device)
Before you start:
The following needs to be done only once. Of course, when Zeppelinrox updates his shell script, I'll be updating my tool and this guide to provide a new download file.
download the 7zipped tool (single archive) to your PC . Make sure you always download the latest version (link in the changelog)
extract it to an empty folder (e.g. c:/super/ .. just like in the ICS Guide) so that you get a nice folder structure like this - see explanations for the folders as well:
Code:
C:.
│ JellyScreamPatcherV6_0.9.0.6.exe
│
├───adb
│ adb.exe
│ AdbWinApi.dll
│ AdbWinUsbApi.dll
│
├───backup
├───cwm
│ signapk.jar
│ testkey.pk8
│ testkey.x509.pem
│ update.odex.zip.empty
│ update.zip.empty
│
├───dist
├───framework
├───odex
│ dexopt-wrapper
│
├───scripts
│ deodex-pusher.sh
│ dexopt-wrapper.sh
│
└───smali
baksmali
baksmali.jar
smali
smali.jar
version.txt
Before we start, I'll explain the folder structure.
Code:
adb - support folder, includes google's adb tool
backup - this folder will include your old files
cwm - support folder, includes files for generating cwm compatible update.zips
dist - this folder will include the patched files for further processing
framework - this is the working folder, where files will be compiled/decompiled/patched
odex - support folder, includes the binary for odexed ROMs in-phone final patching
scripts - support folder, includes files for online mode
smali - support folder, includes the smali/baksmali tool
How to patch the services.jar file
The following assumes you have a "stock" (or unchanged) services.jar in your phone's ROM or in my tool's framework subfolder .
Note: The current version should still be considered as beta-release. While it works for me (most of the computer stuff works when I'm near it, my family has been puzzled about this since long ago.. LOL), it may not work for you. Please report any bugs you find (thread, PM) and I'll be happy to fix them. Although I inserted many "hit the Enter" prompts into the tool, it's always good to run the tool from a console so that you can keep the output in case you flash through the workflow too fast
Also, the tool maintains an activity.log file where it flushes messages about what's happening. If you encounter a bug, send me this file. Please do not copy/paste the log contents into the thread!!! Attach it. Or upload to any cloud service and send me the public URL.
Click to expand...
Click to collapse
Tip: When running the tool, feel free to enlarge the command prompt window vertically
Click to expand...
Click to collapse
After running the tool and passing the initial screen, you will be presented with a choice between online and offline mode.
Online mode
Online mode assumes that the phone is connected via USB. In this mode, the tool can pull all the information from the phone. Not only the files, but system variables, as well as some debug info (e.g. is the ROM odexed?)
Connect the phone via USB
Enable connection mode "Charge only" or "None". This won't work, if the phone is in "Mass Storage" mode!
Sit back and enjoy (and don't forget to answer the tool's questions!)
After patching there will be a warm reboot
Offline mode
Offline mode means, that there will be no interaction of the tool with the phone via USB. You need to do all the file transfers and in case of odexed ROMs, the final in-phone patching, manually. Also you will have to enter some other information into the tool manually.
make sure to copy your /system/framework/services.jar to the tool's framework folder. If you have an odexed ROM (e.g. stock), copy the whole /system/framework folder contents to the tool's framework folder.
make sure to know your system's version because the tool will ask for it
make sure to know your BOOTCLASSPATH variable. It can be pulled from the phone using the command
Code:
adb.exe set | grep BOOTCLASSPATH
make sure you know if the ROM is odexed or not
After patching, you will need to transfer the patched files to the phone and perform manual patching/replacement:
Odexed ROM:
For odexed ROMs, there is some more patching required that you can do in the phone.
copy services.jar from the 'dist' folder to the sdcard
copy 'dexopt-wrapper' from the 'odex' folder to the sdcard
copy 'dexopt-wrapper.sh' from the 'scripts' folder to the sdcard
Make sure they are in the card's root folder !!
In the phone, open Script Manager or any other app that can run shell scripts with superuser rights.
Open the app, run the dexopt-wrapper.sh script. A warm reboot may occur, since the script will restart the framework
Reboot to recovery, Clean Cache, Clean Dalvik Cache
That's it
Deodexed ROM:
update-signed.zip in the dist folder
Copy this file to your sdcard, then reboot to cwm recovery and install it from there. Then do a Dalvik Cache wipe, Cache wipe and reboot.
services.jar in the dist folder
You can copy this file to phone's /system/framework folder and replace the existing one. Make sure that the new file will have owner/group 'root' and permissions 644. Then reboot to recovery, clean Cache & Dalvik Cache.
Rollback
In case something goes wrong, there should be a message about that in the activity.log file.
Feel free to send this file to me - either attach (not paste!!!) the file to a post in this thread, or upload it to any of the cloud services and tell me the URL. I'll take a look.
Before patching, the tool creates backup of the files as a CWM recovery compatible update.zip file. It will sit in the backup folder. This is your way back to a working system. Of course, you can do a nandroid backup..
So what is the tool actually doing?
Very easy to explain.
it pulls the services.jar (and odex files if needed) from your phone to the working folder (or takes an existing one that you put into the folder)
it uses the baksmali.jar to decompile the services.jar/odex
creates a backup of the unchanged files
it runs a ported perl version (and compiled to exe) of Zeppelinrox's JellyScream patcher script (v6) to patch the .smali files
it uses smali.jar to compile the new classes.dex
inserts the new classes.dex back to the services.jar
[optionally] it pushes the new services.jar back to the phone
[optionally] for ODEXed ROMs, created services.odex from the patched services.jar
[optionally] for deODEXed ROMs, it creates and signs an update.zip that can be flashed in CWM recovery
collects the garbage and exits with a nice message .. LOL
Q&A
Q: It doesn't decompile the services.jar and complains that the .smali files don't exist !!!
A: Yeah, probably your Java is crap. Install Java JRE from Oracle's web (http://java.com/en/download/index.jsp), it will offer you the latest version. I tested with Java 7, but latest releases of Java 6 should work as well.
Q: Getting java errors "not recognized" "not found" and so !!!
A: You probably don't have the java executable in the system PATH. Search the web on how to do this. Example - Java7 installs its binaries to the <system>:\Windows\System32 folder, other versions may act differently and they may have the binaries in a different folder (e.g. "C:\Program Files\Java\jre7\bin") . That folder needs to be in the PATH.
Q: I'm getting bootloops after patching the services.jar with this tool!
A: Make sure to Wipe Cache, Wipe Dalvik Cache and Fix permissions in the CWM recovery. ALso, feel free to send me your original services.jar, I'll take a look. If you have an odexed ROM, send me the whole /system/framework folder and the activity.log file generated while using this tool in "online" mode.
Q: After reboot with the new services.jar file, it says "Android is upgrading" and optimizing apps, even though I did not wipe my dalvik cache.
A: Well, yes that is expected. It will take a while, depending on how many apps you have installed.
Q: Will my phone's memory be blazing fast and effective after this?
A: No, you still have to run the V6 Supercharger script.
Q: Does it run on Linux?
A: Not yet, but it will. I need some more internal testing to release a Linux version.
Q: Does it run on ODEXed ROMs?
A: Yes !!!
Q: Why is the executable so large???
A: Blame PAR long story short, I wrote my stuff in Perl and used Perl to port Zep's stuff as well. Then I compiled the script to exe using the PAR:acker package, resulting in the huge executable. I know, there is another way, to use Activestate's PDK (Perl Development Kit), but the license is approx. $250 and I just don't have that money for spending on a single tool. PDK creates much smaller files (approx. 1/3rd), but for now we have to stick with what we have
Q: Tool fails and in the log I see messages like "failed to copy 'C:/super/backup/services.jar' to '/mnt/sdcard/services.jar': Permission denied"
A: Make sure the USB connection mode is other than "Mass Storage". It can be "Charge Only" or "None", really this is depending on the device you own.
Q: Isn't there a virus included in the executable?
A: LOL.. No. This community gave me a lot since 2007 and I have no intention to harm it in any way. If you are using NOD32 and it starts complaining about the URL to my file I posted above, let me know. ESET support is pretty quick in identifying and fixing false warnings
Enjoy.. and feel free to PM me in case of any questions. I'll keep this post updated all the time.
Thanks
- Zeppelinrox for the V6 Supercharger and the associated scripts/tools
- Rexstor for the ODEX guide
- Android community for all the other tools (smali/baksmali/sign)
- Google for Android... luv ya!!!
If you feel like I deserve a beer for what I've done, feel free to consider donating to Zeppelinrox first as I'm just making his fabulous work a tiny bit more accessible. And if you still think I deserve a beer, you can use the button below.

downloads and changelog
Downloads
http://dev.pepcok.info/jellyscreampatcher/JellyScreamPatcherV6_0.9.0.6.7z
Changelog
0.9.0.6 [2012-09-23]
still using ALL_ROMS_Ultimate_Jar_Power_Tools-Jelly_ISCream+Maximum_MultiTasking_Mods-Smali_Patcher_Test_11.sh
added a proper error reporting when sdcard is not writable in online mode
0.9.0.5 [2012-09-20]
using ALL_ROMS_Ultimate_Jar_Power_Tools-Jelly_ISCream+Maximum_MultiTasking_Mods-Smali_Patcher_Test_11.sh
multiple users with Odexed ROMs have reported this version to work. Feel free to try
with online mode, there is a framework restart after patching, causing warm reboot of the device.
0.9.0.4 [2012-09-13]
using ALL_ROMS_Ultimate_Jar_Power_Tools-Jelly_ISCream+Maximum_MultiTasking_Mods-Smali_Patcher_Test_11.sh
Warning for odexed ROM users - proceed with cautions, many have reported bootloops (even with previous version). Investigating
0.9.0.3c [2012-09-12]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
fixes STUPID bug with storage detection (I hope)
0.9.0.3b [2012-09-12]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
storage detection, as requested by one of the users (thanks Zep for the code! )
fixes in shell scripts for online mode
removal of the -f flag for rm commands
0.9.0.3 [2012-09-11]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
odex: if the baksmali decompile fails (e.g. file missing, although being in BOOTCLASSPATH), the tool will create an alternate BOOTCLASSPATH based on the files that were pulled from the phone and try decompile again. It even this fails, then I guess the world will end in 2012
ui: revamped the whole ui, user is now selecting offline vs online (adb) mode at the beginning
ui: added a proper note for the user to make sure to clean cache/dalvik cache when rebooting for the first time with the new services
ui: added instructions for the user in offline mode (when he wants to do the final steps manually)
internal: added some file exists checking, online (with adb) mode works better now and is prettier
other: as always, please read what the tool says.
0.9.0.2 [2012-09-06]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
instead of using crappy adb commands, the final patching is done via shell scripts in the phone - please help me test that. I already restored my phone's system partition 4 times (since patching a GB MotoDefy+ with ICS HTC Evo services is not healthy, but necessary for my testing), all the final patching seems to work fine here. Tested for both odexed and deodexed files and my phone already hates me
the tool will make a backup of your original services.jar/odex file into a CWM recovery update.zip (will be in the backup folder) .. that's your way back from potential hell
fixed a typo in manual API level selection - thanks for catching
0.9.0.1 [2012-09-05]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
few fixes (shell user detection, trying to implement better /system rw mount )
0.9.0 [2012-09-05]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
initial support for ODEXed ROMs - alpha version. I need testers please ! Since my phone does not have any odexed ICS or JB, I was able to test with sample files from xda fellow members end-to-end, but the real full fledged experience, I can't verify
0.8.9.2 [2012-09-05]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
minor update to capture the system calls, stdout and stderr into the log, for people who have problems with java. Let's see how it works
0.8.9 [2012-09-04]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
updated adb communication
added proper logging
internal preparation for ODEX ROMs (yeah, 0.9.0 will work with ODEXed ROMs !!!)
added framework folder as the working folder (reduces file clutter.. LOL)
0.8.5 [2012-08-27]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_9.sh
update-binary from Titanium Backup
0.8.4 [2012-08-26]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_8.sh
minor fixes only
0.8.3 [2012-08-25]
patcher: Jelly_IScream+Time_Killer_Killer--Smali_Patcher_Test_8.sh
this one should work with services.jar files where the smali files don't include debug information
0.8.2 [2012-08-23]
some more checks for "non-compatible" data, will provide warnings to the user in case of "incompatible" services.jar. Users seeing that message should proceed with caution until the next version. Zeppelinrox is aware of the potential problem.
0.8.1 [2012-08-22]
patching based on Zep's v7 script
resolves patching issue with the services.jar from the Alliance 2.1 ROM for Galaxy Note (GT-N7000)
resolves a weird compilation error when running the executable
0.8 [2012-08-22]
First public version, based on Zep's v6 patcher

Good job and thanks.
Sent from my Galaxy Nexus using Tapatalk 2

FYI I added this to Post 2 of the SuperCharger thread...
B) Equally Effective AND EASIER than A) - use the Jelly ISCream Automatic Patcher for Windows!
This does everything that is explained in this very post - from start to finish! Yep... it does Steps 1 to 9!
I know... it's complicated... this is what you do...
1. Plug in your phone
2. Run the Windows exe to patch and install services.jar!
OK?
Click to expand...
Click to collapse

thanks buddy
I guess tomorrow I'll need a guinea pig ... oh... I mean a tester !!! LOL ... for the ODEX stuff.. it looks good locally, just need to close my eyes for a few hours cuz I can't see anything any longer today.

zeppelinrox said:
FYI I added this to Post 2 of the SuperCharger thread...
Click to expand...
Click to collapse
People are still going to get it wrong....
Sent from my Galaxy Nexus using Tapatalk 2

Thanks for this. Trying it now on my GS3 (running a deodexed Touchwiz rom). After hitting [ENTER], the screen hangs on:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Click to expand...
Click to collapse
Did I miss something?

jdhas:
The text you pasted is start of the adb server, the next step after that is waiting for device. Did you have the phone connected to the PC via USB, with USB debugging enabled? I should probably add some text saying that it's waiting for the device

pepcisko said:
jdhas:
The text you pasted is start of the adb server, the next step after that is waiting for device. Did you have the phone connected to the PC via USB, with USB debugging enabled? I should probably add some text saying that it's waiting for the device
Click to expand...
Click to collapse
I'm definitely connected, and I definitely have USB debugging enabled. I am, admittedly, trying this from my work computer, which may be too "locked down" for this sort of fun. Will attempt again when I get home.

well, the easiest thing to check (even at work) is to run
Code:
adb devices
manually from the console. This way you can check if adb is seeing the device.
EDIT: What the tool is doing, is the following:
Code:
adb\adb.exe start-server
adb\adb.exe wait-for-device
adb\adb.exe pull /system/framework/services.jar framework\services.jar
so my assumption is, if it fails in the second command, it's waiting for the device.

jova33 said:
People are still going to get it wrong....
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
That's why the next update might have a little surprise if they run the jelly iscream script without the smali files in the same folder... hehehe... makem scream for realzzz

Looking forward to the update....
Sent from my GT-N7000 using Tapatalk 2

Well... here's what may be possible...
http://forum.xda-developers.com/showpost.php?p=31137111&postcount=5066
I just quickly made a new services.jar hack.
Breaking the lowmemorykiller so that it doesn't kill anything was easy... just one simple edit LOL
I'm hoping that increasing max hidden apps from 15 to 50 will work... that would be optimal
===============================
Oh yeah I had used a goo.gl link in Post 2... http://goo.gl/OfOOE+
Already a nice number of clicks lol

Great work. Looking forward to your next update for odexed roms. :thumbup:
Sent from my Pro using xda app-developers app

jdhas said:
Thanks for this. Trying it now on my GS3 (running a deodexed Touchwiz rom). After hitting [ENTER], the screen hangs on:
Did I miss something?
Click to expand...
Click to collapse
USB debugging enabled? Phone plugged it?
Close the win app and try again. It's hung in a couple of spots for me. I just close it and run it again and it'll go through the second time
Sent from my Nexus 7 using Tapatalk 2

I need help. I get the following error message when the patch is running on my computer.
"Important files are missing after decompiling services.jar See the log for details. Exiting..."
Log attached below. The log shows me trying twice with the same error message causing exit. Please advise.
Edit: I'm on Jellybean CM10 with the Droid Incredible.

Do you have java installed on the PC?
Sent from my Galaxy Nexus using Tapatalk 2

jova33 said:
Do you have java installed on the PC?
Click to expand...
Click to collapse
Java6 Update 26 (64-bit) shows as installed under programs.

folks, who have problems with this
Important files are missing after decompiling services.jar See the log for details. Exiting.
Click to expand...
Click to collapse
Can you download the new minor update? I uploaded 0.8.9.2 which adds some more logging and is a bit more "bulletproof" in the system calls.
Please let me know and send (or attach) logfiles if it goes wrong.. Thanks

Good news !!!
I successfully broke my device when I end-to-end tested the ODEX patching on my Motorola Defy+, using test files from a HTC EVO
But that was expected and I did it willingly.
Flashing the stock SBF now, will do one last final test and then (within 1-2 hours) upload the ODEX-capable patcher

Related

GUIDES & FAQs [Android]: ADB Workshop by Adrynalyne and Guide by Captainkrtek

DO NOT POST IN THIS THREAD BEFORE READING THE WHOLE POST
PLEASE ADD GUIDES TO COMMON ISSUES YOURSELVES
To my recollection, the previous WM Guides thread was successful.. so we'll be moving on to android as well - from beginner to pro.
I hope this thread will provide answers to a decent percentage of your questions.
Please hold until guide collecting is finished..
In the meanwhile you are ALL invited to send me links or full guides to add to this thread.. remember, we are all about sharing.
COMING SOON! (in the meanwhile, you've got a great battery life guide at http://forum.xda-developers.com/showthread.php?t=471521 - be sure to thank BruceElliot for it!)
also, if you decide to post a guide, please keep the guide as neat as possible, with a title containing the LEVEL ([BEGINNER], [INTERMEDIATE], [PRO]) and the commonly searched words so that people who look for it can find it easily. (if you can, use the same color (dark orange) and same size (4) and Bold.. for the main title.. tho that's not a must )
post #2. [BEGINNERS+INTERMEDIATE] Replacing System Files using Android Commander
post #3. [EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
post #4. [QUICK FAQ's] Common QnA's for beginners by Timmymarsh (work in progress)
[BEGINNERS] Replacing system files using Android Commander
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
[EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
This following guide was rewritten by Captainkrtek, please make sure to thank him for it
Original Post:
(http://forum.xda-developers.com/showthread.php?t=879701)
This workshop was held in #android-learning on irc.freenode.net by XDA Member Adrynalyne. All credit to him for this guide, I simply am taking it and turning it into a guide. Here we go!
You can find the raw IRC log here
Good evening folks, and welcome to my ADB workshop. This is by no means a full explanation on the subject, but more of a crash course to help folks get up to speed, and get more from their devices. There may be some things you already know here, so please be patient and respect those who do not.
Reference Files
http://adrynalyne.us/files/How to install adb.pdf
http://adrynalyne.us/files/Using ADB.pdf
So, lets just start with the basics.
What is ADB?
ADB stands for the android debugging bridge and is used for testing and debugging purposes by developers.
However, we like to get more out of our devices, and its a great way to fix things.
Knowing adb can mean the difference between a paperweight and a working phone.
So, to start with, we will look at installing ADB.
Generally speaking, the Sun/Oracle JDK is required to run all SDK functions.
ADB is but one tool in the SDK arsenal.
So, we begin by downloading and installing the JDK. This can be found here:
https://cds.sun.com/is-bin/[email protected]_Developer
Choose your OS, download and install. I recommend that 64 bit users use the regular x86/32 bit version as well.
Moving ahead, we download the Windows sdk from here:
http://dl.google.com/android/installer_r08-windows.exe
Due to already installing JDK, you won't be stopped by the install process.
Now, if you notice, I installed it to:
C:\android-sdk-windows
I did this because it makes things easier when setting up path variables.
I encourage everyone to do the same, but obviously it is not required.
So, this SDK is handy, but is only good up to 2.2. We want the latest and greatest! (Well I do)
So, we navigate to:
C:\android-sdk-windows\
and we run SDK Manager.exe
If you notice in your PDF file for installing adb, you will notice that you can update, and I made a choice not to include earlier sdk versions.
I won't go into full detail on that, but depending on the version of SDK you have, 8 or 9, it WILL make a difference in using adb.
By default, for version 8 adb.exe resides in C:\android-sdk-windows\tools
By default, for version 9 adb.exe resides in C:\android-sdk-windows\platform-tools
We will assume version 9 in this guide
Really, the SDK is installed and adb is usable right now, but in my humble opinion, its not enough
I like the ability to use adb in ANY directory on my machine.
To do this, we edit Windows's environment variables.
Specifically, the system path.
To do this, we click on start, or the orb (depending on OS), and right click on Computer, left clicking on properties in the menu.
If its windows XP, I believe it brings you into advanced system properties immediatly. Vista and 7 need a second step.
On the left hand side, as you notice I have highlighted in the pdf, left click advanced system settings.
Under advanced tab, we left click environment variables...
There are two boxes here.
We are concerned with system variables, however.
So we scroll down the list and highlight path and click edit.
Ignoring all the extra stuff in here, make sure you are at the end of the line, and type
Code:
;C:\android-sdk-windows\platform-tools
The semicolon allows us to separate it
from the previous path statement.
Click ok all the way out.
We now have ADB setup globally. We can use cmd.exe (I use powershell) and no matter what directory we are in, adb is recognized.
If it is not, make certain you entered the path into system variables, and made no typos.
If you installed to a different location, you will need to adjust the path accordingly.
This concludes the section on installing the Android SDK to use ADB.
This next section will be on using ADB, so please open that pdf now.
Now, this applies to any OS, not just Windows.
Well, with the exception of the USB drivers.
I will not go too much into that, but if you take a look at the PDF, it goes through installing usb drivers for the sdk, and how to download them.
Fiarly straightforward, in that rspect.
Now, to setup our phones to use with the SDK and ADB, we must change some settings.
First, we go to menu softkey, then settings.
We scroll down to Applications and tap it.
Under Development, we will check Enable USB Debugging. Please note the SGS phones are different in this respect.
The USB cable must be unplugged before enabling or disabling this setting.
Once this is done, we are now ready to play with adb
One quick note: If you get device not found/conencted, please reboot your phone. DJ05 has a quirk in it where ADBD randomly crashes on boot.
A reboot will fix this
ADBD= ADB Daemon
Ok, continuing on.
Lets look at installing applications. This is also known as sideloading.
Unlike installing from the SD card, it does not require unknown sources to be enabled.
The command for this is
Code:
adb install packagename
This assumes that you are working from the directory where the file is located.
This will install the application to /data/app.
It will also show sometimes useful errors if install fails.
That is not something you will see from the Android GUI.
Now, a lot of us have probably deleted files with apps like Root Explorer. While this isn't really a bad thing, it leaves behind databases and data for the application removed.
This is where the 0kb applicaiton entries come from.
If you take that application entry name, you can uninstall the extra data via adb.
First we go to the adb shell which logs into the phone.
Code:
adb shell
If we end up with a $, we will want admin rights, in many cases. This is not one of them, I don't beleive.
To get admin rights, you want to type
Code:
su
Look at your phone if this is the first time, it may prompt you to allow access. Else you will get permission denied.
If you are not rooted, this will not work either.
Ok, now that we are logged in, we will type
Code:
pm uninstall packagename
where packagename is the name of the 0kb listing.
Now this seems like a pain in the a** and I agree.
HOWEVER
There will be a time where Manage applications crashes when you try to uninstall it from the phone. In this case, a factory reset, or this method is the only effective way to fix the problem.
Moving on.
How many of us have removed system applications or renamed them? Did you know that you can simply disable them from the system?
Code:
adb shell
su
pm disable appllicationname
This will disable it, and the system will ignore it.
This can be seen as safer than deleting or renaming things, but your mileage may vary.
On the other hand, you can also re-enable these applications.
Code:
adb shell
su
pm enable applicationname
Please note: Not all applications will properly re-enable. I believe a factory reset or reinstall of said application will fix the issue.
Also, application names are absolutely case sensitive.
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Ok, a lot of us tweak and mod our phones and turning off the device to get to clockwork recovery, or battery pulls, or multiple button holds to get into Download mode are troublesome and annoying at best.
ADB can help us here.
Here, we do not need to be logged into the shell
If we want to merely reboot the phone:
Code:
adb reboot
If we want to go to recovery (works well with voodoo5)
Code:
adb reboot recovery
If we want to go to Download Mode because we need Odin, heaven forbid:
Code:
adb reboot download
Its instant. No waiting on animations or anything else.
Its also handy if Android has locked up, but yet still works in adb.
I for one hate taking my case off to battery pull.
So now we move on to pushing and pulling files.
Sometimes, I don't feel like mounting my sd card to copy a file over to my phone.
I can use this command to push a file straight to my sd card:
Code:
adb push filename /pathtodirectoryonphone
So for instance, if I have test.txt that I want to send, I would type:
Code:
adb push test.txt /sdcard/
and there it goes.
Ok moving on
Pushing files can be done to any directory, however, some are protected.
For instance, /system is going to give you a permission denied or a read only filesystem error.
To get around this, the easiest thing to do is push the file to your sdcard, then log into the shell:
Code:
adb shell
Code:
su
We will then mount the system as writable
Code:
mount -o rw,remount /dev/block/stl9 /system
Then we can use something like
Code:
cp /sdcard/test.txt /system/app/test.txt
cp stands for copy
and it requires the path of the file and destination path. The name of the file is optional
When you copy it, you can rename it to whatever you like.
For instance, if we wanted to backup a file
Code:
cp /sdcard/test.txt /sdcard/backuptest.txt
Now, lets assume you do not have busybox installed.
You non rooted users will not.
Then you must use a slightly more complicated command called dd
This is used like this:
Code:
dd if=/sdcard/test.txt of=/system/app/test.txt
if is for inputfile
of= output file
Not every user friendly, but probably one of the safer copy commands.
Ok, moving on to pulling files.
Lets say you want to get a file from your phone, to modify, backup, etc.
To do this, we simply use adb in this manner:
Code:
adb pull /pathtofile/filename destinationname
For instance, if I wanted to backup ADW launcher in system/app
I would do this
Code:
adb pull /system/app/ADWLaucnher.apk ADWLauncher.apk
And it will pull the file from the phone and put it in the current directory.
Like above, you can specifcy where it goes.
pushing files to the sdcard, it seems prudent to talk about changing permissions.
sdcards are typically fat32, which destroys permisisons, and Android is heavily permission based.
So if you push an application to your sd card, then try to copy it to /system/app/ bad things are going to happen, or the app may not even show up.
So in that case, we use something called chmod.
This is used in this manner
Code:
adb shell
su
chmod 755 /pathtoapplication/applicationname
Keep in mind
you dont want to do this while its still on your sd card.
an example
Code:
adb shell
su
chmod 755 /system/app/ADWLauncher.apk
755 is good for applications and script files.
Just a couple more topics to cover.
Lets go over deleting files.
This becomes especially handy for removing rogue applications.
To do this, we must be in the adb shell.
Code:
adb shell
su
rm /system/app/ADWLauncher.apk
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
So what I did above was delete ADW Launcher from system/app
However, what if I wanted to delete the entire contents of a directory?
Same thing as before, except
Code:
adb shell
rm -f /data/dalvik-cache/*.*
I just cleared my dalvik-cache with that command
very quick, very effective.
If you just tried that, please reboot your phone now
Ok....this leaves us with the final topic: logcat
logcat allows us to log what the OS is doing, and possibly delve information for when things are not working
its quite simple Reading it is another.
To use logcat
Code:
adb shell
logcat
To logcat to a certain file do
Code:
adb shell
logcat > /sdcard/logcat.txt
Now we let the log settle down to a reasonable amount of data coming in and not a wall of scrolling, then start the app in question. When it gives an error, we hit ctrl-C and kill the adb shell session.
This should have captured enough data to see the error. Now, I prepared an example. A user came to me on IRC, and Google Maps was force closing. Clearing data didnt fix it, Clearing dalvik-cache, and fix permissions did not fix it. In this case, the user did not know how to use adb So I had him grab an app called alogcat from the market and email me the log. This is also a very valid method.
this file explains what the problem was, and highlights what to look for as an example.
http://adrynalyne.us/files/logcat.pdf
___________________________________________________________________
This concludes the guide from Adrynalyne, there will be more workshops such as this one in irc.freenode.net #android-learning.
Thanks to everyone in #samsung-fascinate !
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Android control other device with IOIO Board.
It use ADB.
http://androidcontrol.blogspot.com/2011/10/ioio-board-for-android-control-io.html
timmymarsh said:
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Click to expand...
Click to collapse
Thank you for your patience and taking the time to answer those questions. I loved your simple and easily digestible format.
There is a note
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Click to expand...
Click to collapse
this note is all wrong..
1. linNUX is not *NIX.
2. Mac OS-X is a *NIX OS, it is based upon UNIX, they use their own variant called Darwin. Darwin does not require capitolization.
3. The word should be POSIX. Linux is POSIX compliant and POSIX defines the capitolization standardards
soft brick
Taioba said:
Is there any way to use ADB even though I can not enable USB debugging by the android?
I have an Atrix with soft-brick. How can I restore a file (framework-res.apk) knowing that my USB debugging is off?
I can enable ADB via fastboot?
Thanks!
Click to expand...
Click to collapse
I found this for atrix 4g....
http://forum.xda-developers.com/showthread.php?t=965546
hope it helps
knoknot said:
i have a bricked s2 not so sure how to go about reviving it via adb
Click to expand...
Click to collapse
check this thread
http://forum.xda-developers.com/showthread.php?t=1237815
thanks. searched for that
Thanks for it.
Great Guys............ :good:
Thanks for sharing.
Thanks for sharing this guild :d, i am new member for reccod
Great job~ Sometimes could be used this.
I'm using Windows 10 RTM and I've set the path, yet I still get the "unrecognized application" error in the command console. What am I missing?
Nevermind, a restart fixed it. Used to be you didn't have to.... sheesh.
nir36 said:
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
Click to expand...
Click to collapse
Thanks, this Guide is very informative
Help with LG D722
I'm using LG D722 phone and I somehow unlocked bootloader and installed twrp recovery. I backed up Lollipop that's what I'm using and i want to restore custom ROM
I know I need to install Google Apps after installing Custom ROM. But Do I also need to install Modem files on my device ? Because I can't find them on XDA Forums. Please give me a link or something. The help is not just appreciated but seriously needed.
Success. Thanks
Hello, I walk testing one recovery but I'm booting before flashing, the question is, will the recovery feel same when booted vs flashed? I've booted and used to flash a pair of zips but felt very laggy and bugged although did the work right. Thanks
Edit: solved, tried myself
Sent from my SHIELD Tablet K1 using XDA-Developers mobile app
http://forum.xda-developers.com/showthread.php?t=872128&page=2

[TOOL/GUIDE]1by1_ReOdexer - Make a new ODEX file

WHAT IS THIS, AND WHAT IS IT FOR?
This is a guide for creating a new odex file from a deodexed file, one at a time – manually, or with the tool provided. There are tools/methods for doing the entire system at once, but I have not had any luck with those. Plus, typically, one does not need the entire system re-odexed. This is more for those who want to personally mod their stock odexed systems, or create an odexed ROM maybe.
For starters, you can get away with modding a lot on an odexed system, without needing to deodex. You really only need to deodex in order to edit the smali files within the classes.dex (which is required to achieve the cooler mods). See cogeary’s great guide for deodexing tips.
-------------------------
SCRIPT METHOD (using the 1by1_ReOdexer):
I made this script to speed up the process a little bit (thanks! to jimbridgman and cogeary for their input).
NOTE: This could hurt your phone if you don't place your original files (the ones that are currently running on your odexed system) in the 'orig-odexed' folder…
Requirements:
Windows OS (for now – Linux coming soon)
odexed system
root
busybox installed
DOWNLOAD the 1by1_ReOdexer_v2.0.zip for Windows
Unzip it on your desktop or other convenient place (with no spaces in the file path), and read the README.txt.
NOTES
-It will show a few failed processes right when the script starts - it's just trying to clean stuff that isn't there..
-This will not push the new modded files to your phone - but, the re-odex process needs to take place in the /system, so this script does a quick switcheroo by pushing the deodexed file to your running odexed system, then replaces the originals (that's why you must place copies of the odexed ones from your system to the 'orig-odexed' folder - I plan on automating that too eventually) - that's also why you may need to reboot afterwards to straighten things out
-It still needs A LOT of work... but it does the job
MAJOR NOTE: The script is currently set up based on Motorola’s ICS bootclasspath.
To change the file name/path and/or the bootclasspath, right-click on the .bat file and open with a text editor (preferably something like Notepad++) and edit accordingly. The bootclasspath was taken from /init.rc.
-------------
MANUAL METHOD:
I will use the services.jar in this example. Just change the file name and path to existing .odex accordingly for other files. (thanks! to jhotmann for helping me to nail down this method)
Requirements:
odexed system
root
adb
busybox installed
dexopt-wrapper
Put this dexopt-wrapper file in /system/bin with 775 permissions:
X X X
X....X
X....X
Put the deodexed services.jar (or other jar/apk file you want to make a new odex of) on the root your /sdcard (on some phones that means internal storage).
Make sure USB Debugging is enabled.
Put your USB connection to MTP or PTP mode.
The bootclasspath is located in the /init.rc file at the root of your phone. Just make sure that all jars listed in init.rc are actually in your /system/framework folder and only include those in your bootclasspath in the command below. The one from Moto A2/Razr/other ICS is used below (minus the extra jar paths). To replace it with that of a different device, change the word bootclasspath with yours, using the path style as shown in the example below: dexopt-wrapper services.jar new.odex bootclasspath...
Connect with adb (do a adb devices check to make sure you're all good).
To create the new odex, enter the following one line at a time:
Code:
adb shell
su
cd /sdcard/
dexopt-wrapper services.jar new.odex /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework-ext.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar:/system/framework/com.motorola.android.frameworks.jar:/system/framework/com.motorola.android.widget.jar:/system/framework/com.motorola.frameworks.core.addon.jar
To copy the signature from the existing odex (change path to /system/app/.. if necessary):
Code:
busybox dd if=/system/framework/services.odex of=new.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
Done! Rename new.odex (created on your /sdcard) to services.odex since that is your new signed odex file... and move to your phone using the method of your choice.
---------------------
CHANGE LOG:
Code:
11/7/12 (v2.0)
-more automated
-changed the location where the new odex is made
-thanks to [URL="http://forums.acsyndicate.net/showthread.php?113-Re-Odexing-script&p=1369&viewfull=1#post1369"]tanimn[/URL] for the hint
-thanks to [URL="http://forum.xda-developers.com/showthread.php?t=1879128"]alkhafaf[/URL] for his bat files that I got ideas from (his script didn't work for me)
8/25/12 (v1.0)
-initial release
Thanks to the following for testing!:
-A2Trip (formerly DX2Trip) on the A2 ICS
-RETIEF on the RAZR Maxx ICS
-iwabashu on the RAZR ICS
(I tested it on GB - but I am not high-fiving myself :D)
-----------------
Some vague notes on what to do next:
Depending on what you are after by re-odexing, there are different routes. For example, if you only edited or copied smali files, then you only need the new.odex file. Meaning that all of the smali code was inside of that classes.dex of the deodexed file on your sdcard, and you just made that into a new odex file (and copied the signatures from the existing .odex in /system).
If you have a deodexed apk with more edits than just smali (you could really just copy those edits over to your existing odexed apk with 7-zip or similar), but – if you want to, you will need to remove the classes.dex from the deodexed apk, and make sure that the signatures (/META-INF folder) and AndroidManifest.xml are the same as your existing apk (check, and or copy with 7-zip or similar).
.
.
.
Good job on this!
Mods, am I crazy or are we in need of a separate "stickied" section here"?
Please stickify...
An Edit: I'm glad were seeing so many great guides here in this forum, before long, we'll have a directory that other forums will envy -if not already.
Sent from my SAMSUNG-SGH-I747 using xda premium
Updated the tool (not the guide).. eh, it's still a work-in-progress but gets the job done

[GUIDE]【How To DEODEX Stock ROM】[UPDATE 30sept - FIX JELLYBEAN issue]

{
"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"
}
First Lets know some Basic knowledge about DEODEX/ODEX...
What is Odex and Deodex ROM
What is an ODEX file?
In Android file system, applications come in packages with the extension .apk.
These application packages, or APKs contain certain .odex files whose supposed function is to save space.
These ‘odex’ files are actually collections of parts of an application that are optimized before booting.
Doing so speeds up the boot process, as it preloads part of an application.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
What is an DEODEX file?
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files.
By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
So, Deodexed ROMs (or APKs) have all their application packages put back together in one place,
allowing for easy modification such as theming. Since no pieces of code are coming from any external location,
custom ROMs or APKs are always deodexed to ensure integrity.
How this works?
For the majority noobs amongst us, Android OS uses a Java-based virtual machine called the Dalvik Virtual Machine.
A deodexed or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK.
An .odex file, on the other hand, is an optimized version of this same .
dex file that is stored next to the APK as opposed to inside it.
Android applies this technique by default to all the system applications.
When an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages.
Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
Advanteges & Disadvantages
The advantage of deodexing is in modification possibilities.
This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first,
since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times.
However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used.
Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
Note:Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.​
Lets Start...
GUIDE TO DEODEX STOCK ROM
Java Development KIT
(Download & Setup Guide)
ANDROID SDK
xUltimateV2.3.3
(only this version is capable with samsung device)
Official Link to xUltimate : POST #5
7-Zip
(32-Bit & 64-Bit)
1.Download android-sdk & extract it.
2.Copy sdk folder & paste it into
Code:
C:\Program Files\Android
3.Change name from SDK to Android.sdk.
(inside folder look like this)​
4.you need to flash stock firmware first & Root your device.​
5.Connect your phone to computer.(Make sure you have select USB debugging in Settings>Applications>Development)​
6.Download & extract xUltimate zip.
7.Launch Main.exe(Run as administrator)
8.If everything goes well xUltimate should recognize the phone and make a connection.You now should see a list of options.
9.Select option (1) pull /system/app. Wait until it complete.​
10.Select option (2)pull /system/framework. Wait until it complete.​
11..Then select option (3) Deodex /system/app. Wait until it complete.
[If encounter any error. Find out which .odex file is it. Then remove .odex file from folder origi_app in xUltimate folder]
(i found 5 errors so i attached that app's deodex files below you just want to paste in system/app when this process complete)​
12.Then select option (4)Deodex /system/framework. Wait until it complete.​
13.DONE : your rom is now deodex. Now Exit from xUltimate​
​
Now there are 2 ways to install deodex files in device
1. from Android.SDK
From Android.SDK :
1.Put the phone in USB mass storage.
2.Go to xUltimate folder and copy "done_frame", and "done_app", and move them to the root of the sdcard.
3.Now get out from USB storage mode.
4.Go to
Code:
C:\Program Files\Android\android.sdk
& open command promote there.
5.Enter following codes.
(if you are using adb shell in su for the first time, keep phone screen on. After entering "su" code, super user request prompt in phone. Press allow )
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
6.Now you have deodexed rom.
​
2. from SampleDEODEX.zip file attached below.
From zip file attached
1.open zip given as archive.
(use 7.zip but DO NOT EXTRACT.)
2.go to system/app folder & paste here all your deodexed apk's
3.same for for system/framework to paste framework files.
4.done, paste it in your SD-Card & flash through CWM.
​
STILL IF YOU FACE ANY ERROR
Especially Android 4.1 + (JB) users
Try this method Updating xUltimate tool manually.
asm-xda said:
First of all, thx for the OP. This method for Deoexing works fine, I needed to make a few updates - described below - in order to make it work on my GT-P3113 device, running JB 4.2.2.
OK. So, you have already made sure JDK is properly installed but still can't succeed? Check the following... These are the changes I had to make to deodex my ROM.
1. Get the latest version of xUltimate. It's version 2.4.2: http://www.xeudoxus.com/android/xUltimate-v2.4.2.zip. If you got version 2.3.3 and accepted to download latest version, you were directed to a thread that is not updated with the latest version. Check post #549 on that thread to find the link I've pasted above.
2. If you happen to have Android 4.2.2 on your device, ADB needs to be updated. xUltimate has version 1.0.26 which won't properly connect with your device. NOTE: you can tell which version of adb you are using by running this: adb version
So:
Install the latest version of the Android SDK to get ADB version: 1.0.31 (or later, should be fine).
Locate and copy over these 3 files from the Adnroid SDK install folder into xUltimate-v2.4.2\jar replacing the existing ones:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
3. I don't know this step is a must for everyone, but it was for me. The assembler/deassembler for .dex file format must be upgraded too. The version in the jar folder in xUltimate-v2.4.2 didn't work fine with the .odex files in my stock ROM.
So:
Download smali.jar and baksmali.jar from here: https://code.google.com/p/smali/. I got version 1.4.2 but any above that should work fine too for the latest available ROMs I guess.
The 2 files probably include the version number in the filename ( i.e.: smali-1.4.2.jar and baksmali-1.4.2.jar). Rename them so they are called: smali.jar and baksmali.jar.
Copy (& replace) those 2 files into xUltimate-v2.4.2\jar folder.
So, that's it. After doing all the above, I managed to deodex my ROM. Well... not quite... there's something else.
After doing the steps above, you should go ahead and follow instructions in the first post of the thread. If everything works, then you are done! Say thanks to OP and enjoy your deodexed ROM. :good::victory:
If however, you still encounter errors while running the xUltimate tool, keep reading...
NOTE: The following is probably only true for certain devices (like mine) so disregard if you don't find any error while following OP steps to deodex.
I got into errors deodexing these files: SamsungIME, SecEmail_Tablet, SecSetting and SecExchange.
Since I couldn't find how to make them work, I decided to leave those files odexed. I'm not sure if that was a good idea or not, but it's fine for me because in my case I actually wanted to deodex some specific apks, not really all of them.
If you decide you want to skip some files (as I did), you'll need to proceed as follows:
Take note of the files that couldn't be deodexed and move those files from the orig_app or orig_frame folder into a new folders, let's call them: "no_deo_app" and "no_deo_frame". Ensure you move the .odex file + .jar file (in case it exists). Make really sure you move files into the right folder: "orig_app" into "no_deo_app" and "orig_frame" into "no_deo_frame".
Run the deodexing again until everything works fine. If you find another file that gives you problem, you do step 1 and 2 again until the tool completes all files successfully.
Now you have 4 folders that are relevant: "done_app", "done_frame", "no_deo_app", "no_deo_frame". Copy all of them into the root of your sdcard.
Now, get into adb shell as superuser access as described in OP following the commands below instead of the ones in the OP. Basically the difference will prevent you from deleting the odex file for the apps that couldn't be deodexed.
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
[COLOR="red"][B]cp /sdcard/no_deo_app/* /system/app/[/B][/COLOR]
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
[COLOR="Red"][B]cp /sdcard/no_deo_frame/* /system/framework/[/B][/COLOR]
mount -o ro,remount /system/ /system/
reboot
Well, that was it for me . This is what I've done to doedex my stock JB 4.2.2 ROM my Galaxy Tab 2 7.0 tablet.
Regards!
Click to expand...
Click to collapse
thanks to @asm-xda
4real*leb
Xeudoxus
and
asm-xda
(for finding the way to deodex rom for Jellybean User)
GALAXY Ace Plus User's : GO HERE http://forum.xda-developers.com/showthread.php?p=43835177#post43835177​
Cool
omarilzz said:
Cool
Click to expand...
Click to collapse
:fingers-crossed: Thanks bro
will this work with any phone?
i have an alcatel OT X'pop. will this work? 4.1.1?
aldnnnn said:
i have an alcatel OT X'pop. will this work? 4.1.1?
Click to expand...
Click to collapse
YES it does work on any device...
first give a try on above 2.3.3 xUltimate version if u face any issue download latest version v2.4 from here ;
follow same steps like above :highfive: ​
nice method but it is easier from dsixda's kitchen(cygwin)
cant recognized device
i think ive done everything but still wont recognize my device.
any suggestions?
ManzzaShahi said:
nice method but it is easier from dsixda's kitchen(cygwin)
Click to expand...
Click to collapse
i know...
but that kitchen doesn't deodex our device's apk files as much this xUltimate do
i don't know why
but i tried every step (I have kitchen & several kind software's too) & found easiest way is this only to deodex ur apk files :fingers-crossed:​
aldnnnn said:
i think ive done everything but still wont recognize my device.
any suggestions?
Click to expand...
Click to collapse
Give a try on newer version v2.4 I gave link above in that pic.
coz it has ICS Razor support.
or you have to check whether your java works fine or not.
go through some youtube video's to find how to setup JAVA or follow guide below;​
JAVA Development KIT
< Guide How to Setup JAVA >
Download JAVA Development Kit & install it first.
go to desktop, right click on
computer > properties >:highfive>Advance system setting> in advance tab environment variables
First : In user variable for ***
click new & type
Code:
variable name : CLASSPATH
variable value : C:\Program Files\Java\jdk1.7.0_21\jre\bin (your java installed path varies on your installed location)
Second : In system variables
click new & type
Code:
variable name : PATHTEXT
variable value : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
also check in path is there above java path present or not if not just add it BUT do not remove old codes from line...!!! ​
j.posarekar70 said:
< Guide How to Setup JAVA >
Download JAVA Development Kit & install it first.
go to desktop, right click on
computer > properties >:highfive>Advance system setting> in advance tab environment variables
First : In user variable for ***
click new & type
Code:
variable name : CLASSPATH
variable value : C:\Program Files\Java\jdk1.7.0_21\jre\bin (your java installed path varies on your installed location)
Second : In system variables
click new & type
Code:
variable name : PATHTEXT
variable value : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
also check in path is there above java path present or not if not just add it BUT do not remove old codes from line...!!! ​
Click to expand...
Click to collapse
missed this part of installing java
thanks!
will try again soon because i dont have my phone right now.
also i i have these folders in the same java folder
C:\Program Files\Java\jre6
C:\Program Files\Java\jre7
do i need these files?
aldnnnn said:
missed this part of installing java
thanks!
will try again soon because i dont have my phone right now.
also i i have these folders in the same java folder
C:\Program Files\Java\jre6
C:\Program Files\Java\jre7
do i need these files?
Click to expand...
Click to collapse
You may keep aside coz u wanna download java development kit which is jdk for that jre doesn't matter...
just for suggestion remove older version of jre from ur pc if u have jre7. ​
can u help every system file i try to deodex gives error and when i move to another it again gives error what to do same is with framework
tejasvi1 said:
can u help every system file i try to deodex gives error and when i move to another it again gives error what to do same is with framework
Click to expand...
Click to collapse
It would be great if u tell me which device u using to deodex files...
& also if possible attach error screen image/attach log file.
sent from Tapatalk 4
thks for replying , i am using my laptop for deodex my stock jellybean firmware on xperia ion
tejasvi1 said:
thks for replying , i am using my laptop for deodex my stock jellybean firmware on xperia ion
Click to expand...
Click to collapse
well you just have to skip those apk's which cause these errors...
close this window, go in Orig_app folder & delete related apk + its .odex file & give another try.
if error appear in another apk do the same.
some apk's wont get deodex through this app you just have to delete those & move forward.
.
.
.
if u get error in each system apk then download older version's of xUltimate app from this POST #5​
Awsm buddy by the way i have a xperia mini(stock ics) . Will this work on it ?
sadab said:
Awsm buddy by the way i have a xperia mini(stock ics) . Will this work on it ?
Click to expand...
Click to collapse
Keep backup
give a try
follow each steps ​
Nice guide! I followed it when I created my ROM! Very useful! tnx
Hope it works on my samsung galaxy pocket
I will try on my samsung galaxy pocket coz i want the s3 status bar so hope it works without any issues if i have some problem i will tell u guys
---------- Post added at 02:16 PM ---------- Previous post was at 02:10 PM ----------
Plzz check and tell me that will it work on my Rooted Samsung Galaxy Pocket plzz thnx in advanced
KumailHyderMirza said:
I will try on my samsung galaxy pocket coz i want the s3 status bar so hope it works without any issues if i have some problem i will tell u guys
---------- Post added at 02:16 PM ---------- Previous post was at 02:10 PM ----------
Plzz check and tell me that will it work on my Rooted Samsung Galaxy Pocket plzz thnx in advanced
Click to expand...
Click to collapse
Give a try my friend...
there is no way to brick your device .
you just have to put system & framework files in the pc & let xUltimate do the work.
if everything goes fine you get pair of folders deodex system apps & that of framework files .
put them to make flashable zip & there you go deodex stock rom.
everything will fine if u follow my steps.
if get any wrong (error) then its been in ur pc only not in ur phone ​
loxdegio said:
Nice guide! I followed it when I created my ROM! Very useful! tnx
Click to expand...
Click to collapse
Happy to help you
​

[TOOL]Universal Deodexer for Bash

WARNING: I am not responsible for you breaking your phone, you need to make sure you have a PROPER backup before using this tool, and if you don't know what a proper backup is, then I suggest you do more research before attempting something like this.
ABOUT
This is a bash script I just wrote, it can deodex your entire phone, or just a specified file, it can also restore the original odexed files. You can just drop the files in the working directory, or you can add them to your global $PATH variable, either way it will be able to work (even if you use a symlink for the $PATH variable, it'll still be able to detect where the included smali and baksmali files are).
DEPENDANCIES
Bash (obviously), 7z, adb, and realpath (might not be installed by default on most Linux distros)
Code:
sudo apt-get install p7zip && sudo apt-get install realpath
IMPORTANT
I consider this script to be in Beta, even though I tested it thoroughly on my phone, until more people test it you need to be prepared that it may not work 100% on your phone, and if it doesn't PLEASE copy and paste the command output, I want this script to work on as many devices as possible but that requires people to let me know when it doesn't work for them.
FOR THIS TO WORK PROPERLY MAKE SURE YOU ARE BOOTED TO RECOVERY WITH THE SYSTEM PARTITION MOUNTED
Example Usage
deodex --all
-This will scan your phone for odexed files, pull them, deodex them, push them back, and delete the odex files from the phone
deodex <file_name_without_extension>
-This is not as useful, it does the same thing as the --all option, except it only deodexes the specified file
-Example: deodex SystemUI (notice you leave off the extension, THIS IS IMPORTANT, file name ONLY without extension)
deodex --restore
-This will restore all your original files back to the phone (as long as you didn't delete the original folder that was created when deodexing :silly
The project is located on GitHub:
https://github.com/tgaurnier/UniversalDeodexer

[ROOT] [FRAMEWORK-RES MOD] Optimize your WiFi [MARCH 2018]

Hello everyone. I am excited to announce I've found a successful method to edit the contents of the Android System, also known as framework-res. This method has allowed me to make a massive amount of modifications to the framework system, including unlocking several features and or settings Amazon blocks us from using or accessing. The guide I am writing today, is just one example of that.
I've been contacted a few times here and there, users asking if I knew how to improve their WiFi reception as some feared Amazon may be intentionally slowing down connections. Until now, I was unable to determine all of the features or settings related to WiFi, that we have been blocked from seeing/using/accessing. This guide will show you how to unlock those settings and features to improve your WiFi reception.
!!!!*****WARNING*****!!!!
Modifying the framework can be extremely damaging to your device. Making the wrong edit, even in the slightest, can result in permanent damage to your device. DO NOT MAKE ANY OTHER EDITS TO THE FRAMEWORK, OTHER THAN THE ONES OUTLINED IN THIS GUIDE. IF YOU BRICK YOUR DEVICE, OR DAMAGE IT IN ANY WAY, I CANNOT BE HELD RESPONSIBLE. If you choose to go forward from here, you are responsible for any and all actions. If you aren't prepared for the possibility you may brick your tablet, this guide is not for you. NOTE: I've NEVER permanently bricked a device, but everyone's devices are different.
I have tested this method extensively and made extensive edits to the framework. I have bricked my tablets many times, sometimes several times a day. I risked and continue to risk losing my devices to damages by bringing you these next several guides. Please thank me when you've successfully completed this guide
Requirements:
-Rooted HD 10 or Fire 7 tablet
-Desktop PC with Android SDK installed
-APKtool
-Java (APKtool requires Java)
-Notepad++ (Install this first)
-7-Zip or like minded program
-adbd Insecure application
-A lot of patience and time
Notes:
-Works really well on the HD 10. Extensively tested.
-Works on the Fire 7, but with a much lower success rate. For some reason the Fire 7 gets very irritated very quickly, more often than not.
Instructions:
1. Go to the Java website and download the two files, JDK and JRE (not the JRE server) and install them. When doing so, make sure the installation path is just inside C:\ directory NOT C:\Program Files etc. It's much easier to have all your tools in the same directory for easy access. NOTE: You won't be able to use this guide without installing Java as it's required by APKtool.
{
"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"
}
2. Go to the APKtool website and download the tool and required files. They will also be placed into the C:\ directory. Installation instructions are in the same place. PLEASE READ THEM VERY CAREFULLY!
3. When you've completed the above tasks, plug your tablet into your PC. On your PC, open an ADB window. You need to pull one file from your tablet, framework-res.apk and send it to the APKtool folder in C:\APKtool (assuming that's where you installed APKtool). For this guide, your file(s) MUST be pulled from your device using ADB. DO NOT manually place them into the folder(s).
Code:
adb pull /system/framework/framework-res.apk C:\APKtool
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
Code:
APKtool
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
Code:
apktool d framework-res.apk
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
Code:
/res/values/
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
Code:
"config_wifi_dual_band_support"
"config_wifi_background_scan_support"
"config_wifi_enable_disconnection_debounce"
"config_wifi_enable_5GHz_preference"
"config_wifi_framework_enable_associated_autojoin_scan"
"config_wifi_framework_enable_associated_network_selection"
"config_wifi_only_link_same_credential_configurations"
"config_wifi_batched_scan_supported"
"config_wimaxEnabled"
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
Code:
<string-array name="networkAttributes">
<item>wifi,1,1,2,-1,true</item>
<item>tedongle,49,49,1,-1,true</item>
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
Code:
<item>wifi_p2p,13,1,0,-1,true</item>
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
Code:
apktool b framework-res
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Place the framework-res.apk you just dragged those files to, into your adb folder on your PC and plug your tablet into it. Download and install adbd insecure and check the box to make adbd insecure. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
Code:
adb remount
adb push framework-res.apk /system/framework/framework-res.apk
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
Code:
ro.wifi.channels=11
OR
Code:
ro.wifi.channels=13
Keep an eye on me the for the next week or more. I have a lot more goodies to share, and I keep finding more
DragonFire1024 said:
Hello everyone. I am excited to announce I've found a successful method to edit the contents of the Android System, also known as framework-res. This method has allowed me to make a massive amount of modifications to the framework system, including unlocking several features and or settings Amazon blocks us from using or accessing. The guide I am writing today, is just one example of that.
I've been contacted a few times here and there, users asking if I knew how to improve their WiFi reception as some feared Amazon may be intentionally slowing down connections. Until now, I was unable to determine all of the features or settings related to WiFi, that we have been blocked from seeing/using/accessing. This guide will show you how to unlock those settings and features to improve your WiFi reception.
!!!!*****WARNING*****!!!!
Modifying the framework can be extremely damaging to your device. Making the wrong edit, even in the slightest, can result in permanent damage to your device. DO NOT MAKE ANY OTHER EDITS TO THE FRAMEWORK, OTHER THAN THE ONES OUTLINED IN THIS GUIDE. IF YOU BRICK YOUR DEVICE, OR DAMAGE IT IN ANY WAY, I CANNOT BE HELD RESPONSIBLE. If you choose to go forward from here, you are responsible for any and all actions. If you aren't prepared for the possibility you may brick your tablet, this guide is not for you. NOTE: I've NEVER permanently bricked a device, but everyone's devices are different.
I have tested this method extensively and made extensive edits to the framework. I have bricked my tablets many times, sometimes several times a day. I risked and continue to risk losing my devices to damages by bringing you these next several guides. Please thank me when you've successfully completed this guide
Requirements:
-Rooted HD 10 or Fire 7 tablet
-Desktop PC with Android SDK installed
-APKtool
-Java (APKtool requires Java)
-Notepad++ (Install this first)
-7-Zip or like minded program
-A lot of patience and time
Notes:
-Works really well on the HD 10. Extensively tested.
-Works on the Fire 7, but with a much lower success rate. For some reason the Fire 7 gets very irritated very quickly, more often than not.
Instructions:
1. Go to the Java website and download the two files, JDK and JRE (not the JRE server) and install them. When doing so, make sure the installation path is just inside C:\ directory NOT C:\Program Files etc. It's much easier to have all your tools in the same directory for easy access. NOTE: You won't be able to use this guide without installing Java as it's required by APKtool.
2. Go to the APKtool website and download the tool and required files. They will also be placed into the C:\ directory. Installation instructions are in the same place. PLEASE READ THEM VERY CAREFULLY!
3. When you've completed the above tasks, plug your tablet into your PC. On your PC, open an ADB window. You need to pull one file from your tablet, framework-res.apk and send it to the APKtool folder in C:\APKtool (assuming that's where you installed APKtool). For this guide, your file(s) MUST be pulled from your device using ADB. DO NOT manually place them into the folder(s).
Code:
adb pull /system/framework/framework-res.apk C:\APKtool
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
Code:
APKtool
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
Code:
apktool d framework-res.apk
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
Code:
/res/values/
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
Code:
"config_wifi_dual_band_support"
"config_wifi_background_scan_support"
"config_wifi_enable_disconnection_debounce"
"config_wifi_enable_5GHz_preference"
"config_wifi_framework_enable_associated_autojoin_scan"
"config_wifi_framework_enable_associated_network_selection"
"config_wifi_only_link_same_credential_configurations"
"config_wifi_batched_scan_supported"
"config_wimaxEnabled"
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
Code:
<string-array name="networkAttributes">
<item>wifi,1,1,2,-1,true</item>
<item>tedongle,49,49,1,-1,true</item>
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
Code:
<item>wifi_p2p,13,1,0,-1,true</item>
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
Code:
apktool b framework-res
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
Code:
adb remount
adb push C:\apktool\framework-res.apk /system/framework/framework-res.apk
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
Code:
ro.wifi.channels=11
OR
Code:
ro.wifi.channels=13
Keep an eye on me the for the next week or more. I have a lot more goodies to share, and I keep finding more
Click to expand...
Click to collapse
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
adm1jtg said:
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
Click to expand...
Click to collapse
I'm not so sure that a framework-res.apk from one tablet is good for another, but there's no reason that it wouldn't work.
I experience a lot of wifi issues on the 7th Gen HD 10, but I'm not sure if messing with the framework is worth the risk...
I can tell that the 5GHz range of the tablet is extremely bad, I basically have to be in the ssame room where my router is
and that 2.4GHz is sometimes very slow, while it works fine on my phone
adm1jtg said:
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
OR
Keep an eye on me the for the next week or more. I have a lot more goodies to share, and I keep finding more
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
Click to expand...
Click to collapse
I can yes. But be aware if you aren't on the same version 5.6.0.1, then just reinstalling that APK may not work. I'm not entirely sure if the framework APK relies on version specific settings or not. In which case the worst that could happen is when you go to reboot you would be stuck at the boot logo and you would need to reflash stock firmware. I'll do upload it when I get home from work later.
Sent from my Samsung Galaxy S4 using XDA Labs
I'm posting the framework now. There are other tweaks as well, I just don't remember some. You can toggle the Wi-Fi GHZ in advanced Wi-Fi settings. I warn you though, this may not work. I've not tested this method so I'm not responsible for any bricks!
Sent from my Amazon KFSUWI using XDA Labs
freaky2xd said:
I experience a lot of wifi issues on the 7th Gen HD 10, but I'm not sure if messing with the framework is worth the risk...
I can tell that the 5GHz range of the tablet is extremely bad, I basically have to be in the ssame room where my router is
and that 2.4GHz is sometimes very slow, while it works fine on my phone
Click to expand...
Click to collapse
Posted above this reply. I can make a special modification for you later. As of now the setting is set to a 5ghz preference. I can change that later and I'll upload the revised framework this afternoon.
Sent from my Amazon KFSUWI using XDA Labs
adm1jtg said:
Hello everyone. I am excited to announce I've found a successful method to edit the contents of the Android System, also known as framework-res. This method has allowed me to make a massive amount of modifications to the framework system, including unlocking several features and or settings Amazon blocks us from using or accessing. The guide I am writing today, is just one example of that.
I've been contacted a few times here and there, users asking if I knew how to improve their WiFi reception as some feared Amazon may be intentionally slowing down connections. Until now, I was unable to determine all of the features or settings related to WiFi, that we have been blocked from seeing/using/accessing. This guide will show you how to unlock those settings and features to improve your WiFi reception.
!!!!*****WARNING*****!!!!
Modifying the framework can be extremely damaging to your device. Making the wrong edit, even in the slightest, can result in permanent damage to your device. DO NOT MAKE ANY OTHER EDITS TO THE FRAMEWORK, OTHER THAN THE ONES OUTLINED IN THIS GUIDE. IF YOU BRICK YOUR DEVICE, OR DAMAGE IT IN ANY WAY, I CANNOT BE HELD RESPONSIBLE. If you choose to go forward from here, you are responsible for any and all actions. If you aren't prepared for the possibility you may brick your tablet, this guide is not for you. NOTE: I've NEVER permanently bricked a device, but everyone's devices are different.
I have tested this method extensively and made extensive edits to the framework. I have bricked my tablets many times, sometimes several times a day. I risked and continue to risk losing my devices to damages by bringing you these next several guides. Please thank me when you've successfully completed this guide
Requirements:
-Rooted HD 10 or Fire 7 tablet
-Desktop PC with Android SDK installed
-APKtool
-Java (APKtool requires Java)
-Notepad++ (Install this first)
-7-Zip or like minded program
-A lot of patience and time
Notes:
-Works really well on the HD 10. Extensively tested.
-Works on the Fire 7, but with a much lower success rate. For some reason the Fire 7 gets very irritated very quickly, more often than not.
Instructions:
1. Go to the Java website and download the two files, JDK and JRE (not the JRE server) and install them. When doing so, make sure the installation path is just inside C: directory NOT C:\Program Files etc. It's much easier to have all your tools in the same directory for easy access. NOTE: You won't be able to use this guide without installing Java as it's required by APKtool.
2. Go to the APKtool website and download the tool and required files. They will also be placed into the C: directory. Installation instructions are in the same place. PLEASE READ THEM VERY CAREFULLY!
3. When you've completed the above tasks, plug your tablet into your PC. On your PC, open an ADB window. You need to pull one file from your tablet, framework-res.apk and send it to the APKtool folder in C:\APKtool (assuming that's where you installed APKtool). For this guide, your file(s) MUST be pulled from your device using ADB. DO NOT manually place them into the folder(s).
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
OR
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
Click to expand...
Click to collapse
Posted. Look above this reply
Sent from my Amazon KFSUWI using XDA Labs
Thanks can't wait to try, unfortunately I won't have access to my tablet for the next 2 weeks but will definitely try first thing when I get it back.
DragonFire1024 said:
I'm posting the framework now. There are other tweaks as well, I just don't remember some. You can toggle the Wi-Fi GHZ in advanced Wi-Fi settings. I warn you though, this may not work. I've not tested this method so I'm not responsible for any bricks!
Sent from my Amazon KFSUWI using XDA Labs
Click to expand...
Click to collapse
Installed this on my tablet, it seems to have definitely fixed my issue where the tablet would stop stop loading when streaming videos. Thanks
I can't install the apk on my fire hd 10 os 5.6
endleesss said:
I can't install the apk on my fire hd 10 os 5.6
Click to expand...
Click to collapse
Are you trying to install it like a regular APK?
Sent from my Samsung Galaxy S4 using XDA Labs
In step 13, when I type 'adb remount' on adb window, it keeps showing me 'permission denied'.
I'm using os 5.6.1.0 on rooted fire hd 10 by the way.
zxcvbnm76 said:
In step 13, when I type 'adb remount' on adb window, it keeps showing me 'permission denied'.
I'm using os 5.6.1.0 on rooted fire hd 10 by the way.
Click to expand...
Click to collapse
Make sure the box is checked in adb insecure. You have to recheck the box each time you run a command, whether successful or not.
Sent from my Samsung Galaxy S4 using XDA Labs
DragonFire1024 said:
Make sure the box is checked in adb insecure. You have to recheck the box each time you run a command, whether successful or not.
Sent from my Samsung Galaxy S4 using XDA Labs
Click to expand...
Click to collapse
It worked! Thanks for your help.
@DragonFire1024 just got my hd 10 up and running with TONS of help from retyre. Currently on his 5610 img thats pre rooted and pre xposed. If you would be willing to make a 5160 framework-res for me with all your goodies I would be happy to help you test anything you like. If needed I can even upload the framework-res off my install to you for modding.
adm1jtg said:
@DragonFire1024 just got my hd 10 up and running with TONS of help from retyre. Currently on his 5610 img thats pre rooted and pre xposed. If you would be willing to make a 5160 framework-res for me with all your goodies I would be happy to help you test anything you like. If needed I can even upload the framework-res off my install to you for modding.
Click to expand...
Click to collapse
You'll likely have to send me a copy of yours to be on the safe side. There are some parts I cannot change or it gets stuck at the boot logo. If any of those are different from 5.6.0.1 to 5.6.1.0, then it would also get stuck. Send me your framework APK and I'll work on it. Almost done with the FireTabletSettings apk and then I'll overhaul my framework to include all mods instead of single mods and make it available. So my take a little time, but I'll do it
Sent from my Moto E4 using XDA Labs
DragonFire1024 said:
You'll likely have to send me a copy of yours to be on the safe side. There are some parts I cannot change or it gets stuck at the boot logo. If any of those are different from 5.6.0.1 to 5.6.1.0, then it would also get stuck. Send me your framework APK and I'll work on it. Almost done with the FireTabletSettings apk and then I'll overhaul my framework to include all mods instead of single mods and make it available. So my take a little time, but I'll do it
Sent from my Moto E4 using XDA Labs
Click to expand...
Click to collapse
https://bit.ly/2HOv0Rw (framework-res from 5.6.1.0) do you want the settings file as well? If so would it be SettingsProvider.apk you need?
Also have been toying with an idea... If I loaded RETYRE's image for system, clean, then adb pushed your settings and framework files to my system, then used flashfire for a raw system backup and posted the resulting image file, woudn't that be a good way to easily distribute your changes and his... with his and your permission to do so of course.
adm1jtg said:
https://bit.ly/2HOv0Rw (framework-res from 5.6.1.0) do you want the settings file as well? If so would it be SettingsProvider.apk you need?
Also have been toying with an idea... If I loaded RETYRE's image for system, clean, then adb pushed your settings and framework files to my system, then used flashfire for a raw system backup and posted the resulting image file, woudn't that be a good way to easily distribute your changes and his... with his and your permission to do so of course.
Click to expand...
Click to collapse
I would need FireTabletSettings.apk. I suppose it could be done like that, but I honestly don't know. You have my permission to try though. I'm almost done with Version one. I just need to do a few more things.
Sent from my Moto E4 using XDA Labs
adm1jtg said:
Also have been toying with an idea... If I loaded RETYRE's image for system, clean, then adb pushed your settings and framework files to my system, then used flashfire for a raw system backup and posted the resulting image file, woudn't that be a good way to easily distribute your changes and his... with his and your permission to do so of course.
Click to expand...
Click to collapse
While I don't have an issue with using my 5.6.1.0 image, I'm not sure merging these tweaks into the system.img and uploading a new 5.6.1.0 image would be my preferred approach. Instead, DragonFire1024 should upload his/her tweaks as a flashable .zip that one can flash with FlashFire.
Let's say you put up a modified system.img today and DragonFire1024 comes up with a couple of tweaks tomorrow. Will you create another system.img? If you have a good /system, would you want to dump an entirely new system.img just to get a few new tweaks?

Categories

Resources