[Xperia Z1 Compact Android Development] lovalim:
Hey guys ubuntu developer is also working on xperia z series rom. if you can take some help from there.

---------- Post added at 11:18 AM ---------- Previous post was at 11:17 AM ----------

https://wiki.ubuntu.com/Touch/Devices/minato

---------- Post added at 11:18 AM ---------- Previous post was at 11:18 AM ----------

https://wiki.ubuntu.com/Touch/Devices/minato

---------- Post added at 11:19 AM ---------- Previous post was at 11:18 AM ----------

Port status

The port is in its early steps and feature set differs between devices, there are many things that do not work. Some of the stuff that does work is:

Device

what is working

known issues

Z1 (honami)

Unity8/wifi/SMS/data/audio

Power handling/BT/camera/MHL/phone calls

Z Ultra (togari)

Unity8/wifi/SMS/data/audio

Power handling/BT/camera/MHL/phone calls

Z2 Tablet(castor)

Unity8/audio

Power handling/BT/camera/MHL

Z3 Tablet compact(scrorpion)

Unity8/audio

Power handling/BT/camera/MHL

Z5 (sumire)

Unity8/wifi/SMS/data/audio

Power handling/BT/camera/MHL/phone calls

Z5 compact (suzuran)

Unity8/wifi/SMS/data/audio

Power handling/BT/camera/MHL/phone calls

Generic known issues

Power handling.

Device does not power off completely. When usb cable is plugged and unplugged, power button fails to switch off screen.

suspend does not works properly

MHL does not work

Camera does not work and eventually crashes device

phone calls do not work

generic stability

Development tips

(re)building boot image

Toggle line numbers

1 $ make bootimage

2 - repackage boot image without rebuilding dependencies

3 $ make bootimage-nodeps

(re)build recovery image

Toggle line numbers

1 $ make recoverytimage

2 - repackage boot image without rebuilding dependencies

3 $ make recoveryimage-nodeps

repackage android ramdisk. !! Android ramdisk is contained in Android system image

Toggle line numbers

1 $ make ramdisk-nodeps

rebuild Android part without checking dependencies

Toggle line numbers

1 $ make snod

Build Ubuntu image ( this will download latest rootfs and custom adds local Android image and packs all in image)

Toggle line numbers

1 $ make ubunturootfsimage

re-build Ubuntu image without checking dependencies, use this to create image with local changes

Toggle line numbers

1 $ make ubunturootfsimage-nodeps

build device package

Toggle line numbers

1 $ make device package

2 - without checking dependencies

3 $ make devicepackage-nodeps

rebuilding Ubuntu image, with new changes contained in Android image

Toggle line numbers

1 - build changes in Android code

2 $ make

3 - copy updated Android image so it is picked when we are repacking Ubuntu image

4 $ cp out/target/product/<product-name>/system.img out/target/product/<product-name>/ubuntu/rootfs/var/lib/lxc/android/system.img

5 - repack Ubuntu rootfs without checking dependencies

6 $ make ubunturootfsimage-nodeps

rapid development with adb sync

When doing changes on Android side, sometimes there is need for quick iterations, for this case best is to use adb sync feature. You will have to make sure to use eng build, as you will need to run adb daemon as root. You will also have to make sure to have enough spare space in Android system image.

Toggle line numbers

1 Preconditions:

2 - Preparation: prepare Android system image with 30MB padding space

3 $ BOARD_SYSTEMIMAGE_PARTITION_PADDING=3145728 make -j8

4 or without dependencies

5 $ BOARD_SYSTEMIMAGE_PARTITION_PADDING=3145728 make snod -j8

6 - Create Ubuntu image with new Android system image

7 $ cp out/target/product/<product-name>/system.img out/target/product/<product-name>/ubuntu/rootfs/var/lib/lxc/android/system.img

8 $ make ubunturootfsimage-nodeps -j8

9

10 - Flash device with new Ubuntu image.

11 - once device is booted, using adb add following two files:

12 $ touch /userdata/.writable_image

13 $ touch /userdata/.writable_device_image

14 - reboot

15 - once device is booted, check that '/' and '/android/system' are mounted as 'rw'

16

17 Iterating through changes:

18 - restart adb as root

19 $ adb root

20 - make and compile changes in Android, you do not need to run make in root, to recreate Android system image

21 - e.g.

22 $ mmm frameworks/av/media/libmedia

23

24 - sync all changes with device. Be careful if you change is executable can you restart it, if it's shared lib, can you make system reload it, if it's config file can you make system reload it? Ultimately reboot is always safest option if you do not know

25 $ adb sync