1. Are you ready for the Galaxy S20? Here is everything we know so far!

Virtual Memory

Discussion in 'Android Devices' started by Koumajutsu, Apr 26, 2012.

  1. nanggala

    nanggala Lurker

    :thinking: :thinking: :thinking:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Admin>adb remount
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    remount failed: Operation not permitted

    C:\Documents and Settings\Admin>run> adb remount
    'run' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Admin>adb shell
    $ mkdir /system/swap
    mkdir /system/swap
    link_image[2030]: failed to link mkdir
    CANNOT LINK EXECUTABLE
    $ mount /dev/stl13/system/swap
    mount /dev/stl13/system/swap
    link_image[2030]: failed to link mount
    CANNOT LINK EXECUTABLE
    $ rm -rf/system/swap/*
    rm -rf/system/swap/*
    link_image[2030]: failed to link rm
    CANNOT LINK EXECUTABLE
    $ dd if=/dev/zero of=/system/swap/swapfile
    dd if=/dev/zero of=/system/swap/swapfile
    link_image[2030]: failed to link dd
    CANNOT LINK EXECUTABLE
    $ mkswap /system/swap/swapfile
    mkswap /system/swap/swapfile
    link_image[2030]: failed to link mkswap
    CANNOT LINK EXECUTABLE
    $ exit
    exit

    C:\Documents and Settings\Admin>adb push S90KoumaSwap etc/init.d/S90KoumaSwap
    cannot stat 'S90KoumaSwap': No such file or directory

    C:\Documents and Settings\Admin>adb shell
    $ chmod 777 /etc/init.d/S90KoumaSwap
    chmod 777 /etc/init.d/S90KoumaSwap
    link_image[2030]: failed to link chmod
    CANNOT LINK EXECUTABLE
    $ reboot
    reboot
    reboot: Operation not permitted
    $ exit
    exit

    C:\Documents and Settings\Admin>reboot
    'reboot' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Admin>adb reboot

    C:\Documents and Settings\Admin:mad: :( :( :(
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Wizard59

    Wizard59 Well-Known Member


    First off what are you trying to do? Most likely you should not be trying to control your phone from your pc.
     
  3. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓


    :rolleyes:;)
     
  4. Wizard59

    Wizard59 Well-Known Member

    Hey I could do that but then again I already have my sd card partitioned the way I want it and am not using a swap partition until I get my new card because when I put the swap file as internal storage on my phone like those instructions are for I get an error trying to backup in CWM.

    @Kouma or anyone else better at scripting than I am I have a question.

    Is there a way to mount an internal swap partition on startup and unmount it on shutdown that way it doesn't return a mount error in CWM when doing a backup or is that error because it has been made into a swap partition and not that it is mounted as one?
    If error is because it is swap is there a way to convert it back?
     
  5. cwhatever

    cwhatever Life Goes On

    Why not put the swap on sd card? Either data or ssm works great on sd and is cake easy to reformat and put everything back on sd?
     
  6. Wizard59

    Wizard59 Well-Known Member

    That is what I am gonna do when I get new sd card. In the meantime I am using old cheap slow 8GB card. Gonna get 32GB looking at a uhs-1 enabled card wondering if it will work in this thing. Gonna go SSM with new card running data right now but running fine without swap atm.

    EDIT: Part of me is just curious about the swap on phone error thing. And if what I was asking about was even possible. I mean if I wasn't so lazy I would go ahead and backup then mkswap on the internal data partition without mounting it as swap and see if I still get the error in CWM when trying to backup.
     
  7. cwhatever

    cwhatever Life Goes On

    Well that'll be good for you. I'm running the Ssm with the swap I got tons extra space I got lots of apps data that's all stored on the SD card I probably got like 40 folders on the SD card from the apps and still have tons of space left with a 16 gig card.
    As for putting the swap on the internal I don't know about that.
     
  8. Wizard59

    Wizard59 Well-Known Member

    I use lots of storage on the sd card I keep all kinds of non phone related stuff on it. This is the 4th phone this sd card has been in so its time for an upgrade. With a 2GB ext4 data partition and the rest storage I keep around 1GB free so I can do a backup when I need to. Plus things I am not sure of I just like to try to figure them out. The more I play the more I learn.
     
  9. inigomontoyasr

    inigomontoyasr Android Enthusiast

    the internal swap can't be mounted for backup because cwm is set up for rfs or ext4 partitions. swap support was added to the kernel some time after cwm was built.

    to eliminate the error, format /data in cwm before you do the backup.

    you could make a script with mkswap and swapon and run it when you start up using an app like anycut or script manager or you could stick it in the init.d folder.

    i can't think of a way to automatically reformat the /data partition on shutdown.
     
    Wizard59 likes this.
  10. Koumajutsu

    Koumajutsu Android Expert
    Thread Starter

    It's generally considered a no-no to start processes when shutting down.

    also, making stl13 swap can cause some strange things to happen, like random shutdowns.

    I personally have /dev/stl13 formatted as ext4, mounted to /system/swap.
    the only file on it is swapfile0 which is a swapfile made to take up all of /dev/stl13.

    I have a script in init.d mount /dev/stl13 as /system/swap, but it's giving me problems as of late
     
  11. Wizard59

    Wizard59 Well-Known Member

    I got it figured out. Now if I can figure out how to package it into a cwm installable zip.

    EDIT:
    Well the way I am thinking it would be at shutdown but initially before shutdown.

    EDIT AGAIN:
    I never had issues when mounted as swap except for the unable to mount /data error in CWM.
     
  12. Wizard59

    Wizard59 Well-Known Member

    @kouma
    I have been thinking about what you said about the random shutdowns. I did not experience that while I was running the swap on the /data partition. How often did this happen? Is it possible that the swap was just overloading? I ask because I know on my windows 7 machine with 6GB of RAM my pagefile which is virtual memory same as a swap would sometimes get over 16GB and start to lag the PC if I didn't do a restart every 3-4 days. Is it possible that could be the issue and if so how hard would it be to create a script to say purge the swap every 6-8 hrs? I am still new at the scripting itself but I know how to reformat and recreate the swap file through terminal so script should not be hard its just the timing I am unsure of.
     
  13. Rjr12

    Rjr12 Lurker

    Dear koma need instructions on how to use this new ssm feature


    help, slow prevail......:(
     
  14. cwhatever

    cwhatever Life Goes On

    how to use or how to setup?
    what are you running now?
     
  15. Twisted21

    Twisted21 Member

    OK this seems to be a day of device issues. Prevail has become way to laggy way to often. I am running data mode with a 700 mb swap partition. I have /dev/block/mmcblk0p3 for swap, swappiness 60. What else can i do to help out with memory? Add another file? Create an internal swap file system? I am still learning my way around custom roms/ kernals so any advice would be much appreciated . I did some reading on creating an internal swap file system and it looks like you have to open an adb shell and some scripting might be involved? I do have Jrummy's Toolbox Pro which has the capability of both. Although I have not done either of these processes yet I am willing to give it a shot if creating an internal swap file system is what I need. Thx in advance for all efforts to help. One more thing switching to SSM mode will only help out with internal storage issues not memory, correct?
     
  16. cwhatever

    cwhatever Life Goes On

    In data mode mine is way slow and in ssm is way fast for me.
     
  17. Twisted21

    Twisted21 Member

    Thx bro I will try it out.
     
  18. brad74

    brad74 Well-Known Member

    Oh okay so using ssm setting is a whole lot better than data?

    Because I am using data with half-ass rom and it lags a lot.....very sluggish.
     
  19. The~Skater~187

    The~Skater~187 Android Expert

    What class is your sd card? Data mode works better on higher class cards. Ssm works very well with lower class cards.
     
  20. wetbiker7

    wetbiker7 Extreme Android User

    Just my personal opinion, the SSM is the way to go. It's fast with lower class sd cards and blazing fast with higher class cards. Even though I ran class 10 cards, i still got occasional lag when running data mode.
     
  21. Twisted21

    Twisted21 Member

    I was running data mode with a class 10 card and anytime ram was under 50 MB it lagged horribly. Just switched to ssm and have yet to reinstall all user apps. I have like 80

    NOTE: TB restore did not work switching between data and ssm! Also ssm does not show sdext partition value (internal storage). Menu/applications/storage, internal will show like you don't have the extra partition space.

    I only mention this cause it through me off and I thought I had done something wrong till I was informed otherwise. You will also notice when you install apps the available internal storage value does not change, maybe by one. This is how I know ssm is working. Wetbiker7 and LV schooled me through this day before yesterday:D
     
  22. brad74

    brad74 Well-Known Member

    I have a class 4 card.

    Sent from my SPH-M820-BST using Tapatalk 2
     
  23. Twisted21

    Twisted21 Member

    Hey android finatics! I am trying to get ssm going and although I haven't reinstalled most of my apps yet I do feel like my Prevail is not lagging like in data however I do not like that I don't have access to files I could get to before but I have noticed alot more app fc. Is this normal when running ssm?
     
  24. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    Which files are you referring to? And no, SSM shouldn't cause fc's. What is fc'ing?
     
  25. Twisted21

    Twisted21 Member

    Multiple apps. Rom toolbox which had some issues prior but more frequent now, of course they just released major update today and there are issues. com.android.vending of course and yes I did clear cache, no help. And others. Was trying to send you,lv, a screenshot o[​IMG]
     

    Attached Files:

Samsung Galaxy Prevail Forum

The Samsung Galaxy Prevail release date was April 2011. Features and Specs include a 3.2" inch screen, 2MP camera, GB RAM, MSM7627-3 processor, and 1500mAh battery.

April 2011
Release Date
0
Reviews
Loading...
Similar Threads - Virtual Memory
  1. LuckyBit33
    Replies:
    9
    Views:
    684
  2. h110m
    Replies:
    0
    Views:
    1,062
  3. wurth
    Replies:
    0
    Views:
    1,454
  4. ivanburyy1r64rewtr
    Replies:
    15
    Views:
    2,831
  5. kumaranil13k
    Replies:
    7
    Views:
    2,490
  6. kumaranil13k
    Replies:
    11
    Views:
    1,520
  7. App Update
    Replies:
    0
    Views:
    443
  8. Alex Lima
    Replies:
    0
    Views:
    820
  9. Yoha Glez
    Replies:
    4
    Views:
    1,106
  10. Uberguy
    Replies:
    2
    Views:
    3,072

Share This Page

Loading...