Posts Tagged ‘Personal’
Fix broken Android permissions by re-installing apps
I run the CyanogenMod derivative of Android on my G1, and somehow managed to get it into a state where it had withdrawn the security permissions from my installed applications. I think this happened when I attempted to upgrade the 1GB microSD to a 4GB one, but the phone failed to boot.
I first noticed the problem when trying to refresh in NewsRob would hang the application, and adb logcat showed:
W/dalvikvm( 540): threadid=3: thread exiting with uncaught exception (group=0x4001e170)
E/NewsRob ( 540): Caught the following exception:
E/NewsRob ( 540): java.lang.SecurityException: Neither user 10039 nor current process has android.permission.WAKE_LOCK.
NewsRob clearly had had this permission before, to prevent the phone from sleeping during a sync. The Manage Applications screen still showed that it did (“System tools: prevent phone from sleeping”). Watching adb logcat while the phone was booting showed what was going on, and that many other applications had the same problem:
W/PackageManager( 138): Not granting permission android.permission.INTERNET to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.WAKE_LOCK to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.ACCESS_NETWORK_STATE to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.VIBRATE to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.newsrob because it was previously installed without
/data/system/packages.xml, which seems to record which applications are installed and which permissions they have, showed:
<package name="com.newsrob" codePath="/data/app/com.newsrob.apk" system="false" ts="1264200476000" version="353" userId="10039" installer="com.google.android.feedback">
<sigs count="1">
<cert index="25" key="..." />
</sigs>
<perms />
</package>
i.e. the permissions block was empty. It should have looked more like this:
<perms>
<item name="android.permission.VIBRATE" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="android.permission.ACCESS_NETWORK_STATE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.INTERNET" />
</perms>
I tried manually hacking it, and also moving and replacing the .apk file on the phone, but packages.xml always returned to this state. Maybe it’s not the master copy of that data.
What finally fixed it for me was to re-install the applications using the package manager, by running:
cd /data/app
for app in *.apk; do pm install -r $app; done
I hadn’t known about the pm command until then, and discovered it by accident when invoking an adb command told me about it. The phone chugged along for quite a while, but eventually re-installed all of the applications, and the problem was fixed.
Web searches showed that I was not the only person to find themselves in this predicament, and did not reveal an obvious solution, so I’m documenting mine here.
Airplane etiquette

As I have most recently observed on my recent flights to New Zealand for linux.conf.au, it seems that many of my fellow travelers are unaware of this simple rule:
When standing up from your seat, do not use the back of the seat in front of you as a handhold unless this is a physical necessity for you. This is very disturbing to the person sitting there, who may be trying to sleep. Instead, bring your own seat forward and use the armrests.
Yes, I’m talking to you, 61J.
That is all.
Love, Matt
What “Britainthinks” of sexism

As I left the office yesterday, I passed a billboard at a bus stop near the Canonical office. In large, capital letters, it read “Career women make bad mothers”. It invites readers to “have their say” on a website called “Britainthinks!”, which I won’t dignify with a link. I say it stinks. Who on earth thought this would be acceptable?
Apparently, more than a few people took notice, as The Guardian reports that the ad will be withdrawn. According to the article, a representative from the agency responsible offered a non-apology, saying that “they were intended to spark a debate, and did not represent the opinion of the agency or the campaign organisers.” Whose opinion was it, then, and how did it end up all over London? (I saw a larger format version of the same billboard in a different location today) What must the meeting have been like where this originated? “Well, we thought about debating whether rich white men are poisoning the Earth, but decided it was better to go after working mothers instead. Sound good?”
This reminds me a bit of the BBC’s recent screwup, where they attempted to “spark debate” about whether gay people should be executed(!?), and then defended their actions as intentionally polarizing. The common pattern is disregard for the rights of a class of people, followed by blind excuses and justification. It’s no coincidence that the target groups are routinely subject to harassment by more privileged folk.
Quick hack: GPT partitions without kernel support
I have a couple of USB hard disks which each have a single GPT partition on them. I recently moved them to an embedded server, and discovered that its Linux kernel lacked support for GPT.
For various reasons, it isn’t practical for me to replace its kernel right now, but I still wanted to be able to use the disks, and to have them automount by UUID.
…some time later…
A set of udev rules:
# Import variables from devkit-disks-part-id on the *parent* device
# devkit-disks-part-id looks at $DEVPATH regardless of the argument passed to
# it, so we need to override that
ATTR{partition}=="1", IMPORT{program}="/usr/bin/env DEVPATH=%p/.. /lib/udev/devkit-disks-part-id /dev/%P"
# If this partition is on a disk using GPT, fake it
ATTR{partition}=="1", ENV{DKD_PARTITION_TABLE_SCHEME}=="gpt", RUN+="/sbin/losetup -o 16896 -f /dev/%k"
This code uses a tool from devicekit-disks to detect when a GPT partition table is present. If so, it sets up a loop device at the appropriate (hardcoded) offset corresponding to the GPT partition.
It only works for a single partition, and it’s not exactly pretty, but it solved my problem. The loop devices generate their own uevents, the generic udev rules detect the UUID, and everything works.
Ubuntu Developer Summit: 10.04 (Lucid)
This week, I’m in Dallas, Texas working at the Ubuntu Developer Summit. Hundreds of Ubuntu developers and other community members are gathered to discuss the future of the project, particularly the 10.04 release. Developers are engaged in technical discussions about how to implement new features for the release next April.

Obviously, a week is not enough time to decide, design and plan half a year of work, but we try to fit as much as possible into the week, because it is such a rare opportunity for us to work together face to face. In order to make the best use of our time, there is a very full schedule of sessions, and we do a great deal of advance preparation.
There is a persistent rumor that UDS is where we decide what to do in the next cycle, but this isn’t quite accurate. UDS is where we primarily figure out how to do what needs to be done. Naturally, UDS is a sea of ideas, thanks to all of the creative thinking which happens among attendees, and we do dream up and decide to do new things there. However, most of this is determined well before we all board airplanes to travel to UDS.
Brainstorm is constantly collecting and ranking suggestions from Ubuntu users. Ubuntu development teams hold public meetings on IRC where they discuss ideas and plans. Canonical stakeholders submit requirements for their needs. All of this information is aggregated, sorted, evaluated and prioritized, largely by the heroic engineering managers at Canonical, who then develop the core of the agenda for UDS. Additional sessions are then added as they come up during the week, when there is space.
At this particular UDS, I am moderating the server track, where we’re hashing out the details of our projects for Ubuntu Server Edition 10.04. Being a UDS track moderator makes for a very busy week, with back-to-back sessions all day for five days straight. It’s only Wednesday, and I’m feeling a bit fried already, having been away from home for over two weeks.
In each session, there is a discussion between the developers working on the project, the other UDS attendees who are interested in it, and any random folk who listen in on the audio stream and add questions or comments via IRC. The participants take notes using Gobby and then publish them in the Ubuntu wiki, where they are developed into specification documents tracked in Launchpad.
Those specifications are further broken down into work items, which we can use to maintain a burn down chart. Rick Spencer, our desktop engineering manager, gave a presentation this afternoon about how that process will work. The burn down chart will give us a tool for establishing whether we are on track to complete our work, or if we are under or over committed, and make adjustments to our plans as needed.
I have a sense of tremendous momentum going into this release cycle, which will culminate in our third LTS (long-term support) release of Ubuntu.
Amplify Your Effectiveness (AYE) Conference: Day 3 (afternoon)
Seeing Process: Making Process Visible (Steve Smith)
This session allowed me to practice capturing and visualizing the processes used by a team. In order to create a process to work with, we first conducted a simulation, where we (about 15 participants) organized ourselves to produce a product (sorted decks of cards) from raw materials (many cards from different decks). Volunteers took on the roles of the customer, the customer’s QA manager, the factory owner and the factory production manager, while the rest of us (myself included) acted as factory workers. As a manager in my day job, I wanted to get a different perspective in this exercise, and practice different kinds of leadership.
While the customer and management were sequestered for further instruction, the workers waited outside and talked about what would happen. There was quite a bit of talk of disrupting the activity, making things difficult for management, which I hoped wouldn’t amount to anything once we got started. The point of the exercise was to learn something, and being too disruptive would hinder that.
More interestingly, several of the workers had participated in other, similar simulations, and so were keen to avoid the obvious pitfalls. We collectively resolved to work cooperatively and treat each other well during the simulation: to act as a team. This turned out to be a defining moment in the simulation.
The appointed manager started out by briefing us on the parameters of the simulation, insofar as he was aware of them, and setting some ground rules. He explained that there was a mess inside, preparing us for what to expect. Realizing the group might be too big for the task at hand, he explained that some people might not be needed, and they should find something to do on their own without interfering with the rest of the group. This was also a key action.
The manager also made a point of wielding explicit power, which I found a bit excessive. He said there would be layoffs, and threatened that as punishment for the workers. Particularly given the team dynamic, this threatened to unite the team against him, which I felt was an unnecessary risk.
When we were ready to start work, the manager gave a lot of explicit instruction, providing an algorithm for the first phase of sorting. It wasn’t a very good algorithm, and this was evident to some members of the group, but the workers didn’t seem to feel it was worth the time which would be wasted arguing. That is, all but one, who caused the group to block for a couple of minutes by refusing to cooperate or suggest an alternative.
What was missing at this point was an understanding of the goal. The team was prepared to work on the task, but without knowing what the result was expected to be, they hesitated and were confused. The manager offered a vote on a small change to the algorithm, and it was agreed. Gradually, we established that the result should be piles of cards sorted according to the pattern on the back, and the team quickly self-organized around this goal, largely disregarding the proposed algorithms. This beautifully illustrated one of the lessons of the exercise, by showing how quickly and naturally processes diverge from what is prescribed.
I took quite an active role in learning the parameters of the simulation and helping to facilitate the group’s self-organization. During the initial card-sorting phase, I established a clearinghouse for cards of all types, and invited my colleagues to bring me any type of card to add to my stacks. This simple act made it obvious how to contribute to the goal, and organized the physical materials for later use. Someone else was doing the same thing, and when all of the cards were stacked, we just combined our stacks.
The manager explained that we needed to sort the decks. I asked what ordering should be used, and he pointed to a flipchart where instructions were written. The workers took the stacks of cards off to various parts of the room to sort them. Once I had one complete, I took it to the QA manager, who said it was incorrect. I checked it against the instructions, and it was clear that they were not effective in communicating the correct ordering. I rewrote them on another flipchart, checked them with the QA manager, and took the old instructions down.
Before I went back to sorting cards, I talked to other people sorting, and made sure that they knew about the new instructions. I checked if they had any complete decks, helped them do the final (quick) sorting by suit, and carried their completed decks to QA. This simple action which both boosted our immediate output (by pushing work in progress through the process) and accelerated production (by spreading information about the requirements).
The next time I handed in a batch of cards to QA, I was recruited to work at the QA table, because there was a shortage of capacity there. After checking a couple of decks, I had had experience with every stage of the process in the “factory” and thus a strong working knowledge of the overall process. For the rest of the time, I sought out work in progress on the factory floor and helped to finish it off. Wherever I found stacks of cards, I just sorted them and took them to QA.
Throughout this process, I remember hearing the disconcerted voice of the owner, who seemed to be worried about everything. She was frightened when I fixed the instructions on the flipchart, confused when I was changing roles or anything else unexpected. She noticed when people were not working, and wanted the manager to do something about it. I’m not sure how that role was structured, and what pressures she was responding to. I had no contact at all with the customer.
Once the simulation was over, the customer checked several of the delivered products, rejecting one which had an error, but still ending up with enough to meet the requirements. All told, the simulation ran very smoothly, and I was keen to analyze why.
Next, each of us drew a diagram of the process from our point of view. I often struggle with creating diagrams by hand, because I tend to work out the structure as I go. This time, I stopped for a moment and sketched the major phases of the process in my notebook before I started drawing. This resulted in a much clearer and neater diagram than I normally produce.
We discussed the diagrams as a group, which revealed a lot about how things had really worked, more than anyone had been able to see individually. It was surprising how much information was disseminated in such a short amount of time through drawing and discussing the diagrams. It helped that the entire exercise was very fresh in our minds, but I got the impression that this would be a useful way to gather and share information from a group under normal circumstances as well.
I had to leave a bit early in order to catch my flight, so I missed the end of the discussion.
Amplify Your Effectiveness (AYE) Conference: Day 3 (morning)
Today is my last day at the conference, and I’ll be leaving before the welcome dinner in order to catch my flight to Dallas. It has been a pleasure meeting everyone, and an invaluable opportunity to get perspective on my work and other parts of my life.
Morning session: Retrospectives (Esther Derby)
The full title of this session was Looking Back, Moving Forward: Continuous Improvement With Effective Retrospectives. I find retrospectives to be a useful tool for process improvement, and am interested in gaining more experience with them and learning new techniques.
To start, the group (about 12 people) conducted a project together. We were provided with a specification for a 3-dimensional model of an urban development project, and some supplies with which to build it. Over the course of 30 minutes, we organized ourselves, performed the task, and successfully delivered the result to a satisfied customer.
Overall, the project went very well, so I was looking forward to the retrospective. In a retrospective, I often find myself focusing on the problems, so this would be good practice in identifying and repeating successes.
To start, we “set the stage” for the retrospective by reviewing the agenda and “working agreements” (pre-established goals and guidelines for behavior). I always try to do this in retrospectives, but the idea of agreeing the guidelines in advance was new to me. This would both help to build support in the team, and save time in the meeting.
Then, we conducted a quick poll of the group to assess the outcome of the project, using a weather metaphor: was it “partly sunny”, “cloudy”, “rain”, etc. I liked this metaphor because I found it more neutral than a rating: weather is something which just happens and is observable, while numbers, for example, seem to carry more judgement.
Next, we broke into smaller groups to collect data (our observations) on the project we had just completed. I liked the idea of doing this in smaller groups, as it promoted more points of view, and also produced some redundant data (which was useful in the analysis to follow). We wrote these observations on sticky notes.
To analyze the data, everyone came back together and plotted it on a “FRIM” chart (frequency vs. impact), where one axis indicated frequency (how often it occurred during the project?) and the other impact (how much impact did it have, and was it positive or negative?). We looked at this data from near and far, looking for patterns and considering individual notes.
The upper left quadrant (low frequency and positive impact) was dominated things which happened near the beginning of the project: establishing roles, establishing the workspace, etc. The lower left quadrant (low frequency and negative impact) showed mostly items to do with ambiguity: lack of information, confusion and so on. The upper right quadrant (high frequency and positive impact) included ongoing teamwork, the ongoing progress which helped coalesce and motivate the team. There was nothing in the lower right quadrant (high frequency and negative impact), which I took as a sign of a healthy project. The fact that some of the observations were redundant helped make the patterns clearer, by showing what had been noticed more.
With these observations in mind, we broke into smaller groups again, this time with the objective of generating ideas for improvement, or for repeating our successes. I thought that splitting up the group would bring more ideas out, but in fact we came up with many of the same suggestions. Still, this helped to reinforce the suggestions because they were independently proposed by different groups.
The team was reformed, and suggestions were posted on a flipchart page with a table for evaluation. The team rated the suggestions according to the amount of effort required, the anticipated impact, and their individual willingness to work on it. Finally, based on this data, Esther asked for a volunteer to implement the most promising suggestion, choosing just one to keep the amount of change manageable. She asked for a second volunteer to back up and support the first. I liked the idea of rating the suggestions together, and also having someone in a supporting role for the followup action.
We then polled the team again, reusing the weather metaphor, to predict the “weather” for the next project, based on what we learned. Most of the group was optimistic, though a couple of people predicted storms. When asked about their concerns, one of them pointed out that our decision to focus on improving one aspect of our process could cause us to waste too much time up front working on that. To mitigate this, we resolved to limit the amount of time we would spend on it, and he seemed satisfied. The other doomsayer was unrepentant, and said he suspected we would fall prey to the “second system” effect. I got the impression that he wanted to be proven right, and wasn’t interested in avoiding such a problem.
We concluded by reviewing the overall structure of the retrospective, and how the stages fit together: setting the stage, gathering data, analyzing it, selecting actions and wrapping up. The wrap-up included a retrospective on the retrospective itself, to promote improvement of that process. I was a bit concerned we would end up in infinite regress, but Esther stopped there, and didn’t do a retrospective of the retrospective of the retrospective. I don’t normally even do one meta-retrospective, but am considering trying that out now.
Amplify Your Effectiveness (AYE) Conference: Day 2
Morning Session: How Do I Communicate With You? (Don Gray)
This session explored interpersonal communication, in particular how to identify communication styles and preferences and apply this knowledge to communicate more effectively.
In one of the exercises, we broke into pairs and exchanged stories from recent memory. While one person told their story, the other observed their language, noting the types of predicates used (visual, auditory, kinesthetic, olfactory/gustatory and “unspecified”) as indicators of the speaker’s representational system. We used this data as the basis for a discussion about cues which indicate a person’s preferences, ranging from word choice to eye movement.
Another exercise divided the group into two based on personality type (Myers-Briggs “N” and “S”). Both groups were given identical objects (Starbucks paper coffee cups) and asked to write down descriptive phrases. The “N” group’s descriptions were wide-ranging, exploring the possible uses of the cup, the memories and meanings it evoked in them. The “S” group focused more on the physical properties of the cup, and where there were some comments on the ideas associated with it, these were carefully separated on a separate list.
A third exercise had us folding a piece of paper according to instructions read aloud. The instructions were ambiguous, and would be interpreted differently depending on how the person happened to be holding the paper, how they turned it as they folded it, or how they interpreted the sentences. Unsurprisingly, everyone ended up with a different pattern.
There was then some free-flowing discussion about communication styles where people in the group shared experiences of communication challenges. I learned more from these scenarios than from the exercises, which were covering familiar ground. The challenge, for me, is applying what I know about communication theory, by raising my awareness of patterns in real life situations. Practicing this through discussing examples was more helpful to me than exploring more theory.
Finally, the group was presented with a choice of whether to explore a canned scenario (a new executive looking for feedback from others in the organization) or a real-world scenario put forward by someone in the group. The latter option prevailed, but the scenario was a price negotiation with few details, which I didn’t think would be valuable for me. I excused myself and left early, purchasing a copy of Tom DeMarco’s Slack from the book table.
Afternoon session: Beyond the Org Chart Illusions (Jerry Weinberg)
This session alone would have made this conference worthwhile. In it, we explored the structure and dynamics of organizations from a first person point of view. The idea was to discover the tacit structures which make up organizational culture. Setting aside the “objective” description provided by an organizational chart or other such tool, we instead created individual representations of the organization as we experienced it.
To do this, we used an exercise based on Virginia Satir’s technique of family mapping. We each selected an organization we were familiar with, and drew a picture with symbols: first ourselves, then other people (both with no names or words), then physical objects and structures, and labels. We then overlaid the points of pain, pleasure, problems, plans, performance (high and low) and power in the organization.
Unsurprisingly, the diagrams were all vastly different in symbolism, structure, order, level and technique. Jerry focused the group on a pair of diagrams created by two different people in the same organization. The creators explained the meanings of the symbols they used, illustrating the problems faced by the organization. This spawned a discussion about how to address those problems, which occupied the rest of our time.
This discussion really got me thinking, and drawing parallels with my own experience. In particular, i identified with some of the fears and other roadblocks which prevented the people from taking action. One memorable point from Jerry was that you will never convince someone with logic to change something they did not arrive at through logic. I make that mistake a lot.
I also gained some insight on how companies can be successful despite poor management, at least for a time. For example, circumstances may favor the company, such as having little or no competition. Advantages like that don’t last, though, and when things change, the management gap can cripple the company.
I can’t describe here much of what I learned in this session, but I found it extremely valuable.
Amplify Your Effectiveness (AYE) Conference: Day 1
Morning Session: Project Patterns
I chose to attend a session entitled: Is this the Way We Really Want to do Things? Seeing Project Patterns and Changing What You Don’t Like (Johanna Rothman). My goal was to explore the causes of the troublesome patterns I see in projects at work. In particular, I see:
- Too many projects starting up at once
- Projects being instantiated without enough consideration for the probability of success (“is this a good idea?” rather than “can we realistically achieve this?”)
- Key people finding out too late about projects which affect them
All of these patterns lead to increased project risk, communication bottlenecks, low motivation, and high stress.
In the session, we conducted a simulation of a team, with engineers, a project manager, a senior manager and a customer. I took on the role of the senior manager.
In the course of the simulation, we received requirements from the customer, implemented them, and delivered products. While the team was working on implementation, I talked with the customer about what was coming next: what would happen when we delivered, what the next project would be, and so on. Part of the simulation was that I had to be separated from the group while they were working.
When we delivered the first batch of products, and the customer was happy with them, it was time to decide what to do next. We gave the customer a choice of two projects we had discussed, one of which was similar to the previous one (but larger scale and more involved), while the other was different. Despite repeated attempts, we could not persuade the customer to prioritize one over the other.
So, I decided that we should change gears and start work on the “different” project. It seemed to be of greater economic value to the customer, and simpler to execute. One of the engineers disagreed with this decision, but didn’t explain why. The project manager seemed to agree, and I left the team to work. They produced a prototype, which the customer liked, and with a few small changes it was accepted as a finished product.
To my surprise, though, I found out later that the team was in fact working on both projects at once, delivering two different types of products. The decision hadn’t actually been made. These unexpected products were delivered to the customer, but didn’t meet the expanded requirements, and that work was wasted.
The debrief which followed was unfortunately too short, and I didn’t feel that we were able to fully explore what the simulation had revealed. The project manager indicated that he hadn’t understood the decision to have been made, pointing to a communication failure.
This reminded me that while we often think of a decision as an event which happens at a point in time, it is more commonly a process of change, which takes time and must be revisited in order to check progress and evaluate. A decision is really just an idea for a change, and there is more work to be done in order to implement that idea. This can be true even when there is a very explicit “decision point”: it still takes time for that message to be received, interpreted and accepted.
One of the tangents we followed during the debrief had to do with how humans think about numbers. Jerry asked each member of the group to write down a random number, and then we wrote them all on a flipchart. They were: 8, 75, 47, 72, 45, 44, 32, 6, 13 and 47. This reminded me of the analyses of election results which indicate fraud.
Afternoon Session: Saying No
After lunch, I decided to attend Jerry Weinberg’s session, Saying No That Really Means No. This was much larger than the morning session, with over 40 people sitting in a large circle.
The subject of discussion was the variety of difficulties that people face in saying “no” to things which don’t seem right for them. For example, saying “yes” to a project which is doomed to failure. This seemed like a good follow-on to the morning’s exercise.
Jerry began by asking the audience to name some of their difficulties, and tell stories of times when they had trouble saying “no”. One of these stories was role-played and analyzed as an example. Most of the time, though, was filled with storytelling and discussion.
This is a deeply complex topic, because this problem is rooted in self-image, social norms, egocentrism, misperception, and other cognitive phenomena. There was no key insight for me, just a reinforcement of the necessity of self-awareness. The only way to avoid patterns like this is to notice when they are happening, and that can be challenging, especially in a stressful situation.
Once you realize what’s happening, there are all sorts of tools which can be applied to the problem: negotiation, requests for help, problem-solving, even simple inaction.
Amplify Your Effectiveness (AYE) conference: Day 0
The AYE conference is an annual conference “designed to increase your effectiveness—in leadership, coaching, managing, influencing, and working in teams, whether you work in systems development, testing, product development, quality assurance, customer service, or consulting.” It starts tomorrow, and I’ve arrived today eager to meet the other attendees and see what the conference is like.
My work involves all of those things, but the main reason I decided to attend was that I learned a lot at the Problem Solving Leadership workshop, which I attended in January and wrote about on this blog. When I heard about this event, organized in part by the same people, and realized I would be in the US that week anyway, I seized the opportunity to attend.
The 2009 program is overflowing with sessions on topics I’m interested in, some of which I have written about here previously.
The speakers are all people whose insight I’ve appreciated through their writing, speaking and teaching, so I expect I’ll have a tough time deciding where to spend my time these next few days. The sessions are said to be experiential ones rather than lectures, so I don’t think that I’ll be able to hop between them, but I’ll see tomorrow when the main program starts.
