tesla-android / issue-tracker

Place for reporting issues and discussion with the community
18 stars 1 forks source link

Can't finish the Android install (step 8) #5

Closed eknower closed 2 years ago

eknower commented 2 years ago

Hi, After carefully following the instructions, I'm stuck at step 8 (where the Android should load).

I think that the script doesn't execute. After entering "fastboot reboot" @ step 8, Pi reboots, the I get "Starting kernel..." then screen goes black (for a very long time, I waited like 30-40 minutes.

I don't see anything similar to the screenshot in the guide.

While screen stays black, tried to force restart the Pi (Power cycle). Again - starting kernel, after few seconds black, then nothing.

Tried using Pi4 / 2GB First try - 128GB SD / Windows Second try - 64GB SD / Mac

Exact same behaviour

If it helps - tried to execute "fastboot reboot" while in this states, which return blank.

Any clue?

mikegapinski commented 2 years ago

Could you give me an output of each and every command one by one?

Did you get image out of bootloader and fastboot?

Did you use HDMI 1 as output for the Pi?

After the screen went black, did adb logcat give you any output?

Did you use the most current version of fastboot? Someone pointed out to me it was a requirement after having issues flashing(I’ve updated the guide with the info)

eknower commented 2 years ago

I will do the whole process again, with screenshots for every step. I will first re download fastboot, although I think that I have the current version. HDMI 1 - yes Have not tried adb logcat ( I can try again later, I still have those SD cards)

eknower commented 2 years ago

OK so I did everything again. This time - I got a weird, much longer output on the format:ext4 step. the first 2 times it went smoother, but this time I got a warning.

Screen went black again. ran add logical - nothing.

I then left add logical running, did a manual reboot same think with the pi, kernel starting... adb is still "waiting for device"

please find attached terminal output for all commands + screenshot of the pi after the last reboot command was sent

The major difference seems to be with my system running the script - then "Attempting slot b" - whatever that means, while yours seems to do something else entirely. But that's really not my strong side... Hopefully you can understand better.

Screen Shot 2022-05-08 at 14 25 00

Screen Shot 2022-05-08 at 14 31 11

IMG_5064 (2)

mikegapinski commented 2 years ago

Hmm, it does not look like there is anything major wrong during the flashing itself. However it sure looks like something is off on the last screen. It should say booting slot a, not b - meaning that something is corrupted. Maybe redownload the images?

What kind of usb port do you use for powering the Android Pi while flashing? I used a USB-C with PD.

I also have not tested a Pi 4 with 2GB of RAM, however this could not be making any issues, boards are the same.

Using the same commands you can also try to install this: https://github.com/GloDroid/glodroid_manifest/releases/download/v0.7.1/gd-v0.7.1-rpi4-userdebug.tar.gz

If that won't work something is wrong with your setup, just can't exactly point out what.

If what you are experiencing will be a more common issue I'll make a ready to go image that boots straight to Android after flashing with Raspberry Pi Imager

eknower commented 2 years ago

OK. Did the following:

  1. Downloaded the folder you pointed on your last comment. fastboot did not work on my Mac (maybe something with version) so I swapped that file, but used the images you have there - which I think that are different cause super was splitter into 6 (not 9) this time.
  2. had to swap mke2fs as well - format did not work
  3. right before the last beboot, ran command "fastboot getvar current-slot" - after reading here https://www.droidwin.com/fix-bootloop-a-b-partition-android/, but it said that device does not allows slots
  4. was about to give up - but then ran adb logcat just to make sure - and saw output!!!!
  5. Android is now loading

I'm convinced that the difference in the images is what made the difference

However - I got into android "home" - not setup, and android said there is a problem with my device.

Tried manual reboot, with RJ45 connected

ran adb root

second command gave me an error. please see attached

Screen Shot 2022-05-08 at 15 24 31

mikegapinski commented 2 years ago

The image I linked you won’t work with Tesla Android, it was just a reference to make sure that you’ve got the right version of fastboot :)

One difference between my image and this is that my version requires a stronger power supply on the Pi - glodroid uses powersafe kernel governor that makes the system terribly slow.

the error that you see after booting Android indicates that you have a power delivery issue even when running glodroid…

You can try disconnecting everything from the android pi when it’s being flashed, this should lower the consumption a little bit.

mikegapinski commented 2 years ago

BTW, if swapping fastboot on your Mac did the trick like I suggested you should be able to proceed with Tesla Android.

mikegapinski commented 2 years ago

Other thing to check :) C51FC71C-C8F1-4B21-A8A8-074CDC2EE8EA

eknower commented 2 years ago

OK. So after being stuck for few hours, I decided to do a full reset: New Pi - 4GB New SD card After finishing the steps, I connected the Pi to external PSU - which should give more than enough power.

Android launched almost instantly.

So we might had a broken Pi, but Power is certainly an issue. Could be either the cable I was using or maybe some setting in the Mac. After Android setup launched, I disconnected the pi from psu, returned the connection to my Mac, no-go.

swapped to a usb-c port on my Mac (yeah... I'm stupid, should have used it in the first place) - and it's loading fine now.

Importance for Pi4/4GB PSU is critical during the setup at least

eknower commented 2 years ago

Finished initial Android setup, I'm now fighting my way through CarPlay When I launch AutoKit It doesn't recognise the dongle... Maybe some sort of permissions

ctrai88 commented 2 years ago

Hi, After carefully following the instructions, I'm stuck at step 22 (where the Android should load).

I think that the script doesn't execute. After entering "fastboot reboot" @ step 22, Pi reboots, the I get "Starting kernel..." then screen goes black (for a very long time, I waited like 30-40 minutes.

I don't see anything similar to the screenshot in the guide.

While screen stays black, tried to force restart the Pi (Power cycle). Again - starting kernel, after few seconds black, then nothing.

Tried using Pi4 / 4GB First try - 32GB SD / Windows Second try - 32GB SD / Linux

Exact same behaviour

If it helps - tried to execute "fastboot reboot" while in this states, which return black.

Any clue?

root@pve:/home/platform-tools# ./fastboot devices 100000002c12a466 Android Fastboot

root@pve:/home/platform-tools# ./fastboot getvar current-slot current-slot: a Finished. Total time: 0.000s root@pve:/home/platform-tools# ./fastboot flash gpt deploy-gpt.img Sending 'gpt' (128 KB) OKAY [ 0.018s] Writing 'gpt' OKAY [ 0.096s] Finished. Total time: 0.203s root@pve:/home/platform-tools# ./fastboot flash bootloader bootloader-sd.img Invalid sparse file format at header magic Sending sparse 'bootloader' 1/1 (9056 KB) OKAY [ 0.616s] Writing 'bootloader' OKAY [ 11.931s] Finished. Total time: 12.701s root@pve:/home/platform-tools# ./fastboot flash uboot-env env.img Sending 'uboot-env' (256 KB) OKAY [ 0.022s] Writing 'uboot-env' OKAY [ 0.044s] Finished. Total time: 0.124s root@pve:/home/platform-tools# ./fastboot reboot Rebooting OKAY [ 0.000s] Finished. Total time: 0.100s root@pve:/home/platform-tools# ./fastboot getvar current-slot current-slot: a Finished. Total time: 0.015s root@pve:/home/platform-tools# ./fastboot devices 100000002c12a466 Android Fastboot

root@pve:/home/platform-tools# ./fastboot oem format OKAY [ 0.020s] Finished. Total time: 0.020s root@pve:/home/platform-tools# ./fastboot flash bootloader bootloader-sd.img Invalid sparse file format at header magic Sending sparse 'bootloader' 1/1 (9056 KB) OKAY [ 0.619s] Writing 'bootloader' OKAY [ 11.914s] Finished. Total time: 12.650s root@pve:/home/platform-tools# ./fastboot flash uboot-env env.img Sending 'uboot-env' (256 KB) OKAY [ 0.021s] Writing 'uboot-env' OKAY [ 0.052s] Finished. Total time: 0.176s root@pve:/home/platform-tools# ./fastboot flash recovery_boot boot.img Invalid sparse file format at header magic Sending sparse 'recovery_boot' 1/2 (15332 KB) OKAY [ 1.052s] Writing 'recovery_boot' OKAY [ 2.451s] Sending sparse 'recovery_boot' 2/2 (13740 KB) OKAY [ 0.915s] Writing 'recovery_boot' OKAY [ 5.361s] Finished. Total time: 9.936s root@pve:/home/platform-tools# ./fastboot flash dtbo_a boot_dtbo.img Sending 'dtbo_a' (50 KB) OKAY [ 0.016s] Writing 'dtbo_a' OKAY [ 0.041s] Finished. Total time: 0.158s root@pve:/home/platform-tools# ./fastboot erase misc Erasing 'misc' OKAY [ 0.066s] Finished. Total time: 0.187s root@pve:/home/platform-tools# ./fastboot reboot-fastboot Rebooting into fastboot OKAY [ 0.033s] < waiting for any device > Finished. Total time: 29.697s root@pve:/home/platform-tools# ./fastboot flash boot boot.img Sending 'boot' (65536 KB) OKAY [ 1.991s] Writing 'boot' OKAY [ 4.734s] Finished. Total time: 6.906s root@pve:/home/platform-tools# ./fastboot flash super super.img Invalid sparse file format at header magic Sending sparse 'super' 1/9 (262140 KB) OKAY [ 8.182s] Writing 'super' OKAY [ 15.381s] Sending sparse 'super' 2/9 (262128 KB) OKAY [ 8.146s] Writing 'super' OKAY [ 15.080s] Sending sparse 'super' 3/9 (262116 KB) OKAY [ 8.139s] Writing 'super' OKAY [ 15.420s] Sending sparse 'super' 4/9 (262128 KB) OKAY [ 8.040s] Writing 'super' OKAY [ 15.441s] Sending sparse 'super' 5/9 (262124 KB) OKAY [ 8.159s] Writing 'super' OKAY [ 15.214s] Sending sparse 'super' 6/9 (262140 KB) OKAY [ 8.058s] Writing 'super' OKAY [ 15.627s] Sending sparse 'super' 7/9 (261616 KB) OKAY [ 8.161s] Writing 'super' OKAY [ 15.711s] Sending sparse 'super' 8/9 (262140 KB) OKAY [ 8.070s] Writing 'super' OKAY [ 15.642s] Sending sparse 'super' 9/9 (8116 KB) OKAY [ 0.267s] Writing 'super' OKAY [ 27.242s] Finished. Total time: 218.621s root@pve:/home/platform-tools# ./fastboot format:ext4 userdata Warning: userdata type is raw, but ext4 was requested for formatting. mke2fs 1.46.2 (28-Feb-2021) Creating filesystem with 7126139 4k blocks and 1782368 inodes Filesystem UUID: 71d6491f-876f-4d6a-a007-16fa8dc6974d Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done

Sending 'userdata' (180 KB) OKAY [ 0.020s] Writing 'userdata' OKAY [ 0.044s] Finished. Total time: 0.222s root@pve:/home/platform-tools# ./fastboot format:ext4 metadata Warning: metadata type is raw, but ext4 was requested for formatting. mke2fs 1.46.2 (28-Feb-2021) Creating filesystem with 4096 4k blocks and 4096 inodes

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done Writing superblocks and filesystem accounting information: done

Sending 'metadata' (44 KB) OKAY [ 0.016s] Writing 'metadata' OKAY [ 0.269s] Finished. Total time: 0.405s root@pve:/home/platform-tools# ./fastboot reboot Rebooting OKAY [ 0.012s] Finished. Total time: 0.062s root@pve:/home/platform-tools# ./fastboot --version fastboot version 33.0.1-8253317 Installed as /home/platform-tools/fastboot root@pve:/home/platform-tools# fastboot --version fastboot version 28.0.2-debian Installed as /usr/lib/android-sdk/platform-tools/fastboot root@pve:/home/platform-tools# fastboot --version fastboot version 28.0.2-debian Installed as /usr/lib/android-sdk/platform-tools/fastboot root@pve:/home/platform-tools# root@pve:/home/platform-tools# ./fastboot --version fastboot version 33.0.1-8253317 Installed as /home/platform-tools/fastboot root@pve:/home/platform-tools#

jbtwo commented 2 years ago

@ctrai88 I spent wayyyy too long last night trying to figure this out too. Turns out the culprit was the HDMI cable I was using. I honestly couldn't believe it, especially because I had other issues too with power (couldn't plug in the mouse or ethernet until after flashing). But nope, it was just a bad cable.

After changing the HDMI cable and booting the pi, the android screen came up in less than 60 secs. I also noticed the boot loader screen looked different after swapping the cable. With the bad cable, everything on the boot loader screen was really squished in the middle of the display, but with the new one the bootloader screen now takes up most of the display area. So it might be worth noting how your boot loader screen looks, if it's squished that might be a clue you need to change out the HDMI cable.

ctrai88 commented 2 years ago

tsla1

ctrai88 commented 2 years ago

tsla2

ctrai88 commented 2 years ago

tsla3

ctrai88 commented 2 years ago

tsla4

ctrai88 commented 2 years ago

There was no problem with the HDMI cable.

ctrai88 commented 2 years ago

Power can be a serious problem with these drives,A powered USB hub or a power adapter that puts out 3.5A comes not only just strongly recommended. WGOJQXP27SL6Q0F PU `2UD 1WHWPX}N9UCI0MEMEMLN99I

spoel74 commented 2 years ago

Hi , I have an issue at step 14 while i'm rebooting into fastboot . I expect the message < waiting for any device > but it stays blank. On my display i have the options to reboot system now, enter recovery etc.. I choose reboot system now. After reboot i got an error ' Boot Image header is incorrect adtimg-manipulate dtb.dtbo Android image' Any suggestion?

remco@MBP-van-Remco platform-tools % ./fastboot devices 100000007e14705e fastboot remco@MBP-van-Remco platform-tools % ./fastboot flash gpt deploy-gpt.img Sending 'gpt' (128 KB) OKAY [ 0.016s] Writing 'gpt' OKAY [ 0.039s] Finished. Total time: 0.117s remco@MBP-van-Remco platform-tools % ./fastboot flash bootloader bootloader-sd.img Invalid sparse file format at header magic Sending sparse 'bootloader' 1/1 (9056 KB) OKAY [ 0.734s] Writing 'bootloader' OKAY [ 9.276s] Finished. Total time: 10.106s remco@MBP-van-Remco platform-tools % ./fastboot flash uboot-env env.img Sending 'uboot-env' (256 KB) OKAY [ 0.020s] Writing 'uboot-env' OKAY [ 0.055s] Finished. Total time: 0.122s remco@MBP-van-Remco platform-tools % ./fastboot reboot Rebooting OKAY [ 0.000s] Finished. Total time: 0.000s remco@MBP-van-Remco platform-tools % ./fastboot devices 100000007e14705e fastboot remco@MBP-van-Remco platform-tools % ./fastboot oem format OKAY [ 0.033s] Finished. Total time: 0.033s remco@MBP-van-Remco platform-tools % ./fastboot flash bootloader bootloader-sd.img Invalid sparse file format at header magic Sending sparse 'bootloader' 1/1 (9056 KB) OKAY [ 0.746s] Writing 'bootloader' OKAY [ 9.046s] Finished. Total time: 9.914s remco@MBP-van-Remco platform-tools % ./fastboot flash uboot-env env.img Sending 'uboot-env' (256 KB) OKAY [ 0.020s] Writing 'uboot-env' OKAY [ 0.054s] Finished. Total time: 0.155s remco@MBP-van-Remco platform-tools % ./fastboot flash recovery_boot boot.img Invalid sparse file format at header magic Sending sparse 'recovery_boot' 1/2 (15332 KB) OKAY [ 1.196s] Writing 'recovery_boot' OKAY [ 2.372s] Sending sparse 'recovery_boot' 2/2 (13740 KB) OKAY [ 1.104s] Writing 'recovery_boot' OKAY [ 4.454s] Finished. Total time: 9.253s remco@MBP-van-Remco platform-tools % ./fastboot flash dtbo_a boot_dtbo.img Sending 'dtbo_a' (50 KB) OKAY [ 0.013s] Writing 'dtbo_a' OKAY [ 0.043s] Finished. Total time: 0.151s remco@MBP-van-Remco platform-tools % ./fastboot erase misc Erasing 'misc' OKAY [ 0.057s] Finished. Total time: 0.174s remco@MBP-van-Remco platform-tools % ./fastboot reboot-fastboot Rebooting into fastboot OKAY [ 0.037s] IMG_3521

ctrai88 commented 2 years ago

Step 14 should be to execute fastboot reboot-fastboot, not fastboot reboot.You can try again the problem that can be solved.I execute the instruction fastboot reboot this step can reproduce the issue.

mikegapinski commented 2 years ago

@ctrai88 You are wrong, the command in the guide is correct but won't work with older fastboot versions

ctrai88 commented 2 years ago

I know that the official guidelines are correct. I mean to execute fastboot reboot will cause the issue to arise.

galosre commented 2 years ago

Did you read this Make sure to use a recent version from https://developer.android.com/studio/releases/platform-tools ?