-
Increasing Java Heap size in Android from source code
Under /frameworks/base/core/jni/ there is a file called AndroidRuntime.cpp where the Dalvik VM parameters are set. You can do a search over the file for “dalvik.vm.heapsize” and you will find out something like this:
/*
* The default starting and maximum size of the heap. Larger
* values should be specified in a product property override.
*/
strcpy(heapstartsizeOptsBuf, "-Xms");
property_get("dalvik.vm.heapstartsize", heapstartsizeOptsBuf+4, "4m");
opt.optionString = heapstartsizeOptsBuf;
mOptions.add(opt);
strcpy(heapsizeOptsBuf, "-Xmx");
property_get("dalvik.vm.heapsize", heapsizeOptsBuf+4, "16m");
opt.optionString = heapsizeOptsBuf;
mOptions.add(opt);
change “16m” for any other value, taking into account, the available memory in your device. For example, setting the heap size to 48m it is a good choice in a Beagleboard xM or Beaglebone Black, both with nearly 512Megabytes of RAM.
-
Installing busybox (for Android) on BeagleBoard
Busybox
BusyBox provides several stripped-down Unix tools in a single executable file. It runs in a variety of POSIX environments such as Linux, and Android. Some of these tools are
- ssty
- su
- gzip
- ping
- netstat
- tar
- arp
- wc
- microcom
Why is busybox necessary on a BeagleBoard running Android?
The default Android build does not have many useful tools like stty, so there it is where this swiss army knife comes to rescue.
Installing busybox
- Download ‘busybox’ from http://benno.id.au/android/busybox
- Connect to the board using ADB.
./adb shell - Create a busybox directory inside data.
mkdir /data/busybox - Exit ADB.
exit - Push the downloaded file to the board.
./adb push busybox /data/busybox/busybox - Enter Shell again.
./adb shell - And change permission in order to let any app execute busybox.
chmod 777 /data/busybox/busybox
-
ADB over Ethernet in BeagleBoard
Setting up device
First of all we need to ensure that we have an Ethernet connection up and running. Connect your PC to the Beagleboard using a USB to Serial converter. USB side on your host and Serial on the RS232 debug port of the Beagleboard.
Then connect using minicom (or any other term program) at 115200bps 8N1. This will let you access a simple linux shell. At the prompt type:
root@android:/ # netcfg
You should see something like
lo UP 127.0.0.1/0
sit0 DOWN
usb0 UP 192.168.1.118/24
if not, try runningnetcfg eth0 dhcpornetcfg usb0 dhcpin order to obtain a connection.
Once the connection is established, we will change the ADB TCPIP port and then restart ADB Daemon (adbd)
root@android:/ # setprop service.adb.tcp.port 5555
root@android:/ # stop adbd
root@android:/ # start adbd
Setting up host
Back on your host machine, start ADB in TCPIP mode and then connect to your device like this
$ sudo ./adb tcpio 5555
$ sudo ./adb connect 192.168.1.118
Once you are connected you can check that everything is working running an adb command like:
$ sudo ./adb devices
List of devices attached
192.168.1.118:5555 device
or
$ sudo ./adb logcat
-
How to setup a Blackberry 10 for development over WiFi

On the device
On the home screen, swipe down from the top of the screen.
Tap Settings > Security and Privacy > Development Mode.
Tap Development Mode from the list of security options.
Tap the Use Development Mode toggle switch. If prompted, type the password for your device, and tap OK.On the Host (Using Google ADT + Blackberry SDK)
Right click on the project -> BlackBerry Tools -> Configure Targets -> run “BlackBerry Development Setup Wizzard”

press “Next” and check “Device connected using Wi-Fi”. Complete “IP Address” with your BB10’s IP and “Password” with your device password.

Once the wizzard connected to your device, it will ask for your BlackBerry Code Signing Keys. You can get your keys filling out the BlackBerry Signing Key Order Form.

It is recommend to save your Signing Keys and Developer Certificate once they were generated.
In order to run code on the device, a device token must be generated and uploaded to the BB10.

Uploading the Debug Tokens is the last step in the Wizzard. Then a summary appears, and we are done!














