Getting Error Flashing Android Things with Starter Kit - android-things

I recently picked up an Android Things Kit at Google Developer Days India. I was trying to setup it up via my Mac. I downloaded the Android Things Setup Utility from the Android things console. I tried to run it and it started installing the firmware. It stopped saying "Exit Status 1". What am i doing wrong?
Android Things Setup Utility (version 1.0.16)
============================
This tool will help you install Android Things on your board and set up Wi-Fi.
What do you want to do?
1 - Install Android Things and optionally set up Wi-Fi
2 - Set up Wi-Fi on an existing Android Things device
1
What hardware are you using?
1 - Raspberry Pi 3
2 - NXP Pico i.MX7D
3 - NXP Pico i.MX6UL
2
You chose NXP Pico i.MX7D.
Looking for devices... This can take up to 3 minutes.
found device
Unzipping image...
Flashing Android Things. This will take a few minutes...
*Do not disconnect or interrupt!*
target reported max download size of 419430400 bytes
sending 'bootloader' (559 KB)...
OKAY [ 0.018s]
writing 'bootloader'...
OKAY [ 0.250s]
finished. total time: 0.268s
rebooting into bootloader...
OKAY [ 0.000s]
finished. total time: 0.000s
target reported max download size of 419430400 bytes
sending 'gpt' (33 KB)...
OKAY [ 0.004s]
writing 'gpt'...
OKAY [ 0.434s]
rebooting into bootloader...
OKAY [ 0.000s]
finished. total time: 0.439s
target reported max download size of 419430400 bytes
Error: error flashing android things: exit status 1
Stopping adb server...
Stopped adb server...

For my case, it is because MacOS does not provide mke2fs.
I found one in the unzipped image folder (android-things-setup-utility/quickstart-temp/unzipped/mke2fs).
And run mv android-things-setup-utility/quickstart-temp/unzipped/mke2fs /usr/local/bin
Hope this can help.

Related

iOS App: React-Native <Image> loading stops loading after a period of time in App

We have built an iOS app using react-native and the react-native-tra k-player package along with the component. THe app was built successful and tested on the the iphpne 12 Max along with many other iphone models as the app is already available in the Apple Store under "Trop Rockit Radio". The app has an issue where after a period of time the component fails to load images into the app with a 'Netweork request failed' error. The app loads 1024x1024 pixel images every three or so minutes and is triggered whenever the react-native-track-player alerts that new metadata is received from our ShoutCast based radio station. Once the error occurred, we use the same device's webrrower to go to the web domain where the image database is held and the browser gets a 'Request timed out' error. This forces us to go into the iphone's setting and perform the 'Rest network settings' action. After the reset completes. everything starats working again for a while until the error occurs again.
Our image database comes from our website domain: rockitstudios.com and our music content from our ShoutCast provider.
Other symptoms include:
If we minimize the app, the music player part of the app stop playing too and the app's widgets are somewhat un-responsive.
When we built the app, we used the Xcode capability settings to enable backgroud audio, background pictures and backgroud processes so that the app works when minimized.
It almost seems that there is an iOS custodial monitoring process that is killing the Image loading process after being triggered by it, then the same custodial process seems to stop other active processes associated with the app. Is this the case? If so. how do we solve the proben?
This issue occurs for both the Cellular Data and the Wi-Fi networks, and occurs on multiple networks around the globe, so it is not limited to a single network at one location.
I'd be happy tp post code snippets of the area in question as necessary.
The same react-native app's code was also successfully built on the Android platform and does not have any issues it too is in the Google Play store under the same title.
our iOS development (react-native + Xcode) environment from react-native info):
IOS version 14.4
Xcode version 12.4
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU # 2.60GHz
Memory: 481.24 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 15.5.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.5.2 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS
7.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: ^0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
UPDATE: We performed some more testing and troubleshooting. Given that most of our customers are using iOS 14.4 and recent iphones (iPhone 11 and 12). We let the app play until the image loading fails, then we used the iPnone's Safari brouwser to go to the domain where the image database fails, "https://rockitstudios.com" and the page stopped working and returned 'Reqest timed out' error. We also went to our other domains including: "https://nomps.com", "https", "https://rockitbroadcasting.com" and noticed all of these domains have the sme timeout issue. However, when going to sites like google.com, facebook.com. and other websites we have no request timeout issues. This tells us that we have a singe hosting service that is hosting all of our domain that is having the timeout issue on our hosting service. When performing the 'Reset Network Settings' in the iPhone's settings panel, all of these domains start working again and the App's image loading starts working. Is this an iOS 14.4 SSL/TSL issue? All of our domains have their SSL certificates in place. Any ideas on debugging this or has a known solution to this issue? Also, our Android apps do not have this issue. You can try the "Trop Rockit Radio" app in the Apple Store and see the issue first hand.
Had a similar issue in my React Native app. The app is pretty image heavy, and we could pretty consistently (but not all the time) reproduce a bug where the app successfully loaded ~100 network images but then all future image load requests would time out. You could sometimes make the app "snap out" of this state by toggling between WiFi/cellular, or backgrounding the app and returning. Quitting the app and restarting produced the same result again: about 100 images loaded and then nothing. iOS only - did not happen on Android.
After lots of digging the fix was server side: we disabled the HTTP/3 (with QUIC) setting on our Cloudflare instance.

How to fix Failure “INSTALL PARSE FAILED NO CERTIFICATES” for Appium & Python?

I am making an automation script to automate a Real SMartphone Android 8.1:
Environment
Python 3.7
Windows 10 64Bits
Build-tools 29.0.3
java version "1.8.0_241"
Appium 1.17.1
Node v12.15.0
sdkmanager 4.0.1
ADB (Android Debug Bridge) version 1.0.41
Version 30.0.3-6597393
When I run my script, I get these error message:
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
--> We can't open Instagram. Please check if device is connected. Let's try again!
Message: An unknown server-side error occurred while processing the command. Original error: Performing Push Install
C:\Users\Nino\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk: 1 file pushed, 0 skipped. 87.8 MB/s (470052 bytes in 0.005s)
Appium log file:
https://github.com/gauthierbuttez/public/blob/master/appium_issue04082020.log
What I've tried:
I added this desired capability:
desired_caps['remoteAppsCacheLimit'] = 0
It didn't help.
I reset factory my Android device but it didn't help.
Does anyone already faced this issue?
Try to add noSign: true to capabilities. It might help.
I also suggest manually removing Appium Settings and Instagram apps before starting a new session.

System Restart Upon Building in Xcode 11

I'm a beginner Swift developer and this is my first question in Stack Overflow. I've been working on an iOS SpriteKit game in Swift 5, Xcode 11 (updated from Xcode 10.3 as of a week ago). Aside increasing build times over the past few months, everything has been running smoothly.
About a week ago, running my application on any device or simulator began crashing my computer, forcing a restart with a large '!' icon in the background behind text explaining "There was an issue", with a normal startup and login process following. I would receive a dialog explaining "MacBook Pro experienced an issue and had to restart" and I was offered to report the crash to Apple (which I did).
This first occurred when I tried to archive a version of my app. I did research and found that deleting the DerivedData folder from User/Library/Developer/Xcode and the xcuserdata folder from both the project file and the workspace file contents prevented the crash after cleaning the build folder.
Then the same issue arose when I attempted to run my application on my iPhone 8. This time, performing the steps above solved nothing. This time, I analyzed the program instead of running it, which worked. Then, after a day, analyzing caused the system restart. So did a ton of other methods I tried. Up until now, all of the following actions result in a system restart after about 3-5 minutes of starting:
Building and running
Archiving
Analyzing
Building for Testing
In addition, I've tried the above methods after deleting said folders and cleaning the build folder. I've also tried them on the simulators, physical devices, and the Generic iOS Device. Nothing seems to be working.
Below is the system log that occurred during the crash. It is the one that my computer offered to send to Apple. I replaced a portion of the output with [...] as Stack Overflow detected some parts as spam. Willing to provide if needed.
I'm running macOS Mojave 10.14.6 on a 2017 MacBookPro. The latest occurence of this error occurs in Xcode Version 11.0 (11A420a), yet the forced restart issue also arose in Xcode 10.3 and Xcode 11 GM Seed 2.
If additional information is needed, I'll be happy to provide it.
Anonymous UUID: 44******-****-****-****-**********92
Sat Sep 21 21:31:12 2019
*** Panic Report ***
mp_kdp_enter() timed-out on cpu 0, NMI-ing
mp_kdp_enter() NMI pending on cpus: 0 2
mp_kdp_enter() timed-out during locked wait after NMI;expected 4 acks but received 3 after 9361562 loops in 1548000000 ticks
panic(cpu 0 caller 0xffffff80009ecea8): "thread_call group 'high' reached max thread cap (500): active: 1, blocked: 499, idle: 0"#/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4903.271.2/osfmk/kern/thread_call.c:221
Backtrace (CPU 0), Frame : Return Address
[...]
BSD process name corresponding to current thread: kernel_task
Mac OS version:
18G95
Kernel version:
Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64
Kernel UUID: C41337A1-0EC3-3896-A954-A1F85E849D53
Kernel slide: 0x0000000000600000
Kernel text base: 0xffffff8000800000
__HIB text base: 0xffffff8000700000
System model name: MacBookPro14,2 (Mac-CAD6701F7CEA0921)
System uptime in nanoseconds: 5389100927958
last loaded kext at 4928689757019: com.apple.filesystems.msdosfs 1.10 (addr 0xffffff7f841db000, size 69632)
last unloaded kext at 305554353504: com.apple.filesystems.msdosfs 1.10 (addr 0xffffff7f841db000, size 61440)
loaded kexts:
com.Cycling74.driver.Soundflower 2
com.valvesoftware.SteamInput 3083.39.62
com.apple.filesystems.msdosfs 1.10
com.apple.fileutil 20.036.15
[...]
com.apple.kec.pthread 1
com.apple.kec.corecrypto 1.0
com.apple.kec.Libm 1
EOF
Model: MacBookPro14,2, BootROM 198.71.1.0.0, 2 processors, Intel Core i5, 3.1 GHz, 8 GB, SMC 2.44f1
Graphics: kHW_IntelIrisGraphics650Item, Intel Iris Plus Graphics 650, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445364533303445422D45474347202020
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445364533303445422D45474347202020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x171), Broadcom BCM43xx 1.0 (7.77.61.2 AirPortDriverBrcmNIC-1305.8)
Bluetooth: Version 6.0.14d3, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
USB Device: Flash Disk
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.1
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.1
It looks like I figured it out on my own. I'm going to post the solution here in case any other Xcode developers run into the same issue.
It seems as though the problem lies in the project's directory. Because the entire Xcode project was on a USB disk drive, build times were slowing and restarts were occurring. To fix the issue, I simply created a copy of my project on my computer's drive and ran the program. Everything worked just fine. In fact, build times were much faster.

No connection is possible with last firmware builds

I am using NodeMCU since a couple of years without problems, usually I build the firmware with these modules:
gpio
node
tmr
mqtt
wifi
file
dht
net
Yesterday I tried to rebuild the firmware with the same modules and to connect to the device with ESPlorer without success.
I tried also with different modules combination but the problem is the same.
This is what esptool returns:
python esptool.py --port /dev/ttyUSB0 flash_id
esptool.py v2.7-dev
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 68:c6:3a:8b:d8:29
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
If I try to reload the old firmware all works fine.
Working firmware: 2018-05-19
By reading the release notes I found out that I was probably using the version 2.2.0-master_20180402.
Now there is the version 2.2.1-master_20190405.
I am wondering if some major change in the firmware is preventing me to connect again.
Is it possible to build (with the cloud tools) a firmware from a different version?
Does everyone else experienced a similar issue?
I found out the issue, on the different versions there are different baud rate settings needed to connect properly.
On the older version I used 9600, now I have to use 11520. After the change everything works fine.

Xcode 9 Server: Unable to boot device due to insufficient system resources

I'm trying to run my unit tests on all device simulators from iOS 8.4 to 11.0 at the same time by checking the option 'Run test in parallel' when setting up the Xcode Bot. Unfortunately after trying to boot the 13th simulator it failes with the error message in the build log:
xcodebuild: error: Failed to build workspace xxxxx with scheme yyyyy.
Reason: Unable to boot device due to insufficient system resources.
Testing failed on 'iPhone 4s'
I'm running the server on a mac mini and i think it is just not capable to run so many simulators at the same time due to full memory.
Anyone experience with it?
Increase the maximum number of processes until the next restart:
sudo launchctl limit maxproc 2000 2500
Increase the maximum number of open files until the next restart:
sudo launchctl limit maxfiles 2000 unlimited
For me it was the maximum number of processes that had to be increased. You might need even bigger numbers, those are just examples. Please refer to the documentation for more details.
Source: https://help.apple.com/simulator/mac/9.0/index.html#/dev8a5f2aa4e

Resources