401 points · by petodo · 3y ago · 88 comments
Java Decompilation:
Method 1: Dare + JD Decompiler +Cavaj (or) DJ Decompiler
Method 2: dex2jar + JD Decompiler + Cavaj (or) DJ Decompiler
Method 3 : AndroChef Java Decompiler
Accessing Apk Resource Files:
Apk Tool.
Selecting Decompilation of System Files:
Smali, Backsmali
Later a tool called Procyon replaced many of the aforementioned tools.
P.S. Not including links for any of those tools as apart from being obviously outdated, Many of those tools started flagging for malware in later days; Perhaps they're just false positive considering their feature set but I don't want to risk it.
In case anyone wants to use Play store apps with push notifications(GCM) on LineageOS, I highly recommend MicroG+F-droid bundled version[1].
If not for privacy, De-googling results in excellent power backup.
Note that scripts like this are extremely useful, but in the long term they're cobbling together a lot of tools and will become brittle or difficult to use across versions. I suggest that even if it works for you today, understanding exactly what's happening under the hood will help if the tool becomes unsupported long-term.
[1] https://github.com/skylot/jadx
[2] https://github.com/mmastrac/longshot
[3] https://grack.com/blog/2022/12/02/hacking-bluetooth-to-brew-...
Simple things like, what SDKs does this thing use (adware), what external APIs does it call (trackers), what interfaces does it use (mic, gps, etc), what data does it hoover up (contacts, sms messages, etc), what parties does it send them to, how much effort do the authors go to obfuscate or hide what they are doing (packers, code obfuscators), does it use a static encryption key or derive one from predictable components, does it have hidden features from triggers and arguments - are all achievable for someone with a bit of interest and an afternoon. The more niche the app, the less sophisticated the protections on it, I find.
Java decompilers aren't intended to produce valid code that you can compile back. Sometimes they do, but it's more of a coincidence.
By the way. Another underrated reverse engineering tool is xposed framework. It was never intended to be one, but the ability to inject arbitrary code into any app and install hooks without having to modify the apk is a godsend.
I was also trying to use it to see how an app sends images to an NFC e-ink pricetag, but that looks rather more tricky at the moment.
Basically it's _the_ reverse engineering toolkit for security researchers. Has excellent support across Android, iOS, macOS, Windows, etc.
Going further, the API likely uses some secret key for encryption/decryption and you could hook that value out of the app as well.
No need to recompile the app after making changes to smali (decompiled but modifiable language).
As you can just modify the js script and get the modified behavior.
(A good time to remind tech people: 98% of users are not our user persona)
then I started working full-time and had way less free time and realized 99% of the time I now use my phone to read news sites and take quick photos, and then switched to iPhone...
Was Android (even stock) insufficient for reading news sites and quick photos? Or is iOS much better for you at those tasks? If that's all you need, then I would consider both Android or iOS sufficient, but I don't quite get why you'd give up so many options and capabilities to switch, unless iOS is much better at reading news and taking photos.
Maybe an analogy to help with my question. If all I need to do is unscrew Phillips number 2 screws and the occasional flathead, and I already had a great power drill with a bunch of bits in the kit (and had mastered it), why then buy a different power drill that that takes a proprietary bit and can only do Phillips and flathead? At some point I might have a need to do torx or hex or square, etc. Wouldn't you be better off having the capability should you need it? Why is it better to not have the capability?
Edit: I'll add a bit here - I didn't realize just how much maintenance and fixing I was doing on android, because I was so used to it. I would frequently have to fix some issue and I didn't think twice because it was something I either did often, or I just wasn't in a rush and I went into "fix broken tech" auto pilot mode. But I started to realize how often I was doing it and how it wasn't really normal to have to do that, because I would just zone out and focus on fixing the issue at hand.
Some arguments were: Android's capabilities became less over time. I had cool apps until 4.4 Kitkat which automated toggling on/off WLAN/GPS/mobile network among others, but these APIs were restricted more and more over time so the benefits became less.
Another fact was that I calculated that iPhones were cheaper than all Android I owned when taking resale value into the calculation. That Apple gives OS updates for 5+ years helped a lot here, I had experienced <1 year on flagship models before. (buying 2 year old iPhone and selling it at 4 year old was cheapest/year)
But one of the biggest reasons was that I never trusted Google much. For example I never used the feature to use WiFi networks to get coarse location. Which meant worse UX (had to click NO on a dialogue each time I activated GPS) but also a "feature" the iPhone had (better location).
This is obviously a very personal point of view and it might be very different today, as I used Android in its earlier years.
For browsing, it means that even phones which perform better in CPU bound benchmarks than my old iPhone 11 have random UI stutters & non-smooth scrolling in browser mostly while content is still loading, and these make me miss-click somewhere where I didn't want to, frequently enough to notice (compared to iPhones where it rarely happens)... 120Hz displays on Android make the UI smoother, but random janks & stutters still happen a lot more than on iPhones...
When I'm taking photos most of the time I want to take a good picture as fast as possible, sometimes I want to take more in quick succession, this is also somehow easier on iPhones from my experience.. (although I admit it's been a long time since I held a top-tier Android phone, my only contact with Androids is with my friends & family phones which are mostly Xiaomi/Huawei/OnePlus priced around 300-400€ which is half the price of my iPhone)
Also, switching to a newer iPhone is seamless compared to buying a new Android, and UI/UX/Settings don't change much with new versions, compared to Android version updates (although from what I've heard this has gotten better in Androids recently)
In your analogy I'd be talking about a power drill that just makes me work faster because it's better designed and more intuitive to use, even though it might have less RPM and less bits support.., if I did a lot of drilling just on Philips and Flathead and it saved me enough time, it would be worth the saved time I can use for other stuff...
Android seems to fixed only one of them (updates) while becoming more and more locked as iOS, quality photos with good shutter speed are offered only by pixel with bad availability in most of the world and pretty bad VFM besides A models
Many indicators of quality of life face diminishing returns past a $30k/yr (2005) threshold.
I imagine some people who genuinely think stuff similar the latter won't say it, and others may have it written off as deathbed delirium / psychosis and ignored if they do
probably the same reason why it's never the year of the linux desktop.
Well, this is not a news site but a <<hacker>> news site.
Great!!!
What is going on with "Android Emulation on Linux???"
I feel like I have to be missing something obvious, I can't see how it can be so darn hard to just run android apps on (desktop) Linux given..you know, that it is Linux.
FINE. Maybe this will be thing...
That's not to say the above doesn't happen with other languages/systems. It most certainly does. It just seems to happen faster in shell (especially when people start getting adventuresome in their use of fancy shell features).
Why not use the preferred tool?
Otherwise, why not write it in dash for strict POSIX conformance?
I do admit that there are some profound bash applications that are important to me, principally rear.