Advertisement
freighter

7-Eleven 1.8.0 APK modifications

Aug 12th, 2019
4,767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.64 KB | None | 0 0
  1. Required files:
  2. jadx -> https://github.com/skylot/jadx/releases
  3. APK Easy Tool to easily decompile/recompile the APK -> https://forum.xda-developers.com/android/software-hacking/tool-apk-easy-tool-v1-02-windows-gui-t3333960
  4. 7 Eleven Fuel App APK ripped off your phone or download from here -> https://www.apkmonk.com/app/au.com.fuel7eleven/
  5. A Google Maps API key -> https://developers.google.com/maps/documentation/android-sdk/signup
  6.  
  7. I'll be explaining how to remove the mock location check and allow root access for version 1.8.0 in this little guide.
  8.  
  9. Step 1 - Decompile the APK with APK Easy Tool, then drag and drop the APK you ripped or downloaded into jadx so it opens it up, and let it index the app.
  10.  
  11. ___Allowing "foreign" APKs to be installed__
  12.  
  13. Step 2 - Inside of jadx search for the string "getPackageManager". Scroll down until you see the nodes starting with "au.com.seveneleven". You will see a line that says "String installerPackageName = getPackageManager().getInstallerPackageName(getPackageName());". Double click on that and it will lead you a function (Z) in the file called au.com.seveneleven.ui.activities.MainActivity which is where it is causing the program to quit when it is started or resumed.
  14. What is happening in this function is that an array is created with 2 entries. One for "com.google.android.feedback" which was what old Android phones called the Google Play Store and the new name of the store which is "com.android.vending". The function then searches if the our app was installed via either of those 2 packages. Since it wasn't, we need to skip this check.
  15. What we need to do is open the file smali/au/com/seveneleven/ui/activities/MainActivity.smali in your editor and search for "onResume()", it should lead you to around line 3132. Scroll down 5 lines and you should find a line which says "invoke-virtual {p0}, Lau/com/seveneleven/ui/activities/MainActivity;->z()Z". Simply delete this line and the app will now open up.
  16.  
  17.  
  18. __ Removing the root check __
  19.  
  20. Step 3 - Removing the root check is as simple as allowing your APK to be installed. Search for the term "su" with quotes, (su is short for superuser) and double click on the result that says "boolean a = bVar.a("su");".
  21.  
  22. Step 4 - There are 2 methods to "defeating" this check, the first one is to simply return-void and the second is to remove the call to the function.
  23.  
  24. Step 4.1 - Open the file "au/com/seveneleven/ra/E.smali in your editor and look for the words ".locals 9". Create a new line after this saying "return-void" and save the file, then close it. Your done! How fast was that?
  25.  
  26. Step 4.2 - In jadx Right click on the E in "public class E {" and click on "Find Usage". Double click on the MainActivity result that hasn't got the word "import" in it. You'll land right in the call we need to delete. So open MainActivity.smali in your editor, and search for "onStop". This time we will search for "onStop" because it is at the end of the function we want to be in, it'll simply save us having to scroll to the end. Now scroll up a little bit and you'll see the line "invoke-static {v0, v1}, Lau/com/seveneleven/ra/E;->a(Lau/com/seveneleven/ha/E;Ljava/util/concurrent/Callable;)V". You'll notice as above the /au/com/seveneleven/ra/E is the file where we just edited so it would return-void. So delete this line and root check is bypassed.
  27.  
  28. __ Remove mock location check __
  29. Step 5 - To remove the mock location check you can search for the string "mock_location_error". There are 2 options, we will select the 2nd one which should be in a file called something like "au\com\seveneleven\ja.1\q.smali". Again we will land in the middle of a function, all we want to do is delete the whole mock location check. So to do that, open the file in your editor, search for "z()" - it should be around line 1009. Now, from there we will delete all of the code from line 1068 which says "invoke-virtual {p0}, Landroid/support/v4/app/l;->getActivity()Landroid/support/v4/app/o;" until :cond_3 on line 1130. So now your code should read as follows:
  30.  
  31. :cond_2
  32. invoke-direct {p0}, Lau/com/seveneleven/ja/q;->B()V
  33.  
  34. Thats it! You've removed a mock location check.Step 8 - Recompile your app again, transfer it to your phone and look at the results! Congratulations, you've successfully modified your 7 Eleven app! What next? Now you can just download the APK off the comments section because it looks like too much work to do it all manually ;o). But thanks for reading if you got this far anyway!
  35.  
  36. Step 6 - ???
  37.  
  38. Step 7 - Profit
  39.  
  40. ----------------
  41.  
  42. My apologies that this isn't as detailed as previous editions. You'll also need to edit the res/values/strings.xml file so that the mapsAPIKey value is what you're API key is.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement