How to enable zramfs in android...

Corey Sheldon sheldon.corey at gmail.com
Fri May 23 08:38:16 EDT 2014


works on linux desktop may also work on android:


cat /proc/swaps: (should readout)
/dev/block/zram0                 52M (as kb readout most likely)

if it shows a different slice path (/dev/zram0 for example) use swapon
/that/mapping/path

also try swapon -p 100 -v -a /dev/block/zram0  as this adds the following
flags to  activate ALL visible swaps and add a verbose function to create
readout that may help in debuging issue

Corey W Sheldon
Owner, 1st Class Mobile Shine
310.909.7672
www.facebook.com/1stclassmobileshine


On Fri, May 23, 2014 at 5:21 AM, sandeep kumar <coolsandyforyou at gmail.com>wrote:

> >>In my system /dev/zram0 is not present but sys/block/zram0 is present.
> thats why i m having this doubt
> just now i found that we have zram0 in /dev/block/zram0
> i tried the command you told,
>
> *root at kleoslte:/ # swapon -p 100 /dev/block/zram0*
> *swapon -p 100 /dev/block/zram0*
> *swapon failed for /dev/block/zram0*
>
> is there anything else that i can try?
>
>
>
> On Fri, May 23, 2014 at 2:18 PM, sandeep kumar <coolsandyforyou at gmail.com>wrote:
>
>> Dear Anders
>>
>> >Yes, zram is activated, otherwise you wouldn't have had zram0 created.
>>
>> >Though you might not be using it...
>> >If you want to use it for swap, you'll have to run `swapon -p 100
>> /dev/zram0`.
>> >Well, '-p 100' isn't necessary, it's just to set the swap priority.
>>
>> In my system /dev/zram0 is not present but sys/block/zram0 is present.
>> thats why i m having this doubt
>>
>> thanks
>> sandeep
>>
>>
>> On Thu, May 22, 2014 at 4:56 PM, Anders Darander <
>> anders.darander at gmail.com> wrote:
>>
>>> On 22 May 2014 12:58, sandeep kumar <coolsandyforyou at gmail.com> wrote:
>>> > Dear All,
>>> >
>>> > we are trying to make use of zramfs. In our android based board,
>>> > we are seeing this output,
>>> >
>>> > root at sandeep:/sys/block/zram0 # ls
>>>
>>> >
>>> > Does this mean zram is activated ?
>>>
>>> Yes, zram is activated, otherwise you wouldn't have had zram0 created.
>>>
>>> Though you might not be using it...
>>> If you want to use it for swap, you'll have to run `swapon -p 100
>>> /dev/zram0`.
>>> Well, '-p 100' isn't necessary, it's just to set the swap priority.
>>>
>>> > we are trying to do the operation to set disk size,
>>> > echo $((50*1024*1024)) > /sys/block/zram0/disksize
>>>
>>> This should have set the size of zram0.
>>>
>>> Cheers,
>>> Anders
>>>
>>> --
>>> Anders Darander
>>> EPO guidelines 1978: "If the contribution to the known art resides
>>> solely in a computer program then the subject matter is not
>>> patentable in whatever manner it may be presented in the claims."
>>>
>>
>>
>>
>> --
>> With regards,
>> Sandeep Kumar Anantapalli,
>>
>
>
>
> --
> With regards,
> Sandeep Kumar Anantapalli,
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140523/439de658/attachment.html 


More information about the Kernelnewbies mailing list