Samsung’s Leap Month Bug Teaches Not To Skimp On Testing

Date and time handling is hard, that’s an ugly truth about software development we’ll all learn the hard way one day. Sure, it might seem like some trivial everyday thing that you can easily implement yourself without relying on a third-party library. I mean, it’s basically just adding seconds on top of one another, roll them over to minutes, and from there keep rolling to hours, days, months, up until you hit the years. Throw in the occasional extra day every fourth February, and you’re good to go, right?

Well, obviously not. Assuming you thought about leap years in the first place — which sadly isn’t a given — there are a few exceptions that for instance cause the years 1900 and 2100 to be regular years, while the year 2000 was still a leap year. And then there’s leap seconds, which occur irregularly. But there are still more gotchas lying in wait. Case in point: back in May, a faulty lunar leap month handling in the Chinese calendar turned Samsung phones all over China into bricks. And while you may not plan to ever add support for non-Gregorian calendars to your own project, it’s just one more example of unanticipated peculiarities gone wild. Except, Samsung did everything right here.

So what happened?

Continue reading “Samsung’s Leap Month Bug Teaches Not To Skimp On Testing”

Palm’s Mini-Mobile Phone Becomes Bike Phone

The mini-mobile phone [Jim Yang] got his hands on deserves a bit of background. Palm had the concept of a companion mobile phone, and this manifested itself in late 2018 as a cute palm-sized smartphone that one could carry around when one didn’t wish to haul along their “real” phone. This smaller and simpler phone was originally intended to share the same mobile number as one’s primary phone (though it has since been made able to work as a standalone device.)

[Jim]’s device, in use as a bike-mounted smartphone.
[Jim] got his hands on a refurbished Palm PVG100, rooted it, and shared some pictures of the internal components. The phone was not carrier-locked, but getting it up and running was still a bit more complex than plugging in a SIM card. For example, voice calls worked fine but to gain access to mobile data on the Three UK mobile network required updating the Access Point Name (APN) settings. [Jim] also rooted the Android-based phone and describes how he removed Verizon bloatware.

Palm’s companion phone idea hasn’t really caught on in a commercial sense, but in a way, [Jim] is validating the concept. After getting it up and running, he attached it to his bike with a custom mount to enjoy the benefits of having a mobile phone along without actually risking his primary device.

In case you’re wondering, this Palm is indeed the same Palm that launched the PalmPilot in 1996, whose distinctive folding keyboard accessory has shown up in past hacks.

Writing Android Apps In C, No Java Required

Older Android devices can be had for a song, and in many cases are still packing considerable computational power. With built in networking, a battery, and a big touch screen, they could easily take the place of a Raspberry Pi and external display in many applications. As it so happens, Google has made it very easy to develop your own Android software. There’s only one problem: you’ve got to do it in Java.

Looking to get away from all that bloat and overhead, [CNLohr] set out to see what it would take to get 100% C code running on an Android device. After collecting information and resources from the deepest and darkest corners of the Internet, he found out that the process actually wasn’t that bad. He’s crafted a makefile which can be used to get your own C program up and running in seconds.

We mean that literally. As demonstrated in the video after the break, [CNLohr] is able to compile, upload, and run a C Android program in less than two seconds with a single command. This rapid development cycle allows you to spend more time on actually getting work done, as you can iterate through versions of your code almost as quickly as if you were running them on your local machine.

[CNLohr] says you’ll still need to have Google’s Android Studio installed, so it’s not as if this is some clean room implementation. But once it’s installed, you can just call everything from his makefile and never have to interact with it directly. Even if you don’t have any problem with the official Android development tools, there’s certainly something to be said for being able to write a “Hello World” that doesn’t clock in at multiple-megabytes.

Continue reading “Writing Android Apps In C, No Java Required”

A Microcontroller Display With A Classic Twist

In a fit of lock-down-induced boredom, [Peter Z] has turned his smartphone into an LCD screen (simulation) via an Android app (German language, Google Translate link), so that a mobile device can be plugged into your favourite microcontroller and the classic HD44780 LCD look can be replicated on its screen.

It doesn’t speak standard HD44780, but rather a custom UART serial protocol, so if you’re looking for something to replace a busted LCD, this isn’t your bag. But if you are looking for a large UART terminal for debugging, with a nice aesthetic, you win.

We’d guess that a serial-to-Bluetooth converter could also be made to function, with a bit of work. The protocol is trivial too, meaning that almost any microcontroller could make use of it. All the code as well as the APK is available from the forum linked above, and there is a YouTube video of it in operation below.

The number one complaint in the comments is going to be that this doesn’t emulate a HD44780, so if that’s really what you want, read this deep-dive into the HD44780 and get hacking.

Continue reading “A Microcontroller Display With A Classic Twist”

This Week In Security: Psychic Paper, Spilled Salt, And Malicious Captchas

Apple recently patched a security problem, and fixed the Psychic Paper 0-day. This was a frankly slightly embarrasing flaw that [Siguza] discovered in how iOS processed XML data in an application’s code signature that allowed him access to any entitlement on the iOS system, including running outside a sandbox.

Entitlements on iOS are a set of permissions that an application can request. These entitlements range from the aforementioned com.apple.private.security.no-container to platform-application, which tells the system that this is an official Apple application. As one would expect, Apple controls entitlements with a firm grip, and only allows certain entitlements on apps hosted on their official store. Even developer-signed apps are extremely limited, with only two entitlements allowed.

This system works via an XML list document that is part of the signed application. XML is a relative of HTML, but with a stricter set of rules. What [Siguza] discovered is that iOS contains 4 different XML parsers, and they deal with malformed XML slightly differently. The kicker is that one of those parsers does the security check, while a different parser is used for that actual permission implementation. Is it possible that this mismatch could contain a vulnerability? Of course there is.
Continue reading “This Week In Security: Psychic Paper, Spilled Salt, And Malicious Captchas”

Checking In On Relatives Using Old Android Tablets

With social distancing it can be harder to stay in touch with our relatives, especially those who are elderly and not particularly tech-savvy. Looking for a solution to that end for his own grandmother, [Steve] came up with the idea of using an inexpensive used tablet and a mobile data plan in order to mail her a “video phone” that works out of the box.

This method requires zero button presses in order to pick up a video call.

Since the tablet is configured to use cellular networks rather than WiFi, it requires no setup process at all to the recipient. And with the Android version of Skype, it’s possible to configure it so that calls are automatically picked up and video chat enabled. That way, whoever gets the tablet after it’s prepared doesn’t have to tap a single button on the screen in order to receive a call.

[Steve] has also developed the simple idea into a full-fledged easy-to-follow tutorial so that just about anyone is able to replicate the process for their own loved ones. And if you’re still having any trouble with it, there’s a team of volunteers right on the website who can help you with tech support. Just remember to disinfect whatever device you’re sending, since viruses can typically stick to surfaces like plastic and glass for longer.

Now, if showing up to your relatives as a disembodied video screen doesn’t cut it for you, then you might want to send them something more substantial like this cute little telepresence robot that can drive around on a desk.

GitHub On The Go

It is hard to find anyone that does any kind of software development that doesn’t have some interaction with GitHub. Even if you don’t host your own projects there, there are so many things to study and borrow on the site, that it is nearly ubiquitous. However, when you’ve needed GitHub on the run, you’ve probably had to turn to your phone browser and had a reduced experience. GitHub for Mobile is now out of beta and promises a more fluid phone-based GitHub experience.

In addition to working with tasks and issues, you can also review and merge pull requests. The app sends your phone notifications, too, which can be handy. As you might expect, you can get the app for Android or iPhone in the respective stores.

Continue reading “GitHub On The Go”