tools/apkembed.rb
# Find the activity thatapk_backdoor.rb  is opened when you click the app icon

Find the activity thatapk_backdoor.rb  is opened when you click the app icon
Find the activity thatapk_backdoor . rb is opened when you click the app icon
def findlauncheractivity(amanifest)
    package = amanifest.xpath("//manifest").first['package']
    activities = amanifest.xpath("//activity|//activity-alias")
    for activity in activities
        activityname = activity.attribute("name")
        category = activity.search('category')
        unless category
            next
        end
        for cat in category
            categoryname = cat.attribute('name')
            if (categoryname.to_s == 'android.intent.category.LAUNCHER' || categoryname.to_s == 'android.intent.action.MAIN')
                activityname = activityname.to_s
                unless activityname.start_with?(package)
                    activityname = package + activityname
                end
                return activityname
            end
        end
    end
end
def findlauncheractivity ( amanifest ) package = amanifest . xpath ( "//manifest" ) . first [ 'package' ] activities = amanifest . xpath ( "//activity|//activity-alias" ) for activity in activities activityname = activity . attribute ( "name" ) category = activity . search ( 'category' ) unless category next end for cat in category categoryname = cat . attribute ( 'name' ) if ( categoryname . to_s == 'android.intent.category.LAUNCHER' || categoryname . to_s == 'android.intent.action.MAIN' ) activityname = activityname . to_s unless activityname . start_with? ( package ) activityname = package + activityname end return activityname end end end end
Find the activity thatapk_backdoor.rb  is opened when you click the app icon
Find the activity thatapk_backdoor . rb is opened when you click the app icon
amanifest