Dobrica Pavlinušić's random unstructured stuff
Galaxy Nexus i9250: Revision 21
Schematics and service manual for i9250: {file: Samsung_i9250_schem_sm.rar}

{toc: }

.pre
127|root@maguro:/ # cat /proc/cpuinfo
Processor : ARMv7 Processor rev 10 (v7l)
processor : 0
BogoMIPS : 1194.24

processor : 1
BogoMIPS : 1194.24

Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10

Hardware : Tuna
Revision : 0009
Serial : 014994b30201c013
.pre

^ BLE

* https://github.com/metc/galaxy-nexus-ble

^ GSM modem over serial port

* https://github.com/2b-as/xgoldmon

^ HID keyboard

* https://github.com/pelya/android-keyboard-gadget

^ Unlegacy Android

ASOP for OMAP4 devices:

https://forum.xda-developers.com/galaxy-nexus/development/rom-omap4-aosp-project-t3334574

https://github.com/Unlegacy-Android/

^^ kernel

http://unlegacy-android.cf/

https://github.com/Unlegacy-Android/android_kernel_samsung_tuna

.pre
dpavlin@klin:/virtual/android/galaxy-nexus$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/

dpavlin@klin:/virtual/android/galaxy-nexus/omap$ git checkout -b asop-7.1 unlegacy/aosp-7.1

dpavlin@klin:/virtual/android/galaxy-nexus/omap$ make tuna_defconfig ARCH=arm

dpavlin@klin:/virtual/android/galaxy-nexus/omap$ cp include/linux/compiler-gcc4.h include/linux/compiler-gcc5.h


dpavlin@klin:/virtual/android/galaxy-nexus/omap$ make -j9 ARCH=arm CROSS_COMPILE=arm-none-eabi-
.pre

^ Links

Somewhat interesting things that I can take a look at some time in the future:

* https://github.com/swetland/omap4boot

^ Odin

* http://glassechidna.com.au/heimdall/

^ serial

* https://wiki.postmarketos.org/wiki/Serial_debugging#USB_debug_cable

{image: Nexus-usb-debug.png}

| Device | Codename | Resistor (R3) | Connected VCC |
| Google Galaxy Nexus (GSM) | samsung-maguro | 619K ohm | No |
| Samsung Galaxy Mini 2 | samsung-s6500d | 530K ohm | No |
| Samsung Galaxy S4 Mini LTE | samsung-i9195 | 619K ohm | No |
| Samsung Galaxy S5 | samsung-klte | 619K ohm | No |

It seems that other suggestion is 150k from https://redmine.replicant.us/projects/replicant/wiki/SamsungSerial - I will have to test which value works

UART modes

* https://wiki.postmarketos.org/wiki/Micro-USB_Interface_Controller

| Resistance | Jig | Boot |
| 150k | Inactive | Inactive |
| 523k | Active | Inactive |
| 619k | Active | Active |

^ PostmarketOS

.pre
dpavlin@nuc:/nuc/pmbootstrap$ ./pmbootstrap.py install --no-fde
[17:54:17] *** (1/5) PREPARE NATIVE CHROOT ***
[17:54:18] *** (2/5) CREATE DEVICE ROOTFS ("samsung-maguro") ***
[17:54:23] (rootfs_samsung-maguro) install
[17:54:27] (rootfs_samsung-maguro) install
[17:54:30] (rootfs_samsung-maguro) write /etc/os-release
[17:54:30] (rootfs_samsung-maguro) mkinitfs samsung-maguro
[17:54:34] *** SET LOGIN PASSWORD FOR: 'dpavlin' ***
New password:
Retype new password:
passwd: password updated successfully
[17:54:43] NOTE: No valid keymap specified for device
[17:54:46] *** (3/5) PREPARE INSTALL BLOCKDEVICE ***
[17:54:47] (native) create samsung-maguro.img (361M)
[17:54:47] (native) mount /dev/install (samsung-maguro.img)
[17:54:47] (native) partition /dev/install (boot: 31M, root: the rest)
[17:54:47] (native) format /dev/installp2
[17:54:48] (native) mount /dev/installp2 to /mnt/install
[Tue Sep 25 17:55:21 2018] EXT4-fs (loop0p2): mounted filesystem with ordered data mode. Opts: (null)
[17:54:48] (native) format /dev/installp1 (boot, ext2), mount to /mnt/install/boot
[Tue Sep 25 17:55:21 2018] EXT4-fs (loop0p1): mounting ext2 file system using the ext4 subsystem
[Tue Sep 25 17:55:21 2018] EXT4-fs (loop0p1): mounted filesystem without journal. Opts: (null)
[17:54:48] *** (4/5) FILL INSTALL BLOCKDEVICE ***
[17:54:48] (native) copy rootfs_samsung-maguro to /mnt/install/
[17:54:53] *** (5/5) FLASHING TO DEVICE ***
[17:54:53] Run the following to flash your installation to the target device:
[17:54:53] * pmbootstrap flasher flash_rootfs
[17:54:53] Flashes the generated rootfs image to your device:
[17:54:53] /nuc/pmbootstrap-work/chroot_native/home/pmos/rootfs/samsung-maguro.img
[17:54:53] (NOTE: This file has a partition table, which contains /boot and / subpartitions. That way we don't need to change the partition layout on your device.)
[17:54:53] * pmbootstrap flasher flash_kernel
[17:54:53] Flashes the kernel + initramfs to your device:
[17:54:53] /nuc/pmbootstrap-work/chroot_rootfs_samsung-maguro/boot
[17:54:53] (NOTE: fastboot also supports booting the kernel/initramfs directly without flashing. Use 'pmbootstrap flasher boot' to do that.)
[17:54:53] * If the above steps do not work, you can also create symlinks to the generated files with 'pmbootstrap export' and flash outside of pmbootstrap.
[17:54:53] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[17:54:53] Done

dpavlin@nuc:/nuc/pmbootstrap$ alias pmbootstrap=/nuc/pmbootstrap/pmbootstrap.py
dpavlin@nuc:/nuc/pmbootstrap$ pmbootstrap flasher flash_rootfs
[17:57:10] (native) flash rootfs image
< waiting for any device >
[Tue Sep 25 17:59:17 2018] usb 2-3.1: new high-speed USB device number 22 using xhci_hcd
[Tue Sep 25 17:59:17 2018] usb 2-3.1: New USB device found, idVendor=18d1, idProduct=4e30, bcdDevice= 1.00
[Tue Sep 25 17:59:17 2018] usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Tue Sep 25 17:59:17 2018] usb 2-3.1: Product: Android 1.0
[Tue Sep 25 17:59:17 2018] usb 2-3.1: Manufacturer: Google, Inc
[Tue Sep 25 17:59:17 2018] usb 2-3.1: SerialNumber: 014994B00C01A013
target didn't report max-download-size
Erasing 'system'...
OKAY [ 0.047s]
Sending 'system' (369664 KB)...
OKAY [ 50.498s]
Writing 'system'...
OKAY [ 26.436s]
Finished. Total time: 77.024s
[18:00:02] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[18:00:02] Done
dpavlin@nuc:/nuc/pmbootstrap$ [Tue Sep 25 19:24:27 2018] usb 2-3.1: USB disconnect, device number 22
[Tue Sep 25 19:24:27 2018] usb 2-3.1: new high-speed USB device number 23 using xhci_hcd
[Tue Sep 25 19:24:27 2018] usb 2-3.1: unable to get BOS descriptor
[Tue Sep 25 19:24:27 2018] usb 2-3.1: New USB device found, idVendor=0451, idProduct=d010, bcdDevice= 0.00
[Tue Sep 25 19:24:27 2018] usb 2-3.1: New USB device strings: Mfr=33, Product=37, SerialNumber=0
[Tue Sep 25 19:24:27 2018] usb 2-3.1: Product: OMAP4440
[Tue Sep 25 19:24:27 2018] usb 2-3.1: Manufacturer: Texas Instruments
[Tue Sep 25 19:24:30 2018] usb 2-3.1: USB disconnect, device number 23
.pre