I’ve written about SQLite databases here and there over the years. A number of Apple tools and third party tools for the platform run on SQLite and it’s usually a pretty straight forward process to get into a database and inspect what’s there and how you might programmatically interact with tools that store data in SQLite. And I’ll frequently use a tool like Navicat to quickly and visually hop in and look at what happens when I edit data that then gets committed to the database.
But I don’t always have tools like that around. So when I want to inspect new databases, or at least those new to me, I need to use the sqlite3 command. First, I need to find the databases, which are .db files, usually stored somewhere that a user has rights to alter the file. For example, /Library/Application Support/My Product. In that folder, you’ll usually find a db file, which for this process, we’ll use the example of Data.db.
To access that file, you’d simply run sqlite3 with the path of the database, as follows:
sqlite3 /Library/Application\ Support/My\ Product/Data.db
To see a list of tables in the database, use .tables (note that a tool like Postgress would use commands like /tr but in SQLite we can run commands with a . in front and statements like select do not use those):
To then see a list of columns, use .schema followed by the name of a table. In this case, we’ll look at iOS_devices, which tracks the basic devices stored on the server:
The output shows us a limited set of fields, meaning that the UDID is used to link information from other tables to the device. I like to enable column headers, unless actually doing an export (and then I usually do it as well):
Then, you can run a standard select to see what is in each field, which in the below example would be listing all information from all rows in the myapptable table:
select * from myapptable;
The output might be as follows:
abcdefg|2017-01-26T17:02:39Z|Contents of field 3|Contents of field four
Another thing to consider is that a number of apps will use multiple .db files. For example, one might contain tables about users, another for groups, and another for devices in a simple asset tracking system. This doesn’t seem great at first, but I’ve never really judged it, as I don’t know what kind of design considerations they were planning for that I don’t know. If so, finding that key (likely GUID in the above example) will likely be required if you’re doing this type of reverse engineer to find a way to programmatically inject information into or extract information out of a tool that doesn’t otherwise allow you to do so.
krypted February 24th, 2017
Installing OS X has never been easier than it got in Yosemite, when the installers were moved to the App Store. And since then it’s just gotten easier, and easier. In this article, we’ll upgrade a Mac from OS X 10.11 (El Capitan) to macOS Sierra (10.12), the latest and greatest. The first thing you should do is clone your system (especially if you’re upgrading a server). The second thing you should do is make sure you have a good backup. The third thing you should do is make sure you can swap back to the clone should you need to do so and that your data will remain functional on the backup. The fourth thing you should do is test that clone again…
Once you’re sure that you have a fallback plan, let’s get started by downloading “Install macOS Sierra” from the App Store. Once downloaded, you’ll see Install macOS Sierra sitting in LaunchPad, as well as in the /Applications folder.
Open the app and click Continue (provided of course that you are ready to restart the computer and install Sierra).
At the licensing agreement, click Agree (or don’t and there will be no Sierra for you).
At the pop-up click Agree again, unless you’ve changed your mind about the license agreement in the past couple of seconds (I’m sure it happens).
At the Install screen, click Install and the computer will reboot.
And you’re done. Now for the fun stuff!
krypted September 28th, 2016
Under the hood on iOS is a hard place to get; especially without bricking or jailbreaking a device. There are a few tools that can provide insight into what’s on a device, and about the device, though. One is an app called SysSecInfo, available at https://www.sektioneins.de/en/blog/16-05-09-system-and-security-info.html.
Once installed, you’ll see how much CPU and memory are in use, and not in use, on your device.
Scroll down and tap on Process List to see a list of each process running on the device.
Tap Details towards the bottom of the screen to see more information about the OS build running on the device.
Overall, a handle little tool, with lots of information about devices, including how to derive whether the device has been jailbroken (although note that for each method of jailbreak detection, there’s a method for defeating detection).
krypted June 8th, 2016
Posted In: iPhone
The 4th Generation of the Apple TV supports installing apps. And part of playing around with new apps is sometimes you’re not going to want them on your TV any more. To remove apps, the process is similar to that of an iPad. Highlight an app that you’d like to remove and then hold down the clicker on the app.
The app will go a little larger. Click on it again and you’ll get the option to Delete the app.
Click Delete and the app disappears.
That’s it. The app, and any storage that is being consumed by the app, is then freed up.
krypted November 7th, 2015
Posted In: Apple TV
Can I push out Apps without VPP? Yes. You can push free apps to iOS devices without a VPP account. Paid apps of any kind will need a VPP account, as will free apps on Macs.
krypted May 19th, 2015
Posted In: Bushel
You’ll use this Apple ID for the Volume Purchase Program (VPP) and the Device Enrollment Program (DEP). If this is your first time enrolling in any program on the Apple Deployment Programs website, you can create a new program agent account by following the steps below:
krypted March 27th, 2015
Getting a bunch of iOS and Mac devices setup is more of a logistical challenge than a technical hurdle. When you buy a couple iPads, it’s pretty simple to set them up for the email, security settings and apps that you need those devices to have. You can put them all on a table, give them an Apple ID and then set them up identically to give to users. But the first time someone wipes a device, or looses a device that you need to wipe, you’ll have to do that manual labor again. And if you’re buying more than a couple of Apple devices, then the amount of time becomes amplified to manage all of these tasks. This is where a management solution comes into play.
krypted March 20th, 2015
Merry Christmas ya’ll!
On the first day of Christmas my true love gave to me one 32 gig iPad
On the second day of Christmas my true love gave to me two bash one-liners
On the third day of Christmas my true love gave to me three Red Hat servers
On the fourth day of Christmas my true love gave to me four email blasts
On the fifth day of Christmas my true love gave to me five retweets
On the sixth day of Christmas my true love gave to me six regular expressions
On the seventh day of Christmas my true love gave to me seven lines of perl
On the eighth day of Christmas my true love gave to me eight app store apps
On the ninth day of Christmas my true love gave to me nine AWS instances
On the tenth day of Christmas my true love gave to me ten Active Directory forests
On the eleventh day of Christmas my true love gave to me 11 crappy python scripts
On the twelfth day of Christmas my true love gave to me 12 craft brews
krypted December 25th, 2014
The good folks at Amsys have built a nice little app called Services Test for verifying outbound connectivity to critical services to make iOS devices work. If you are having problems connecting to these services or activating devices, simply open the App and tap on the play button in the upper right hand corner of the screen.
Click on the Info button to see what each of these servers do during the activation and management process.
The app can also test a few common server services, including connecting to an OS X Server, Casper and AirWatch. These are typical services used in an iOS and Mac environment.
Overall, this is a really nice little app for testing connectivity to typical iOS services and a very nice tool Amsys is providing to the community!
krypted January 17th, 2014
Posted In: iPhone
At first I didn’t think that I was going to write a review of my Pebble. Then, I realized that my perspective is probably different than most, so I changed my mind and decided to jot down 10 things to know about the Pebble. Before I get into that though, I’m one of those weird people that still wears a watch. Yes, I know, how very dated I must look. But hey, I really don’t care so I keep wearing it. Therefore, a different device on that wrist really doesn’t move the needle, it’s just a device that isn’t the other one that I wore for 20 years… I have stopped wearing my Tag completely, but that’s OK, it’s getting a little long in the tooth anyway.
The Pebble has a lot of promise. A lot is fulfilled and more yet has yet to be fulfilled. Let me explain, starting with the things I love (the promise that is fulfilled):
The promise to be fulfilled:
Overall, I love the Pebble. The nerd factor around not having to take your phone out of your pocket, the ability to skip songs, the ability to look and see which push alerts you actually care about are all awesome. I hope that the app store brings with it a bunch of new apps that give you access to lots of things and that I can get rid of my Nike FuelBand or FitBit soon, but that could be 2 weeks from now or 2 years for all I know. It’s a quality device that’s well worth the money if the things I mention are things that you’d like to have. However, for now it’s not a replacement for that Garmin, FuelBand, etc type of device you may be using for fitness purposes. Anyway, if it’s the type of thing you’re into then good luck and I hope you enjoy it!
krypted January 5th, 2014
Posted In: Wearable Technology
Tags: accelerometer, App Store, battery, caller ID, cold, downloads, epaper, fitbit, flex, force, FuelBand, iPhone, low powered bluetooth, MAC, mic, pebble watch, screen, sdk, sports watch, watchfaces