Skip to content

Bring cSploit code up to date (Android Pie/AS 3.3 current) + AndroidX + other fixes #968

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 8 commits into from
Aug 26, 2018

Conversation

fat-tire
Copy link
Contributor

Just brought the build up to date and tested on an older Android 6.01 device, which seems to still work. That's not to say there aren't going to be problems-- but my cursory tests didn't find them. Was able to do a portscan and MITM of a test rasppi on the local network, and that's about all I tested. Themes and stuff still works on the device I tested, and the appcompat/androidx support should be more complete.

This should hopefully fix the #941 permissions issue as well, though someone else will have to confirm this on newer Android.

If no one has any complaints, I'll probably just accept this commit in a few days or so into the develop branch.. If you do have complaints, please submit a proposed solution if possible.

Cheers!

This was referenced Aug 19, 2018
@fat-tire
Copy link
Contributor Author

(@xaitax heads up if you can do a test build it would be appreciated.)

@xaitax
Copy link
Member

xaitax commented Aug 21, 2018

No problem. Once you commit it will be automatically built.

@kimocoder
Copy link

@fat-tire It's just sad this project isn't active.. cause it's a hell of an app (or was).
will do some test builds to check the latest, as the officials aren't updated since 10 june of 2016

@fat-tire
Copy link
Contributor Author

@kimocoder Cool If you build it without issue and it looks like it works I'll accept the changes to the devel branch and I guess the nightly builds will include it... Thx.

@xaitax
Copy link
Member

xaitax commented Aug 21, 2018

I will build it once it's committed for everyone to test. ;)

@kimocoder
Copy link

I'm getting a multidex error. Attached image to inspect
error

@fat-tire
Copy link
Contributor Author

Q: Are you using AS 3.3 latest alpha/canary + latest gradle test?

@kimocoder
Copy link

Yes. AS 3.3 Canary 6

@fat-tire
Copy link
Contributor Author

fat-tire commented Aug 21, 2018

Hmm.... From this it appears a solution may be to add to build.gradle:

  implementation 'com.android.support:multidex:1.0.1'

Strangely I don't need it. But tell me if it fixes anything and if so I'll add it.

Update: Actually the issue is with the AndroidX version not being available rather than the old multidex.... Is it possible you haven't updated your library support in Android Studio to the latest?

@kimocoder
Copy link

kimocoder commented Aug 22, 2018

I'm running on a clean AS 3.3 Canary 6. Do I need any packages installed? If yes, well.. which to be specific?
Everything in my clean setup is updated..

@fat-tire
Copy link
Contributor Author

I've just updated this to include multidex. You should use the latest canary 7 I think. In the SDK Manager, you want to have the latest build tools and libraries and stuff up to date

Can you try building this latest version and let me know if it builds for you?

@kimocoder
Copy link

It gets further, but gives me this error..
error

@fat-tire
Copy link
Contributor Author

Hmm it shouldn't be using v4.app.anything now that it's using jetpack, which replaced the support library stuff. Can you try clearing the app's cache (it's in one of the menus) and the build files and restarting AS completely, and if that doesn't work take a look at this as something there may help? it's strange because using AS canary, I don't have this (or the other multidex issue)...

@kimocoder
Copy link

I got the solution.. added this and now it compiles the APK
img_20180824_191614

Switched from Windows to Linux AS also gave me less troubles.
There are still some compile warnings that needs to be fixed though

@fat-tire
Copy link
Contributor Author

As a (simpler) alternative solution, what happens if you remove mavencentral() completely in all four places, ie:

diff --git a/build.gradle b/build.gradle
index d736044f..e0c93946 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,7 +3,6 @@ buildscript {
     repositories {
         google()
         jcenter()
-        mavenCentral()
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:3.3.0-alpha07'
@@ -14,6 +13,5 @@ allprojects {
     repositories {
         google()
         jcenter()
-        mavenCentral()
     }
 }
diff --git a/cSploit/build.gradle b/cSploit/build.gradle
index 0a566821..141692c7 100644
--- a/cSploit/build.gradle
+++ b/cSploit/build.gradle
@@ -2,7 +2,6 @@ buildscript {
     repositories {
         google()
         jcenter()
-        mavenCentral()
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:3.3.0-alpha07'
@@ -13,7 +12,6 @@ allprojects {
     repositories {
         google()
         jcenter()
-        mavenCentral()
     }
 }
 apply plugin:  'com.android.application'

When I try it it builds fine. If you can report it works, I'll push it and then merge to develop branch. Be sure to clear the project/cache. Thanks.

@kimocoder
Copy link

kimocoder commented Aug 25, 2018

Then I'll get back to the error
"Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy"

Syncing fine, but building APK fails

screenshot from 2018-08-25 12-51-58

And remember.. I run a clean Android Studio - Canary 7 with all build-tools and SDK updated.

@fat-tire
Copy link
Contributor Author

That's so strange. So the solution for you is to add that maven url line? Putting that back lets it build?

@kimocoder
Copy link

Wow.. really don't know whats happening over here. Tried to replay the build from yesterday, which was successfull.. but noe I only get the above issue with the exact same maven url lines I used yesterday. Better you do this without me, it may be my low experience on AS that's causing the troubles, but this is a bit weird anyways

@fat-tire
Copy link
Contributor Author

Alrighty, thanks @kimocoder for giving it a shot-- as it's been a few days and it #worksforme I'll commit to develop and we can fix any issues if they arise. Heads up to @xaitax that this does need the latest build environment...

@fat-tire fat-tire merged commit 54069c7 into cSploit:develop Aug 26, 2018
@xaitax
Copy link
Member

xaitax commented Aug 26, 2018

Can't build unfortunately. Downloaded a fresh SDK and installed:

root@rootbitch:/opt/android-sdk-linux/tools/bin# ./sdkmanager --list
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;28.0.2 | 28.0.2 | Android SDK Build-Tools 28.0.2 | build-tools/28.0.2/
extras;google;google_play_services | 49 | Google Play services | extras/google/google_play_services/
extras;google;m2repository | 58 | Google Repository | extras/google/m2repository/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 28.0.0 | Android SDK Platform-Tools | platform-tools/
platforms;android-28 | 6 | Android SDK Platform 28 | platforms/android-28/
tools | 26.1.1 | Android SDK Tools 26.1.1 | tools/

Anything missing?

@xaitax
Copy link
Member

xaitax commented Aug 26, 2018

./gradlew assembleRelease

Task :cSploit:transformClassesWithMultidexlistForRelease FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':cSploit:transformClassesWithMultidexlistForRelease'.
    com.android.build.api.transform.TransformException: Error while generating the main dex list.

@fat-tire
Copy link
Contributor Author

It's kind of hard to tell from that list as it's missing C/Rs but here is my installed list... .

When I do ./gradlew assembleRelease it builds for a while and ends with

BUILD SUCCESSFUL in 57s...

Can you build a debug build? Also, could you paste the build log somewhere? You have updated the SDK?

@xaitax
Copy link
Member

xaitax commented Aug 26, 2018

You have basically everything installed, huh? ;)

I posted the assembleDebug Log here: https://paste2.org/GKdMVCVw

SDK is latest from today - got a fresh one and then installed the above shown packages. In the meantime I will go through your list and see what might make sense to install as well.

@kimocoder
Copy link

From my point of view, there is something with the "support library" that's off

@fat-tire
Copy link
Contributor Author

Hmm. A few observations:

  • javax.tools.ToolProvider isn't found, which msgpack needs. Should be in java as far back as 1.6 tho. You are building with Java 1.8 yes?

  • "com.android.internal.util.Predicate" not found. I see this was deprecated in api 26... should use java.util.function.Predicate in instead.

The support library is completely switched from the old style to the androidx jetpack stuff. Dunno if anything special needs to be downloaded to support that.

Per this, can you try with --stacktrace to get more detail? The only errors I see are some translated strings that don't appear in the default string xml.

@fat-tire
Copy link
Contributor Author

(also-- yeah i pretty much include everything. Or rather, over time they've all eventually been installed...)

@xaitax
Copy link
Member

xaitax commented Aug 27, 2018

Yeah, building it with JDK 1.8.

Output with stacktrace here:
https://paste2.org/8FFnyAcD

@fat-tire
Copy link
Contributor Author

Do you guys have the following in gradle.properties?

android.enableJetifier=true
android.useAndroidX=true`

If not please add these two lines to gradle.properties in the root directory of the source code (ie, android/) and give it a try...

Thx!

@kimocoder
Copy link

kimocoder commented Aug 27, 2018

There is lots of information of the build issue around the Google, just don't have time to look into it for a week or so..
material-components/material-components-android#110

@fat-tire
Copy link
Contributor Author

Yeah I think adding those lines to gradle.properties will fix this. @xaitax can you confirm?

@xaitax
Copy link
Member

xaitax commented Aug 28, 2018

It built. Can you try the nightly please?
There were also some issues with the latest NDK from where I will commit the changes to Application.mk / Android.mk if it works.

Also please not only run it but also test if some of the tools still work. Do not have a rooted phone here.

@kimocoder
Copy link

I got the Nexus 6P and I may confirm there are several issue.. May disclose them after work this evening

@fat-tire
Copy link
Contributor Author

Awesome @xaitax! @kimocoder please do post any issues you find. I am probably going to update the gradle dist (4.10 is out now) as well as add those two lines to gradle.properties in the next day or so... though feel free to do so if I don't get to it soon.

@fat-tire
Copy link
Contributor Author

Done! #969

@kimocoder
Copy link

kimocoder commented Aug 28, 2018

@fat-tire there is an issue running this.. at startup, this happens before force closing

Android v7.1.1
Device: Nexus 6P (angler)

screenshot_20180828-214128

@kimocoder
Copy link

Nevermind, got it working by using the nightly build instead

@fat-tire
Copy link
Contributor Author

Awesome. @xaitax if you have issues let me know otherwise we should be up-to-date now as far as the app itself goes. (libraries & dled bits not quite.. @tux-mind would need to update that stuff)

@pahapoika
Copy link
Member

Nice to see @fat-tire keeping us alive :D
I honestly have no idea whats the progress with the cSploit 2.0, but it seems like tux-mind is still extremely busy.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants