Memory Performance Tweaks

Discussion in 'Droid X2 Development' started by vvildcard, Jun 17, 2011.

  1. vvildcard
    Offline

    vvildcard New Member

    Joined:
    Jun 15, 2011
    Messages:
    201
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Oregon
    These are the same steps that were posted in the "Dude.....my X2 absolutely screams after doing this...disappointing before but no more" thread. I've stripped them down and reworded a few that seem to be causing some confusion.

    These steps are intended for use on the stock Droid X2 running 2.2.2... I'm sure they will be close to the same on other phones, but if your phone is not a stock Droid X2 (2.2.2), know that the steps may be different.


    Before even considering this, READ ALL THE STEPS. Then READ IT AGAIN.

    There are two tweaks recommended here: V6_Supercharger and SD Speed Increase.


    Requirements for V6_Supercharger:
    1. Rooted Phone (Gingerbreak 1.20)
    2. Script Manager (free on Market)
    3. BusyBox 1.18.2 or earlier

    Installing/Using the script:
    1. Install BusyBox. There are a number of ways to get this... it comes as part of Titanium Backup, for example. If you're not sure if you have it, or not, you can use BusyBox Installer (free on Market) to detect whether or not you have it and install it if you don't.
    - Note: BusyBox Installer tells you which version you have installed on the main screen after it loads... it should be in a list that starts with "Your device is Rooted"
    - Note: Make sure you don't install BusyBox 1.19 or anything newer than 1.18.2
    2. Download the script. Save it in a place where you'll be able to find it.
    3. Launch Script Manager and find the downloaded file (usually in /mnt/sdcard/download). Long-press no it and select rename, then delete the .txt from the end. You should have a file named "V6_SuperCharger_for_Android-update8.sh"... Press once on the script file to load it into Script Manager, check the 'Run as Root' box (DO NOT select "Run at Boot") and push "Run" to execute the script.
    4. The script will run and ask for a speed. Touch anywhere on the screen to open your keyboard. Type 1 if this is your first time running the script, 0 if you're a fast reader or you are in a hurry. Next, it lists 17 options and gives an input prompt. Type 8 and push Enter. (This selects the called MegaRAM 1 preset, but feel free to try others, if you're so inclined)
    5. Once script finishes, type 17 and push enter to end the script. Push the phone's Menu button and select 'exit' to return to the list of scripts.
    6. Pushing the phone's Back button should bring you to a file browser. Push the '..' line (second from top) until the top line reads '/'.
    7. Push the phone's Menu button, push 'More' and then 'Config'. Check the box 'Browse as root'. Push the phone's Back button to return to the file browser.
    8. Browse to /data and select '99SuperCharger.sh' (This script was created by the first script and makes sure the settings from the first script are re-applied on boot)
    9. Select both 'Run as root' and 'Run at boot'. Push 'Save' and then 'Run'. If it says "Exit code 0" at the top of the screen, the script ran successfully. Any other Exit codes should be reported.
    10. Almost all the settings are now in place... but reboot your phone to get the last ones implemented.
    11. After reboot, launch Script Manager and run V6_SuperCharger_for_Android-update8.sh (the first script). Select 0 at the first prompt, look for the current minfrees values... it should say "Launcher is HARD TO KILL!" and "Current minfrees = 6, 12, 40, 60, 80, 100". If the settings are correct, type 17 to exit and you are done. If not, re-read steps because you missed something.

    Credit goes to Zeppelinrox, see this thread for more info on this script.


    Requirements for SD Speed Increase:
    1. Rooted Phone (Gingerbreak 1.20)
    2. SD Speed Increase (free on Market)

    Configuring SD Speed Increase:
    1. Open the app and adjust the memory slider to 2048
    2. Check 'Set on every reboot'
    3. Push the red button
    4. Reboot the phone


    3G TurboCharge (beta)
    - I'll post full step-by-step instructions soon, but for now, here are two more scripts from Zepplinrox that will boost 3G performance... Run 3GTurboChargerInstaller.sh and 98KickAssKernelTweaksInstaller.sh once each. The second script creates this boot script: /system/etc/init.d/98kickasskernel, so you will have use this thread to get init.d created (Side note: I haven't been able to get it to actually run the scripts that are placed in init.d... we're stuck with Script Manager for now). Run all scripts as root, obviously.
    - NOTE TO DROID X2 USERS: There have been reports of these two scripts causing trouble on pre-rooted GB. Use at your own risk!


    Questions, Comments & Corrections are always welcome!


    To Do:
    Update SuperCharger to update7 (need to test it myself first)
    Test and implement AutoStart script

    Edit:
    06/27/2011 - Removed ro.Home_app_adj tweak. It's handled by the SuperCharger script.
    06/27/2011 - Updated SuperCharger script instructions to use v4 of the script.
    07/14/2011 - Updated SuperCharger script instructions to use v5 of the script.
    07/18/2011 - Added BusyBox requirement to the SuperCharger script.
    07/25/2011 - Updated SuperCharger script instructions to use v8 of the script. Rewrote most steps for improved clarity.
    Last edited: Aug 1, 2011
  2. vvildcard
    Offline

    vvildcard New Member

    Joined:
    Jun 15, 2011
    Messages:
    201
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Oregon
    Why do I need the V6_SuperCharger script? What does it do? What is the difference between the different settings?

    Well... here's my understanding. If someone who has some real, working knowledge of how this works wants to set me straight, please do.

    There are different 'compartments' in Android memory management. Each program, when it gets loaded into memory, is assigned to one (or many) of the compartments. The compartments are given a priority that determines how important the stuff in them is. Stuff that you can't run without, like the kernel and core android services are loaded into the first compartment... stuff that you only need temporarily is loaded into the last compartment. When there is no more memory, Android goes through the compartments, starting with the last one, and starts clearing memory.

    The SuperCharger script is adjusting how big each compartment is... so by default, the compartments are really small. Android sets aside a (relatively) small amount of memory for the core stuff and leaves a big chunk for everything else. The problem is that the 'everything else' isn't being managed very well and it eventually crashes. Also, some of the compartments are too small, so when we load a lot of programs that all need a part of those compartments, they fill up quickly, then start fighting with each other for the limited space. With SuperCharger, you're giving each compartment more room so those 'fights' don't happen as often.


    So, to give a more 'hands-on' example, lets say you have a warehouse with 512 square feet of floor space (ie: 512 MB of RAM) that you are going to use to store different things. You would want to have an office area, a place for your receptionist and a few other dedicated spaces... lets say a loading bay, break room, lobby and bathrooms. Everything else is for general storage. Now, using the settings from our phone, lets see how our warehouse works out.

    With default settings...
    Office: 6
    Receptionist: 2
    Loading Bay: 4
    Break Room: 4
    Bathrooms: 4
    Lobby: 8
    General Storage: 484

    Great! You have tons of storage... except your receptionists keep quitting, you have to hire a new one every week (reboot!). And the guys down in the loading bay keep complaining about such tight spaces... they can barely turn their fork-lifts around when they're unloading the trucks (crash!). And nobody likes sharing the single-stall bathroom because the guys from the loading bay pee on the seats (lag!). :)

    So lets do some re-arranging... here are the MegaMemory settings:
    Office: 6
    Receptionist: 6
    Loading Bay: 63
    Break Room: 50
    Bathroom: 25
    Lobby: 25
    General Storage: 337

    This is a lot more comfortable for everyone... the receptionist feels respected with her office (it's the same size as the bosses!), the guys in the loading bay have plenty of room to work, the break room is no longer cramped, and best of all, we have enough room for 3 restrooms... Male, Female and one for the Docking Bay guys, who still pee on the seats.
  3. Ravyn
    Offline

    Ravyn New Member

    Joined:
    Aug 30, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    LOL +2

    Awesome VvildCard
    Well done.

    Also zeppelinrox.. is the friggin man.
  4. tgyberg
    Offline

    tgyberg Well-Known Member

    Joined:
    Dec 18, 2009
    Messages:
    3,823
    Likes Received:
    237
    Trophy Points:
    63
    Location:
    Minneapolis, Minnesota
    Awesome! I feel like I just watched an episode of The Office!

    *edit: British version rules!
  5. Mavic
    Offline

    Mavic New Member

    Joined:
    Jun 17, 2011
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    This is good stuff! Thanks for the walkthrough!

    Cheers!
  6. kptphalkon
    Offline

    kptphalkon New Member

    Joined:
    Dec 31, 2010
    Messages:
    1,380
    Likes Received:
    6
    Trophy Points:
    0
    I just wanted to note that while the settings may differ, these tweaks will help EVERY phone :D
  7. turboteal
    Offline

    turboteal New Member

    Joined:
    Feb 17, 2010
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    0
    question

    freaking awsome !!!!!!!!!!!!! love the explanation:icon_ banana:

    answered my questions as well,

    but should we do this or wate for gingerbread ????????????
  8. Wongway
    Offline

    Wongway New Member

    Joined:
    Apr 13, 2010
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    0
    If you feel comfortable, do it. Waiting for gingerbread is... umm... well, let's just say I will never hold my breath waiting on a company's updates...
  9. zeppelinrox
    Offline

    zeppelinrox Premium Member Premium Member Developer

    Joined:
    Jan 15, 2011
    Messages:
    512
    Likes Received:
    0
    Trophy Points:
    0
    heh... the cause of lag kinda makes one gag... ;)
  10. wrxman17
    Offline

    wrxman17 New Member

    Joined:
    Jun 6, 2011
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    So I am very tempted to do this it seems pretty easy, but I have never had a smartphone before let alone rooted one. What could go wrong if I try to do this?
  11. zeppelinrox
    Offline

    zeppelinrox Premium Member Premium Member Developer

    Joined:
    Jan 15, 2011
    Messages:
    512
    Likes Received:
    0
    Trophy Points:
    0
    There isn't much risk really.
    So I assume you are rooted with a stock ROM?
  12. jrracinfan
    Offline

    jrracinfan Member

    Joined:
    May 28, 2011
    Messages:
    261
    Likes Received:
    3
    Trophy Points:
    18
    Really no risk at all.

    Sent from my Droid using DroidForums
  13. wrxman17
    Offline

    wrxman17 New Member

    Joined:
    Jun 6, 2011
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    I haven't rooted yet. I don't want to root because I don't want to brick my phone. I'm guessing that this isn't possible without changing the rom?
  14. wrxman17
    Offline

    wrxman17 New Member

    Joined:
    Jun 6, 2011
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    Hey so I decided to give this a try and ran into some problems.

    Home_app_adj tweak:
    1. Using Root Explorer, browse into /data
    2. Open local.prop in the text editor

    I find the data folder but local.prop isn't in there

    Also for the supercharger I don't know how to extract it to the sd card. When I download it where does it go and how do I extract it?
  15. Elite49
    Offline

    Elite49 New Member

    Joined:
    May 26, 2011
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Mass
    I did Supercharger and it ran my phone hot and drained the battery like crazy. Its funny, some stuff works for some phones, some phones NEED some stuff, and some don't.
  16. vvildcard
    Offline

    vvildcard New Member

    Joined:
    Jun 15, 2011
    Messages:
    201
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Oregon
    Are you sure you're in the right data folder? Your SD card usually has a data folder. Make sure the path listed is "/data" and not "/mnt/sdcard/data" or something else.

    This could be taken offensively, but please don't take it that way... I'm being honest and constructive: Downloading and working with compressed files are very basic computing skills (like Computer 101 level). If you're not familiar with them, working on a rooted phone is going to get you in over your head. I purposely wrote Step 1 without specific instructions on how to download and extract. If you can't get past it, you really shouldn't be going further... trust me, it only gets more risky from there.
  17. wrxman17
    Offline

    wrxman17 New Member

    Joined:
    Jun 6, 2011
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    Lol I figured it out anyway. I am just not familiar with android. I just moved my file onto my sd card with the move command and then extracted it. Is that the right way? Also everyone has to start somewhere.....
  18. wrxman17
    Offline

    wrxman17 New Member

    Joined:
    Jun 6, 2011
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    So I found the folder in file expert and /data has nothing in it. Could this be a problem with file expert?

    Sent from my DROID X2 using DroidForums
  19. vvildcard
    Offline

    vvildcard New Member

    Joined:
    Jun 15, 2011
    Messages:
    201
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Oregon
    Probably a permissions issue... I just pulled it up on my phone with File Expert. Make sure File Expert is browsing with root permission (check the SuperUser app to see if File Expert is listed with the green light), although that really shouldn't be blocking you from at least viewing to the file... even a non-root file browser should be able to see the local.prop, as its default permissions give everyone Read.
  20. wrxman17
    Offline

    wrxman17 New Member

    Joined:
    Jun 6, 2011
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    Hey so I went into superuser and neither file expert or jota have permission and I didn't see where I could add the to the allow list. I went through jota and and navigated to /data and it said access denied. And it didn't give me the option to allow it? Any thoughts?

    Sent from my DROID X2 using DroidForums
Search tags for this page
android tweak net.core.wmem max
,

droid x2 performance tweaks

,
droid x2 speed tweaks
,

droid x2 tweaks

,
droidx2 memory performance tweaks
,

hstcmd

,
memory tweak android
,
note 2 tweaks
,
ram tweaks android
,
ram tweaks for android
,
ro.ril.gprsclass=32
,
ro.ril.gprsclass=34