Skip to content

Commit

Permalink
cyanogenmod
Browse files Browse the repository at this point in the history
  • Loading branch information
cirosantilli committed Jan 26, 2016
1 parent 76e6fc1 commit 214fab3
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 27 deletions.
17 changes: 4 additions & 13 deletions README.md
Expand Up @@ -16,6 +16,8 @@ Tested on Android 23, Ubuntu 15.10.
1. [AOSP](aosp.md)
1. Internals
1. [Device file hierarchy](device-file-hierarchy.md)
1. Mods
1. [CyanogenMod](cyanogenmod.md)
1. [Examples](examples.md)
1. [Default](default/)
1. [min](min/)
Expand Down Expand Up @@ -302,12 +304,6 @@ It seems that it is the OEM that decides when to upgrade: <http://www.trustedrev

Bionic, Google-made.

### SSH connect

<http://stackoverflow.com/questions/11468053/how-can-i-communicate-with-an-android-device-via-ssh>

Remember that Nautilus can use it: <http://askubuntu.com/questions/456669/nautilus-connect-to-server-via-ssh-no-longer-present-in-ubuntu-14-04>

### Find local device IP

- <http://android.stackexchange.com/questions/2984/how-can-i-see-what-ip-address-my-android-phone-has>
Expand All @@ -331,10 +327,6 @@ If you root the device, you can change it, and make a custom Android however you

<https://www.youtube.com/watch?v=RIi4KXgZYsI&feature=iv&src_vid=AWNykj-lb-I&annotation_id=annotation_162326159>

#### Cyanogenmod

<http://www.cyanogenmod.org/> near stock experience.

### Desktop

Kill Windows.
Expand Down Expand Up @@ -378,6 +370,7 @@ Content policy: <https://play.google.com/about/developer-content-policy.html>

### Distribute App without Google Play

- <http://android.stackexchange.com/questions/216/what-are-the-alternative-android-app-markets>
- <http://developer.android.com/distribute/tools/open-distribution.html>
- <http://gamedev.stackexchange.com/questions/90523/how-can-i-publish-an-android-game-without-google-play>

Expand Down Expand Up @@ -425,9 +418,7 @@ Known WIFI not available it seems:

- <http://www.businessinsider.com/android-piracy-problem-2015-1>

## Enter boot mode

### Soft reset vs reboot
## Soft reset vs reboot

TODO?

Expand Down
10 changes: 10 additions & 0 deletions adb.md
Expand Up @@ -50,3 +50,13 @@ The default generated `ant` file does this with `ant debug install`.
## shell

TODO: is this the same as SSH? If not, how?

## push

Push file from local filesystem into device:

adb push local_file /path/on/device/local_file

## pull

Contrary of `push`.
2 changes: 2 additions & 0 deletions bibliography.md
Expand Up @@ -2,6 +2,8 @@

## Official

- <http://developer.android.com/reference/packages.html>: API Javadoc

- <http://tools.android.com/>

- <https://source.android.com/>
35 changes: 35 additions & 0 deletions boot.md
@@ -0,0 +1,35 @@
# Boot

Most devices have the bootloader unlocked.

## Unlocking the bootloader

**WILL WIPE YOUR LOCAL PHONE DATA!** <http://android.stackexchange.com/questions/33691/why-does-unlocking-the-bootloader-wipe-phone>

## Sony

Sony requires unlocking, but allows it for many phones: <http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/> It voids warranty.

When the guide says: insert USB with sound up button clicked, it is not joking: that does put the device on a special mode. This can be seen as the status LED turns blue instead of the regular red (charging) / green (charged). It doesn't have to be at the exact same time: if you hold up and insert, it works.

TODO what is the name of this blue light mode? Is that fastboot?

Then run:

sudo "$(which fastboot)" devices
# Replace with your unlock code from the website.
sudo "$(which fastboot)" -i 0x0fce oem unlock 0x0000000000000000

Now you can remove the cable, and hold at the same time:

- power
- volume up
- volume down

buttons. And it will enter the boot screen.

## fastboot

Name of an SDK CLI tool.

<http://www.androidcentral.com/android-z-what-fastboot>
1 change: 1 addition & 0 deletions build.md
Expand Up @@ -15,6 +15,7 @@ How to get and build android.
# Choose a target, e.g.:
lunch aosp_arm-eng
make
# Wait a very long time.

TODO: get it running.

Expand Down
5 changes: 5 additions & 0 deletions cyanogenmod.md
@@ -0,0 +1,5 @@
# CyanogenMod

One of the most popular mods.

<http://www.cyanogenmod.org/> near stock experience.
13 changes: 5 additions & 8 deletions device-file-hierarchy.md
Expand Up @@ -12,16 +12,13 @@ How files are organized inside the Android device.

The internal SD card is partitioned and mounted as follows:

- `/system` is mounted readonly and is the ROM
- `/sdcard` internal SD card
- `/system` is mounted readonly and is the ROM
- `/system/bin`: system utilities, like `run-as`. You may not be able to run them without root.
- `/sdcard` internal SD card
- `/sdcard/Music` main music location. Apps will look there by default, but on other places as well. TODO API enforced, or just convention?
- `/sdcard/Pictures` stock pictures
- `/sdcard/Pictures/Screenshots`
- `/sdcard/Ringtones`
- Play Music location: <http://android.stackexchange.com/questions/16220/where-does-google-music-store-offline-songs>
- `/data` is called "Internal storage", and contains apps and their data
- `/storage`

Where applications are installed:

- <http://android.stackexchange.com/questions/3002/where-in-the-file-system-are-applications-installed>
- `/data` is called "Internal storage", and contains apps and their data. <http://android.stackexchange.com/questions/3002/where-in-the-file-system-are-applications-installed>. TODO: example?
- `/storage`
4 changes: 0 additions & 4 deletions min/src/com/cirosantilli/android_cheat/min/Main.java
Expand Up @@ -5,10 +5,6 @@
import android.widget.TextView;

public class Main extends Activity {

/* (non-Javadoc)
* @see android.app.Activity#onCreate(android.os.Bundle)
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down
4 changes: 2 additions & 2 deletions ndk/README.md
@@ -1,6 +1,6 @@
# NDK

Minimized version of `$ANDROID_NDK/samples/hello-jni`. TODO: minimize further.
Minimized version of `$ANDROID_NDK/samples/hello-jni`.

Build with:

Expand All @@ -9,4 +9,4 @@ Build with:
ant debug
ant installd

TODO: I was not able to call my package `android_cheat` because of the underscore, even if I try to use the `_1` rule:
TODO: I was not able to call my package `android_cheat` because of the underscore, even if I try to use the `_1` rule: <http://stackoverflow.com/questions/16069209/invoking-jni-functions-in-android-package-name-containing-underscore>
20 changes: 20 additions & 0 deletions root.md
Expand Up @@ -9,11 +9,31 @@ TODO what does it do exactly?
- <http://gizmodo.com/5982287/reasons-to-root-your-android-device>
- <http://www.androidcentral.com/root>
- <http://www.digitaltrends.com/mobile/how-to-root-android/>
- <http://stackoverflow.com/questions/1043322/why-do-i-get-access-denied-to-data-folder-when-using-adb>

Many rooted apps are available on the Play store itself. Google is much less restrictive than Apple is about jailbreaking.

You need to backup your ROM and replace it with a new one.

## run-as

Run as the user of a given package of an `app` (the package is an unique app ID, each app has one Linux user):

run-as com.cirosantilli.mypackage

TODO: permission denied. Requires sudo?

## How it works

There are two methods: <https://www.kingoapp.com/faq.htm>

- Finding firmware exploits and using them: <https://www.quora.com/What-does-root-access-mean-on-an-Android-phone-What-can-be-done-after-rooting-a-phone>. Used by Kingo.
- Flashing a new rooted disk.

## Kingo

Kingo Root method: <https://www.youtube.com/watch?v=AWNykj-lb-I>

Works via exploits.

Once you have it, just type `su` on the SSH session or terminal emulator and go.
7 changes: 7 additions & 0 deletions ssh.md
@@ -0,0 +1,7 @@
# SSH

How to SSH into the phone.

<http://stackoverflow.com/questions/11468053/how-can-i-communicate-with-an-android-device-via-ssh/34040560#34040560>

Remember that Nautilus can use it: <http://askubuntu.com/questions/456669/nautilus-connect-to-server-via-ssh-no-longer-present-in-ubuntu-14-04>

0 comments on commit 214fab3

Please sign in to comment.