xenogenesi::blog
memento
3d adt android apache2 app apt aria2 build bullet cflags chromium codeigniter debian demoscene dependencies dpkg driver emulator freeglut gcc gfx git glut htaccess javascript json kernel linux make metalink minimal mysql opengl php python raspbian realtime rpi specs template toolchain update-alternatives video wifi wordpress

reinstalling google play store

If for some reason you’ve uninstalled the play store and you don’t trust third party mirrors, you can use the adb tool do download the apk from another phone.

Thanks to this SO answer: How do I get an apk file from an Android device?

adb shell pm path com.android.vending
adb pull /data/app/com.android.vending-2/base.apk  /tmp/com_android_vending-2-base.apk

android studio vm tmpdir – no space left on device

Create a new vmoptions file with the tmpdir value only in a place where won’t be replaced by android-studio installation

echo "-Djava.io.tmpdir=$HOME/install/android-studio/tmp" >$HOME/install/android-studio-tmpdir.vmoptions

Create a wrapper

#!/bin/sh    
export STUDIO_VM_OPTIONS=$HOME/install/android-studio-tmpdir.vmoptions
exec $HOME/install/android-studio/bin/studio.sh

reference

Android minimal app

reference “Minimal” source files to create Android app using Eclipse + ADT

Shell script + zip (with icons) to create a minimal App, tested with adt-bundle-linux-x86-20140702.
Icons created with AndroidAssetStudio.

android-minimal.zip

Android emulator

Some info.

Host GPU

Here’s the deal. Host GPU is only supported for AVD devices that are using API 15 or later. You also have to have Android SDK Tools 17 or later installed. Also Host GPU is experimental. All of this is in the emulation documentation: http://developer.android.com/tools/devices/emulator.html

Speed up the Android emulator * on Intel ® architecture

compile C for Android/arm from adt prebuilt

ADB=$(HOME)/dev/a/android/adt-bundle-linux-x86-20130729/sdk/platform-tools/adb

AND_PREBUILT=$(HOME)/dev/a/android/src/prebuilt
AND_PLATFORM=android-8

CC=$(AND_PREBUILT)/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc
#CC=$(AND_PREBUILT)/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc
#CC=$(AND_PREBUILT)/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-gcc
#CC=$(AND_PREBUILT)/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc

CFLAGS += -Wall -O0 -fno-stack-protector
CFLAGS += -mno-thumb
CFLAGS += --sysroot=$(AND_PREBUILT)/ndk/android-ndk-r5/platforms/$(AND_PLATFORM)/arch-arm
CFLAGS += -I$(HOME)/dev/a/android/src/system/core/include
#LDFLAGS += -nostdlib -lc -ldl
#LIBS += $(AND_PREBUILT)/ndk/android-ndk-r5/platforms/$(AND_PLATFORM)/arch-arm/usr/lib/crtbegin_dynamic.o

zergrush_LDFLAGS += -L.
zergrush_LIBS += -ldiskconfig -lcutils

all: zergrush 

%.o: %.c
    $(CC) $(CFLAGS) -c -o $@ $^

libcutils.so libdiskconfig.so:
    $(ADB) pull /system/lib/$@

zergrush: zergRush.o libcutils.so libdiskconfig.so
    $(CC) $(CFLAGS) -o $@ $^ $(zergrush_LDFLAGS) $(zergrush_LIBS)

.PHONY: install
install: zergrush
    $(ADB) push zergrush /data/local/tmp/zergrush
    $(ADB) shell chmod 0755 /data/local/tmp/$(TARGET)

.PHONY: clean
clean: $(wildcard zergrush *.o)
    -[ "$<" = "" ] || rm -fr $<

.PHONY: adb
adb:
    @echo $(ADB)