Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I suppose you eventually found how to solve the problem. Still, I will give a possible answer for those who seek around, struggling with the same problem we had once.</p> <p>Since android devices are emulated and not simulated (as opposed to iOS devices), they indeed have their own kernels, configuration files... and their own <code>/system/etc/hosts</code>. But you can actually use adb with Titanium. You just need to be careful. Since Titanium use a custom-generated virtual device, based on tiapp.xml, you will have to run your application at least once before the virtual device shows up in the device list.</p> <p>If you have more than on virtual device you first need to get the name of the device generated by Titanium (typically emulator-XXXX).</p> <pre><code>adb devices </code></pre> <p>Then you can mount it and use adb push and pull commands to get the <code>/system/etc/hosts</code> out of the emulator's system, edit it and push it back. <code>-s emulator-XXXX</code> specifies on which device these commands are meant to be executed. If there is only one device, you can skip this option. See <a href="http://developer.android.com/guide/developing/tools/adb.html">adb doc</a> for more informations.</p> <pre><code>adb -s emulator-XXXX remount adb -s emulator-XXXX pull /system/etc/hosts /whatever/directory/ </code></pre> <p>You can now edit <code>/whatever/directory/hosts</code> with you favorite editor and add the necessary host. If you need to access the localhost interface of your development machine, <code>10.0.2.2</code> is a link to the computer's loopback interface. Simply add <code>10.0.2.2 myapp.localhost</code> to the host and push it back to the virtual device.</p> <pre><code>adb -s emulator-XXXX push /whatever/directory/hosts /system/etc/hosts </code></pre> <p>Relaunch the simulator with Titanium and it should do the trick!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload