Taking screenshots of the application you're developing has never been easier since Android 4.0.
If you have your device in debugging mode, just list the devices to see if the tablet/phone is visible:
adb devices
and then take screenshots in the following manner:
adb shell /system/bin/screencap -p /sdcard/screenshot_1.png
Search This Blog
Thursday, June 6, 2013
Friday, May 31, 2013
Stable, working Android 4.0 / 4.1 on Galaxy S Advance I9070 - my expieience
In this short post I'm gonna present my view on the current Android development stage on Android 4.0 on Galaxy S Advance I9070.
First of all, my device was purchased from Polish carrier PLAY. This flavored ROM still has 2.3 gingerbread. How ridiculous it may sound, the ICS version is not going to come soon in Poland...
There was an official version for pure PL version of 4.1.2 - XXLQE which was a mess.
My advice - do NOT install this ROM - I9070XXLQE has some modem issues - it looses coverage, the 3G does not work. It's a total disaster and was pulled of Samsung Air....
Similar problems are depicted here:
http://www.youtube.com/watch?v=dsexSanmpVw
The stable release I'd found is the Russian version: I9070XXLQ4.
First of all, my device was purchased from Polish carrier PLAY. This flavored ROM still has 2.3 gingerbread. How ridiculous it may sound, the ICS version is not going to come soon in Poland...
There was an official version for pure PL version of 4.1.2 - XXLQE which was a mess.
My advice - do NOT install this ROM - I9070XXLQE has some modem issues - it looses coverage, the 3G does not work. It's a total disaster and was pulled of Samsung Air....
Similar problems are depicted here:
http://www.youtube.com/watch?v=dsexSanmpVw
The stable release I'd found is the Russian version: I9070XXLQ4.
Model: GT-I9070
Country: Russia
Version:
Changelist: N/A
Build date: N/A
Product Code: SER
PDA: I9070XXLQ4
CSC: I9070SERLQ4
MODEM: I9070XXLQ4
http://www.hotfile.com/dl/193240094/4c07575/I9070XXLQ4_I9070SERLQ4_SER.zip.html
After upgrade from Polish 2.3 (which was buggy as well), in 4.1 the phone does not loose coverage and the coverage is a lot better. It also has less lags.
The Android 2.3 lag issue in Galaxy S Advance I9070 was mainly with the phone app - when you wanted to dial a number, you chose the person and clicked the "dial" button.... and nothing happened. Most of the cases I was starting to get irritated and quit the phone app.... then all of a sudden the phone was starting to dial the number I had chosen earlier....
Actually with CWM you can install ROMs from XDA, but the one I tried was buggy, badly translated and the AOSP experience was not really AOSP..... it was a theme that was badly applied, so I do not recommend this one: http://forum.xda-developers.com/showthread.php?t=2182697
( [Rom][JB] Pure Vanilla (AOSP) ★ Smoothness Refined ★ Debloated (29/5/13))
Have anyone tried:
([I9070 JB] Full JB ROM deodex + MODS))
or:
( [JB STOCK MOD][I9070] Android AOSP like --> Simple Droid v3 [21.02.Update])
???
Friday, May 10, 2013
Oracle VirtualBox / VBox - mount share on linux, vbox linux shared folder
Mounting Oracle VBox share on linux is much easier than you might think.
1. Install VBox tools on the linux guest operating system (VM->Devices->Install Guest Additions)
After the tools have been successfully installed configure a shared folder in Devices->Shared folders.
Write down the name of the share (Name of the shared folder).
The mount should be done automatically to the folder:
/media/vs_YourFolderName
(Remember that only a root user will have privileged to that read/write to that folder)
Alternatively you can mount the folder yourself with the command:
mount -t vboxsf YourFolderName /home/user/vboxsharefolder
where YourFolderName is the name of the VirtualBox share,
and /home/user/vboxsharefolder is a previously created folder to which you have appropriate privileges.
1. Install VBox tools on the linux guest operating system (VM->Devices->Install Guest Additions)
After the tools have been successfully installed configure a shared folder in Devices->Shared folders.
Write down the name of the share (Name of the shared folder).
The mount should be done automatically to the folder:
/media/vs_YourFolderName
(Remember that only a root user will have privileged to that read/write to that folder)
Alternatively you can mount the folder yourself with the command:
mount -t vboxsf YourFolderName /home/user/vboxsharefolder
where YourFolderName is the name of the VirtualBox share,
and /home/user/vboxsharefolder is a previously created folder to which you have appropriate privileges.
Monday, April 29, 2013
Archlinux 24/7 uptime installation on a pendrive - limit flash IO (reads/writes)
Installing a box that runs 24/7 on a pendrive seems not like a best idea at first - continuous reads and writes would destroy the flash memory withing months of usage. There are some ways to minimize these, however. Two of them that come to mind at first are - let the swap file reside on a HDD instead of flash card. What about logs? - let us keep them in memory and discard when the box is being shut down.
Linux mounts partitions at boot from a file: /etc/fstab
Let /dev/sdb1 be our HDD partition and /dev/sda our flash card.
At first we need to mount HDD partition to any directory on the root of the file-system /
/dev/sdb1 /home/user/movies ext4 defaults 0 0
Let's move the swap file to HDD instead of a flash card:
/home/user/movies/swapfile none swap defaults 0 0
And create a temporary partition (discarded at shutdown) with the logs.
tmpfs /var/log tmpfs defaults,noatime,mode=755 0 0
Linux mounts partitions at boot from a file: /etc/fstab
Let /dev/sdb1 be our HDD partition and /dev/sda our flash card.
At first we need to mount HDD partition to any directory on the root of the file-system /
/dev/sdb1 /home/user/movies ext4 defaults 0 0
Let's move the swap file to HDD instead of a flash card:
/home/user/movies/swapfile none swap defaults 0 0
And create a temporary partition (discarded at shutdown) with the logs.
tmpfs /var/log tmpfs defaults,noatime,mode=755 0 0
So the whole /etc/fstab file will look like this:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
/dev/sdb1 /home/user/movies ext4 defaults 0 0
/home/user/movies/swapfile none swap defaults 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=755 0 0
Monday, March 11, 2013
Huawei MediaPad 10 FHD (Chinese edition) C233B003/C233B001 Root and Google Apps (Google services/GApps)
The article describes rooting and gapps installation process on Huawei MediaPad 10 FHD imported from China.
The device in question: huawei site and gsm arena.
Some advice before buying/rooting:
Rooting & GApps for S10-101w C233B003/C233B001 can be download here.
(MediaPad 10 FHD固件(S10-101w,Android4.1,C233B003,中国区WIFI 4.1版本))
Rooting process & installing Google apps:
Root
1. [Optional if already installed on a tablet] Download a Chinese ROM - Android 4.1, C233B003 (for S10-101w version)
2. Power on the device, connect the usb cable (in HiSuite mode) - download and install HiSuite from a link (or from a website).
2. Disconnect usb cable, connect it again and select MTP mode - there should a device "Huawei MediaPad" in "My computer"
3. Run "Root.bat" from the package in folder /Huawei_MediaPad_10_FHD_ChineseVersion_C233B003_C233B001_Root_And_Google_Apps/1_BootloaderUpdate/Huawei_S10-101w_V100R002C233B003_Root_Repair_Downgrade . The process takes about 12 minutes. Includes several restarts and displays several errors - in the end you should have a rooted pad.
4. Check that you have a super su app on the tablet and that you have root privileged.
Google apps:
5. The tablet is missing Google services which are required to run e.g. Google Play Store. Transfer "ActiGSM.apk" to your freshly rooted tablet and install it. Then run the script (by just simply running the application for an application drawer) which will enable google services and all google apps on your tablet.
The device in question: huawei site and gsm arena.
Some advice before buying/rooting:
- DO NOT buy the Chinese version if you have a choice. Due to some licencing issues the C233B003 has NEITHER google services NOR google play/GMail/YouTube apps installed by default (GApps're actually disabled - but cannot be turned on without rooting&using a Chinese script)
- Due to a blocked bootloader you cannot flash a European version of the ROM to a Chinese tablet - fortunately the Chinese ROM is Android 4.1.2 and has English language (but no gapps)
- the Chinese ROM has a lot of rubbish installed - Chinese internet browsers, their own store etc.
Before flashing any ROMs you need to remember that there are 3 types of these devices:
- S10-101w - the Wifi only version
- S10-101L - LTE edition
- S10-101u - 3g edition
Chinese ROM can downloaded here (huawei website).
ROM I used for S10-101w is available for direct download here.
ROM I used for S10-101w is available for direct download here.
Rooting & GApps for S10-101w C233B003/C233B001 can be download here.
(MediaPad 10 FHD固件(S10-101w,Android4.1,C233B003,中国区WIFI 4.1版本))
Rooting process & installing Google apps:
Root
1. [Optional if already installed on a tablet] Download a Chinese ROM - Android 4.1, C233B003 (for S10-101w version)
2. Power on the device, connect the usb cable (in HiSuite mode) - download and install HiSuite from a link (or from a website).
2. Disconnect usb cable, connect it again and select MTP mode - there should a device "Huawei MediaPad" in "My computer"
3. Run "Root.bat" from the package in folder /Huawei_MediaPad_10_FHD_ChineseVersion_C233B003_C233B001_Root_And_Google_Apps/1_BootloaderUpdate/Huawei_S10-101w_V100R002C233B003_Root_Repair_Downgrade . The process takes about 12 minutes. Includes several restarts and displays several errors - in the end you should have a rooted pad.
4. Check that you have a super su app on the tablet and that you have root privileged.
Google apps:
5. The tablet is missing Google services which are required to run e.g. Google Play Store. Transfer "ActiGSM.apk" to your freshly rooted tablet and install it. Then run the script (by just simply running the application for an application drawer) which will enable google services and all google apps on your tablet.
Friday, February 8, 2013
Git - running garbage collection on your repository
There is a neat feature of git called "garbage collection" that I recently got familiar with. My half-a-year repository which had 1.6 GB (the .git folder itself having had 424 MB) was shrunk to 1.5 GB (with the .git folder having 292 MB).
C:\Repo\.git>git gc
Counting objects: 55965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (15987/15987), done.
Writing objects: 100% (55965/55965), done.
Total 55965 (delta 42100), reused 52422 (delta 38932)
There is also an "aggressive" garbage collection option which you can use:
--aggressive
Usually git-gc runs very quickly while providing good disk space utilization and performance. This option will cause git-gc to more aggressively optimize the repository at the expense of taking much more time. The effects of this optimization are persistent, so this option only needs to be used occasionally; every few hundred changesets or so.
For more info have a look here.
C:\Repo\.git>git gc
Counting objects: 55965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (15987/15987), done.
Writing objects: 100% (55965/55965), done.
Total 55965 (delta 42100), reused 52422 (delta 38932)
There is also an "aggressive" garbage collection option which you can use:
--aggressive
Usually git-gc runs very quickly while providing good disk space utilization and performance. This option will cause git-gc to more aggressively optimize the repository at the expense of taking much more time. The effects of this optimization are persistent, so this option only needs to be used occasionally; every few hundred changesets or so.
For more info have a look here.
Silverlight DevExpress DXperience Grid Printing Layouts
This example shows how to use simple templates in DevExpress printing mechanism. The most important thing you can't miss is that it is absolutely essential to use DevExpress template controls in DataTemplate - plain Silverlight controls are simply removed when the template is processed. In this example this is <dxe:TextEdit /> used instead of Silverlight's <TextBlock>.
<UserControl
[....]
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
<UserControl.Resources>
<DataTemplate x:Key="headerTemplate">
<dxe:TextEdit Text="{Binding Path=Content, Mode=OneWay}" />
</DataTemplate>
</UserControl.Resources>
[....]
</UserControl>
var preview = new DocumentPreviewWindow();
var link = CreateExportServiceLink(gridControl, preview);
PrepareHeader(link);
private PrintableControlLink CreateExportServiceLink(
IPrintableControl gridControl,
DocumentPreviewWindow documentPreviewWindow)
{ var link = new PrintableControlLink(gridControl)
{
ExportServiceUri = "http://127.0.0.1:8080/IExportService",
Landscape = true
};
var model = new LinkPreviewModel(link);
documentPreviewWindow.Model = model;
return link;}
private void PrepareHeader(PrintableControlLink link){
link.ReportHeaderTemplate = (DataTemplate)Resources["headerTemplate"];
link.ReportHeaderData = "Text to be displayed";
}
<UserControl
[....]
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
<UserControl.Resources>
<DataTemplate x:Key="headerTemplate">
<dxe:TextEdit Text="{Binding Path=Content, Mode=OneWay}" />
</DataTemplate>
</UserControl.Resources>
[....]
</UserControl>
var preview = new DocumentPreviewWindow();
var link = CreateExportServiceLink(gridControl, preview);
PrepareHeader(link);
private PrintableControlLink CreateExportServiceLink(
IPrintableControl gridControl,
DocumentPreviewWindow documentPreviewWindow)
{ var link = new PrintableControlLink(gridControl)
{
ExportServiceUri = "http://127.0.0.1:8080/IExportService",
Landscape = true
};
var model = new LinkPreviewModel(link);
documentPreviewWindow.Model = model;
return link;}
private void PrepareHeader(PrintableControlLink link){
link.ReportHeaderTemplate = (DataTemplate)Resources["headerTemplate"];
link.ReportHeaderData = "Text to be displayed";
}
Subscribe to:
Posts (Atom)