[Android Q&A, Help & Troubleshooting] icehawk1:
Hello,

I am trying to reverse engineer an android app which is supposed to be an online banking app but might or might not have some malicious functionality.

I am trying to use apktool to insert a few System.out.println() and to set it debuggable. Unfortunately I get an error when I try to install the recompiled package to the emulator.

Here is what I've done so far (please note that I didn't change any files yet):

santoku@santoku-VirtualBox:~$ apktool -v decode com.starfinanz.smob.android.sfinanzstatus_2.4.1.apk appdecoded
Apr 26, 2014 1:50:04 PM brut.androlib.Androlib decodeSourcesSmali
INFO: Baksmaling...
Apr 26, 2014 1:50:09 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loading resource table...
Apr 26, 2014 1:50:10 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loaded.
Apr 26, 2014 1:50:10 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding AndroidManifest.xml with resources...
Apr 26, 2014 1:50:10 PM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: /home/santoku/apktool/framework/1.apk
Apr 26, 2014 1:50:14 PM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loaded.
Apr 26, 2014 1:50:15 PM brut.androlib.res.AndrolibResources adjust_package_manifest
INFO: Regular manifest package...
Apr 26, 2014 1:50:15 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding file-resources...
Apr 26, 2014 1:50:19 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding values */* XMLs...
Apr 26, 2014 1:50:19 PM brut.androlib.res.AndrolibResources decode
INFO: Done.
Apr 26, 2014 1:50:19 PM brut.androlib.Androlib decodeRawFiles
INFO: Copying assets and libs...
santoku@santoku-VirtualBox:~$ cd appdecoded
santoku@santoku-VirtualBox:~/appdecoded$ apktool -v build -a /usr/share/adt-bundle/sdk/build-tools/android-4.2.2/aapt
Apr 26, 2014 1:50:52 PM brut.androlib.Androlib buildSourcesSmali
INFO: Checking whether sources has changed...
Apr 26, 2014 1:50:52 PM brut.androlib.Androlib buildSourcesSmali
INFO: Smaling...
Apr 26, 2014 1:51:10 PM brut.androlib.Androlib buildResourcesFull
INFO: Checking whether resources has changed...
Apr 26, 2014 1:51:10 PM brut.androlib.Androlib buildResourcesFull
INFO: Building resources...
aapt: warning: string 'CBU' has no default translation in /home/santoku/sparkassenappdecoded2/./res; found: en tr
aapt: warning: string 'neue_vorlage' has no default translation in /home/santoku/sparkassenappdecoded2/./res; found: en tr
aapt: warning: string 'piggybank' has no default translation in /home/santoku/sparkassenappdecoded2/./res; found: en tr
Apr 26, 2014 1:51:16 PM brut.androlib.Androlib buildLib
INFO: Copying libs...
Apr 26, 2014 1:51:17 PM brut.androlib.Androlib buildApk
INFO: Building apk file...
santoku@santoku-VirtualBox:~/appdecoded$ adb -e install dist/com.starfinanz.smob.android.sfinanzstatus_2.4.1.apk
1811 KB/s (10931985 bytes in 5.892s)
pkg: /data/local/tmp/com.starfinanz.smob.android.sfinanzstatus_2.4.1.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
santoku@santoku-VirtualBox:~/appdecoded$ /usr/share/adt-bundle/sdk/build-tools/android-4.2.2/aapt v
Android Asset Packaging Tool, v0.2
santoku@santoku-VirtualBox:~/appdecoded$ uname -a
Linux santoku-VirtualBox 3.2.0-61-generic #92-Ubuntu SMP Mon Mar 31 23:47:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
santoku@santoku-VirtualBox:~/appdecoded$ apktool --version
1.5.2
santoku@santoku-VirtualBox:~/appdecoded$ emulator -version
Android emulator version 22.6.2.0 (build_id OPENMASTER-1085508)
Copyright (C) 2006-2011 The Android Open Source Project and many others.
This program is a derivative of the QEMU CPU emulator.

This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
santoku@santoku-VirtualBox:~/appdecoded$ adb -version
Android Debug Bridge version 1.0.31

Google doesn't seem to be very helpful with this error message. :(

Am I the first one?

Best Regards

icehawk1