2

All I am trying to do this. After many trials, I succeed with 'telnet' and 'power' commands, still I was unable to execute with 'ulimit' command.

After 'telnet' to 'localhost 5554', I'm trying 'ulimit' command. But always it is returning error 'KO: unknown command, try 'help''.

Am I really using this in correct place? pls help me.

Community
  • 1
  • 1
Venkatesh Achanta
  • 624
  • 1
  • 14
  • 31
  • I'm using windows7 OS. – Venkatesh Achanta Jul 17 '14 at 02:22
  • There may not be a ulimit command - it might be necessary to build your own against the relevant kernel calls. However, it may also not be trivial to get it to do what you want; first it's only going to do much of anything on a rooted device or emulator, the variety of user accounts used as well as zygote may complicate things, etc. On an emulator it would be easier to simply create an avd with reduced memory. – Chris Stratton Jul 21 '14 at 14:30
  • 1
    `ulimit` command is not used with the Android console it's used with the OS shell itself. when you telnet to the port 5554 it gives you the options of the Android console and emulator like virtual image options - itself and not of the Android Linux OS. The `ulimit` is the *nix command and you should use the `adb shell` to connect to the running android system then run your linux `ulimit` command. use `adb devices` command then if you see it running use the `adb shell`. the adb is usually located in the `$your_android_sdk_path/platform-tools/`. Cheers – Sergey Benner Jul 21 '14 at 14:33

1 Answers1

0

Simulate is a broad term however as your question tag indicates you want to do this on an avd, the following might help you out if you are using eclipse.( I am sure there is a way to do the same in other IDE's as well).

Define Eclipse use of Heap Size

You can always increase or decrease the amount of memory available to eclipse. Doing this you can reduce the amount of memory available for the avd to function. This link quite aptly describes how to manipulate the memory available for eclipse to use.

You can choose whatever max memory "size" eclipse is allowed to use, therefore your avd is also bounded by that limitation. This will make the whole process of development slow however and might even cause a java heap size error. However I think that's the error you want to "simulate" anyway.

Community
  • 1
  • 1
SeahawksRdaBest
  • 868
  • 5
  • 17