Jump to content

Google Nexus 7 2012 (asus-grouper): Difference between revisions

From postmarketOS Wiki
Okias (talk | contribs)
Gull Code (talk | contribs)
UI options: Added XFCE4 since I can confirm it works
Tags: mobile edit mobile web edit
Line 232: Line 232:
* Weston: Boots on legacy kernel. Touchscreen is working on legacy kernel. The reboot issue exists on legacy kernel. Maybe it is an issue with the kernel we are using?
* Weston: Boots on legacy kernel. Touchscreen is working on legacy kernel. The reboot issue exists on legacy kernel. Maybe it is an issue with the kernel we are using?
* Phosh (mainline only): Purism Librem 5 compositor and GNOME based environment, needs performance optimization, but works.
* Phosh (mainline only): Purism Librem 5 compositor and GNOME based environment, needs performance optimization, but works.
* Xfce4 (mainline only): Xfce4 is a GTK-based desktop environment aiming to be fast and lightweight. Needs performance optimization, but works. Follow the guide at https://wiki.postmarketos.org/wiki/XFCE4 for adjustments.


== Development Notes ==
== Development Notes ==

Revision as of 18:03, 19 January 2020

Google (ASUS) Nexus 7 (2012)
Google Nexus 7
Google Nexus 7
Manufacturer Google (ASUS)
Name Nexus 7 (2012)
Codename asus-grouper & asus-tilapia
Released 2012
Hardware
Chipset Nvidia Tegra 3
CPU Quad-core 1.2 GHz Cortex-A9
GPU ULP GeForce
Display 800x1280 IPS
Storage 8/16/32 GB
Memory 1 GB
Architecture armv7
Software
Original software Android 4.1.2 on Linux 3.0
postmarketOS
Category testing
Pre-built images no
Mainline partial
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Partial
Audio
Works
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Works
GPS
No data
NFC
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data

Maintainer(s)

  • okias

Contributors

  • antonok
  • pangelo

Users owning this device

  • 00p513
  • Antonok
  • Baonks81 (Notes: Hw rev.E1565 no GSM - 6 tablets software 3d accelerate on ALARM with grate-driver LLVMpipe built)
  • Bczeman
  • Blitztide
  • BogdanTheGeek (Notes: E1565 no GSM)
  • Clamor (Notes: pmOS with Grate kernel and U-Boot)
  • Ecloud
  • Eloy
  • GloomyJD (Notes: Works, very weak battery)
  • Gull Code (Notes: OK,daily use with XFCE4. See my profile if you want to have automatic rotation and light with Asus grouper sensor daemon or jump to https://gitlab.com/gullradriel/asus-grouper-nexus-7-sensor-daemon)
  • Hilledkinged (Notes: Revived from corrupt bootloader)
  • Isot42 (Notes: OK PM269 version)
  • Joshaspinall (Notes: PM269)
  • LongnoseRob (Notes: 2x E1565 type, pmOS (edge) w/ u-boot, UI: mate)
  • Maff (Notes: Multiple)
  • Mattdaha
  • Misopog (Notes: Like new, unlocked, stock)
  • Nergzd723 (Notes: emmc dead, bct partition intact, possible to fusee-gelee)
  • Okias (Notes: OK, HW rev.E1565 (asus-tilapia))
  • Pangelo (Notes: original grouper (non-GSM) model)
  • Pojntfx
  • Progressnoize (Notes: Screen broken)
  • Roboe (Notes: (borrowed) variant: grouper, version-hardware: ER3; HW rev. E1565; running pmOS edge with U-Boot bootloader)
  • Roboe (Notes: (borrowed) variant: grouper; version-hardware: ER3; HW rev. E1565; broken battery)
  • Russanandres (Notes: Cyanogenmod 11, using for old gaiming)
  • Segfault (Notes: x3 - 2 16GB and 1 32GB)
  • The Arjdroid (Notes: Impressive! Works with phosh & xfce4, but not daily driveable yet. It needs 3D acceleration for smoother UI, & firefox fix crashes. Great for running it as a no display server like a raspberry pi. Running with xfce4 can make it usable as a smart display like a calendar or something.)
  • Yifei (Notes: bad battery)


Flashing

How to enter flash mode

  • Connect a USB cable
  • Power the device off
  • Hold power + volume down
  • fastboot should work when the green android appears on the screen

Installation process (legacy kernel)

$ git clone https://gitlab.com/postmarketOS/pmbootstrap.git
$ cd pmbootstrap
$ ./pmbootstrap.py init
$ ./pmbootstrap.py install
$ ./pmbootstrap.py flasher flash_kernel

Instalation process (mainline kernel)

Not merged into pmOS yet, so if you want mainline use this repository for now.

$ git clone https://gitlab.com/Alpine-Mobile/pmbootstrap.git
$ cd pmbootstrap
$ ./pmbootstrap.py init
$ ./pmbootstrap.py install
$ ./pmbootstrap.py flasher flash_kernel


Special installation process (development setup, kernel over approx. 4M)

If you need bigger kernel, this includes way to the latest mainline kernel with size limited only by BOOT partition or how much device will be able boot it:

mkdir ~/code
cd ~/code
git clone https://gitlab.com/alpine-mobile/pmbootstrap.git
cd pmbootstrap
alias pmbootstrap=~/code/pmbootstrap/pmbootstrap.py
pmbootstrap init
# pmbootstrap initfs hook_add debug-shell # not required, only for debugging
pmbootstrap export
pmbootstrap chroot -- apk add abootimg android-tools mkbootimg dtbtool findutils
export DEVICE="$(pmbootstrap config device)"
export WORK="$(pmbootstrap config work)"
export TEMP="$WORK/chroot_native/tmp/mainline/"
mkdir -p "$TEMP"

cd ~/code
git clone https://github.com/okias/linux.git
cd linux
source ~/code/pmbootstrap/helpers/envkernel.sh

sudo curl -o .output/.config https://gitlab.com/alpine-mobile/pmaports/raw/master/device/linux-asus-grouper/config-asus-grouper.armv7
sudo sed -i "s|CONFIG_INITRAMFS_SOURCE=\"\"|CONFIG_INITRAMFS_SOURCE=\"initfs-extracted\"|" .output/.config
pmbootstrap initfs extract # ugly hack to get kernel booting without external initrd
sudo cp -r ~/.local/var/pmbootstrap/chroot_rootfs_asus-grouper/tmp/initfs-extracted ./.output/ # initfs is later compiled into kernel

make -j5

cd ~/code/linux/.output/arch/arm/boot
cat zImage dts/tegra30-grouper-bach.dtb > ~/code/linux/.zImage-dtb
cp ~/code/linux/.zImage-dtb "$TEMP"/zImage-dtb

pmbootstrap flasher list_devices
a. Boot only
pmbootstrap chroot -- fastboot boot /tmp/mainline/zImage-dtb
b. Flash kernel:

We're still not able bundle classic boot.img, so we need generate boot.img without ramdisk (which is already included inside kernel).

pmbootstrap chroot -- mkbootimg-osm0sis --kernel "/tmp/mainline/zImage-dtb" --base "0x10000000" --kernel_offset "0x00008000" --ramdisk_offset "0x01000000" --tags_offset "0x00000100" --pagesize "2048" -o "/tmp/mainline/boot.img"
pmbootstrap chroot -- fastboot boot /tmp/mainline/boot.img # test if image will boot
pmbootstrap chroot -- fastboot flash boot /tmp/mainline/boot.img # flash only tested image

Flashing rootfs

rootfs under 650MB

pmbootstrap flasher flash_rootfs

rootfs over 650MB to USERDATA

Be very careful here and feel free to ask on Matrix channel before accidentally bricking your device with selecting bad partition! THIS MAY SHRINK YOUR DATA PARTITION IF YOU INSTALL ANDROID AGAIN! YOU MAY HAVE TO RESIZE IN TWRP!

Prerequisites: Official TWRP, at least version 3.3.1-0 for

if you haven't done export yet, do

pmbootstrap export
# start TWRP
(computer) $ adb shell
(twrp) $ df #look for the data partition. should be something like /dev/block/mmcblk0p10 with /data next to it
(computer again) $ adb push /tmp/postmarketOS-export/asus-grouper.img /dev/block/''_REPLACE_WITH_CORRECT_PARTITION_''
  • grouper has most likely data on mmcblk0p9 but VERIFY!
  • tilapia has most likely data on mmcblk0p10 but VERIFY!

Hardware status (mainline)

There is multiple hardware revisions, so this status may not apply to all of them. This status apply for tilapia (Bach revision).

Status Hardware Info
Y Booting ... but when is kernel larger than approx 4MB, initfs must be packed directly inside kernel (not into boot.img as usual), otherwise kernel won't boot. With downstream kernel it works.
Y Touchscreen Works.
Y USB Works.
Y SDHCI Works.
Y WiFi Wi-Fi works (best with IWD daemon: apk add iwd; rc-config del wpa_supplicant; rc-config add iwd; and HOWTO).
Y GPIO keys There is 3 keys on GPIO: Power, Volume up, Volume down.
Y Battery Driver works.
P Charger there is driver for the charger in upstream kernel, but it doesn't have support for device-tree
Y Bluetooth Works well, it has even BT 4.0, also BT 5.0 headphones works.
Y Sound sound also works, but require ALSA UCM configuration (for now you'll need to enable DACs and etc using alsamixer)

alsamixer -c 0 # and enable something like: "Speaker R" "Speaker L" "DAC MIXR INF1" "DAC MIXL INF1" "SPOL MIX DAC R1" "SPOL MIX DAC L1" "Stereo DAC MIXR DAC R1" "Stereo DAC MIXL DAC L1"

Y Temperature sensor temperature sensor works
Y Proximity sensor
Y Light sensor Driver al3010. Brightness regulation works, install iio-sensor-proxy . It's slightly oversensitive.
N Front camera
P 3D support See Nvidia_Tegra_2_(tegra20)#Graphics
N Modem Present only on tilapia, no-one plan to work on it for now.

UI options

  • Weston: Boots on legacy kernel. Touchscreen is working on legacy kernel. The reboot issue exists on legacy kernel. Maybe it is an issue with the kernel we are using?
  • Phosh (mainline only): Purism Librem 5 compositor and GNOME based environment, needs performance optimization, but works.
  • Xfce4 (mainline only): Xfce4 is a GTK-based desktop environment aiming to be fast and lightweight. Needs performance optimization, but works. Follow the guide at https://wiki.postmarketos.org/wiki/XFCE4 for adjustments.

Development Notes

Kernel

  • The default images for android provided by google have the bootloader broken, meaning it can't be flashed. It does not seem to affect the install process of PostMarketOS, but is something to take into account. If you need a working bootloader image version 4.23 can be found [here]

Graphics

  • (legacy) CONFIG_VT had to be enabled for graphics to work. In menuconfig this is located under Device Drivers -> Character devices -> Virtual terminal.
  • (legacy) /sys/class/graphics/fb0/mode is empty on boot, it must have U:800x1280p-0. This uses the same initfs hook as many other devices. Update: Seems to be correctly set now
  • (legacy) weston with fbdev-backend.so uses pixman-type=3 (PIXMAN_TYPE_ABGR), which now does not require configuration.
  • The touchscreen input device is named elan-touchscreen.

Wifi

  • There's a proper firmware subpackage now, wifi device should work out-of-the box.
  • "Desktop" Linux firmware are outdated. Check here for latest one.
  • (legacy)It is possible to manually get wifi working by manually copying fw_bcmdhd.bin and nvram.txt to their kernel-specified locations and configuring /etc/network/interfaces. At this point, running /etc/init.d/networking restart, gave an error about being unable to get a MAC address. After restarting the device to find that wifi Just Worked™, it was possible to successfully scan for wireless networks and establish a connection to secured wireless APs.
  • To connect follow the instructions on this page.

Pending Issues

  • pmaports#201: device seems to reboot spontaneously under heavy load (could be a hardware problem though, needs more testing). UPDATE:22/12/19 - Seems to noly happen with "legacy" kernel.
  • pmbootstrap#1422: The system partition is too small to hold rootfs images over 650Mb (e.g. Plasma Mobile is about 1.1Gb). Flashing to userdata partition fails.
  • pmbootstrap#1844: grouper: move to grate (upstream close) kernel

See also

These are other pending issues that are related to this device:

  • pmbootstrap#60: Use the system and userdata partition on Android with LVM

Fun Fact

grouper was the first tablet to run pmOS!

tilapia has exactly same HW as grouper