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
Posted In: Mac OS X, SQL
App Store, apps, enumeration, GUID, inserting information, MAC, reverse engineering, select statements, sqlite, view headers
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
Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment
App Store, Apple, install, MAC, macos, sierra, upgrade
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
App Store, devices, jailbreak detection, syssecinfo
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
4th generation, App Store, Apple TV, apps, delete app, ios, MAC, Storage
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.
To Find Out The Answers To Other Common Questions About Apple’s Volume Purchase Program (VPP) and Bushel, Check Out The Bushel Blog Here
krypted May 19th, 2015
Posted In: Bushel
App Store, Apple, ios, MAC, mdm, purchases, vpp
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:
For More On Apple IDs and MDM, See The Bushel Blog
krypted March 27th, 2015
Posted In: Apps, Bushel, iPhone, JAMF
App Store, bushel, ios, itunes, MAC, mdm
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.
For More On Device Management and How It Impacts Manual Labor Click Here
krypted March 20th, 2015
Posted In: Apple Configurator, Bushel
App Store, Apple, Automation, ios, MAC, manual labor
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
Posted In: iPhone, Mac OS X, Mac OS X Server, Mac Security, Mass Deployment
Active Directory, amazon, App Store, apps, aws, bash, craft beer, ios, Linux, MAC, os x, perl, python, red hat, twitter
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
activation, amsys, App Store, can't activate, ios, iOS store, iPad, iPhone, itunes, MAC, Services test
Next Page »
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 Pebble has an SDK. Using the SDK, developers can design apps and sell them or post them online.
- The battery of a Pebble lasts me about 5 or 6 days, depending on how many push alerts the device gets over the low power bluetooth connection back to my phone.
- The screen is monotone and epaper, which is to say that it is not designed to emit light (unless shaken) and so you can see the screen very well in sunlight, much like the pump at a gas station.
- The Pebble receives low power bluetooth push alerts from your phone. This means that when someone says something on Instagram, likes a photo on Facebook or sends you a text, you see it on the phone and on the watch. Since many alerts you just look at, this keeps you from taking the phone out of your pocket. You can’t really do anything with most alerts, but you can see them and just file the piece of information for later. The alert will still be on your phone when you take it out of your pocket.
- When someone calls, you see caller ID and contact info on the watch. You can then answer a call right from the watch. If you’re wearing headphones and a mic then you never have to take the phone out of your pocket to answer calls.
- You can control music on your iPhone through the watch. This means you can go forward and backward without taking the phone out of your pocket. When I’m on my morning runs this is especially helpful when I’m on a treadmill as taking my phone out of my pocket on the treadmill often makes me just unstable enough to possibly wipe out on the treadmill. I’ve only had it in the winter here in Minnesota so I’m not sure if that will matter to me when I get to run outside again.
The promise to be fulfilled:
- I think this starts with a true app store, like Apple has. There are accelerometers and other doohickeys in these things that mean they can really do a lot more than what they can today. The app store isn’t out yet, although you can buy or download apps at the Pebble site (it’s just not a simple process all the time and better apps typically tend to get written when people make money from them).
- There are fitness apps but the device doesn’t yet replace a FuelBand or a FitBit. It doesn’t track steps (which with an accelerometer should be simple to do), calculate burned calories, etc. I’d like to see an app that allows you to choose foods you tell an app on your phone you like so you can calorie count at the dinner table without busting out your phone. I’d also like to see a step tracking app that can sync to FitBit so I can stop wearing my Force.
- Watchfaces are currently the big thing most apps allow you to control. I don’t give two craps about changing the watch to look different. However, if you want to make your own “Haz Cheezburgur” watch face, feel free (this isn’t really a bad thing, just a lot of time wasted designing pixelated and monotone watch faces that could have been spent writing cool apps).
- The device is currently half way between SDK 1 and SDK 2. This means there are cool features that you can only get if you go through a lengthy upgrade process that includes sending them a UDID for your iOS device. It’s not a terrible thing, like the other promises to be fulfilled with the Pebble, it’s just a thing.
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
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