• 1

    posted a message on Programming mods in Fortran
    Experimenting with mod development and due to a conversation with 500ISE, I've successfully gotten Fortran code to compile and run as a MCPE/BlockLauncher mod.

    About building toolchains with languages not shipped with stock Android NDK:
    Although this thread has Fortran in the title, these methods could theoretically be adapted to program mods in most of GCC's supported languages. This is for native BlockLauncher mods.

    Note: building toolchains isn't an exact science and many times you may run into troubles at every step. Please don't report what does and doesn't work in the process. Many of your build problems can be solved by searching the web. This guide is strictly a rough idea of building a toolchain for Android with more than just C and C++ enabled.

    Requisites:

    • A copy of Android/Google's version of GCC 4.8's source.
    • A copy of Android/Google's version of Binutils 2.24's source.
    • Recent Android NDK.
    • Recent Android SDK.
    • Native library template.
    • Some low-level understanding of programming in target language.
    • A terminal (linux/mac/unix) or terminal emulator (cygwin/mingw on windows)
    • git and gcc installed on your machine.
    • Fortran Mod source template (download:here)
    Downloading:

    Open your terminal and type/copy-paste the following commands:
     mkdir mytoolkit
    cd mytoolkit
    git clone https://android.googlesource.com/toolchain/gcc
    git clone https://android.googlesource.com/toolchain/binutils
    cd gcc/gcc-4.8
    ./contrib/download_prerequisites
    cd ../..
    mkdir binutils-build
    cd binutils-build
    ../binutils/binutils-2.24/configure --prefix=/tmp/ndk-User/build/toolchain/prefix --target=arm-linux-androideabi
    make
    make install
    cd ..
    mkdir gcc-build
    cd gcc-build
    ../gcc/gcc-4.8/configure --prefix=/tmp/ndk-User/build/toolchain/prefix --target=arm-linux-androideabi --enable-languages=c,c++,fortran --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -lstdc++ -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-initfini-array --disable-nls --prefix=/tmp/ndk-User/build/toolchain/prefix --with-sysroot=SYSROOT --with-binutils-version=2.24 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.8 --with-gdb-version=7.6 --with-python=/Users/User/mydroid/ndk/prebuilt/darwin-x86_64/bin/python-config.sh --with-gxx-include-dir=/tmp/ndk-User/build/toolchain/prefix/include/c++/4.8 --with-bugurl=http://source.android.com/source/report-bugs.html --disable-bootstrap --disable-libquadmath --enable-plugins --enable-libgomp --disable-libsanitizer --enable-gold --enable-graphite=yes --with-cloog-version=0.18.0 --with-isl-version=0.11.1 --enable-eh-frame-hdr-for-static --with-arch=armv5te --program-transform-name='s&^&arm-linux-androideabi-&' --enable-gold=default CC=gcc CXX=g++
    make
    make install



    Note: Replace SYSROOT with the the full path to your NDK and add "/platforms/android-14/arch-arm". You should've received an error while libgfortran was being built and during installation. Ignore those and continue anyways as libgfortran isn't needed a this time.

    Now you should have a toolchain located in /tmp/ndk-User/build/toolchain/prefix. Open this folder and merge it with the /toolchains/arm-linux-androideabi-4.8/prebuilt/ folder in your NDK. This should overwrite most of the GCC files in that toolchain. Now copy the following from /toolchains/arm-linux-androideabi-4.6/prebuilt/SYSTEM_OS/bin/ to /toolchains/arm-linux-androideabi-4.8/prebuilt/SYSTEM_OS/bin/
    • arm-linux-androideabi-ld
    • arm-linux-androideabi-ld.bfd
    • arm-linux-androideabi-ld.gold
    • arm-linux-androideabi-ld.mcld
    Now copy the following from linux-androideabi-4.6/prebuilt/SYSTEM_OS/arm-linux-androideabi/bin/ to /toolchains/arm-linux-androideabi-4.8/prebuilt/SYSTEM_OS/arm-linux-androideabi/bin/

    • ld
    • ld.bfd
    • ld.gold
    • ld.mcld
    Your toolchain should now be ready.
    Included with the Fortran mod source download are Fortran bindings for 500ISE's mcpelauncher functions, the Unix dynamic linker functions (dlopen, dlsym, dlclose, dlerror), and a sample mod that prints to Logcat when an arrow entity ticks (after it is fired). Build: ndk-build in the source directory then ant debug/ant debug install.

    My mods:
    Coming soon..?

    Not useful for players:
    Prebuilt Fortran mod download:here
    Fortran mod source/template download:here
    Posted in: MCPE: Mods / Tools
  • 2

    posted a message on Updater for Android PTPatches
    I havent experimented with modding in some time: Please help me test my PTPatchUpdater mod!

    Just run the JAR!

    No spoilers!

    Download:
    https://dl.dropboxusercontent.com/u/75899548/PTPatchUpdater/ptpatchupdater-gui-test.jar
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on [Android] PocketTool
    After a long wait and a small amount of tweaking, I have successfully got PocketTool to run with root permissions on a Nexus 7 with stock firmware and SuperSU. This does indeed require root and the method used to extract a backup of Minecraft PE is rather brute force after root is granted (PT usually searches for a relevant package location; this version uses hard-coded paths), so it is experimental, but may be released to the public soon.
    If you have a Nexus or Jellybean device and your device is rooted, I would greatly appreciate it if you could try this test version and inform me if it works or fails miserably. Thank you.
    https://dl.dropboxus...n_root_test.apk
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on Block of Coal
    After playing around with the Minecraft 2.0 update, I found Block of Coal in the creative inventory.

    Some notes:
    - Usable in a furnace, unknown amount of smelting uses (furnaces blow up during the 7th smelt).
    - Does not catch on fire.
    - Crafting recipe: 3x3 grid of coal or charcoal.

    Screenshots:



    Posted in: Suggestions
  • 0

    posted a message on MCPE Inventory Editor For Windows/Mac! C++! NO JAILBREAK! 0.8.0 Items!
    Very interesting.
    Do you plan to add a GUI?
    Why is there a section of your post showing Jocopa3's permission to post your editor? Are you using code written by him?


    Later, you might consider using a library to help you read in the level.dat such as https://github.com/j...tree/master/cpp so that you can modify more parts of the level.dat.

    Dat 6.283185307..NBT
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on snow's tools.
    Quote from Rbot427

    I just get permission denied

    That's strange. Which tool? Are you using a pi to download these or a desktop?
    Posted in: Minecraft: Pi Edition
  • 0

    posted a message on Minecraft Pi Edition : Java Programs
    Quote from edweed00

    Right i was looking at the python programming and then i saw that there was a java program section, i opened it up and i saw that there was java programs as well as python programs, i looked in the HOW_TO_RUN.txt on leafpad and i tried it out, i opened LXTerminal and cd mcpi/api/ja....etc and typed in the code it told me to. Could some one lease give a tutorial on how to get this working!!!

    Oh yeah thanks in advance :) :) :)

    Seems like Java isnt installed on your machine. AFAIK it isnt conventional to install Java on Pi just yet. You'll have to run the Java code from another computer with Java that is on the same local network as your Pi.
    Posted in: Minecraft: Pi Edition
  • 0

    posted a message on Advanced iOS MCPE Mods [0.9.4: Fly In Survival]
    Quote from Jocopa3

    I don't believe Android has the same hooking functions as iOS, but I could be mistaken... We also don't own Android devices, so it's not like we could test them really. 500ISE said he might be able to do it, but if he can't then it won't be ported for now.

    It's not really feasible on Android to hook functions due to almost no developers using Objective-C on Android and C++ not having some sort of built-in mechanisms (AFAIK). 500 ISE, however has found ways to edit the loaded dynamic library in-memory to overwrite instructions during runtime. It isn't very helpful as this doesnt allow vtable access. MCPELauncher is capable of a lot of new ways to mod though.

    EDIT: Also, just thought of something, MCPELauncher could theoretically load a lib with custom code into memory then inject a jump instruction into the MCPE code so that when something happens, MCPE jumps to the location of our custom code then returns back to regular execution. We'd have to destroy a few bytes of MCPE data for this to work but that could be re-implemented anyways if this does indeed work. tried with loading custom libs... failure.
    Quote from EclipseWood

    What do you mean by hooking function? I wonder how did you got MCPE to change or call external code? Do you mind telling?

    Objective-C code is very dynamic. The classes are so dynamic that a method could be added to a class at runtime, by any program, using the low-level objc library that all Objective-C code must be linked against. This allows another program to intercept or "hook" a specific function call. Hooking a function allows developers to program their own code into someone else's program without the source code.

    These mods use MobileSubstrate (basically a nifty wrapper/loader for the low-level objc library) to hook the Objective-C functions of MCPE. The mcpe code could then be changed by sifting through the in-memory binary.
    Posted in: MCPE: Mods / Tools
  • 1

    posted a message on WE WANT REAL MODS!
    Quote from Jocopa3

    Unless Apple/Android magically allow us to reverse engineer apps...

    It is not really either of their faults and neither of them are really in the way. It would be less of an issue if there was actually the technology available to "decompile" machine code. Most decompilers that exist are usually for Intel (there are some ARM decompilers, I think, somewhere), but they aren't advanced enough to get usable (I use "usable" loosely here; some decompilers will spit out garbage) C/C++ code IDA has an ARM decompiler but its not cheap. The best we could do is disassemble it. If we could cleanup the assembly dumps using some sort of tool, we might be able to re-assemble some *maybe* working code. Of course, we can't re-distribute the code as that would violate the license.
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on [WIP]TauInvEditor
    Quote from coolomancp

    It doesn't even work? (iPhone 4S iOS 6.1 Jailbroken with Evasi0n) I got the repo, got the app, but the app is white and is always wanting to update?

    These are development builds. Expect bugs, broke features, missing features, etc...
    Quote from linkisheroic

    Same, can't add the source.

    Make sure you're typing the entire URL into Cydia's sources.

    On a side note, I am working on this again. I will try to push out new builds by the end of the week (at the very least, replace the icon because plain white is awful). I am not sure why Cydia says the app is always needing an update, I will try to fix that (I probably wrote some file incorrectly).

    EDIT: Moved the repo to
    http://cydia.myrepospace.com/huelsmanj/
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on .NBT to .TXT Conversion
    Quote from zeel

    XML is really not the ideal way to go about this, too much boilerplate.

    I'd have to disagree. XML represents compound-tree structures very efficiently. Java includes many XML handling classes as well so most of the code is already there for reading/writing/modifying nodes.
    Quote from zeel

    Not to mention that the files that thing spits out are completely unformatted.

    If what you mean by "that thing," is the editor I am programming, I have recently uploaded a build that will output formatted XML.
    Posted in: Minecraft Tools
  • 0

    posted a message on Pi edition "Worlds"
    Quote from SparkzHD

    If you made a world on the PC and imported in to the Pi Edition, would the world be chopped down to the size of the Pi Edition or would it be as big as the amount of chunks you have loaded?

    Pi edition *seems* to use the same level format as Pocket edition. I believe Pocket edition maps will work just fine, but Desktop maps/level.dat's might need to be saved in MCEdit (or a similar tool) as a Pocket/Pi edition map, if possible. You would be left with a chopped down map, I assume.
    Posted in: Minecraft: Pi Edition
  • 0

    posted a message on TauEditor - A general purpose NBT tool
    Quote from MegaSniperB

    I like this a lot because you can export and import it! I would suggest that you would make the xml be formatted with line breaks so its not just one big string and i would also say add an option you replace all with advance search functions and regex. (of course after you have add the option for editing tag :P ) never the less I like the way this is going and i wish it the best of luck!

    EDIT: also you should allow it you modify other types of nbt such as the . schematic file type.

    Thank you for the suggestions! I will add these to the TODO list.
    Posted in: Minecraft Tools
  • 0

    posted a message on .NBT to .TXT Conversion
    Quote from joppiesaus

    agree!

    Quote from MegaSniperB

    Any news on the progress???

    If either of you are still interested, you can write/edit an NBT tree using XML. I have recently written XML import/export code for the NBT editor I am working on. You can load an NBT file, then Export it to XML, make your changes, import the XML, and Save as an NBT file.
    Posted in: Minecraft Tools
  • 3

    posted a message on TauEditor - A general purpose NBT tool
    Hello,

    Some recent projects of mine prompted me to start building an NBT editor. Some of the current editors are: old, are not cross-platform, do not support 19133, are not simple enough, or only support one version of Minecraft. I began writing TauEditor as a general purpose NBT editor. It supports not only Minecraft NBT files, but also Minecraft Pocket Edition and Minecraft Pi edition NBT files.

    Right now, it is only useful for viewing the structure of NBT trees as the editing code is not implemented yet.

    Features:
    0.0.1a:
    - On Mac systems, it uses the top Menu/Navigation bar rather than an in-window menu bar.
    - Can read Desktop, Pocket, or Pi edition NBT files, even if they're GZipped.
    0.0.2a:
    - Export NBT tree to XML file
    - Save an NBT tree as Desktop or Pocket/Pi edition file.
    0.0.3a:
    - Import XML file into NBT tree.
    0.0.4a:
    - Formats XML export with new lines and indentations (currently set to 2 spaces).
    0.0.4b:
    - Recognizes .schematic as an NBT file.

    TODO:
    - Saving code (mostly implemented)
    - Creating new NBT files
    - Custom Node/Leaf icons for each NBT tag
    - Editing a Tag
    - Adding Tags
    - Duplicate a NBT tree or node
    - Cut, Copy, and Paste (?)
    - Search, regex
    - Other NBT file types/extensions
    - Preferences

    Screenshots:




    Download Version 0.0.4b:
    http://adf.ly/JF7m9
    Posted in: Minecraft Tools
  • To post a comment, please or register a new account.