Commit 05cc5854 authored by Tuxicoman's avatar Tuxicoman
parents 2ebd420c 2d9cdec7
......@@ -19,6 +19,9 @@ The GUI (googleplaydownloader.py) is under AGPL licence (copyright Tuxicoman)
- python-requests (>=0.12)
- python-pyasn1 for SSL connections
- python-wxgtk (>=2.8) for the GUI
- python-protobuf (>=3.0)
- androguard
- dummydroid
- python2 (>=2.7)
You can install them through your package manager. For example on Debian :
......
......@@ -8,7 +8,11 @@ I ever wanted to get applications from the Google Play store but didn't like my
# Current version
Current version is 2.3 (25/09/2016). Check in the repository/packages for Debian .deb installers
Check in the repository/packages for Debian .deb installers
v2.4 is designed for Debian Strech (currently testing)
For older distribution (Debian 8, Ubuntu 16.04 and below), use the v2.3 which includes python-protobuf, androguard and dummydroid.
# License
The software is based on :
......@@ -25,10 +29,10 @@ The GUI (googleplaydownloader.py) is under AGPL licence (copyright Tuxicoman)
- python-requests (>=0.12)
- python-pyasn1 for SSL connections
- python-wxgtk (>=2.8) for the GUI
- python-protobuf (>=3.0)
- androguard
- dummydroid
- python2 (>=2.7)
Recommends:
- default-jre for generating Googleplay Framework Service keys
You can install them through your package manager. For example on Debian :
......
googleplaydownloader (2.4-1) unstable; urgency=low
* Debian Strech version
-- Tuxicoman <debian@jesuislibre.net> Mon, 21 Nov 2016 22:28:13 +0200
googleplaydownloader (2.3-1) unstable; urgency=low
* Bundle dummydroid (java required) to generate Google Framework service keys
......
......@@ -9,8 +9,7 @@ X-Python-Version: >= 2.7
Package: googleplaydownloader
Architecture: all
Depends: ${python:Depends}, python (>=2.7), python-wxgtk3.0|python-wxgtk2.8, python-requests (>=0.12), python-pyasn1
Recommends: default-jre
Depends: ${python:Depends}, python (>=2.7), python-wxgtk3.0|python-wxgtk2.8, python-requests (>=0.12), python-pyasn1, dummydroid, androguard, python-protobuf(>=3.0)
Description: Google Play Downloader
Download Android application APK from Google Play Store
without any personal Google account.
......
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api9 as api9
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api10 as api10
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api14 as api14
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api15 as api15
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api16 as api16
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api17 as api17
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api18 as api18
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api19 as api19
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api21 as api21
import ext_libs.androguard.core.api_specific_resources.aosp_permissions.aosp_permissions_api22 as api22
AOSP_PERMISSIONS = {
"9": {
"AOSP_PERMISSIONS": api9.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api9.AOSP_PERMISSION_GROUPS
},
"10": {
"AOSP_PERMISSIONS": api10.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api10.AOSP_PERMISSION_GROUPS
},
"14": {
"AOSP_PERMISSIONS": api14.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api14.AOSP_PERMISSION_GROUPS
},
"15": {
"AOSP_PERMISSIONS": api15.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api15.AOSP_PERMISSION_GROUPS
},
"16": {
"AOSP_PERMISSIONS": api16.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api16.AOSP_PERMISSION_GROUPS
},
"17": {
"AOSP_PERMISSIONS": api17.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api17.AOSP_PERMISSION_GROUPS
},
"18": {
"AOSP_PERMISSIONS": api18.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api18.AOSP_PERMISSION_GROUPS
},
"19": {
"AOSP_PERMISSIONS": api19.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api19.AOSP_PERMISSION_GROUPS
},
"21": {
"AOSP_PERMISSIONS": api21.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api21.AOSP_PERMISSION_GROUPS
},
"22": {
"AOSP_PERMISSIONS": api22.AOSP_PERMISSIONS,
"AOSP_PERMISSIONS_GROUPS": api22.AOSP_PERMISSION_GROUPS
},
}
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api9 as api9
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api10 as api10
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api14 as api14
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api15 as api15
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api16 as api16
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api17 as api17
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api18 as api18
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api19 as api19
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api21 as api21
import ext_libs.androguard.core.api_specific_resources.api_permission_mappings.api_permission_mappings_api22 as api22
AOSP_PERMISSIONS_MAPPINGS = {
"9": {
"AOSP_PERMISSIONS_BY_METHODS": api9.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api9.AOSP_PERMISSIONS_BY_FIELDS
},
"10": {
"AOSP_PERMISSIONS_BY_METHODS": api10.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api10.AOSP_PERMISSIONS_BY_FIELDS
},
"14": {
"AOSP_PERMISSIONS_BY_METHODS": api14.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api14.AOSP_PERMISSIONS_BY_FIELDS
},
"15": {
"AOSP_PERMISSIONS_BY_METHODS": api15.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api15.AOSP_PERMISSIONS_BY_FIELDS
},
"16": {
"AOSP_PERMISSIONS_BY_METHODS": api16.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api16.AOSP_PERMISSIONS_BY_FIELDS
},
"17": {
"AOSP_PERMISSIONS_BY_METHODS": api17.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api17.AOSP_PERMISSIONS_BY_FIELDS
},
"18": {
"AOSP_PERMISSIONS_BY_METHODS": api18.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api18.AOSP_PERMISSIONS_BY_FIELDS
},
"19": {
"AOSP_PERMISSIONS_BY_METHODS": api19.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api19.AOSP_PERMISSIONS_BY_FIELDS
},
"21": {
"AOSP_PERMISSIONS_BY_METHODS": api21.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api21.AOSP_PERMISSIONS_BY_FIELDS
},
"22": {
"AOSP_PERMISSIONS_BY_METHODS": api22.AOSP_PERMISSIONS_BY_METHODS,
"AOSP_PERMISSIONS_BY_FIELDS": api22.AOSP_PERMISSIONS_BY_FIELDS
},
}
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from elfesteem import *
from miasm.tools.pe_helper import *
from miasm.core import asmbloc
from miasm.arch import arm_arch
from miasm.core import bin_stream
from ext_libs.androguard.core import bytecode
from ext_libs.androguard.core.androconf import CONF, debug
def disasm_at_addr(in_str, ad_to_dis, symbol_pool):
kargs = {}
all_bloc = asmbloc.dis_bloc_all(arm_arch.arm_mn, in_str, ad_to_dis, set(),
symbol_pool=symbol_pool,
dontdis_retcall = False,
follow_call = False,
**kargs)
for i in all_bloc:
bytecode._PrintDefault("%s\n" % i.label)
for j in i.lines:
bytecode._PrintDefault("\t %s\n" % j)
bytecode._PrintDefault("\n")
class Function(object):
def __init__(self, cm, name, info):
self.cm = cm
self.name = name
self.info = info
def show(self):
bytecode._PrintSubBanner("Function")
bytecode._PrintDefault("name=%s addr=0x%x\n" % (self.name, self.info.value))
self.cm.disasm_at_addr( self.info.value )
class ClassManager(object):
def __init__(self, in_str, symbol_pool):
self.in_str = in_str
self.symbol_pool = symbol_pool
def disasm_at_addr(self, ad_to_dis):
disasm_at_addr( self.in_str, ad_to_dis, self.symbol_pool )
class ELF(object):
def __init__(self, buff):
self.E = elf_init.ELF( buff )
self.in_str = bin_stream.bin_stream(self.E.virt)
self.symbol_pool = None
self.functions = []
self.create_symbol_pool()
self.CM = ClassManager( self.in_str, self.symbol_pool )
self.create_functions()
def create_symbol_pool(self):
dll_dyn_funcs = get_import_address_elf(self.E)
self.symbol_pool = asmbloc.asm_symbol_pool()
for (n,f), ads in dll_dyn_funcs.items():
for ad in ads:
l = self.symbol_pool.getby_name_create("%s_%s"%(n, f))
l.offset = ad
self.symbol_pool.s_offset[l.offset] = l
def show(self):
for i in self.get_functions():
i.show()
def get_functions(self):
return self.functions
def create_functions(self):
try:
for k, v in self.E.sh.symtab.symbols.items():
if v.size != 0:
self.functions.append( Function(self.CM, k, v) )
except AttributeError:
pass
for k, v in self.E.sh.dynsym.symbols.items():
if v.size != 0:
self.functions.append( Function(self.CM, k, v) )
These files come from the Androguard project ( https://github.com/androguard/androguard)
This project is released under the Apache License, Version 2.0.
# This file is part of Androguard.
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
def read(filename, binary=True):
with open(filename, 'rb' if binary else 'r') as f:
return f.read()
This diff is collapsed.
These files come from the Dummydroid project ( https://github.com/onyxbits/dummydroid)
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.0.0'
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment