0

Is there a way to decompile apk (Launcher2.apk from ics) and to edit it's code and compile again?

I need to replace toast message "Shortcut Installed", with code that sends custom broadcast or creates file on sd or signals it some other CATCHABLE from other app way.

I know about baksmali. With the help of it I can remove Toast message. But how I can add my own code? Jd-gui does not generates working code.

Thanks

POMATu
  • 3,422
  • 7
  • 30
  • 42
  • 3
    Unless you have a license to do so, what you are describing is a copyright violation, if you ever distribute your modified app. – CommonsWare Jun 22 '12 at 17:07
  • I thought android is an open-source project. If it's opensource project why can't I find working ics launcher sources? – POMATu Jun 22 '12 at 17:11
  • Android is an operating system. The operating system is open source. The launcher is an application that runs on an operating system. Android applications may or may not be open source. Many apps are part of the Android Open Source Project. Not all apps are. – CommonsWare Jun 22 '12 at 17:15
  • If apk will be signed by another key, but won't be changed, is it legal to distribute it preinstalled? – POMATu Jun 22 '12 at 17:20
  • 1
    Only if you have a license for it. – CommonsWare Jun 22 '12 at 17:22

2 Answers2

0

Apktool is your best bet, but you'll have to learn how to edit Smali. There is no way to decompile to raw Java, edit it as such, and recompile. Since you want to decompile Launcher2.apk you might as well just download the source, modify it, and compile it yourself. You can also catch Toast events via Accessibility assuming that you are running Android AOSP API level 15 and up.

Community
  • 1
  • 1
Tom
  • 6,947
  • 7
  • 46
  • 76
-1

For Hybrid apps we can do it by following simple steps:-

  1. rename app.apk to app.zip.
  2. extract folder.

That's it folder will have all files and resource.

BEJGAM SHIVA PRASAD
  • 2,181
  • 1
  • 18
  • 27