Previously on dreamwidth:chebe we played with setting up Android on a RaspberryPi 3. Which led us to ordering a RaspberryPi 4. Well friends, it arrived. I installed the LineageOS Raspberry Pi 4 port by KonstaKANG, and set up a few things, like the Play store. It worked beautifully. We're not talking lightning fast speeds, but. it. works. So now to make it usable.

The screen and case )

The stand and arrangement )




My Android control console
Photo by [personal profile] chebe

I am fed up of expensive handheld devices (phone, tablet, etc) working great for a year or two, and then slowing down, and down, and becoming unreliable, or having support suspended. I need a more open solution, on which I can install the mandatory Android apps to be able to use the hardware I have purchased that only communicate over bluetooth low-energy. For example, my activity tracker. What do I have to hand?

At the back of the cupboard I found my old pi-topCEED, which is a Raspberry Pi 3 Model B, with custom hub and accessories (like speakers, breakout boards), together with a display, in a custom case. (Specs here.) I love the form factor. It's just so neat. (No, it's not a touch-screen, but that doesn't stop people from trying.) Just add a mouse and keyboard and you have a full desktop computer set up. It has it's own OS, a flavour of debian, that is very targeted at kids. But I can always install a different OS on a another SD card.

To run the apps I need Android. I have an old Raspberry Pi. After some searching I found a MagPi issue from when the board was new. It has two suggestions; Emteria.OS and Android Things. I can't install the Play Store on Android Things, so that's out. I tried Emteria.OS. You have to sign up to get a trial download, and full versions need to be paid for, but if you can live with the restrictions this is an option. The install went very smoothly, but it is only Android 7. We must be able to do better.

So how about an unofficial LineageOS Raspberry Pi port by KonstaKANG? It looks like Raspberry Pi 3 support is topped out at LineageOS 17.1, which is Android 10. I gave it a go and everything goes pretty smoothly. Mostly. I encountered a problem on power up, after the rainbow square appears nothing else happens. I set the magic config.txt settings for the pi-topCEED, but no joy. (I did learn a lot about the various video options along the way though.) Eventually I found the thing I needed in the instructions themselves; I (also?) needed to set the resolution in the resolution.txt file. Then it booted up fine and I was flying. Until I installed the Play Store. Now, the instructions do warn against this, but I had to try it. And, yes. It does work, but it is incredibly, almost unusably slow. So if I really want to make this work I'm going to need to get my hands on a Raspberry Pi 4. Project paused.

Photographic proof )

But, even when I get the Raspberry Pi 4, can I use the pi-topCEED custom hardware with it? Turns out no. I would need to have a debian compatible package manager, with which to install the pi-top repos. The future Android Raspberry Pi 4 is not destined for a fancy home in the pi-topCEED. But now I know I can install those repos on Raspberry Pi OS! A nice option to keep the Raspberry Pi 3 occupied.
Jolla confirmed that they wouldn't be upgrading the version of Android that Sailfish X for the Xperia X handset from 4.4 to 8. Slack had sent me an email telling me to upgrade my Android version because it doesn't have TLS built in. Jolla had an offer on Sailfish X. The new handset, the Xperia 10, was one-third off in Black Friday sales. So, in short, I have a new phone.

There are new instructions for flashing, but I found myself needing to use my own instructions from last time to get the drivers working. I'm not sure if it's just because I had the previous version installed or not. Main difference is you don't need to use Emma. But I still had to do the Disable Driver Signature Enforcement dance. Fun. But it is up and running now. And a lovely handset to go with the security improvements.

Sailfish X, part 1

2017-Sep-29, Friday 11:54 pm
I'm preparing for SailfishX. It isn't on sale yet, but there's a lot to do before you get there. This is part 1; unlock the bootloader. On Windows 10. (I do like a challenge.)

First thing is first, Jolla are only supporting one model initially; the Sony Xperia X (F5121), single SIM version. And it needs to be network unlocked, so grab a SIM-free version.

The next part is also known as, how to void your warranty and factory reset your device while following Sony's official instructions. Doesn't that sound like fun? Note; this is not reversible.

Visit the Sony unlock bootloader page, read all the horrible notices, select your device from the dropdown menu, and click Continue.

Sony want your email address. They'll give you a keypad combination you can use to make sure your bootloader can be unlocked.
edit
1. In your device, open the dialer and enter *#*#7378423#*#* to access the service menu.
2. Tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says “Yes,” then you can continue with the steps below. If it says “No,” your device cannot be unlocked.
end edit
And a code to get your IMEI. They want that too. They'll email you a link to your own personal unlock code, and instructions on how to use it.

1. Download the Android SDK. You don't need Android Studio, I mean, you really don't, unless you want to write Android apps and spend the rest of your life installing massive updates.

2. I'm on Windows, so I need to get Sony's modified fastboot driver. Extract this, copy android_winusb.inf to C:\Users\$USER\AppData\Local\Android\sdk\extras\google\usb_driver, replacing the existing one.

3. Boot up your Xperia X. Prepare it;
Settings > About Phone > Build number (click on this quickly multiple times until it tells you you've unlocked Developer mode)
Settings > Developer options > USB debugging (enable)
Settings > Developer options > OEM unlocking (enable)
Turn off phone.

4. Hold down the Volume Up button on your phone, as you connect it via USB to your computer. The phone's LED will go blue.

5. On your computer go to C:\Users\$USER\AppData\Local\Android\sdk\platform-tools and run fastboot devices.

Possibility A. This lists your device with no errors, go to 6.

Possibility B. This lists nothing. Go to Device Manager. You will see an Exclamation Point over a device, called something like S1FastBoot. Open up it's Properties, then Upgrade Driver, search specific path on your computer, and point to the Sony fastboot driver from before (C:\Users\$USER\AppData\Local\Android\sdk\extras\google\usb_driver). This might work, but it probably won't, giving an error about a lack of signature and that the driver was probably altered. It was, by Sony. So now you have to Disable Driver Signature Enforcement temporarily.

Disconnect the phone. Hold down a Shift key as you Restart your computer. When it reboots it will offer you the Advanced Startup Options menu. Select through; Troubleshoot > Advanced Options > Startup Settings. Then you'll have to press 7 to select Disable Driver Signature Enforcement. Let it boot back into Windows. Go back to Device Manager and Upgrade Driver again. This time it should succeed.

Run fastboot devices again, and it should also succeed.

6. Time to actually enter the bootloader unlock key. Still in C:\Users\$USER\AppData\Local\Android\sdk\platform-tools run the command with the code Sony provided. -i 0x0fce is the manufacturer code. oem unlock is what you want to do. The rest is your device code.
fastboot -i 0x0fce oem unlock 0xABCDEF0123456789
(If you get a FAILED (remote: Command not allowed) at this point you probably haven't enabled OEM unlocking on the phone. Go do that.)

OKAY [ 0.188s]
finished. total time: 0.188s


This undramatic output confirms you have successfully unlocked your bootloader. And probably voided your warranty. And reset your device to factory state, wiping internal memory. Losing some of their keys, possibly disabling some of their hardware and optimisations. Unable to undo. And you still don't have root. But you're closer to a freer device. Right?
HTC Desire Z (aka Vision, G2) is now well and truly rooted. I'm indebted to xda-developers, here are some posts I found really helpful;


I then found a close-to-stock version of 2.3.5 and loaded that up. It works pretty well, only a couple of very minor bugs. One was apps like Twitter force-closing constantly. But apparently that has more to do with the HTC Market becoming Google Play, so I just uninstalled and reinstalled and it's all working fine now. But sadly, it still doesn't have the USB-drivers I want! Upon closer reading turns out it was optional in 2.3.4 (default in 4.0.x), and seeing as how HTC isn't doing anything new for this model, I'm going to have to look at other, messier, options.
A while back I got a fantastic birthday present; the Electric Sheep! I've wanted one for ages! So I started reading up on it, and discovered it would only work on a phone with Android version 2.3.4 or higher, because that's when they introduced the new USB driver for it to work.

I waited, and waited. I'd bought my phone SIM-free, so I got Gingerbread while all my friends with the same branded phone did not. Then I waited some more. Lo and behold, another update! Yes, install! ... Hmm, only a security update, still only 2.3.3? Get in contact with HTC, asking when they're going to push the 2.3.4 update that all the other, newer phones had already received. The answer; "HTC has not released android 2.3.4 update for this phone due to the hardware requirements of this phone." This is plainly not true as several people having rooted their phones are even running 4.0.x on it.

What am I to do? There is only one way forward of course, root my own phone. The first step is actually just setting up a software development environment. On the phone that just requires enabling debug mode, and on the laptop installing the Android SDK (painful enough, remember to run as Administrator on Windows), and from that the drivers for the phone. Only, the driver kept on failing to install/recognise my device. Turns out I needed to edit the driver. In a minor way that is not nearly as scary as it sounds. Simply add info about my phone to the .info file, as described here: http://alt236.blogspot.ie. Then install the drivers again, successfully this time, and make sure the Android Debugging Bridge (adb) is working. adb shell lets you walk around the phones file system copying and deleting files and such.

This part isn't necessary for rooting your phone, but hey, I'll probably want to write some apps at some point, so I followed the procedure described here. To finish setting up the dev environment I installed Eclipse, built a virtual approximation of my phone and played with some of the samples. They are surprisingly slow to run.

Ok, great. Next step, make backups. There is an adb backup -all command, but it only works with Android versions 4 and above. *sad* So I'm going to have to do it the long way, copying file by file. I thought I'd give scripting it a try, but that's for another day.

Android update

2011-Aug-05, Friday 07:44 pm
Oooh! My HTC Desire Z just updated itself to Android 2.3.3. And suddenly the missing menus in 'People' have appeared and I've managed to selectively import specific Contacts groups. It also pulled in my Twitter contacts. This integration thing is really nifty.
Memory lane, the path travelled, how I got here, and all that jazz )

Anyway. What all this has taught me is how much of a control-freak I am when it comes to technology. All these 'helpful' programs and processes, auto-start features, auto-sync, not only drains the phones battery, but mine as well. Simply put; do not want. I turned everything off. GPS services, both kinds, wlan, bluetooth, data, everything off. I will turn it on as needed, then swiftly shut it down again. (Maybe I've been spending too much time dealing with firewalls and ports...)

The Quest to download apps from the Android Market
Mighty battles )

Apps
Enjoying the spoils )

Back to fixing what in the old days we called a 'phonebook'
Tending wounds )

Bluetooth connection to Parrot car-kit
Breaking in a new saddle )

That's as far as I've gotten, and what I would consider functioning adequately. Once I've become a bit more familiar with the device I'll install the SDK and have some real fun!

Profile

chebe: (Default)
chebe

Syndicate

RSS Atom

July 2025

M T W T F S S
 1 23456
78 910111213
14151617181920
21222324252627
28293031   

Expand Cut Tags

No cut tags

Style Credit