Wednesday, October 8, 2014

minione重启进入recovery又要线刷机才能行~实在是麻烦

MINI ONE 不支持卡刷.请在官网下载对应型号的固件进行刷机.注:根据机器后壳序列号选择对应型号的固件进行升级.确认平板处于关机状态下,然后按住音量减号键不松手接数据线连接到电脑上,可进入到刷机模式.如机器一直处于开机状态,请您按住音量减号键不松手接数据线连接到电脑上,再按一下机器后壳上面的复位键.下载固件后解压出来内附有操作指导,可根据指导先进行操作.
感谢您对原道数码的支持,祝您工作顺利、生活愉快!

每星期瘦1kg 的秘笈

過完了飲食墮落的生活後,肚子肥了一圈,快要迎接秋冬易肥的日子。你是不是也下定決心「要努力減肥!」但一拖再拖,最後因為「來不及了……」只好放棄了!在這裡介紹「一個禮拜可以瘦1公斤」的緊急減肥技巧!

話雖如此,但是並非斷食的方法,也不需要準備一些特別的東西。不用改變生活習慣,也不用花錢,在自家也可以簡單做到,大家一定要試著變美變瘦。

1:以水為主要飲品

水不含熱量也沒有脂肪,能促進新陳代謝,是最適合減肥的飲料。平時飲用白開水以外的飲料,特別是果汁等的人,首先將飲料改為白開水,可以減少熱量的攝取。

2:將穀類換成蔬菜

因為白米、意大利粉及三明治等的穀物類容易被消化,之後肚子會餓,就容易吃過量。所以在這一星期內,只要將三明治換成雞肉(去皮)及水果(不落調味醬),挑戰將穀類換成蔬菜。蔬菜比穀類消化慢,而且還能將多餘的水分排出,達到瘦身的效果。

3:減少攝取甜品

對於喜歡甜品的人說或許會有點殘酷,但是為了盡可能地減少熱量的攝取,這一星期內應該減少甜食的攝取。

4:食用三文魚

三文魚除了含有能夠製造肌肉的優良蛋白質,還富含ω-3脂肪酸、維他命A與E。所以,應該積極攝取三文魚。

5:運動前先喝1杯咖啡(無聽過嘅!)

剛剛說飲料僅攝取白開水,但是在運動前例外。因為咖啡能幫助運動時的脂肪燃燒。黑咖啡熱量只有5大卡,加了無脂牛奶的話大約也僅有11大卡,這樣的低熱量真的很吸引人。

6:每天進行30分鐘的帶氧運動

能夠有效率的活動肌肉提高熱量的消費,帶氧運動是正確的。像是踩單車、自由搏擊、BOOT CAMP類的運動,30分鐘的運動可以消耗200~300大卡的熱量,還可以修飾手臂、腿部及軀幹等各個部位。

7:2天一次伏地挺身&弓箭步

想要讓身體更緊實就要每天做伏地挺身與弓箭步(單腳向前跨大步的動作),一天三回各12次。伏地挺身可以鍛鍊上半身,而弓箭步則有強化臀部及大腿等下半身肌肉的效果。

8:比平時多睡30分鐘

因為在平時的睡眠時間多加30分鐘可以解決嗜睡及倦怠的問題,會想要攝取比平時更健康的飲食,能更有衝勁達到積極活動等效果。此外,睡眠時間大約在7~8小時能夠有效促進代謝。而且,其實肌肉是在睡眠時製造的,可以嘗試下午短睡(只需短短15至30分鐘)。

如何?平常不太在意飲食習慣或是不常運動的人,說不定會覺得有點辛苦,但是只要稍微注意點,1星期後一定可以感受到身體有所變化。就當作是被騙,一定要試著加油一個星期睇睇!

Friday, October 3, 2014

adb backup

ANDROID - ADB Backup/Restore- ADB Extractor (abe) - Extracting adbs with openssl
ADB BACKUPS
############

* Note Citing my sources throughout the article.

Backing up and Restoring
========================
Good articles: http://forum.xda-developers.com/showthread.php?t=1420351
Another good article: http://www.thesuperusersguide.com/adb-backup--restore.html

First install  Android SDK Platform Tools on windows usually it goes to "C:\android-sdk-windows\platform-tools"

On phone enable USB Debugging from SEttings->Developer Options

Open explorer and go to "C:\android-sdk-windows" directory and hold shift while right clicking on "platform-tools" and select "open command window here", thats a good shortcut to open a cmd window into any folder

adb devices

To see connected devices

if you see your device

BACKING UP
----------

adb backup -apk -shared -all -f C:\outputfile.ab

* NOTE ABOUT FLAGS (excerpts from: http://forum.xda-developers.com/showthread.php?t=1420351)
-apk|-noapk: This flags whether or not the APKs should be included in the backup or just the apps' respective data. I personally use -apk just in case the app isn't available in the Market, so that I don't have to go hunt it down again. The default is -noapk.
-shared|-noshared: This flag is used to "enable/disable backup of the device's shared storage / SD card contents; the default is noshared.", which for the Nexus I would certainly flag to -shared, but from my test, it did not restore all of the contents of my internal storage, so I recommend backing up music, pictures, video, and other internal storage items manually, just to be on the safe side. The default is -noshared.
-all: This flag is just an easy way to say to backup ALL apps. The packages flag (further on) can be used to choose individual packages, but unless you're just wanting to backup a specific application, use -all for a full system backup.
-f <filename>: specifies file save location on the computer

Now on phone you should see a screen, if you see a lock screen then unlock it.

Click backup now or set a password and backup. Note if you set a password using ADB Extractor becomes a hassle and using simple linux tools like openssl becomes impossible (at least undocumented on the web as far as I can tell, besides looking through the source code of android or the abe.jar)

RESTORING
----------

adb restore C:\backup\mybackup.ab

Then look at phone, unlock the lock if you need to and if you need to type in a password then type it in.

How to Extract ADB backups With ADB Extractor & Manual extraction with openssl
===============================================================================

LINK: http://sourceforge.net/projects/adbextractor/
* Download the zip file.
* Extract the abe.jar
* JUST COPY abe.jar INTO DIRECTORY WHERE YOU HAVE adb backup .bak or .ad OR .whatever FILE AS LONG AS IT WAS MADE WITH adb backup (OR MAYBE AS LONG AS IT WAS JUST MADE WITH adb)
* JUST OPEN CYGWIN INTO DIRECTORY AND RUN:
# java -jar abe.jar unpack backup.bak backup.tar [password]

* Prerequisties for above method:
- To test run "java -jar abe.jar" then just CONTROL-C, if works good you will have no output, if works bad you will have errors as seen below.
- openjdk-7-jdk (openjdk-6-jdk causes errors)
- check vurrent active version with "java -version"
- if output of "java -version":
---- java version "1.7.0_21" GOOD
---- java version "1.6.0_27" NOT GOOD
Error message when running the program looks like this:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/nick/abe/Main : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:266)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)

* Note running the program with the incorrect prereqs doesnt hurt the source file

* Note if there is a password make sure you have the following:
Oracle Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 if you are going to work with password encrypted backups.
You need to install the files local_policy.jar and US_export_policy.jar under jre's lib/security folder, for example:
- For Windows:
C:\Program Files\Java\jdk1.7.0_09\jre\lib\security\
C:\Program Files\Java\jre7\lib\security\
C:\Program Files (x86)\Java\jdk1.7.0_07\jre\lib\security\
C:\Program Files (x86)\Java\jre7\lib\security\
- For Linux or BSD:
/usr/local/jdk1.7/jre/lib/security/
/usr/lib/jvm/java-7-openjdk-*/jre/lib/security/
/usr/local/openjdk7/jre/lib/security/
- For OS X:
/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/security/

Another way to extract with abe.jar, only works with none password encrypted backups:

# dd if=nexus7.ab bs=24 skip=1 | openssl zlib -d > nexus7.tar
Get pv to get a progress bar :-) LINUX: "apt-get install pv" or CYGWIN:"apt-cyg install pv"
# dd if=nexus7.ab bs=24 skip=1 | pv | openssl zlib -d > nexus7.tar
The above pv command just provides speeds but no measure of when the task will be complete (no ETA and no PERCENTAGE PROG BAR), below method has a PROG BAR because it gets the size in bytes into "pv -s" argument
# SRC1="nexus7.ab"; dd if=${SRC1} bs=24 skip=1 | pv -s `stat --format="%s" ${SRC1}` | openssl zlib -d > nexus7.tar

Sidenote about packing the file as written in the forum:
# dd if=nexus7.ab bs=24 count=1 of=gta3.ab ; openssl zlib -in gta3.tar >> gta3.ab
* "dd if=nexus7.ab bs=24 count=1 of=gta3.ab" that portion of the command gets the 24 byte header, as its the same on all adbs (or most), then the next portion appends the openssl zlib encrpyted file
WITH PROGRESS BAR CAN GET SPEED
# dd if=nexus7.ab bs=24 count=1 of=gta3.ab ; openssl zlib -in gta3.tar | pv >> gta3.ab