Project: apk2 - Android Software/Hacking General [Developers Only]

hi folks!
i'm not a developer but sometimes i do some scripting.Now i'm working on a project that called "APK2",and i think that could be useful!
Some months ago, I thought "why don't create a package manager and a package system to install real linux packages, and not just apps? I may want to install some command-line tools to run with terminal emulator" then I wrote this script, named apk2.sh, that installs some particular packages (I wrote another script to easily create this type of packages): he simply does the apt-like un-tar in /, but it installs a config directory too, to remove the installed packages.
It supports the preinst, postinst, prerm, postrm scripts too.
Tell me if it could be interesting, and I'll put it here.
If so, I need testers
If not, simply tell me, and I give up.

so could you be able to run like air crack through debian with this or?

olvap377 said:
so could you be able to run like air crack through debian with this or?
Click to expand...
Click to collapse
I could be able to run it on Android if someone can port all the libs to armv5e
I know, you have to do the porting in order to run it, but for example if there is the package for debian armv5 I think it should work if you take all the deps from the repo (may need some repacking, just to remove the CONTROL folder, and maybe to add the file needed to uninstall and various preinst, postinst etc. ).
And you don't need to run a debian or an ubuntu on Android, that's not really fast.
What do you think?

i think that this sounds really good and if it worked fully it would be a major addition to android development im hoping youll continue with this

olvap377 said:
i think that this sounds really good and if it worked fully it would be a major addition to android development im hoping youll continue with this
Click to expand...
Click to collapse
Thank you!
Any tester? I attach the scripts to now how apk2 works, just run it without any parameter, and it will show you
The other script it's simple to use, you just have to run it once to create in your home the basilar directory tree, you have to complete it and put the files in it, then you just have to put your preinst-postinst-prerm-postrm scripts in the ~/yourpackage/system/etc/apk2 directory, if you have some.
Then run the script again, insert the same package name, and here we are! The package is build! It's in the packagename directory in your home, in .apk2 and in .tar.gz, if you have to edit something do it on the tar.gz, and then change the extension in .apk2
PS: rename the files *.sh.txt into *.sh, because this forum doesn't allow .sh attachments...

xela92 said:
Thank you!
Any tester? I attach the scripts to now how apk2 works, just run it without any parameter, and it will show you
The other script it's simple to use, you just have to run it once to create in your home the basilar directory tree, you have to complete it and put the files in it, then you just have to put your preinst-postinst-prerm-postrm scripts in the ~/yourpackage/system/etc/apk2 directory, if you have some.
Then run the script again, insert the same package name, and here we are! The package is build! It's in the packagename directory in your home, in .apk2 and in .tar.gz, if you have to edit something do it on the tar.gz, and then change the extension in .apk2
PS: rename the files *.sh.txt into *.sh, because this forum doesn't allow .sh attachments...
Click to expand...
Click to collapse
in non-linux speak (layman's terms), what could i do with this...my interest is peaked
what are some "real linux packages" that one might want

tnpapadakos said:
in non-linux speak (layman's terms), what could i do with this...my interest is peaked
what are some "real linux packages" that one might want
Click to expand...
Click to collapse
i.e., the one olvap377 mentioned: air crack (I think it's possible).
or, we can run every app that does not need X server.
I created some demo packages (containing 2 scripts), one is SwapTools, and lets you enable/disable swap with 2 simple cmds (swap-enable and swap-disable); at the first run it collects some info, like the swappiness and the swap partition, then it saves the conf in a file (using swap-disable with --remove-conf will remove the conf file).
Another one I created is remount: you can remount your /system partition rw or ro just by typing on a terminal emulator
Code:
remount rw
or
Code:
remount ro
But you can try to use other appz compiled for armv5 processors, like all the debian apps, except for the one with GUI (we run on framebuffer, no X server :/ )
PS: I attach the pkgs, I added the .zip extension, just rename it in pkgname.apk2

Honest question: Why reinvent the wheel? Other embedded Linux projects have used ipkg to good effect, or its close relative opkg (refs from same link) which is used by Openmoko. A port of this to Android systems which have uClibc should be nearly trivial.

xela92 said:
i.e., the one olvap377 mentioned: air crack (I think it's possible).
or, we can run every app that does not need X server.
I created some demo packages (containing 2 scripts), one is SwapTools, and lets you enable/disable swap with 2 simple cmds (swap-enable and swap-disable); at the first run it collects some info, like the swappiness and the swap partition, then it saves the conf in a file (using swap-disable with --remove-conf will remove the conf file).
Another one I created is remount: you can remount your /system partition rw or ro just by typing on a terminal emulator
Code:
remount rw
or
Code:
remount ro
But you can try to use other appz compiled for armv5 processors, like all the debian apps, except for the one with GUI (we run on framebuffer, no X server :/ )
PS: I attach the pkgs, I added the .zip extension, just rename it in pkgname.apk2
Click to expand...
Click to collapse
thanks dude

olearyp said:
Honest question: Why reinvent the wheel? Other embedded Linux projects have used ipkg to good effect, or its close relative opkg (refs from same link) which is used by Openmoko. A port of this to Android systems which have uClibc should be nearly trivial.
Click to expand...
Click to collapse
I have also an Openmoko phone
I know very well ipkg/opkg, it could be interesting a porting, but I thought it was better to create a little lighter script to do it, because 1. a script that uses sh is usable in every system, you can either to install armv5e pkgs, or any armv* pkg, you have just to change some little things; 2. I don't know how to port, and I'm not able to do programming.
If you are interested and know how to do a porting, it could be very useful, because opkg has really lots of functions...
I just did what I could

xela92 said:
I have also an Openmoko phone
I know very well ipkg/opkg, it could be interesting a porting, but I thought it was better to create a little lighter script to do it, because 1. a script that uses sh is usable in every system, you can either to install armv5e pkgs, or any armv* pkg, you have just to change some little things; 2. I don't know how to port, and I'm not able to do programming.
If you are interested and know how to do a porting, it could be very useful, because opkg has really lots of functions...
I just did what I could
Click to expand...
Click to collapse
Ahh, okay, I see what you mean. Fair enough; I haven't seen your work so far, I was just concerned you were doing unneeded work. 'Course sometimes it's good to do that for the learning experience.
I don't have a full build setup for Android, so I can't recompile (I do have a full build setup for building Optware packages, but that's not quite the same), but I believe most custom ROMs ship uClibc. I'm not familiar enough with uClibc to know if you need to build against an exact version, though you could copy opkg from your Openmoko phone for the heck of it and see if it runs

olearyp said:
Ahh, okay, I see what you mean. Fair enough; I haven't seen your work so far, I was just concerned you were doing unneeded work. 'Course sometimes it's good to do that for the learning experience.
I don't have a full build setup for Android, so I can't recompile (I do have a full build setup for building Optware packages, but that's not quite the same), but I believe most custom ROMs ship uClibc. I'm not familiar enough with uClibc to know if you need to build against an exact version, though you could copy opkg from your Openmoko phone for the heck of it and see if it runs
Click to expand...
Click to collapse
Ya mean, copy the binary??? If so, it won't work of course, because the architecture of the openmoko processor is armv4t, it wouldn't see my binary
Nethertheless, if someone is interested
PS: please, could someone test my scripts? Thank you dudes

xela92 said:
Ya mean, copy the binary??? If so, it won't work of course, because the architecture of the openmoko processor is armv4t, it wouldn't see my binary
Nethertheless, if someone is interested
PS: please, could someone test my scripts? Thank you dudes
Click to expand...
Click to collapse
Heh, oh, older ARM core. Not paying attention. I will now stop hijacking your thread

olearyp said:
Heh, oh, older ARM core. Not paying attention. I will now stop hijacking your thread
Click to expand...
Click to collapse
No problem, man

No testers?

Please give me a feedback. If u want, I can make some apk2 by debs for armv5... Then I accept hints like "howto manage dependencies", 'cause I've no ideas...

"Tester"
xela92 said:
Please give me a feedback. If u want, I can make some apk2 by debs for armv5... Then I accept hints like "howto manage dependencies", 'cause I've no ideas...
Click to expand...
Click to collapse
Hi I have and HTC Hero from Sprint, I'm not a linux power user but I spent lots of time in my computer running Ubuntu just for 2 big reasons 1 freeware and 2 it has the best an simplest packet manager... I love deb files that installs like any .exe win programs I love that! I'm son not a coder and have little to no skills under Linux shell I use my sudo nautilus commands and so because I need it but I hate to untar or tar gz crap... for me that it old and useless some linux power user may get offended by that comment but hi times changes we love GUI... if you manage to post prints screens or a word open office or PDF documentation dummy proof I'm very up to be a Happy tester... the other thing I'm a Digital Graphic Designer if you need some design for a GUI and can try to help you in making and eye candy app...
Here it the way I will love to see grow this project... finding a way to installed it as an apk file like others in the android market so users can install the app easy then...in top of that a simple GUI to browse to the SD card in order to get the apk2 file... you where talking about not being able to run programs that has GUI that it is sad but still interesting but a lot of work to do without a good community because that means that all GUI may need to be re-design to the different resolution on the phones and be touch friendly...
I'm not sure if I'm helping at all but I love the big picture behind your project...

I'm porting opkg on Android, but i'm can't tell that's a trivial task )))
i also wrote simple howto "building and porting linux apps for android from scratch", but on russian. If needed i can do some translating and put here too.
Also may be we can open project for buildroot-like framework for android and opkg's repository. In my how-to i'm use crosstool-ng + gcc + uClibc.

XVilka said:
I'm porting opkg on Android, but i'm can't tell that's a trivial task )))
i also wrote simple howto "building and porting linux apps for android from scratch", but on russian. If needed i can do some translating and put here too.
Also may be we can open project for buildroot-like framework for android and opkg's repository. In my how-to i'm use crosstool-ng + gcc + uClibc.
Click to expand...
Click to collapse
Wow! Please do some translating!
But, when you finish the porting, how will you manage to port the packages?
Will you use the debian pkgs changing the extension? Would it work?
Thanks a lot!

No, we want to create only android repository of packages, based on opkg (ipkg)
for arm, mips and others platfofms.

Related

[Android] Make bootpackage for booting Android directly

Hi guys,
some of you have asked whether there is an Android ROM yet, but there isn't, so we have to make with workarounds. One very practical one would be to install a clean WM6 ROM, and boot straight into Android.
Now before, we used haret.exe, and we still will. HaRET has a great functionality with it that allows you to make one big .EXE file containing the zImage, initrd and script. Now with the script - this is actually a problem, because
we may want to play with the boot params
we need to put our apn/internet credentials in
So it would be best to have the big .EXE and the script. This is what I've done.
To do it (works under Linux only!):
Download or copy the initrd.gz and zImage you want to use into a directory. Open a command line, switch to that directory. Type:
Code:
wget http://handhelds.org/cgi-bin/cvsweb.cgi/~checkout~/haret/tools/make-bootbundle.py
wget http://gigatron.de/.android/haret-scriptboot.exe
touch empty
python make-bootbundle.py -o boot_android.exe haret-scriptboot.exe zImage initrd.gz empty
(You may need to change the filenames of zImage and/or initrd.gz accordingly.)
Out comes boot_android.exe file. You can now
put it onto your SD card, and create a link to it in \Windows\StartUp
copy it directly into \Windows\StartUp
and in the same directory where you put boot_android.exe, put your default.txt.
Voilà, your phone will boot up Android automatically.
I advise you to put it on the SD card, because then you can take it out during startup if you do not want to start Android automatically.
Hope you enjoy it.
Stefan
P.S.:For starters, I have put together a version with the latest initrd.gz and zImage, at the usual place http://gigatron.de/.android (boot_android_09-03-18.exe)
P.P.S: Here's the diff for the patched haret-scriptboot.exe:
Code:
Index: src/wince/haret.cpp
===================================================================
RCS file: /cvs/haret/src/wince/haret.cpp,v
retrieving revision 1.24
diff -r1.24 haret.cpp
197,198c197,201
< // Run linked in script.
< runMemScript(script_data);
---
> if (len > 1)
> // Run linked in script.
> runMemScript(script_data);
> else
> scrExecute("default.txt");
Hope we can move everyone here.. seidler
Downloading exe file now to try out.. seems like a good compromise for the time being.
Keep up the good work!
Edit: this ignores the startup.txt file and uses the default.txt only?
bally3 said:
Hope we can move everyone here.. seidler
Downloading exe file now to try out.. seems like a good compromise for the time being.
Keep up the good work!
Edit: this ignores the startup.txt file and uses the default.txt only?
Click to expand...
Click to collapse
Well, didn't mean to move everyone here, it's just that I'm starting different threads for different topics now. (Kinda like a subforum, which we don't have.)
I didn't know about startup.txt, but it is right, it only reads default.txt. I'm actually thinking about adding an inclusion mechanism to the HaRET script language, so we can set the common parameters (MTYPe etc.) all internally in the big .EXE and still allow to set the user-specific details in the (external) default.txt
Stefan
this is SO GREAT!
would it be possible to include such an exe file in all bundles on androidonhtc ?
wow, amazing, thanks!
kubia said:
this is SO GREAT!
would it be possible to include such an exe file in all bundles on androidonhtc ?
wow, amazing, thanks!
Click to expand...
Click to collapse
I don't know about all the previous packages, but I think for all future ones this should definitely be the case.
Stefan
yes, of course, that's what i meant
Helloseidler2547,
I downloaded the sources on http://android.git.kernel.org/repo , as it's written on androidonhtc.com.
In the lastet system.img we can't specify another language than english, but when i look at sources, i can see in many apps sources plenty of languages resources files.
is it the same version used by DZO and you for the packages ?
seidler2547 said:
I didn't know about startup.txt, but it is right, it only reads default.txt. I'm actually thinking about adding an inclusion mechanism to the HaRET script language, so we can set the common parameters (MTYPe etc.) all internally in the big .EXE and still allow to set the user-specific details in the (external) default.txt
Click to expand...
Click to collapse
Hmm, sometimes I'm quite blind. HaRET already has a RUNSCRIPT command, which will allow us to do all that we need. Oh well - silly me.
Stefan
thanks seidler, look like a good start... how are use using haret exactly? are there parameters or mouse actions ect?
I'm not sure if I understand your question correctly, but
- developers are using haret for all kinds of stuff, finding out how winmo does stuff and then porting it into the linux kernel
- users use haret just for booting Android (linux) and setting some kernel parameters in default.txt
HTH,
Stefan
seidler2547 said:
I'm not sure if I understand your question correctly, but
- developers are using haret for all kinds of stuff, finding out how winmo does stuff and then porting it into the linux kernel
- users use haret just for booting Android (linux) and setting some kernel parameters in default.txt
HTH,
Stefan
Click to expand...
Click to collapse
I was refering to how you were directly using it to boot, but it sounds to me like you are using the source code to recompile for you needs?
I'm farmiliar with what haret is used for, i was wondering how you got haret to directly boot linux instead of bringing up the window where you can change the default.txt location or listen for a network connection before clicking run.
joel2009 said:
I'm farmiliar with what haret is used for, i was wondering how you got haret to directly boot linux instead of bringing up the window where you can change the default.txt location or listen for a network connection before clicking run.
Click to expand...
Click to collapse
Just rename your default.txt to startup.txt
don't be too lazy to search
Yes, but with the script make-bootbundle.py, we can make one big .exe for users, containing zImage, initrd and default.txt, which can still read an additional external .txt file (using RUNSCRIPT) -> I think for the whole package this is more convenient for users. Also because the average user doesn't need to change a lot of variables (internet works without kernel parameters, at least for GSM, keyboard settings for at&t tilt could maybe be automated, and userspace access is possible too).
Stefan
Is it possible to install new apps on the latest version ? I have the version from 01-03-2009 and when i try to download an app, it tells me "download failed - not enough space" or something.
You are asking in the wrong thread. Try http://forum.xda-developers.com/showthread.php?t=396782&goto=newpost
Stefan
Oh sorry
Thanks
excogitation said:
Just rename your default.txt to startup.txt
don't be too lazy to search
Click to expand...
Click to collapse
Before trying to insult someone by forwarding them to google, try not to be to be too lazy to read the question. I was asking about stefans bundle. Not what is haret and how to use it.
Thanks,
Joel

Building and deploying from cupcake source code to my device - using Mac

Hi all,
I am trying to setup my Mac OSX (Mac Mini) to build and deploy the Cupcake source code and deploy the built images on my ADP1 device.
I must admit - I am no Linux guy, so a bit slow on understanding the various instructions.
My problem - I was somehow able to get the sources down to my Mac, and even run a successful MAKE.
But - got stuck there (could not figure out how to run the built images on the emulator).
So I decided to be brave and compile & install on my ADP1 device.
This is where I am stuck:
In the explanation at the Google site, they claim there should be a ".Repo" directory holding a file called "manifest.xml" in it, and that I should download and add to that directory a file called "local_manifest.xml".
I can not find such a ".Repo" directory, and hence - dont know where to put that file.
Any help would be highly appreciated !
Shimon Shnitzer
TAKEphONE said:
Hi all,
I am trying to setup my Mac OSX (Mac Mini) to build and deploy the Cupcake source code and deploy the built images on my ADP1 device.
I must admit - I am no Linux guy, so a bit slow on understanding the various instructions.
My problem - I was somehow able to get the sources down to my Mac, and even run a successful MAKE.
But - got stuck there (could not figure out how to run the built images on the emulator).
So I decided to be brave and compile & install on my ADP1 device.
This is where I am stuck:
In the explanation at the Google site, they claim there should be a ".Repo" directory holding a file called "manifest.xml" in it, and that I should download and add to that directory a file called "local_manifest.xml".
I can not find such a ".Repo" directory, and hence - dont know where to put that file.
Any help would be highly appreciated !
Shimon Shnitzer
Click to expand...
Click to collapse
".Repo" is a hidden folder any folder with a "." in front of it will be hidden, enable the viewing of hidden folders and you'll find it.
Thanks !
I knew I was probably missing something simple...

Developer Analysis of Unrevoked Root Method

WARNING: Not responsible for any damage caused by experimenting with the information in this thread
I didn't see this information previously posted anywhere on here. Hope I don't get flamed!
Thanks to ZanzDroid!
My goal is to publish as much information as we're able to discover about the Unrevoked Root Apk which only contains one button and explains very very little while quite a bit happens behind the scene.
The Unrevoked creators, claim they don't want to explain how everything works because people will abuse the root exploit method they found.
I'd rather trust the EVO community to be open but responsible.
I've only figured out a few things and hope this thread will get the ball rolling. I'm hoping with some of the great developers here we can find out more!
Had some free time tonight.
Brief Technical ANALYSIS:
Stock EVO with the OTA update for .6 software and .05 radio
Installed the apk thru the browser, http://www.unrevoked.com/m.
After installing the app and clicking the Start button, 5-6 seconds later it reports, Rooted!
It appears the payload is dumped to /data/DxDrm .
Inside this directory there are three files
ls -l /data/DxDrm
-rwxrwxrwx app_84 app_84 439428 2010-06-09 18:37 unrevoked
-rwxrwxrwx app_84 app_84 177 2010-06-09 18:38 unrevoked.log
drwxr-xr-x root root 1980-01-08 23:35 fuse
unrevoked - looks like the actual rooting application (payload) compiled into a binary so its not text readable. there is where the secret magic happens. name is an active link to the actual binary the .apk installs. it would great if somebody could decompile this or reverse engineer it.
unrevoked.log - shows a brief log of the application running and reporting root status
fuse - is an empty directory, comes stock on the phone.
Since /system is still locked due to NAND protection, unrevoked creates a new directory inside of /data/local called bin-shadow.
This is basically a shadow of /system/bin plus a few extras unrevoked installs - busybox 1.15.2, su and flash_image binaries.
Any file placed into /data/local/bin-shadow appears to be in /system/bin .
A quick run of the mount command shows this as:
/dev/block/mtdblock6 /system/bin yaffs2 rw 0 0
please post any other TECHNICAL details you discover!
unrevoked.apk - application apk file
unrevoked - binary installed by .apk
i wondered where that shadow-bin folder came from and what it was. thanks for tracking that down!
Can you post/send over the unrevoked binary? (from /data/DxDRM not the apk, thx!)
f00kie said:
Can you post/send over the unrevoked binary? (from /data/DxDRM not the apk, thx!)
Click to expand...
Click to collapse
http://www.sdx-downloads.com/evo/uroot/unrevoked
that is the binary, updated the main post with it.
it would be great if this could be reverse engineered or decompile ...
joeykrim said:
http://www.sdx-downloads.com/evo/uroot/unrevoked
that is the binary, updated the main post with it.
it would be great if this could be reverse engineered or decompile ...
Click to expand...
Click to collapse
my atari won't run them but baksmali on a current machine is the tool . http://jf.andblogs.net/2010/04/03/yabbfr/ Anddroid architecture is symbolic, you get to see names, not registers.
willy900wonka said:
my atari won't run them but baksmali on a current machine is the tool . http://jf.andblogs.net/2010/04/03/yabbfr/ Anddroid architecture is symbolic, you get to see names, not registers.
Click to expand...
Click to collapse
Wont help much. The binary in the apk/res folder does the work.
Never used baksmali.. is this what you wanted?
npace said:
Wont help much. The binary in the apk/res folder does the work.
Click to expand...
Click to collapse
if that binary is the same as /data/DxDrm/unrevoked, then i agree, otherwise im hesitant to agree because before the .apk was released, they originally released a single binary which roots the phone.
a rough test i have off the top of my head would be something to the effect of ... i think the unrevoked binary from /data/DxDrm can be copied to the /sdcard, remove the .apk, copy the binary back to /data and run it. it should root the phone w/o the .apk being installed.
The baksmali I posted was from apk, the batch file I found to do it just pulled the information from the apk.
Has anyone done a quick binary compare on the two unrevoked.bin to see if they are the same? (I'm at work otherwise I'd do it)
Vinny75 said:
The baksmali I posted was from apk, the batch file I found to do it just pulled the information from the apk.
Has anyone done a quick binary compare on the two unrevoked.bin to see if they are the same? (I'm at work otherwise I'd do it)
Click to expand...
Click to collapse
just grabbed the unrevoked.bin from your unrevoked.apk and the unrevoked binary from /data/DxDrm i uploaded last night.
md5sums don't match. they might have modified the binary slightly to work inside the .apk or baksmali might have modified things.
unrevoked 27e3c38141ac479344a24006cc88c2b3
unrevoked.bin 47e7d517b972b1703c4a4dc630a4fc62
any idea, although not as technical would be to load both onto the phone and try running them from the command line and see if they give different output ?
now that we have two versions of the binary, it would be nice to find out what it does! decompiling / reverse engineering is not my specialty but hopefully somebody can provide some more insight?
If someone have the rom cooking environment and all installed, they could compile strace which would really help.
Another possibility is to install debian just like we did on the G1 when it first came out.
I tried that last night but I just need the ext2.ko module (again, a rom developer could provide that). It has to be compile for the specific kernel version, otherwise it wont work.
I dont have much time unfortunately
npace said:
If someone have the rom cooking environment and all installed, they could compile strace which would really help.
Another possibility is to install debian just like we did on the G1 when it first came out.
I tried that last night but I just need the ext2.ko module (again, a rom developer could provide that). It has to be compile for the specific kernel version, otherwise it wont work.
I dont have much time unfortunately
Click to expand...
Click to collapse
strace is included in busybox, right?
i have toast's supersonic kernel loaded and compiled, i could try and compile ext2.ko as a module (module compiling was after my main kernel day)? im not understanding how debian and ext2.ko further our efforts?
joeykrim said:
strace is included in busybox, right?
i have toast's supersonic kernel loaded and compiled, i could try and compile ext2.ko as a module (module compiling was after my main kernel day)? im not understanding how debian and ext2.ko further our efforts?
Click to expand...
Click to collapse
strace is not included in busybox. Or at least not in my busybox. If it were there, I would not have gone the debian route.
I just wanted to see if I can quickly run debian and do "apt-get install strace" then strace ./unrevoked.bin instead of having to cross-compile it for arm-eabi.
npace said:
strace is not included in busybox. Or at least not in my busybox. If it were there, I would not have gone the debian route.
I just wanted to see if I can quickly run debian and do "apt-get install strace" then strace ./unrevoked.bin instead of having to cross-compile it for arm-eabi.
Click to expand...
Click to collapse
i have the cross compile toolchain already setup for arm, but might not be the perfect processor match for the EVO. i dont have busybox source files with me, but let me grab them and see if i can compile it with strace ...
will post back with an update in a little bit! hope this works!
edit: strace is not part of busybox. NEXT! i'll see if i can grab the strace source and cross compile for the arm ... cross compiling was throwing errors which seemed like they might take a while to compile . NEXT!
grabbed the debian arm package - http://ftp.us.debian.org/debian/pool/main/s/strace/strace_4.5.14-2_arm.deb .
used a simple script to extract the .tgz from the .deb package
echo "#/bin/sh" > extract.sh
echo "ar p $1 data.tar.gz > `basename $1 .deb`.tgz" >> extract.sh
sh extract.sh strace_4.5.14-2_arm.deb
tar -zxvf strace_4.5.14-2_arm.tgz
the strace arm binary is put into usr/bin/strace and i've uploaded it here:
http://www.sdx-downloads.com/evo/tools/strace-arm.zip
hopefully this helps! let me know if this works or doesnt work and i'll go back to the drawing board on strace!
Used this method for my hero. Today I used it today to root 2 EVO's and I have to say this was an excellent root. I guess knowing the source would be great however I was burned last round of the hero updates when I lost root. You know someone from HTC was browsing these forums in order to figure out how to patch the exploits the devs had found. I just hope this exploit stays available for Froyo.
joeykrim said:
i have the cross compile toolchain already setup for arm, but might not be the perfect processor match for the EVO. i dont have busybox source files with me, but let me grab them and see if i can compile it with strace ...
will post back with an update in a little bit! hope this works!
edit: strace is not part of busybox. NEXT! i'll see if i can grab the strace source and cross compile for the arm ... cross compiling was throwing errors which seemed like they might take a while to compile . NEXT!
grabbed the debian arm package - http://ftp.us.debian.org/debian/pool/main/s/strace/strace_4.5.14-2_arm.deb .
used a simple script to extract the .tgz from the .deb package
echo "#/bin/sh" > extract.sh
echo "ar p $1 data.tar.gz > `basename $1 .deb`.tgz" >> extract.sh
sh extract.sh strace_4.5.14-2_arm.deb
tar -zxvf strace_4.5.14-2_arm.tgz
the strace arm binary is put into usr/bin/strace and i've uploaded it here:
http://www.sdx-downloads.com/joeykrim/evo/tools/strace-arm.zip
hopefully this helps! let me know if this works or doesnt work and i'll go back to the drawing board on strace!
Click to expand...
Click to collapse
I'm getting a 404 so I did the same:
I had forgotten about the debian-arm packages.
I used alien -t to convert it to tgz and upped it here:
http://bottomquark.org/android/strace
It doesnt run though and I think it's not the proper architecture
strace: 1: Syntax error: word unexpected (expecting ")")
npace said:
I'm getting a 404 so I did the same:
I had forgotten about the debian-arm packages.
I used alien -t to convert it to tgz and upped it here:
http://bottomquark.org/android/strace
It doesnt run though and I think it's not the proper architecture
strace: 1: Syntax error: word unexpected (expecting ")")
Click to expand...
Click to collapse
my mistake, link was wrong, fixed it.
ah another dead end...in the process earlier i got busybox to cross compile, but it has a nice make xconfig, dont think strace does...
ill try and devote some more time to getting the cross compiling setup and a working strace unless somebody else posts a working strace arm binary?
joeykrim said:
my mistake, link was wrong, fixed it.
ah another dead end...in the process earlier i got busybox to cross compile, but it has a nice make xconfig, dont think strace does...
ill try and devote some more time to getting the cross compiling setup and a working strace unless somebody else posts a working strace arm binary?
Click to expand...
Click to collapse
I'll go back to the debian route when I get a chance. It helps to have that running.
BTW, thanks a lot for all your work -- I have similar questions about everything you are currently pursuing!
npace said:
I'll go back to the debian route when I get a chance. It helps to have that running.
BTW, thanks a lot for all your work -- I have similar questions about everything you are currently pursuing!
Click to expand...
Click to collapse
good news, strace is part of the PC36IMG.zip. seems the userdebug version has quite a few developer tools in system/xbin. i've set them chmod 755 and setup root access on my ROM which is simple and clean.
if you dont want to load my ROM, you can setup the environment manually from recovery mode on a stock PC36IMG.zip, just chmod 4755 xbin/su and chmod 755 the xbin directory or just the strace binary.
hopefully this helps?

[Q] Rar on android.

Hi:
I've recently started to develop my own comic reader. The problem I've come up with is cbr files, which are esentially rar files. Now I know there are comic readers out there (all of them, I think) that support cbr files. So there is a way of doing this, I just can't find how.
In the rarlabs official page (search google rar addons and it's the first page) there are several options. I would like to know if I download the commandline arm unrar how I could install it on Android (I have a motorola Xoom, it would be for Honeycomb), assuming that is correct.
If this is not an option is there a command line unrar application that I could call from my own? and How would the code be (to call an external application, that is)?
If the above is not possible, what is the way to get to unrar something in android?
The only real option I've seen would be to use junrar (hosted on github)
But it seems complicated and I'm not sure it works very well as I've seen a lot of conflicting reports.
Thanks for any help!
Try http://www.all-freeware.com/results/rar/for/android to unpack rar on Android.
Success,
Senax
Hi:
I'm not exactly sure what you wanted me to try. There is nothing in that page that would allow me to uncompress a rar file on android. Only a bunch of unrar utitilities and some android things but they are not related, that is, there is nothing that says unrar that also works on android.
thanks anyway.
Unrar
great app available here: androidzoom (dot) com/android_applications/tools/unrar_dhpu.html
Cheers,
Romuloxiii
Hi:
It's seems that I didn't make myself clear.
I want to develop an android application that needs to unrar files. Is there a way to call the unrar application from my own code?
If so, can you tell me how?
Otherwise, I appreciate the effort, but I can't use that.
Thank you very much!
You can bring the unrar binary along in the /asset of your app,
on first launch copy it to your apps /file directory, chmod +x it, and use exec("sh") to unrar the files from shell.
oh, I see. I think I get the the idea but I don't understand all the instructions.
What did you mean by importing thebinary on my asset?
If I do the step above why do I need to copy the binary on first launch?
Don't I need root privileges too chmod it? And how do I do it from my source code?
And finally where can I find the command line use of the application? Or is it the same as the Linux version?
I know there are a lot of questions, but please keep in mind that I'm very new at doing this.
Thanks for all the help!
You need to put it as asset to bring it along.
You need to copy it because asset files are not directly accessable.
You don't need root to chmod the file in your own directory.
You do it by using a shell from your code i.e. Process.exec("sh")
And finally you want to program the app not me,
so don't be lazy and invest some time.
Google google google google...
If there are still questions left after that, you may ask again .
Ok, I'll try it and get back to you!
Thanks!
Sorry for my lazyness, but I've been Googling for a good half hour without finding a simple 'unrar' binary executable compiled to run from terminal on rooted ARMx32 device. I don't want bloated GUI APK's or libraries for development implementation, but just the plain command line interface executable. Anyone, please? It's a pity they haven't baked it into Busybox as an applet, IMO.

Need help modifying an APK

Hello! Sorry if this is the wrong place to post this I just registered to the forum!
To keep it short I am a frequent player of the game 'Idle Heroes' and I got the idea to take the APK, modify it (for private use of course) and give me resources in the game so I can try out different heroes etc etc.
So I read up on the APKtool and all that but I am having some trouble, I can't find the framework I need.. I am just getting errors when trying to decompile and I can't find any framwork in my phone or online to download..
Any help is appreciated! Thanks!
If it's any help I have a Galaxy S9 (not rooted)
For apk tool you need to write it in the following format in command prompt... (assuming you are using apk tool 2.2.4)
Java –jar apktool_2.2.4.jar d C:\<path to apk file>
But this would give you stuff like the android manifest. If you want the raw source code itself, you would need to use something such as dex2jar. Format is below.
d2j-dex2jar.bat C:\<path to apk file>
mohhaxs said:
For apk tool you need to write it in the following format in command prompt... (assuming you are using apk tool 2.2.4)
Java –jar apktool_2.2.4.jar d C:\<path to apk file>
But this would give you stuff like the android manifest. If you want the raw source code itself, you would need to use something such as dex2jar. Format is below.
d2j-dex2jar.bat C:\<path to apk file>
Click to expand...
Click to collapse
Thanks for your reply! Unfortunately I'm still struggling.. As you said it's the source code I am after. If you haven't played the game I'll try to explain what I am after.
Every day you get daily missions you can do, I'd like to simply change the rewards from let's say 1 summoning scroll to 1000 so that each day I can get 1000 scrolls, and I also want to change the other rewards to give me a couple of thousand gems instead of the 20 I get each day, that will give me enough to get the heroes I am after!
Would you care to help me a little more specifically on how to achieve this? Right now I have put the .apk in "C:\android\apktool" along with the apktool itself (apktool.jar).
But I don't have a .bat file, what kind of .bat file do I want to create? Also I don't have any other folders or such. And yes I have the newest version of Apktool!
No matter what I write in CMD it gives me an error, I don't have any framework files etc and I don't know where to get them.. I did also use the code you gave me (java -jar etc etc) but it also gave me errors .. If you'd like me to try something else and/or post the errors here I'd gladly do so!
Sorry for being such a noob but I have never done anything like this before, I recently started learning C++ but it's mainly simple games (for PC) in UE4 and stuff like that, but nothing for mobile.
Thanks a lot for your time!

Categories

Resources