• APK file is zip file format • We can do zip operation with APK file $ unzip [.apk] -d [output] $ unzip com.buzzvil.adhours.apk -d com.buzzvil.adhours $ ls com.buzzvil.adhours AndroidManifest.xml META-INF assets classes.dex classes2.dex res resources.arsc
• APK file is zip file format • We can do zip operation with APK file • But, Zip file created through the general method not equals APK file. $ zip -r com.buzzvil.adhours.apk com.buzzvil.adhours $ adb install com.buzzvil.adhours.apk adb: failed to install com.buzzvil.adhours.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: ... Because
• Linking Process ◦ find class or method that matches descriptor. ◦ String(descriptor) will be find by using index in dex file. • So, attackers can inject malicious code more easily ObjPtr<mirror::Class> ClassLinker::FindClass( Thread* self, const char* descriptor, Handle<mirror::ClassLoader> class_loader) { … } FindClass(thread, “java/lang/String”, loader);