Experience on compiling AOKP jb-mr1 for Galaxy Nexus
2013-05-11The other day, I heard about OpenPDroidPatches, which adds permission management to Android.
This supports AOKP, the rom I’m using, and permission management in Android has always been a pain in ass. I now have reasons to try to compile AOKP myself. Plus, it’d be fun.
Environment
Failed: on Mac OS X
As I’m using the Macbook Air, so at first I tried to compile under OS X.
That turned out tragic, where I saw some random errors every time and no idea where the problems were. Well, I gave up soon as it seems that the compilation is not designed to be done on OS X. (or maybe I’m too inexperienced.)
EC2 vs DigitalOcean
They were all running Ubuntu 12.04, and no errors during compilation, while the performance differed a lot.
It took about 3 hours and 40 mins to compile on EC2, and about only 45 mins to compile on DigitalOcean.
EC2 configuration: (High-CPU Medium Instance) 1.7 GB of memory, 5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each), 350 GB of local instance storage, $0.145/hr.
DigitalOcean configuration: 16GB of memory, 8 Cores CPU, 160GB SSD, $0.238/hr.
I have to say, SSD does boost the performance a lot.
Compilation
Basically, I followed the official [TUTORIAL] Building AOKP [Ubuntu 12.04+].
One thing is easy to be missing is that do not download all the kernel, but only what is needed. In my case, edit kernel_manifest.xml to delete all <project …/> except
<project path="kernel/samsung/tuna" name="imoseyon/leanKernel-galaxy-nexus" remote="aokp" revision="lk-jb-mr1" />
And then
. build/envsetup.sh; brunch maguro
As to OpenPDroidPatches, the patches are totally fine, without any conflict, and after applying, there is a “Permissions” item in Settings.
Solve “Scrachbox is not properly set up”
2013-04-24Recently, a patch is proposed to stabilize smsbackuprestore by limiting the queried item number each time to 1000.
That sounds cool. So I set up a new Linode VPS to get it done. The problem is once I rebooted VPS after scratchbox is installed, I got this message:
Scratchbox is not properly set up.
After googling, this command didn’t help:
sudo /scratchbox/sbin/sbox_ctl start
Well, let the code talk. It turned out some mounts were not there any more, which were set up the first time starting scratchbox.
So, let me make sbox_ctl think it’s the first time by
sudo touch /scrachbox/.run_me_first_done
And then run the sbox_ctl command, and now it’s fine.
KeymapViewer for Sublime Text 2
2012-11-26It’s a problem that sometimes one or some of the key bindings in muscle memory not working, that we don’t know which one of the newly-installed or newly-updated plugins/packages uses that.
My example is that Emmet(Previously Zen-coding) used Ctrl-D to do something I don’t care, but I could not delete the next character because of that.
So I have to go to the Sublime Text 2′s packages path and grep all .sublime-keymap file to find out which file “ctrl+d” is in. Then I got Emmet. Then I found the function and disabled it.
I think it’s handy that I can do all that in Sublime Text 2, no bothering to open a terminal. Package Control gave me KeymapManager, which triggers a command by its package name (or command name? I don’t remember exactly). But this is not what I want, and I found it a bit buggy and imperfect, and it’s not a manager.
Inspired by that, I wrote my own one: KeymapViewer.
Two commands provided in Command Palette:
- Search by key: Search the command by key strokes. Enter “ctrl+super+p” in the panel and you can see
Package: Default
Command: show_overlay
Args: {u"overlay": u"command_palette"}
- Show by packages: Show panel with all packages except the ignored packages.
Hit Return in both panels and the corresponding .sublime-keymap file will open.
Simple review of Mountain Lion
2012-07-29I got the Mountain Lion as soon as I can and have it installed on my new Macbook Air.
(Well, I have to blame Apple’s performance of sending redeem codes, which seemed to be confirmed and sent by manual. This took about 35 hours for me to get it.)
This is a simple review after 2-day usage. I call it simple, compared to some 24-page review.
Functionalities
Though there are a bunch of new features coming with Mountain Lion, I found there are almost nothing exciting for me.
Major Features
- Notification Center: I’ve already got Growl and it’s working fine.
- Reminder: Calendar(formly known as iCal) does the same work.
- Notes: Evernote are better.
- Game Center: I rarely play games on Mac, and I doubt how many games support that now.
- iCloud: I’ve got only one Mac. Maybe it’s unfair that many got a few Macs, but for me, it’s useless.
- Messages: ASAIK, none of my friends use that.
- Share/Twitter: I’m a reader more than a sharer.
Other improvements
There are some things should be done at the first version they appear in Lion:
- Fullscreen on non-main display: Of course. I recall the embrassing moments I fullscreened the slides and they appeared on my laptop, instead of external big screen.
- Search on Launchpad: Definitely there should be the search feature. But I’m already not using that which takes a lot of time to find the app. I’m using Alfred which is amazing to have the job done.
There are also bad changes from my view:
- Dashboard: Seriously, the old one is better.
- Notification Center icon: I don’t like the icon on right-top. There should at least be an option to remove it. I want to keep my Menubar as simple with only necessary icons.
- OS X software updates: I don’t know if it’s a good change but I didn’t feel right at the first glance.
- Safari
- It’s said to be faster, but I’m not aware of that yet.
- “Show All Tabs”: Seriously, Apple? I don’t think everything in iOS can be merged to Mac OS X (OK, it’s called OS X now). This is totally useless. There are so many ways to navigate through all tabs.
Some improvements are good and friendly, like inline progress for downloads in Finder, and Power Nap.
I would hope there is a “Disable Sharing” option for me, non-sharing people.
Problems
By far, I’ve met two problems:
- The desktop number in Mission Control is not matched with the real one, as the order changed by usage frequency. It’s always 1,2,3,… while the actual order may be 1,3,2,…
- Dashboard freezes all windows (Mission Control still works) until I kill DashboardClient processes sshed from another machine.
Conclusion
Mountain Lion is OK overall, with many minor improvements and some bugs, while the major features are not my things. This update is about iCloud and sharing. I’ll give a 4 out of 5. Hmm, it seems I prefer Lion. But well, things move on. Let me hope Apple can fix the problems and work on exciting features.
Daily-used Mac Apps
2012-06-19iTerm2 — Improved Terminal
Alfred — Essential Application Launcher
iStat menus — System Monitor (menu bar)
iStat pro — System Monitor (dashboard)
AppCleaner — Application Uninstaller
TotalFinder — Finder enhancement
Divvy — Window Management
Sparrow — Yet another mail client
The Unarchiver — Replacement for “Archive Utility.app”
Reeder — RSS reader
Sublime Text 2 — Text editor
Bartender — Keep the Menubar tight
Resignation
2012-05-31Today I resign from my first job.
It’s been three and a half years.
In the first year, I did learn a lot, not only about programming, but also communication, relation with people and compromise. I, from a graduate who only finish homework and assignment, became a better developer that considering more than only programming.
In the second year, I was a member of a live team, which handled emergencies. So I learned responsiveness and stability. Later in that year, I began to learn leadership. Much more to keep in mind, well also more tired.
The third year was when I began to get in touch with Mac and iOS. This is a totally different field. I got to know and became interested in the leading stuffs of digital world. Design, User experience, and Server performance were the main things of the year.
Now I’m a bit tired of regular work here now. I want to work with people smarter, more creative, technically better than I am so I’m strongly willing to work with him/her so I cannot leave a company even there are evil things. And I don’t know why but I have higher standard for co-wokers that I was sometimes angry with the same stupid mistakes they made again and again. And as the company grows bigger and bigger, more people are coming. I seems to be not very comfortable about that. I guess I prefer small and high quality groups. Also I think it’s a good chance that I can begin to learn what I’m interested in, what I found I’m lack of, and the direction I’m going down to. There are indeed a lot to learn, basic and advanced.
Good luck to myself and hope little distraction to me when I learn things by myself.
修改Adium时间的显示样式
2012-03-25Adium是Mac下比较好用的多协议即时通讯客户端。有个问题是把消息中的字体变大后,时间的字体大小没变。于是就出现了很丑的消息内容比时间大一倍的样子。
这种低优先级的东西一般说来还是不要指望他们能很快修好。自己动手,丰衣足食。还好,不是太难。
应该说很容易,因为时间的字体大小是css文件控制的。在Adium的安装目录(一般是/Application)下,我用的是yMous样式,所以文件在
/Applications/Adium.app/Contents/Resources/Message Styles/yMous.AdiumMessageStyle/Contents/Resources/Styles/Base.css
找到.x-time,其中有font-size: 0.5em,想怎么改就怎么改了。重启后就能看到效果了。
然后,每次Adium更新之后都需要重新改下这个文件,很麻烦。于是,我把
/Applications/Adium.app/Contents/Resources/Message Styles/yMous.AdiumMessageStyle
移到
~/Library/Application Support/Adium 2.0/Message Styles
然后把名字改成yMous-big.AdiumMessageStyle,以及Info.plist里相关的内容。在Finder中双击打开这个“文件”就安装成功了。
Meego系统短信备份恢复工具
2012-03-22Meego系统概念不错,虽然N9是最后一部Meego的手机(应该是吧)。
有一个问题是短信没办法备份恢复,因此无法把之前的短信导进去。
于是就写了这么个小工具,导入导出的文件格式是csv。其实是伪csv,以适应内容里有换行符的情况。
注意 如果要自己编译源代码,先按照Harmattan Platform SDK上的说明搭建环境,然后运行
apt-get install libcommhistory-dev
安装libcommhistory头文件。
CSV格式说明
电话号码,方向,日期,"内容"
- 电话号码:发送或接收短信的号码
- 方向:1为接收,2为发送
- 日期:格式是yyyy-MM-dd hh:mm:ss
- 内容:两端的双引号是为了有换行符在内容中出现的情况,会根据引号出现的奇偶来判断是否结束。若内容中带双引号,需转义为两个双引号”"。
SMS Backup and Restore on Meego
2012-03-21Recently I’ve got a N9 to play with. The boring thing is I cannot restore my old SMSs. So I wrote a small utility to backup and restore.
The repo is located at GitHub. The deb file can also be downloaded there.
Notice To compile from source code, follow the intruction on Harmattan Platform SDK to build the environment, and run
apt-get install libcommhistory-dev
to have libcommhistory headers. (Thanks Philipp Zabel for helping me on that)
Update Growl framework for MacDroidNotifier
2012-01-14Android Notifier sends the notifications to computers. Here’s the article on lifehacker.
I’m using Mac, so I installed MacDroidNotifier from the project home. But as I installed Growl 1.3.2, without backward compatibility. So I updated Growl framework for MacDroidNotifier.
The project home is on GitHub, and MacDroidNotifier can be downloaded here. It’s tested on Mac OS X Lion 10.7.2.