Skip to main content

android 下修改 hosts文件 及 out of memory的解...

  android 下修改 hosts文件 及 out of memory的解决 

需要使用 android模拟器访问某个网站,其实是指向开发机器上的,这时需要修改 andorid上的 hosts文件,

下面这个网站介绍了方法

http://www.hiapk.com/bbs/thread-63992-1-1.html

具体步骤如下

1、获得root权限:adb root

2、设置/system为可读写:adb remount

3、将hosts文件复制到PC:adb pull /system/etc/hosts <PC机上文件名>

4、修改PC机上文件

5、将PC机上文件复制到手机:adb push <PC机上文件名> /system/etc/hosts

但在第五步时,有的人会报  out of memory的错误

这是因为直接用命令行启动,而没加一个参数造成的,所以用下面这个命令来启动就行了

$emulator –avd youravdname –partition-size 128

来源于(可能被墙了)

http://www.cuteandroid.com/tips-for-android-developer-failed-to-copy-file-to-system


Comments

Popular posts from this blog

12 best hand creams

Hands are as exposed as our faces and yet we hardly put any thought into skincare or protection for them. Until, that is, winter hits and they start chapping. Modern hand creams don't just boost moisture levels, they're now anti-agers too and can reduce the appearance of age spots and fine lines, and help combat eczema. From sink-side pump dispensers to balms, creams and crème-gloves, we've rounded up the best hand nourishers in the business.  1.  Clarins Hand and Nail Treatment Cream:  £21 for 100ml, Clarins Launched in 1979, this has been a best-selling product for more than 30 years and a tube is sold every 30 seconds worldwide. Put to the test, it delivered above and beyond our expectations. Not only one of the richest and most nourishing creams we tried, but it absorbs almost instantly and leaves no greasy residue. There are very few creams that can deliver on nourishment and absorption so effectively – this one can even keep mild eczema at bay. The moi...

THE BEST HAND CREAMS FOR DRY AND CRACKED HANDS

Written By Sophie Hines | 12 January 2017 Can't find a hand cream that tackles your dry hands? We've rounded up the best... Cold weather can leave our hands cracked, dry and desperate for moisture. That's why we've rounded up the best, most nourishing hand creams in the UK, so you can get your skin back to its soft, smooth best. 1. Neutrogena Norwegian Formula Concentrated Hand Cream  This fuss-free hand cream is all about efficiency, rather than pretty smells or packaging. The glycerin-rich formula is one of the best for tackling seriously dry hands. £2.98 for 50ml,  Boots.com MORE:  THE BEST FOUNDATION FOR DRY SKIN 2. Burt's Bees Shea Butter Hand Repair Cream If you prefer to stick to natural ingredients, this hand cream is ideal, containing no sulphates, phthalates, petrochemicals or parabens. Shea butter, cocoa butter and sesame oil provide a real moisturising kick for the hands. £13 for 90g,  Marks & Spence...

How to Erase Dark Under-Eye Circles (with Something in Your Fridge)

You go to bed at a reasonable time. You use an embarrassingly expensive amount of fancy creams. You feel fine. So why the eff do you still have dark circles under your eyes? We’re here to help. You can either cover them up with red lipstick or you can fix them for good with this game-changing remedy. What you need: A handful of parsley, a small mixing bowl, a wooden spoon, a tablespoon of hot water (or yogurt) and two cotton makeup pads What you do: Chop the parsley, place in the bowl and then grind the leaves with the spoon to release its juices. Next, pour the hot water over the parsley as you stir the mixture together (you can sub in yogurt for the water if you want a thicker mask). Let the mixture cool, and then dip the makeup pads into the juice. Place them beneath each eye, lie back and let them sit for ten minutes. How often you do it: Twice a week is usually the ticket. (It’s, like, $2 a bunch.) Or whenever you have a superfluous amount of the garnish leftover from meatball...