| Is selling your privacy for a cheaper phone really a good idea? Posted: 17 May 2020 11:31 AM PDT |
| [Discussion] Do you think the Pixel 4a can save Google’s smartphone business? Posted: 17 May 2020 08:14 AM PDT |
| Exclusive: India watchdog reviewing antitrust allegations against Facebook's WhatsApp - sources Posted: 17 May 2020 10:24 PM PDT |
| Hosting a Minecraft Server on Android 2.0 Posted: 17 May 2020 05:40 PM PDT Made a post a while ago about how to host a Minecraft server on an Android device. Here are some updates with clearer steps and steps for loading in your own worlds and mods! Some basics: - No root required
- Time required: about half an hour actively working, about an hour max downloading files
- Result: works great on my OnePlus 6T (8GB RAM), no lag at all playing with friends with Forge
- Tip: If you don't want to read, scroll down to the bottom for a 30-step process to set up a vanilla Minecraft server
Requirements: - Android phone that can run Termux and have at least 2-4GB of RAM
- For the initial testing, I used an OnePlus 6T with 8 GB of RAM (which ran very well). System RAM usage varied between 5.5GB and 6GB but the default is around 4GB so it wasn't that surprising.
- I also tested using a Moto E2 while writing this guide to test out the installation of the Forge server. It was barely functioning with Forge and was barely playable since it only had 1GB memory.
- If your phone is decent, it should be able to run a vanilla server with no problem but YMMV.
- Reliable internet connection
- Downloading a lot of stuff (at least 500MB)
- Minecraft account
- Not strictly necessary just for starting a server, but if you want to test it out you should have one ready.
Overall steps: - Get Termux to run a mini Ubuntu on your Android device
- Use SSH to connect Termux to a Windows computer for easier copy+paste commands
- Install OpenJDK 8 (Java)
- Run Minecraft Server (or Forge)
- Install ngrok
- Connect local Minecraft server to ngrok servers
- Copying over your worlds/mods
- Common questions
Step 1 - Download Termux and AnLinux on your Android from Google Play Store
- Select Ubuntu on AnLinux and copy the code
- Run the command on Termux
- To start the server, we would have to run
./start-ubuntu.sh - I personally renamed it to
s by running this command mv start-ubuntu.sh s - This allows me to get into Ubuntu by running just
./s - run
./s to start the ubuntu machine - VERY IMPORTANT: Drag down on your notification bar, there should be an option to "Acquire Wakelock" for Termux. This allows it to not be killed by the system and continue running in the background.
Step 2 (Optional SSH) - NOTE: Skip if you do not have a computer or if you are fine with typing in really long URLs
- Alternative: send yourself commands as messages on some messaging app and copying those commands to be run on Termux
- (on Termux) installing ssh server
pkg install openssh and pkg install nmap - (on Termux) Some things that we will use later:
- Run
whoami to see our username (mine was u0_a121) - Run
ifconfig wlan0 to see your ip address (something starting with 192.168, remember to copy the first one, not the second one which isn't your ip address) - Run
passwd to set a new password for your system (set it to something very easy to remember 12345678) - Things to jot down: username, ip address, new password
- download PuTTY (if you're on Windows, skip if macOS) https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Connect as follows (on computer)
- Windows PuTTY: hostname is your IP address, port is 8022, connection type is SSH, click Open at the bottom without changing anything else
- Mac terminal:
ssh USERNAME@IPADDRESS -p 8022 - For example, mine was
ssh u0\_a121@192.168.1.xxx \-p 8022 - (on computer) When prompted for username (on Windows), type your username from step 2.1
- Enter in your password from before as well
- (on computer, you're free from typing on phone now!) run
./s to get into your file system Step 3 add-apt-repository ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jre - Test by running
java -version - Make sure that it verifies that Java is installed (1.8)
Step 4 (vanilla) - Make sure you're at the home directory. Type
cd \~ to make sure. - Make a new folder for your minecraft directory
mkdir mc, cd mc to go into the directory - Go to https://www.minecraft.net/en-us/download/server/
- Right-click on the minecraft_server link and copy link
wget -O minecraft\_server.jar https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar - replace the https link with your own link if the version isn't 1.15.2
- run
chmod +x minecraft\_server.jar - run
java -Xmx1024M -Xms1024M -jar minecraft\_server.jar nogui to start the server - (Give more RAM if you have more; I set mine to 3 Gigabytes
-Xmx3G) Step 4 (Forge) - Make sure you're at the home directory after starting ubuntu. If not, type
cd \~ mkdir forge to start a new directory, cd forge to go in - download forge server
wget https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.15.1-30.0.51/forge-1.15.1-30.0.51-installer.jar - Rename it to make it easier
mv forge* forge.jar - install server (it takes a while depending on your phone/wifi speed, took about half an hour on my Moto E2 and 8mbps wifi)
java -jar forge.jar --installServer - run server, it will give you an error telling you to agree to eula.txt
java -Xms512M -Xmx1024M -jar forge-1.15.1-30.0.51.jar - Open eula.txt by
nano eula.txt, arrow down to the last line, delete false, replace with true - Ctrl-x to exit, Y to save.
- Rerun the previous command one eula.txt has been changed, it will take a while to generate a world
- Rename the forge so it's easier to start later
mv forge-1.15.1-30.0.51.jar startForge.jar java -Xms1024M -Xmx3096M -jar startForge.jar - (Note: adjust memory as needed, don't give it 3G if your phone is a potato)
Step 5 - Go to ngrok.com/download
- Right-click and copy link for Linux (ARM64)
wget -O ngrok.zip https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip - replace the https link with your own link
apt-get install zip unzip unzip ngrok.zip Step 6 - Make an account at ngrok on their website
- copy the auth token line given to you and run it
- should look something like this
./ngrok authtoken awefioauw4u0239840293j023jf0j23f23kj ./ngrok tcp 25565 - if a screen shows up with "Session Status online" in green, copy the address in forwarding after the tcp part
- "Forwarding tcp://0.tcp.ngrok.io:12345"
- copy the
0.tcp.ngrok.io:12345 section Step 7 - Login to Minecraft, make sure the version is the latest version
- Multiplayer, then direct connect and paste in the ngrok link from the end of Step 6
- Connect!
Use your own Worlds - Copy your worlds folder over from somewhere else into your phone
- When connecting over usb, copy it over to your Download folder
- back to termux
- if you are in ubuntu (started ubuntu) already, type exit to get out into the default termux layer
- Go to your Download folder cd /storage/emulated/0/Download
- Copying world folder to Termux
- forge:
cp -r yourWorldFolderName /data/data/com.termux/files/home/ubuntu-fs/root/forge - vanilla:
cp -r yourWorldFolderName /data/data/com.termux/files/home/ubuntu-fs/root/mc cd /data/data/com.termux/files/home/ubuntu-fs/root/forge nano server.properties - find the line "level-name=world"
- change "world" into whatever your folder name is called
- Ctrl-x to exit, Y to save
- Start server and ngrok
Common questions - How do you start both the server AND ngrok? Don't I have to stop one to start the other?
- On your Android, drag from the left side of your screen while you're in termux. There should be a button for starting a new session. Once you're in there, you can go into the ubuntu system first by
./s, then start ngrok/server. To go back to the other session, drag on the left again and tap on the other session to start server/ngrok. - Can my phone run it?
- If it has at least 4GB of RAM and your WiFi is decent: Definitely
- If it has at least 2GB of RAM and your WiFi is decent: Maybe, maybe not
- If it has less than 2GB of RAM or your WiFi is very questionable: sorry : (
- Do I really have to run the commands for ngrok and Minecraft server every time I want to play?
- Personally, I put the ngrok command in a file (named n) and the Minecraft command in another file (named m). After opening two sessions on Termux, I run ./n on one and ./m on the other. Here is the content of each file (I am running Forge so go back through the steps to see what your commands should be):
- File named "m" (no extension or anything):
cd forge java -Xms1G -Xmx3G -jar startForge.jar nogui - File named "n" (also no extension):
cd ngrok ./ngrok tcp 25565 - So now whenever I want to play Minecraft, I follow these steps:
- Open Termux
./s to get into Ubuntu ./m to start Minecraft server - Swipe on left, open another session
./n to start ngrok server - Open Minecraft on my computer, copy over the link from ngrok, wait for the server to start, connect!
- Why does this work?
- Termux allows your phone to have a mini-Linux machine. Linux machines can run Minecraft servers. Ngrok allows you to port-forward your local server port (25565) onto a public port where everyone can join (so please enable your whitelist so people don't come in and destroy your worlds).
- How do I use mods?
- Same procedure as copying over worlds. Except instead of copying it over as a world folder
forge/yourWorldName, you copy it into the mods folder forge/mods. Make sure you have the same mods on your computer and it should be good to go. - Ngrok is telling me to update, will it break my server if I updated?
- I would recommend updating ngrok if it prompts you to. You just have to type
ctrl-u and wait about a minute then restart ngrok. It won't break anything as it's just broadcasting your port. - My server is not working and it's not because of bad WiFi or bad phone specs, what can I do?
- If none of the tips above helped and nobody in the comments had the same problem, you can send me a message but make sure to include a screenshot (if applicable) and a description of your issue.
Overview of Commands: If you don't understand anything, try following the steps below to set up a vanilla 1.15.2 Minecraft server. An important thing to note is that some of these might take quite a long time. I would suggest keeping the screen on and the phone plugged in and waiting for the prompt to pop up before running the next command. For quality-of-life improvements and mods, read Step 4 and Common Questions. - Download Termux and AnLinux on your Android from Google Play Store
- Select Ubuntu on AnLinux and copy the code
- Run the command in Termux
./start-ubuntu.sh - Drag down on notifications, click "Acquire Wakelock" under Termux
add-apt-repository ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jre nano mkdir mc cd mc wget -O minecraft\_server.jar https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar java -Xms1024M -Xmx2048M -jar minecraft\_server.jar nogui nano eula.txt - change
false to true ctrl-x to exit, y to save java -Xms1024M -Xmx2048M -jar minecraft\_server.jar nogui - Swipe from the left of Termux to the right, tap new session button on the bottom
./start-ubuntu.sh wget -O ngrok.zip https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip apt-get install zip unzip unzip ngrok.zip ./ngrok tcp 25565 - copy the ngrok url (something like
0.tcp.ngrok.io:69420), paste into minecraft client - Enjoy!
References: Forge on Linux: https://www.linuxnorth.org/minecraft/modded_linux.html Please let me know if you have any questions and I will be happy to answer and update this post if needed! submitted by /u/endmymisouri [link] [comments] |
| MediaTek unveils the Dimensity 820, a 5G SoC for upper mid-range smartphones Posted: 18 May 2020 12:07 AM PDT |
| Wavelet is an Android app that can make your headphones sound much better with automatic EQ Posted: 17 May 2020 09:15 AM PDT |
| Spotify Stations works outside the US if you sideload the APK Posted: 17 May 2020 04:32 AM PDT |
| [Discussion][Exploit] The MyJio app from the playstore can display fullscreen ads over other apps with no permissions Posted: 17 May 2020 09:21 AM PDT |
| Samsung is killing off its XR apps Posted: 18 May 2020 01:15 AM PDT |
| [idea/discussion] Ultimate Single Camera for a Midrange phone. Posted: 17 May 2020 09:11 AM PDT Midrange phones come with fairly large sensors for their main camera (Realme 5 pro for example) but other lenses barely exceed the image quality of a 2011 midrange. And ever since iPhone SE was rumored to have a single camera, I've been thinking what the Android equivalent would be. A 1/2" 20 MP sensor with 1.24um pixels and a focal length of 22.5mm with OIS is what I came up with. Sensor is the same size as the 48mp ones but matches (or exceeds) SE's pixel pitch. At 22.5mm it's pretty wide (matching widely accepted focal length of the human eyes). Yes it won't be as wide as a 16mm but at 20mp and 1/2" it'll have greater quality. Also will have the af capability. For 26mm shots it'll still use a large 1/2.3" area and will have around 16mp. For 45mm (2x from the widest setting) it'll use 5Mp 1/4" area as many midrangers already use. But it'll have ois and in darker environments all phones switch to main sensor anyway. Not sure about the f number but I think 1.8 would be fine. Now I know "triple camera" is better for marketing and this probably never happen but what are your thoughts? Would you rather have a single cam like this on a cheaper phone or the range they offer now is good enough? submitted by /u/LuciusLeila [link] [comments] |
No comments:
Post a Comment