-
Unlocking Motorola RAZR i (XT890) bootloader
Get Device ID
C:homekimisdkandroidplatform-tools>fastboot.exe oem get_unlock_data
< waiting for device >
…
(bootloader) 3A35120005260968#53304237373054
(bootloader) 5A493200000000000000000000#200E
(bootloader) AAD3AF9C168CA7185FAB94159B0E543
(bootloader) D836A#6D81236CC0D64A84AFC35817B
(bootloader) CD123456
OKAY [ 0.328s]
finished. total time: 0.332s
1) Device ID = Concat the 5 string
3A35120005260968#543032333730525A493200000000000000000000#100EAAD3AB9F778CA7185CDB94159B0E543D836A#6D85976CC0D64A84AFC35817BCD50000
2) Check Device can be unlockeable
3) Request Unlock Key (Bye bye Warranty)
4) Get Unlock Code from emailUnlock Device
1) fastbook devices
C:homekimisdkandroidplatform-tools>fastboot.exe devices
T02370RZI2 fastboot
2) send unlock code to phone
C:homekimisdkandroidplatform-tools>fastboot.exe oem unlock XXXXXXXXXXXXXX
…
(bootloader) Creating EXT4 FileSystem for userdata
(bootloader) Unlock completed! please reboot
OKAY [ 19.262s]
finished. total time: 19.267s
C:homekimisdkandroidplatform-tools>
3) Reboot (cycle power)
4) An alert will appear… -> Device unlocked!
Ref. URL: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b
-
Loading rootfs from USB in Beagleboard
1) Format a USB Flash Drive with EXT4 File System
2) Decompress rootfs.tar.gz into USB Flash Drive
cp rootfs.tar.gz /media/USBDrive
cd /media/USBDrive
tar -jxvf rootfs.tar.gz
rm rootfs.tar.gz
3) Now we will tell the board to boot from USBcp ~/RowboatTools/am37x/mk-bootscr/mkbootscr ~/RowboatTools/am37x/mk-bootscr/mkbootscrUSBvi ~/RowboatTools/am37x/mk-bootscr/mkbootscrUSBchange
root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwaittoroot=/dev/sda1 rw rootfstype=ext4 rootdelay=30 rootwait
4) Build boot.scr
cd ~/RowboatTools/am37x/mk-bootscr/
./mkbootscrUSB
5) Copy boot.scr into SD Card – Boot partition
cp boot.scr /media/boot
6) Unmount all drives and boot with SD Card and USB Flash Drive inserted
Later you can try formating the “rootfs” partition in the SD Card and restart the board. Don’t erase the partition, just the content.
You will find that running Android on Beagleboard from USB may be, by far, faster than from SD Card. -
Setup Development Tools for Android
Software needed
- Eclipse IDE for Java Developers (at least Eclipse 4.2 – Juno) – link
- Android ADT Plugin
- Android SDK
- Android NDK
Eclipse and ADT
- Decompress Eclipse inside your user folder
- Start Eclipse with a default workplace
- Click on Help -> Install New Software
- Click on Add
- Enter ADT Plugin as the Repository Name
- In Location enter https://dl-ssl.google.com/android/eclipse/
- Click Ok
- Select Developer Tools and NDK Plugins
- Click Next and follow the installation instructions.
Proceed restarting the Eclipse if you are prompt to do so.Installing ADT
When starting Eclipse again, you will see a dialog with a Welcome message. If you don’t have the latest Android SDK, install it.

Once you have installed and set up the IDE, you are ready to start developing Android apps. It’s recommended to install more SDKs from the Android SDK Manager. For Example, Android 4.1 (the latest version is 4.2) and Android 2.3. -
Android Jelly Bean (4.1.2) for Beagleboard xM in Photos
Beagleboard hardware
Android information
Available memory on Beagleboard with Jelly Bean 4.1.2
Browsing the Internet
-
Simple log for iOS
In every method two very important variables can be found. One is already known by many iOS dev, and it is ‘self’. The other one is ‘_cmd’. This last one is the selector of the current method. This variable can useful for logging purposes. In the Silver Sparrow log framework, it is used inside a macro in order to add important information to a log entry.
For example:
NSLog(@"{ERROR} [%@ %@] %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), message);
In this line, the class name and the method name are added to NSLog.
You can download and use the log library, which is available at SSLoger on GitHub -
Passcode Lock Screen for iOS
I have designed a small library (with its test project) that lets you implement a passcode lock screen on iOS. The library is compatible with iPod Touch, iPhone and iPad. And it is very easy to use.
EAPasscodeLock* passcodeManager = [[EAPasscodeLock alloc] init];
UIViewController* plViewController = [passcodeManager passcodeViewControllerWithCode:@"1234" cancellable:YES hintText:nil maxRetries:4 delegate:self];
[self presentModalViewController:plViewController animated:NO];
There is a protocol you should implement, with only one obligatory method, that sends messages to the main view.
@protocol EAPasscodeLockProtocol
@required
// Called when the passcode is entered correctly after dismissing the passcode View Controller
-(void)passcodeDidUnlockedSuccessfully;
@optional
// Called when the passcode is entered correctly before dismissing the passcode View Controller
-(void)passcodeWillUnlockedSuccessfully;
// Called when a passcode entered is incorrect
-(void)passcodeFailedToUnlock;
// Called when the cancel button was pressed and after the passcode View Controller is dismissed
-(void)passcodeLockWillBeCancelled;
// Called when the passcode was entered incorrectly too many times
-(void)passcodeFailedWithTooManyAttempts;
@end
Here a few screenshots of the iPad UIEmpty passcode screen
Typing the code
Wrong passcode message
Find the lastest version on GitHub: https://github.com/eaceto/EAPasscodeLock
-
SVN Tip
//search and delete .svn
find. -depth -name .svn -execrm-fr {} ; -
I want to boot my Kernel on a real machine
Testing and running the Kernel with QEMU is nice, it is faster for developing but it is not what we want. We want to run things in real hardware.
#mtools
echo "drive c: file="`pwd`/bootable.img" partition=1" > ~/.mtoolsrc
#create an image
dd if=/dev/zero of=bootable.img count=088704 bs=512
mpartition -I c:
mpartition -c -t 88 -h 16 -s 63 c:
mformat c:
mmd c:/boot
mmd c:/boot/grub
#copy grub bootloader
mcopy grub/grub-0.94-i386-pc/boot/grub/stage1 c:/boot/grub
mcopy grub/grub-0.94-i386-pc/boot/grub/stage2 c:/boot/grub
mcopy grub/grub-0.94-i386-pc/boot/grub/fat_stage1_5 c:/boot/grub
#grub
echo "(hd0) bootable.img" > bmap
printf "geometry (hd0) 88 16 63 n root (hd0,0) n setup (hd0)n" | /usr/sbin/grub --device-map=bmap --batch
#copy menu.lst to bootable.img
mcopy menu.lst c:/boot/grub/
mcopy kernel.bin c:/boot/grub/
We can test this image using qemu like this
qemu -hda bootable.img
Then, the image can be burned into a pendrive using ‘dd’ or ‘usb-imagewriter’- sudo apt-get install usb-imagewriter (in order to install the GUI Tool)
- sudo dd if=bootable.img of=/dev/sdX (where sdX is the pendrive location into /dev)
-
Monolithic or Micro Kernels
Small differences
The Kernel is that tiny but very important part of the Operating System that acts as bridge between the applications and the low level resources of the computer.When your computer boots, after the boot loader is executed, the Kernel is called. I/O operations and Memory are the most important abstractions of the Kernel, and if the Kernel can run in several processors, it is also important the CPU abstraction.
There are two types of Kernels those called “monolithic kernels” and “microkernels”. The first one embedded all the OS services inside the Kernel. May be this is the easier Kernel to implement, but if there is a bug in some part of the code, it will probably crash the Kernel. Microkernels takes a different approach. Why implementing a monolithic Kernel is not a bad idea? Because this type of kernels are faster, they may have less bugs, and the compiled version may be smaller. And this is the approach used in traditional Unix-like systems. So, it’s not a bad idea.
Microkernels implements minimal OS services, like memory management, multitasking or process communications, but leaves other services like networking outside the kernel, and those services should be implemented in the user space area. This kind of kernels are easier to maintain, and you can load and unload a module without restarting the kernel. But generally the kernel occupies a lot of memory, and bugs are harder to fix.

The Kernel as an abstraction layer between hardware and software






